|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
Cube coordinates (x, y, z) with the constraint x+y+z = 0.
More...
#include <tpl_ca_hex_lattice.H>
Public Attributes | |
| ca_index_t | x = 0 |
| ca_index_t | y = 0 |
| ca_index_t | z = 0 |
Friends | |
| constexpr bool | operator== (Hex_Cube a, Hex_Cube b) noexcept |
| constexpr bool | operator!= (Hex_Cube a, Hex_Cube b) noexcept |
Cube coordinates (x, y, z) with the constraint x+y+z = 0.
Cube coordinates make several geometric operations trivial (e.g. Euclidean distance, rotations by 60°). They are the canonical representation used by Red Blob Games and by most academic references on hex grids.
Definition at line 133 of file tpl_ca_hex_lattice.H.
Definition at line 143 of file tpl_ca_hex_lattice.H.
Definition at line 139 of file tpl_ca_hex_lattice.H.
| ca_index_t Aleph::CA::Hex_Cube::x = 0 |
Definition at line 135 of file tpl_ca_hex_lattice.H.
| ca_index_t Aleph::CA::Hex_Cube::y = 0 |
Definition at line 136 of file tpl_ca_hex_lattice.H.
| ca_index_t Aleph::CA::Hex_Cube::z = 0 |
Definition at line 137 of file tpl_ca_hex_lattice.H.