Drag[en]gine Script Module DragonScript Script API  1.0
AnimatorInstance Class Reference

Animator instance. More...

Inheritance diagram for AnimatorInstance:

Public Member Functions

Constructors
AnimatorInstance new ()
 Create animator instance. More...
 
Management
Animator getAnimator ()
 animator or null if not set. More...
 
void setAnimator (Animator animator)
 Set animator or null if not set. More...
 
Component getComponent ()
 Component or null if not set. More...
 
void setComponent (Component component)
 Set component or null if not set. More...
 
Animation getAnimation ()
 Animation or null if not set. More...
 
void setAnimation (Animation animation)
 Set animation or null if not set. More...
 
int getBlendMode ()
 Blend mode. More...
 
void setBlendMode (int mode)
 Set blend mode. More...
 
float getBlendFactor ()
 Blend factor in the range from 0 to 1. More...
 
void setBlendFactor (float factor)
 Set blend factor clamped to the range from 0 to 1. More...
 
bool getEnableRetargeting ()
 Retargeting is enabled. More...
 
void setEnableRetargeting (bool enableRetargeting)
 Set if retargeting is enabled. More...
 
void apply ()
 Apply animator. More...
 
void applyDirect ()
 Apply animator immediately. More...
 
void captureState (int identifier)
 Capture current state into snapshot rules matching identifier. More...
 
void storeFrame (int identifier, String moveName, float moveTime)
 Store animation frame from animation into into rules matching identifier. More...
 
Controllers
int getControllerCount ()
 Nnumber of controllers. More...
 
float getControllerValue (int controller)
 Value of controller. More...
 
float getControllerRelativeValue (int controller)
 Relative value of controller mapped to range from 0 to 1. More...
 
float getControllerMinimum (int controller)
 Minimum limit of controller. More...
 
float getControllerMaximum (int controller)
 Maximum limit of a controller. More...
 
Vector getControllerVector (int controller)
 Vector of controller. More...
 
void setControllerRangeAt (int controller, float minValue, float maxValue)
 Set controller value range. More...
 
void setControllerValueAt (int controller, float value)
 Set controller value. More...
 
void setControllerVectorAt (int controller, Vector vector)
 Set controller vector. More...
 
void setControllerFrozenAt (int controller, bool frozen)
 Set if the controlle is frozen. More...
 
void setControllerClampAt (int controller, bool clamp)
 Set if the controller value is clamped or wrapped around if outside range. More...
 
void setControllerFromMoveAt (int controller, String moveName)
 Set controller range from the given move. More...
 
void incrementControllerValueAt (int controller, float incrementBy)
 Increment controller value. More...
 
void setControllerToMinimum (int controller)
 Set controller value to minimum. More...
 
void setControllerToMaximum (int controller)
 Set controller value to maximum. More...
 
void copyControllerStates (AnimatorInstance instance, int count)
 Copy the first count controller values and vectors from another animator instance. More...
 
bool isControllerAtMinimum (int controller)
 Controller value is at minimum. More...
 
bool isControllerAtMaximum (int controller)
 Controller value is at maximum. More...
 

Detailed Description

Animator instance.

Animators define how animation states are calculated. Animator instances carry out the actual calculation of animation states for a specific world element.

Animator instances have a component and animation set. If the component is not null the animation state can be applied to the set component using apply(). If animation is null the animation set in the animator is used. Otherwise the animation set in the animator instance replaces the one defined in the animator. This allows to reuse an animator with different animations.

This is a native class. It can not be subclassed.

Author
Roland Pl├╝ss
Version
1.0
Date
2015

Member Function Documentation

§ apply()

void apply ( )

Apply animator.

Starts calculating animator state in a parallel task. Once completed the animation state is applied to the component. You can access the component state any time after this call. If the calculation is not finished by then the affected call waits until it is finished.

§ applyDirect()

void applyDirect ( )

Apply animator immediately.

Calculates animator state and waits for calculation to complete.

§ captureState()

void captureState ( int  identifier)

Capture current state into snapshot rules matching identifier.

§ copyControllerStates()

void copyControllerStates ( AnimatorInstance  instance,
int  count 
)

Copy the first count controller values and vectors from another animator instance.

Bones outside the number of controllers are ignored.

Exceptions
EInvalidParamcount is less than 0.

§ getAnimation()

Animation getAnimation ( )

Animation or null if not set.

§ getAnimator()

Animator getAnimator ( )

animator or null if not set.

§ getBlendFactor()

float getBlendFactor ( )

Blend factor in the range from 0 to 1.

§ getBlendMode()

int getBlendMode ( )

Blend mode.

Returns
AnimatorRule.BLEND or AnimatorRule.OVERLAY.

§ getComponent()

Component getComponent ( )

