Class SpatialQueryBuffer

Namespace
TDMaker.Core
Assembly
TDMaker.Core.dll

Caller-owned fixed-capacity query storage. Entries are valid until this buffer is queried again.

public sealed class SpatialQueryBuffer
Inheritance
SpatialQueryBuffer
Inherited Members

Examples

var nearby = new SpatialQueryBuffer(sim.Config.EntityCapacity); // allocate before stepping

Constructors

SpatialQueryBuffer(int)

Allocates reusable query storage; use EntityCapacity to accommodate every enemy.

public SpatialQueryBuffer(int capacity)

Parameters

capacity int

Properties

Capacity

Maximum result count without allocation.

public int Capacity { get; }

Property Value

int

Count

Number of query results.

public int Count { get; }

Property Value

int

this[int]

Reads one query result.

public Entity this[int index] { get; }

Parameters

index int

Property Value

Entity