java.lang.Object
com.github.stephengold.joltjni.JoltPhysicsObject
com.github.stephengold.joltjni.JointState
All Implemented Interfaces:
ConstJointState, ConstJoltPhysicsObject, AutoCloseable, Comparable<JoltPhysicsObject>

public class JointState extends JoltPhysicsObject implements ConstJointState
The local-space coordinate transform of an animation joint relative to its parent joint. (native type: SkeletonPose::JointState)
  • Method Details

    • set

      public void set(ConstJointState source)
      Copy both components from the argument.
      Parameters:
      source - the state to copy (not null, unaffected)
    • setRotation

      public void setRotation(float qx, float qy, float qz, float qw)
      Alter the rotation component. (native attribute: mRotation)
      Parameters:
      qx - the X component of the desired rotation (default=0)
      qy - the Y component of the desired rotation (default=0)
      qz - the Z component of the desired rotation (default=0)
      qw - the W component of the desired rotation (default=1)
    • setRotation

      public void setRotation(QuatArg rotation)
      Alter the rotation component. (native attribute: mRotation)
      Parameters:
      rotation - the desired rotation (not null, unaffected, default=(0,0,0,1))
    • setTranslation

      public void setTranslation(float x, float y, float z)
      Alter the translation offset component. (native attribute: mTranslation)
      Parameters:
      x - the desired X offset (default=0)
      y - the desired Y offset (default=0)
      z - the desired Z offset (default=0)
    • setTranslation

      public void setTranslation(Vec3Arg offset)
      Alter the translation offset component. (native attribute: mTranslation)
      Parameters:
      offset - the desired offset (not null, unaffected, default=(0,0,0))
    • getRotation

      public Quat getRotation()
      Copy the rotation. The state is unaffected. (native attribute: mRotation)
      Specified by:
      getRotation in interface ConstJointState
      Returns:
      a new rotation quaternion
    • getRotation

      public void getRotation(Quat storeResult)
      Copy the rotation. The state is unaffected. (native attribute: mRotation)
      Specified by:
      getRotation in interface ConstJointState
      Parameters:
      storeResult - storage for the rotation (not null, modified)
    • getTranslation

      public Vec3 getTranslation()
      Copy the translation offset. The state is unaffected. (native attribute: mTranslation)
      Specified by:
      getTranslation in interface ConstJointState
      Returns:
      a new offset vector
    • getTranslation

      public void getTranslation(Vec3 storeResult)
      Copy the translation offset. The state is unaffected. (native attribute: mTranslation)
      Specified by:
      getTranslation in interface ConstJointState
      Parameters:
      storeResult - storage for the offset (not null, modified)