CellGrid2D<'T> Type
A dense, flat 2D grid optimized for spatial locality and minimal GC pressure. Uses 'voption' (struct option) to avoid heap allocations for empty cells. Best suited for tilemaps, cellular automata, or dense spatial data. For sparse data over huge coordinates, consider a chunked system instead.
Record fields
| Record Field |
Description
|
The dimensions of a single cell in world units. Used for hit-testing and rendering calculations.
|
|
Full Usage:
Cells
Field type: 'T voption[]
|
The raw backing store. direct access is discouraged; use 'get'/'set' for bounds safety.
|
Full Usage:
Height
Field type: int
|
|
The world-space coordinate corresponding to the top-left (0,0) of the grid index. Used for translating grid indices to game world positions.
|
|
Full Usage:
Width
Field type: int
|
|
Mibo