Public Member Functions

sp::scene::NodeAnimation Class Reference
[Animation System]

#include <spNodeAnimation.hpp>

Inheritance diagram for sp::scene::NodeAnimation:
sp::scene::Animation

List of all members.

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)

Detailed Description

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.


Constructor & Destructor Documentation

sp::scene::NodeAnimation::NodeAnimation (  ) 
sp::scene::NodeAnimation::~NodeAnimation (  )  [virtual]

Member Function Documentation

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.

Returns:
Pointer to the new animation object.
Note:
You have to delete this pointer by yourself!

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.

Parameters:
Expansion,: Spline's expansion. By default 1.0. If 0.0 the animation looks the same when spline translations are disabled.
Note:
This only works when the spline translation was already enabled!
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.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines