Voxel

data class Voxel(val col: Int, val row: Int, val layer: Int)(source)

A discrete 3D cell in a VoxelProjection / VoxelGraph, addressed by integer column / row / layer coordinates. The 3D analog of Cell.

Convention used throughout the agent layer's 3D primitives: col is the x-direction, row is the y-direction, and layer is the z-direction (typically altitude in UAV models). Distance helpers cover the four standard 3D grid metrics — Chebyshev3D, Manhattan3D, Euclidean3D, and the exact Octile3D for uniform-cost 26-neighbor movement; see VoxelMetric.

Constructors

Link copied to clipboard
constructor(col: Int, row: Int, layer: Int)

Properties

Link copied to clipboard
val col: Int
Link copied to clipboard
val layer: Int
Link copied to clipboard
val row: Int

Functions

Link copied to clipboard

Chebyshev3D (king-move) distance — max(|Δcol|, |Δrow|, |Δlayer|). This is the radius used by the Moore-26 neighborhood: voxels within Chebyshev3D distance 1 form the 26-voxel shell around this one.

Link copied to clipboard

Straight-line (Euclidean) distance, computed in voxel units.

Link copied to clipboard

Manhattan3D (taxicab) distance — |Δcol| + |Δrow| + |Δlayer|. This is the radius used by the Von Neumann-6 neighborhood: voxels within Manhattan3D distance 1 form the 6-voxel axis-aligned cross around this one.

Link copied to clipboard

Octile3D distance: the exact minimum cost from this voxel to other on a uniform-cost Moore-26 movement grid with orthogonal step cost 1, face-diagonal cost √2, and body- diagonal cost √3. The natural admissible heuristic for A* on such a grid.