Package com.github.stephengold.joltjni
Class SkeletalAnimationRef
java.lang.Object
com.github.stephengold.joltjni.JoltPhysicsObject
com.github.stephengold.joltjni.template.Ref
com.github.stephengold.joltjni.SkeletalAnimationRef
- All Implemented Interfaces:
ConstJoltPhysicsObject,AutoCloseable,Comparable<ConstJoltPhysicsObject>
A counted reference to a
SkeletalAnimation.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfloatReturn the duration of the animation.getPtr()Temporarily access the referencedSkeletalAnimation.voidsample(float time, SkeletonPose storePose) Interpolate the joint transforms for the specified animation time.toRef()Create a counted reference to the nativeSkeletalAnimationRef.Methods inherited from class com.github.stephengold.joltjni.JoltPhysicsObject
close, compareTo, equals, hasAssignedNativeObject, hashCode, ownsNativeObject, setVirtualAddress, startCleaner, toString, va
-
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
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
Temporarily access the referencedSkeletalAnimation. -
toRef
Create a counted reference to the nativeSkeletalAnimationRef.
-