Table of Contents

Struct GridTraversalState

Namespace
GridForge.Utility
Assembly
GridForge.dll

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

world GridWorld
paddingMode GridTraversalPaddingMode

Methods

GetCellEdge(Voxel)

Gets the selected cell-edge measurement for a voxel's grid, caching repeated grid lookups.

public Fixed64 GetCellEdge(Voxel voxel)

Parameters

voxel Voxel

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

voxel Voxel
visited SwiftHashSet<WorldVoxelIndex>
cellEdge Fixed64

Returns

bool

True when the voxel belongs to an active grid generation and was not already visited; otherwise false.