Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
Aleph::CA::Hex_Axial Struct Reference

Axial integer coordinates (q, r) of a hex cell. More...

#include <tpl_ca_hex_lattice.H>

Public Attributes

ca_index_t q = 0
 column index
 
ca_index_t r = 0
 row index
 

Friends

constexpr bool operator== (Hex_Axial a, Hex_Axial b) noexcept
 
constexpr bool operator!= (Hex_Axial a, Hex_Axial b) noexcept
 

Detailed Description

Axial integer coordinates (q, r) of a hex cell.

q selects the column along the +x direction; r selects the row along the +y direction tilted 60 degrees from q. Six neighbours sit at canonical offsets

(+1, 0), (-1, 0), (0, +1), (0, -1), (+1, -1), (-1, +1)

which is exactly the offset list used by Hex_Neighborhood.

Definition at line 95 of file tpl_ca_hex_lattice.H.

Friends And Related Symbol Documentation

◆ operator!=

constexpr bool operator!= ( Hex_Axial  a,
Hex_Axial  b 
)
friend

Definition at line 104 of file tpl_ca_hex_lattice.H.

◆ operator==

constexpr bool operator== ( Hex_Axial  a,
Hex_Axial  b 
)
friend

Definition at line 100 of file tpl_ca_hex_lattice.H.

Member Data Documentation

◆ q

◆ r


The documentation for this struct was generated from the following file: