Drag[en]gine Script Module DragonScript
1.21
|
Public Member Functions | |
Constructors | |
Animator | new () |
Create animator. More... | |
Controllers | |
int | getControllerCount () |
Nnumber of controllers. More... | |
void | setControllerCount (int count) |
Set number of controllers. More... | |
AnimatorController | getControllerAt (int index) |
Get wrapper for controller. More... | |
AnimatorController | getControllerNamed (String name) |
Get wrapper for controller if present. More... | |
int | indexOfControllerNamed (String name) |
Index of named controller or -1 if not found. More... | |
Links | |
int | getLinkCount () |
Number of links. More... | |
int | addLink (int controller) |
Add link with controller and no mapping points. More... | |
void | removeAllLinks () |
Remove all links. More... | |
void | setLinkController (int link, int controller) |
Set controller of link. More... | |
void | setLinkRepeat (int link, int repeat) |
Set repeat count along X axis of link. More... | |
void | setLinkCurve (int link, CurveBezier curve) |
Set link curve. More... | |
void | setLinkBone (int link, String bone) |
Set bone to use parameter of as input for link or empty string to not use. More... | |
void | setLinkBoneParameter (int link, AnimatorLinkBoneParameter parameter) |
Set bone parameter to use as input for link. More... | |
void | setLinkBoneValueRange (int link, float minimum, float maximum) |
Set bone value range. More... | |
void | setLinkBoneValueRangeRotation (int link, float minimum, float maximum) |
Set bone value range for use with rotation parameter. More... | |
void | setLinkVertexPositionSet (int link, String vertexPositionSet) |
Set vertex position set to use as input for link or empty string to not use. More... | |
void | setLinkVertexPositionSetValueRange (int link, float minimum, float maximum) |
Set vertex position set value range. More... | |
void | setLinkWrapY (int link, bool wrap) |
Set to wrap Y value instead of clamping. More... | |
Rules | |
int | getRuleCount () |
Number of rules. More... | |
void | addRule (AnimatorRule rule) |
Add rule. More... | |
AnimatorRule | getRuleAt (int index) |
Rule at index. More... | |
void | removeAllRules () |
Remove all rules. More... | |
Bones | |
void | addBone (String bone) |
Add bone. More... | |
void | removeAllBones () |
Remove all bones. More... | |
VertexPositionSets | |
void | addVertexPositionSet (String vertexPositionSet) |
Add vertex position set. More... | |
void | removeAllVertexPositionSets () |
Remove all vertex position sets. More... | |
Management | |
Rig | getRig () |
Rig or null if not set. More... | |
void | setRig (Rig rig) |
Set rig 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... | |
static bool | equals (Animator animator1, Animator animator2) |
Two animators are equal. More... | |
Animator resources.
Animators provide support to generate animation states from different sources using rules. Rules can use static precanned animation data from Animation resources, calculate state using algorithms or capture and store previous animation states.
Animators only define how animation states are calculated. Use AnimatorInstance to do actual calculation of animation states for a specific world element. Thus a single animator can be shared by multiple animator instances each having an own state.
While it is allowed to change an animator while it is in use by animator instances it is not an adviceable practise. Changing the animator structure invalidates the state of animator instances resulting in unpredictable states.
Animators are valid if they have a Rig assigned. It is not required to assign an Animation. Without an Animation only procedural rules can be used. Animation rules only work if an Animation is assigned. If you want to use different animations you have to use different animators using the sub animator rule.
Animators can be created in the DEIGDE Animator Editor. Animator XML files can be loaded using LoadSave.LoadAnimator.
This is a native class. It can not be subclassed.
void Dragengine.Scenery.Animator.addBone | ( | String | bone | ) |
Add bone.
int Dragengine.Scenery.Animator.addLink | ( | int | controller | ) |
Add link with controller and no mapping points.
If the controller does not exist the link uses 0 as input value during calculations.
void Dragengine.Scenery.Animator.addRule | ( | AnimatorRule | rule | ) |
Add rule.
void Dragengine.Scenery.Animator.addVertexPositionSet | ( | String | vertexPositionSet | ) |
Add vertex position set.
Two animators are equal.
This is an extended version of equals() accepting also null for animator1 and animator2. equals() would thrown an exception if null is compared to anything. This call though allows to compare null against animators or even null itself. If animator1 or animator2 is null false is returned. If both are null true is returned.
AnimatorController Dragengine.Scenery.Animator.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(). |
int Dragengine.Scenery.Animator.getControllerCount | ( | ) |
Nnumber of controllers.
AnimatorController Dragengine.Scenery.Animator.getControllerNamed | ( | String | name | ) |
Get wrapper for controller if present.
name | Name of controller. If no controller with this name is present null is returned. |
int Dragengine.Scenery.Animator.getLinkCount | ( | ) |
Number of links.
AnimatorRule Dragengine.Scenery.Animator.getRuleAt | ( | int | index | ) |
Rule at index.
EOutOfBoundary | index is less than 0 or large than or equal to getRuleCount(). |
int Dragengine.Scenery.Animator.getRuleCount | ( | ) |
Number of rules.
int Dragengine.Scenery.Animator.indexOfControllerNamed | ( | String | name | ) |
Index of named controller or -1 if not found.
Animator Dragengine.Scenery.Animator.new | ( | ) |
Create animator.
void Dragengine.Scenery.Animator.removeAllBones | ( | ) |
Remove all bones.
void Dragengine.Scenery.Animator.removeAllLinks | ( | ) |
Remove all links.
void Dragengine.Scenery.Animator.removeAllRules | ( | ) |
Remove all rules.
void Dragengine.Scenery.Animator.removeAllVertexPositionSets | ( | ) |
Remove all vertex position sets.
void Dragengine.Scenery.Animator.setAnimation | ( | Animation | animation | ) |
Set animation or null if not set.
void Dragengine.Scenery.Animator.setControllerCount | ( | int | count | ) |
Set number of controllers.
EInvalidParam | count is less than 0. |
void Dragengine.Scenery.Animator.setLinkBone | ( | int | link, |
String | bone | ||
) |
Set bone to use parameter of as input for link or empty string to not use.
EOutOfBoundary | link is less than 0 or large than or equal to getLinkCount(). |
void Dragengine.Scenery.Animator.setLinkBoneParameter | ( | int | link, |
AnimatorLinkBoneParameter | parameter | ||
) |
Set bone parameter to use as input for link.
EOutOfBoundary | link is less than 0 or large than or equal to getLinkCount(). |
void Dragengine.Scenery.Animator.setLinkBoneValueRange | ( | int | link, |
float | minimum, | ||
float | maximum | ||
) |
Set bone value range.
EOutOfBoundary | link is less than 0 or large than or equal to getLinkCount(). |
void Dragengine.Scenery.Animator.setLinkBoneValueRangeRotation | ( | int | link, |
float | minimum, | ||
float | maximum | ||
) |
Set bone value range for use with rotation parameter.
EOutOfBoundary | link is less than 0 or large than or equal to getLinkCount(). |
void Dragengine.Scenery.Animator.setLinkController | ( | int | link, |
int | controller | ||
) |
Set controller of link.
If the controller does not exist the link uses 0 as input value during calculations.
EOutOfBoundary | link is less than 0 or large than or equal to getLinkCount(). |
void Dragengine.Scenery.Animator.setLinkCurve | ( | int | link, |
CurveBezier | curve | ||
) |
Set link curve.
EOutOfBoundary | link is less than 0 or large than or equal to getLinkCount(). |
void Dragengine.Scenery.Animator.setLinkRepeat | ( | int | link, |
int | repeat | ||
) |
Set repeat count along X axis of link.
EInvalidParam | repeat is less than 1. |
void Dragengine.Scenery.Animator.setLinkVertexPositionSet | ( | int | link, |
String | vertexPositionSet | ||
) |
Set vertex position set to use as input for link or empty string to not use.
EOutOfBoundary | link is less than 0 or large than or equal to getLinkCount(). |
void Dragengine.Scenery.Animator.setLinkVertexPositionSetValueRange | ( | int | link, |
float | minimum, | ||
float | maximum | ||
) |
Set vertex position set value range.
EOutOfBoundary | link is less than 0 or large than or equal to getLinkCount(). |
void Dragengine.Scenery.Animator.setLinkWrapY | ( | int | link, |
bool | wrap | ||
) |
Set to wrap Y value instead of clamping.
EOutOfBoundary | link is less than 0 or large than or equal to getLinkCount(). |
void Dragengine.Scenery.Animator.setRig | ( | Rig | rig | ) |
Set rig or null if not set.