8 #ifndef Navigation_NavcellGrid_H
9 #define Navigation_NavcellGrid_H
26 class NavGraphManager;
30 class DynamicNavMeshQuery;
32 class StaticToDynamicHalfEdge;
34 typedef Collection<NavGraphVertexRawPtr, MemStat_NavData> NavGraphVertexCollection;
35 typedef Collection<Ptr<TagVolume>, MemStat_NavData> TagVolumeCollection;
50 SmallPtrTrackedCollection<NavCell> m_navCellVersions;
51 Pool<NavGraphVertexCollection>::Key m_navGraphVertexCollectionKey;
52 Pool<TagVolumeCollection>::Key m_integratedTagVolumeCollectionKey;
53 bool m_navCellActivenessChanged;
54 bool m_onlyActiveFloorVersionChange;
72 void EnlargeGrid(const
CellBox& cellBox);
80 void UpdateStitchOneToOneAndLaunchRuntimeStitchQueries(
CellBox& cellBox, QueryProcessMode queryProcessMode);
81 void UnStitch1To1EdgesInNavCellToRemoveOrInactivate(const
CellBox& cellBox);
82 void StitchAllNew1To1EdgesInNavCellToActivateAndTagPotentialRunTimeStitchNeed(const
CellBox& cellBox);
83 void LaunchAllRunTimeStitchQuery(const
CellBox& cellBox, QueryProcessMode queryProcessMode);
85 void ComputeCellNextActivenessStatusAndLaunchDynamicNavMeshQueries(const
CellBox& cellBox, QueryProcessMode queryProcessMode);
87 void UpdateAndStitchActiveData(const
CellBox& cellBox);
94 TagVolumeCollection* GetTagVolumeCollection(
NavCellPosInfo& navCellPosInfo);
95 const TagVolumeCollection* GetTagVolumeCollection(const
NavCellPosInfo& navCellPosInfo) const;
96 TagVolumeCollection* CreateTagVolumeCollection(
NavCellPosInfo& navCellPosInfo);
98 void ProcessNavCellToRemoveOrInactivate(const
CellBox& cellBox);
99 void PostProcessRunTimeStitchQueries(
CellBox& enlargedCellBox);
101 void UpdateActiveNavFloorsInActiveData(const
CellBox& cellBox, const
CellBox& enlargedCellBox);
102 void StitchAllActiveNavFloors(const
CellBox& enlargedCellBox);
103 void RemoveAllFloorFromCorrespondingActiveCell(
NavCell* navCell);
105 void InsertNavCell(
NavCell* navCell);
106 void RemoveNavCell(
NavCell* navCell);
108 void ComputeCellNextActivenessStatus(
NavCellPosInfo& navCellPosInfo);
109 void LaunchDynamicNavMeshQueries(
NavCellPosInfo& navCellPosInfo, TagVolumeCollection* integratedTagVolumes, QueryProcessMode queryProcessMode);
110 void SelectGuidCompoundCompatibleVersions(
NavCellPosInfo& navCellPosInfo);
111 void SortCompatibleVersionsAndWhichNavCellToActivate(
NavCellPosInfo& navCellPosInfo);
113 void TryToConnectAllUnConnectedNavGraphVertexInCell(
NavCellPosInfo& navCellPosInfo);
114 void DeleteNavGraphVertexCollectionOfNavCellPosInfo(
NavCellPosInfo& navCellPosInfo);
116 void DeleteTagVolumeCollectionOfNavCellPosInfo(
NavCellPosInfo& navCellPosInfo);
118 void UpdateActiveDataWithNewNavfloors(const
CellBox& cellBox);
120 void BuildAndStoreDynamicFloorsAtCellPosBlob(
NavCell** navCells,
KyUInt32 navCellCount);
123 NavFloorStitcher m_floorStitcher;
127 MemoryHeap* m_memoryHeapForActiveNavFloorArray;
128 Pool<NavGraphVertexCollection> m_poolOfNavGraphVertexCollection;
129 Pool<TagVolumeCollection> m_poolOfTagVolumeCollection;
130 BitFieldMemStat<MemStat_NavData> m_stitchedCellIsDiscarded;
136 m_poolOfNavGraphVertexCollection.Delete(navCellPosInfo.m_navGraphVertexCollectionKey);
137 navCellPosInfo.m_navGraphVertexCollectionKey.Invalidate();
140 KY_INLINE TagVolumeCollection* NavCellGrid::GetTagVolumeCollection(
NavCellPosInfo& navCellPosInfo)
142 return navCellPosInfo.m_integratedTagVolumeCollectionKey.IsValid() ? &m_poolOfTagVolumeCollection.Get(navCellPosInfo.m_integratedTagVolumeCollectionKey) :
KY_NULL;
145 KY_INLINE
const TagVolumeCollection*NavCellGrid:: GetTagVolumeCollection(
const NavCellPosInfo& navCellPosInfo)
const
147 return navCellPosInfo.m_integratedTagVolumeCollectionKey.IsValid() ? &m_poolOfTagVolumeCollection.Get(navCellPosInfo.m_integratedTagVolumeCollectionKey) :
KY_NULL;
152 #endif //Navigation_NavcellGrid_H
General purpose array for movable objects that DOES NOT require construction/destruction.
Definition: kyarray.h:156
This class is a runtime wrapper of a NavMeshElementBlob.
Definition: navmeshelement.h:24
This class represents a two-dimensional axis-aligned bounding box whose dimensions are stored using 3...
Definition: box2i.h:119
The NavFloorBlob contains a connected and not overlapping part of triangle mesh static data within a ...
Definition: navfloorblob.h:42
General purpose array for movable objects that require explicit construction/destruction.
Definition: kyarray.h:118
#define KY_NULL
Null value.
Definition: types.h:247
The BlobHandler class is a top-level mechanism for serializing blobs between objects in memory and fi...
Definition: blobhandler.h:45
#define KY_CLASS_WITHOUT_COPY(ClassName)
Define to forbid copy constructor and copy assignment.
Definition: types.h:387
This class is a runtime wrapper of a NavCellBlob.
Definition: navcell.h:33
The DynamicNavMeshQuery is used to recompute a NavCell impacted by newly projected TagVolumes or remo...
Definition: dynamicnavmeshquery.h:83
This object gather all the data located at a CellPos in the CellPos-bases grid of the NavCellGrid obj...
Definition: navcellgrid.h:41
This class is a runtime container for all NavData that represents the world from the point of view of...
Definition: database.h:64
This class defines a two-dimensional vector whose coordinates are stored using 32-bit integers...
Definition: vec2i.h:26
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
Each instance of this class uniquely identifies a single NavGraphVertex in a NavGraph.
Definition: navgraphvertexrawptr.h:36
This class is an internal class used to manage all the NavCell in a grid.
Definition: navcellgrid.h:66