#include <animation/animation.h>
Collaboration diagram for neo::animation::AnimationInstance:

Public Member Functions | |
| AnimationInstance (const AnimationPtr &p_anim) | |
| Initialize. | |
| AnimationInstance (const AnimationInstance &instance) | |
| Copy. | |
| virtual | ~AnimationInstance () |
| Free resources. | |
| void | update (float dt) |
| Update animation. | |
| void | interpolate (core::HashTable< std::string, Keyframe * > &dest) |
| Interpolate animation data. | |
| void | blend (core::HashTable< std::string, Keyframe * > &dest, float weight) |
| Interpolate and blend animation data. | |
| void | setAnimation (const AnimationPtr &p_anim) |
| Set new animation. | |
| const AnimationPtr & | getAnimation () const |
| Get the animation. | |
| void | reset (float time=0.0f) |
| Reset animation time. | |
| void | play (bool play=true) |
| Set play flag. | |
| void | loop (bool loop=true) |
| Set loop flag. | |
| float | getCurrentTime () const |
| Get animation time. | |
| bool | isLooping () const |
| Query if looping. | |
| bool | isPlaying () const |
| Query if playing. | |
| bool | isLooped () const |
| Query if looped last update. | |
Protected Attributes | |
| AnimationPtr | _p_animation |
| Animation. | |
| core::Array< unsigned int > | _keyframeIndex |
| Last keyframe indices for all channels. | |
| float | _time |
| Current time. | |
| float | _timeNorm |
| Current normalized time. | |
| bool | _loop |
| Loop flag. | |
| bool | _play |
| Play flag. | |
| bool | _looped |
| Loop last update flag. | |
| neo::animation::AnimationInstance::AnimationInstance | ( | const AnimationPtr & | p_anim | ) |
Initialize animation instance to start of given animation
| p_anim | Animation |
| neo::animation::AnimationInstance::AnimationInstance | ( | const AnimationInstance & | instance | ) |
| instance | Source instance |
| void neo::animation::AnimationInstance::update | ( | float | dt | ) |
Update this animation instance
| dt | Time passed since last update |
| void neo::animation::AnimationInstance::interpolate | ( | core::HashTable< std::string, Keyframe * > & | dest | ) |
Interpolate the animation data
| dest | Destination keyframes |
| void neo::animation::AnimationInstance::blend | ( | core::HashTable< std::string, Keyframe * > & | dest, | |
| float | weight | |||
| ) |
Interpolate and blend the animation data
| dest | Destination keyframes | |
| weight | Blend weight |
| void neo::animation::AnimationInstance::setAnimation | ( | const AnimationPtr & | p_anim | ) |
Set new animation to instantiate. Will reset the animation to zero
| p_anim | Animation |
| const AnimationPtr & neo::animation::AnimationInstance::getAnimation | ( | ) | const [inline] |
Get the animation we instantiate
| void neo::animation::AnimationInstance::reset | ( | float | time = 0.0f |
) | [inline] |
Reset animation time to given time in [0..1] range
| time | Timestamp |
| void neo::animation::AnimationInstance::play | ( | bool | play = true |
) | [inline] |
Set the play flag
| play | Play flag |
| void neo::animation::AnimationInstance::loop | ( | bool | loop = true |
) | [inline] |
Set the loop flag
| loop | Loop flag |
| float neo::animation::AnimationInstance::getCurrentTime | ( | ) | const [inline] |
Get current animation time in [0..1] range
| bool neo::animation::AnimationInstance::isLooping | ( | ) | const [inline] |
| bool neo::animation::AnimationInstance::isPlaying | ( | ) | const [inline] |
| bool neo::animation::AnimationInstance::isLooped | ( | ) | const [inline] |
1.5.1