Header menu logo Mibo

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

CellSize

Full Usage: CellSize

Field type: Vector2

The dimensions of a single cell in world units. Used for hit-testing and rendering calculations.

Field type: Vector2

Cells

Full Usage: Cells

Field type: 'T voption[]

The raw backing store. direct access is discouraged; use 'get'/'set' for bounds safety.

Field type: 'T voption[]

Height

Full Usage: Height

Field type: int
Field type: int

Origin

Full Usage: Origin

Field type: Vector2

The world-space coordinate corresponding to the top-left (0,0) of the grid index. Used for translating grid indices to game world positions.

Field type: Vector2

Width

Full Usage: Width

Field type: int
Field type: int

Type something to start searching.