Identifier of an entity or component instance in the world. Packs the entity index, generation, kind and flags into one 64-bit value.
More...
|
|
template<typename T , typename = std::enable_if_t<std::is_same_v<T, Identifier>>> |
| constexpr | Entity (T value) noexcept |
| | We need the entity to be braces-constructible and at the same type prevent it from getting constructed accidentally from an int (e.g .Entity::id()). Therefore, only allow Entity(Identifier) to be used.
|
| |
|
| Entity (EntityId id, IdentifierData gen) noexcept |
| | Special constructor for cnt::ilist.
|
| |
|
| Entity (EntityId id, IdentifierData gen, bool isEntity, bool isPair, EntityKind kind) noexcept |
| |
| GAIA_NODISCARD constexpr auto | id () const noexcept |
| | Entity index in the entity array.
|
| |
| GAIA_NODISCARD constexpr auto | gen () const noexcept |
| | Generation index of the entity.
|
| |
| GAIA_NODISCARD constexpr bool | entity () const noexcept |
| | Whether this id refers to an entity.
|
| |
| GAIA_NODISCARD constexpr bool | pair () const noexcept |
| | Whether this id refers to a relationship pair.
|
| |
| GAIA_NODISCARD constexpr bool | comp () const noexcept |
| | Whether this id refers to a component.
|
| |
| GAIA_NODISCARD constexpr auto | kind () const noexcept |
| | Entity kind of this id.
|
| |
| GAIA_NODISCARD constexpr auto | value () const noexcept |
| | Raw identifier value.
|
| |
|
GAIA_NODISCARD constexpr bool | operator== (Entity other) const noexcept |
| |
|
GAIA_NODISCARD constexpr bool | operator!= (Entity other) const noexcept |
| |
|
GAIA_NODISCARD constexpr bool | operator< (Entity other) const noexcept |
| |
|
GAIA_NODISCARD constexpr bool | operator<= (Entity other) const noexcept |
| |
|
GAIA_NODISCARD constexpr bool | operator> (Entity other) const noexcept |
| |
|
GAIA_NODISCARD constexpr bool | operator>= (Entity other) const noexcept |
| |
| template<typename Serializer > |
| void | save (Serializer &s) const |
| | Serializes the entity id.
|
| |
| template<typename Serializer > |
| void | load (Serializer &s) |
| | Deserializes the entity id, remapping it to the current world.
|
| |
Identifier of an entity or component instance in the world. Packs the entity index, generation, kind and flags into one 64-bit value.