Component or null if not set.

§ getControllerCount()

int getControllerCount ( )

Nnumber of controllers.

§ getControllerMaximum()

float getControllerMaximum ( int  controller)

Maximum limit of a controller.

Exceptions
EOutOfBoundarycontroller is less than 0 or large than or equal to getControllerCount().

§ getControllerMinimum()

float getControllerMinimum ( int  controller)

Minimum limit of controller.

Exceptions
EOutOfBoundarycontroller is less than 0 or large than or equal to getControllerCount().

§ getControllerRelativeValue()

float getControllerRelativeValue ( int  controller)

Relative value of controller mapped to range from 0 to 1.

Exceptions
EOutOfBoundarycontroller is less than 0 or large than or equal to getControllerCount().

§ getControllerValue()

float getControllerValue ( int  controller)

Value of controller.

Exceptions
EOutOfBoundarycontroller is less than 0 or large than or equal to getControllerCount().

§ getControllerVector()

Vector getControllerVector ( int  controller)

Vector of controller.

Exceptions
EOutOfBoundarycontroller is less than 0 or large than or equal to getControllerCount().

§ getEnableRetargeting()

bool getEnableRetargeting ( )

Retargeting is enabled.

§ incrementControllerValueAt()

void incrementControllerValueAt ( int  controller,
float  incrementBy 
)

Increment controller value.

Exceptions
EOutOfBoundarycontroller is less than 0 or large than or equal to getControllerCount().

§ isControllerAtMaximum()

bool isControllerAtMaximum ( int  controller)

Controller value is at maximum.

Exceptions
EOutOfBoundarycontroller is less than 0 or large than or equal to getControllerCount().

§ isControllerAtMinimum()

bool isControllerAtMinimum ( int  controller)

Controller value is at minimum.

Exceptions
EOutOfBoundarycontroller is less than 0 or large than or equal to getControllerCount().

§ new()

Create animator instance.

§ setAnimation()

void setAnimation ( Animation  animation)

Set animation or null if not set.

§ setAnimator()

void setAnimator ( Animator  animator)

Set animator or null if not set.

§ setBlendFactor()

void setBlendFactor ( float  factor)

Set blend factor clamped to the range from 0 to 1.

§ setBlendMode()

void setBlendMode ( int  mode)

Set blend mode.

Parameters
modeAnimatorRule.BLEND or AnimatorRule.OVERLAY.
Exceptions
EInvalidParammode is not a valid value.

§ setComponent()

void setComponent ( Component  component)

Set component or null if not set.

§ setControllerClampAt()

void setControllerClampAt ( int  controller,
bool  clamp 
)

Set if the controller value is clamped or wrapped around if outside range.

Exceptions
EOutOfBoundarycontroller is less than 0 or large than or equal to getControllerCount().

§ setControllerFromMoveAt()

void setControllerFromMoveAt ( int  controller,
String  moveName 
)

Set controller range from the given move.

Exceptions
EOutOfBoundarycontroller is less than 0 or large than or equal to getControllerCount().

§ setControllerFrozenAt()

void setControllerFrozenAt ( int  controller,
bool  frozen 
)

Set if the controlle is frozen.

Exceptions
EOutOfBoundarycontroller is less than 0 or large than or equal to getControllerCount().

§ setControllerRangeAt()

void setControllerRangeAt ( int  controller,
float  minValue,
float  maxValue 
)

Set controller value range.

Exceptions
EOutOfBoundarycontroller is less than 0 or large than or equal to getControllerCount().

§ setControllerToMaximum()

void setControllerToMaximum ( int  controller)

Set controller value to maximum.

Exceptions
EOutOfBoundarycontroller is less than 0 or large than or equal to getControllerCount().

§ setControllerToMinimum()

void setControllerToMinimum ( int  controller)

Set controller value to minimum.

Exceptions
EOutOfBoundarycontroller is less than 0 or large than or equal to getControllerCount().

§ setControllerValueAt()

void setControllerValueAt ( int  controller,
float  value 
)

Set controller value.

Exceptions
EOutOfBoundarycontroller is less than 0 or large than or equal to getControllerCount().

§ setControllerVectorAt()

void setControllerVectorAt ( int  controller,
Vector  vector 
)

Set controller vector.

Exceptions
EOutOfBoundarycontroller is less than 0 or large than or equal to getControllerCount().

§ setEnableRetargeting()

void setEnableRetargeting ( bool  enableRetargeting)

Set if retargeting is enabled.

§ storeFrame()

void storeFrame ( int  identifier,
String  moveName,
float  moveTime 
)

Store animation frame from animation into into rules matching identifier.

If moveName does not exist in the animation a default state is captured.

Exceptions
EInvalidParammoveName is NULL.

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