Table of Contents

Enum HexDirection

Namespace
GridForge.Spatial
Assembly
GridForge.dll

Represents the 20 possible neighbor directions in a hex-prism grid. Offsets are expressed as axial Q, vertical layer, and axial R.

public enum HexDirection

Fields

Above = 13

Vertical offset (0, +1, 0).

AboveQNegative = 17

Vertical offset (Q - 1, layer + 1, R unchanged).

AboveQNegativeRPositive = 18

Vertical offset (Q - 1, layer + 1, R + 1).

AboveQPositive = 14

Vertical offset (Q + 1, layer + 1, R unchanged).

AboveQPositiveRNegative = 15

Vertical offset (Q + 1, layer + 1, R - 1).

AboveRNegative = 16

Vertical offset (Q unchanged, layer + 1, R - 1).

AboveRPositive = 19

Vertical offset (Q unchanged, layer + 1, R + 1).

Below = 6

Vertical offset (0, -1, 0).

BelowQNegative = 10

Vertical offset (Q - 1, layer - 1, R unchanged).

BelowQNegativeRPositive = 11

Vertical offset (Q - 1, layer - 1, R + 1).

BelowQPositive = 7

Vertical offset (Q + 1, layer - 1, R unchanged).

BelowQPositiveRNegative = 8

Vertical offset (Q + 1, layer - 1, R - 1).

BelowRNegative = 9

Vertical offset (Q unchanged, layer - 1, R - 1).

BelowRPositive = 12

Vertical offset (Q unchanged, layer - 1, R + 1).

None = -1

No hex direction from source.

QNegative = 3

Axial offset (Q - 1, R unchanged).

QNegativeRPositive = 4

Axial offset (Q - 1, R + 1).

QPositive = 0

Axial offset (Q + 1, R unchanged).

QPositiveRNegative = 1

Axial offset (Q + 1, R - 1).

RNegative = 2

Axial offset (Q unchanged, R - 1).

RPositive = 5

Axial offset (Q unchanged, R + 1).