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
.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfloat
Return the duration of the animation.getPtr()
Temporarily access the referencedSkeletalAnimation
.void
sample
(float time, SkeletonPose storePose) Interpolate the joint transforms for the specified animation time.long
targetVa()
Return the address of the nativeSkeletalAnimation
.toRef()
Create another counted reference to the nativeSkeletalAnimation
.Methods inherited from class com.github.stephengold.joltjni.JoltPhysicsObject
close, compareTo, equals, getContainingObject, hasAssignedNativeObject, hashCode, 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
Temporarily access the referencedSkeletalAnimation
. -
targetVa
public long targetVa()Return the address of the nativeSkeletalAnimation
. No objects are affected.- Specified by:
targetVa
in interfaceConstJoltPhysicsObject
- Overrides:
targetVa
in classJoltPhysicsObject
- Returns:
- a virtual address (not zero)
-
toRef
Create another counted reference to the nativeSkeletalAnimation
.
-