![]() |
Atoms Crowd
7.0.0
|
#include <DetourPathCorridor.h>
Public Member Functions | |
| bool | init (const int maxPath) |
| void | reset (dtPolyRef ref, const float *pos) |
| int | findCorners (float *cornerVerts, unsigned char *cornerFlags, dtPolyRef *cornerPolys, const int maxCorners, dtNavMeshQuery *navquery, const dtQueryFilter *filter, float pathOffsetDistance, float earlyReachDistance, bool bAllowEarlyReach=true) |
| bool | optimizePathVisibility (const float *next, const float pathOptimizationRange, dtNavMeshQuery *navquery, const dtQueryFilter *filter) |
| bool | optimizePathTopology (dtNavMeshQuery *navquery, const dtQueryFilter *filter) |
| bool | moveOverOffmeshConnection (dtPolyRef offMeshConRef, dtPolyRef *refs, const float *agentPos, float *startPos, float *endPos, dtNavMeshQuery *navquery) |
| bool | canMoveOverOffmeshConnection (dtPolyRef offMeshConRef, dtPolyRef *refs, const float *agentPos, float *startPos, float *endPos, dtNavMeshQuery *navquery) const |
| [UE4] check if offmesh connection can be traversed, but don't modify corridor yet | |
| void | pruneOffmeshConenction (dtPolyRef offMeshConRef) |
| [UE4] remove offmesh connection from corridor | |
| bool | fixPathStart (dtPolyRef safeRef, const float *safePos) |
| bool | trimInvalidPath (dtPolyRef safeRef, const float *safePos, dtNavMeshQuery *navquery, const dtQueryFilter *filter) |
| bool | isValid (const int maxLookAhead, dtNavMeshQuery *navquery, const dtQueryFilter *filter) |
| bool | movePosition (const float *npos, dtNavMeshQuery *navquery, const dtQueryFilter *filter) |
| void | moveTargetPosition (const float *npos, dtNavMeshQuery *navquery, const dtQueryFilter *filter) |
| void | setCorridor (const float *target, const dtPolyRef *polys, const int npath) |
| const float * | getPos () const |
| const float * | getTarget () const |
| dtPolyRef | getFirstPoly () const |
| dtPolyRef | getLastPoly () const |
| const dtPolyRef * | getPath () const |
| int | getPathCount () const |
| void | setEarlyReachTest (bool enable) |
| float | getSegmentAngle () const |
| const float * | getNextFixedCorner () const |
| const float * | getNextFixedCorner2 () const |
| bool | hasNextFixedCorner () const |
| bool | hasNextFixedCorner2 () const |
Represents a dynamic polygon corridor used to plan agent movement. ,
| int AtomsUtils::dtPathCorridor::findCorners | ( | float * | cornerVerts, |
| unsigned char * | cornerFlags, | ||
| dtPolyRef * | cornerPolys, | ||
| const int | maxCorners, | ||
| dtNavMeshQuery * | navquery, | ||
| const dtQueryFilter * | filter, | ||
| float | pathOffsetDistance, | ||
| float | earlyReachDistance, | ||
| bool | bAllowEarlyReach = true |
||
| ) |
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. |
| [in] | pathOffsetDistance | [UE4] Radius for path offsetting |
| [in] | earlyReachDistance | [UE4] Radius for early reach detection |
| [in] | bAllowEarlyReach | [UE4] Check if corner skipping for EarlyReachTest is available now |
maxCorners]
|
inline |
The polygon reference id of the first polygon in the corridor, the polygon containing the position.
|
inline |
The polygon reference id of the last polygon in the corridor, the polygon containing the target.
|
inline |
The corridor's path.
|
inline |
The number of polygons in the current corridor path.
|
inline |
Gets the current position within the corridor. (In the first polygon.)
|
inline |
Gets the current target within the corridor. (In the last polygon.)
| bool AtomsUtils::dtPathCorridor::init | ( | const int | maxPath | ) |
Allocates the corridor's path buffer.
| [in] | maxPath | The maximum path size the corridor can handle. |
| bool AtomsUtils::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 AtomsUtils::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 AtomsUtils::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 AtomsUtils::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. |
| bool AtomsUtils::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. |
| void AtomsUtils::dtPathCorridor::reset | ( | dtPolyRef | ref, |
| const float * | pos | ||
| ) |
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)] |
| void AtomsUtils::dtPathCorridor::setCorridor | ( | const float * | target, |
| const dtPolyRef * | polys, | ||
| const int | npath | ||
| ) |
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. |