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<JoltPhysicsObject>
A counted reference to a
SkeletalAnimation.-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfloatReturn the duration of the animation.getPtr()Access the targeted animation, if any.voidsample(float time, SkeletonPose storePose) Interpolate the joint transforms for the specified animation time.longtargetVa()Return the address of the nativeSkeletalAnimation.toRef()Create an additional counted reference to the targeted animation.Methods inherited from class com.github.stephengold.joltjni.JoltPhysicsObject
close, compareTo, equals, getContainingObject, hasAssignedNativeObject, hashCode, isCleanerStarted, ownsNativeObject, setVirtualAddress, 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
Access the targeted animation, if any. -
targetVa
public long targetVa()Return the address of the nativeSkeletalAnimation. No objects are affected.- Specified by:
targetVain interfaceConstJoltPhysicsObject- Overrides:
targetVain classJoltPhysicsObject- Returns:
- the virtual address, or zero if the reference is empty
-
toRef
Create an additional counted reference to the targeted animation.
-