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()
      Access the targeted animation, if any.
      Specified by:
      getPtr in class Ref
      Returns:
      the pre-existing object, or null if the reference is empty
    • 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:
      the virtual address, or zero if the reference is empty
    • toRef

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