Public Member Functions

CC3VertexMatrixIndices Class Reference

A CC3VertexArray that manages a collection of indices used by each vertex to point to a collection of distinct matrices during vertex skinning. More...

#import <CC3VertexArrays.h>

Inheritance diagram for CC3VertexMatrixIndices:
Inheritance graph
[legend]
Collaboration diagram for CC3VertexMatrixIndices:
Collaboration graph
[legend]

List of all members.

Public Member Functions

(GLushort) - matrixIndexForVertexUnit:at:
(void) - setMatrixIndex:forVertexUnit:at:

Detailed Description

A CC3VertexArray that manages a collection of indices used by each vertex to point to a collection of distinct matrices during vertex skinning.

Vertex skinning is the manipulation of a soft-body mesh under control of a skeleton of bone nodes.

This vertex array works together with an instace of a CC3VertexWeights vertex array, and the elementSize property of the two vertex arrays must be equal, and must not be larger than the maximum number of available vertex units for the platform, which can be retreived from [CC3OpenGLES11Engine engine].platform.maxVertexUnits.value.


Member Function Documentation

- (GLushort) matrixIndexForVertexUnit: (GLuint)  vertexUnit
at: (GLsizei)  index 

Returns the matrix index element, for the specified vertex unit, at the specified index in the underlying vertex data.

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

Several matrix indices are stored for each vertex, one per vertex unit, corresponding to one for each bone that influences the location of the vertex. The specified vertexUnit parameter must be between zero inclusive, and the elementSize property, exclusive.

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

- (void) setMatrixIndex: (GLushort)  aMatrixIndex
forVertexUnit: (GLuint)  vertexUnit
at: (GLsizei)  index 

Sets the matrix index element, for the specified vertex unit, at the specified index in the underlying vertex data, to the specified value.

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

Several matrix indices are stored for each vertex, one per vertex unit, corresponding to one for each bone that influences the location of the vertex. The specified vertexUnit parameter must be between zero inclusive, and the elementSize property, exclusive.

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


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