Interface ConstRagdollSettings
- All Superinterfaces:
AutoCloseable,Comparable<JoltPhysicsObject>,ConstJoltPhysicsObject
- All Known Implementing Classes:
RagdollSettings,RagdollSettingsRef
Read-only access to a
RagdollSettings object. (native type: const
RagdollSettings)-
Method Summary
Modifier and TypeMethodDescriptioncreateRagdoll(int groupId, long userData, PhysicsSystem physicsSystem) Generate a ragdoll instance from the settings, which are unaffected.getBodyIndicesForConstraintIndex(int constraintIndex) Access the body-index pair for the specified constraint.intgetConstraintIndexForBodyIndex(int bodyIndex) Return the index of the constraint upstream from the specified body.intCount the parts.getPart(int index) Access the part for the specified index.Access the skeleton.voidsaveBinaryState(StreamOut stream, boolean saveShapes, boolean saveGroupFilter) Save the settings 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, targetVaOrZero
-
Method Details
-
createRagdoll
Generate a ragdoll instance from the settings, which are unaffected.- Parameters:
groupId- the collision group for the bodiesuserData- the desired user-data valuephysicsSystem- where to add the bodies and constraints (notnull, modified)- Returns:
- a new ragdoll instance, or
nullwhen out of bodies
-
getBodyIndicesForConstraintIndex
Access the body-index pair for the specified constraint.- Parameters:
constraintIndex- the index of the constraint (≥0)- Returns:
- a new JVM object with the pre-existing native object assigned
-
getConstraintIndexForBodyIndex
int getConstraintIndexForBodyIndex(int bodyIndex) Return the index of the constraint upstream from the specified body. The settings are unaffected.- Parameters:
bodyIndex- index of the body in the ragdoll (≥0)- Returns:
- the constraint index
-
getNumParts
int getNumParts()Count the parts. The settings are unaffected.- Returns:
- the count (≥0)
-
getPart
Access the part for the specified index.- Parameters:
index- index of the part (≥0)- Returns:
- a new JVM object with pre-existing native object assigned
-
getSkeleton
ConstSkeleton getSkeleton()Access the skeleton.- Returns:
- a new JVM object with the pre-existing native object assigned
-
saveBinaryState
Save the settings to the specified binary stream. The settings are unaffected.- Parameters:
stream- the stream to write to (notnull)saveShapes- if true, save the shapessaveGroupFilter- if true, save the group filter
-