19 #ifndef DETOURNAVMESHQUERY_H
20 #define DETOURNAVMESHQUERY_H
44 #ifdef DT_VIRTUAL_QUERYFILTER
52 #ifdef DT_VIRTUAL_QUERYFILTER
75 #ifdef DT_VIRTUAL_QUERYFILTER
76 virtual float getCost(
const float* pa,
const float*
pb,
81 float getCost(
const float* pa,
const float*
pb,
93 inline float getAreaCost(
const int i)
const {
return m_areaCost[i]; }
98 inline void setAreaCost(
const int i,
const float cost) { m_areaCost[i] = cost; }
179 const float* startPos,
const float* endPos,
181 dtPolyRef* path,
int* pathCount,
const int maxPath)
const;
196 const dtPolyRef* path,
const int pathSize,
197 float* straightPath,
unsigned char* straightPathFlags,
dtPolyRef* straightPathRefs,
198 int* straightPathCount,
const int maxStraightPath,
const int options = 0)
const;
217 const float* startPos,
const float* endPos,
218 const dtQueryFilter* filter,
const unsigned int options = 0);
244 dtPolyRef* path,
int* pathCount,
const int maxPath);
265 int* resultCount,
const int maxResult)
const;
283 int* resultCount,
const int maxResult)
const;
298 dtPolyRef* nearestRef,
float* nearestPt)
const;
310 dtPolyRef* polys,
int* polyCount,
const int maxPolys)
const;
326 int* resultCount,
const int maxResult)
const;
340 float* resultPos,
dtPolyRef* visited,
int* visitedCount,
const int maxVisitedSize)
const;
358 float* t,
float* hitNormal,
dtPolyRef* path,
int* pathCount,
const int maxPath)
const;
388 float* hitDist,
float* hitPos,
float* hitNormal)
const;
400 float* segmentVerts,
dtPolyRef* segmentRefs,
int* segmentCount,
401 const int maxSegments)
const;
411 dtPolyRef* randomRef,
float* randomPt)
const;
425 dtPolyRef* randomRef,
float* randomPt)
const;
481 dtPolyRef* polys,
const int maxPolys)
const;
485 unsigned char& fromType,
unsigned char& toType)
const;
488 float*
left,
float* right)
const;
498 float* straightPath,
unsigned char* straightPathFlags,
dtPolyRef* straightPathRefs,
499 int* straightPathCount,
const int maxStraightPath)
const;
503 float* straightPath,
unsigned char* straightPathFlags,
dtPolyRef* straightPathRefs,
504 int* straightPathCount,
const int maxStraightPath,
const int options)
const;
514 float startPos[3], endPos[3];
536 #endif // DETOURNAVMESHQUERY_H
dtStatus queryPolygons(const float *center, const float *extents, const dtQueryFilter *filter, dtPolyRef *polys, int *polyCount, const int maxPolys) const
Definition: DetourNavMeshQuery.cpp:872
bool isInClosedList(dtPolyRef ref) const
Definition: DetourNavMeshQuery.cpp:3529
void setIncludeFlags(const unsigned short flags)
Definition: DetourNavMeshQuery.h:107
float t
The hit parameter. (FLT_MAX if no wall hit.)
Definition: DetourNavMeshQuery.h:130
dtStatus findRandomPointAroundCircle(dtPolyRef startRef, const float *centerPos, const float maxRadius, const dtQueryFilter *filter, float(*frand)(), dtPolyRef *randomRef, float *randomPt) const
Definition: DetourNavMeshQuery.cpp:312
uint64_d dtPolyRef
Definition: DetourNavMesh.h:49
dtStatus findPolysAroundCircle(dtPolyRef startRef, const float *centerPos, const float radius, const dtQueryFilter *filter, dtPolyRef *resultRef, dtPolyRef *resultParent, float *resultCost, int *resultCount, const int maxResult) const
Definition: DetourNavMeshQuery.cpp:2608
float pathCost
The cost of the path until hit.
Definition: DetourNavMeshQuery.h:145
const dtNavMesh * getAttachedNavMesh() const
Definition: DetourNavMeshQuery.h:470
class dtNodeQueue * m_openList
Pointer to open list queue.
Definition: DetourNavMeshQuery.h:523
Definition: DetourNode.h:34
Position const centerPos
Definition: boss_blood_queen_lana_thel.cpp:125
float m_areaCost[DT_MAX_AREAS]
Cost per area type. (Used by default implementation.)
Definition: DetourNavMeshQuery.h:37
double frand()
Definition: Vector3.cpp:170
dtStatus appendVertex(const float *pos, const unsigned char flags, const dtPolyRef ref, float *straightPath, unsigned char *straightPathFlags, dtPolyRef *straightPathRefs, int *straightPathCount, const int maxStraightPath) const
Definition: DetourNavMeshQuery.cpp:1610
dtStatus getPortalPoints(dtPolyRef from, dtPolyRef to, float *left, float *right, unsigned char &fromType, unsigned char &toType) const
Returns portal points between two polygons.
Definition: DetourNavMeshQuery.cpp:2146
dtQueryFilter()
Definition: DetourNavMeshQuery.cpp:63
Definition: DetourNavMeshQuery.h:508
dtStatus findStraightPath(const float *startPos, const float *endPos, const dtPolyRef *path, const int pathSize, float *straightPath, unsigned char *straightPathFlags, dtPolyRef *straightPathRefs, int *straightPathCount, const int maxStraightPath, const int options=0) const
Definition: DetourNavMeshQuery.cpp:1707
dtStatus raycast(dtPolyRef startRef, const float *startPos, const float *endPos, const dtQueryFilter *filter, float *t, float *hitNormal, dtPolyRef *path, int *pathCount, const int maxPath) const
Definition: DetourNavMeshQuery.cpp:2306
Definition: BnetFileGenerator.h:49
Definition: DetourNavMeshQuery.h:127
char * query(struct soap *soap)
Definition: httpget.cpp:244
struct dtNode * lastBestNode
Definition: DetourNavMeshQuery.h:511
Definition: DetourNavMeshQuery.h:35
class dtNodePool * m_nodePool
Pointer to node pool.
Definition: DetourNavMeshQuery.h:522
unsigned int dtStatus
Definition: DetourStatus.h:22
dtStatus closestPointOnPolyBoundary(dtPolyRef ref, const float *pos, float *closest) const
Definition: DetourNavMeshQuery.cpp:601
Definition: DetourNode.h:107
Definition: DetourNavMesh.h:323
dtStatus findPath(dtPolyRef startRef, dtPolyRef endRef, const float *startPos, const float *endPos, const dtQueryFilter *filter, dtPolyRef *path, int *pathCount, const int maxPath) const
Definition: DetourNavMeshQuery.cpp:923
float getCost(const float *pa, const float *pb, const dtPolyRef prevRef, const dtMeshTile *prevTile, const dtPoly *prevPoly, const dtPolyRef curRef, const dtMeshTile *curTile, const dtPoly *curPoly, const dtPolyRef nextRef, const dtMeshTile *nextTile, const dtPoly *nextPoly) const
Definition: DetourNavMeshQuery.cpp:94
dtPolyRef * path
Pointer to an array of reference ids of the visited polygons. [opt].
Definition: DetourNavMeshQuery.h:136
static const int DT_MAX_AREAS
Definition: DetourNavMesh.h:91
dtStatus finalizeSlicedFindPath(dtPolyRef *path, int *pathCount, const int maxPath)
Definition: DetourNavMeshQuery.cpp:1425
unsigned short getIncludeFlags() const
Definition: DetourNavMeshQuery.h:103
dtNavMeshQuery()
Definition: DetourNavMeshQuery.cpp:139
dtStatus status
Definition: DetourNavMeshQuery.h:510
int maxPath
The maximum number of polygons the path array can hold.
Definition: DetourNavMeshQuery.h:142
Definition: DetourNavMesh.h:153
int pathCount
The number of visited polygons. [opt].
Definition: DetourNavMeshQuery.h:139
dtStatus initSlicedFindPath(dtPolyRef startRef, dtPolyRef endRef, const float *startPos, const float *endPos, const dtQueryFilter *filter, const unsigned int options=0)
Definition: DetourNavMeshQuery.cpp:1147
dtStatus finalizeSlicedFindPathPartial(const dtPolyRef *existing, const int existingSize, dtPolyRef *path, int *pathCount, const int maxPath)
Definition: DetourNavMeshQuery.cpp:1509
float hitNormal[3]
hitNormal The normal of the nearest wall hit. [(x, y, z)]
Definition: DetourNavMeshQuery.h:133
unsigned short getExcludeFlags() const
Definition: DetourNavMeshQuery.h:112
dtStatus findLocalNeighbourhood(dtPolyRef startRef, const float *centerPos, const float radius, const dtQueryFilter *filter, dtPolyRef *resultRef, dtPolyRef *resultParent, int *resultCount, const int maxResult) const
Definition: DetourNavMeshQuery.cpp:2963
~dtNavMeshQuery()
Definition: DetourNavMeshQuery.cpp:148
dtMeshTile * getNeighbourTileAt(int x, int y, int side) const
Returns neighbour tile based on side.
bool isValidPolyRef(dtPolyRef ref, const dtQueryFilter *filter) const
Definition: DetourNavMeshQuery.cpp:3510
float getAreaCost(const int i) const
Definition: DetourNavMeshQuery.h:93
G3D::int16 y
Definition: Vector2int16.h:38
int queryPolygonsInTile(const dtMeshTile *tile, const float *qmin, const float *qmax, const dtQueryFilter *filter, dtPolyRef *polys, const int maxPolys) const
Queries polygons within a tile.
Definition: DetourNavMeshQuery.cpp:768
float lastBestNodeCost
Definition: DetourNavMeshQuery.h:512
unsigned short m_includeFlags
Flags for polygons that can be visited. (Used by default implementation.)
Definition: DetourNavMeshQuery.h:38
bool left(const int *a, const int *b, const int *c)
Definition: RecastContour.cpp:487
dtStatus getPolyHeight(dtPolyRef ref, const float *pos, float *height) const
Definition: DetourNavMeshQuery.cpp:653
dtPolyRef startRef
Definition: DetourNavMeshQuery.h:513
dtStatus findPolysAroundShape(dtPolyRef startRef, const float *verts, const int nverts, const dtQueryFilter *filter, dtPolyRef *resultRef, dtPolyRef *resultParent, float *resultCost, int *resultCount, const int maxResult) const
Definition: DetourNavMeshQuery.cpp:2783
dtStatus findNearestPoly(const float *center, const float *extents, const dtQueryFilter *filter, dtPolyRef *nearestRef, float *nearestPt) const
Definition: DetourNavMeshQuery.cpp:710
class dtNodePool * getNodePool() const
Definition: DetourNavMeshQuery.h:466
dtPolyRef endRef
Definition: DetourNavMeshQuery.h:513
Definition: DetourNode.h:50
unsigned short m_excludeFlags
Flags for polygons that should not be visted. (Used by default implementation.)
Definition: DetourNavMeshQuery.h:39
class dtNodePool * m_tinyNodePool
Pointer to small node pool.
Definition: DetourNavMeshQuery.h:521
const dtNavMesh * m_nav
Pointer to navmesh data.
Definition: DetourNavMeshQuery.h:506
dtStatus getEdgeMidPoint(dtPolyRef from, dtPolyRef to, float *mid) const
Returns edge mid point between two polygons.
Definition: DetourNavMeshQuery.cpp:2241
dtNavMeshQuery * dtAllocNavMeshQuery()
Definition: DetourNavMeshQuery.cpp:107
dtStatus updateSlicedFindPath(const int maxIter, int *doneIters)
Definition: DetourNavMeshQuery.cpp:1208
void setAreaCost(const int i, const float cost)
Definition: DetourNavMeshQuery.h:98
dtStatus init(const dtNavMesh *nav, const int maxNodes)
Definition: DetourNavMeshQuery.cpp:167
dtStatus findDistanceToWall(dtPolyRef startRef, const float *centerPos, const float maxRadius, const dtQueryFilter *filter, float *hitDist, float *hitPos, float *hitNormal) const
Definition: DetourNavMeshQuery.cpp:3328
dtStatus findRandomPoint(const dtQueryFilter *filter, float(*frand)(), dtPolyRef *randomRef, float *randomPt) const
Definition: DetourNavMeshQuery.cpp:220
unsigned int options
Definition: DetourNavMeshQuery.h:516
void dtFreeNavMeshQuery(dtNavMeshQuery *query)
Definition: DetourNavMeshQuery.cpp:114
dtQueryData m_query
Sliced query state.
Definition: DetourNavMeshQuery.h:519
void setExcludeFlags(const unsigned short flags)
Definition: DetourNavMeshQuery.h:116
const dtQueryFilter * filter
Definition: DetourNavMeshQuery.h:515
uint8 flags
Definition: DisableMgr.cpp:44
G3D::int16 x
Definition: Vector2int16.h:37
Definition: DetourNavMesh.h:279
Definition: DetourNavMeshQuery.h:153
bool passFilter(const dtPolyRef ref, const dtMeshTile *tile, const dtPoly *poly) const
Definition: DetourNavMeshQuery.cpp:87
float raycastLimitSqr
Definition: DetourNavMeshQuery.h:517
dtStatus getPolyWallSegments(dtPolyRef ref, const dtQueryFilter *filter, float *segmentVerts, dtPolyRef *segmentRefs, int *segmentCount, const int maxSegments) const
Definition: DetourNavMeshQuery.cpp:3178
dtStatus appendPortals(const int startIdx, const int endIdx, const float *endPos, const dtPolyRef *path, float *straightPath, unsigned char *straightPathFlags, dtPolyRef *straightPathRefs, int *straightPathCount, const int maxStraightPath, const int options) const
Definition: DetourNavMeshQuery.cpp:1640
dtStatus moveAlongSurface(dtPolyRef startRef, const float *startPos, const float *endPos, const dtQueryFilter *filter, float *resultPos, dtPolyRef *visited, int *visitedCount, const int maxVisitedSize) const
Definition: DetourNavMeshQuery.cpp:1948
dtStatus closestPointOnPoly(dtPolyRef ref, const float *pos, float *closest, bool *posOverPoly) const
Definition: DetourNavMeshQuery.cpp:505