XII Release 0.1.0
Loading...
Searching...
No Matches
xiiGridNavmesh Class Reference

Copyright (c) Theophilus Eriata. All Rights Reserved. More...

#include <GridNavmesh.h>

Classes

struct  ConvexArea
struct  AreaEdge

Public Types

using CellComparator = bool (*)(xiiUInt32, xiiUInt32, void*)
using CellBlocked = bool (*)(xiiUInt32, void*)

Public Member Functions

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

Detailed Description

Copyright (c) Theophilus Eriata. All Rights Reserved.

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

Member Typedef Documentation

◆ CellBlocked

using xiiGridNavmesh::CellBlocked = bool (*)(xiiUInt32, void*)

Callback that determines whether the cell with index uiCell is blocked entirely (for every type of unit) and therefore can be optimized away.

◆ CellComparator

using xiiGridNavmesh::CellComparator = bool (*)(xiiUInt32, xiiUInt32, void*)

Callback that determines whether the cell with index uiCell1 and the cell with index uiCell2 represent the same type of terrain.

Member Function Documentation

◆ CreateFromGrid()

template<class CellData>
void xiiGridNavmesh::CreateFromGrid ( const xiiGameGrid< CellData > & grid,
CellComparator isSameCellType,
void * pPassThroughSame,
CellBlocked isCellBlocked,
void * pPassThroughBlocked )

Creates the navmesh from the given xiiGameGrid.

Copyright (c) Theophilus Eriata. All Rights Reserved.


The documentation for this class was generated from the following files:
  • /home/runner/work/XII/XII/Source/Engine/Utilities/PathFinding/GridNavmesh.h
  • /home/runner/work/XII/XII/Source/Engine/Utilities/PathFinding/Implementation/GridNavmesh.cpp
  • /home/runner/work/XII/XII/Source/Engine/Utilities/PathFinding/Implementation/GridNavmesh_inl.h