#include <animationsequence.h>
Public Member Functions | |
| AnimationController (AnimationSequence &) | |
| Constructor. | |
| AnimationController (const AnimationController &) | |
| copy constructor | |
| AnimationController & | operator= (const AnimationController &) |
| operator equal | |
| virtual dtCore::RefPtr < AnimationController > | Clone () const |
| classes derived from this should implement a custom Clone() | |
| AnimationSequence & | GetParent () |
| |
| const AnimationSequence & | GetParent () const |
| |
| void | SetParent (AnimationSequence &) |
| Sets the parent AnimationSequence. | |
| virtual void | Update (float dt) |
| The Update function is responsible for updating all the parent sequences children. | |
| virtual void | Recalculate () |
| The Recalculate function is responsible for calculating the start times of all the parent sequences children and then calling Recalculate() on them so they can calculate their end times. | |
Protected Member Functions | |
| virtual | ~AnimationController () |
| void | SetComputeWeight (Animatable *pAnim) |
| Helper function to compute the weight of a child animatable using the parents weight. | |
| void | SetComputeSpeed (Animatable *pAnim) |
| Helper function to compute the speed of a child animatable using the parents speed. | |
To change the update behavior, subclass AnimationController and add it to your AnimationSequence.
| dtAnim::AnimationSequence::AnimationController::AnimationController | ( | AnimationSequence & | pParent | ) |
Constructor.
| the | parent AnimatationSequence |
| dtAnim::AnimationSequence::AnimationController::AnimationController | ( | const AnimationController & | pCont | ) |
copy constructor
| dtAnim::AnimationSequence::AnimationController::~AnimationController | ( | ) | [protected, virtual] |
| AnimationSequence::AnimationController & dtAnim::AnimationSequence::AnimationController::operator= | ( | const AnimationController & | pCont | ) |
operator equal
| dtCore::RefPtr< AnimationSequence::AnimationController > dtAnim::AnimationSequence::AnimationController::Clone | ( | ) | const [virtual] |
classes derived from this should implement a custom Clone()
| AnimationSequence & dtAnim::AnimationSequence::AnimationController::GetParent | ( | ) |
| const AnimationSequence & dtAnim::AnimationSequence::AnimationController::GetParent | ( | ) | const |
| void dtAnim::AnimationSequence::AnimationController::SetParent | ( | AnimationSequence & | pParent | ) |
Sets the parent AnimationSequence.
| void dtAnim::AnimationSequence::AnimationController::Update | ( | float | dt | ) | [virtual] |
The Update function is responsible for updating all the parent sequences children.
This update consists of incrementing their elapsed time, calculating their current weight, and call update on them if they are active.
| delta | time |
| void dtAnim::AnimationSequence::AnimationController::Recalculate | ( | ) | [virtual] |
The Recalculate function is responsible for calculating the start times of all the parent sequences children and then calling Recalculate() on them so they can calculate their end times.
| void dtAnim::AnimationSequence::AnimationController::SetComputeWeight | ( | Animatable * | pAnim | ) | [protected] |
Helper function to compute the weight of a child animatable using the parents weight.
| void dtAnim::AnimationSequence::AnimationController::SetComputeSpeed | ( | Animatable * | pAnim | ) | [protected] |
Helper function to compute the speed of a child animatable using the parents speed.