#import <CC3VertexArrays.h>
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 |
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.
- (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 | |
- (GLvoid*) matrixIndicesAt: | (GLuint) | __deprecated |
- (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 | |
- (void) setMatrixIndices: | (GLvoid *) | mtxIndices | |
at: | (GLuint) | __deprecated | |