#include <HierarchicalPathfinder.h>
|
| HierarchicalPathfinder () |
|
| ~HierarchicalPathfinder () |
|
void | SetDebugOverlay (bool enabled, const CSimContext *simContext) |
|
void | Recompute (Grid< NavcellData > *passabilityGrid, const std::map< std::string, pass_class_t > &nonPathfindingPassClassMasks, const std::map< std::string, pass_class_t > &pathfindingPassClassMasks) |
|
void | Update (Grid< NavcellData > *grid, const Grid< u8 > &dirtinessGrid) |
|
bool | IsChunkDirty (int ci, int cj, const Grid< u8 > &dirtinessGrid) const |
|
RegionID | Get (u16 i, u16 j, pass_class_t passClass) |
|
void | MakeGoalReachable (u16 i0, u16 j0, PathGoal &goal, pass_class_t passClass) |
| Updates goal so that it's guaranteed to be reachable from the navcell i0 , j0 (which is assumed to be on a passable navcell). More...
|
|
void | FindNearestPassableNavcell (u16 &i, u16 &j, pass_class_t passClass) |
| Updates i , j (which is assumed to be an impassable navcell) to the nearest passable navcell. More...
|
|
Grid< u16 > | GetConnectivityGrid (pass_class_t passClass) |
| Generates the connectivity grid associated with the given pass_class. More...
|
|
pass_class_t | GetPassabilityClass (const std::string &name) const |
|
|
void | FindEdges (u8 ci, u8 cj, pass_class_t passClass, EdgesMap &edges) |
| Find edges between regions in this chunk and the adjacent below/left chunks. More...
|
|
void | FindReachableRegions (RegionID from, std::set< RegionID > &reachable, pass_class_t passClass) |
|
void | FindPassableRegions (std::set< RegionID > ®ions, pass_class_t passClass) |
|
void | FindNearestNavcellInRegions (const std::set< RegionID > ®ions, u16 &iGoal, u16 &jGoal, pass_class_t passClass) |
| Updates iGoal and jGoal to the navcell that is the nearest to the initial goal coordinates, in one of the given regions . More...
|
|
Chunk & | GetChunk (u8 ci, u8 cj, pass_class_t passClass) |
|
void | FillRegionOnGrid (const RegionID ®ion, pass_class_t passClass, u16 value, Grid< u16 > &grid) |
|
void | AddDebugEdges (pass_class_t passClass) |
| Debug visualisation of graph edges between regions. More...
|
|
HierarchicalPathfinder::HierarchicalPathfinder |
( |
| ) |
|
HierarchicalPathfinder::~HierarchicalPathfinder |
( |
| ) |
|
void HierarchicalPathfinder::AddDebugEdges |
( |
pass_class_t |
passClass | ) |
|
|
private |
Debug visualisation of graph edges between regions.
Find edges between regions in this chunk and the adjacent below/left chunks.
void HierarchicalPathfinder::FindNearestNavcellInRegions |
( |
const std::set< RegionID > & |
regions, |
|
|
u16 & |
iGoal, |
|
|
u16 & |
jGoal, |
|
|
pass_class_t |
passClass |
|
) |
| |
|
private |
Updates iGoal
and jGoal
to the navcell that is the nearest to the initial goal coordinates, in one of the given regions
.
(Assumes regions
is non-empty.)
void HierarchicalPathfinder::FindNearestPassableNavcell |
( |
u16 & |
i, |
|
|
u16 & |
j, |
|
|
pass_class_t |
passClass |
|
) |
| |
Updates i
, j
(which is assumed to be an impassable navcell) to the nearest passable navcell.
void HierarchicalPathfinder::FindPassableRegions |
( |
std::set< RegionID > & |
regions, |
|
|
pass_class_t |
passClass |
|
) |
| |
|
private |
Generates the connectivity grid associated with the given pass_class.
pass_class_t HierarchicalPathfinder::GetPassabilityClass |
( |
const std::string & |
name | ) |
const |
|
inline |
bool HierarchicalPathfinder::IsChunkDirty |
( |
int |
ci, |
|
|
int |
cj, |
|
|
const Grid< u8 > & |
dirtinessGrid |
|
) |
| const |
Updates goal
so that it's guaranteed to be reachable from the navcell i0
, j0
(which is assumed to be on a passable navcell).
If the goal is not reachable, it is replaced with a point goal nearest to the goal center.
In the case of a non-point reachable goal, it is replaced with a point goal at the reachable navcell of the goal which is nearest to the starting navcell.
void HierarchicalPathfinder::Recompute |
( |
Grid< NavcellData > * |
passabilityGrid, |
|
|
const std::map< std::string, pass_class_t > & |
nonPathfindingPassClassMasks, |
|
|
const std::map< std::string, pass_class_t > & |
pathfindingPassClassMasks |
|
) |
| |
void HierarchicalPathfinder::SetDebugOverlay |
( |
bool |
enabled, |
|
|
const CSimContext * |
simContext |
|
) |
| |
const u8 HierarchicalPathfinder::CHUNK_SIZE = 96 |
|
staticprivate |
u16 HierarchicalPathfinder::m_ChunksH |
|
private |
u16 HierarchicalPathfinder::m_ChunksW |
|
private |
std::vector<SOverlayLine> HierarchicalPathfinder::m_DebugOverlayLines |
u16 HierarchicalPathfinder::m_H |
|
private |
std::map<std::string, pass_class_t> HierarchicalPathfinder::m_PassClassMasks |
|
private |
const CSimContext* HierarchicalPathfinder::m_SimContext |
|
private |
u16 HierarchicalPathfinder::m_W |
|
private |
The documentation for this class was generated from the following files: