Interface ConstRagdollSettings

All Superinterfaces:
AutoCloseable, Comparable<JoltPhysicsObject>, ConstJoltPhysicsObject
All Known Implementing Classes:
RagdollSettings, RagdollSettingsRef

public interface ConstRagdollSettings extends ConstJoltPhysicsObject
Read-only access to a RagdollSettings object. (native type: const RagdollSettings)
  • Method Details

    • createRagdoll

      Ragdoll createRagdoll(int groupId, long userData, PhysicsSystem physicsSystem)
      Generate a ragdoll instance from the settings, which are unaffected.
      Parameters:
      groupId - the collision group for the bodies
      userData - the desired user-data value
      physicsSystem - where to add the bodies and constraints (not null, modified)
      Returns:
      a new ragdoll instance, or null when out of bodies
    • getBodyIndicesForConstraintIndex

      IntPair getBodyIndicesForConstraintIndex(int constraintIndex)
      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

      ConstPart getPart(int index)
      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

      void saveBinaryState(StreamOut stream, boolean saveShapes, boolean saveGroupFilter)
      Save the settings to the specified binary stream. The settings are unaffected.
      Parameters:
      stream - the stream to write to (not null)
      saveShapes - if true, save the shapes
      saveGroupFilter - if true, save the group filter