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

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

Inheritance diagram for DtAStarNode:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 DtAStarNode (const DtPoint &point, double cost, DtPathPlanner *pathPlanner)
virtual ~DtAStarNode ()
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 ()=0
 Generates new nodes for the immediate children of this node.
virtual void sortNodes ()
 Reorders myNodeList based on the A* value of each node.
virtual void removeDeadEnds ()
 Removes any dead-end nodes from the node list.
virtual double aStarValue ()
virtual const DtPointpoint ()
virtual bool deadEnd ()
virtual void postSolution ()
 Posts the solution route from this node to the goal to the pathPlanner object using addSolutionPoint().
virtual bool visited ()=0
 Check if this node has been marked as visited.
virtual void markVisited ()=0
 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.

Protected Member Functions

virtual void nearbyPreferredSegments (const DtPoint &point, std::list< const DtNetworkSegment * > &resultList)
 Uses the preferred segment metrics from the path planner to generate a list of all preferred segments near the specified point, and returns in in resultList.

Protected Attributes

DtPoint myPoint
DtPathPlannermyPathPlanner
double myCost
double myAStarValue
DtList * myNodeList
bool myDeadEnd
bool myExpanded
DtPoint myApproachVector
 normalized vector indicating the direction this node was approached from

Detailed Description

This class is used by the DtPathPlanner class.

In represents a single node in the A* search algorithm and is capable of expanding itself to create the adjecent nodes. This is an abstract base class. DtGridPathNode and DtVectorPathNode are concreate classes that are used by DtPathPlanner.


Constructor & Destructor Documentation

DtAStarNode::DtAStarNode ( const DtPoint point,
double  cost,
DtPathPlanner pathPlanner 
)
virtual DtAStarNode::~DtAStarNode ( ) [virtual]

Member Function Documentation

virtual bool DtAStarNode::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 DtAStarNode::generateChildNodes ( ) [pure virtual]

Generates new nodes for the immediate children of this node.

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

Implemented in DtVectorPathNode, and DtGridPathNode.

virtual void DtAStarNode::sortNodes ( ) [virtual]

Reorders myNodeList based on the A* value of each node.

virtual void DtAStarNode::removeDeadEnds ( ) [virtual]

Removes any dead-end nodes from the node list.

virtual double DtAStarNode::aStarValue ( ) [virtual]
virtual const DtPoint& DtAStarNode::point ( ) [virtual]
virtual bool DtAStarNode::deadEnd ( ) [virtual]
virtual void DtAStarNode::postSolution ( ) [virtual]

Posts the solution route from this node to the goal to the pathPlanner object using addSolutionPoint().

virtual bool DtAStarNode::visited ( ) [pure virtual]

Check if this node has been marked as visited.

Implemented in DtVectorPathNode, and DtGridPathNode.

virtual void DtAStarNode::markVisited ( ) [pure virtual]

Mark this node as visited.

Implemented in DtVectorPathNode, and DtGridPathNode.

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

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

virtual void DtAStarNode::nearbyPreferredSegments ( const DtPoint point,
std::list< const DtNetworkSegment * > &  resultList 
) [protected, virtual]

Uses the preferred segment metrics from the path planner to generate a list of all preferred segments near the specified point, and returns in in resultList.


Member Data Documentation

double DtAStarNode::myCost [protected]
double DtAStarNode::myAStarValue [protected]
DtList* DtAStarNode::myNodeList [protected]

normalized vector indicating the direction this node was approached from


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)