Class SkeletonPose
java.lang.Object
com.ardor3d.extension.animation.skeletal.SkeletonPose
- All Implemented Interfaces:
Savable
Joins a Skeleton with an array of joint poses. This allows the skeleton to exist and be reused between multiple
instances of poses.
-
Constructor Summary
ModifierConstructorDescriptionprotected
SkeletonPose
(Skeleton skeleton) Construct a new SkeletonPose using the given Skeleton. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addPoseListener
(PoseListener listener) Register a PoseListener on this SkeletonPose.void
Clear all PoseListeners registered on this SkeletonPose.void
Notify any registered PoseListeners that this pose has been "updated".Class
<? extends SkeletonPose> Matrix4[]
static SkeletonPose
makeCopy()
void
read
(InputCapsule capsule) void
removePoseListener
(PoseListener listener) Remove a PoseListener from this SkeletonPose.void
Update our local joint transforms so that they reflect the skeleton in bind pose.void
Update the global and palette transforms of our posed joints based on the current local joint transforms.void
write
(OutputCapsule capsule)
-
Constructor Details
-
SkeletonPose
Construct a new SkeletonPose using the given Skeleton.- Parameters:
skeleton
- the skeleton to use.
-
SkeletonPose
protected SkeletonPose()
-
-
Method Details
-
getSkeleton
- Returns:
- the skeleton posed by this object.
-
getLocalJointTransforms
- Returns:
- an array of local space transforms for each of the skeleton's joints.
-
getGlobalJointTransforms
- Returns:
- an array of global space transforms for each of the skeleton's joints. This does not take into account any transformation of the SkeletonMesh using the pose.
-
getMatrixPalette
- Returns:
- an array of global space transforms for each of the skeleton's joints.
-
addPoseListener
Register a PoseListener on this SkeletonPose.- Parameters:
listener
- the PoseListener
-
removePoseListener
Remove a PoseListener from this SkeletonPose.- Parameters:
listener
- the PoseListener
-
clearListeners
public void clearListeners()Clear all PoseListeners registered on this SkeletonPose. -
updateTransforms
public void updateTransforms()Update the global and palette transforms of our posed joints based on the current local joint transforms. -
setToBindPose
public void setToBindPose()Update our local joint transforms so that they reflect the skeleton in bind pose. -
firePoseUpdated
public void firePoseUpdated()Notify any registered PoseListeners that this pose has been "updated". -
makeCopy
-
getClassTag
- Specified by:
getClassTag
in interfaceSavable
-
write
- Specified by:
write
in interfaceSavable
- Throws:
IOException
-
read
- Specified by:
read
in interfaceSavable
- Throws:
IOException
-
initSavable
-