public class Joint extends java.lang.Object implements Savable, JmeCloneable, HasLocalTransform
Modifier and Type | Method and Description |
---|---|
void |
addChild(Joint child) |
void |
applyBindPose()
Sets the local transform with the bind transforms
|
protected void |
applyInitialPose()
Sets the local transform with the initial transform
|
void |
cloneFields(Cloner cloner,
java.lang.Object original)
Implemented to perform deep cloning for this object, resolving
local cloned references using the specified cloner.
|
java.util.List<Joint> |
getChildren() |
int |
getId() |
Transform |
getInitialTransform() |
Matrix4f |
getInverseModelBindMatrix() |
protected JointModelTransform |
getJointModelTransform() |
Quaternion |
getLocalRotation() |
Vector3f |
getLocalScale() |
Transform |
getLocalTransform() |
Vector3f |
getLocalTranslation() |
Transform |
getModelTransform() |
java.lang.String |
getName() |
Joint |
getParent() |
java.lang.Object |
jmeClone()
Performs a regular shallow clone of the object.
|
void |
read(JmeImporter im) |
protected void |
saveBindPose()
Sets the current localTransform as the Bind transform.
|
protected void |
saveInitialPose()
Sets the current local transforms as the initial transform.
|
void |
setId(int id) |
void |
setInverseModelBindMatrix(Matrix4f inverseModelBindMatrix) |
protected void |
setJointModelTransform(JointModelTransform jointModelTransform) |
void |
setLocalRotation(Quaternion rotation) |
void |
setLocalScale(Vector3f scale) |
void |
setLocalTransform(Transform localTransform) |
void |
setLocalTranslation(Vector3f translation) |
void |
setName(java.lang.String name) |
void |
update()
Updates world transforms for this bone and it's children.
|
void |
updateModelTransforms()
Updates the model transforms for this bone, and, possibly the attach node
if not null.
|
void |
write(JmeExporter ex) |
public final void update()
public final void updateModelTransforms()
The model transform of this bone is computed by combining the parent's model transform with this bones' local transform.
protected void saveBindPose()
protected void saveInitialPose()
public void applyBindPose()
protected void applyInitialPose()
protected JointModelTransform getJointModelTransform()
protected void setJointModelTransform(JointModelTransform jointModelTransform)
public Vector3f getLocalTranslation()
public Quaternion getLocalRotation()
public Vector3f getLocalScale()
public void setLocalTranslation(Vector3f translation)
public void setLocalRotation(Quaternion rotation)
public void setLocalScale(Vector3f scale)
public void addChild(Joint child)
public void setName(java.lang.String name)
public void setLocalTransform(Transform localTransform)
setLocalTransform
in interface HasLocalTransform
public void setInverseModelBindMatrix(Matrix4f inverseModelBindMatrix)
public java.lang.String getName()
public Joint getParent()
public java.util.List<Joint> getChildren()
public Transform getInitialTransform()
public Transform getLocalTransform()
getLocalTransform
in interface HasLocalTransform
public Transform getModelTransform()
public Matrix4f getInverseModelBindMatrix()
public int getId()
public void setId(int id)
public 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 merely clone what it wants.public void read(JmeImporter im) throws java.io.IOException
public void write(JmeExporter ex) throws java.io.IOException