Class AttachmentPoint
java.lang.Object
com.ardor3d.extension.animation.skeletal.AttachmentPoint
- All Implemented Interfaces:
PoseListener
A pose listener whose purpose is to update the transform of a Spatial to align with a specific joint of the
SkeletonPose we are listening to. Note that this is in the coordinate space of the pose, so the managed spatial
should be a sibling to the skin mesh we are attaching to, or likewise similarly transformed.
-
Constructor Summary
ConstructorDescriptionAttachmentPoint
(String name) Create a new attachment point.AttachmentPoint
(String name, short jointIndex, Spatial attachment, ReadOnlyTransform offset) Create a new attachment point. -
Method Summary
Modifier and TypeMethodDescriptionint
getName()
void
poseUpdated
(SkeletonPose pose) Move our managed spatial to align with the referenced joint's position in the given pose, modified by our offset.void
setAttachment
(Spatial attachment) void
setJointIndex
(short jointIndex) void
void
setOffset
(ReadOnlyTransform offset)
-
Constructor Details
-
AttachmentPoint
Create a new attachment point.- Parameters:
name
- used to identify this attachment point.
-
AttachmentPoint
Create a new attachment point.- Parameters:
name
- used to identify this attachment point.jointIndex
- the joint index to listen to.attachment
- the spatial to manage transformation of.offset
- an offset to add to the joint's transform before updating the attachment spatial.
-
-
Method Details
-
getName
-
setName
-
getAttachment
-
setAttachment
-
getJointIndex
public int getJointIndex() -
setJointIndex
public void setJointIndex(short jointIndex) -
getOffset
-
setOffset
-
poseUpdated
Move our managed spatial to align with the referenced joint's position in the given pose, modified by our offset. See class javadoc for more information.- Specified by:
poseUpdated
in interfacePoseListener
- Parameters:
pose
- the pose that was updated.
-