31#include "common/list.h"
32#include "hpl1/engine/game/GameTypes.h"
33#include "hpl1/engine/math/MathTypes.h"
34#include "hpl1/engine/system/SystemTypes.h"
38class cAINodeContainer;
44typedef tAINodeSet::iterator tAINodeSetIt;
70typedef tAStarNodeSet::iterator tAStarNodeSetIt;
79 virtual bool CanAddNode(
cAINode *apParentNode,
cAINode *apChildNode) = 0;
97 void SetCallback(
iAStarCallback *apCallback) { mpCallback = apCallback; }
100 void IterateAlgorithm();
102 void AddOpenNode(cAINode *apAINode, cAStarNode *apParent,
float afDistance);
104 cAStarNode *GetBestNode();
106 float Cost(
float afDistance, cAINode *apAINode, cAStarNode *apParent);
107 float Heuristic(
const cVector3f &avStart,
const cVector3f &avGoal);
109 bool IsGoalNode(cAINode *apAINode);
113 cAStarNode *mpGoalNode;
114 tAINodeSet m_setGoalNodes;
116 cAINodeContainer *mpContainer;
120 iAStarCallback *mpCallback;
122 tAStarNodeSet m_setOpenList;
123 tAStarNodeSet m_setClosedList;
ListInternal::Iterator< cAINode * > iterator
Definition: list.h:52
Definition: AINodeContainer.h:158
Definition: AINodeContainer.h:65
void SetMaxIterations(int alX)
Definition: AStar.h:95