CellGrid3D<'T> Type
A dense, flat 3D grid optimized for spatial locality and minimal GC pressure. Uses 'voption' (struct option) to avoid heap allocations for empty cells. Best suited for voxel-like layouts, 3D maps, or dense spatial data. For sparse data over huge coordinates, consider a chunked system instead.
Axis Convention: - X = width (left/right) - Y = height (up/down) - Z = depth (forward/back)
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 as a flat array. Indexed as: x + y * Width + z * Width * Height Direct access is discouraged; use 'get'/'set' for bounds safety.
|
Full Usage:
Depth
Field type: int
|
|
Full Usage:
Height
Field type: int
|
|
The world-space coordinate corresponding to (0,0,0) of the grid index. Used for translating grid indices to game world positions.
|
|
Full Usage:
Width
Field type: int
|
|
Mibo