Class SkeletalAnimationRef

All Implemented Interfaces:
ConstJoltPhysicsObject, AutoCloseable, Comparable<JoltPhysicsObject>

public final class SkeletalAnimationRef extends Ref
A counted reference to a SkeletalAnimation.
  • Constructor Details

    • SkeletalAnimationRef

      public SkeletalAnimationRef()
      Instantiate an empty reference.
  • Method Details

    • getDuration

      public float getDuration()
      Return the duration of the animation. The animation is unaffected.
      Returns:
      the duration (in seconds)
    • sample

      public void sample(float time, SkeletonPose storePose)
      Interpolate the joint transforms for the specified animation time. The animation is unaffected.
      Parameters:
      time - the animation time to use (in seconds)
      storePose - storage for the interpolated pose (not null, modified)
    • getPtr

      public SkeletalAnimation getPtr()
      Temporarily access the referenced SkeletalAnimation.
      Specified by:
      getPtr in class Ref
      Returns:
      a new JVM object with the pre-existing native object assigned
    • targetVa

      public long targetVa()
      Return the address of the native SkeletalAnimation. No objects are affected.
      Specified by:
      targetVa in interface ConstJoltPhysicsObject
      Overrides:
      targetVa in class JoltPhysicsObject
      Returns:
      a virtual address (not zero)
    • toRef

      public SkeletalAnimationRef toRef()
      Create another counted reference to the native SkeletalAnimation.
      Specified by:
      toRef in class Ref
      Returns:
      a new JVM object with a new native object assigned