Class HexDirectionUtility
Provides hex-prism neighbor direction utilities.
public static class HexDirectionUtility
- Inheritance
-
HexDirectionUtility
- Inherited Members
Properties
AboveLayer
All 7 neighbor directions on the layer above.
public static ReadOnlySpan<HexDirection> AboveLayer { get; }
Property Value
All
All 20 hex-prism neighbor directions excluding None.
public static ReadOnlySpan<HexDirection> All { get; }
Property Value
BelowLayer
All 7 neighbor directions on the layer below.
public static ReadOnlySpan<HexDirection> BelowLayer { get; }
Property Value
Offsets
Hex-prism neighbor offsets in deterministic direction order.
public static ReadOnlySpan<VoxelIndex> Offsets { get; }
Property Value
Planar
All 6 planar axial hex directions.
public static ReadOnlySpan<HexDirection> Planar { get; }
Property Value
Primary
The 8 face-adjacent hex-prism directions.
public static ReadOnlySpan<HexDirection> Primary { get; }
Property Value
Vertical
All 2 vertical hex-prism directions.
public static ReadOnlySpan<HexDirection> Vertical { get; }
Property Value
VerticalDiagonal
All 12 non-vertical directions on the layers above and below.
public static ReadOnlySpan<HexDirection> VerticalDiagonal { get; }
Property Value
Methods
GetOffset(HexDirection)
Gets the topology-local index offset for a hex direction.
public static VoxelIndex GetOffset(HexDirection direction)
Parameters
directionHexDirection
Returns
IsPlanar(HexDirection)
True for planar axial directions.
public static bool IsPlanar(HexDirection direction)
Parameters
directionHexDirection
Returns
IsVertical(HexDirection)
True for vertical layer directions.
public static bool IsVertical(HexDirection direction)
Parameters
directionHexDirection