Struct GridTraversalState
Tracks per-grid traversal padding while suppressing duplicate voxel visits.
public struct GridTraversalState
- Inherited Members
Constructors
GridTraversalState(GridWorld, GridTraversalPaddingMode)
Initializes traversal state for one world and padding mode.
public GridTraversalState(GridWorld world, GridTraversalPaddingMode paddingMode)
Parameters
worldGridWorldpaddingModeGridTraversalPaddingMode
Methods
GetCellEdge(Voxel)
Gets the selected cell-edge measurement for a voxel's grid, caching repeated grid lookups.
public Fixed64 GetCellEdge(Voxel voxel)
Parameters
voxelVoxel
Returns
- Fixed64
Exceptions
- InvalidOperationException
The voxel does not belong to an active grid generation in this traversal's world.
TryVisitUnique(Voxel, SwiftHashSet<WorldVoxelIndex>, out Fixed64)
Visits a voxel only once and returns the selected cell-edge measurement for its grid.
public bool TryVisitUnique(Voxel voxel, SwiftHashSet<WorldVoxelIndex> visited, out Fixed64 cellEdge)
Parameters
voxelVoxelvisitedSwiftHashSet<WorldVoxelIndex>cellEdgeFixed64
Returns
- bool
True when the voxel belongs to an active grid generation and was not already visited; otherwise false.