Class BodyLockMultiBase

All Implemented Interfaces:
ConstJoltPhysicsObject, AutoCloseable, Comparable<JoltPhysicsObject>
Direct Known Subclasses:
BodyLockMultiRead, BodyLockMultiWrite

public abstract class BodyLockMultiBase extends NonCopyable
Lock multiple bodies.
  • Method Details

    • getBodies

      public abstract ConstBody[] getBodies()
      Access all the bodies.
      Returns:
      a new array
    • getBody

      public abstract ConstBody getBody(int index)
      Access a specific body.
      Parameters:
      index - into the array of body IDs (≥0)
      Returns:
      a new JVM object with the pre-existing native object assigned, or null if not available
    • getNumBodies

      public abstract int getNumBodies()
      Count the bodies that were locked.
      Returns:
      the number of bodies (≥0)
    • releaseLocks

      public abstract void releaseLocks()
      Release all the locks.