AnimClip
@Deprecated public class Animation extends java.lang.Object implements Savable, java.lang.Cloneable, JmeCloneable
Modifier | Constructor and Description |
---|---|
protected |
Animation()
Deprecated.
Serialization-only.
|
|
Animation(java.lang.String name,
float length)
Deprecated.
Creates a new
Animation with the given name and length. |
Modifier and Type | Method and Description |
---|---|
void |
addTrack(Track track)
Deprecated.
Adds a track to this animation
|
Animation |
clone()
Deprecated.
This method creates a clone of the current object.
|
void |
cloneFields(Cloner cloner,
java.lang.Object original)
Deprecated.
Implemented to perform deep cloning for this object, resolving
local cloned references using the specified cloner.
|
Animation |
cloneForSpatial(Spatial spat)
Deprecated.
|
float |
getLength()
Deprecated.
Returns the length in seconds of this animation
|
java.lang.String |
getName()
Deprecated.
The name of the bone animation
|
Track[] |
getTracks()
Deprecated.
Returns the tracks set in
setTracks(com.jme3.animation.Track[]) . |
java.lang.Object |
jmeClone()
Deprecated.
Performs a regular shallow clone of the object.
|
void |
read(JmeImporter im)
Deprecated.
|
void |
removeTrack(Track track)
Deprecated.
removes a track from this animation
|
void |
setLength(float length)
Deprecated.
Set the length of the animation
|
void |
setName(java.lang.String name)
Deprecated.
Sets the name of the animation
|
void |
setTracks(Track[] tracksArray)
Deprecated.
Set the
Track s to be used by this animation. |
java.lang.String |
toString()
Deprecated.
|
void |
write(JmeExporter ex)
Deprecated.
|
protected Animation()
public Animation(java.lang.String name, float length)
Animation
with the given name and length.name
- The name of the animation.length
- Length in seconds of the animation.public java.lang.String getName()
public float getLength()
public void setLength(float length)
length
- the desired duration (in seconds)public void setName(java.lang.String name)
name
- the desired namepublic void setTracks(Track[] tracksArray)
Track
s to be used by this animation.tracksArray
- The tracks to set.public void addTrack(Track track)
track
- the track to addpublic void removeTrack(Track track)
track
- the track to removepublic Track[] getTracks()
setTracks(com.jme3.animation.Track[])
.public Animation clone()
clone
in class java.lang.Object
public Animation cloneForSpatial(Spatial spat)
spat
- the Spatial to clone forpublic java.lang.Object jmeClone()
JmeCloneable
This method is separate from the regular clone() method so that objects might still maintain their own regular java clone() semantics (perhaps even using Cloner for those methods). However, because Java's clone() has specific features in the sense of Object's clone() implementation, it's usually best to have some path for subclasses to bypass the public clone() method that might be cloning fields and instead get at the superclass protected clone() methods. For example, through super.jmeClone() or another protected clone method that some base class eventually calls super.clone() in.
jmeClone
in interface JmeCloneable
public void cloneFields(Cloner cloner, java.lang.Object original)
JmeCloneable
Note: during normal clone operations the original object will not be needed as the clone has already had all of the fields shallow copied.
cloneFields
in interface JmeCloneable
cloner
- The cloner that is performing the cloning operation. The
cloneFields method can call back into the cloner to make
clones of its subordinate fields.original
- The original object from which this object was cloned.
This is provided for the very rare case that this object needs
to refer to its original for some reason. In general, all of
the relevant values should have been transferred during the
shallow clone, and this object need only clone what it wants.public java.lang.String toString()
toString
in class java.lang.Object
public void write(JmeExporter ex) throws java.io.IOException
public void read(JmeImporter im) throws java.io.IOException