deAnimatorRule Class Reference

Animator Rule Class. More...

#include <deAnimatorRule.h>

Inheritance diagram for deAnimatorRule:
deAnimatorRuleAnimation deAnimatorRuleAnimationDifference deAnimatorRuleBoneRotator deAnimatorRuleForeignState deAnimatorRuleGroup deAnimatorRuleInverseKinematic deAnimatorRuleRetarget deAnimatorRuleStateManipulator deAnimatorRuleStateSnapshot deAnimatorRuleSubAnimator deAnimatorRuleTouchGround

List of all members.

Public Member Functions

Constructors and Destructors
 deAnimatorRule ()
 Creates a new animator rule.
virtual ~deAnimatorRule ()
 Cleans up the animator rule.
Management
deAnimatorGetAnimator () const
 Retrieves the parent animator.
void SetAnimator (deAnimator *animator)
 Sets the parent animator.
bool GetEnabled () const
 Determines if the rule is enabled.
void SetEnabled (bool enabled)
 Sets if the rule is enabled.
float GetSourceFactor () const
 Retrieves the source blend factor.
void SetSourceFactor (float factor)
 Sets the source blend factor.
float GetDestinationFactor () const
 Retrieves the destination blend factor.
void SetDestinationFactor (float factor)
 Sets the destination blend factor.
bool GetUseInvSrcAsDest () const
 Determines if the rule uses the inverse source factor as destination blend factor.
void SetUseInvSrcAsDest (bool invSrcAsDest)
 Sets if the rule uses the inverse source factor as destination blend factor.
deAnimatorControllerTargetGetTargetSourceFactor ()
 Retrieves the source factor target.
deAnimatorControllerTargetGetTargetDestinationFactor ()
 Retrieves the destination factor target.
Bone Management
int GetBoneCount () const
 Retrieves the count of bones.
const char * GetBoneAt (int index) const
 Retrieves the bone at the given index.
int IndexOfBone (const char *bone) const
 Retrieves the index of the given bone or -1 if not found.
bool HasBone (const char *bone) const
 Determines if the given bone exists.
void AddBone (const char *bone)
 Adds a bone.
void RemoveBone (const char *bone)
 Removes the given bone.
void RemoveAllBones ()
 Removes all bones.
Visiting
virtual void Visit (deAnimatorRuleVisitor *visitor)
 Visits the rule.

Detailed Description

Animator Rule Class.

Animator rules are the construction unit of an animator. There are many different ways how an animation can be produced so the rules are split into different classes providing different functionality. The animator rule class is the base class for all the various rule classes. To make life easier this class provides two ways to work with the rule classes. One way is visiting and the other is safe casting. Both ways have their advantage in the right situation. Furthermore the base class provides some common functionality that all rules share. Each rule can have one or more controllers and bones assigned. The subclass decides how many of those controllers are used. Hence specifying more than one controller for a rule using only one controller does not hurt. The rule in question simply uses the first controller then. Rules can be disabled to take them out of the production process easy without requiring to remove and add them from the animator. The list of bones specifies on what bones the rule operates. For ease of use a back reference to the animator is stored. This reference is a weak reference. The blending is controlled with the source and destination blend factor similar to the ones in the animator.

Author:
Plüss Roland
Version:
1.0
Date:
2008

Constructor & Destructor Documentation

deAnimatorRule::deAnimatorRule (  )

Creates a new animator rule.

virtual deAnimatorRule::~deAnimatorRule (  ) [virtual]

Cleans up the animator rule.


Member Function Documentation

void deAnimatorRule::AddBone ( const char *  bone )

Adds a bone.

deAnimator* deAnimatorRule::GetAnimator (  ) const [inline]

Retrieves the parent animator.

const char* deAnimatorRule::GetBoneAt ( int  index ) const

Retrieves the bone at the given index.

int deAnimatorRule::GetBoneCount (  ) const [inline]

Retrieves the count of bones.

float deAnimatorRule::GetDestinationFactor (  ) const [inline]

Retrieves the destination blend factor.

bool deAnimatorRule::GetEnabled (  ) const [inline]

Determines if the rule is enabled.

float deAnimatorRule::GetSourceFactor (  ) const [inline]

Retrieves the source blend factor.

deAnimatorControllerTarget& deAnimatorRule::GetTargetDestinationFactor (  ) [inline]

Retrieves the destination factor target.

deAnimatorControllerTarget& deAnimatorRule::GetTargetSourceFactor (  ) [inline]

Retrieves the source factor target.

bool deAnimatorRule::GetUseInvSrcAsDest (  ) const [inline]

Determines if the rule uses the inverse source factor as destination blend factor.

bool deAnimatorRule::HasBone ( const char *  bone ) const

Determines if the given bone exists.

int deAnimatorRule::IndexOfBone ( const char *  bone ) const

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

void deAnimatorRule::RemoveAllBones (  )

Removes all bones.

void deAnimatorRule::RemoveBone ( const char *  bone )

Removes the given bone.

void deAnimatorRule::SetAnimator ( deAnimator animator )

Sets the parent animator.

This function has to be used only by the deAnimator class to assign itself as a parent. Do not call this function on your own.

void deAnimatorRule::SetDestinationFactor ( float  factor )

Sets the destination blend factor.

void deAnimatorRule::SetEnabled ( bool  enabled )

Sets if the rule is enabled.

void deAnimatorRule::SetSourceFactor ( float  factor )

Sets the source blend factor.

void deAnimatorRule::SetUseInvSrcAsDest ( bool  invSrcAsDest )

Sets if the rule uses the inverse source factor as destination blend factor.

virtual void deAnimatorRule::Visit ( deAnimatorRuleVisitor visitor ) [virtual]

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