shortest Path
fun shortestPath(from: Voxel, to: Voxel, heuristic: (current: Voxel, target: Voxel) -> Double = VoxelHeuristics.ZERO): WeightedPath<Voxel>?(source)
Shortest weighted path from from to to. Returns the path (including both endpoints) plus total cost, or null if to is unreachable. A self-path returns WeightedPath(listOf(from), 0.0).
With the default zero heuristic this is Dijkstra. Pass a non-trivial heuristic for A*; see VoxelHeuristics for pre-built admissible heuristics — VoxelHeuristics.OCTILE is the tight choice for Moore-26 with the default step costs.
Voxel costs must be non-negative.