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
capacityint
Properties
Capacity
Maximum result count without allocation.
public int Capacity { get; }
Property Value
Count
Number of query results.
public int Count { get; }
Property Value
this[int]
Reads one query result.
public Entity this[int index] { get; }
Parameters
indexint