19 #ifndef DETOUTPATHCORRIDOR_H
20 #define DETOUTPATHCORRIDOR_H
42 bool init(
const int maxPath);
58 int findCorners(
float* cornerVerts,
unsigned char* cornerFlags,
59 dtPolyRef* cornerPolys,
const int maxCorners,
76 float* startPos,
float* endPos,
114 inline const float*
getPos()
const {
return m_pos; }
118 inline const float*
getTarget()
const {
return m_target; }
143 const dtPolyRef* visited,
const int nvisited);
146 const dtPolyRef* visited,
const int nvisited);
149 const dtPolyRef* visited,
const int nvisited);
int dtMergeCorridorStartShortcut(dtPolyRef *path, const int npath, const int maxPath, const dtPolyRef *visited, const int nvisited)
Definition: DetourPathCorridor.cpp:110
int dtMergeCorridorEndMoved(dtPolyRef *path, const int npath, const int maxPath, const dtPolyRef *visited, const int nvisited)
Definition: DetourPathCorridor.cpp:72
int dtMergeCorridorStartMoved(dtPolyRef *path, const int npath, const int maxPath, const dtPolyRef *visited, const int nvisited)
Definition: DetourPathCorridor.cpp:27
int next(int i, int n)
Definition: DetourTileCacheBuilder.cpp:1080
Provides the ability to perform pathfinding related queries against a navigation mesh.
Definition: DetourNavMeshQuery.h:166
Represents a dynamic polygon corridor used to plan agent movement.
Definition: DetourPathCorridor.h:27
~dtPathCorridor()
Definition: DetourPathCorridor.cpp:207
dtPolyRef getFirstPoly() const
The polygon reference id of the first polygon in the corridor, the polygon containing the position.
Definition: DetourPathCorridor.h:122
int getPathCount() const
The number of polygons in the current corridor path.
Definition: DetourPathCorridor.h:134
dtPathCorridor()
Definition: DetourPathCorridor.cpp:200
bool movePosition(const float *npos, dtNavMeshQuery *navquery, const dtQueryFilter *filter)
Moves the position from the current location to the desired location, adjusting the corridor as neede...
Definition: DetourPathCorridor.cpp:439
void optimizePathVisibility(const float *next, const float pathOptimizationRange, dtNavMeshQuery *navquery, const dtQueryFilter *filter)
Attempts to optimize the path if the specified point is visible from the current position.
Definition: DetourPathCorridor.cpp:310
dtPolyRef getLastPoly() const
The polygon reference id of the last polygon in the corridor, the polygon containing the target.
Definition: DetourPathCorridor.h:126
bool trimInvalidPath(dtPolyRef safeRef, const float *safePos, dtNavMeshQuery *navquery, const dtQueryFilter *filter)
Definition: DetourPathCorridor.cpp:543
const float * getPos() const
Gets the current position within the corridor.
Definition: DetourPathCorridor.h:114
bool moveTargetPosition(const float *npos, dtNavMeshQuery *navquery, const dtQueryFilter *filter)
Moves the target from the curent location to the desired location, adjusting the corridor as needed t...
Definition: DetourPathCorridor.cpp:477
bool optimizePathTopology(dtNavMeshQuery *navquery, const dtQueryFilter *filter)
Attempts to optimize the path using a local area search.
Definition: DetourPathCorridor.cpp:353
bool init(const int maxPath)
Allocates the corridor's path buffer.
Definition: DetourPathCorridor.cpp:215
int findCorners(float *cornerVerts, unsigned char *cornerFlags, dtPolyRef *cornerPolys, const int maxCorners, dtNavMeshQuery *navquery, const dtQueryFilter *filter)
Finds the corners in the corridor from the position toward the target.
Definition: DetourPathCorridor.cpp:251
const float * getTarget() const
Gets the current target within the corridor.
Definition: DetourPathCorridor.h:118
void reset(dtPolyRef ref, const float *pos)
Resets the path corridor to the specified position.
Definition: DetourPathCorridor.cpp:230
const dtPolyRef * getPath() const
The corridor's path.
Definition: DetourPathCorridor.h:130
bool fixPathStart(dtPolyRef safeRef, const float *safePos)
Definition: DetourPathCorridor.cpp:522
bool moveOverOffmeshConnection(dtPolyRef offMeshConRef, dtPolyRef *refs, float *startPos, float *endPos, dtNavMeshQuery *navquery)
Definition: DetourPathCorridor.cpp:380
bool isValid(const int maxLookAhead, dtNavMeshQuery *navquery, const dtQueryFilter *filter)
Checks the current corridor path to see if its polygon references remain valid.
Definition: DetourPathCorridor.cpp:586
void setCorridor(const float *target, const dtPolyRef *polys, const int npath)
Loads a new path and target into the corridor.
Definition: DetourPathCorridor.cpp:511
Defines polygon filtering and traversal costs for navigation mesh query operations.
Definition: DetourNavMeshQuery.h:36
unsigned int dtPolyRef
A handle to a polygon within a navigation mesh tile.
Definition: DetourNavMesh.h:48