#include <sequencemixer.h>
Public Types | |
| typedef std::map< std::string, dtCore::RefPtr< const Animatable > > | AnimationTable |
| typedef AnimationTable::allocator_type::value_type | TableKey |
Public Member Functions | |
| SequenceMixer () | |
| void | Update (float dt) |
| The Update() must be call every frame, this is done automatically using an AnimationHelper. | |
| void | PlayAnimation (Animatable *pAnim) |
| PlayAnimation adds the given animation to active play list. | |
| void | ClearActiveAnimations (float time) |
| This function will clear all currently playing animations from the mixer over the fade out time specified. | |
| void | ClearAnimation (const std::string &pAnim, float time) |
| This function will clear an animation from the play list by name and fade it out over the time specifed. | |
| void | ClearRegisteredAnimations () |
| This function will clear all animations registered with the mixer. | |
| void | RemoveRegisteredAnimation (const std::string &pAnim) |
| This function will remove a registered animation by name from the mixer. | |
| Animatable * | GetActiveAnimation (const std::string &pAnim) |
| This function returns a pointer to the active animation specified by name. | |
| const Animatable * | GetActiveAnimation (const std::string &pAnim) const |
| This function returns a pointer to the active animation specified by name. | |
| const Animatable * | GetRegisteredAnimation (const std::string &pAnim) const |
| This function returns a pointer to the registered animation specified by name. | |
| void | RegisterAnimation (const Animatable *pAnimation) |
| This function registers and animation within the system. | |
| void | GetRegisteredAnimations (std::vector< const Animatable * > &toFill) const |
| Fills the given vector with all of the animatables registered with the mixer. | |
| void | ForceRecalculate () |
| This function forces all non-active animations to recalculate their start and end times. | |
Protected Member Functions | |
| virtual | ~SequenceMixer () |
Animations are registered with the SequenceMixer using an AnimationHelper on LoadModel(). Once an animation or sequence is registered the user can call PlayAnimation() by name. Alternatively the user can create an Animatable using an AnimationWrapper and call PlayAnimation using that. To clear the animation use the name specified by Animatable* GetName(), or the name used to play the animation.
| typedef std::map<std::string, dtCore::RefPtr<const Animatable> > dtAnim::SequenceMixer::AnimationTable |
| typedef AnimationTable::allocator_type::value_type dtAnim::SequenceMixer::TableKey |
| dtAnim::SequenceMixer::SequenceMixer | ( | ) |
| dtAnim::SequenceMixer::~SequenceMixer | ( | ) | [protected, virtual] |
| void dtAnim::SequenceMixer::Update | ( | float | dt | ) |
The Update() must be call every frame, this is done automatically using an AnimationHelper.
| delta | time |
| void dtAnim::SequenceMixer::PlayAnimation | ( | Animatable * | pAnim | ) |
PlayAnimation adds the given animation to active play list.
| The | name of the animation registered with the mixer |
| void dtAnim::SequenceMixer::ClearActiveAnimations | ( | float | time | ) |
This function will clear all currently playing animations from the mixer over the fade out time specified.
| the | time to fade out over |
| void dtAnim::SequenceMixer::ClearAnimation | ( | const std::string & | pAnim, | |
| float | time | |||
| ) |
This function will clear an animation from the play list by name and fade it out over the time specifed.
| the | name of the animation to fade out | |
| the | time to fade out over |
| void dtAnim::SequenceMixer::ClearRegisteredAnimations | ( | ) |
This function will clear all animations registered with the mixer.
| void dtAnim::SequenceMixer::RemoveRegisteredAnimation | ( | const std::string & | pAnim | ) |
This function will remove a registered animation by name from the mixer.
| Animatable * dtAnim::SequenceMixer::GetActiveAnimation | ( | const std::string & | pAnim | ) |
This function returns a pointer to the active animation specified by name.
| the | name of the active animation |
| const Animatable * dtAnim::SequenceMixer::GetActiveAnimation | ( | const std::string & | pAnim | ) | const |
This function returns a pointer to the active animation specified by name.
| the | name of the active animation |
| const Animatable * dtAnim::SequenceMixer::GetRegisteredAnimation | ( | const std::string & | pAnim | ) | const |
This function returns a pointer to the registered animation specified by name.
| the | name of the active animation |
| void dtAnim::SequenceMixer::RegisterAnimation | ( | const Animatable * | pAnimation | ) |
This function registers and animation within the system.
Registered animation can be configured and played by name. This animation is registered with the name specified by GetName().
| the | animation to register, the name this animation is registered with comes from calling GetName() on the animatable. |
| void dtAnim::SequenceMixer::GetRegisteredAnimations | ( | std::vector< const Animatable * > & | toFill | ) | const |
Fills the given vector with all of the animatables registered with the mixer.
| toFill | the vector of pointers to fill. |
| void dtAnim::SequenceMixer::ForceRecalculate | ( | ) |
This function forces all non-active animations to recalculate their start and end times.