Lightweight identifier representing a game object in the Entity Component System.
More...
#include <Entity.hpp>
|
| using | IdType = std::uint32_t |
| | Numeric type of the entity identifier.
|
Lightweight identifier representing a game object in the Entity Component System.
◆ IdType
Numeric type of the entity identifier.
◆ Entity() [1/2]
Construct a new, invalid Entity object.
◆ Entity() [2/2]
Construct a new Entity object with a given ID.
- Parameters
-
| i | The identifier for the entity. |
◆ getId()
| IdType Entity::getId |
( |
| ) |
const |
|
inline |
Retrieve the raw identifier of the entity.
- Returns
- The raw ID.
◆ operator!=()
| bool Entity::operator!= |
( |
const Entity & | other | ) |
const |
|
inline |
Check inequality with another entity.
- Parameters
-
| other | The entity to compare with. |
- Returns
- True if IDs differ, false otherwise.
◆ operator==()
| bool Entity::operator== |
( |
const Entity & | other | ) |
const |
|
inline |
Check equality with another entity.
- Parameters
-
| other | The entity to compare with. |
- Returns
- True if IDs are identical, false otherwise.
◆ id
Unique numeric identifier.
◆ INVALID_ENTITY
| IdType Entity::INVALID_ENTITY = std::numeric_limits<IdType>::max() |
|
staticconstexpr |
Constant representing a null or invalid entity.
The documentation for this class was generated from the following file: