Polycode::Skeleton Class Reference
3D skeleton.
More...
Inherits Polycode::SceneEntity.
List of all members.
Detailed Description
3D skeleton.
Skeletons are applied to scene meshes and can be animated with loaded animations.
Constructor & Destructor Documentation
Skeleton::Skeleton |
( |
const String & |
fileName |
) |
|
Construct skeleton from a skeleton file.
- Parameters:
-
Member Function Documentation
void Skeleton::addAnimation |
( |
const String & |
name, |
|
|
const String & |
fileName | |
|
) |
| | |
Loads in a new animation from a file and adds it to the skeleton.
- Parameters:
-
| name | Name of the new animation. |
| fileName | File to load animation from. |
void Skeleton::bonesVisible |
( |
bool |
val |
) |
|
Toggles bone visibility on and off.
- Parameters:
-
| val | If true, bones will be rendered, if false, they will not. |
void Skeleton::enableBoneLabels |
( |
const String & |
labelFont, |
|
|
Number |
size, |
|
|
Number |
scale, |
|
|
Color |
labelColor | |
|
) |
| | |
Enables labels with bone names to be rendered.
See SceneLabel for details on the parameters.
- Parameters:
-
| labelFont | Font to use |
| size | Size of font. |
| scale | Scale of font. |
| labelColor | Color of the label. |
Bone * Skeleton::getBone |
( |
int |
index |
) |
const |
Returns a bone at the specified index.
- Parameters:
-
Bone * Skeleton::getBoneByName |
( |
const String & |
name |
) |
const |
Get bone instance by its name.
- Parameters:
-
void Skeleton::loadSkeleton |
( |
const String & |
fileName |
) |
|
Loads a new skeleton from file.
- Parameters:
-
void Skeleton::playAnimation |
( |
const String & |
animName, |
|
|
bool |
once = false | |
|
) |
| | |
Play back a loaded animation.
- Parameters:
-
| animName | Name of animation to play. |
| once | If true, will only play the animation once. |
void Skeleton::Update |
( |
|
) |
[virtual] |
Main update method.
Override this to do your updates before the render cycle.
Reimplemented from Polycode::Entity.