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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
cloneFields
(Cloner cloner, Object original) Callback fromCloner
to convert this shallow-cloned clip into a deep-cloned one, using the specified Cloner and original to resolve copied fields.double
Determine 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.void
read
(JmeImporter im) De-serialize this clip from the specified importer, for example when loading from a J3O file.void
Replace all tracks in this clip.toString()
Represent this clip as a String.void
write
(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:
jmeClone
in interfaceJmeCloneable
- Returns:
- a new instance
-
cloneFields
Callback fromCloner
to convert this shallow-cloned clip into a deep-cloned one, using the specified Cloner and original to resolve copied fields.- Specified by:
cloneFields
in 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:
write
in 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:
read
in interfaceSavable
- Parameters:
im
- the importer to read from (not null)- Throws:
IOException
- from the importer
-