Drag[en]gine Game Engine  1.0
deAnimator Class Reference

Animator Class. Animators are objects capable of producing an animation state for a component. Every animator composes of a set of rules and controllers which indicate how the final animation state is produced from a set animation. Some rules can also produce animations without the help of the animation but external informations like for example where another object is located or a reference state captured before. Controllers provide the values required by rules and one controller can be attached to more than one rule. The animator object has peers into the animator module. This way the creation of animations can be accelerated if possible. More...

#include <deAnimator.h>

Inheritance diagram for deAnimator:
deResource deObject

Public Member Functions

Management
deRigGetRig () const
 
void SetRig (deRig *rig)
 
deAnimationGetAnimation () const
 
void SetAnimation (deAnimation *animation)
 
decStringSetGetListBones ()
 
const decStringSetGetListBones () const
 
void NotifyBonesChanged ()
 
Controller Management
int GetControllerCount () const
 
deAnimatorControllerGetControllerAt (int index) const
 
int IndexOfController (deAnimatorController *controller) const
 
bool HasController (deAnimatorController *controller) const
 
void AddController (deAnimatorController *controller)
 
void RemoveController (deAnimatorController *controller)
 
void RemoveAllControllers ()
 
void NotifyControllerChangedAt (int index)
 
Link Management
int GetLinkCount () const
 
deAnimatorLinkGetLinkAt (int index) const
 
int IndexOfLink (deAnimatorLink *link) const
 
bool HasLink (deAnimatorLink *link) const
 
void AddLink (deAnimatorLink *link)
 
void RemoveLink (deAnimatorLink *link)
 
void RemoveAllLinks ()
 
void NotifyLinkChangedAt (int index)
 
Rule Management
int GetRuleCount () const
 
deAnimatorRuleGetRuleAt (int index) const
 
int IndexOfRule (deAnimatorRule *rule) const
 
bool HasRule (deAnimatorRule *rule) const
 
void AddRule (deAnimatorRule *rule)
 
void RemoveRule (deAnimatorRule *rule)
 
void RemoveAllRules ()
 
void NotifyRulesChanged ()
 Notify peers that one or more rules changed. More...
 
System Peers
deBaseAnimatorAnimatorGetPeerAnimator () const
 
void SetPeerAnimator (deBaseAnimatorAnimator *peer)
 
- 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

 deAnimator (deAnimatorManager *manager)
 
virtual ~deAnimator ()
 Clean up animator. More...
 

Additional Inherited Members

- 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

Animator Class. Animators are objects capable of producing an animation state for a component. Every animator composes of a set of rules and controllers which indicate how the final animation state is produced from a set animation. Some rules can also produce animations without the help of the animation but external informations like for example where another object is located or a reference state captured before. Controllers provide the values required by rules and one controller can be attached to more than one rule. The animator object has peers into the animator module. This way the creation of animations can be accelerated if possible.

Author
Pl├╝ss Roland
Version
1.0
Date
2008

Constructor & Destructor Documentation

◆ deAnimator()

deAnimator::deAnimator ( deAnimatorManager manager)

Creates a new animator with the given resource manager.

◆ ~deAnimator()

virtual deAnimator::~deAnimator ( )
protectedvirtual

Clean up animator.

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

◆ AddController()

void deAnimator::AddController ( deAnimatorController controller)

Adds a controller.

Referenced by GetControllerCount().

◆ AddLink()

void deAnimator::AddLink ( deAnimatorLink link)

Adds a link.

Referenced by GetLinkCount().

◆ AddRule()

void deAnimator::AddRule ( deAnimatorRule rule)

Adds a rule.

Referenced by GetLinkCount().

◆ GetAnimation()

deAnimation* deAnimator::GetAnimation ( ) const
inline

Retrieves the animation or NULL if none is set.

References SetAnimation().

◆ GetControllerAt()

deAnimatorController* deAnimator::GetControllerAt ( int  index) const

Retrieves the controller at the given index.

Referenced by GetControllerCount().

◆ GetControllerCount()

int deAnimator::GetControllerCount ( ) const
inline

◆ GetLinkAt()

deAnimatorLink* deAnimator::GetLinkAt ( int  index) const

Retrieves the link at the given index.

Referenced by GetLinkCount().

◆ GetLinkCount()

◆ GetListBones() [1/2]

decStringSet& deAnimator::GetListBones ( )
inline

Retrieves the list of bones.

◆ GetListBones() [2/2]

const decStringSet& deAnimator::GetListBones ( ) const
inline

References NotifyBonesChanged().

◆ GetPeerAnimator()

deBaseAnimatorAnimator* deAnimator::GetPeerAnimator ( ) const
inline

Retrieves the animator system peer object.

References SetPeerAnimator().

◆ GetRig()

deRig* deAnimator::GetRig ( ) const
inline

Retrieves the rig or NULL if none is set.

References SetRig().

◆ GetRuleAt()

deAnimatorRule* deAnimator::GetRuleAt ( int  index) const

Retrieves the rule at the given index.

Referenced by GetLinkCount().

◆ GetRuleCount()

int deAnimator::GetRuleCount ( ) const

Retrieves the count of rules.

Referenced by GetLinkCount().

◆ HasController()

bool deAnimator::HasController ( deAnimatorController controller) const

Determines if the given controller exists.

Referenced by GetControllerCount().

◆ HasLink()

bool deAnimator::HasLink ( deAnimatorLink link) const

Determines if the given link exists.

Referenced by GetLinkCount().

◆ HasRule()

bool deAnimator::HasRule ( deAnimatorRule rule) const

Determines if the given rule exists.

Referenced by GetLinkCount().

◆ IndexOfController()

int deAnimator::IndexOfController ( deAnimatorController controller) const

Retrieves the index of the given controller or -1 if not found.

Referenced by GetControllerCount().

◆ IndexOfLink()

int deAnimator::IndexOfLink ( deAnimatorLink link) const

Retrieves the index of the given link or -1 if not found.

Referenced by GetLinkCount().

◆ IndexOfRule()

int deAnimator::IndexOfRule ( deAnimatorRule rule) const

Retrieves the index of the given rule or -1 if not found.

Referenced by GetLinkCount().

◆ NotifyBonesChanged()

void deAnimator::NotifyBonesChanged ( )

Notifies that the list of bones changed.

Referenced by GetListBones().

◆ NotifyControllerChangedAt()

void deAnimator::NotifyControllerChangedAt ( int  index)

Notifies that the controller at the given index changed.

Referenced by GetControllerCount().

◆ NotifyLinkChangedAt()

void deAnimator::NotifyLinkChangedAt ( int  index)

Notifies that the link at the given index changed.

Referenced by GetLinkCount().

◆ NotifyRulesChanged()

void deAnimator::NotifyRulesChanged ( )

Notify peers that one or more rules changed.

Referenced by GetLinkCount().

◆ RemoveAllControllers()

void deAnimator::RemoveAllControllers ( )

Removes all controllers.

Referenced by GetControllerCount().

◆ RemoveAllLinks()

void deAnimator::RemoveAllLinks ( )

Removes all links.

Referenced by GetLinkCount().

◆ RemoveAllRules()

void deAnimator::RemoveAllRules ( )

Removes all rules.

Referenced by GetLinkCount().

◆ RemoveController()

void deAnimator::RemoveController ( deAnimatorController controller)

Removes the given controller.

Referenced by GetControllerCount().

◆ RemoveLink()

void deAnimator::RemoveLink ( deAnimatorLink link)

Removes the given link.

Referenced by GetLinkCount().

◆ RemoveRule()

void deAnimator::RemoveRule ( deAnimatorRule rule)

Removes the given rule.

Referenced by GetLinkCount().

◆ SetAnimation()

void deAnimator::SetAnimation ( deAnimation animation)

Sets the animation or NULL if not set.

Referenced by GetAnimation().

◆ SetPeerAnimator()

void deAnimator::SetPeerAnimator ( deBaseAnimatorAnimator peer)

Sets the animator system peer object.

Referenced by GetPeerAnimator().

◆ SetRig()

void deAnimator::SetRig ( deRig rig)

Sets the rig or NULL if not set.

Referenced by GetRig().


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