10 template <
typename... T>
17 template <
typename View>
31 : m_Registry(registry), m_EnttIterator(it) {}
34 return Entity({*m_Registry, *m_EnttIterator});
43 return m_EnttIterator != other.m_EnttIterator;
47 entt::registry* m_Registry;
52 : m_View(view), m_Registry(®istry) {}
60 template<
typename... T>
72 [[nodiscard]]
size_t Size() {
73 return m_View.template size<T>();
82 return m_View.size_hint();
99 entt::registry* m_Registry;
115 : m_Registry(®istry) {}
121 template <
typename... T>
123 (m_View.iterate(m_Registry->storage<T>()), ...);
131 template <
typename... T>
133 (m_View.iterate(m_Registry->storage<T>()), ...);
134 return std::move(*
this);
141 template <
typename... T>
143 (m_View.exclude(m_Registry->storage<T>()), ...);
151 template <
typename... T>
153 (m_View.exclude(m_Registry->storage<T>()), ...);
154 return std::move(*
this);
162 return m_View.size_hint();
191 : m_Registry(registry), m_EnttIterator(it) {}
194 return Entity({*m_Registry, *m_EnttIterator});
203 return m_EnttIterator != other.m_EnttIterator;
207 entt::registry* m_Registry;
215 entt::registry* m_Registry;
216 entt::runtime_view m_View;
reference operator*() const
std::ptrdiff_t difference_type
bool operator!=(const Iterator &other) const
Iterator(entt::registry *registry, UnderlyingIterator it)
std::forward_iterator_tag iterator_category
void Clear()
Completely clear the view.
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.
DynamicEntityView & With() &
Adds one or more component types to the view's filter.
DynamicEntityView && Without() &&
Excludes one or more component types from the view's filter.
DynamicEntityView && With() &&
Adds one or more component types to the view's filter.
DynamicEntityView & Without() &
Excludes one or more component types from the view's filter.
entt::runtime_view::iterator UnderlyingIterator
DynamicEntityView(entt::registry ®istry)
Constructs a runtime view wrapper.
Entities are the essential part of WorldSystem.
entt::entity GetRawEntity() const
Gets a raw entt::entity if you need to interact with entt directly.
std::ptrdiff_t difference_type
std::forward_iterator_tag iterator_category
Iterator(entt::registry *registry, UnderlyingIterator it)
reference operator*() const
bool operator!=(const Iterator &other) const
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.
size_t Size()
Checks how many entities in a view have a specific component.
StaticEntityView(View view, entt::registry ®istry)
decltype(auto) Get(Entity entity)
Retries the components from an entity, both the components and the entity should be in a view,...
typename View::iterator UnderlyingIterator
Anything connected to WorldSystem (ECS) is in this namespace.
Helper to exclude certain components from a static view.