java.lang.Object
com.github.stephengold.joltjni.JoltPhysicsObject
com.github.stephengold.joltjni.SkeletonPose
- All Implemented Interfaces:
ConstJoltPhysicsObject,ConstSkeletonPose,AutoCloseable,Comparable<JoltPhysicsObject>
A skeleton with joint transforms specifying a pose.
-
Constructor Summary
ConstructorsConstructorDescriptionInstantiate a default pose.SkeletonPose(ConstSkeletonPose original) Instantiate a clone of the specified pose. -
Method Summary
Modifier and TypeMethodDescriptionvoidConvert the joint transforms to matrices.voidConvert the joint matrices to joint states.voidcalculateLocalSpaceJointMatrices(Mat44Array storeMatrices) Calculate the joint matrices in local space.voiddraw(SkeletonPoseDrawSettings settings, DebugRenderer renderer) Draw the current pose using the specified settings and renderer.voiddraw(SkeletonPoseDrawSettings settings, DebugRenderer renderer, RMat44Arg transform) Draw the current pose using the specified settings and renderer.getJoint(int jointIndex) Access the transforms of the specified joint.intCount how many joints are in the pose.Access the joint matrices.getJointMatrix(int jointIndex) Access the transform matrix for the specified joint.Copy the root offset.Access the skeleton that underlies this pose.voidsetRootOffset(RVec3Arg offset) Alter the root offset.voidsetSkeleton(ConstSkeleton skeleton) Replace the skeleton.Methods inherited from class com.github.stephengold.joltjni.JoltPhysicsObject
close, compareTo, equals, getContainingObject, hasAssignedNativeObject, hashCode, isCleanerStarted, ownsNativeObject, setVirtualAddress, setVirtualAddress, startCleaner, targetVa, toString, vaMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Comparable
compareToMethods inherited from interface com.github.stephengold.joltjni.readonly.ConstJoltPhysicsObject
close, hasAssignedNativeObject, ownsNativeObject, targetVa
-
Constructor Details
-
SkeletonPose
public SkeletonPose()Instantiate a default pose. -
SkeletonPose
Instantiate a clone of the specified pose.- Parameters:
original- the pose to clone (not null, unaffected)
-
-
Method Details
-
calculateJointMatrices
public void calculateJointMatrices()Convert the joint transforms to matrices. -
calculateJointStates
public void calculateJointStates()Convert the joint matrices to joint states. -
getJointMatrices
Access the joint matrices.- Returns:
- a new JVM object with the pre-existing native object assigned
-
setRootOffset
Alter the root offset.- Parameters:
offset- the desired offset (notnull, unaffected)
-
setSkeleton
Replace the skeleton.- Parameters:
skeleton- the desired skeleton (notnull)
-
calculateLocalSpaceJointMatrices
Calculate the joint matrices in local space. The pose is unaffected.- Specified by:
calculateLocalSpaceJointMatricesin interfaceConstSkeletonPose- Parameters:
storeMatrices- storage for the matrices (notnull, modified)
-
draw
Draw the current pose using the specified settings and renderer. The pose is unaffected.- Specified by:
drawin interfaceConstSkeletonPose- Parameters:
settings- the desired settings (notnull, unaffected)renderer- the renderer to use (notnull)
-
draw
Draw the current pose using the specified settings and renderer. The pose is unaffected.- Specified by:
drawin interfaceConstSkeletonPose- Parameters:
settings- the desired settings (notnull, unaffected)renderer- the renderer to use (notnull)transform- the transform to apply (notnull, unaffected, default=Identity)
-
getJoint
Access the transforms of the specified joint. The pose is unaffected.- Specified by:
getJointin interfaceConstSkeletonPose- Parameters:
jointIndex- the index of the joint to access- Returns:
- a new JVM object with the pre-existing native object assigned
-
getJointCount
public int getJointCount()Count how many joints are in the pose. The pose is unaffected.- Specified by:
getJointCountin interfaceConstSkeletonPose- Returns:
- the count (≥0)
-
getJointMatrix
Access the transform matrix for the specified joint. The pose is unaffected.- Specified by:
getJointMatrixin interfaceConstSkeletonPose- Parameters:
jointIndex- which joint (≥0)- Returns:
- a new JVM object with the pre-existing native object assigned
-
getRootOffset
Copy the root offset. The pose is unaffected.- Specified by:
getRootOffsetin interfaceConstSkeletonPose- Returns:
- a new vector
-
getSkeleton
Access the skeleton that underlies this pose. The pose is unaffected.- Specified by:
getSkeletonin interfaceConstSkeletonPose- Returns:
- a new JVM object with the pre-existing native object assigned
-