![]() |
Pyrogenesis HEAD
Pyrogenesis, a RTS Engine
|
Represents the cost of a path consisting of horizontal/vertical and diagonal movements over a uniform-cost grid. More...
#include <Pathfinding.h>
Public Member Functions | |
| PathCost () | |
| PathCost (std::uint16_t hv, std::uint16_t d) | |
| Construct from a number of horizontal/vertical and diagonal steps. More... | |
| PathCost | operator+ (const PathCost &a) const |
| PathCost & | operator+= (const PathCost &a) |
| bool | operator<= (const PathCost &b) const |
| bool | operator< (const PathCost &b) const |
| bool | operator>= (const PathCost &b) const |
| bool | operator> (const PathCost &b) const |
| std::uint32_t | ToInt () |
Static Public Member Functions | |
| static PathCost | horizvert (std::uint16_t n) |
| Construct for horizontal/vertical movement of given number of steps. More... | |
| static PathCost | diag (std::uint16_t n) |
| Construct for diagonal movement of given number of steps. More... | |
Private Attributes | |
| std::uint32_t | data |
Represents the cost of a path consisting of horizontal/vertical and diagonal movements over a uniform-cost grid.
Maximum path length before overflow is about 45K steps.
|
inline |
|
inline |
Construct from a number of horizontal/vertical and diagonal steps.
|
inlinestatic |
Construct for diagonal movement of given number of steps.
|
inlinestatic |
Construct for horizontal/vertical movement of given number of steps.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
private |