Instance Methods | Properties | List of all members
CC3DeformedFaceArray Class Reference

#import <CC3VertexSkinning.h>

Inheritance diagram for CC3DeformedFaceArray:
Inheritance graph

Instance Methods

(CC3Vector *) - allocateDeformedVertexLocations
(void) - clearDeformableCaches
(void) - deallocateDeformedVertexLocations
(CC3Vector- deformedVertexLocationAt:fromFaceAt:
(void) - markDeformedVertexLocationsDirty
(void) - populateDeformedVertexLocations
- Instance Methods inherited from CC3FaceArray
(CC3Vector *) - allocateCenters
(CC3FaceIndices *) - allocateIndices
(CC3FaceNeighbours *) - allocateNeighbours
(CC3Vector *) - allocateNormals
(CC3Plane *) - allocatePlanes
(CC3Vector- centerAt:
(void) - deallocateCenters
(void) - deallocateIndices
(void) - deallocateNeighbours
(void) - deallocateNormals
(void) - deallocatePlanes
(CC3FaceIndices- indicesAt:
(void) - markCentersDirty
(void) - markIndicesDirty
(void) - markNeighboursDirty
(void) - markNormalsDirty
(void) - markPlanesDirty
(CC3FaceNeighbours- neighboursAt:
(CC3Vector- normalAt:
(CC3Plane- planeAt:
(void) - populateCenters
(void) - populateIndices
(void) - populateNeighbours
(void) - populateNormals
(void) - populatePlanes
- Instance Methods inherited from CC3Identifiable
(void) - __deprecated
(id) - copy
(id) - copyAsClass:
(void) - copyUserDataFrom:
(id) - copyWithName:
(id) - copyWithName:asClass:
(id) - copyWithZone:withName:
(id) - copyWithZone:withName:asClass:
(BOOL) - deriveNameFrom:
(BOOL) - deriveNameFrom:usingSuffix:
(NSString *) - fullDescription
(id) - init
(id) - initAtIndex:fromPODResource:
(void) - initUserData
(id) - initWithName:
(id) - initWithTag:
(id) - initWithTag:withName:
(GLuint) - nextTag
(void) - populateFrom:


GLuint vertexCount
- Properties inherited from CC3FaceArray
GLuint faceCount
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:

Detailed Description

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.

Method Documentation

- (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.

Property Documentation

- (CC3Vector*) deformedVertexLocations

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.

- (CC3SkinMeshNode*) node

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.

- (GLuint) vertexCount

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.

The documentation for this class was generated from the following file: