v2.0.2
Instance Methods | List of all members
CC3VertexBoneIndices Class Reference

#import <CC3VertexArrays.h>

Inheritance diagram for CC3VertexBoneIndices:
Inheritance graph
[legend]

Instance Methods

(GLuint) - boneIndexForBoneInfluence:at:
 
(GLvoid *) - boneIndicesAt:
 
(GLuint) - matrixIndexForVertexUnit:at:
 
(GLvoid *) - matrixIndicesAt:
 
(void) - setBoneIndex:forBoneInfluence:at:
 
(void) - setBoneIndices:at:
 
(void) - setMatrixIndex:forVertexUnit:at:
 
(void) - setMatrixIndices:at:
 
- Instance Methods inherited from CC3VertexArray
(void) - __deprecated
 
(NSString *) - __deprecated
 
(void) - __deprecated
 
(GLvoid *) - addressOfElement:
 
(GLvoid *) - allocateElements:
 
(void) - bindContentToAttributeAt:withVisitor:
 
(void) - copyVertices:from:to:
 
(void) - copyVertices:from:toAddress:
 
(void) - copyVertices:fromAddress:to:
 
(void) - copyVertices:fromAddress:toAddress:
 
(void) - createGLBuffer
 
(void) - deleteGLBuffer
 
(NSString *) - describeElements:
 
(NSString *) - describeElements:startingAt:
 
(NSString *) - describeVertices
 
(NSString *) - describeVertices:
 
(NSString *) - describeVertices:startingAt:
 
(BOOL) - ensureCapacity:
 
(id) - initFromCPODData:fromSPODMesh:
 
(GLvoid *) - interleaveWith:
 
(GLvoid *) - interleaveWith:usingOffset:
 
(GLvoid *) - reallocateElements:
 
(void) - releaseRedundantContent
 
(void) - updateGLBuffer
 
(void) - updateGLBufferStartingAt:forLength:
 
- Instance Methods inherited from CC3Identifiable
(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:
 

Additional Inherited Members

- Class Methods inherited from CC3VertexArray
(id) + arrayFromCPODData:fromSPODMesh:
 
(GLenum) + defaultSemantic
 
(id) + vertexArray
 
(id) + vertexArrayWithName:
 
(id) + vertexArrayWithTag:
 
(id) + vertexArrayWithTag:withName:
 
- Properties inherited from CC3VertexArray
GLvoid *elements __deprecated
 
GLuint elementCount __deprecated
 
GLuint elementStride __deprecated
 
GLfloat capacityExpansionFactor __deprecated
 
BOOL shouldReleaseRedundantData __deprecated
 
GLuint allocatedVertexCapacity
 
GLuint bufferID
 
GLenum bufferTarget
 
GLenum bufferUsage
 
GLuint elementLength
 
GLuint elementOffset
 
GLint elementSize
 
GLenum elementType
 
BOOL isUsingGLBuffer
 
GLenum semantic
 
BOOL shouldAllowVertexBuffering
 
BOOL shouldNormalizeContent
 
BOOL shouldReleaseRedundantContent
 
GLuint vertexCount
 
GLuint vertexStride
 
GLvoid * vertices
 

Detailed Description

A CC3VertexArray that manages a collection of bone indices for each vertex.

Each bone index indicates one of several bones that influence the location of the vertex for a mesh that uses vertex skinning. Vertex skinning is the manipulation of a soft-body mesh under control of a skeleton of bone nodes.

For each vertex, the amount each bone should influence the vertex movement is identified by the weight specified in the corresponding entry in the CC3VertexBoneWeights vertex array.

This vertex array works together with an instace of a CC3VertexBoneWeights vertex array. The elementSize property of the two vertex arrays must be equal, and under OpenGL ES 1.1, must not be larger than the maximum number of available bone influences allowed by the platform, which can be retreived from CC3OpenGL.sharedGL.maxNumberOfBoneInfluencesPerVertex.

Method Documentation

- (GLuint) boneIndexForBoneInfluence: (GLuint)  influenceIndex
at: (GLuint)  vtxIndex 

Returns the index of the bone, that provides the influence at the specified influence index within a vertex, for the vertex at the specified index within the underlying vertex content.

The bone index indicates which bone provides the particular influence for the movement of the particular vertex. Several bone indices are stored for each vertex, one for each bone that influences the movement of that vertex. The specified influenceIndex parameter must be between zero, and the elementSize property (inclusive/exclusive respectively).

The vertex index refers to vertices, not bytes. The implementation takes into consideration the vertexStride and elementOffset properties to access the correct element.

If the releaseRedundantContent method has been invoked and the underlying vertex content has been released, this method will raise an assertion exception.

- (GLvoid*) boneIndicesAt: (GLuint)  vtxIndex

Returns the indices of all of the bones that influence the movement of the vertex at the specified index within the underlying vertex content.

Several indices are stored for each vertex, one for each bone that influences the movement of the vertex. The number of elements in the returned array is the same for each vertex in this vertex array, as defined by the elementSize property.

The bone indices can be stored in this array as either type GLushort or type GLubyte. The returned array will be of the type of index stored by this vertex array, and it is up to the application to know which type will be returned, and cast the returned array accordingly. The type can be determined by the elementType property of this array, which will return one of GL_UNSIGNED_SHORT or GL_UNSIGNED_BYTE, respectively.

The vertex index refers to vertices, not bytes. The implementation takes into consideration the vertexStride and elementOffset properties to access the correct vertices.

If the releaseRedundantContent method has been invoked and the underlying vertex content has been released, this method will raise an assertion exception.

- (GLuint) matrixIndexForVertexUnit: (GLuint)  vertexUnit
at: (GLuint)  __deprecated 

Deprecated:
Renamed to boneIndexForBoneInfluence:at:.
- (GLvoid*) matrixIndicesAt: (GLuint)  __deprecated

Deprecated:
Renamed to boneIndicesAt:.
- (void) setBoneIndex: (GLuint)  boneIndex
forBoneInfluence: (GLuint)  influenceIndex
at: (GLuint)  vtxIndex 

Sets the index of the bone, that provides the influence at the specified influence index within a vertex, for the vertex at the specified index within the underlying vertex content.

The bone index indicates which bone provides the particular influence for the movement of the particular vertex. Several bone indices are stored for each vertex, one for each bone that influences the movement of that vertex. The specified influenceIndex parameter must be between zero, and the elementSize property (inclusive/exclusive respectively).

The vertex index refers to vertices, not bytes. The implementation takes into consideration the vertexStride and elementOffset properties to access the correct element.

If the releaseRedundantContent method has been invoked and the underlying vertex content has been released, this method will raise an assertion exception.

- (void) setBoneIndices: (GLvoid *)  boneIndices
at: (GLuint)  vtxIndex 

Sets the indices of all of the bones that influence the movement of the vertex at the specified index within the underlying vertex content.

Several indices are stored for each vertex, one for each bone that influences the movement of the vertex. The number of elements in the specified input array must therefore be at least as large as the value of the elementSize property.

The bone indices can be stored in this array as either type GLushort or type GLubyte. The specified array must be of the type of index stored by this vertex array, and it is up to the application to know which type is required, and provide that type of array accordingly. The type can be determined by the elementType property of this array, which will return one of GL_UNSIGNED_SHORT or GL_UNSIGNED_BYTE, respectively.

To avoid checking the elementType altogether, you can use the setBoneIndex:forBoneInfluence:at: method, which sets the bone index values one at a time, and automatically converts the input type to the correct stored type.

The vertex index refers to vertices, not bytes. The implementation takes into consideration the vertexStride and elementOffset properties to access the correct vertices.

If the releaseRedundantContent method has been invoked and the underlying vertex content has been released, this method will raise an assertion exception.

- (void) setMatrixIndex: (GLuint)  aMatrixIndex
forVertexUnit: (GLuint)  vertexUnit
at: (GLuint)  __deprecated 

Deprecated:
Renamed to setBoneIndex:forBoneInfluence:at:.
- (void) setMatrixIndices: (GLvoid *)  mtxIndices
at: (GLuint)  __deprecated 

Deprecated:
Renamed to setBoneIndices:at:.

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