Jolt Physics
A multi core friendly Game Physics Engine
|
ID of a character. Used primarily to identify deleted characters and to sort deterministically. More...
#include <CharacterID.h>
Public Member Functions | |
CharacterID () | |
Construct invalid character ID. | |
CharacterID (uint32 inID) | |
Construct from index and sequence number combined in a single uint32 (use with care!) | |
uint32 | GetValue () const |
bool | IsInvalid () const |
Check if the ID is valid. | |
bool | operator== (const CharacterID &inRHS) const |
Equals check. | |
bool | operator!= (const CharacterID &inRHS) const |
Not equals check. | |
bool | operator< (const CharacterID &inRHS) const |
Smaller than operator, can be used for sorting characters. | |
bool | operator> (const CharacterID &inRHS) const |
Greater than operator, can be used for sorting characters. | |
uint64 | GetHash () const |
Get the hash for this character ID. | |
Static Public Member Functions | |
static CharacterID | sNextCharacterID () |
Generate the next available character ID. | |
static void | sSetNextCharacterID (uint32 inNextValue=1) |
Set the next available character ID, can be used after destroying all character to prepare for a second deterministic run. | |
Static Public Attributes | |
static JPH_OVERRIDE_NEW_DELETE constexpr uint32 | cInvalidCharacterID = 0xffffffff |
The value for an invalid character ID. | |
ID of a character. Used primarily to identify deleted characters and to sort deterministically.
|
inline |
Construct invalid character ID.
|
inlineexplicit |
Construct from index and sequence number combined in a single uint32 (use with care!)
|
inline |
Get the hash for this character ID.
|
inline |
|
inline |
Check if the ID is valid.
|
inline |
Not equals check.
|
inline |
Smaller than operator, can be used for sorting characters.
|
inline |
Equals check.
|
inline |
Greater than operator, can be used for sorting characters.
|
inlinestatic |
Generate the next available character ID.
|
inlinestatic |
Set the next available character ID, can be used after destroying all character to prepare for a second deterministic run.
|
staticconstexpr |
The value for an invalid character ID.