![]() |
VR-Forces 4.0.4 Class Documentation
|
This class is used by the DtPathPlanner class. More...

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 DtPoint & | point () |
| 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 |
| DtPathPlanner * | myPathPlanner |
| double | myCost |
| double | myAStarValue |
| DtList * | myNodeList |
| bool | myDeadEnd |
| bool | myExpanded |
| DtPoint | myApproachVector |
| normalized vector indicating the direction this node was approached from | |
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.
| DtAStarNode::DtAStarNode | ( | const DtPoint & | point, |
| double | cost, | ||
| DtPathPlanner * | pathPlanner | ||
| ) |
| virtual DtAStarNode::~DtAStarNode | ( | ) | [virtual] |
| 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.
DtPoint DtAStarNode::myPoint [protected] |
DtPathPlanner* DtAStarNode::myPathPlanner [protected] |
double DtAStarNode::myCost [protected] |
double DtAStarNode::myAStarValue [protected] |
DtList* DtAStarNode::myNodeList [protected] |
bool DtAStarNode::myDeadEnd [protected] |
bool DtAStarNode::myExpanded [protected] |
DtPoint DtAStarNode::myApproachVector [protected] |
normalized vector indicating the direction this node was approached from