public class SkeletonPose extends Object implements Serializable
A pose of Skeleton
Joint
's. Poses are used to deform (animate) Animated3D
's.
Many Poses can share the same Skeleton
.
This class is adapted from Ardor3D.
Constructor and Description |
---|
SkeletonPose(Skeleton skeleton)
Creates a new Pose for given
Skeleton . |
Modifier and Type | Method and Description |
---|---|
SkeletonPose |
clone()
Returns a new
SkeletonPose sharing same skeleton with this. |
Matrix |
getGlobal(int index)
Returns the joint transform in object space.
|
Matrix |
getLocal(int index)
Returns the joint transform in local space (relative to its parent).
|
Matrix |
getPalette(int index)
Returns the joint transform in bind-pose space.
|
Skeleton |
getSkeleton()
Returns the
Skeleton this pose is related to. |
void |
setToBindPose()
Updates transforms to reset to bind-pose.
|
void |
updateTransforms()
Updates the global and palette transforms based on current local transforms.
|
public Matrix getLocal(int index)
index
- the joint indexpublic Matrix getGlobal(int index)
index
- the joint indexpublic Matrix getPalette(int index)
index
- the joint indexpublic void setToBindPose()
public void updateTransforms()
Animated3D.applySkeletonPose()
if pose is modified.public SkeletonPose clone()
SkeletonPose
sharing same skeleton with this.
Created SkeletonPose is initially in bind pose.