![]() |
VR-Forces 4.0.4 Class Documentation
|
This class is used by the DtRailPathPlanner class. More...
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 DtPoint & | point () |
| 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 DtNetworkEdge * | hostEdge () |
| 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 |
| DtRailPathPlanner * | myPathPlanner |
| 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. | |
| DtNetworkEdge * | myHostEdge |
| This the edge used to come to this node. | |
| DtNetworkEdge::DtTraversalDirection | myEdgeDirection |
| The direction to traverse over the edge. | |
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.
| DtRailAStarNode::DtRailAStarNode | ( | const DtPoint & | point, |
| double | cost, | ||
| DtRailPathPlanner * | pathPlanner | ||
| ) |
| virtual DtRailAStarNode::~DtRailAStarNode | ( | ) | [virtual] |
| 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::setTraversalDirection | ( | DtNetworkEdge::DtTraversalDirection | direction | ) | [virtual] |
| virtual DtNetworkEdge::DtTraversalDirection DtRailAStarNode::traversalDirection | ( | ) | const [virtual] |
| virtual void DtRailAStarNode::addNode | ( | DtRailAStarNode * | node, |
| std::list< DtRailAStarNode * > & | list | ||
| ) | [protected, virtual] |
DtPoint DtRailAStarNode::myPoint [protected] |
DtRailPathPlanner* DtRailAStarNode::myPathPlanner [protected] |
double DtRailAStarNode::myCost [protected] |
double DtRailAStarNode::myAStarValue [protected] |
bool DtRailAStarNode::myDeadEnd [protected] |
bool DtRailAStarNode::myExpanded [protected] |
DtPoint DtRailAStarNode::myApproachVector [protected] |
normalized vector indicating the direction this node was approached from
std::list<DtNetworkEdge*> DtRailAStarNode::myOpenEdges [protected] |
List of connecting edges for this node.
These are used to generate the children nodes to be expanded
std::list<DtRailAStarNode*> DtRailAStarNode::myNodeSet [protected] |
Node set sorted by cost.
DtNetworkEdge* DtRailAStarNode::myHostEdge [protected] |
This the edge used to come to this node.
The direction to traverse over the edge.