Expand description
Hexagonal Cube-Coordinate System with Spiralling Integer Tile Identifiers
Read the README for
- an Abstract
- Construction Examples
- A list of Features
Structs§
- CCTile
- CubeCoordinates Tile For reference: https://www.redblobgames.com/grids/hexagons/
- HGSTile
- Hexgrid Spiral Tile
- Movement
Range - https://www.redblobgames.com/grids/hexagons/#range-coordinate
- Ring
- A Ring is hexagonal and consists of tiles. All Ring-Corner Tiles have the same number of steps to the origin. The other tiles in the Ring are on straight edges between corners. The RingIndex counts from 1 and thus is always equal to the Ring::edge_size.
- Ring
Edge - An identifier for each side of the ring’s edge. Numbered counterclockwise from the top-right edge.
- Ring
Index - Which Ring around the origin we’re at, counting from 1. Implementation Detail: The RingIndex wraps an integer that equals the number of tiles in one edge of the Ring (including both corners).
- Tile
Index
Enums§
- Ring
Corner Index - An identifier for each corner of the ring’s edge. Numbered counterclockwise, from the right corner. The n-th corner is the start of the n-th edge.
Functions§
- ring_
index_ for_ tile_ index - Compute the ring-index n for the ring with the maximum element h. You can also pass any other tile-index. This is the inversion of ring_max.