|
Potato Engine
Hobby Game Engine Project
|
A Query is used to select a list of Archetypes that provide a particular set of Components, used to efficiency enumerate all matching Entities. More...
#include <query.h>
Public Types | |
| using | Function = void(size_t, EntityId const *, Components *...) |
| using | Delegate = delegate_ref< Function > |
Public Member Functions | |
| Query () noexcept | |
| Constructs a new Query object. More... | |
| view< ComponentId > | components () const noexcept |
| Fetches the sorted list of ComponentIds required by this Query. | |
| void | select (World &world, Delegate callback) const |
| Given a World and a callback, finds all matching Archetypes, and invokes the callback once for each Chunk belonging to the Archetypes, with appropriate pointers. More... | |
A Query is used to select a list of Archetypes that provide a particular set of Components, used to efficiency enumerate all matching Entities.
| void up::Query< Components >::select | ( | World & | world, |
| Delegate | callback | ||
| ) | const |
Given a World and a callback, finds all matching Archetypes, and invokes the callback once for each Chunk belonging to the Archetypes, with appropriate pointers.
This is the primary mechanism for finding or mutating Entities.
1.8.13