|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jme.scene.Controller
com.jmex.model.animation.JointController
public class JointController
Started Date: Jun 9, 2004
This controller animates a Node's JointMesh children acording to the joints
stored inside movementInfo
.
Field Summary | |
---|---|
float |
FPS
Currently unused. |
TransformMatrix[] |
localRefMatrix
Local refrence matrix that can determine a joint's position in space relative to its parent. |
java.util.ArrayList<PointInTime> |
movementInfo
movementInfo[i] contains a float value time and an array of TransformMatrix. |
java.util.ArrayList<JointMesh> |
movingMeshes
Array of all the meshes this controller should consider animating. |
int |
numJoints
It is JointController's responsibility to keep changePoints sorted by time at all times. |
int[] |
parentIndex
parentIndex contains a list of who's parent a joint is. |
float |
skipRate
Tells update that it should be called every skipRate
seconds |
Fields inherited from class com.jme.scene.Controller |
---|
RT_CLAMP, RT_CYCLE, RT_WRAP |
Constructor Summary | |
---|---|
JointController()
|
|
JointController(int numJoints)
Constructs a new JointController that will hold the given number of joints. |
Method Summary | |
---|---|
void |
addJointMesh(JointMesh child)
Adds a jointmesh for this JointController to consider animating. |
float |
getCurrentTime()
|
boolean |
getModelUpdate()
Returns true if the model's bounding volume is being updated every frame. |
void |
processController()
Processes a JointController by filling holes and creating inverse matrixes. |
void |
read(JMEImporter e)
|
void |
setModelUpdate(boolean update)
If true, the model's bounding volume will be updated every frame. |
void |
setRotation(int jointNumber,
float time,
float x,
float y,
float z)
Tells JointController that at time time the joint
jointNumber will rotate acording to the euler angles x,y,z
relative to its parent's rotation |
void |
setRotation(int jointNumber,
float time,
Quaternion quaternion)
Tells JointController that at time time the joint
jointNumber will rotate acording to
Quaternion . |
void |
setTimes(int start,
int end)
Sets the frames the joint controller will animate from and to. |
void |
setTranslation(int jointNumber,
float time,
float x,
float y,
float z)
Tells JointController that at time time the joint
jointNumber will translate to x,y,z relative to its parent |
void |
setTranslation(int jointNumber,
float time,
Vector3f trans)
Tells JointController that at time time the joint
jointNumber will translate to x,y,z relative to its parent |
void |
update(float time)
Updates the movingMeshes by updating their joints +=time |
void |
write(JMEExporter e)
|
Methods inherited from class com.jme.scene.Controller |
---|
getClassTag, getControllerValues, getMaxTime, getMinTime, getRepeatType, getSpeed, isActive, setActive, setControllerValues, setMaxTime, setMinTime, setRepeatType, setSpeed |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public int numJoints
time
at all times.
public java.util.ArrayList<PointInTime> movementInfo
time
the joint i is at movement
jointChange[i]
public int[] parentIndex
public TransformMatrix[] localRefMatrix
public float FPS
public java.util.ArrayList<JointMesh> movingMeshes
public float skipRate
skipRate
seconds
Constructor Detail |
---|
public JointController()
public JointController(int numJoints)
numJoints
- The number of joints this jointController will haveMethod Detail |
---|
public float getCurrentTime()
public void setTranslation(int jointNumber, float time, float x, float y, float z)
time
the joint
jointNumber
will translate to x,y,z relative to its parent
jointNumber
- Index of joint to affecttime
- Which time the joint will take these valuesx
- Joint's x translationy
- Joint's y translationz
- Joint's z translationpublic void setTranslation(int jointNumber, float time, Vector3f trans)
time
the joint
jointNumber
will translate to x,y,z relative to its parent
jointNumber
- Index of joint to affecttime
- Which time the joint will take these valuestrans
- Joint's translationpublic void setRotation(int jointNumber, float time, float x, float y, float z)
time
the joint
jointNumber
will rotate acording to the euler angles x,y,z
relative to its parent's rotation
jointNumber
- Index of joint to affecttime
- Which time the joint will take these valuesx
- Joint's x rotationy
- Joint's y rotationz
- Joint's z rotationpublic void setRotation(int jointNumber, float time, Quaternion quaternion)
time
the joint
jointNumber
will rotate acording to
Quaternion
.
jointNumber
- Index of joint to affecttime
- Which time the joint will take these valuesquaternion
- The joint's new rotationpublic void update(float time)
movingMeshes
by updating their joints +=time
update
in class Controller
time
- Time from last updatepublic void setTimes(int start, int end)
start
- The starting frame number.end
- The ending frame number.public void processController()
public void setModelUpdate(boolean update)
update
- The new update model volume per frame value.public boolean getModelUpdate()
public void addJointMesh(JointMesh child)
child
- Child JointMesh to considerpublic void write(JMEExporter e) throws java.io.IOException
write
in interface Savable
write
in class Controller
java.io.IOException
public void read(JMEImporter e) throws java.io.IOException
read
in interface Savable
read
in class Controller
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |