25 class PathfindingOpenSet;
64 bool inOpenSet()
const {
return (_openentry != 0); }
92 return a->getTUCost(
false) < b->getTUCost(
false);
bool operator()(const PathfindingNode *a, const PathfindingNode *b) const
Compares nodes *a and *b.
Definition: PathfindingNode.h:90
void reset()
Resets the node.
Definition: PathfindingNode.cpp:54
int getTUGuess() const
Gets the approximate cost to reach the target position.
Definition: PathfindingNode.h:66
void connect(int tuCost, PathfindingNode *prevNode, int prevDir, Position target)
Connects to previous node along the path.
Definition: PathfindingNode.cpp:108
int getTUCost(bool missile) const
Gets the TU cost.
Definition: PathfindingNode.cpp:74
PathfindingNode * getPrevNode() const
Gets the previous node.
Definition: PathfindingNode.cpp:86
Definition: PathfindingOpenSet.h:27
void setChecked()
Marks the node as checked.
Definition: PathfindingNode.h:56
A class that holds pathfinding info for a certain node on the map.
Definition: PathfindingNode.h:31
A class that holds references to the nodes to be examined in pathfinding.
Definition: PathfindingOpenSet.h:54
Compares PathfindingNode pointers based on TU cost.
Definition: PathfindingNode.h:81
int getPrevDir() const
Gets the previous walking direction.
Definition: PathfindingNode.cpp:95
bool isChecked() const
Is checked?
Definition: PathfindingNode.cpp:64
bool inOpenSet() const
Is this node already in a PathfindingOpenSet?
Definition: PathfindingNode.h:64
Easy handling of X-Y-Z coordinates.
Definition: Position.h:28
PathfindingNode(Position pos)
Creates a new PathfindingNode class.
Definition: PathfindingNode.cpp:29
Position getPosition() const
Gets the node position.
Definition: PathfindingNode.cpp:46
~PathfindingNode()
Cleans up the PathfindingNode.
Definition: PathfindingNode.cpp:37
Definition: BaseInfoState.cpp:40