|
|
| world () noexcept |
| | Default constructor.
|
|
constexpr | world (const world &) noexcept=delete |
| | Deleted copy constructor.
|
| | world (world &&other) noexcept |
| | Move constructor.
|
|
constexpr auto | operator= (const world &) noexcept -> world &=delete |
| | Deleted copy assignment operator.
|
| auto | operator= (world &&other) noexcept -> world & |
| | Move assignment operator.
|
|
| ~world () noexcept |
| | Destructor.
|
| template<typename ... T> |
| constexpr auto | spawn (T &&...components) noexcept |
| | Spawns an entity with the provided components.
|
template<typename ... T>
requires (static_cast<bool>(sizeof...(T))) |
| constexpr auto | insert (const std::uint32_t entity, T &&...components) noexcept -> std::expected< void, std::tuple< T... > > |
| | Adds the provided components to an entity.
|
| auto | size () const noexcept -> std::size_t |
| | Returns the number of entities.
|
| auto | spawning (std::uint32_t entity) const noexcept -> bool |
| | Evaluates whether an entity will be spawned.
|
| auto | contains (std::uint32_t entity) const noexcept -> bool |
| | Evaluates whether an entity exists.
|
| auto | despawning (std::uint32_t entity) const noexcept -> bool |
| | Evaluates whether an entity will be despawned.
|
template<typename ... T>
requires (static_cast<bool>(sizeof...(T))) |
| constexpr auto | contains (const std::uint32_t entity) const noexcept |
| | Evaluates whether an entity has the specified components.
|
| auto | at (std::uint32_t entity) const noexcept -> const archetype * |
| | Returns a pointer to the archetype of an entity.
|
template<typename ... T>
requires (static_cast<bool>(sizeof...(T))) |
| constexpr auto | at (const std::uint32_t entity) const noexcept |
| | Returns a tuple of pointers to the specified components of an entity.
|
template<typename ... T>
requires (static_cast<bool>(sizeof...(T))) |
| constexpr auto | at (const std::uint32_t entity) noexcept |
| | Returns a tuple of pointers to the specified components of an entity.
|
| auto | operator[] (std::uint32_t entity) const noexcept -> const archetype & |
| | Returns a reference to the archetype of an entity.
|
template<typename ... T>
requires (static_cast<bool>(sizeof...(T))) |
| constexpr auto | operator[] (const std::uint32_t entity) const noexcept |
| | Returns a tuple of references to the specified components of an entity.
|
template<typename ... T>
requires (static_cast<bool>(sizeof...(T))) |
| constexpr auto | operator[] (const std::uint32_t entity) noexcept |
| | Returns a tuple of references to the specified components of an entity.
|
| constexpr auto | query () noexcept |
| | Returns a view to all entities with their archetypes.
|
| template<typename T> |
| constexpr auto | query () noexcept |
| | Returns a view to entities with the specified components.
|
template<typename ... T>
requires (1 < sizeof...(T)) |
| constexpr auto | query () noexcept |
| | Returns a view to entities with the specified components.
|
template<typename ... T>
requires (static_cast<bool>(sizeof...(T))) |
| constexpr void | erase (const std::uint32_t entity) noexcept |
| | Removes the specified components from an entity.
|
| void | despawn (std::uint32_t entity) noexcept |
| | Despawns an entity.
|
| void | clear () noexcept |
| | Despawns all entities.
|
Stores and exposes operations on entities and components.
- Examples
- examples/example.cpp.