KGrid2D::HexagonalBase Class Reference
This class contains static methods to manipulate coordinates on an hexagonal grid where hexagons form horizontal lines:.
More...
#include <kgrid2d.h>
Inheritance diagram for KGrid2D::HexagonalBase:
[legend]List of all members.
Detailed Description
This class contains static methods to manipulate coordinates on an hexagonal grid where hexagons form horizontal lines:.
(0,0) (0,1) (0,2)
(1,0) (1,1) (1,2)
(2,0) (2,1) (2,2)
- Since:
- 3.2
Definition at line 380 of file kgrid2d.h.
Member Enumeration Documentation
|
|
Identify the six neighbours.
- Enumerator:
-
| Left |
|
| Right |
|
| LeftUp |
|
| LeftDown |
|
| RightUp |
|
| RightDown |
|
| Nb_Neighbour |
|
Definition at line 386 of file kgrid2d.h. |
Member Function Documentation
| static double KGrid2D::HexagonalBase::angle |
( |
Neighbour |
n |
) |
[inline, static] |
|
|
|
- Returns:
- the trigonometric angle in radians for the given neighbour.
Definition at line 392 of file kgrid2d.h. |
| static uint KGrid2D::HexagonalBase::distance |
( |
const Coord & |
c1, |
|
|
const Coord & |
c2 |
|
) |
[inline, static] |
|
|
|
- Returns:
- the distance between the two coordinates in term of hexagons.
Definition at line 441 of file kgrid2d.h. |
| static Coord KGrid2D::HexagonalBase::neighbour |
( |
const Coord & |
c, |
|
|
Neighbour |
n |
|
) |
[inline, static] |
|
|
|
- Returns:
- the neighbour of the given coordinate.
Definition at line 424 of file kgrid2d.h. |
|
|
- Returns:
- the opposed neighbour.
Definition at line 408 of file kgrid2d.h. |
The documentation for this class was generated from the following file:
Generated on Wed Aug 23 18:06:37 2006 for libkdegames by
1.4.6