VoxelGraph

constructor(columns: Int, rows: Int, layers: Int, torus: Boolean = false, movementRule: VoxelMovementRule = VoxelMovementRule.MOORE_26, allowCornerCutting: Boolean = false)(source)

Parameters

columns

lattice width (x-axis)

rows

lattice depth (y-axis)

layers

lattice height (z-axis, typically altitude) Corner-cutting (MOORE_26 only):

  • By default (allowCornerCutting = false) a diagonal move (face-diagonal √2 or body-diagonal √3) is permitted only when every axis-neighbor it passes between is passable — i.e. for each nonzero offset component, the voxel reached by that component alone must be passable. This prevents agents from clipping through blocked voxels at shared edges/corners.

  • Set allowCornerCutting = true to require only that the destination voxel be passable.

  • Has no effect under VON_NEUMANN_6 (only orthogonal moves).

torus

if true, coordinates wrap at boundaries

movementRule

MOORE_26 (26-way) or VON_NEUMANN_6 (6-way)

allowCornerCutting

if true, diagonal moves ignore the passability of the in-between axis-neighbor voxels (default false)