|
Drag[en]gine Script Module DragonScript 1.35
|
Public Member Functions | |
Constructors | |
| Animator | new () |
| Create animator. | |
Controllers | |
| int | getControllerCount () |
| Nnumber of controllers. | |
| void | setControllerCount (int count) |
| Set number 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. | |
Links | |
| int | getLinkCount () |
| Number of links. | |
| int | addLink (int controller) |
| Add link with controller and no mapping points. | |
| void | removeAllLinks () |
| Remove all links. | |
| void | setLinkController (int link, int controller) |
| Set controller of link. | |
| void | setLinkRepeat (int link, int repeat) |
| Set repeat count along X axis of link. | |
| void | setLinkCurve (int link, CurveBezier curve) |
| Set link curve. | |
| void | setLinkBone (int link, String bone) |
| Set bone to use parameter of as input for link or empty string to not use. | |
| void | setLinkBoneParameter (int link, AnimatorLinkBoneParameter parameter) |
| Set bone parameter to use as input for link. | |
| void | setLinkBoneValueRange (int link, float minimum, float maximum) |
| Set bone value range. | |
| void | setLinkBoneValueRangeRotation (int link, float minimum, float maximum) |
| Set bone value range for use with rotation parameter. | |
| void | setLinkVertexPositionSet (int link, String vertexPositionSet) |
| Set vertex position set to use as input for link or empty string to not use. | |
| void | setLinkVertexPositionSetValueRange (int link, float minimum, float maximum) |
| Set vertex position set value range. | |
| void | setLinkWrapY (int link, bool wrap) |
| Set to wrap Y value instead of clamping. | |
Rules | |
| int | getRuleCount () |
| Number of rules. | |
| void | addRule (AnimatorRule rule) |
| Add rule. | |
| AnimatorRule | getRuleAt (int index) |
| Rule at index. | |
| void | removeAllRules () |
| Remove all rules. | |
Bones | |
| void | addBone (String bone) |
| Add bone. | |
| void | removeAllBones () |
| Remove all bones. | |
VertexPositionSets | |
| void | addVertexPositionSet (String vertexPositionSet) |
| Add vertex position set. | |
| void | removeAllVertexPositionSets () |
| Remove all vertex position sets. | |
Management | |
| Rig | getRig () |
| Rig or null if not set. | |
| void | setRig (Rig rig) |
| Set rig or null if not set. | |
| Animation | getAnimation () |
| Animation or null if not set. | |
| void | setAnimation (Animation animation) |
| Set animation or null if not set. | |
| static bool | equals (Animator animator1, Animator animator2) |
| Two animators are equal. | |
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.
Referenced by removeAllVertexPositionSets().
| 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.
References indexOfControllerNamed().
Referenced by setLinkRepeat().
| void Dragengine.Scenery.Animator.addRule | ( | AnimatorRule | rule | ) |
| void Dragengine.Scenery.Animator.addVertexPositionSet | ( | String | vertexPositionSet | ) |
Add vertex position set.
References addRule().
Referenced by removeAllVertexPositionSets().
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.
References equals().
Referenced by equals().
| Animation Dragengine.Scenery.Animator.getAnimation | ( | ) |
| 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(). |
Referenced by getControllerNamed().
| int Dragengine.Scenery.Animator.getControllerCount | ( | ) |
Nnumber of controllers.
Referenced by setControllerCount().
| 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. |
References getControllerAt().
Referenced by getLinkCount().
| int Dragengine.Scenery.Animator.getLinkCount | ( | ) |
| Rig Dragengine.Scenery.Animator.getRig | ( | ) |
| AnimatorRule Dragengine.Scenery.Animator.getRuleAt | ( | int | index | ) |
Rule at index.
| EOutOfBoundary | index is less than 0 or large than or equal to getRuleCount(). |
Referenced by removeAllVertexPositionSets().
| int Dragengine.Scenery.Animator.getRuleCount | ( | ) |
| int Dragengine.Scenery.Animator.indexOfControllerNamed | ( | String | name | ) |
Index of named controller or -1 if not found.
Referenced by addLink().
| Animator Dragengine.Scenery.Animator.new | ( | ) |
| void Dragengine.Scenery.Animator.removeAllBones | ( | ) |
Remove all bones.
References getRuleCount(), and setLinkWrapY().
Referenced by removeAllVertexPositionSets().
| void Dragengine.Scenery.Animator.removeAllLinks | ( | ) |
Remove all links.
Referenced by setLinkCurve().
| void Dragengine.Scenery.Animator.removeAllRules | ( | ) |
Remove all rules.
References setLinkVertexPositionSetValueRange().
Referenced by removeAllVertexPositionSets().
| void Dragengine.Scenery.Animator.removeAllVertexPositionSets | ( | ) |
Remove all vertex position sets.
References addBone(), addVertexPositionSet(), getRuleAt(), removeAllBones(), removeAllRules(), and removeAllVertexPositionSets().
Referenced by removeAllVertexPositionSets().
| void Dragengine.Scenery.Animator.setAnimation | ( | Animation | animation | ) |
Set animation or null if not set.
References getAnimation(), and setAnimation().
Referenced by setAnimation().
| void Dragengine.Scenery.Animator.setControllerCount | ( | int | count | ) |
Set number of controllers.
| EInvalidParam | count is less than 0. |
References getControllerCount(), and setControllerCount().
Referenced by setControllerCount().
| 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(). |
References setLinkController().
Referenced by setLinkBoneValueRangeRotation().
| 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(). |
References setLinkRepeat().
Referenced by setLinkVertexPositionSet().
| 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(). |
References setLinkCurve().
Referenced by setLinkWrapY().
| 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(). |
References setLinkBone().
Referenced by getRuleCount().
| 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(). |
References getLinkCount().
Referenced by setLinkBone().
| 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(). |
References removeAllLinks().
Referenced by setLinkBoneValueRange().
| void Dragengine.Scenery.Animator.setLinkRepeat | ( | int | link, |
| int | repeat ) |
Set repeat count along X axis of link.
| EInvalidParam | repeat is less than 1. |
References addLink().
Referenced by setLinkBoneParameter().
| 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(). |
References setLinkBoneParameter().
Referenced by addRule().
| 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(). |
Referenced by removeAllRules().
| 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(). |
References setLinkBoneValueRange().
Referenced by removeAllBones().
| void Dragengine.Scenery.Animator.setRig | ( | Rig | rig | ) |
Set rig or null if not set.
Referenced by getAnimation().