A wrapper for an EnTT compile-time view that provides an iterator to access Entity instances directly.
More...
#include <EntityView.hpp>
|
| | StaticEntityView (View view, entt::registry ®istry) |
| template<typename... T> |
| decltype(auto) | Get (Entity entity) |
| | Retries the components from an entity, both the components and the entity should be in a view, faster than GetComponents.
|
| template<typename T> |
| size_t | Size () |
| | Checks how many entities in a view have a specific component.
|
| size_t | SizeHint () const |
| | Checks the estimate amount of entities in the view.
|
| bool | Contains (const Entity entity) const |
| | Checks if view contains a specific entity.
|
| auto | begin () |
| auto | end () |
template<typename View>
class Cori::World::StaticEntityView< View >
A wrapper for an EnTT compile-time view that provides an iterator to access Entity instances directly.
- Note
- Don't create directly, use Scene::StaticView.
Definition at line 18 of file EntityView.hpp.
◆ UnderlyingIterator
◆ StaticEntityView()
◆ begin()
◆ Contains()
Checks if view contains a specific entity.
- Parameters
-
| entity | Entity to check the presence of. |
- Returns
- True if persent, false otherwise.
Definition at line 90 of file EntityView.hpp.
◆ end()
◆ Get()
template<typename View>
template<typename... T>
Retries the components from an entity, both the components and the entity should be in a view, faster than GetComponents.
- Template Parameters
-
- Parameters
-
| entity | Entity from which to retrieve the component. |
- Returns
- References to the requested component(s).
Definition at line 61 of file EntityView.hpp.
◆ Size()
template<typename View>
template<typename T>
Checks how many entities in a view have a specific component.
- Template Parameters
-
- Returns
- Amount of entities with component T in a view.
- Note
- Not available if view has components with in_place_delete policy.
Definition at line 72 of file EntityView.hpp.
◆ SizeHint()
Checks the estimate amount of entities in the view.
- Returns
- Estimate size hint.
- Note
- Only available if view has components with in_place_delete policy.
Definition at line 81 of file EntityView.hpp.
The documentation for this class was generated from the following file: