|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.jme.animation.BoneTransform
public class BoneTransform
BoneTransform contains a Bone/Transform array pairing. This pairing defines the bone that will be transformed (translate, rotate), and the transformations for a given frame. The bone is updated during a call to the update method that defines two keyframes and the interpolation value between them.
| Field Summary | |
|---|---|
static float |
NOBLEND
|
| Constructor Summary | |
|---|---|
BoneTransform()
Default constructor creates a new BoneTransform with no data set. |
|
BoneTransform(Bone bone,
int frames)
Constructor defines the bone that will be transformed as well as how many transform keyframes that exist. |
|
BoneTransform(Bone bone,
Matrix4f[] transforms)
Constructor defines the bone and the list of transforms to use. |
|
| Method Summary | |
|---|---|
boolean |
findBone(Bone b)
|
Bone |
getBone()
returns the bone that this BoneTransform is responsible for updating. |
java.lang.String |
getBoneId()
|
java.lang.Class |
getClassTag()
The peristed type for the object. |
Quaternion[] |
getRotations()
|
Vector3f[] |
getTranslations()
|
void |
read(JMEImporter e)
|
void |
setBone(Bone b)
defines the bone that the controller will be affecting. |
void |
setBoneId(java.lang.String boneId)
|
void |
setCurrentFrame(int frame)
setCurrentFrame will set the current frame from the bone. |
void |
setCurrentFrame(int frame,
float blend)
|
void |
setCurrentFrame(int frame,
float blend,
Bone source,
Spatial destination,
float diffModifier,
AnimationProperties props)
setCurrentFrame will set the current frame from the bone. |
void |
setRotation(int index,
Quaternion rotation)
setRotation sets a rotation for a given frame. |
void |
setRotations(Quaternion[] rotations)
sets the rotations array for the keyframes. |
void |
setTransform(int index,
Matrix4f transform)
setTransforms sets a transform for a given frame. |
void |
setTransforms(Matrix4f[] transforms)
sets the transforms array for the keyframes. |
void |
setTranslation(int index,
Vector3f translation)
setTranslation sets a translation for a given frame. |
void |
setTranslations(Vector3f[] translations)
sets the translations array for the keyframes. |
void |
update(int prevFrame,
int currentFrame,
int interpType,
float time)
Convenience wrapper for the main update method, with no Blending. |
void |
update(int prevFrame,
int currentFrame,
int interpType,
float time,
float blend)
update sets the transform of the bone to a given interpolation between two given frames. |
void |
write(JMEExporter e)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final float NOBLEND
| Constructor Detail |
|---|
public BoneTransform()
public BoneTransform(Bone bone,
int frames)
bone - the bone to transform.frames - the number of keyframes for this animation.
public BoneTransform(Bone bone,
Matrix4f[] transforms)
bone - the bone to transform.transforms - the transforms to use.| Method Detail |
|---|
public void setCurrentFrame(int frame)
frame - the frame to set the bone's transform to.
public void setCurrentFrame(int frame,
float blend)
public void setCurrentFrame(int frame,
float blend,
Bone source,
Spatial destination,
float diffModifier,
AnimationProperties props)
frame - the frame to set the bone's transform to.
public void update(int prevFrame,
int currentFrame,
int interpType,
float time)
update(int, int, int, float, float)
public void update(int prevFrame,
int currentFrame,
int interpType,
float time,
float blend)
prevFrame - the initial frame.currentFrame - the goal frame.interpType - the type of interpolationtime - the time between frames
public void setTransform(int index,
Matrix4f transform)
index - the index of the transform to set.transform - the transform to set at the index.
public void setRotation(int index,
Quaternion rotation)
index - the index of the rotation to set.rotation - the rotation to set at the index.
public void setTranslation(int index,
Vector3f translation)
index - the index of the translation to set.translation - the translation to set at the index.public void setRotations(Quaternion[] rotations)
rotations - the rotations to set.public void setTranslations(Vector3f[] translations)
translations - the translations to set.public void setTransforms(Matrix4f[] transforms)
transforms - the transforms to set.public void setBone(Bone b)
b - the bone that will be controlled.public Bone getBone()
public Quaternion[] getRotations()
public Vector3f[] getTranslations()
public java.lang.String getBoneId()
public void setBoneId(java.lang.String boneId)
public boolean findBone(Bone b)
public void write(JMEExporter e)
throws java.io.IOException
write in interface Savablejava.io.IOException
public void read(JMEImporter e)
throws java.io.IOException
read in interface Savablejava.io.IOExceptionpublic java.lang.Class getClassTag()
Savable
getClassTag in interface Savable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||