Polycode
|
Inherits Polycode::SceneEntity.
Public Member Functions | |
Bone (const String &boneName) | |
Constructor. | |
const String & | getName () const |
Returns the name of the bone. | |
void | Render () |
Main render method. | |
void | setParentBone (Bone *bone) |
Sets the parent bone of this bone. | |
void | addChildBone (Bone *bone) |
Adds another bone as the child of this bone. | |
Bone * | getParentBone () |
Returns the parent bone of this bone. | |
int | getNumChildBones () |
Returns the number of child bones of this bone. | |
Bone * | getChildBone (unsigned int index) |
Returns the child bone of this bone at the specified index. | |
Matrix4 | getBoneMatrix () const |
Returns the bone matrix. | |
void | setBoneMatrix (const Matrix4 &matrix) |
Sets the bone matrix. | |
Matrix4 | getRestMatrix () const |
Returns the rest matrix of this bone. | |
Matrix4 | getFullRestMatrix () const |
Returns the full rest matrix of this bone. | |
Matrix4 | getParentRestMatrix () const |
Returns the rest matrix of this bone's parent. | |
Matrix4 | getFinalMatrix () const |
void | setRestMatrix (const Matrix4 &matrix) |
Sets the rest matrix for this bone. | |
void | setBaseMatrix (const Matrix4 &matrix) |
Sets the base matrix for this bone. | |
const Matrix4 & | getBaseMatrix () const |
Returns the base matrix of this bone. | |
Matrix4 | getFullBaseMatrix () const |
Returns the full base matrix of this bone. | |
Public Attributes | |
int | parentBoneId |
Id of the bone. |
Skeleton bone.
Bones are bound to vertices of a mesh and when transformed, move the bound vertices of the mesh along with them. Bones are subclassed from SceneEntity, but have their own hierarchy system.
Bone::Bone | ( | const String & | boneName | ) |
Constructor.
boneName | Name of the bone. |
void Bone::addChildBone | ( | Bone * | bone | ) |
Adds another bone as the child of this bone.
bone | New parent bone. |
const Matrix4& Polycode::Bone::getBaseMatrix | ( | ) | const [inline] |
Returns the base matrix of this bone.
Bone * Bone::getChildBone | ( | unsigned int | index | ) |
Returns the child bone of this bone at the specified index.
index | Index of the child bone to return. |
Matrix4 Bone::getFinalMatrix | ( | ) | const |
Matrix4 Bone::getFullBaseMatrix | ( | ) | const |
Returns the full base matrix of this bone.
Matrix4 Bone::getFullRestMatrix | ( | ) | const |
Returns the full rest matrix of this bone.
const String & Bone::getName | ( | ) | const |
Returns the name of the bone.
int Bone::getNumChildBones | ( | ) |
Returns the number of child bones of this bone.
Bone * Bone::getParentBone | ( | ) |
Returns the parent bone of this bone.
Matrix4 Bone::getParentRestMatrix | ( | ) | const |
Returns the rest matrix of this bone's parent.
Matrix4 Bone::getRestMatrix | ( | ) | const |
Returns the rest matrix of this bone.
void Bone::Render | ( | ) | [virtual] |
void Bone::setBaseMatrix | ( | const Matrix4 & | matrix | ) |
Sets the base matrix for this bone.
matrix | New base matrix. |
void Bone::setParentBone | ( | Bone * | bone | ) |
Sets the parent bone of this bone.
bone | New parent bone. |
void Bone::setRestMatrix | ( | const Matrix4 & | matrix | ) |
Sets the rest matrix for this bone.
matrix | New rest matrix. |