Enum HexOrientation
Defines the orientation of hexagons in a hex grid, determining which axis has a flat edge versus a pointed vertex at the top of each cell.
Namespace: Scylla.Core.Structures
Assembly: ScyllaCore.dll
Syntax
public enum HexOrientation
Remarks
The choice of orientation affects:
- The forward and inverse matrices used by HexGridLayout for world-to-grid and grid-to-world conversions.
- The starting angle used by GetCornerOffset(int) when computing vertex positions around each hex center.
- The visual interpretation of the N/S labels in HexCornerPosition.
Fields
| Name | Description |
|---|---|
| FlatTop | Flat edge on top and bottom, with vertices pointing to the left and right. Corner angles start at 0 degrees (right vertex) and proceed in 60-degree steps. Produces vertical columns of hexes that align on the Q axis. Common in column-oriented layouts and traditional board wargames. |
| PointyTop | Vertex on top and bottom, with flat edges facing to the left and right. Corner angles are offset by 30 degrees relative to flat-top orientation. Produces horizontal rows of hexes that align on the R axis. Common for maps with horizontal row layouts (e.g. Civilization V/VI style grids). |