28 #ifndef HPL_AI_NODE_CONTAINER_H 29 #define HPL_AI_NODE_CONTAINER_H 31 #include "hpl1/engine/math/MathTypes.h" 32 #include "hpl1/engine/system/SystemTypes.h" 34 #include "common/array.h" 35 #include "common/list.h" 36 #include "hpl1/engine/physics/PhysicsWorld.h" 44 typedef tFlag tAIFreePathFlag;
46 #define eAIFreePathFlag_SkipStatic (0x00000001) 47 #define eAIFreePathFlag_SkipDynamic (0x00000002) 48 #define eAIFreePathFlag_SkipVolatile (0x00000004) 74 int GetEdgeNum()
const {
return (
int)mvEdges.size(); }
75 inline cAINodeEdge *GetEdge(
int alIdx) {
return &mvEdges[alIdx]; }
77 const cVector3f &GetPosition() {
return mvPosition; }
79 const tString &GetName() {
return msName; }
86 tAINodeEdgeVec mvEdges;
111 void SetFlags(tAIFreePathFlag aFlags) { mFlags = aFlags; }
122 tAIFreePathFlag mFlags;
129 tAINodeList mlstNodes;
152 tAINodeList *mpNodeList;
153 tAINodeListIt mNodeIt;
166 const tString &GetNodeName() {
return msNodeName; }
167 const tString &GetName() {
return msName; }
169 const cVector3f &GetCollideSize() {
return mvSize; }
175 void ReserveSpace(
size_t alReserveSpace);
183 void AddNode(
const tString &asName,
const cVector3f &avPosition,
void *apUserData = NULL);
188 int GetNodeNum()
const;
210 void BuildNodeGridMap();
249 float GetMaxEdgeDistance()
const {
return mfMaxEndDistance; }
251 void SetMaxHeight(
float afX) { mfMaxHeight = afX; }
252 float GetMaxHeight()
const {
return mfMaxHeight; }
259 bool GetNodeIsAtCenter() {
return mbNodeIsAtCenter; }
264 void SaveToFile(
const tString &asFile);
268 void LoadFromFile(
const tString &asFile);
282 tAINodeMap m_mapNodes;
284 bool mbNodeIsAtCenter;
297 float mfMaxEndDistance;
303 #endif // HPL_AI_NODE_CONTAINER_H
Definition: AINodeContainer.h:108
Definition: PhysicsWorld.h:92
Definition: PhysicsWorld.h:100
cAINodeEdge * iterator
Definition: array.h:54
void SetMaxEdgeDistance(float afX)
Definition: AINodeContainer.h:247
typename TreeT::BasicIterator iterator
Definition: stablemap.h:48
Definition: AINodeContainer.h:65
cAINode * GetNode(int alIdx)
Definition: AINodeContainer.h:194
Definition: AINodeContainer.h:135
void SetMinEdges(int alX)
Definition: AINodeContainer.h:241
Definition: AINodeContainer.h:53
Definition: PhysicsBody.h:117
Definition: World3D.h:179
void SetMaxEdges(int alX)
Definition: AINodeContainer.h:236
Definition: AINodeContainer.h:158
Definition: AINodeContainer.h:100
void SetNodeIsAtCenter(bool abX)
Definition: AINodeContainer.h:258
Definition: list_intern.h:51
Definition: AINodeContainer.h:127