gwnavruntime/abstractgraph/abstractgraph.h Source File
Go to the documentation of this file.
7 #ifndef Navigation_AbstractGraph_H
8 #define Navigation_AbstractGraph_H
24 class AbstractGraphCellGrid;
25 class AbstractGraphBlob;
28 class ScopedDisplayList;
33 class AbstractGraphNodeLink
36 enum NavMeshLinkStatus
38 NavMeshLink_NoNavMesh = 0,
39 NavMeshLink_Inside = 1,
45 AbstractGraphNodeLink()
46 : m_navMeshLinkStatus(NavMeshLink_Undefined)
49 bool CanTraverse()
const {
return m_pairedNodeIdx.IsValid(); }
52 LoadedAbstractGraphNodeIdx m_pairedNodeIdx;
53 NavMeshLinkStatus m_navMeshLinkStatus;
64 static Ptr<AbstractGraph> Create(AbstractGraphBlob* abstractGraphBlob, Database* database, MemoryHeap* pheap =
KY_NULL);
66 KyUInt32 GetNodeCount()
const {
return m_blob->GetNodeCount(); }
68 Vec3f GetNodePosition(
const LoadedAbstractGraphNodeIdx& node)
const;
69 Vec3f GetNodePosition(AbstractGraphNodeIdx nodeIdx)
const;
73 KyFloat32 GetNeighborCost(AbstractGraphNodeIdx fromGraphNodeIdx, AbstractGraphNodeIdx toGraphNodeIdx)
const;
75 const AbstractGraphCellBlob* GetAbstractGraphCellBlob(
const LoadedAbstractGraphCellIdx cellIdx)
const;
76 AbstractGraphCellGrid* GetAbstractGraphCellGrid()
const;
77 Database* GetDatabase()
const;
80 KyUInt32 GetIndexInCollection()
const {
return m_abstractGraphIdx; }
81 void SetIndexInCollection(
KyUInt32 indexInCollection);
83 bool IsNodePaired(
const LoadedAbstractGraphNodeIdx& node)
const;
84 bool IsNodePaired(AbstractGraphNodeIdx nodeIdx)
const;
89 DebugDisplay_AbstractEdges = 1 << 0,
90 DebugDisplay_CellBoxCoverage = 1 << 1,
93 void Display(ScopedDisplayList& displayList,
const VisualColor& color, DebugDisplay debugDisplay = DebugDisplay_All);
97 const AbstractGraphBlob* m_blob;
98 AbstractGraphNodeLink* m_links;
99 AbstractGraphIdx m_abstractGraphIdx;
#define KY_REFCOUNT_MALLOC_FREE(ClassName)
Specific to RefCounting, no inheritance involved, used to make RefCount-able classes compatible with ...
Definition: memory.h:145
#define KY_NULL
Null value.
Definition: types.h:247
#define KY_CLASS_WITHOUT_COPY(ClassName)
Define to forbid copy constructor and copy assignment.
Definition: types.h:387
Definition: gamekitcrowddispersion.h:20
#define KY_DEFINE_NEW_DELETE_OPERATORS(MemStat)
This macro defines new and delete operators.
Definition: memory.h:137
unsigned int KyUInt32
Type used internally to represent an unsigned 32-bit integer.
Definition: types.h:36
#define KyUInt32MAXVAL
The maximum value that can be stored in the KyUInt32 variable type.
Definition: types.h:226
float KyFloat32
Type used internally to represent a 32-bit floating-point number.
Definition: types.h:43