|
Drag[en]gine Script Module DragonScript 1.35
|
Immutable animation resources. More...
Public Member Functions | |
Management | |
| String | getFilename () |
| Normalized filename the animation has been loaded from. | |
| int | getBoneCount () |
| Count of bones. | |
| int | indexOfBoneNamed (String name) |
| Index of named bone or -1 if not found. | |
| String | getBoneName (int index) |
| Name of bone at index. | |
| int | getVertexPositionSetCount () |
| Count of vertex position sets. | |
| int | indexOfVertexPositionSetNamed (String name) |
| Index of named vertex position set or -1 if not found. | |
| String | getVertexPositionSetName (int index) |
| Name of vertex position set at index. | |
| int | getMoveCount () |
| Count of moves. | |
| int | indexOfMoveNamed (String name) |
| Index of named move or -1 if not found. | |
| String | getMoveName (int index) |
| Name of move at index. | |
| float | getMovePlaytime (String name) |
| Playtime in seconds of named move. | |
| float | getMoveFPS (String name) |
| Frames per second. | |
| CurveBezier | getKeyframeCurve (int move, int bone, AnimationBoneParameter parameter) |
| Create bezier curve from bone keyframes. | |
| CurveBezier | getVertexPositionSetKeyframeCurve (int move, int vertexPositionSet) |
| Create bezier curve from vertex position set keyframes. | |
| bool | equals (Object other) |
| Animation is equal to another object. | |
| int | hashCode () |
| Hash code for use as dictionary keys. | |
Constructors | |
| Animation | new (String filename) |
| Load animation from file. | |
| void | save (String filename) |
| Save animation to file. | |
| static void | loadAsynchron (String filename, ResourceListener listener) |
| Load animation from file asynchronously. | |
Immutable animation resources.
Animation resources provide static precanned animation data to be used with Animators to produce dynamic animations.
This is a native class. It can not be subclassed.
| bool Dragengine.Scenery.Animation.equals | ( | Object | other | ) |
Animation is equal to another object.
Implements Object.equals(Object).
References getMoveFPS().
Referenced by hashCode().
| int Dragengine.Scenery.Animation.getBoneCount | ( | ) |
| String Dragengine.Scenery.Animation.getBoneName | ( | int | index | ) |
Name of bone at index.
| index | Index of bone to get name of |
| EInvalidParam | index is less than 0 or larger than or equal to getBoneCount(). |
Referenced by getVertexPositionSetCount().
| String Dragengine.Scenery.Animation.getFilename | ( | ) |
Normalized filename the animation has been loaded from.
References getFilename().
Referenced by getFilename().
| CurveBezier Dragengine.Scenery.Animation.getKeyframeCurve | ( | int | move, |
| int | bone, | ||
| AnimationBoneParameter | parameter ) |
| int Dragengine.Scenery.Animation.getMoveCount | ( | ) |
| float Dragengine.Scenery.Animation.getMoveFPS | ( | String | name | ) |
Frames per second.
Used for saving only if animation file format requires sampling.
References getMoveName().
Referenced by equals().
| String Dragengine.Scenery.Animation.getMoveName | ( | int | index | ) |
Name of move at index.
| index | Index of move to get name of |
| EInvalidParam | index is less than 0 or larger than or equal to getMoveCount(). |
References getMoveCount().
Referenced by getMoveFPS().
| float Dragengine.Scenery.Animation.getMovePlaytime | ( | String | name | ) |
Playtime in seconds of named move.
If the move is not found 0 is returned.
References indexOfMoveNamed().
Referenced by getVertexPositionSetKeyframeCurve().
| int Dragengine.Scenery.Animation.getVertexPositionSetCount | ( | ) |
Count of vertex position sets.
References getBoneName().
Referenced by indexOfVertexPositionSetNamed().
| CurveBezier Dragengine.Scenery.Animation.getVertexPositionSetKeyframeCurve | ( | int | move, |
| int | vertexPositionSet ) |
Create bezier curve from vertex position set keyframes.
References getMovePlaytime().
Referenced by hashCode().
| String Dragengine.Scenery.Animation.getVertexPositionSetName | ( | int | index | ) |
Name of vertex position set at index.
| index | Index of vertex position set to get name of |
| EInvalidParam | index is less than 0 or larger than or equal to getVertexPositionSetCount(). |
References indexOfVertexPositionSetNamed().
Referenced by indexOfMoveNamed().
| int Dragengine.Scenery.Animation.hashCode | ( | ) |
Hash code for use as dictionary keys.
Implements Object.hashCode().
References equals(), getKeyframeCurve(), getVertexPositionSetKeyframeCurve(), and hashCode().
Referenced by hashCode().
| int Dragengine.Scenery.Animation.indexOfBoneNamed | ( | String | name | ) |
Index of named bone or -1 if not found.
References indexOfBoneNamed().
Referenced by indexOfBoneNamed().
| int Dragengine.Scenery.Animation.indexOfMoveNamed | ( | String | name | ) |
Index of named move or -1 if not found.
References getVertexPositionSetName().
Referenced by getMovePlaytime().
| int Dragengine.Scenery.Animation.indexOfVertexPositionSetNamed | ( | String | name | ) |
Index of named vertex position set or -1 if not found.
References getVertexPositionSetCount().
Referenced by getVertexPositionSetName().
|
static |
Load animation from file asynchronously.
Registers a request in the game engine to load an animation. Once finished or if the file is already loaded the listener is used to deliver the loaded animation or null if the loading failed.
References loadAsynchron().
Referenced by loadAsynchron().
| Animation Dragengine.Scenery.Animation.new | ( | String | filename | ) |
Load animation from file.
If the animation file has been already loaded it is assigned to this object. If the animation is not loaded yet the engine loads the animation. This call blocks until the animation is fully loaded and ready to be used. For asynchronous loading use loadAsynchron(). Multiple objects can point to the same loaded animation resource. Once no object instance uses an animation file anymore it is released from memory.
References new().
Referenced by new().
| void Dragengine.Scenery.Animation.save | ( | String | filename | ) |