Table of Contents

Class GridTraversal

Namespace
GridForge.Utility
Assembly
GridForge.dll

Provides deterministic helpers for duplicate-safe voxel traversal.

public static class GridTraversal
Inheritance
GridTraversal
Inherited Members

Methods

IsPlanarPositionInPaddedBounds(Vector2d, Vector2d, Fixed64, Vector3d)

Tests whether a world position's X/Z projection lies inside bounds expanded by half of a cell edge.

public static bool IsPlanarPositionInPaddedBounds(Vector2d min, Vector2d max, Fixed64 cellEdge, Vector3d worldPosition)

Parameters

min Vector2d
max Vector2d
cellEdge Fixed64
worldPosition Vector3d

Returns

bool

IsWorldPositionInPaddedBounds(Vector3d, Vector3d, Fixed64, Vector3d)

Tests whether a 3D world position lies inside bounds expanded by half of a cell edge.

public static bool IsWorldPositionInPaddedBounds(Vector3d min, Vector3d max, Fixed64 cellEdge, Vector3d worldPosition)

Parameters

min Vector3d
max Vector3d
cellEdge Fixed64
worldPosition Vector3d

Returns

bool

TryGetUniquePartition<TPartition>(Voxel, SwiftHashSet<WorldVoxelIndex>, out TPartition?)

Gets a voxel partition once per exact world-scoped voxel identity.

public static bool TryGetUniquePartition<TPartition>(Voxel voxel, SwiftHashSet<WorldVoxelIndex> visited, out TPartition? partition) where TPartition : class, IVoxelPartition

Parameters

voxel Voxel
visited SwiftHashSet<WorldVoxelIndex>
partition TPartition

Returns

bool

Type Parameters

TPartition