Class RagdollSettingsRef

All Implemented Interfaces:
ConstJoltPhysicsObject, AutoCloseable, Comparable<ConstJoltPhysicsObject>

public final class RagdollSettingsRef extends Ref
A counted reference to a RagdollSettings object. (native type: Ref<RagdollSettings>)
  • Constructor Details

    • RagdollSettingsRef

      public RagdollSettingsRef()
      Instantiate an empty reference.
  • Method Details

    • calculateBodyIndexToConstraintIndex

      public void calculateBodyIndexToConstraintIndex()
      Pre-calculate the map used by getBodyIndexToConstraintIndex().
    • calculateConstraintIndexToBodyIdxPair

      public void calculateConstraintIndexToBodyIdxPair()
      Pre-calculate the map used by getConstraintIndexToBodyIdxPair().
    • createRagdoll

      public 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
    • getParts

      public Part[] getParts()
      Access the parts by way of a Java array. (native attribute: mParts)
      Returns:
      a new array of new JVM objects with pre-existing native objects assigned
    • getSkeleton

      public Skeleton getSkeleton()
      Access the skeleton. (native attribute: mSkeleton)
      Returns:
      a new JVM object with the pre-existing native object assigned
    • stabilize

      public boolean stabilize()
      Stabilize the constraints.
      Returns:
      true if successful, otherwise false
    • getPtr

      public RagdollSettings getPtr()
      Temporarily access the referenced RagdollSettings.
      Specified by:
      getPtr in class Ref
      Returns:
      a new JVM object that refers to the pre-existing native object
    • toRef

      public RagdollSettingsRef toRef()
      Create a counted reference to the native RagdollSettingsRef.
      Specified by:
      toRef in class Ref
      Returns:
      a new JVM object with a new native object assigned