PathNodeHelper is a helper class used in pathfinding to track the visited state and cost information.
More...
List of all members.
Public Types |
enum | PathNodeHelperState { OPEN,
CLOSED,
UNVISITED
} |
| 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.
|
Detailed Description
PathNodeHelper is a helper class used in pathfinding to track the visited state and cost information.
Member Enumeration Documentation
Enum defining the path node states vs. the traditional open/closed lists. States are OPEN, CLOSED, and UNVISITED.
Constructor & Destructor Documentation
RAIN.Path.PathNodeHelper.PathNodeHelper |
( |
int |
nodeIndex | ) |
|
Constructor.
- Parameters:
-
nodeIndex | The node index of the graph node to represent |
Member Function Documentation
Compares two path node helpers to determine which has the lower static cost.
- Parameters:
-
h | The pathnode helper to compare to |
- Returns:
- -1 if h has a higher cost, 1 if h has a lower cost, 0 if the two are equal
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.
- Parameters:
-
graph | The graph traversed |
nodeIndex | The index of the To node |
- Returns:
virtual float RAIN.Path.PathNodeHelper.HeuristicCostTo |
( |
PathGraph |
graph, |
|
|
int |
nodeIndex |
|
) |
| [virtual] |
The calculated heuristic cost to this node from a starting point.
- Parameters:
-
graph | The graph traversed. |
nodeIndex | The index of the From node |
- Returns:
Member Data Documentation
The node index of the path graph node tracked by this helper.
Property Documentation
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.