#include <MeshSkin.h>
Public Member Functions | |
const Matrix & | getBindShape () const |
void | setBindShape (const float *matrix) |
unsigned int | getJointCount () const |
Joint * | getJoint (unsigned int index) const |
Joint * | getJoint (const char *id) const |
Joint * | getRootJoint () const |
void | setRootJoint (Joint *joint) |
int | getJointIndex (Joint *joint) const |
Vector4 * | getMatrixPalette () const |
unsigned int | getMatrixPaletteSize () const |
Model * | getModel () const |
void | transformChanged (Transform *transform, long cookie) |
Defines the skin for a mesh.
A skin is used to support skinning otherwise known as vertex blending. This allows for a Model's mesh to support a skeleton on joints that will influence the vertex position and which the joints can be animated.
const Matrix& gameplay::MeshSkin::getBindShape | ( | ) | const |
Returns the bind shape matrix.
Joint* gameplay::MeshSkin::getJoint | ( | unsigned int | index | ) | const |
Returns the joint at the given index.
index | The index. |
Joint* gameplay::MeshSkin::getJoint | ( | const char * | id | ) | const |
Returns the joint with the given ID.
id | The ID of the joint to search for. |
unsigned int gameplay::MeshSkin::getJointCount | ( | ) | const |
Returns the number of joints in this MeshSkin.
int gameplay::MeshSkin::getJointIndex | ( | Joint * | joint | ) | const |
Vector4* gameplay::MeshSkin::getMatrixPalette | ( | ) | const |
Returns the pointer to the Vector4 array for the purpose of binding to a shader.
unsigned int gameplay::MeshSkin::getMatrixPaletteSize | ( | ) | const |
Returns the number of elements in the matrix palette array. Each element is a Vector4* that represents a row. Each matrix palette is represented by 3 rows of Vector4.
Model* gameplay::MeshSkin::getModel | ( | ) | const |
Returns our parent Model.
Joint* gameplay::MeshSkin::getRootJoint | ( | ) | const |
Returns the root most joint for this MeshSkin.
void gameplay::MeshSkin::setBindShape | ( | const float * | matrix | ) |
Sets the bind shape of this skin.
matrix | An array of 16 floats. |
void gameplay::MeshSkin::setRootJoint | ( | Joint * | joint | ) |
void gameplay::MeshSkin::transformChanged | ( | Transform * | transform, |
long | cookie | ||
) | [virtual] |
Handles transform change events for joints.
Implements gameplay::Transform::Listener.