![]() |
Gaia-ECS v0.9.3
A simple and powerful entity component system
|
Iterator for iterating both enabled and disabled entities. Disabled entities always precede enabled ones. More...
#include <chunk_iterator.h>
Inheritance diagram for gaia::ecs::IterAll:Public Member Functions | |
| GAIA_NODISCARD uint16_t | size_enabled () const noexcept |
| Returns the number of enabled entities accessible via the iterator. | |
| GAIA_NODISCARD uint16_t | size_disabled () const noexcept |
| Returns the number of disabled entities accessible via the iterator. Can be read also as "the index of the first enabled entity". | |
Public Member Functions inherited from gaia::ecs::detail::ChunkIterImpl< Constraints::AcceptAll > | |
| ChunkIterImpl (ChunkIterImpl &&) noexcept=default | |
| ChunkIterImpl (const ChunkIterImpl &)=delete | |
| ChunkIterImpl & | operator= (ChunkIterImpl &&) noexcept=default |
| ChunkIterImpl & | operator= (const ChunkIterImpl &)=delete |
| void | set_world (const World *pWorld) |
| GAIA_NODISCARD World * | world () |
| GAIA_NODISCARD const World * | world () const |
| void | set_archetype (const Archetype *pArchetype) |
| GAIA_NODISCARD const Archetype * | archetype () const |
| void | set_chunk (Chunk *pChunk) |
| void | set_chunk (Chunk *pChunk, uint16_t from, uint16_t to) |
| GAIA_NODISCARD const Chunk * | chunk () const |
| void | set_remapping_indices (const uint8_t *pCompIndicesMapping) |
| void | set_group_id (GroupId groupId) |
| GAIA_NODISCARD GroupId | group_id () const |
| GAIA_NODISCARD CommandBufferST & | cmd_buffer_st () const |
| GAIA_NODISCARD CommandBufferMT & | cmd_buffer_mt () const |
| GAIA_NODISCARD auto | view () const |
| Returns a read-only entity or component view. | |
| GAIA_NODISCARD auto | view (uint32_t termIdx) |
| GAIA_NODISCARD auto | view_mut () |
| Returns a mutable entity or component view. | |
| GAIA_NODISCARD auto | view_mut (uint32_t termIdx) |
| GAIA_NODISCARD auto | sview_mut () |
| Returns a mutable component view. Doesn't update the world version when the access is acquired. | |
| GAIA_NODISCARD auto | sview_mut (uint32_t termIdx) |
| void | modify () |
| Marks the component T as modified. Best used with sview to manually trigger an update at user's whim. If. | |
| GAIA_NODISCARD auto | view_auto () |
| Returns either a mutable or immutable entity/component view based on the requested type. Value and const types are considered immutable. Anything else is mutable. | |
| GAIA_NODISCARD auto | sview_auto () |
| Returns either a mutable or immutable entity/component view based on the requested type. Value and const types are considered immutable. Anything else is mutable. Doesn't update the world version when read-write access is acquired. | |
| GAIA_NODISCARD bool | enabled (uint32_t index) const |
| Checks if the entity at the current iterator index is enabled. | |
| GAIA_NODISCARD bool | has (Entity entity) const |
| Checks if entity entity is present in the chunk. | |
| GAIA_NODISCARD bool | has (Pair pair) const |
| Checks if relationship pair pair is present in the chunk. | |
| GAIA_NODISCARD bool | has () const |
| Checks if component T is present in the chunk. | |
| GAIA_NODISCARD uint16_t | size () const noexcept |
| Returns the number of entities accessible via the iterator. | |
| uint32_t | acc_index (uint32_t idx) const noexcept |
| Returns the absolute index that should be used to access an item in the chunk. AoS indices map directly, SoA indices need some adjustments because the view is always considered {0..ChunkCapacity} instead of {FirstEnabled..ChunkSize}. | |
Additional Inherited Members | |
Static Public Member Functions inherited from gaia::ecs::detail::ChunkIterImpl< Constraints::AcceptAll > | |
| static GAIA_NODISCARD uint16_t | start_index (Chunk *pChunk) noexcept |
| static GAIA_NODISCARD uint16_t | end_index (Chunk *pChunk) noexcept |
| static GAIA_NODISCARD uint16_t | size (Chunk *pChunk) noexcept |
Protected Types inherited from gaia::ecs::detail::ChunkIterImpl< Constraints::AcceptAll > | |
| using | CompIndicesBitView = core::bit_view< ChunkHeader::MAX_COMPONENTS_BITS > |
Protected Member Functions inherited from gaia::ecs::detail::ChunkIterImpl< Constraints::AcceptAll > | |
| GAIA_NODISCARD uint16_t | from () const noexcept |
| Returns the starting index of the iterator. | |
| GAIA_NODISCARD uint16_t | to () const noexcept |
| Returns the ending index of the iterator (one past the last valid index) | |
Protected Attributes inherited from gaia::ecs::detail::ChunkIterImpl< Constraints::AcceptAll > | |
| const World * | m_pWorld |
| World pointer. | |
| const Archetype * | m_pArchetype |
| Currently iterated archetype. | |
| Chunk * | m_pChunk |
| Chunk currently associated with the iterator. | |
| const uint8_t * | m_pCompIdxMapping |
| ChunkHeader::MAX_COMPONENTS values for component indices mapping for the parent archetype. | |
| uint16_t | m_from |
| Row of the first entity we iterate from. | |
| uint16_t | m_to |
| Row of the last entity we iterate to. | |
| GroupId | m_groupId |
| GroupId. 0 if not set. | |
Iterator for iterating both enabled and disabled entities. Disabled entities always precede enabled ones.