Interface ConstSkeleton
- All Superinterfaces:
Comparable<JoltPhysicsObject>
,ConstJoltPhysicsObject
- All Known Implementing Classes:
Skeleton
,SkeletonRef
Read-only access to a
Skeleton
. (native type: const Skeleton)-
Method Summary
Modifier and TypeMethodDescriptionboolean
Test whether the joints are correctly ordered, parents before children.getJoint
(int jointIndex) Access the specified joint.int
Count how many joints are in the skeleton.int
getJointIndex
(String name) Find the index of the named joint.Access all the joints.void
saveBinaryState
(StreamOut stream) Save the skeleton to the specified binary stream.Methods inherited from interface java.lang.Comparable
compareTo
Methods 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:
true
if 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)
-