33 static_assert(
sizeof(
BiggerType) >
sizeof(
Type),
"The calculation below assumes BiggerType is a bigger type than Type");
46 Type v = mValue & mask_bits;
67 return mValue == cEmpty;
73 return mValue == inRHS.mValue;
79 return mValue != inRHS.mValue;
99 mValue |= inValue << inFirstBit;
102 Type mValue = cEmpty;
115 copy.mID.PushID(inValue, mCurrentBit, inBits);
116 copy.mCurrentBit += inBits;
135 uint mCurrentBit = 0;
std::uint64_t uint64
Definition Core.h:457
unsigned int uint
Definition Core.h:453
#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_ASSERT(...)
Definition IssueReporting.h:33
#define JPH_OVERRIDE_NEW_DELETE
Macro to override the new and delete functions.
Definition Memory.h:31
Definition SubShapeID.h:108
SubShapeIDCreator PushID(uint inValue, uint inBits) const
Add a new id to the chain of id's and return it.
Definition SubShapeID.h:111
const SubShapeID & GetID() const
Definition SubShapeID.h:122
uint GetNumBitsWritten() const
Get the number of bits that have been written to the sub shape ID so far.
Definition SubShapeID.h:128
A sub shape id contains a path to an element (usually a triangle or other primitive type) of a compou...
Definition SubShapeID.h:23
bool operator==(const SubShapeID &inRHS) const
Check equal.
Definition SubShapeID.h:71
bool operator!=(const SubShapeID &inRHS) const
Check not-equal.
Definition SubShapeID.h:77
void SetValue(Type inValue)
Set the value of the sub shape ID (use with care!)
Definition SubShapeID.h:58
uint32 Type
Underlying storage type.
Definition SubShapeID.h:28
bool IsEmpty() const
Definition SubShapeID.h:65
static constexpr uint MaxBits
How many bits we can store in this ID.
Definition SubShapeID.h:36
Type PopID(uint inBits, SubShapeID &outRemainder) const
Get the next id in the chain of ids (pops parents before children)
Definition SubShapeID.h:42
Type GetValue() const
Get the value of the path to the sub shape ID.
Definition SubShapeID.h:52
SubShapeID()=default
Constructor.
uint64 BiggerType
Type that is bigger than the underlying storage type for operations that would otherwise overflow.
Definition SubShapeID.h:31