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 TypeMethodDescriptionfloat
Return the duration of the animation.int
Count the active references to the nativeSkeletalAnimation
.void
sample
(float time, SkeletonPose storePose) Interpolate the joint transforms for the specified animation time.void
Mark the nativeSkeletalAnimation
as embedded.toRef()
Create a counted reference to the nativeSkeletalAnimation
.Methods inherited from class com.github.stephengold.joltjni.JoltPhysicsObject
close, compareTo, equals, getContainingObject, hasAssignedNativeObject, hashCode, 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:
getRefCount
in interfaceRefTarget
- Returns:
- the count (≥0)
-
setEmbedded
public void setEmbedded()Mark the nativeSkeletalAnimation
as embedded.- Specified by:
setEmbedded
in interfaceRefTarget
-
toRef
Create a counted reference to the nativeSkeletalAnimation
.
-