ChunkEntities.md

November 22, 2024 ยท View on GitHub

Friflo.Engine.ECS

Friflo.Engine.ECS

ChunkEntities Struct

Provide the entity Id's for Chunk<T> components using Ids or this[int].

public readonly struct ChunkEntities :
System.Collections.Generic.IEnumerable<Friflo.Engine.ECS.Entity>,
System.Collections.IEnumerable

Implements System.Collections.Generic.IEnumerable<Entity>, System.Collections.IEnumerable

Remarks

Its Length is equal to the Chunk<T>.Length.

It implements System.Collections.Generic.IEnumerable<> only to provide comprehensive information of Entity's in a debugger.
Its unlikely to enumerate ChunkEntities in an application.
The recommended methods used by an application are Ids, this[int] or EntityAt(int).

Fields
ArchetypeThe Archetype containing the Chunk<T> components.
ExecutionThe execution type used to provide the chunk entities.
LengthThe number of entities in ChunkEntities.
Start
TaskIndexif 0 - The entities are provided from the main (caller) thread using foreach(...) loop, Run() or RunParallel().
if >= 1 - The entities are provided from a worker thread using RunParallel().
Properties
IdsReturn the entity Id's for the components in a Chunk<T>.
this[int]Return the entity Id for a Chunk<T> component at the given index.
Methods
EntityAt(int)Return the Entity for a Chunk<T> component at the given index.
GetEnumerator()
ToString()
Explicit Interface Implementations
System.Collections.Generic.IEnumerable<Friflo.Engine.ECS.Entity>.GetEnumerator()
System.Collections.IEnumerable.GetEnumerator()