class
ecs::TGroup
Non-owning group specialization.
Acts similarly to a TView but ensures that entities are tightly packed for fast iteration, and allows sorting of entities.
Template parameters
IncludedStorageTypes | List of storage types that the entity must be a part of to be included in the group. |
|---|---|
ExcludedStorageTypes | List of storage types that the entity must not be a part of to be included in the group. |
Public
Constructors
TGroup<b3d::ecs::TOwnedTypes<>, TIncludedTypes<type-parameter-0-0...>, TExcludedTypes<type-parameter-0-1...> >
TGroup<b3d::ecs::TOwnedTypes<>, TIncludedTypes<type-parameter-0-0...>, TExcludedTypes<type-parameter-0-1...> >
TGroup<TOwnedTypes<type-parameter-0-0...>, TIncludedTypes<type-parameter-0-1...>, TExcludedTypes<type-parameter-0-2...> >
TGroup<TOwnedTypes<type-parameter-0-0...>, TIncludedTypes<type-parameter-0-1...>, TExcludedTypes<type-parameter-0-2...> >
Methods
GetLeadingStorage
Returns a reference to the storage that is considered the leading storage.
Leading storage is the storage that's primarily iterated over when looking for elements matching the group filter.
GetSize
Returns the number of entities that the group will iterate over.
GetCapacity
Returns the reserved capacity of the group's leading storage.
IsEmpty
Returns true if no entities pass the group filter.
Shrink
Reduces the leading storage capacity to match the current number of entities.
Begin
Iterator to the first entity matching the group filter.
End
Iterator past the last entity matching the group filter.
Rbegin
Iterator to the last entity matching the group filter.
Rend
Iterator before the first entity matching the group filter.
Front
Reference to the first entity matching the group filter, or null if none matches.
Back
Reference to the last entity matching the group filter, or null if none matches.
Find
Returns an iterator to the entity in the group, or End() iterator if no entity is found.
Contains
Returns true if the provided entity matches the group filter.
Each
Allows easy iteration over all components in the group using a range for loop.
This is the fastest way to iterate all entries in a group.
staticTypeId
Returns type ID that uniquely identifies the type of this group.
begin
end
rbegin
rend
GetLeadingStorage
Returns a reference to the storage that is considered the leading storage.
Leading storage is the owned storage that's primarily iterated over when looking for elements matching the group filter.
GetSize
Returns the number of entities in the group.
IsEmpty
Returns true if there are no entities in the group or the group was not initialized.
Begin
Iterator to the first entity matching the group filter.
End
Iterator past the last entity matching the group filter.
Rbegin
Iterator to the last entity matching the group filter.
Rend
Iterator before the first entity matching the group filter.
Front
Reference to the first entity matching the group filter, or null if none matches.
Back
Reference to the last entity matching the group filter, or null if none matches.
Find
Returns an iterator to the entity in the group, or End() iterator if no entity is found.
Contains
Returns true if the provided entity matches the group filter.
Each
Allows easy iteration over all components in the group using a range for loop.
This is the fastest way to iterate all entries in a group.
staticTypeId
Returns type ID that uniquely identifies the type of this group.