16 class ConnectedNavGraph;
17 class NavGraphMemoryManager;
30 bool IsStillLoaded()
const;
31 bool IsActive()
const;
33 const NavGraphEdgeInfo& GetNavGraphEdgeInfo(
const NavGraphEdgeSmartIdx& edgeIdInGraph)
const;
36 void SetIdxInTheActiveDataBuffer(NavGraphIdxInActiveData idxInTheBufferOfStitchedGraph);
37 NavGraphIdxInActiveData GetIdxInTheActiveDataBuffer()
const;
40 GraphEdgeData& GetEdgeData(NavGraphEdgeSmartIdx navGraphEdgeSmartIdx)
const;
42 KyUInt32 GetIdxInTheBufferOfNavGraph()
const {
return GetIndexInCollection(); }
44 KyUInt32 GetIndexInCollection()
const {
return m_indexInCollection; }
45 void SetIndexInCollection(
KyUInt32 indexInCollection) { m_indexInCollection = indexInCollection; }
47 void ComputeAllCellPosOfVerticesAndCellBox();
50 static Ptr<NavGraph> Create(
const NavGraphBlob* navGraphBlob,
Database* database, MemoryHeap* pheap = 0);
53 void DebugCheckIsStillLoaded()
const;
59 NavGraphIdxInActiveData m_idxInTheActiveDataBuffer;
63 GraphVertexData* m_vertexDatas;
64 GraphEdgeData* m_edgeDatas;
69 KY_INLINE
void NavGraph::DebugCheckIsStillLoaded()
const
71 KY_LOG_ERROR_IF(IsStillLoaded() ==
false, (
"You Cannot call this function if graph has been unloaded"));
74 KY_INLINE
const NavGraphBlob* NavGraph::GetNavGraphBlob()
const
76 DebugCheckIsStillLoaded();
77 return m_navGraphBlob;
80 KY_INLINE
void NavGraph::SetIdxInTheActiveDataBuffer(NavGraphIdxInActiveData idxInTheBufferOfStitchedGraph)
82 DebugCheckIsStillLoaded();
83 m_idxInTheActiveDataBuffer = idxInTheBufferOfStitchedGraph;
86 KY_INLINE NavGraphIdxInActiveData NavGraph::GetIdxInTheActiveDataBuffer()
const
88 DebugCheckIsStillLoaded();
89 return m_idxInTheActiveDataBuffer;
92 KY_INLINE GraphVertexData& NavGraph::GetGraphVertexData(
NavGraphVertexIdx vertexIdx)
const
94 DebugCheckIsStillLoaded();
95 return m_vertexDatas[vertexIdx];
97 KY_INLINE GraphEdgeData& NavGraph::GetEdgeData(NavGraphEdgeSmartIdx navGraphEdgeSmartIdx)
const
99 DebugCheckIsStillLoaded();
100 return m_edgeDatas[m_vertexDatas[navGraphEdgeSmartIdx.GetStartVertexIdx()].m_startIdxInEdgeDataArray + navGraphEdgeSmartIdx.GetNeighborVertexIdx()];
103 KY_INLINE
bool NavGraph::IsActive()
const {
return GetIdxInTheActiveDataBuffer() != NavGraphIdxInActiveData_Invalid; }
104 KY_INLINE
bool NavGraph::IsStillLoaded()
const {
return m_navGraphBlob !=
nullptr; }
105 KY_INLINE
void NavGraph::OnRemove() { m_navGraphBlob =
nullptr; }
The NavGraphBlob contains the static data of a NavGraph.
Definition: navgraphblob.h:19
KyUInt32 NavGraphVertexIdx
An index that uniquely identifies a single vertex within the set of vertices owned by a NavGraph...
Definition: navgraphtypes.h:45
2d axis aligned box of 32bits integers. Very Important: CountX() returns m_max.x - m_min...
Definition: box2i.h:17
std::uint32_t KyUInt32
uint32_t
Definition: types.h:29
#define KY_REFCOUNT_MALLOC_FREE(ClassName)
Specific to RefCounting, no inheritance involved, used to make RefCount-able classes compatible with ...
Definition: memory.h:141
#define KY_CLASS_WITHOUT_COPY(ClassName)
Define to forbid copy constructor and copy assignment.
Definition: types.h:196
#define KY_DEFINE_NEW_DELETE_OPERATORS(MemStat)
This macro defines new and delete operators.
Definition: memory.h:132
The NavData class is the object containing navigation data that will be added to one Database...
Definition: navdata.h:39
This class is a runtime container for all NavData that represents the world from the point of view of...
Definition: database.h:57
The Autodesk Navigation namespace.
Definition: gamekitcrowddispersion.cpp:17
This class is a runtime wrapper of a NavGraphBlob, it gathers all the runtime information associated ...
Definition: navgraph.h:22