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 (u16 hv, u16 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 |
u32 | ToInt () |
Static Public Member Functions | |
static PathCost | horizvert (u16 n) |
Construct for horizontal/vertical movement of given number of steps. More... | |
static PathCost | diag (u16 n) |
Construct for diagonal movement of given number of steps. More... | |
Private Attributes | |
u32 | 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 |
Construct from a number of horizontal/vertical and diagonal steps.
Construct for diagonal movement of given number of steps.
Construct for horizontal/vertical movement of given number of steps.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
private |