Interface ConstSkeleton
- All Superinterfaces:
AutoCloseable,Comparable<JoltPhysicsObject>,ConstJoltPhysicsObject
- All Known Implementing Classes:
Skeleton,SkeletonRef
Read-only access to a
Skeleton. (native type: const Skeleton)-
Method Summary
Modifier and TypeMethodDescriptionbooleanTest whether the joints are correctly ordered, parents before children.getJoint(int jointIndex) Access the specified joint.intCount how many joints are in the skeleton.intgetJointIndex(String name) Find the index of the named joint.Access all the joints.voidsaveBinaryState(StreamOut stream) Save the skeleton to the specified binary stream.Methods inherited from interface java.lang.Comparable
compareToMethods inherited from interface com.github.stephengold.joltjni.readonly.ConstJoltPhysicsObject
close, hasAssignedNativeObject, ownsNativeObject, targetVa
-
Method Details
-
areJointsCorrectlyOrdered
boolean areJointsCorrectlyOrdered()Test whether the joints are correctly ordered, parents before children.- Returns:
trueif in order, otherwisefalse
-
getJoint
Access the specified joint.- Parameters:
jointIndex- the index of the joint to access (≥0)- Returns:
- a new JVM object with the pre-existing native object assigned
-
getJointCount
int getJointCount()Count how many joints are in the skeleton.- Returns:
- the count (≥0)
-
getJointIndex
Find the index of the named joint.- Parameters:
name- the name of the joint to find- Returns:
- the joint's index
-
getJoints
ConstJoint[] getJoints()Access all the joints.- Returns:
- a new array of new JVM objects with the pre-existing native objects assigned
-
saveBinaryState
Save the skeleton to the specified binary stream.- Parameters:
stream- the stream to write to (not null)
-