Interface ConstBodyLockInterface

All Superinterfaces:
Comparable<JoltPhysicsObject>, ConstJoltPhysicsObject
All Known Subinterfaces:
ConstBodyLockInterfaceLocking, ConstBodyLockInterfaceNoLock
All Known Implementing Classes:
BodyLockInterface, BodyLockInterfaceLocking, BodyLockInterfaceNoLock

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

    • getSystem

      PhysicsSystem getSystem()
      Access the underlying PhysicsSystem.
      Returns:
      the pre-existing instance
    • lockRead

      SharedMutex lockRead(int bodyId)
      Lock the specified body for reading.
      Parameters:
      bodyId - the ID of the body to read
      Returns:
      a new mutex
    • lockWrite

      SharedMutex lockWrite(int bodyId)
      Lock the specified body for writing.
      Parameters:
      bodyId - the ID of the body to write
      Returns:
      a new mutex
    • unlockRead

      void unlockRead(SharedMutex mutex)
      Unlock the specified mutex, which was created to read a body.
      Parameters:
      mutex - the mutex to unlock (not null)
    • unlockWrite

      void unlockWrite(SharedMutex mutex)
      Unlock the specified mutex, which was created to write a body.
      Parameters:
      mutex - the mutex to unlock (not null)