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:
(void) - setWeights:at:
(GLfloat) - weightForVertexUnit:at:
(GLfloat *) - weightsAt:

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: (GLuint)  index 

Sets the weight element, for the specified vertex unit, at the specified index in the underlying vertex content, to the specified value.

The index refers to vertices, not bytes. The implementation takes into consideration the vertexStride 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 content has been released, this method will raise an assertion exception.

- (void) setWeights: (GLfloat *)  weights
at: (GLuint)  index 

Sets the weight elements at the specified vertex index in the underlying vertex content, to the values in the specified array.

The index refers to vertices, not bytes. The implementation takes into consideration the vertexStride 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 number of weight elements is the same for all vertices in this array, and can be retrieved from the elementSize property. The number of elements in the specified input array must therefore be at least as large as the value of the elementSize property.

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

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

Returns the weight element, for the specified vertex unit, at the specified index in the underlying vertex content.

The index refers to vertices, not bytes. The implementation takes into consideration the vertexStride 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 content has been released, this method will raise an assertion exception.

- (GLfloat*) weightsAt: (GLuint)  index

Returns a pointer to an array of the weight elements at the specified vertex index in the underlying vertex content.

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 number of elements in the returned array is the same for all vertices in this array, and can be retrieved from the elementSize property.

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

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


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