VR-Forces 4.0.4 Class Documentation
Public Member Functions | Protected Member Functions | Protected Attributes
DtRailAStarNode Class Reference

This class is used by the DtRailPathPlanner class. More...

List of all members.

Public Member Functions

 DtRailAStarNode (const DtPoint &point, double cost, DtRailPathPlanner *pathPlanner)
virtual ~DtRailAStarNode ()
virtual bool expand (double valueLimit=1e255)
 Expands this branch of the tree until there is no A* value less than the specified value limit, or until a path to the goal is found.
virtual void generateChildNodes ()
 Generates new nodes for the immediate children of this node.
virtual void sortNodes ()
virtual bool generateOpenEdges (DtNetworkNode *node)
virtual void generateNewNode (DtNetworkNode *node, double cost, DtNetworkEdge *edge, DtNetworkEdge::DtTraversalDirection direction)
virtual void removeDeadEnds ()
virtual double aStarValue () const
virtual const DtPointpoint ()
virtual bool deadEnd ()
virtual bool visited ()
 Check if this node has been marked as visited.
virtual void markVisited ()
 Mark this node as visited.
virtual void setApproachVector (const DtPoint &approachVector)
virtual double turningCost (const DtPoint &destination)
 Returns the cost to turn from the approach vector of this node toward the destination.
virtual void postSolution ()
 Posts the solution route from the entry edge to the goal edge defined in the path planner.
virtual void setHostEdge (DtNetworkEdge *edge)
virtual DtNetworkEdgehostEdge ()
virtual void setTraversalDirection (DtNetworkEdge::DtTraversalDirection direction)
virtual
DtNetworkEdge::DtTraversalDirection 
traversalDirection () const

Protected Member Functions

virtual void addNode (DtRailAStarNode *node, std::list< DtRailAStarNode * > &list)

Protected Attributes

DtPoint myPoint
DtRailPathPlannermyPathPlanner
double myCost
double myAStarValue
bool myDeadEnd
bool myExpanded
DtPoint myApproachVector
 normalized vector indicating the direction this node was approached from
std::list< DtNetworkEdge * > myOpenEdges
 List of connecting edges for this node.
std::list< DtRailAStarNode * > myNodeSet
 Node set sorted by cost.
DtNetworkEdgemyHostEdge
 This the edge used to come to this node.
DtNetworkEdge::DtTraversalDirection myEdgeDirection
 The direction to traverse over the edge.

Detailed Description

This class is used by the DtRailPathPlanner class.

It represents a single node in the A* search algorithm and is capable of expanding itself to create the adjacent nodes.


Constructor & Destructor Documentation

DtRailAStarNode::DtRailAStarNode ( const DtPoint point,
double  cost,
DtRailPathPlanner pathPlanner 
)
virtual DtRailAStarNode::~DtRailAStarNode ( ) [virtual]

Member Function Documentation

virtual bool DtRailAStarNode::expand ( double  valueLimit = 1e255) [virtual]

Expands this branch of the tree until there is no A* value less than the specified value limit, or until a path to the goal is found.

Returns true if the goal is found, otherwise false.

virtual void DtRailAStarNode::generateChildNodes ( ) [virtual]

Generates new nodes for the immediate children of this node.

This will call calculateCost() for each new node -- expensive!

virtual void DtRailAStarNode::sortNodes ( ) [virtual]
virtual bool DtRailAStarNode::generateOpenEdges ( DtNetworkNode node) [virtual]
virtual void DtRailAStarNode::generateNewNode ( DtNetworkNode node,
double  cost,
DtNetworkEdge edge,
DtNetworkEdge::DtTraversalDirection  direction 
) [virtual]
virtual void DtRailAStarNode::removeDeadEnds ( ) [virtual]
virtual double DtRailAStarNode::aStarValue ( ) const [virtual]
virtual const DtPoint& DtRailAStarNode::point ( ) [virtual]
virtual bool DtRailAStarNode::deadEnd ( ) [virtual]
virtual bool DtRailAStarNode::visited ( ) [virtual]

Check if this node has been marked as visited.

virtual void DtRailAStarNode::markVisited ( ) [virtual]

Mark this node as visited.

virtual void DtRailAStarNode::setApproachVector ( const DtPoint approachVector) [virtual]
virtual double DtRailAStarNode::turningCost ( const DtPoint destination) [virtual]

Returns the cost to turn from the approach vector of this node toward the destination.

virtual void DtRailAStarNode::postSolution ( ) [virtual]

Posts the solution route from the entry edge to the goal edge defined in the path planner.

virtual void DtRailAStarNode::setHostEdge ( DtNetworkEdge edge) [virtual]
virtual DtNetworkEdge* DtRailAStarNode::hostEdge ( ) [virtual]
virtual void DtRailAStarNode::addNode ( DtRailAStarNode node,
std::list< DtRailAStarNode * > &  list 
) [protected, virtual]

Member Data Documentation

double DtRailAStarNode::myCost [protected]
double DtRailAStarNode::myAStarValue [protected]

normalized vector indicating the direction this node was approached from

List of connecting edges for this node.

These are used to generate the children nodes to be expanded

Node set sorted by cost.

This the edge used to come to this node.

The direction to traverse over the edge.


The documentation for this class was generated from the following file:

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)