Package com.jme3.anim
Class AnimClip
java.lang.Object
com.jme3.anim.AnimClip
- All Implemented Interfaces:
Savable,JmeCloneable,Cloneable
A named set of animation tracks that can be played in synchrony.
Created by Nehon on 20/12/2017.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcloneFields(Cloner cloner, Object original) Callback fromClonerto convert this shallow-cloned clip into a deep-cloned one, using the specified Cloner and original to resolve copied fields.doubleDetermine the duration of this clip.getName()Determine the name of this clip.Access all the tracks in this clip.jmeClone()Create a shallow clone for the JME cloner.voidread(JmeImporter im) De-serialize this clip from the specified importer, for example when loading from a J3O file.voidReplace all tracks in this clip.toString()Represent this clip as a String.voidwrite(JmeExporter ex) Serialize this clip to the specified exporter, for example when saving to a J3O file.
-
Constructor Details
-
AnimClip
protected AnimClip()No-argument constructor needed by SavableClassUtil. -
AnimClip
Instantiate a zero-length clip with the specified name.- Parameters:
name- desired name for the new clip
-
-
Method Details
-
setTracks
Replace all tracks in this clip. This method may increase the clip's length, but it will never reduce it.- Parameters:
tracks- the tracks to use (alias created)
-
getName
Determine the name of this clip.- Returns:
- the name
-
getLength
public double getLength()Determine the duration of this clip.- Returns:
- the duration (in seconds)
-
getTracks
Access all the tracks in this clip.- Returns:
- the pre-existing array
-
jmeClone
Create a shallow clone for the JME cloner.- Specified by:
jmeClonein interfaceJmeCloneable- Returns:
- a new instance
-
cloneFields
Callback fromClonerto convert this shallow-cloned clip into a deep-cloned one, using the specified Cloner and original to resolve copied fields.- Specified by:
cloneFieldsin interfaceJmeCloneable- Parameters:
cloner- the Cloner that's cloning this clip (not null)original- the instance from which this clip was shallow-cloned (not null, unaffected)
-
toString
Represent this clip as a String. -
write
Serialize this clip to the specified exporter, for example when saving to a J3O file.- Specified by:
writein interfaceSavable- Parameters:
ex- the exporter to write to (not null)- Throws:
IOException- from the exporter
-
read
De-serialize this clip from the specified importer, for example when loading from a J3O file.- Specified by:
readin interfaceSavable- Parameters:
im- the importer to read from (not null)- Throws:
IOException- from the importer
-