Struct SpatialGridOccupancy
A snapshot of the sparse spatial grid's occupancy and memory (#872 step 8). Obtained from GetSpatialGridOccupancy(); all-zero when no grid is configured.
public readonly struct SpatialGridOccupancy
- Inherited Members
Remarks
A readonly struct with init-only members, matching SpatialMigrationTelemetry — its sibling snapshot in this namespace. A snapshot
that its reader can mutate invites a caller to "fix up" a field and pass it on as if the engine had reported it.
Properties
BlockCellCapacity
public int BlockCellCapacity { get; init; }
Property Value
BlockCount
Allocated blocks — one per occupied block-sized region of the world.
public int BlockCount { get; init; }
Property Value
BlockDimX
Block extent on X, derived from the world as clamp(nextPow2(extentInCells), 1, 16).
public int BlockDimX { get; init; }
Property Value
BlockDimY
Block extent on Y.
public int BlockDimY { get; init; }
Property Value
BlockDimZ
Block extent on Z. 1 for a flat world.
public int BlockDimZ { get; init; }
Property Value
DenseEquivalentBytes
Bytes a dense grid over the same world would have held: 64 per cell the bounds imply, occupied or not.
public long DenseEquivalentBytes { get; init; }
Property Value
IntraBlockFill
Mean fraction of a block's index slots that name a live cell — OccupiedCellCount / (BlockCount * BlockCellCapacity). The measurement that
decides whether the dense per-block index array is the right payload.
public double IntraBlockFill { get; init; }
Property Value
OccupiedCellCount
Cells that actually exist. A cell is created when something first occupies it and is never removed while the grid lives.
public int OccupiedCellCount { get; init; }
Property Value
ResidentBytes
Bytes the grid's block index arrays and cell chunks hold. Excludes the root map and the per-archetype cluster pools.
public long ResidentBytes { get; init; }