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

AnimatorController Class Template Reference

#include <animator.h>

Inheritance diagram for AnimatorController:

Inheritance graph
[legend]
Collaboration diagram for AnimatorController:

Collaboration graph
[legend]
List of all members.

Detailed Description

template<class AnimationType>
class NeoEngine::AnimatorController< AnimationType >

An animator controller manages animations for an object.

Author:
Mattias Jansson (mattias@realityrift.com)


Public Member Functions

 AnimatorController ()
 AnimatorController (const AnimatorController< AnimationType > &rkController)
virtual ~AnimatorController ()
virtual bool AddAnimation (AnimationType *pkAnimation)
virtual bool SetCurrentAnimation (unsigned int uiID)
virtual bool SetCurrentAnimation (const HashString &rstrName)
virtual void Update (float fDeltaTime)
const std::vector< AnimationType * > & GetAnimations () const
AnimationType * GetCurrentAnimation ()
bool IsActive () const
virtual void Activate ()
virtual void Deactivate ()
bool Toggle ()

Protected Attributes

std::vector< AnimationType * > m_vpkAnimations
unsigned int m_uiCurAnim
AnimationType * m_pkCurAnim
bool m_bActive


Constructor & Destructor Documentation

AnimatorController  )  [inline]
 

AnimatorController const AnimatorController< AnimationType > &  rkController  )  [inline]
 

Copy data from reference animator object

Parameters:
rkController Reference animator controller object

virtual ~AnimatorController  )  [inline, virtual]
 

Delete animations


Member Function Documentation

virtual bool AddAnimation AnimationType *  pkAnimation  )  [inline, virtual]
 

Add new animation

Parameters:
pkAnimation New animation
Returns:
true if added, false if id or name conflicts with already registered animation

virtual bool SetCurrentAnimation unsigned int  uiID  )  [inline, virtual]
 

Set current animation by ID

Parameters:
uiID Animation ID
Returns:
true if successful, false if animation not found

virtual bool SetCurrentAnimation const HashString rstrName  )  [inline, virtual]
 

Set current animation by name

Parameters:
rstrName Animation name
Returns:
true if successful, false if animation not found

virtual void Update float  fDeltaTime  )  [inline, virtual]
 

Update current animation

Parameters:
fDeltaTime Time passed since last update

Reimplemented from UpdateEntity.

Reimplemented in AnimatedNode, AnimatedSubMesh, NodeAnimatorController, Skeleton, and SubMeshAnimatorController.

const std::vector< AnimationType* >& GetAnimations  )  const [inline]
 

Returns:
All animations

AnimationType* GetCurrentAnimation  )  [inline]
 

Returns:
Current animations

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

std::vector< AnimationType* > m_vpkAnimations [protected]
 

Animations

unsigned int m_uiCurAnim [protected]
 

Current animation

AnimationType* m_pkCurAnim [protected]
 

Current animation object ptr

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