Drag[en]gine Game Engine  1.0
deAnimation Class Reference

Animation Resource. More...

#include <deAnimation.h>

Inheritance diagram for deAnimation:
deFileResource deResource deObject

Public Member Functions

Management
bool MatchesModel (deModel *model) const
 Determines if the bones of an animation match to those of a model. More...
 
Bone Management
int GetBoneCount () const
 Retrieves the count of bones. More...
 
deAnimationBoneGetBone (int index) const
 Retrieves the bone at the given index. More...
 
int FindBone (const char *name) const
 Retrieves the index for the bone with the given name or -1 if not found. More...
 
void AddBone (deAnimationBone *bone)
 Adds a new bone. More...
 
Move Management
int GetMoveCount () const
 Retrieves the count of moves. More...
 
deAnimationMoveGetMove (int index) const
 Retrieves the move at the given index. More...
 
int FindMove (const char *name) const
 Retrieves the index of the move with the given name or -1 if not found. More...
 
void AddMove (deAnimationMove *move)
 Adds the given move. More...
 
System Peers
deBaseAnimatorAnimationGetPeerAnimator () const
 Retrieves the animator system peer object. More...
 
void SetPeerAnimator (deBaseAnimatorAnimation *peer)
 Sets the animator system peer object. More...
 
- Public Member Functions inherited from deFileResource
deVirtualFileSystemGetVirtualFileSystem () const
 Virtual file system or NULL if build from memory. More...
 
const decStringGetFilename () const
 Filename or empty string if build from memory. More...
 
bool GetAsynchron () const
 Resource is asynchron. More...
 
void SetAsynchron (bool asynchron)
 Set if resource is asynchron. More...
 
 deFileResource (deResourceManager *resourceManager, deVirtualFileSystem *vfs, const char *filename)
 Create file resource. More...
 
- Public Member Functions inherited from deResource
deResourceManagerGetResourceManager () const
 Resource manager or NULL if resource is leaking. More...
 
deEngineGetEngine () const
 Game engine object from resource manager. More...
 
deResourceGetLLManagerPrev () const
 Previous resource in the resource manager linked list. More...
 
void SetLLManagerPrev (deResource *resource)
 Set next resource in the resource manager linked list. More...
 
deResourceGetLLManagerNext () const
 Next resource in the resource manager linked list. More...
 
void SetLLManagerNext (deResource *resource)
 Set next resource in the resource manager linked list. More...
 
void MarkLeaking ()
 Marks the resource leaking. More...
 
 deResource (deResourceManager *resourceManager)
 Create resource. More...
 
- Public Member Functions inherited from deObject
int GetRefCount () const
 Reference count. More...
 
void AddReference ()
 Add reference increasing reference count by 1. More...
 
void FreeReference ()
 Decrease reference count by one and delete object if count reaches 0. More...
 
 deObject ()
 Create object with reference count of 1. More...
 

Constructors and Destructors

 deAnimation (deAnimationManager *resourceManager, deVirtualFileSystem *vfs, const char *filename)
 Creates a new animation resource with the given resource manager and filename. More...
 
virtual ~deAnimation ()
 Cleans up the resource. More...
 

Additional Inherited Members

- Protected Member Functions inherited from deFileResource
virtual ~deFileResource ()
 Clean up file resource. More...
 
- Protected Member Functions inherited from deResource
virtual ~deResource ()
 Clean up resource. More...
 
- Protected Member Functions inherited from deObject
virtual ~deObject ()
 Clean up object. More...
 

Detailed Description

Animation Resource.

Animation resources contain the states of bones for animation purpose. The animation resource contains a list of moves which describe the single movement of a riged object. Each move contains a keyframe list for each bone of the animation. Those keyframes contain the state of a bone in a particular point of time. This information can be used by the engine and the game scripts to derive the bone position for an arbitrary point in time. The bones of an animation have to be mapped first to the bones of a rig.

Author
Pl├╝ss Roland
Version
1.0
Date
2015

Constructor & Destructor Documentation

◆ deAnimation()

deAnimation::deAnimation ( deAnimationManager resourceManager,
deVirtualFileSystem vfs,
const char *  filename 
)

Creates a new animation resource with the given resource manager and filename.

◆ ~deAnimation()

virtual deAnimation::~deAnimation ( )
protectedvirtual

Cleans up the resource.

Note
Subclasses should set their destructor protected too to avoid users accidently deleting a reference counted object through the object pointer. Only FreeReference() is allowed to delete the object.

Member Function Documentation

◆ AddBone()

void deAnimation::AddBone ( deAnimationBone bone)

Adds a new bone.

Referenced by GetBoneCount().

◆ AddMove()

void deAnimation::AddMove ( deAnimationMove move)

Adds the given move.

Referenced by GetMoveCount().

◆ FindBone()

int deAnimation::FindBone ( const char *  name) const

Retrieves the index for the bone with the given name or -1 if not found.

Referenced by GetBoneCount().

◆ FindMove()

int deAnimation::FindMove ( const char *  name) const

Retrieves the index of the move with the given name or -1 if not found.

Referenced by GetMoveCount().

◆ GetBone()

deAnimationBone* deAnimation::GetBone ( int  index) const

Retrieves the bone at the given index.

Referenced by GetBoneCount().

◆ GetBoneCount()

int deAnimation::GetBoneCount ( ) const
inline

Retrieves the count of bones.

References AddBone(), FindBone(), and GetBone().

◆ GetMove()

deAnimationMove* deAnimation::GetMove ( int  index) const

Retrieves the move at the given index.

Referenced by GetMoveCount().

◆ GetMoveCount()

int deAnimation::GetMoveCount ( ) const
inline

Retrieves the count of moves.

References AddMove(), FindMove(), and GetMove().

◆ GetPeerAnimator()

deBaseAnimatorAnimation* deAnimation::GetPeerAnimator ( ) const
inline

Retrieves the animator system peer object.

References SetPeerAnimator().

◆ MatchesModel()

bool deAnimation::MatchesModel ( deModel model) const

Determines if the bones of an animation match to those of a model.

This function is depracted and will be removed soon.

◆ SetPeerAnimator()

void deAnimation::SetPeerAnimator ( deBaseAnimatorAnimation peer)

Sets the animator system peer object.

Referenced by GetPeerAnimator().


The documentation for this class was generated from the following file: