Public Member Functions

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

#include <spMorphTargetAnimation.hpp>

Inheritance diagram for sp::scene::MorphTargetAnimation:
sp::scene::MeshAnimation sp::scene::Animation

List of all members.

Public Member Functions

 MorphTargetAnimation ()
virtual ~MorphTargetAnimation ()
void addKeyframeSequence (video::MeshBuffer *Surface, u32 Index, const std::vector< SVertexKeyframe > &Keyframes)
void removeKeyframeSequence (video::MeshBuffer *Surface, u32 Index)
 Remvoes all keyframes of the specifies vertex.
void clearKeyframes ()
 Clears all keyframes.
virtual void setupManualAnimation (SceneNode *Node)
virtual void updateAnimation (SceneNode *Node)
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.
virtual void copy (const Animation *Other)

Detailed Description

Morph-Target animations interpolate each vertex of its mesh. This is a technique used by the games "Quake 1", "Quake 2" and "Quake III Arena". The 'SoftPixel Engine' supports this animation model innately for the MD2 and MD3 file formats.

Constructor & Destructor Documentation

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

Member Function Documentation

void sp::scene::MorphTargetAnimation::addKeyframeSequence ( video::MeshBuffer Surface,
u32  Index,
const std::vector< SVertexKeyframe > &  Keyframes 

Adds a sequence of keyframes for the specified vertex. Because of performance efficiency you have to add all keyframes for each vertex at once.

Surface,: Specifies the MeshBuffer object to which the vertex belongs.
Index,: Specifies the vertex index.
Keyframes,: Specifies the container with all keyframe data (coordinate and normal).
void sp::scene::MorphTargetAnimation::clearKeyframes (  )  [virtual]

Clears all keyframes.

Implements sp::scene::Animation.

void sp::scene::MorphTargetAnimation::copy ( const Animation Other  )  [virtual]

Copies the whole animation.

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


Implements sp::scene::Animation.

u32 sp::scene::MorphTargetAnimation::getKeyframeCount (  )  const [virtual]

Returns the count of keyframes.

Implements sp::scene::Animation.

void sp::scene::MorphTargetAnimation::interpolate ( u32  IndexFrom,
u32  IndexTo,
f32  Interpolation 
) [virtual]

Makes an interpolation between the two given frames.

Implements sp::scene::Animation.

void sp::scene::MorphTargetAnimation::removeKeyframeSequence ( video::MeshBuffer Surface,
u32  Index 

Remvoes all keyframes of the specifies vertex.

void sp::scene::MorphTargetAnimation::setupManualAnimation ( SceneNode Node  )  [virtual]
void sp::scene::MorphTargetAnimation::updateAnimation ( scene::SceneNode Node  )  [virtual]

Updates the morph target animation. If the animation is playing all keyframes will be performed.

Object,: This must be a Mesh scene node. Otherwise the function will do nothing.

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