Table of Contents

Struct PooledEntitySlice

Namespace
Typhon.Engine
Assembly
Typhon.Engine.dll

Zero-copy window into a PooledEntityList's backing array. Used by parallel QuerySystem dispatch to give each chunk its entity slice without copying.

public readonly struct PooledEntitySlice : IReadOnlyCollection<EntityId>, IEnumerable<EntityId>, IEnumerable
Implements
Inherited Members

Remarks

This is a value type — it boxes once when assigned to IReadOnlyCollection<T> (same cost as PooledEntityList). The backing array is NOT owned by this struct; the original PooledEntityList manages its lifetime.

Properties

Count

Number of entities in this chunk slice.

public int Count { get; }

Property Value

int

this[int]

Access entity by index within this slice.

public EntityId this[int index] { get; }

Parameters

index int

Property Value

EntityId

Methods

GetEnumerator()

Value-type enumerator — no allocation.

public PooledEntitySlice.Enumerator GetEnumerator()

Returns

PooledEntitySlice.Enumerator