RAIN.Path.PathNodeHelper Class Reference

PathNodeHelper is a helper class used in pathfinding to track the visited state and cost information. More...

Inheritance diagram for RAIN.Path.PathNodeHelper:
RAIN.Path.LPAPathNodeHelper

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:
nodeIndexThe node index of the graph node to represent

Member Function Documentation

virtual int RAIN.Path.PathNodeHelper.CompareTo ( PathGraph  graph,
PathNodeHelper  h 
) [virtual]

Compares two path node helpers to determine which has the lower static cost.

Parameters:
hThe 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:
graphThe graph traversed
nodeIndexThe 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:
graphThe graph traversed.
nodeIndexThe 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.

PathNodeHelperState RAIN.Path.PathNodeHelper.State [get, set]

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.