#include <Animation.h>
Public Member Functions | |
void | addClip (const AnimationClip &clip) |
void | play (const string &clip) |
void | pause () |
void | fadeIn (const string &clip) |
void | fadeOut (const string &clip) |
void | animate (float t) |
Protected Attributes | |
bool | playing |
vector< AnimationClip * > | clips |
map< string, AnimationClip > | clipsmap |
vector< float > | weights |
vector< float > | startTimes |
map< Transform *, Vec3f > | blendedRotations |
An Animation class structure Operating on the Tranform nodes of the scene graph. Responsible for interpolationg the bones's rotations, playing and blending animation clips.
void Animation::addClip | ( | const AnimationClip & | clip | ) |
User function to add a clip to the animation
void Animation::animate | ( | float | t | ) |
Function called by the engine to set the pose to the pose at time t.
void Animation::fadeIn | ( | const string & | clip | ) |
User function to start fading in an animation clip.
void Animation::fadeOut | ( | const string & | clip | ) |
User function to start fading out an animation clip.
void Animation::play | ( | const string & | clip | ) |
User function to start playing an animation clip.
map<Transform*,Vec3f> Animation::blendedRotations [protected] |
A map to used internaly to associate blended rotations to bones.
vector<AnimationClip*> Animation::clips [protected] |
Pointers to the clips.
map<string,AnimationClip> Animation::clipsmap [protected] |
Map to acces to the clips.
vector<float> Animation::startTimes [protected] |
The time at which each clip has started. Used internaly transfom the games current time to the range of the clip.
vector<float> Animation::weights [protected] |
Weights associated to each clip. Used internaly to blend animations.