Drag[en]gine Script Module DragonScript 1.35
Loading...
Searching...
No Matches
Dragengine.Scenery.Animation Class Reference

Immutable animation resources. More...

Inheritance diagram for Dragengine.Scenery.Animation:

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.

Detailed Description

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.

Member Function Documentation

◆ equals()

bool Dragengine.Scenery.Animation.equals ( Object other)

Animation is equal to another object.

Implements Object.equals(Object).

Returns
true if other is of type Animation and both point to the same engine animation resource.

References getMoveFPS().

Referenced by hashCode().

◆ getBoneCount()

int Dragengine.Scenery.Animation.getBoneCount ( )

Count of bones.

Version
1.8

References getBoneCount().

Referenced by getBoneCount().

◆ getBoneName()

String Dragengine.Scenery.Animation.getBoneName ( int index)

Name of bone at index.

Version
1.8
Parameters
indexIndex of bone to get name of
Exceptions
EInvalidParamindex is less than 0 or larger than or equal to getBoneCount().

Referenced by getVertexPositionSetCount().

◆ getFilename()

String Dragengine.Scenery.Animation.getFilename ( )

Normalized filename the animation has been loaded from.

References getFilename().

Referenced by getFilename().

◆ getKeyframeCurve()

CurveBezier Dragengine.Scenery.Animation.getKeyframeCurve ( int move,
int bone,
AnimationBoneParameter parameter )

Create bezier curve from bone keyframes.

Version
1.28

Referenced by hashCode().

◆ getMoveCount()

int Dragengine.Scenery.Animation.getMoveCount ( )

Count of moves.

Version
1.7

Referenced by getMoveName().

◆ getMoveFPS()

float Dragengine.Scenery.Animation.getMoveFPS ( String name)

Frames per second.

Version
1.6

Used for saving only if animation file format requires sampling.

References getMoveName().

Referenced by equals().

◆ getMoveName()

String Dragengine.Scenery.Animation.getMoveName ( int index)

Name of move at index.

Version
1.7
Parameters
indexIndex of move to get name of
Exceptions
EInvalidParamindex is less than 0 or larger than or equal to getMoveCount().

References getMoveCount().

Referenced by getMoveFPS().

◆ getMovePlaytime()

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().

◆ getVertexPositionSetCount()

int Dragengine.Scenery.Animation.getVertexPositionSetCount ( )

Count of vertex position sets.

Version
1.28

References getBoneName().

Referenced by indexOfVertexPositionSetNamed().

◆ getVertexPositionSetKeyframeCurve()

CurveBezier Dragengine.Scenery.Animation.getVertexPositionSetKeyframeCurve ( int move,
int vertexPositionSet )

Create bezier curve from vertex position set keyframes.

Version
1.28

References getMovePlaytime().

Referenced by hashCode().

◆ getVertexPositionSetName()

String Dragengine.Scenery.Animation.getVertexPositionSetName ( int index)

Name of vertex position set at index.

Version
1.28
Parameters
indexIndex of vertex position set to get name of
Exceptions
EInvalidParamindex is less than 0 or larger than or equal to getVertexPositionSetCount().

References indexOfVertexPositionSetNamed().

Referenced by indexOfMoveNamed().

◆ hashCode()

int Dragengine.Scenery.Animation.hashCode ( )

Hash code for use as dictionary keys.

Implements Object.hashCode().

References equals(), getKeyframeCurve(), getVertexPositionSetKeyframeCurve(), and hashCode().

Referenced by hashCode().

◆ indexOfBoneNamed()

int Dragengine.Scenery.Animation.indexOfBoneNamed ( String name)

Index of named bone or -1 if not found.

Version
1.8

References indexOfBoneNamed().

Referenced by indexOfBoneNamed().

◆ indexOfMoveNamed()

int Dragengine.Scenery.Animation.indexOfMoveNamed ( String name)

Index of named move or -1 if not found.

Version
1.7

References getVertexPositionSetName().

Referenced by getMovePlaytime().

◆ indexOfVertexPositionSetNamed()

int Dragengine.Scenery.Animation.indexOfVertexPositionSetNamed ( String name)

Index of named vertex position set or -1 if not found.

Version
1.28

References getVertexPositionSetCount().

Referenced by getVertexPositionSetName().

◆ loadAsynchron()

void Dragengine.Scenery.Animation.loadAsynchron ( String filename,
ResourceListener listener )
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().

◆ new()

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().

◆ save()

void Dragengine.Scenery.Animation.save ( String filename)

Save animation to file.

Version
1.6

References save().

Referenced by save().


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