representation of a mapnode to be used for pathfinding More...
Public Member Functions | |
PathGridnode ()=default | |
default constructor | |
PathGridnode (const PathGridnode &b) | |
copy constructor | |
PathGridnode & | operator= (const PathGridnode &b) |
assignment operator | |
PathCost | getCost (v3s16 dir) |
read cost in a specific direction | |
void | setCost (v3s16 dir, const PathCost &cost) |
set cost value for movement | |
Public Attributes | |
bool | valid = false |
node is on surface | |
bool | target = false |
node is target position | |
bool | source = false |
node is stating position | |
int | totalcost = -1 |
cost to move here from starting point | |
int | estimated_cost = -1 |
totalcost + heuristic cost to end | |
v3s16 | sourcedir |
origin of movement for current cost | |
v3s16 | pos |
real position of node | |
PathCost | directions [4] |
cost in different directions | |
bool | is_closed = false |
for A* search: if true, is in closed list | |
bool | is_open = false |
for A* search: if true, is in open list | |
bool | is_element = false |
node is element of path detected | |
char | type = 'u' |
Type of pathfinding node. | |
representation of a mapnode to be used for pathfinding
|
default |
default constructor
PathGridnode::PathGridnode | ( | const PathGridnode & | b | ) |
copy constructor
References DIR_XM, DIR_XP, DIR_ZM, DIR_ZP, and directions.
read cost in a specific direction
dir | direction of cost to fetch |
References dir(), DIR_XM, DIR_XP, DIR_ZM, DIR_ZP, and directions.
Referenced by Pathfinder::updateAllCosts(), and Pathfinder::updateCostHeuristic().
PathGridnode & PathGridnode::operator= | ( | const PathGridnode & | b | ) |
set cost value for movement
dir | direction to set cost for @cost cost to set |
References dir(), DIR_XM, DIR_XP, DIR_ZM, DIR_ZP, and directions.
Referenced by Pathfinder::updateCostHeuristic().
PathCost PathGridnode::directions[4] |
cost in different directions
Referenced by PathGridnode(), getCost(), GridNodeContainer::initNode(), operator=(), and setCost().
int PathGridnode::estimated_cost = -1 |
totalcost + heuristic cost to end
Referenced by PathfinderCompareHeuristic::operator()(), and Pathfinder::updateCostHeuristic().
bool PathGridnode::is_closed = false |
for A* search: if true, is in closed list
Referenced by Pathfinder::updateCostHeuristic().
bool PathGridnode::is_element = false |
node is element of path detected
Referenced by Pathfinder::buildPath(), and operator=().
bool PathGridnode::is_open = false |
for A* search: if true, is in open list
Referenced by Pathfinder::updateCostHeuristic().
v3s16 PathGridnode::pos |
real position of node
Referenced by Pathfinder::getPath(), GridNodeContainer::initNode(), and operator=().
bool PathGridnode::source = false |
node is stating position
Referenced by Pathfinder::buildPath(), Pathfinder::getPath(), operator=(), and Pathfinder::updateCostHeuristic().
v3s16 PathGridnode::sourcedir |
origin of movement for current cost
Referenced by Pathfinder::buildPath(), operator=(), Pathfinder::updateAllCosts(), and Pathfinder::updateCostHeuristic().
bool PathGridnode::target = false |
node is target position
Referenced by Pathfinder::getPath(), operator=(), Pathfinder::updateAllCosts(), and Pathfinder::updateCostHeuristic().
int PathGridnode::totalcost = -1 |
cost to move here from starting point
Referenced by Pathfinder::getPath(), operator=(), Pathfinder::updateAllCosts(), and Pathfinder::updateCostHeuristic().
char PathGridnode::type = 'u' |
Type of pathfinding node.
u = unknown i = invalid s = surface (walkable node)
Referenced by GridNodeContainer::initNode(), and operator=().
bool PathGridnode::valid = false |
node is on surface
Referenced by Pathfinder::buildPath(), Pathfinder::getPath(), GridNodeContainer::initNode(), PathfinderCompareHeuristic::operator()(), operator=(), Pathfinder::updateAllCosts(), and Pathfinder::updateCostHeuristic().