Package com.jme3.anim

Class MatrixJointModelTransform

java.lang.Object
com.jme3.anim.MatrixJointModelTransform
All Implemented Interfaces:
JointModelTransform

public class MatrixJointModelTransform extends Object implements JointModelTransform
An implementation of JointModelTransform that accumulates joint transformations into a Matrix4f. This approach is particularly useful for correctly handling non-uniform scaling within an armature hierarchy, as Matrix4f can represent non-uniform scaling directly, unlike Transform, which typically handles uniform scaling.

This class maintains a single Matrix4f to represent the accumulated model-space transform of the joint it's associated with.

  • Constructor Details

    • MatrixJointModelTransform

      public MatrixJointModelTransform()
  • Method Details

    • updateModelTransform

      public void updateModelTransform(Transform localTransform, Joint parent)
      Description copied from interface: JointModelTransform
      Update the joint's transform in model space.
      Specified by:
      updateModelTransform in interface JointModelTransform
      Parameters:
      localTransform - the joint's local transform (not null, unaffected)
      parent - the joint's parent, or null for a root joint
    • getOffsetTransform

      public void getOffsetTransform(Matrix4f outTransform, Matrix4f inverseModelBindMatrix)
      Description copied from interface: JointModelTransform
      Determine the joint's skinning transform.
      Specified by:
      getOffsetTransform in interface JointModelTransform
      Parameters:
      outTransform - storage for the result (modified if not null)
      inverseModelBindMatrix - the joint's inverse model bind matrix (not null, unaffected)
    • applyBindPose

      public void applyBindPose(Transform localTransform, Matrix4f inverseModelBindMatrix, Joint parent)
      Description copied from interface: JointModelTransform
      Configure joint's local transform for bind pose.
      Specified by:
      applyBindPose in interface JointModelTransform
      Parameters:
      localTransform - the joint's local transform (not null, unaffected)
      inverseModelBindMatrix - the joint's inverse model bind matrix (not null, unaffected)
      parent - the joint's parent, or null for a root joint
    • getModelTransformMatrix

      public Matrix4f getModelTransformMatrix()
      Access the model transform.
      Returns:
      the pre-existing instance
    • getModelTransform

      public Transform getModelTransform()
      Description copied from interface: JointModelTransform
      Determine the joint's transform in model space.
      Specified by:
      getModelTransform in interface JointModelTransform
      Returns:
      a new instance or a pre-existing one