|
|
static const dir | none |
|
static const dir | north |
|
static const dir | east |
|
static const dir | northeast |
|
static const dir | south |
|
static const dir | northsouth |
|
static const dir | southeast |
|
static const dir | northsoutheast |
|
static const dir | west |
|
static const dir | northwest |
|
static const dir | eastwest |
|
static const dir | northeastwest |
|
static const dir | southwest |
|
static const dir | northsouthwest |
|
static const dir | southeastwest |
|
static const dir | all |
|
Class holding static methods to work with directions. Directions are just bit-encoded integers.
Definition at line 110 of file api_simple.cc.
◆ backward()
static dir dir::backward |
( |
dir |
d | ) |
|
|
static |
- Parameters
-
- Returns
- backward direction, e.g. w -> e, n+w -> s+e, n+w+s -> e.
◆ double()
static dir dir::double |
( |
dir |
d | ) |
|
|
static |
- Parameters
-
- Returns
- complements direction to complete straight, i.e. w -> w+e, but n+w -> 0.
◆ is_curve()
static bool dir::is_curve |
( |
dir |
d | ) |
|
|
static |
- Parameters
-
- Returns
- whether direction is curve, e.g. n+e, s+w.
◆ is_single()
static bool dir::is_single |
( |
dir |
d | ) |
|
|
static |
- Parameters
-
- Returns
- whether direction is single direction, i.e. just one of n/s/e/w
◆ is_straight()
static bool dir::is_straight |
( |
dir |
d | ) |
|
|
static |
- Parameters
-
- Returns
- whether direction is straight and has no curves in it, e.g. n+s, w.
◆ is_threeway()
static bool dir::is_threeway |
( |
dir |
d | ) |
|
|
static |
- Parameters
-
- Returns
- whether direction is triple direction, e.g. n+s+e or n+s+e+w.
◆ is_twoway()
static bool dir::is_twoway |
( |
dir |
d | ) |
|
|
static |
- Parameters
-
- Returns
- whether direction is double direction, e.g. n+e, n+s.
◆ to_coord()
static coord dir::to_coord |
( |
| ) |
|
|
static |
Helper function to convert direction vector to dir type.
◆ to_slope()
Converts direction to slope: direction goes upward on slope.
- Parameters
-
The documentation for this class was generated from the following file: