Drag[en]gine Game Engine  1.0
deAnimatorRule Class Reference

Animator Rule Class. More...

#include <deAnimatorRule.h>

Inheritance diagram for deAnimatorRule:
deObject deAnimatorRuleAnimation deAnimatorRuleAnimationDifference deAnimatorRuleBoneTransformator deAnimatorRuleForeignState deAnimatorRuleGroup deAnimatorRuleInverseKinematic deAnimatorRuleLimit deAnimatorRuleRetarget deAnimatorRuleStateManipulator deAnimatorRuleStateSnapshot deAnimatorRuleSubAnimator deAnimatorRuleTrackTo

Public Types

enum  eBlendModes { ebmBlend, ebmOverlay }
 Blending Modes. More...
 

Public Member Functions

Management
deAnimatorGetAnimator () const
 Retrieves the parent animator. More...
 
void SetAnimator (deAnimator *animator)
 Sets the parent animator. More...
 
bool GetEnabled () const
 Determines if the rule is enabled. More...
 
void SetEnabled (bool enabled)
 Sets if the rule is enabled. More...
 
eBlendModes GetBlendMode () const
 Retrieves the blend mode. More...
 
void SetBlendMode (eBlendModes mode)
 Sets the blend mode. More...
 
float GetBlendFactor () const
 Retrieves the blend factor. More...
 
void SetBlendFactor (float factor)
 Sets the source blend factor. More...
 
decStringSetGetListBones ()
 Retrieves the list of bones. More...
 
const decStringSetGetListBones () const
 
deAnimatorControllerTargetGetTargetBlendFactor ()
 Retrieves the blend factor target. More...
 
const deAnimatorControllerTargetGetTargetBlendFactor () const
 
Visiting
virtual void Visit (deAnimatorRuleVisitor &visitor)
 Visits the rule. 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

 deAnimatorRule ()
 Creates a new animator rule. More...
 
virtual ~deAnimatorRule ()
 Cleans up the animator rule. More...
 

Additional Inherited Members

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

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
2014

Member Enumeration Documentation

◆ eBlendModes

Blending Modes.

Enumerator
ebmBlend 

Blend from the existing state over to the state produced by the rule.

ebmOverlay 

Overlay the existing state with to the state produced by the rule.

Constructor & Destructor Documentation

◆ deAnimatorRule()

deAnimatorRule::deAnimatorRule ( )

Creates a new animator rule.

◆ ~deAnimatorRule()

virtual deAnimatorRule::~deAnimatorRule ( )
protectedvirtual

Cleans up the animator rule.

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

◆ GetAnimator()

deAnimator* deAnimatorRule::GetAnimator ( ) const
inline

Retrieves the parent animator.

References SetAnimator().

◆ GetBlendFactor()

float deAnimatorRule::GetBlendFactor ( ) const
inline

Retrieves the blend factor.

References SetBlendFactor().

◆ GetBlendMode()

eBlendModes deAnimatorRule::GetBlendMode ( ) const
inline

Retrieves the blend mode.

References SetBlendMode().

◆ GetEnabled()

bool deAnimatorRule::GetEnabled ( ) const
inline

Determines if the rule is enabled.

References SetEnabled().

◆ GetListBones() [1/2]

decStringSet& deAnimatorRule::GetListBones ( )
inline

Retrieves the list of bones.

◆ GetListBones() [2/2]

const decStringSet& deAnimatorRule::GetListBones ( ) const
inline

◆ GetTargetBlendFactor() [1/2]

deAnimatorControllerTarget& deAnimatorRule::GetTargetBlendFactor ( )
inline

Retrieves the blend factor target.

◆ GetTargetBlendFactor() [2/2]

const deAnimatorControllerTarget& deAnimatorRule::GetTargetBlendFactor ( ) const
inline

References Visit().

◆ SetAnimator()

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 directly.

Referenced by GetAnimator().

◆ SetBlendFactor()

void deAnimatorRule::SetBlendFactor ( float  factor)

Sets the source blend factor.

Referenced by GetBlendFactor().

◆ SetBlendMode()

void deAnimatorRule::SetBlendMode ( eBlendModes  mode)

Sets the blend mode.

Referenced by GetBlendMode().

◆ SetEnabled()

void deAnimatorRule::SetEnabled ( bool  enabled)

Sets if the rule is enabled.

Referenced by GetEnabled().

◆ Visit()


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