Drag[en]gine Script Module DragonScript  1.23
Dragengine.Scenery.AnimationBuilder Class Reference

Animation builder. More...

Inheritance diagram for Dragengine.Scenery.AnimationBuilder:

Public Member Functions

Constructors
AnimationBuilder new ()
 Create animation builder. More...
 

Management

Animation build (String filename)
 Build animation using filename. More...
 
void buildAnimation ()
 Build animation. More...
 
void addVertexPositionSet (String name)
 Add vertex position set. More...
 
void addMove (String name, float playTime)
 Add move. More...
 
void addMove (String name, float playTime, float fps)
 Add move. More...
 
void setKeyframeListCount (int move, int count)
 Set move keyframe list count. More...
 
void addKeyframe (int move, int keyFrameList, float time, Vector position, Vector rotation, Vector scale)
 Add move keyframe list keyframe. More...
 
void setVertexPositionSetKeyframeListCount (int move, int count)
 Set move keyframe list count. More...
 
void addVertexPositionSetKeyframe (int move, int keyFrameList, float time, float weight)
 Add move keyframe list keyframe. More...
 

Detailed Description

Animation builder.

Builds animation resource without requiring a animation resource file. The created animation can either be unnamed (if filename is empty string) or named (if filename is not empty string). Named animations can not clash with filenames present in the virtual file system. For this reason use unnamed animations if possible. Using named animations though can be useful if you want to provide animation resources to scripts not needing to know if the path they try to load is a build animation instead of a resource one.

To use the animation builder create a subclass and implement AnimationBuilder.buildAnimation() . You are only allowed to call methods from AnimationBuilder from inside this function call. To create the animation call AnimationBuilder.build() . This will call AnimationBuilder.buildAnimation() to fill a new animation resource with content. Once finished the build method returns the ready to use animation resource. Otherwise an exception is thrown.

This is a native class.

Member Function Documentation

◆ addKeyframe()

void Dragengine.Scenery.AnimationBuilder.addKeyframe ( int  move,
int  keyFrameList,
float  time,
Vector  position,
Vector  rotation,
Vector  scale 
)
protected

Add move keyframe list keyframe.

◆ addMove() [1/2]

void Dragengine.Scenery.AnimationBuilder.addMove ( String  name,
float  playTime 
)
protected

Add move.

◆ addMove() [2/2]

void Dragengine.Scenery.AnimationBuilder.addMove ( String  name,
float  playTime,
float  fps 
)
protected

Add move.

◆ addVertexPositionSet()

void Dragengine.Scenery.AnimationBuilder.addVertexPositionSet ( String  name)
protected

Add vertex position set.

Version
1.17

◆ addVertexPositionSetKeyframe()

void Dragengine.Scenery.AnimationBuilder.addVertexPositionSetKeyframe ( int  move,
int  keyFrameList,
float  time,
float  weight 
)
protected

Add move keyframe list keyframe.

Version
1.17

◆ build()

Animation Dragengine.Scenery.AnimationBuilder.build ( String  filename)

Build animation using filename.

The created animation can either be unnamed (if filename is empty string) or named (if filename is not empty string). Named animations can not clash with filenames present in the virtual file system. For this reason use unnamed animations if possible. Using named animations though can be useful if you want to provide animation resources to scripts not needing to know if the path they try to load is a build animation instead of a resource one.

To create the animation call build() . This will call buildAnimation() to fill a new animation resource with content. Once finished the build method returns the ready to use animation resource. Otherwise an exception is thrown.

◆ buildAnimation()

void Dragengine.Scenery.AnimationBuilder.buildAnimation ( )
protected

Build animation.

Called by build(String) to fill a new animation resource with content. You are only allowed to call methods from AnimationBuilder from inside this function call.

◆ new()

AnimationBuilder Dragengine.Scenery.AnimationBuilder.new ( )

Create animation builder.

◆ setKeyframeListCount()

void Dragengine.Scenery.AnimationBuilder.setKeyframeListCount ( int  move,
int  count 
)
protected

Set move keyframe list count.

◆ setVertexPositionSetKeyframeListCount()

void Dragengine.Scenery.AnimationBuilder.setVertexPositionSetKeyframeListCount ( int  move,
int  count 
)
protected

Set move keyframe list count.

Version
1.17

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