Class AttachmentPoint

java.lang.Object
com.ardor3d.extension.animation.skeletal.AttachmentPoint
All Implemented Interfaces:
PoseListener

public class AttachmentPoint extends Object implements 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 Details

    • AttachmentPoint

      public AttachmentPoint(String name)
      Create a new attachment point.
      Parameters:
      name - used to identify this attachment point.
    • AttachmentPoint

      public AttachmentPoint(String name, short jointIndex, Spatial attachment, ReadOnlyTransform offset)
      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

      public String getName()
    • setName

      public void setName(String name)
    • getAttachment

      public Spatial getAttachment()
    • setAttachment

      public void setAttachment(Spatial attachment)
    • getJointIndex

      public int getJointIndex()
    • setJointIndex

      public void setJointIndex(short jointIndex)
    • getOffset

      public ReadOnlyTransform getOffset()
    • setOffset

      public void setOffset(ReadOnlyTransform offset)
    • poseUpdated

      public void poseUpdated(SkeletonPose pose)
      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 interface PoseListener
      Parameters:
      pose - the pose that was updated.