|
Drag[en]gine Script Module DragonScript 1.35
|
Public Member Functions | |
Constructors | |
| AnimatorInstance | new () |
| Create animator instance. | |
Management | |
| Animator | getAnimator () |
| animator or null if not set. | |
| void | setAnimator (Animator animator) |
| Set animator or null if not set. | |
| void | setAnimator (Animator animator, bool keepValues) |
| Set animator or null if not set. | |
| Component | getComponent () |
| Component or null if not set. | |
| void | setComponent (Component component) |
| Set component or null if not set. | |
| Animation | getAnimation () |
| Animation or null if not set. | |
| void | setAnimation (Animation animation) |
| Set animation or null if not set. | |
| AnimatorRuleBlendMode | getBlendMode () |
| Blend mode. | |
| void | setBlendMode (AnimatorRuleBlendMode mode) |
| Set blend mode. | |
| float | getBlendFactor () |
| Blend factor in the range from 0 to 1. | |
| void | setBlendFactor (float factor) |
| Set blend factor clamped to the range from 0 to 1. | |
| bool | getEnableRetargeting () |
| Retargeting is enabled. | |
| void | setEnableRetargeting (bool enableRetargeting) |
| Set if retargeting is enabled. | |
| bool | getProtectDynamicBones () |
| Protect dynamic bones from being animated. | |
| void | setProtectDynamicBones (bool protectDynamicBones) |
| Set if dynamic bones ar protected from being animated. | |
| void | apply () |
| Apply animator. | |
| void | applyDirect () |
| Apply animator immediately. | |
| void | captureState (int identifier) |
| Capture current state into snapshot rules matching identifier. | |
| void | storeFrame (int identifier, String moveName, float moveTime) |
| Store animation frame from animation into into rules matching identifier. | |
Controllers | |
| int | getControllerCount () |
| Nnumber of controllers. | |
| AnimatorController | getControllerAt (int index) |
| Get wrapper for controller. | |
| AnimatorController | getControllerNamed (String name) |
| Get wrapper for controller if present. | |
| int | indexOfControllerNamed (String name) |
| Index of named controller or -1 if not found. | |
| void | copyControllerStates (AnimatorInstance instance, int count) |
| Copy the first count controller values and vectors from another animator instance. | |
| void | copyControllerStates (AnimatorInstance instance, int offset, int count) |
| Copy the first count controller values and vectors from another animator instance. | |
| void | copyNamedControllerStates (AnimatorInstance instance) |
| Copy name matching controller values and vectors from another animator instance. | |
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.
| void Dragengine.Scenery.AnimatorInstance.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.
References getProtectDynamicBones(), and setEnableRetargeting().
Referenced by storeFrame().
| void Dragengine.Scenery.AnimatorInstance.applyDirect | ( | ) |
Apply animator immediately.
Calculates animator state and waits for calculation to complete.
References setProtectDynamicBones().
Referenced by getControllerCount().
| void Dragengine.Scenery.AnimatorInstance.captureState | ( | int | identifier | ) |
Capture current state into snapshot rules matching identifier.
Referenced by getControllerCount().
| void Dragengine.Scenery.AnimatorInstance.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.
| EInvalidParam | count is less than 0. |
Referenced by copyNamedControllerStates().
| void Dragengine.Scenery.AnimatorInstance.copyControllerStates | ( | AnimatorInstance | instance, |
| int | offset, | ||
| int | count ) |
Copy the first count controller values and vectors from another animator instance.
Offset index of controller to copy from other animator. Bones outside the number of controllers are ignored.
| EInvalidParam | count is less than 0. |
References getControllerAt().
| void Dragengine.Scenery.AnimatorInstance.copyNamedControllerStates | ( | AnimatorInstance | instance | ) |
Copy name matching controller values and vectors from another animator instance.
Non-matching controllers are ignored.
References copyControllerStates(), copyNamedControllerStates(), getControllerNamed(), and indexOfControllerNamed().
Referenced by copyNamedControllerStates().
| Animation Dragengine.Scenery.AnimatorInstance.getAnimation | ( | ) |
Animation or null if not set.
Referenced by getBlendMode().
| Animator Dragengine.Scenery.AnimatorInstance.getAnimator | ( | ) |
| float Dragengine.Scenery.AnimatorInstance.getBlendFactor | ( | ) |
Blend factor in the range from 0 to 1.
Referenced by getProtectDynamicBones().
| AnimatorRuleBlendMode Dragengine.Scenery.AnimatorInstance.getBlendMode | ( | ) |
| Component Dragengine.Scenery.AnimatorInstance.getComponent | ( | ) |
| AnimatorController Dragengine.Scenery.AnimatorInstance.getControllerAt | ( | int | index | ) |
Get wrapper for controller.
| index | Index of controller. If index is negative controller count is added to it. This allows to get controllers starting from the last controller. |
| EOutOfBoundary | controller is less than -getControllerCount() or larger than or equal to getControllerCount(). |
References storeFrame().
Referenced by copyControllerStates().
| int Dragengine.Scenery.AnimatorInstance.getControllerCount | ( | ) |
Nnumber of controllers.
References applyDirect(), and captureState().
Referenced by indexOfControllerNamed().
| AnimatorController Dragengine.Scenery.AnimatorInstance.getControllerNamed | ( | String | name | ) |
Get wrapper for controller if present.
| name | Name of controller. If no controller with this name is present null is returned. |
Referenced by copyNamedControllerStates().
| bool Dragengine.Scenery.AnimatorInstance.getEnableRetargeting | ( | ) |
Retargeting is enabled.
Referenced by setProtectDynamicBones().
| bool Dragengine.Scenery.AnimatorInstance.getProtectDynamicBones | ( | ) |
| int Dragengine.Scenery.AnimatorInstance.indexOfControllerNamed | ( | String | name | ) |
Index of named controller or -1 if not found.
References getControllerCount().
Referenced by copyNamedControllerStates().
| AnimatorInstance Dragengine.Scenery.AnimatorInstance.new | ( | ) |
| void Dragengine.Scenery.AnimatorInstance.setAnimation | ( | Animation | animation | ) |
| void Dragengine.Scenery.AnimatorInstance.setAnimator | ( | Animator | animator | ) |
Set animator or null if not set.
Initializes all controllers to the value of the animator.
References setAnimator().
Referenced by getComponent(), and setAnimator().
| void Dragengine.Scenery.AnimatorInstance.setAnimator | ( | Animator | animator, |
| bool | keepValues ) |
Set animator or null if not set.
If keepValues is true keeps all controller values unchanged which have the same name in the old and new animator. Otherwise initializes all controllers to the value of the new animator.
| void Dragengine.Scenery.AnimatorInstance.setBlendFactor | ( | float | factor | ) |
Set blend factor clamped to the range from 0 to 1.
References getBlendMode().
Referenced by setProtectDynamicBones().
| void Dragengine.Scenery.AnimatorInstance.setBlendMode | ( | AnimatorRuleBlendMode | mode | ) |
| void Dragengine.Scenery.AnimatorInstance.setComponent | ( | Component | component | ) |
| void Dragengine.Scenery.AnimatorInstance.setEnableRetargeting | ( | bool | enableRetargeting | ) |
| void Dragengine.Scenery.AnimatorInstance.setProtectDynamicBones | ( | bool | protectDynamicBones | ) |
Set if dynamic bones ar protected from being animated.
References getEnableRetargeting(), and setBlendFactor().
Referenced by applyDirect().
| void Dragengine.Scenery.AnimatorInstance.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.
| EInvalidParam | moveName is NULL. |
References apply().
Referenced by getControllerAt().