#import <CC3VertexSkinning.h>
Properties | |
CC3Vector * | deformedVertexLocations |
CC3SkinMeshNode * | node |
GLuint | vertexCount |
Properties inherited from CC3FaceArray | |
CC3Vector * | centers |
GLuint | faceCount |
CC3FaceIndices * | indices |
CC3Mesh * | mesh |
CC3FaceNeighbours * | neighbours |
CC3Vector * | normals |
CC3Plane * | planes |
BOOL | shouldCacheFaces |
Properties inherited from CC3Identifiable | |
NSObject *sharedUserData | __deprecated |
NSString * | name |
NSString * | nameSuffix |
GLint | podIndex |
BOOL | shouldIncludeInDeepCopy |
GLuint | tag |
NSObject * | userData |
Properties inherited from <CC3Cacheable> | |
NSString * | name |
Additional Inherited Members | |
Class Methods inherited from CC3FaceArray | |
(id) | + faceArray |
(id) | + faceArrayWithName: |
(id) | + faceArrayWithTag: |
(id) | + faceArrayWithTag:withName: |
CC3DeformedFaceArray extends CC3FaceArray to hold the deformed positions of each vertex.
From this, the deformed shape and orientation of each face in the mesh can be retrieved.
If configured to cache the face data (if the shouldCacheFaces is set to YES), the instance will register as a transform listener with the skin mesh node, so that the faces can be rebuilt if the skin mesh node or any of the bones move.
- (CC3Vector*) allocateDeformedVertexLocations |
Allocates underlying memory for the deformedVertexLocations property, and returns a pointer to the allocated memory.
This method will allocate enough memory for the deformedVertexLocations property to hold the number of CC3Vector structures specified by the vertexCount property.
This method is invoked automatically by the populateDeformedVertexLocations method. Usually, the application never needs to invoke this method directly.
It is safe to invoke this method more than once, but understand that any previously allocated memory will be safely released prior to the allocation of the new memory. The memory allocated earlier will therefore be lost and should not be referenced.
The memory allocated will automatically be released when this instance is deallocated.
- (void) clearDeformableCaches |
Clears any caches that contain deformable information, including deformed vertices, plus face centers, normals, and planes.
- (void) deallocateDeformedVertexLocations |
Deallocates the underlying memory that was previously allocated with the allocateDeformedVertexLocations method.
It is safe to invoke this method more than once, or even if the allocateDeformedVertexLocations method was not previously invoked.
This method is invoked automatically when allocateDeformedVertexLocations is invoked, and when this instance is deallocated. Usually, the application never needs to invoke this method directly.
- (CC3Vector) deformedVertexLocationAt: | (GLuint) | vertexIndex | |
fromFaceAt: | (GLuint) | faceIndex | |
Returns the deformed vertex location of the face at the specified vertex index, that is contained in the face with the specified index, lazily initializing the deformedVertexLocations property if needed.
- (void) markDeformedVertexLocationsDirty |
Marks the deformed vertices data as dirty.
It will be automatically repopulated on the next access.
- (void) populateDeformedVertexLocations |
Populates the contents of the deformedVertexLocations property from the associated mesh, automatically allocating memory for the property if needed.
This method is invoked automatically on the first access of the deformedVertexLocations property after the node property has been set. Usually, the application never needs to invoke this method directly.
However, if the deformedVertexLocations property has been set to an array created outside this instance, this method may be invoked to populate that array from the mesh.
|
readwritenonatomicassign |
An array containing the vertex locations of the underlying mesh, as deformed by the current position and orientation of the bones.
This property will be lazily initialized on the first access after the node property has been set, by an automatic invocation of the populateDeformedVertexLocations method. When created in this manner, the memory allocated to hold the data in the returned array will be managed by this instance.
Alternately, this property may be set directly to an array that was created externally. In this case, the underlying data memory is not managed by this instance, and it is up to the application to manage the allocation and deallocation of the underlying data memory, and to ensure that the array is large enough to contain the number of CC3Vector structures specified by the vertexCount property.
|
readwritenonatomicassign |
The skin mesh node containing the vertices for which this face array is managing faces.
Setting this property will also set the mesh property, and will cause the deformedVertexLocations, centers, normals, planes and neighbours properties to be deallocated and then re-built on the next access.
|
readnonatomicassign |
Indicates the number of vertices in the deformedVertexLocations array, as retrieved from the mesh.
The value of this property will be zero until either the node or mesh properties are set.