#include <spNodeAnimation.hpp>
Public Member Functions | |
NodeAnimation () | |
virtual | ~NodeAnimation () |
void | addKeyframe (const Transformation &Transform, u32 Duration=1000) |
Adds a new keyframe at the end of the list. | |
void | insertKeyframe (u32 Index, const Transformation &Transform, u32 Duration=1000) |
Inserts the new keyframe at the specified index (i.e. when index is 0 it will be inserted at the front). | |
void | setKeyframe (u32 Index, const Transformation &Transform, u32 Duration=1000) |
Sets the new keyframe. | |
void | removeKeyframe (u32 Index) |
Removes the specified keyframe. | |
void | clearKeyframes () |
Clears all keyframes. | |
virtual void | setupManualAnimation (SceneNode *Node) |
virtual void | updateAnimation (SceneNode *Node) |
Updates the animation process if currently it's playing. | |
virtual u32 | getKeyframeCount () const |
Returns the count of keyframes. | |
virtual void | interpolate (u32 IndexFrom, u32 IndexTo, f32 Interpolation) |
Makes an interpolation between the two given frames. | |
void | setSplineTranslation (bool Enable) |
bool | getSplineTranslation () const |
void | setSplineExpansion (const f32 Expansion) |
f32 | getSplineExpansion () const |
virtual void | copy (const Animation *Other) |
Node animation class. This animation supports only object transformation (position, rotation and scale). No vertices will be modified. Moreover this is the only animation which supports spline-translation for smooth movements.
sp::scene::NodeAnimation::NodeAnimation | ( | ) |
sp::scene::NodeAnimation::~NodeAnimation | ( | ) | [virtual] |
void sp::scene::NodeAnimation::addKeyframe | ( | const Transformation & | Transform, | |
u32 | Duration = 1000 | |||
) |
Adds a new keyframe at the end of the list.
void sp::scene::NodeAnimation::clearKeyframes | ( | ) | [virtual] |
Clears all keyframes.
Implements sp::scene::Animation.
void sp::scene::NodeAnimation::copy | ( | const Animation * | Other | ) | [virtual] |
Copies the whole animation.
TODO!
Implements sp::scene::Animation.
u32 sp::scene::NodeAnimation::getKeyframeCount | ( | ) | const [virtual] |
Returns the count of keyframes.
Implements sp::scene::Animation.
f32 sp::scene::NodeAnimation::getSplineExpansion | ( | ) | const |
bool sp::scene::NodeAnimation::getSplineTranslation | ( | ) | const |
void sp::scene::NodeAnimation::insertKeyframe | ( | u32 | Index, | |
const Transformation & | Transform, | |||
u32 | Duration = 1000 | |||
) |
Inserts the new keyframe at the specified index (i.e. when index is 0 it will be inserted at the front).
void sp::scene::NodeAnimation::interpolate | ( | u32 | IndexFrom, | |
u32 | IndexTo, | |||
f32 | Interpolation | |||
) | [virtual] |
Makes an interpolation between the two given frames.
Implements sp::scene::Animation.
void sp::scene::NodeAnimation::removeKeyframe | ( | u32 | Index | ) |
Removes the specified keyframe.
void sp::scene::NodeAnimation::setKeyframe | ( | u32 | Index, | |
const Transformation & | Transform, | |||
u32 | Duration = 1000 | |||
) |
Sets the new keyframe.
void sp::scene::NodeAnimation::setSplineExpansion | ( | const f32 | Expansion | ) |
Sets the spline's expansion.
Expansion,: | Spline's expansion. By default 1.0. If 0.0 the animation looks the same when spline translations are disabled. |
void sp::scene::NodeAnimation::setSplineTranslation | ( | bool | Enable | ) |
Enables or disables the spline translation. If enabled the position's translation is processed using splines for smooth movements.
void sp::scene::NodeAnimation::setupManualAnimation | ( | SceneNode * | Node | ) | [virtual] |
void sp::scene::NodeAnimation::updateAnimation | ( | SceneNode * | Node | ) | [virtual] |
Updates the animation process if currently it's playing.
Implements sp::scene::Animation.