ID of a body. This is a way of reasoning about bodies in a multithreaded simulation while avoiding ra...
Definition BodyID.h:13
Base class for locking bodies for the duration of the scope of this class (do not use directly)
Definition BodyLock.h:14
~BodyLockBase()
Destructor will unlock the body.
Definition BodyLock.h:52
BodyLockBase(const BodyLockInterface &inBodyLockInterface, const BodyID &inBodyID)
Constructor will lock the body.
Definition BodyLock.h:17
bool Succeeded() const
Test if the lock was successful (if the body ID was valid)
Definition BodyLock.h:58
bool SucceededAndIsInBroadPhase() const
Test if the lock was successful (if the body ID was valid) and the body is still in the broad phase.
Definition BodyLock.h:64
BodyType & GetBody() const
Access the body.
Definition BodyLock.h:70
void ReleaseLock()
Explicitly release the lock (normally this is done in the destructor)
Definition BodyLock.h:37
Base class interface for locking a body. Usually you will use BodyLockRead / BodyLockWrite / BodyLock...
Definition BodyLockInterface.h:17
virtual void UnlockRead(SharedMutex *inMutex) const =0
Body * TryGetBody(const BodyID &inBodyID) const
Convert body ID to body.
Definition BodyLockInterface.h:50
virtual void UnlockWrite(SharedMutex *inMutex) const =0
virtual SharedMutex * LockRead(const BodyID &inBodyID) const =0
virtual SharedMutex * LockWrite(const BodyID &inBodyID) const =0
Definition BodyLock.h:101
Specialization that locks a body for writing to.
Definition BodyLock.h:107