Package-level declarations

  • Offset Coordinates: These are representations beneficial for graphical or UI elements in hexagonal grid layouts. Based on the type of offset (Odd/Even R/Q), the rows or columns are offset accordingly. The type of offset coordinate system (OddR, EvenR, OddQ, EvenQ) is defined by the parities of the rows(columns) and the layout (pointy-topped or flat-topped).

  • OddR and EvenR: In these pointy-topped layouts, rows are offset. Depending on whether the row is odd or even, the offset direction varies between left and right respectively.

  • OddQ and EvenQ: In these flat-topped layouts, columns are offset. Here, either the odd or even columns are slightly to the left when moving upwards in the positive direction, depending on whether it's an OddQ or EvenQ layout respectively.

All these coordinate systems use a 2D grid representation (column and row) differing from the cube coordinate system utilized in the HexCoordinates class, which maps hexagonal grid coordinates using three axes q, r, s, forming a cube structure.

Types

Link copied to clipboard

Data class representing even-Q coordinates in a flat-topped hexagonal grid layout. The Even-Q coordinate system makes use of a 2D grid representation (column and row), which differs from the cube coordinates system used by the HexCoordinates:

Link copied to clipboard

Data class representing even-R coordinates in a pointy-topped hexagonal grid layout. The Even-R coordinate system uses a 2D grid representation (column and row) differing from the cube coordinate system utilized in the HexCoordinates class:

Link copied to clipboard

Data class representing odd-Q coordinates in a flat-topped hexagonal grid layout. The Odd-Q coordinate system employs a 2D grid representation (column and row), which differentiates it from the cube coordinate system utilized in the HexCoordinates class:

Link copied to clipboard

Data class representing odd-R coordinates in a pointy-topped hexagonal grid layout. The Odd-R coordinate system uses a 2D grid representation (column and row) differing from the cube coordinate system utilized in the HexCoordinates class:

Link copied to clipboard