3#include <Foundation/Containers/Deque.h>
4#include <Foundation/Math/Rect.h>
5#include <Utilities/DataStructures/GameGrid.h>
13 PL_DECLARE_POD_TYPE();
27 PL_DECLARE_POD_TYPE();
46 template <
class CellData>
66 void UpdateRegion(
plRectU32 region, CellComparator IsSameCellType,
void* pPassThrough1, CellBlocked IsCellBlocked,
void* pPassThrough2);
68 void Optimize(
plRectU32 region, CellComparator IsSameCellType,
void* pPassThrough);
69 bool OptimizeBoxes(
plRectU32 region, CellComparator IsSameCellType,
void* pPassThrough, plUInt32 uiIntervalX, plUInt32 uiIntervalY,
70 plUInt32 uiWidth, plUInt32 uiHeight, plUInt32 uiOffsetX = 0, plUInt32 uiOffsetY = 0);
71 bool CanCreateArea(
plRectU32 region, CellComparator IsSameCellType,
void* pPassThrough)
const;
73 bool CanMergeRight(plInt32 x, plInt32 y, CellComparator IsSameCellType,
void* pPassThrough,
plRectU32& out_Result)
const;
74 bool CanMergeDown(plInt32 x, plInt32 y, CellComparator IsSameCellType,
void* pPassThrough,
plRectU32& out_Result)
const;
75 bool MergeBestFit(
plRectU32 region, CellComparator IsSameCellType,
void* pPassThrough);
77 void CreateGraphEdges();
78 void CreateGraphEdges(ConvexArea& Area);
80 plRectU32 GetCellBBox(plInt32 x, plInt32 y)
const;
82 void CreateNodes(
plRectU32 region, CellBlocked IsCellBlocked,
void* pPassThrough);
89#include <Utilities/PathFinding/Implementation/GridNavmesh_inl.h>
Definition DynamicArray.h:81
plGameGrid is a general purpose 2D grid structure that has several convenience functions which are of...
Definition GameGrid.h:13
Takes an plGameGrid and creates an optimized navmesh structure from it, that is more efficient for pa...
Definition GridNavmesh.h:9
bool(*)(plUInt32, plUInt32, void *) CellComparator
Callback that determines whether the cell with index uiCell1 and the cell with index uiCell2 represen...
Definition GridNavmesh.h:39
plUInt32 GetNumConvexAreas() const
Returns the number of convex areas that this navmesh consists of.
Definition GridNavmesh.h:54
plInt32 GetAreaAt(const plVec2I32 &vCoord) const
Returns the index of the ConvexArea at the given cell coordinates. Negative, if the cell is blocked.
Definition GridNavmesh.h:51
const AreaEdge & GetAreaEdge(plInt32 iAreaEdge) const
Returns the given area edge by index.
Definition GridNavmesh.h:63
plUInt32 GetNumAreaEdges() const
Returns the number of edges between convex areas.
Definition GridNavmesh.h:60
bool(*)(plUInt32, void *) CellBlocked
Callback that determines whether the cell with index uiCell is blocked entirely (for every type of un...
Definition GridNavmesh.h:43
const ConvexArea & GetConvexArea(plInt32 iArea) const
Returns the given convex area by index.
Definition GridNavmesh.h:57
Definition GridNavmesh.h:26
plInt32 m_iNeighborArea
The index of the area that can be reached over this edge. This is always a valid index.
Definition GridNavmesh.h:34
plRectU16 m_EdgeRect
Definition GridNavmesh.h:31
Definition GridNavmesh.h:12
plRectU32 m_Rect
The space that is enclosed by this convex area.
Definition GridNavmesh.h:16
plUInt32 m_uiFirstEdge
The first AreaEdge that belongs to this ConvexArea.
Definition GridNavmesh.h:19
plUInt32 m_uiNumEdges
The number of AreaEdge's that belong to this ConvexArea.
Definition GridNavmesh.h:22