#include <astarnode.h>

Public Types | |
| typedef _DataType | data_type |
| typedef _CostType | cost_type |
| typedef _IterType | iterator |
| typedef _NodeType | node_type |
| typedef AStarNode< _NodeType, _DataType, _IterType, _CostType > | BaseType |
Public Member Functions | |
| AStarNode (node_type *pParent, data_type pData, cost_type pGn, cost_type pHn) | |
| virtual | ~AStarNode () |
| bool | operator== (const AStarNode &pNode) const |
| equality is based on the class data_type's operator == | |
| bool | operator!= (const AStarNode &pNode) |
| bool | operator< (const AStarNode &pType) const |
| we use operator < to compare costs between nodes | |
| node_type * | GetParent () |
| cost_type | GetCostToNode () const |
| This is the cost to get to the node from the start in common AStar terms it is called cost g(n). | |
| cost_type | GetCostToGoal () const |
| This is the cost to get from the node to the end in common AStar terms it is called cost h(n). | |
| data_type | GetData () |
| const data_type | GetData () const |
| virtual iterator | begin () const =0 |
| returns an iterator to the first acceptable point from this node | |
| virtual iterator | end () const =0 |
| returns an iterator one past the last acceptable point from this node | |
Protected Member Functions | |
| AStarNode (const AStarNode &pNode) | |
| AStarNode & | operator= (const AStarNode &pNode) |
Protected Attributes | |
| data_type | mData |
| cost_type | mCostToNode |
| cost_type | mCostToGoal |
| node_type * | mParent |
This class is the base node type for AStar, it holds the cost of the path the actual data type, and a pointer to its parent for bookkeeping.
Derive this class and implement the pure virtual begin() and end() functions which should return iterators of type _IterType and support operator++ to iterate through the data types that this data type can get to.
| typedef _DataType dtAI::AStarNode< _NodeType, _DataType, _IterType, _CostType >::data_type |
| typedef _CostType dtAI::AStarNode< _NodeType, _DataType, _IterType, _CostType >::cost_type |
| typedef _IterType dtAI::AStarNode< _NodeType, _DataType, _IterType, _CostType >::iterator |
| typedef _NodeType dtAI::AStarNode< _NodeType, _DataType, _IterType, _CostType >::node_type |
| typedef AStarNode<_NodeType, _DataType, _IterType, _CostType> dtAI::AStarNode< _NodeType, _DataType, _IterType, _CostType >::BaseType |
| dtAI::AStarNode< _NodeType, _DataType, _IterType, _CostType >::AStarNode | ( | node_type * | pParent, | |
| data_type | pData, | |||
| cost_type | pGn, | |||
| cost_type | pHn | |||
| ) | [inline] |
| virtual dtAI::AStarNode< _NodeType, _DataType, _IterType, _CostType >::~AStarNode | ( | ) | [inline, virtual] |
| dtAI::AStarNode< _NodeType, _DataType, _IterType, _CostType >::AStarNode | ( | const AStarNode< _NodeType, _DataType, _IterType, _CostType > & | pNode | ) | [protected] |
| bool dtAI::AStarNode< _NodeType, _DataType, _IterType, _CostType >::operator== | ( | const AStarNode< _NodeType, _DataType, _IterType, _CostType > & | pNode | ) | const [inline] |
equality is based on the class data_type's operator ==
| bool dtAI::AStarNode< _NodeType, _DataType, _IterType, _CostType >::operator!= | ( | const AStarNode< _NodeType, _DataType, _IterType, _CostType > & | pNode | ) | [inline] |
| bool dtAI::AStarNode< _NodeType, _DataType, _IterType, _CostType >::operator< | ( | const AStarNode< _NodeType, _DataType, _IterType, _CostType > & | pType | ) | const [inline] |
we use operator < to compare costs between nodes
| node_type* dtAI::AStarNode< _NodeType, _DataType, _IterType, _CostType >::GetParent | ( | ) | [inline] |
| cost_type dtAI::AStarNode< _NodeType, _DataType, _IterType, _CostType >::GetCostToNode | ( | ) | const [inline] |
This is the cost to get to the node from the start in common AStar terms it is called cost g(n).
| cost_type dtAI::AStarNode< _NodeType, _DataType, _IterType, _CostType >::GetCostToGoal | ( | ) | const [inline] |
This is the cost to get from the node to the end in common AStar terms it is called cost h(n).
| data_type dtAI::AStarNode< _NodeType, _DataType, _IterType, _CostType >::GetData | ( | ) | [inline] |
| const data_type dtAI::AStarNode< _NodeType, _DataType, _IterType, _CostType >::GetData | ( | ) | const [inline] |
| virtual iterator dtAI::AStarNode< _NodeType, _DataType, _IterType, _CostType >::begin | ( | ) | const [pure virtual] |
| virtual iterator dtAI::AStarNode< _NodeType, _DataType, _IterType, _CostType >::end | ( | ) | const [pure virtual] |
returns an iterator one past the last acceptable point from this node
Implemented in dtAI::WaypointNode.
| AStarNode& dtAI::AStarNode< _NodeType, _DataType, _IterType, _CostType >::operator= | ( | const AStarNode< _NodeType, _DataType, _IterType, _CostType > & | pNode | ) | [protected] |
data_type dtAI::AStarNode< _NodeType, _DataType, _IterType, _CostType >::mData [protected] |
cost_type dtAI::AStarNode< _NodeType, _DataType, _IterType, _CostType >::mCostToNode [protected] |
cost_type dtAI::AStarNode< _NodeType, _DataType, _IterType, _CostType >::mCostToGoal [protected] |
node_type* dtAI::AStarNode< _NodeType, _DataType, _IterType, _CostType >::mParent [protected] |