#include <animation/animator.h>
Inheritance diagram for neo::animation::Animator:


Public Member Functions | |
| Animator () | |
| Initialize. | |
| Animator (const Animator &animator) | |
| Copy animator. | |
| virtual | ~Animator () |
| Free resources. | |
| void | addAnimation (const std::string &name, const AnimationPtr &p_anim) |
| Add animation. | |
| AnimationPtr | getAnimation (const std::string &name) const |
| Get animation. | |
| const core::HashTable< std::string, AnimationPtr > & | getAnimations () const |
| Get all animations. | |
| void | addSequence (const std::string &name, const Sequence &sequence) |
| Add sequence. | |
| Sequence * | getSequence (const std::string &name) |
| Get sequence. | |
| void | setBlendChainDepth (unsigned int depth) |
| Set blend chain depth. | |
| unsigned int | getBlendChainDepth () const |
| Get blend chain depth. | |
| void | playSequence (const std::string &name) |
| Play a sequence. | |
| void | pauseSequence () |
| Pause the current sequence. | |
| void | resumeSequence () |
| Resume the current sequence. | |
| void | stopSequence () |
| Stop the current sequence. | |
| void | playAnimation (unsigned int stage, const std::string &name, bool loop) |
| Play animation on given blend stage. | |
| void | pauseAnimation (unsigned int stage) |
| Pause animation on given blend stage. | |
| void | resumeAnimation (unsigned int stage) |
| Resume animation on given blend stage. | |
| void | stopAnimation (unsigned int stage) |
| Stop animation on given blend stage. | |
| virtual void | update (float dt) |
| Update animations in blend chain. | |
| virtual void | blend () |
| Do animation blending. | |
| AnimationInstance * | getStageAnimation (unsigned int stage) |
| Get animation for blend stage. | |
| float | getStageWeight (unsigned int stage) |
| Get weight for blend stage. | |
| void | setStageWeight (unsigned int stage, float weight) |
| Set weight for blend stage. | |
| float | getStageTimeScale (unsigned int stage) |
| Get time scaling for blend stage. | |
| void | setStageTimeScale (unsigned int stage, float scale) |
| Set time scaling for blend stage. | |
| void | setStageTimeScaleAll (float scale) |
| Set time scaling for all blend stages. | |
| std::string | getStageAnimationName (unsigned int stage) |
| Get name of animation for blend stage. | |
| unsigned int | getNumActiveStages () const |
| Get number of active stages. | |
| const Keyframe * | getAnimationChannel (const core::HashString &channel) const |
| Get resulting channel data. | |
| bool | isSequencePlaying () const |
| Query if sequence is playing. | |
| Animator & | operator= (const Animator &animator) |
| Copy animator setup. | |
| neo::animation::Animator::Animator | ( | const Animator & | animator | ) |
| animator | Source animator |
| void neo::animation::Animator::addAnimation | ( | const std::string & | name, | |
| const AnimationPtr & | p_anim | |||
| ) |
| AnimationPtr neo::animation::Animator::getAnimation | ( | const std::string & | name | ) | const |
| const core::HashTable< std::string, AnimationPtr > & neo::animation::Animator::getAnimations | ( | ) | const [inline] |
Get all animations as an associative name-animation hash map
| void neo::animation::Animator::addSequence | ( | const std::string & | name, | |
| const Sequence & | sequence | |||
| ) |
| Sequence* neo::animation::Animator::getSequence | ( | const std::string & | name | ) |
| void neo::animation::Animator::setBlendChainDepth | ( | unsigned int | depth | ) |
Set blend chain depth. If the current depth is deeper than the new depth, remaining blend stages are deallocated and not used. New blend stages are initialized as empty, remaining stages are kept intact.
| depth | New blend chain depth |
| unsigned int neo::animation::Animator::getBlendChainDepth | ( | ) | const [inline] |
| void neo::animation::Animator::playSequence | ( | const std::string & | name | ) |
Play a sequence. Only one sequence can be played at a time.
| name | Sequence name |
| void neo::animation::Animator::pauseSequence | ( | ) |
Pause the current sequence. The sequence can later be resumed with a call to resumeSequence
| void neo::animation::Animator::resumeSequence | ( | ) |
Resume the current sequence
| void neo::animation::Animator::stopSequence | ( | ) |
Stop the current sequence and reset to no active sequence
| void neo::animation::Animator::playAnimation | ( | unsigned int | stage, | |
| const std::string & | name, | |||
| bool | loop | |||
| ) |
Play an animation on the given blend stage
| stage | Blend stage index | |
| name | Animation name | |
| loop | Loop flag |
| void neo::animation::Animator::pauseAnimation | ( | unsigned int | stage | ) |
Pause the animation on the given blend stage. The animation can later be resumed with a call to resumeAnimation animation will only be stopped.
| stage | Blend stage index |
| void neo::animation::Animator::resumeAnimation | ( | unsigned int | stage | ) |
Resume the animation on the given blend stage
| stage | Blend stage index |
| void neo::animation::Animator::stopAnimation | ( | unsigned int | stage | ) |
Stop the animation on the given blend stage, and clear the stage
| stage | Blend stage index |
| virtual void neo::animation::Animator::update | ( | float | dt | ) | [virtual] |
| dt | Time passed since last update |
Reimplemented in neo::scene::ChaseCamera, neo::scene::Object, and neo::scene::Skeleton.
| virtual void neo::animation::Animator::blend | ( | ) | [virtual] |
Do animation blending and put final data in keyframes map
| AnimationInstance* neo::animation::Animator::getStageAnimation | ( | unsigned int | stage | ) |
| float neo::animation::Animator::getStageWeight | ( | unsigned int | stage | ) |
| stage | Blend stage index |
| void neo::animation::Animator::setStageWeight | ( | unsigned int | stage, | |
| float | weight | |||
| ) |
| stage | Blend stage index | |
| weight | Weight factor for blend stage |
| float neo::animation::Animator::getStageTimeScale | ( | unsigned int | stage | ) |
| stage | Blend stage index |
| void neo::animation::Animator::setStageTimeScale | ( | unsigned int | stage, | |
| float | scale | |||
| ) |
| stage | Blend stage index | |
| scale | Time scaling factor for blend stage |
| void neo::animation::Animator::setStageTimeScaleAll | ( | float | scale | ) |
| scale | Time scaling factor |
| std::string neo::animation::Animator::getStageAnimationName | ( | unsigned int | stage | ) |
| stage | Blend stage index |
| unsigned int neo::animation::Animator::getNumActiveStages | ( | ) | const |
| const Keyframe * neo::animation::Animator::getAnimationChannel | ( | const core::HashString & | channel | ) | const [inline] |
Get the resulting data for an animation channel
| channel | Channel name |
| bool neo::animation::Animator::isSequencePlaying | ( | ) | const |
Copy animator setup data
| animator | Source animator |
1.5.1