Public Member Functions

CC3VertexWeights Class Reference

A CC3VertexArray that manages a collection of weights used by each vertex during vertex skinning, which is the manipulation of a soft-body mesh under control of a skeleton of bone nodes. More...

#import <CC3VertexArrays.h>

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

List of all members.

Public Member Functions

(void) - setWeight:forVertexUnit:at:
(GLfloat) - weightForVertexUnit:at:

Detailed Description

A CC3VertexArray that manages a collection of weights used by each vertex during vertex skinning, which 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 CC3VertexMatrixIndices 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

- (void) setWeight: (GLfloat)  aWeight
forVertexUnit: (GLuint)  vertexUnit
at: (GLsizei)  index 

Sets the weight 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 weights 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.

- (GLfloat) weightForVertexUnit: (GLuint)  vertexUnit
at: (GLsizei)  index 

Returns the weight 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 weights 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: