#include <spAnimation.hpp>
Public Member Functions | |
| virtual | ~Animation () |
| virtual bool | play (const EAnimPlaybackModes Mode, u32 FirstFrame=0, u32 LastFrame=ANIM_LAST_FRAME) |
| virtual void | pause (bool IsPaused=true) |
| Pauses or resumes the animation. | |
| virtual void | stop (bool IsReset=false) |
| Stops the animation. | |
| virtual void | clearKeyframes ()=0 |
| Clears all keyframes. | |
| virtual void | setFrame (u32 Index) |
| Sets the new frame index. Should not be used while the animation is playing. | |
| virtual void | updateAnimation (SceneNode *Node)=0 |
| Updates the animation process if currently it's playing. | |
| virtual u32 | getKeyframeCount () const =0 |
| Returns the count of keyframes. | |
| virtual void | interpolate (u32 IndexFrom, u32 IndexTo, f32 Interpolation)=0 |
| Makes an interpolation between the two given frames. | |
| virtual bool | interpolateRange (u32 FirstFrame, u32 LastFrame, f32 Interpolation) |
| Makes an interpolation over the given sequence. In this case the first frame must be smaller then the last frame! | |
| virtual void | interpolateBlended (const AnimationPlayback &PlaybackFrom, const AnimationPlayback &PlaybackTo, f32 BlendingFactor) |
| Makes an blended interpolation between the two given playback states. This can be used for 'animation blending'. | |
| virtual void | addSceneNode (SceneNode *Object) |
| virtual void | removeSceneNode (SceneNode *Object) |
| Removes the specified scene node from the animatable object list. | |
| virtual void | clearSceneNodes () |
| Removes the animatable object list. | |
| virtual void | copy (const Animation *Other)=0 |
| EAnimationTypes | getType () const |
| Returns the type of animation: Node-, MorphTarget- or SkeletalAnimation. | |
| void | setName (const io::stringc &Name) |
| Sets the animation name. | |
| io::stringc | getName () const |
| Returns the animation name. | |
| void | setFlags (s32 Flags) |
| s32 | getFlags () const |
| Returns the animation flags. By default 0. | |
| bool | playing () const |
| Returns true if the animation is currently playing. | |
| u32 | getFrame () const |
| Returns the current frame index. | |
| u32 | getMinFrame () const |
| Returns the minimal keyframe index. | |
| u32 | getMaxFrame () const |
| Returns the maximal keyframe index. | |
| void | setInterpolation (f32 Interpolation) |
| Sets the new frame interpolation. | |
| f32 | getInterpolation () const |
| Returns the current frame interpolation. | |
| EAnimPlaybackModes | getPlaybackMode () const |
| Returns the current animation playback mode. | |
| void | setSpeed (f32 Speed) |
| Sets the new playback speed (by default 1.0). | |
| f32 | getSpeed () const |
| const AnimationPlayback & | getPlayback () const |
| Returns a constant reference to the playback state object. | |
| AnimationPlayback & | getPlayback () |
| Returns a reference to the playback state object. | |
| const std::list< SceneNode * > & | getSceneNodeList () const |
| Returns the animatable scene node list. | |
Protected Member Functions | |
| Animation (const EAnimationTypes Type) | |
| virtual void | updatePlayback (f32 Speed) |
| Updates the playback process with the specified interpolation speed. | |
| u32 | getValidFrame (u32 Index) const |
| Returns the valid keyframe index. | |
| void | copyBase (const Animation *Other) |
Protected Attributes | |
| u32 | MinFrame_ |
| u32 | MaxFrame_ |
| AnimationPlayback | Playback_ |
| s32 | Flags_ |
Animation base class. This is the base class for animation objects. It has the fundamental functions like playing and updating the animation.
| sp::scene::Animation::~Animation | ( | ) | [virtual] |
| sp::scene::Animation::Animation | ( | const EAnimationTypes | Type | ) | [protected] |
| void sp::scene::Animation::addSceneNode | ( | SceneNode * | Object | ) | [virtual] |
Adds the specified scene node to the animatable object list. All these objects will be animated when this animation is being played using SceneGraph::updateAnimations.
| virtual void sp::scene::Animation::clearKeyframes | ( | ) | [pure virtual] |
Clears all keyframes.
Implemented in sp::scene::MorphTargetAnimation, sp::scene::NodeAnimation, and sp::scene::SkeletalAnimation.
| void sp::scene::Animation::clearSceneNodes | ( | ) | [virtual] |
Removes the animatable object list.
| virtual void sp::scene::Animation::copy | ( | const Animation * | Other | ) | [pure virtual] |
Copies the whole animation.
Implemented in sp::scene::MorphTargetAnimation, sp::scene::NodeAnimation, and sp::scene::SkeletalAnimation.
| void sp::scene::Animation::copyBase | ( | const Animation * | Other | ) | [protected] |
| s32 sp::scene::Animation::getFlags | ( | ) | const [inline] |
Returns the animation flags. By default 0.
| u32 sp::scene::Animation::getFrame | ( | ) | const [inline] |
Returns the current frame index.
| f32 sp::scene::Animation::getInterpolation | ( | ) | const [inline] |
Returns the current frame interpolation.
| virtual u32 sp::scene::Animation::getKeyframeCount | ( | ) | const [pure virtual] |
Returns the count of keyframes.
Implemented in sp::scene::MorphTargetAnimation, sp::scene::NodeAnimation, and sp::scene::SkeletalAnimation.
| u32 sp::scene::Animation::getMaxFrame | ( | ) | const [inline] |
Returns the maximal keyframe index.
| u32 sp::scene::Animation::getMinFrame | ( | ) | const [inline] |
Returns the minimal keyframe index.
| io::stringc sp::scene::Animation::getName | ( | ) | const [inline] |
Returns the animation name.
| const AnimationPlayback& sp::scene::Animation::getPlayback | ( | ) | const [inline] |
Returns a constant reference to the playback state object.
| AnimationPlayback& sp::scene::Animation::getPlayback | ( | ) | [inline] |
Returns a reference to the playback state object.
| EAnimPlaybackModes sp::scene::Animation::getPlaybackMode | ( | ) | const [inline] |
Returns the current animation playback mode.
| const std::list<SceneNode*>& sp::scene::Animation::getSceneNodeList | ( | ) | const [inline] |
Returns the animatable scene node list.
| f32 sp::scene::Animation::getSpeed | ( | ) | const [inline] |
| EAnimationTypes sp::scene::Animation::getType | ( | ) | const [inline] |
Returns the type of animation: Node-, MorphTarget- or SkeletalAnimation.
Returns the valid keyframe index.
| virtual void sp::scene::Animation::interpolate | ( | u32 | IndexFrom, | |
| u32 | IndexTo, | |||
| f32 | Interpolation | |||
| ) | [pure virtual] |
Makes an interpolation between the two given frames.
Implemented in sp::scene::MorphTargetAnimation, sp::scene::NodeAnimation, and sp::scene::SkeletalAnimation.
| void sp::scene::Animation::interpolateBlended | ( | const AnimationPlayback & | PlaybackFrom, | |
| const AnimationPlayback & | PlaybackTo, | |||
| f32 | BlendingFactor | |||
| ) | [virtual] |
Makes an blended interpolation between the two given playback states. This can be used for 'animation blending'.
Reimplemented in sp::scene::SkeletalAnimation.
| bool sp::scene::Animation::interpolateRange | ( | u32 | FirstFrame, | |
| u32 | LastFrame, | |||
| f32 | Interpolation | |||
| ) | [virtual] |
Makes an interpolation over the given sequence. In this case the first frame must be smaller then the last frame!
| void sp::scene::Animation::pause | ( | bool | IsPaused = true |
) | [virtual] |
Pauses or resumes the animation.
| bool sp::scene::Animation::play | ( | const EAnimPlaybackModes | Mode, | |
| u32 | FirstFrame = 0, |
|||
| u32 | LastFrame = ANIM_LAST_FRAME | |||
| ) | [virtual] |
Plays the animation.
| Mode,: | Specifies the animation mode. | |
| FirstFrame,: | Specifies the first animation frame. | |
| LastFrame,: | Specifies the last animation frame. This can also be smaller than the first frame. By default ANIM_IGNORE_FRAME which means that all frames will be played. |
| bool sp::scene::Animation::playing | ( | ) | const [inline] |
Returns true if the animation is currently playing.
| void sp::scene::Animation::removeSceneNode | ( | SceneNode * | Object | ) | [virtual] |
Removes the specified scene node from the animatable object list.
| void sp::scene::Animation::setFlags | ( | s32 | Flags | ) | [inline] |
Sets the animation flags.
| void sp::scene::Animation::setFrame | ( | u32 | Index | ) | [virtual] |
Sets the new frame index. Should not be used while the animation is playing.
| void sp::scene::Animation::setInterpolation | ( | f32 | Interpolation | ) | [inline] |
Sets the new frame interpolation.
| void sp::scene::Animation::setName | ( | const io::stringc & | Name | ) | [inline] |
Sets the animation name.
| void sp::scene::Animation::setSpeed | ( | f32 | Speed | ) | [inline] |
Sets the new playback speed (by default 1.0).
| void sp::scene::Animation::stop | ( | bool | IsReset = false |
) | [virtual] |
Stops the animation.
| virtual void sp::scene::Animation::updateAnimation | ( | SceneNode * | Node | ) | [pure virtual] |
Updates the animation process if currently it's playing.
Implemented in sp::scene::MorphTargetAnimation, sp::scene::NodeAnimation, and sp::scene::SkeletalAnimation.
| void sp::scene::Animation::updatePlayback | ( | f32 | Speed | ) | [protected, virtual] |
Updates the playback process with the specified interpolation speed.
s32 sp::scene::Animation::Flags_ [protected] |
u32 sp::scene::Animation::MaxFrame_ [protected] |
u32 sp::scene::Animation::MinFrame_ [protected] |
AnimationPlayback sp::scene::Animation::Playback_ [protected] |
1.7.1