Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | Related Pages

Animation Class Template Reference

#include <animation.h>

Inheritance diagram for Animation:

Inheritance graph
[legend]
Collaboration diagram for Animation:

Collaboration graph
[legend]
List of all members.

Detailed Description

template<class KeyframeType>
class NeoEngine::Animation< KeyframeType >

An animation is a collection of ordered keyframes.

Author:
Mattias Jansson (mattias@realityrift.com)


Public Member Functions

 Animation ()
 Animation (const Animation< KeyframeType > &rkAnimation)
virtual ~Animation ()
virtual void AddKeyframe (KeyframeType *pkKeyframe)
virtual void Update (float fDeltaTime)
bool IsActive () const
virtual void Activate ()
virtual void Deactivate ()
bool Toggle ()

Public Attributes

KeyframeVec m_vpkKeyframes
unsigned int m_uiID
HashString m_strName
float m_fLength
float m_fCurTime
int m_iLastKeyframe
int m_iNextKeyframe
float m_fOffset

Protected Attributes

bool m_bActive


Constructor & Destructor Documentation

Animation  ) 
 

Set default values

Animation const Animation< KeyframeType > &  rkAnimation  ) 
 

Copy data from reference animation object

Parameters:
rkAnimation Reference object

~Animation  )  [virtual]
 

Delete keyframes


Member Function Documentation

void AddKeyframe KeyframeType *  pkKeyframe  )  [inline, virtual]
 

Insert new keyframe

Parameters:
pkKeyframe New keyframe

void Update float  fDeltaTime  )  [inline, virtual]
 

Update animation

Parameters:
fDeltaTime Deltatime passed since last update

Reimplemented from UpdateEntity.

bool IsActive  )  const [inline, inherited]
 

Query state of object

Returns:
true if active, false if not

void Activate  )  [inline, virtual, inherited]
 

Activate object

void Deactivate  )  [inline, virtual, inherited]
 

Deactivate object

bool Toggle  )  [inline, inherited]
 

Toggle active state. This method does not need to be overloaded, it is only a wrapper to Activate and Deactivate

Returns:
true if activated, false if deactivated


Member Data Documentation

KeyframeVec m_vpkKeyframes
 

Keyframes ordered by timestamp

unsigned int m_uiID
 

Animation ID

HashString m_strName
 

Animation name

float m_fLength
 

Lenght of animation in seconds

float m_fCurTime
 

Current time in [0,1] interval

int m_iLastKeyframe
 

Last keyframe

int m_iNextKeyframe
 

Next keyframe

float m_fOffset
 

Current time offset from last keyframe to next keyframe (in [0,1] range)

bool m_bActive [protected, inherited]
 

Active flag


The documentation for this class was generated from the following file:
Generated on Wed Jan 21 14:21:10 2004 for NeoEngine by doxygen 1.3.5