|
Planeshift
|
Represents a dynamic polygon corridor used to plan agent movement. ,. More...
#include <DetourPathCorridor.h>
Public Member Functions | |
| dtPathCorridor () | |
| 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. (The straightened path.) More... | |
| bool | fixPathStart (dtPolyRef safeRef, const float *safePos) |
| dtPolyRef | getFirstPoly () const |
| The polygon reference id of the first polygon in the corridor, the polygon containing the position. More... | |
| dtPolyRef | getLastPoly () const |
| The polygon reference id of the last polygon in the corridor, the polygon containing the target. More... | |
| const dtPolyRef * | getPath () const |
| The corridor's path. More... | |
| int | getPathCount () const |
| The number of polygons in the current corridor path. More... | |
| const float * | getPos () const |
| Gets the current position within the corridor. (In the first polygon.) More... | |
| const float * | getTarget () const |
| Gets the current target within the corridor. (In the last polygon.) More... | |
| bool | init (const int maxPath) |
| Allocates the corridor's path buffer. More... | |
| bool | isValid (const int maxLookAhead, dtNavMeshQuery *navquery, const dtQueryFilter *filter) |
| Checks the current corridor path to see if its polygon references remain valid. More... | |
| bool | moveOverOffmeshConnection (dtPolyRef offMeshConRef, dtPolyRef *refs, float *startPos, float *endPos, dtNavMeshQuery *navquery) |
| void | movePosition (const float *npos, dtNavMeshQuery *navquery, const dtQueryFilter *filter) |
| Moves the position from the current location to the desired location, adjusting the corridor as needed to reflect the change. More... | |
| void | 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 to reflect the change. More... | |
| bool | optimizePathTopology (dtNavMeshQuery *navquery, const dtQueryFilter *filter) |
| Attempts to optimize the path using a local area search. (Partial replanning.) More... | |
| 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. More... | |
| void | reset (dtPolyRef ref, const float *pos) |
| Resets the path corridor to the specified position. More... | |
| void | setCorridor (const float *target, const dtPolyRef *polys, const int npath) |
| Loads a new path and target into the corridor. More... | |
| bool | trimInvalidPath (dtPolyRef safeRef, const float *safePos, dtNavMeshQuery *navquery, const dtQueryFilter *filter) |
| ~dtPathCorridor () | |
Represents a dynamic polygon corridor used to plan agent movement. ,.
Definition at line 26 of file DetourPathCorridor.h.
| dtPathCorridor::dtPathCorridor | ( | ) |
| dtPathCorridor::~dtPathCorridor | ( | ) |
| int dtPathCorridor::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. (The straightened path.)
| [out] | cornerVerts | The corner vertices. [(x, y, z) * cornerCount] [Size: <= maxCorners] |
| [out] | cornerFlags | The flag for each corner. [(flag) * cornerCount] [Size: <= maxCorners] |
| [out] | cornerPolys | The polygon reference for each corner. [(polyRef) * cornerCount] [Size: <= maxCorners] |
| [in] | maxCorners | The maximum number of corners the buffers can hold. |
| [in] | navquery | The query object used to build the corridor. |
| [in] | filter | The filter to apply to the operation. |
maxCorners]
|
inline |
The polygon reference id of the first polygon in the corridor, the polygon containing the position.
Definition at line 120 of file DetourPathCorridor.h.
|
inline |
The polygon reference id of the last polygon in the corridor, the polygon containing the target.
Definition at line 124 of file DetourPathCorridor.h.
|
inline |
The corridor's path.
Definition at line 128 of file DetourPathCorridor.h.
|
inline |
The number of polygons in the current corridor path.
Definition at line 132 of file DetourPathCorridor.h.
|
inline |
Gets the current position within the corridor. (In the first polygon.)
Definition at line 112 of file DetourPathCorridor.h.
|
inline |
Gets the current target within the corridor. (In the last polygon.)
Definition at line 116 of file DetourPathCorridor.h.
| bool dtPathCorridor::init | ( | const int | maxPath | ) |
Allocates the corridor's path buffer.
| [in] | maxPath | The maximum path size the corridor can handle. |
| bool dtPathCorridor::isValid | ( | const int | maxLookAhead, |
| dtNavMeshQuery * | navquery, | ||
| const dtQueryFilter * | filter | ||
| ) |
Checks the current corridor path to see if its polygon references remain valid.
| [in] | maxLookAhead | The number of polygons from the beginning of the corridor to search. |
| [in] | navquery | The query object used to build the corridor. |
| [in] | filter | The filter to apply to the operation. |
| bool dtPathCorridor::moveOverOffmeshConnection | ( | dtPolyRef | offMeshConRef, |
| dtPolyRef * | refs, | ||
| float * | startPos, | ||
| float * | endPos, | ||
| dtNavMeshQuery * | navquery | ||
| ) |
| void dtPathCorridor::movePosition | ( | const float * | npos, |
| dtNavMeshQuery * | navquery, | ||
| const dtQueryFilter * | filter | ||
| ) |
Moves the position from the current location to the desired location, adjusting the corridor as needed to reflect the change.
| [in] | npos | The desired new position. [(x, y, z)] |
| [in] | navquery | The query object used to build the corridor. |
| [in] | filter | The filter to apply to the operation. |
| void dtPathCorridor::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 to reflect the change.
| [in] | npos | The desired new target position. [(x, y, z)] |
| [in] | navquery | The query object used to build the corridor. |
| [in] | filter | The filter to apply to the operation. |
| bool dtPathCorridor::optimizePathTopology | ( | dtNavMeshQuery * | navquery, |
| const dtQueryFilter * | filter | ||
| ) |
Attempts to optimize the path using a local area search. (Partial replanning.)
| [in] | navquery | The query object used to build the corridor. |
| [in] | filter | The filter to apply to the operation. |
| void dtPathCorridor::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.
| [in] | next | The point to search toward. [(x, y, z]) |
| [in] | pathOptimizationRange | The maximum range to search. [Limit: > 0] |
| [in] | navquery | The query object used to build the corridor. |
| [in] | filter | The filter to apply to the operation. |
Resets the path corridor to the specified position.
| [in] | ref | The polygon reference containing the position. |
| [in] | pos | The new position in the corridor. [(x, y, z)] |
Loads a new path and target into the corridor.
| [in] | target | The target location within the last polygon of the path. [(x, y, z)] |
| [in] | path | The path corridor. [(polyRef) * npolys] |
| [in] | npath | The number of polygons in the path. |
| bool dtPathCorridor::trimInvalidPath | ( | dtPolyRef | safeRef, |
| const float * | safePos, | ||
| dtNavMeshQuery * | navquery, | ||
| const dtQueryFilter * | filter | ||
| ) |