Constructor and Description |
---|
TransformTrack()
Serialization-only.
|
TransformTrack(HasLocalTransform target,
float[] times,
Vector3f[] translations,
Quaternion[] rotations,
Vector3f[] scales)
Creates a transform track for the given bone index
|
Modifier and Type | Method and Description |
---|---|
void |
cloneFields(Cloner cloner,
java.lang.Object original)
Implemented to perform deep cloning for this object, resolving
local cloned references using the specified cloner.
|
void |
getDataAtTime(double t,
Transform transform) |
double |
getLength() |
Quaternion[] |
getRotations()
return the array of rotations of this track
|
Vector3f[] |
getScales()
returns the array of scales for this track
|
HasLocalTransform |
getTarget() |
float[] |
getTimes()
returns the arrays of time for this track
|
Vector3f[] |
getTranslations()
returns the array of translations of this track
|
TransformTrack |
jmeClone()
Performs a regular shallow clone of the object.
|
void |
read(JmeImporter im) |
void |
setFrameInterpolator(FrameInterpolator interpolator) |
void |
setKeyframes(float[] times,
Vector3f[] translations,
Quaternion[] rotations,
Vector3f[] scales)
Set the translations, rotations and scales for this bone track
|
void |
setKeyframesRotation(Quaternion[] rotations)
Set the rotations for this joint track
|
void |
setKeyframesScale(Vector3f[] scales)
Set the scales for this joint track
|
void |
setKeyframesTranslation(Vector3f[] translations)
Set the translations for this joint track
|
void |
setTarget(HasLocalTransform target) |
void |
setTimes(float[] times)
Sets the keyframes times for this Joint track
|
void |
write(JmeExporter ex) |
public TransformTrack()
public TransformTrack(HasLocalTransform target, float[] times, Vector3f[] translations, Quaternion[] rotations, Vector3f[] scales)
times
- a float array with the time of each frametranslations
- the translation of the bone for each framerotations
- the rotation of the bone for each framescales
- the scale of the bone for each framepublic Quaternion[] getRotations()
public Vector3f[] getScales()
public float[] getTimes()
public Vector3f[] getTranslations()
public void setTimes(float[] times)
times
- the keyframes timespublic void setKeyframesTranslation(Vector3f[] translations)
translations
- the translation of the bone for each framepublic void setKeyframesScale(Vector3f[] scales)
scales
- the scales of the bone for each framepublic void setKeyframesRotation(Quaternion[] rotations)
rotations
- the rotations of the bone for each framepublic void setKeyframes(float[] times, Vector3f[] translations, Quaternion[] rotations, Vector3f[] scales)
times
- a float array with the time of each frametranslations
- the translation of the bone for each framerotations
- the rotation of the bone for each framescales
- the scale of the bone for each framepublic void getDataAtTime(double t, Transform transform)
getDataAtTime
in interface AnimTrack<Transform>
public void setFrameInterpolator(FrameInterpolator interpolator)
public HasLocalTransform getTarget()
public void setTarget(HasLocalTransform target)
public void write(JmeExporter ex) throws java.io.IOException
public void read(JmeImporter im) throws java.io.IOException
public TransformTrack 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 merely clone what it wants.