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 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
BodyManager::MutexMask MutexMask
Redefine MutexMask.
Definition BodyLockInterface.h:20
virtual void UnlockWrite(SharedMutex *inMutex) const =0
Base class for locking multiple bodies for the duration of the scope of this class (do not use direct...
Definition BodyLockMulti.h:14
BodyType * GetBody(int inBodyIndex) const
Access the body (returns null if body was not properly locked)
Definition BodyLockMulti.h:49
~BodyLockMultiBase()
Destructor will unlock the bodies.
Definition BodyLockMulti.h:37
BodyLockMultiBase(const BodyLockInterface &inBodyLockInterface, const BodyID *inBodyIDs, int inNumber)
Constructor will lock the bodies.
Definition BodyLockMulti.h:20
BodyLockInterface::MutexMask MutexMask
Redefine MutexMask.
Definition BodyLockMulti.h:17
Definition BodyLockMulti.h:94
Specialization that locks multiple bodies for writing to.
Definition BodyLockMulti.h:100