PathNodeHelper is a helper class used in pathfinding to track the visited state and cost information. More...
Public Types | |
enum | PathNodeHelperState |
Enum defining the path node states vs. the traditional open/closed lists. States are OPEN, CLOSED, and UNVISITED. More... | |
Public Member Functions | |
PathNodeHelper (int nodeIndex) | |
Constructor. | |
virtual int | CompareTo (PathGraph graph, PathNodeHelper h) |
Compares two path node helpers to determine which has the lower static cost. | |
virtual float | HeuristicCostFrom (PathGraph graph, int nodeIndex) |
The calculated heuristic cost from this node to a destination. | |
virtual float | HeuristicCostTo (PathGraph graph, int nodeIndex) |
The calculated heuristic cost to this node from a starting point. | |
Protected Attributes | |
int | _nodeIndex |
The node index of the path graph node tracked by this helper. | |
Properties | |
int | NodeIndex [get] |
The node index of the path graph node represented. | |
PathNodeHelperState | State [get, set] |
The open, closed, or unvisited state. | |
int | HeapPosition [get, set] |
The priority heap index of this node. | |
float | StaticCost [get, set] |
The current known static cost to reach this node from the start. |
PathNodeHelper is a helper class used in pathfinding to track the visited state and cost information.
Enum defining the path node states vs. the traditional open/closed lists. States are OPEN, CLOSED, and UNVISITED.
RAIN.Path.PathNodeHelper.PathNodeHelper | ( | int | nodeIndex | ) |
Constructor.
nodeIndex | The node index of the graph node to represent |
virtual int RAIN.Path.PathNodeHelper.CompareTo | ( | PathGraph | graph, |
PathNodeHelper | h | ||
) | [virtual] |
Compares two path node helpers to determine which has the lower static cost.
h | The pathnode helper to compare to |
Reimplemented in RAIN.Path.LPAPathNodeHelper.
virtual float RAIN.Path.PathNodeHelper.HeuristicCostFrom | ( | PathGraph | graph, |
int | nodeIndex | ||
) | [virtual] |
The calculated heuristic cost from this node to a destination.
graph | The graph traversed |
nodeIndex | The index of the To node |
virtual float RAIN.Path.PathNodeHelper.HeuristicCostTo | ( | PathGraph | graph, |
int | nodeIndex | ||
) | [virtual] |
The calculated heuristic cost to this node from a starting point.
graph | The graph traversed. |
nodeIndex | The index of the From node |
int RAIN.Path.PathNodeHelper._nodeIndex [protected] |
The node index of the path graph node tracked by this helper.
int RAIN.Path.PathNodeHelper.HeapPosition [get, set] |
The priority heap index of this node.
int RAIN.Path.PathNodeHelper.NodeIndex [get] |
The node index of the path graph node represented.
The open, closed, or unvisited state.
float RAIN.Path.PathNodeHelper.StaticCost [get, set] |
The current known static cost to reach this node from the start.