|  | overview |  | wiki |  | api reference |  | download

- Main Page
- Classes

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Functions Variables Typedefs Enumerations Enumerator
Public Member Functions
gameplay::MeshSkin Class Reference

`#include <MeshSkin.h>`

Inheritance diagram for gameplay::MeshSkin:

List of all members.

## 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)

## Detailed Description

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.

## Member Function Documentation

const Matrix& gameplay::MeshSkin::getBindShape | ( |  | ) | const

Returns the bind shape matrix.

Returns:
  The bind shape matrix.

Joint* gameplay::MeshSkin::getJoint | ( | unsigned int | index | ) | const

Returns the joint at the given index.

Parameters:

  index | The index.

Returns:
  The joint.

Joint* gameplay::MeshSkin::getJoint | ( | const char * | id | ) | const

Returns the joint with the given ID.

Parameters:

  id | The ID of the joint to search for.

Returns:
  The joint, or NULL if not found.

unsigned int gameplay::MeshSkin::getJointCount | ( |  | ) | const

Returns the number of joints in this MeshSkin.

int gameplay::MeshSkin::getJointIndex | ( | Joint * | joint | ) | const

Returns the index of the specified joint in this MeshSkin.

Returns:
  The index of the joint in this MeshSkin, or -1 if the joint does not belong to this MeshSkin.

Vector4* gameplay::MeshSkin::getMatrixPalette | ( |  | ) | const

Returns the pointer to the Vector4 array for the purpose of binding to a shader.

Returns:
  The pointer to the matrix palette.

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.

Returns:
  The matrix palette size.

Model* gameplay::MeshSkin::getModel | ( |  | ) | const

Returns our parent Model.

Joint* gameplay::MeshSkin::getRootJoint | ( |  | ) | const

Returns the root most joint for this MeshSkin.

Returns:
  The root joint.

void gameplay::MeshSkin::setBindShape | ( | const float * | matrix | ) |

Sets the bind shape of this skin.

Parameters:

  matrix | An array of 16 floats.

void gameplay::MeshSkin::setRootJoint | ( | Joint * | joint | ) |

Sets the root joint for this MeshSkin.

The specified Joint must belong to the joint list for this MeshSkin.

Parameters:

  joint | The root joint.

void gameplay::MeshSkin::transformChanged | ( | Transform * | transform,
|  | long | cookie
| ) |  | `[virtual]`

Handles transform change events for joints.

Implements gameplay::Transform::Listener.

All Classes Functions Variables Typedefs Enumerations Enumerator