Hex3DSpatial Module
Functions and values
| Function or value |
Description
|
Full Usage:
distance c1 r1 l1 c2 r2 l2 grid
Parameters:
int
r1 : int
l1 : ^a
c2 : int
r2 : int
l2 : ^b
grid : HexGrid3D<'T>
Returns: int
Modifiers: inline Type parameters: ^a, ^b, 'T |
Hex distance in 3D: hex distance on the plane + layer difference.
|
Full Usage:
findPath startCol startRow startLayer goalCol goalRow goalLayer isPassable costFn grid
Parameters:
int
startRow : int
startLayer : int
goalCol : int
goalRow : int
goalLayer : int
isPassable : int -> int -> int -> bool
costFn : int -> int -> int -> int -> int -> int -> float32
grid : HexGrid3D<'T>
Returns: (int * int * int)[] voption
Modifiers: inline Type parameters: 'T |
A* pathfinding on a hex3D grid. Returns the shortest path or ValueNone.
|
Full Usage:
floodFill col row layer predicate grid
Parameters:
int
row : int
layer : int
predicate : int -> int -> int -> bool
grid : HexGrid3D<'T>
Returns: (int * int * int)[]
Modifiers: inline Type parameters: 'T |
Flood fill from (col, row, layer) using BFS over hex3D neighbors.
|
Full Usage:
inRange col row layer range grid
Parameters:
int
row : int
layer : int32
range : int
grid : HexGrid3D<'T>
Returns: (int * int * int)[]
Modifiers: inline Type parameters: 'T |
Returns all hex3D cells within `range` steps (hex + vertical).
|
Full Usage:
lineOfSight c1 r1 l1 c2 r2 l2 isBlocked grid
Parameters:
int
r1 : int
l1 : int
c2 : int
r2 : int
l2 : int
isBlocked : int -> int -> int -> bool
grid : HexGrid3D<'T>
Returns: bool
Modifiers: inline Type parameters: 'T |
Returns true if a hex3D line is clear of blocked cells.
|
Full Usage:
neighbors col row layer grid
Parameters:
int
row : int
layer : int
grid : HexGrid3D<'T>
Returns: (int * int * int)[]
Modifiers: inline Type parameters: 'T |
Returns the 8 neighbors of a hex cell in 3D: 6 hex neighbors on the same layer plus the cells directly above and below.
|
Full Usage:
neighborsHex col row layer grid
Parameters:
int
row : int
layer : int
grid : HexGrid3D<'T>
Returns: (int * int * int)[]
Modifiers: inline Type parameters: 'T |
Returns only the 6 hex neighbors on the same layer.
|
|
Mibo