19 #ifndef DETOUTPATHCORRIDOR_H
20 #define DETOUTPATHCORRIDOR_H
22 #include <AtomsUtils/Globals.h>
23 #include <AtomsUtils/NavigationMesh/Detour/DetourNavMesh.h>
37 float m_prevMovePoint[3];
38 float m_nextExpectedCorner[3];
39 float m_nextExpectedCorner2[3];
41 unsigned int m_hasNextExpectedCorner : 1;
42 unsigned int m_hasNextExpectedCorner2 : 1;
43 unsigned int m_isInSkipRange : 1;
44 unsigned int m_enableEarlyReach : 1;
57 bool init(
const int maxPath);
76 int findCorners(
float* cornerVerts,
unsigned char* cornerFlags,
77 dtPolyRef* cornerPolys,
const int maxCorners,
79 float pathOffsetDistance,
float earlyReachDistance,
bool bAllowEarlyReach =
true);
95 const float* agentPos,
96 float* startPos,
float* endPos,
101 const float* agentPos,
float* startPos,
float* endPos,
107 bool fixPathStart(
dtPolyRef safeRef,
const float* safePos);
109 bool trimInvalidPath(
dtPolyRef safeRef,
const float* safePos,
140 inline const float*
getPos()
const {
return m_pos; }
144 inline const float*
getTarget()
const {
return m_target; }
162 inline void setEarlyReachTest(
bool enable) { m_enableEarlyReach = enable; }
164 inline float getSegmentAngle()
const {
return m_moveSegAngle; }
165 inline const float* getNextFixedCorner()
const {
return &m_nextExpectedCorner[0]; }
166 inline const float* getNextFixedCorner2()
const {
return &m_nextExpectedCorner2[0]; }
167 inline bool hasNextFixedCorner()
const {
return m_hasNextExpectedCorner; }
168 inline bool hasNextFixedCorner2()
const {
return m_hasNextExpectedCorner2; }
171 int dtMergeCorridorStartMoved(
dtPolyRef* path,
const int npath,
const int maxPath,
172 const dtPolyRef* visited,
const int nvisited);
174 int dtMergeCorridorEndMoved(
dtPolyRef* path,
const int npath,
const int maxPath,
175 const dtPolyRef* visited,
const int nvisited);
177 int dtMergeCorridorStartShortcut(
dtPolyRef* path,
const int npath,
const int maxPath,
178 const dtPolyRef* visited,
const int nvisited);
Definition: DetourNavMeshQuery.h:323
Definition: DetourPathCorridor.h:34
dtPolyRef getFirstPoly() const
Definition: DetourPathCorridor.h:148
dtPolyRef getLastPoly() const
Definition: DetourPathCorridor.h:152
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
const float * getPos() const
Definition: DetourPathCorridor.h:140
bool optimizePathTopology(dtNavMeshQuery *navquery, const dtQueryFilter *filter)
bool isValid(const int maxLookAhead, dtNavMeshQuery *navquery, const dtQueryFilter *filter)
bool init(const int maxPath)
void moveTargetPosition(const float *npos, dtNavMeshQuery *navquery, const dtQueryFilter *filter)
void setCorridor(const float *target, const dtPolyRef *polys, const int npath)
int findCorners(float *cornerVerts, unsigned char *cornerFlags, dtPolyRef *cornerPolys, const int maxCorners, dtNavMeshQuery *navquery, const dtQueryFilter *filter, float pathOffsetDistance, float earlyReachDistance, bool bAllowEarlyReach=true)
void pruneOffmeshConenction(dtPolyRef offMeshConRef)
[UE4] remove offmesh connection from corridor
const float * getTarget() const
Definition: DetourPathCorridor.h:144
void reset(dtPolyRef ref, const float *pos)
int getPathCount() const
Definition: DetourPathCorridor.h:160
const dtPolyRef * getPath() const
Definition: DetourPathCorridor.h:156
bool optimizePathVisibility(const float *next, const float pathOptimizationRange, dtNavMeshQuery *navquery, const dtQueryFilter *filter)
bool movePosition(const float *npos, dtNavMeshQuery *navquery, const dtQueryFilter *filter)
Definition: DetourNavMeshQuery.h:87
Type_uint64 dtPolyRef
Definition: DetourNavMesh.h:47
AtomsCore namespace.
Definition: Base64.h:13