37 mID((
uint32(inSequenceNumber) << 24) | inID)
54 return uint8(mID >> 24);
72 return mID == inRHS.mID;
78 return mID != inRHS.mID;
84 return mID < inRHS.mID;
90 return mID > inRHS.mID;
std::uint8_t uint8
Definition Core.h:454
#define JPH_NAMESPACE_END
Definition Core.h:379
std::uint32_t uint32
Definition Core.h:456
#define JPH_NAMESPACE_BEGIN
Definition Core.h:373
#define JPH_MAKE_HASHABLE(type,...)
Definition HashCombine.h:191
#define JPH_ASSERT(...)
Definition IssueReporting.h:33
#define JPH_OVERRIDE_NEW_DELETE
Macro to override the new and delete functions.
Definition Memory.h:31
ID of a body. This is a way of reasoning about bodies in a multithreaded simulation while avoiding ra...
Definition BodyID.h:13
bool IsInvalid() const
Check if the ID is valid.
Definition BodyID.h:64
bool operator<(const BodyID &inRHS) const
Smaller than operator, can be used for sorting bodies.
Definition BodyID.h:82
BodyID()
Construct invalid body ID.
Definition BodyID.h:23
BodyID(uint32 inID)
Construct from index and sequence number combined in a single uint32 (use with care!...
Definition BodyID.h:29
BodyID(uint32 inID, uint8 inSequenceNumber)
Construct from index and sequence number.
Definition BodyID.h:36
bool operator==(const BodyID &inRHS) const
Equals check.
Definition BodyID.h:70
bool operator!=(const BodyID &inRHS) const
Not equals check.
Definition BodyID.h:76
static constexpr uint32 cMaxBodyIndex
Maximum value for body index (also the maximum amount of bodies supported - 1)
Definition BodyID.h:19
static constexpr uint32 cBroadPhaseBit
This bit is used by the broadphase.
Definition BodyID.h:18
bool operator>(const BodyID &inRHS) const
Greater than operator, can be used for sorting bodies.
Definition BodyID.h:88
uint32 GetIndexAndSequenceNumber() const
Returns the index and sequence number combined in an uint32.
Definition BodyID.h:58
static constexpr uint8 cMaxSequenceNumber
Maximum value for the sequence number.
Definition BodyID.h:20
uint32 GetIndex() const
Get index in body array.
Definition BodyID.h:43
uint8 GetSequenceNumber() const
Definition BodyID.h:52
static JPH_OVERRIDE_NEW_DELETE constexpr uint32 cInvalidBodyID
The value for an invalid body ID.
Definition BodyID.h:17