Package com.github.stephengold.joltjni
Class SkeletalAnimation
java.lang.Object
com.github.stephengold.joltjni.JoltPhysicsObject
com.github.stephengold.joltjni.SkeletalAnimation
- All Implemented Interfaces:
ConstJoltPhysicsObject,RefTarget,AutoCloseable,Comparable<JoltPhysicsObject>
A skeletal animation for skinning.
-
Method Summary
Modifier and TypeMethodDescriptionfloatReturn the duration of the animation.intCount the active references to the nativeSkeletalAnimation.voidsample(float time, SkeletonPose storePose) Interpolate the joint transforms for the specified animation time.voidMark the nativeSkeletalAnimationas embedded.toRef()Create a counted reference to the nativeSkeletalAnimation.Methods inherited from class com.github.stephengold.joltjni.JoltPhysicsObject
close, compareTo, equals, getContainingObject, hasAssignedNativeObject, hashCode, isCleanerStarted, ownsNativeObject, setVirtualAddress, setVirtualAddress, startCleaner, targetVa, toString, va
-
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)
-
getRefCount
public int getRefCount()Count the active references to the nativeSkeletalAnimation. The animation is unaffected.- Specified by:
getRefCountin interfaceRefTarget- Returns:
- the count (≥0)
-
setEmbedded
public void setEmbedded()Mark the nativeSkeletalAnimationas embedded.- Specified by:
setEmbeddedin interfaceRefTarget
-
toRef
Create a counted reference to the nativeSkeletalAnimation.
-