OddQCoordinates
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:
The HexCoordinates class represents hexagonal grid coordinates with three axes q, r, s, forming a cube structure.
The OddQCoordinates class, alternatively, interprets the hexagonal grid using a vertical column system in line with odd-Q. The column ('q') holds its origin at the top-left.
In contrast to even-Q layout, in this layout, it is the odd-numbered columns that are slightly to the left of the even-numbered columns when moving upwards in the positive direction.
The col field stands for the column (corresponding to the q-axis in cube coordinates), while the row represents the row.
The OddQCoordinates class can be beneficial when working with UI elements or graphical representations where Cartesian coordinates are more practical.
Properties
Expects a property of HexCoordinates type, which should be provided by instances of this interface.
Functions
Transforms the given this from HexCoordinates into the corresponding subtype of Coordinates.