Plasma Engine  2.0
Loading...
Searching...
No Matches
plGridNavmesh Class Reference

Takes an plGameGrid and creates an optimized navmesh structure from it, that is more efficient for path searches. More...

#include <GridNavmesh.h>

Classes

struct  AreaEdge
 
struct  ConvexArea
 

Public Types

using CellComparator = bool (*)(plUInt32, plUInt32, void*)
 Callback that determines whether the cell with index uiCell1 and the cell with index uiCell2 represent the same type of terrain.
 
using CellBlocked = bool (*)(plUInt32, void*)
 Callback that determines whether the cell with index uiCell is blocked entirely (for every type of unit) and therefore can be optimized away.
 

Public Member Functions

template<class CellData >
void CreateFromGrid (const plGameGrid< CellData > &grid, CellComparator isSameCellType, void *pPassThroughSame, CellBlocked isCellBlocked, void *pPassThroughBlocked)
 Creates the navmesh from the given plGameGrid.
 
plInt32 GetAreaAt (const plVec2I32 &vCoord) const
 Returns the index of the ConvexArea at the given cell coordinates. Negative, if the cell is blocked.
 
plUInt32 GetNumConvexAreas () const
 Returns the number of convex areas that this navmesh consists of.
 
const ConvexAreaGetConvexArea (plInt32 iArea) const
 Returns the given convex area by index.
 
plUInt32 GetNumAreaEdges () const
 Returns the number of edges between convex areas.
 
const AreaEdgeGetAreaEdge (plInt32 iAreaEdge) const
 Returns the given area edge by index.
 

Detailed Description

Takes an plGameGrid and creates an optimized navmesh structure from it, that is more efficient for path searches.


The documentation for this class was generated from the following files: