diff --git a/Detour/Include/DetourNavMeshQuery.h b/Detour/Include/DetourNavMeshQuery.h new file mode 100644 index 0000000..c56d6e0 --- /dev/null +++ b/Detour/Include/DetourNavMeshQuery.h @@ -0,0 +1,339 @@ +// +// Copyright (c) 2009-2010 Mikko Mononen memon@inside.org +// +// This software is provided 'as-is', without any express or implied +// warranty. In no event will the authors be held liable for any damages +// arising from the use of this software. +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it +// freely, subject to the following restrictions: +// 1. The origin of this software must not be misrepresented; you must not +// claim that you wrote the original software. If you use this software +// in a product, an acknowledgment in the product documentation would be +// appreciated but is not required. +// 2. Altered source versions must be plainly marked as such, and must not be +// misrepresented as being the original software. +// 3. This notice may not be removed or altered from any source distribution. +// + +#ifndef DETOURNAVMESHQUERY_H +#define DETOURNAVMESHQUERY_H + +#include "DetourAlloc.h" +#include "DetourNavMesh.h" + +struct dtQueryFilter +{ + dtQueryFilter() : includeFlags(0xffff), excludeFlags(0) {} + unsigned short includeFlags; // If any of the flags are set, the poly is included. + unsigned short excludeFlags; // If any of the flags are set, the poly is excluded. +}; + +enum dtQueryState +{ + DT_QUERY_FAILED = 0, // Path find failed. + DT_QUERY_RUNNING, // Path find running. + DT_QUERY_READY, // Path find results ready. +}; + +class dtNavMeshQuery +{ +public: + dtNavMeshQuery(); + ~dtNavMeshQuery(); + + // Initializes the nav mesh query. + // Params: + // nav - (in) pointer to navigation mesh data. + // maxNodes - (in) Maximum number of search nodes to use (max 65536). + // Returns: True if succeed, else false. + bool init(dtNavMesh* nav, const int maxNodes); + + // Sets the pathfinding cost of the specified area. + // Params: + // area - (in) area ID (0-63). + // cost - (int) travel cost of the area. + void setAreaCost(const int area, float cost); + + // Returns the pathfinding cost of the specified area. + // Params: + // area - (in) area ID (0-63). + float getAreaCost(const int area) const; + + // Finds the nearest navigation polygon around the center location. + // Params: + // center[3] - (in) The center of the search box. + // extents[3] - (in) The extents of the search box. + // filter - (in) path polygon filter. + // nearestPt[3] - (out, opt) The nearest point on found polygon, null if not needed. + // Returns: Reference identifier for the polygon, or 0 if no polygons found. + dtPolyRef findNearestPoly(const float* center, const float* extents, + const dtQueryFilter* filter, float* nearestPt) const; + + // Returns polygons which overlap the query box. + // Params: + // center[3] - (in) the center of the search box. + // extents[3] - (in) the extents of the search box. + // filter - (in) path polygon filter. + // polys - (out) array holding the search result. + // maxPolys - (in) The max number of polygons the polys array can hold. + // Returns: Number of polygons in search result array. + int queryPolygons(const float* center, const float* extents, const dtQueryFilter* filter, + dtPolyRef* polys, const int maxPolys) const; + + // Finds path from start polygon to end polygon. + // If target polygon canno be reached through the navigation graph, + // the last node on the array is nearest node to the end polygon. + // Start end end positions are needed to calculate more accurate + // traversal cost at start end end polygons. + // Params: + // startRef - (in) ref to path start polygon. + // endRef - (in) ref to path end polygon. + // startPos[3] - (in) Path start location. + // endPos[3] - (in) Path end location. + // filter - (in) path polygon filter. + // path - (out) array holding the search result. + // maxPathSize - (in) The max number of polygons the path array can hold. + // Returns: Number of polygons in search result array. + int findPath(dtPolyRef startRef, dtPolyRef endRef, + const float* startPos, const float* endPos, + const dtQueryFilter* filter, + dtPolyRef* path, const int maxPathSize) const; + + // Intializes sliced path find query. + // Note: calling any other dtNavMeshQuery method before calling findPathEnd() + // may results in corrupted data! + // Params: + // startRef - (in) ref to path start polygon. + // endRef - (in) ref to path end polygon. + // startPos[3] - (in) Path start location. + // endPos[3] - (in) Path end location. + // filter - (in) path polygon filter. + // Returns: Path query state. + dtQueryState initSlicedFindPath(dtPolyRef startRef, dtPolyRef endRef, + const float* startPos, const float* endPos, + const dtQueryFilter* filter); + + // Updates sliced path find query. + // Params: + // maxIter - (in) max number of iterations to update. + // Returns: Path query state. + dtQueryState updateSlicedFindPath(const int maxIter); + + // Finalizes sliced path find query. + // path - (out) array holding the search result. + // maxPathSize - (in) The max number of polygons the path array can hold. + // Returns: Number of polygons in search result array. + int finalizeSlicedFindPath(dtPolyRef* path, const int maxPathSize); + + // Finds a straight path from start to end locations within the corridor + // described by the path polygons. + // Start and end locations will be clamped on the corridor. + // The returned polygon references are point to polygon which was entered when + // a path point was added. For the end point, zero will be returned. This allows + // to match for example off-mesh link points to their representative polygons. + // Params: + // startPos[3] - (in) Path start location. + // endPo[3] - (in) Path end location. + // path - (in) Array of connected polygons describing the corridor. + // pathSize - (in) Number of polygons in path array. + // straightPath - (out) Points describing the straight path. + // straightPathFlags - (out, opt) Flags describing each point type, see dtStraightPathFlags. + // straightPathRefs - (out, opt) References to polygons at point locations. + // maxStraightPathSize - (in) The max number of points the straight path array can hold. + // Returns: Number of points in the path. + int findStraightPath(const float* startPos, const float* endPos, + const dtPolyRef* path, const int pathSize, + float* straightPath, unsigned char* straightPathFlags, dtPolyRef* straightPathRefs, + const int maxStraightPathSize) const; + + // Moves from startPos to endPos constrained to the navmesh. + // If the endPos is reachable, the resultPos will be endPos, + // or else the resultPos will be the nearest point in navmesh. + // Note: The resulting point is not projected to the ground, use getPolyHeight() to get height. + // Note: The algorithm is optimized for small delta movement and small number of polygons. + // Params: + // startRef - (in) ref to the polygon where startPos lies. + // startPos[3] - (in) start position of the mover. + // endPos[3] - (in) desired end position of the mover. + // filter - (in) path polygon filter. + // resultPos[3] - (out) new position of the mover. + // visited - (out) array of visited polygons. + // maxVisitedSize - (in) max number of polygons in the visited array. + // Returns: Number of entries in the visited array. + int moveAlongSurface(dtPolyRef startRef, const float* startPos, const float* endPos, + const dtQueryFilter* filter, + float* resultPos, dtPolyRef* visited, const int maxVisitedSize) const; + + // Casts 'walkability' ray along the navmesh surface from startPos towards the endPos. + // Params: + // startRef - (in) ref to the polygon where the start lies. + // startPos[3] - (in) start position of the query. + // endPos[3] - (in) end position of the query. + // t - (out) hit parameter along the segment, FLT_MAX if no hit. + // hitNormal[3] - (out) normal of the nearest hit. + // filter - (in) path polygon filter. + // path - (out) visited path polygons. + // pathSize - (in) max number of polygons in the path array. + // Returns: Number of polygons visited or 0 if failed. + int raycast(dtPolyRef startRef, const float* startPos, const float* endPos, const dtQueryFilter* filter, + float& t, float* hitNormal, dtPolyRef* path, const int pathSize) const; + + // Returns distance to nearest wall from the specified location. + // Params: + // centerRef - (in) ref to the polygon where the center lies. + // centerPos[3] - (in) center if the query circle. + // maxRadius - (in) max search radius. + // filter - (in) path polygon filter. + // hitPos[3] - (out) location of the nearest hit. + // hitNormal[3] - (out) normal of the nearest hit. + // Returns: Distance to nearest wall from the test location. + float findDistanceToWall(dtPolyRef centerRef, const float* centerPos, float maxRadius, + const dtQueryFilter* filter, float* hitPos, float* hitNormal) const; + + // Finds polygons found along the navigation graph which touch the specified circle. + // Params: + // startRef - (in) ref to the polygon where the search starts. + // centerPos[3] - (in) center if the query circle. + // radius - (in) radius of the query circle. + // filter - (in) path polygon filter. + // resultRef - (out, opt) refs to the polygons touched by the circle. + // resultParent - (out, opt) parent of each result polygon. + // resultCost - (out, opt) search cost at each result polygon. + // maxResult - (int) maximum capacity of search results. + // Returns: Number of results. + int findPolysAroundCircle(dtPolyRef startRef, const float* centerPos, const float radius, + const dtQueryFilter* filter, + dtPolyRef* resultRef, dtPolyRef* resultParent, float* resultCost, + const int maxResult) const; + + // Finds polygons found along the navigation graph which touch the convex polygon shape. + // Params: + // startRef - (in) ref to the polygon where the search starts. + // verts[3*n] - (in) vertices describing convex polygon shape (CCW). + // nverts - (in) number of vertices in the polygon. + // filter - (in) path polygon filter. + // resultRef - (out, opt) refs to the polygons touched by the circle. + // resultParent - (out, opt) parent of each result polygon. + // resultCost - (out, opt) search cost at each result polygon. + // maxResult - (int) maximum capacity of search results. + // Returns: Number of results. + int findPolysAroundShape(dtPolyRef startRef, const float* verts, const int nverts, + const dtQueryFilter* filter, + dtPolyRef* resultRef, dtPolyRef* resultParent, float* resultCost, + const int maxResult) const; + + // Finds non-overlapping local neighbourhood around center location. + // Note: The algorithm is optimized for small query radius and small number of polygons. + // Params: + // startRef - (in) ref to the polygon where the search starts. + // centerPos[3] - (in) center if the query circle. + // radius - (in) radius of the query circle. + // filter - (in) path polygon filter. + // resultRef - (out) refs to the polygons touched by the circle. + // resultParent - (out, opt) parent of each result polygon. + // maxResult - (int) maximum capacity of search results. + // Returns: Number of results. + int findLocalNeighbourhood(dtPolyRef startRef, const float* centerPos, const float radius, + const dtQueryFilter* filter, + dtPolyRef* resultRef, dtPolyRef* resultParent, const int maxResult) const; + + // Returns wall segments of specified polygon. + // Params: + // ref - (in) ref to the polygon. + // filter - (in) path polygon filter. + // segments[DT_VERTS_PER_POLYGON*3*2] - (out) wall segments. + // Returns: Number of wall segments. + int getPolyWallSegments(dtPolyRef ref, const dtQueryFilter* filter, float* segments); + + // Returns closest point on navigation polygon. + // Uses detail polygons to find the closest point to the navigation polygon surface. + // Params: + // ref - (in) ref to the polygon. + // pos[3] - (in) the point to check. + // closest[3] - (out) closest point. + // Returns: true if closest point found. + bool closestPointOnPoly(dtPolyRef ref, const float* pos, float* closest) const; + + // Returns closest point on navigation polygon boundary. + // Uses the navigation polygon boundary to snap the point to poly boundary + // if it is outside the polygon. Much faster than closestPointToPoly. Does not affect height. + // Params: + // ref - (in) ref to the polygon. + // pos[3] - (in) the point to check. + // closest[3] - (out) closest point. + // Returns: true if closest point found. + bool closestPointOnPolyBoundary(dtPolyRef ref, const float* pos, float* closest) const; + + // Returns start and end location of an off-mesh link polygon. + // Params: + // prevRef - (in) ref to the polygon before the link (used to select direction). + // polyRef - (in) ref to the off-mesh link polygon. + // startPos[3] - (out) start point of the link. + // endPos[3] - (out) end point of the link. + // Returns: true if link is found. + bool getOffMeshConnectionPolyEndPoints(dtPolyRef prevRef, dtPolyRef polyRef, float* startPos, float* endPos) const; + + // Returns height of the polygon at specified location. + // Params: + // ref - (in) ref to the polygon. + // pos[3] - (in) the point where to locate the height. + // height - (out) height at the location. + // Returns: true if over polygon. + bool getPolyHeight(dtPolyRef ref, const float* pos, float* height) const; + + // Returns true if poly reference ins in closed list. + bool isInClosedList(dtPolyRef ref) const; + +private: + + // Returns neighbour tile based on side. + dtMeshTile* getNeighbourTileAt(int x, int y, int side) const; + + // Queries polygons within a tile. + int queryPolygonsInTile(const dtMeshTile* tile, const float* qmin, const float* qmax, const dtQueryFilter* filter, + dtPolyRef* polys, const int maxPolys) const; + // Find nearest polygon within a tile. + dtPolyRef findNearestPolyInTile(const dtMeshTile* tile, const float* center, const float* extents, + const dtQueryFilter* filter, float* nearestPt) const; + // Returns closest point on polygon. + bool closestPointOnPolyInTile(const dtMeshTile* tile, const dtPoly* poly, const float* pos, float* closest) const; + + // Returns portal points between two polygons. + bool getPortalPoints(dtPolyRef from, dtPolyRef to, float* left, float* right, + unsigned char& fromType, unsigned char& toType) const; + bool getPortalPoints(dtPolyRef from, const dtPoly* fromPoly, const dtMeshTile* fromTile, + dtPolyRef to, const dtPoly* toPoly, const dtMeshTile* toTile, + float* left, float* right) const; + + // Returns edge mid point between two polygons. + bool getEdgeMidPoint(dtPolyRef from, dtPolyRef to, float* mid) const; + bool getEdgeMidPoint(dtPolyRef from, const dtPoly* fromPoly, const dtMeshTile* fromTile, + dtPolyRef to, const dtPoly* toPoly, const dtMeshTile* toTile, + float* mid) const; + + dtNavMesh* m_nav; // Pointer to navmesh data. + + struct dtQueryData + { + dtQueryState state; + struct dtNode* lastBestNode; + float lastBestNodeCost; + dtPolyRef startRef, endRef; + float startPos[3], endPos[3]; + dtQueryFilter filter; + }; + dtQueryData m_query; // Sliced query state. + + float m_areaCost[DT_MAX_AREAS]; // Cost per area. + + class dtNodePool* m_tinyNodePool; // Pointer to small node pool. + class dtNodePool* m_nodePool; // Pointer to node pool. + class dtNodeQueue* m_openList; // Pointer to open list queue. +}; + +// Helper function to allocate navmesh query class using Detour allocator. +dtNavMeshQuery* dtAllocNavMeshQuery(); +void dtFreeNavMeshQuery(dtNavMeshQuery* query); + +#endif // DETOURNAVMESHQUERY_H diff --git a/Detour/Source/DetourNavMeshQuery.cpp b/Detour/Source/DetourNavMeshQuery.cpp new file mode 100644 index 0000000..cbf4bf8 --- /dev/null +++ b/Detour/Source/DetourNavMeshQuery.cpp @@ -0,0 +1,2331 @@ +// +// Copyright (c) 2009-2010 Mikko Mononen memon@inside.org +// +// This software is provided 'as-is', without any express or implied +// warranty. In no event will the authors be held liable for any damages +// arising from the use of this software. +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it +// freely, subject to the following restrictions: +// 1. The origin of this software must not be misrepresented; you must not +// claim that you wrote the original software. If you use this software +// in a product, an acknowledgment in the product documentation would be +// appreciated but is not required. +// 2. Altered source versions must be plainly marked as such, and must not be +// misrepresented as being the original software. +// 3. This notice may not be removed or altered from any source distribution. +// + +#include +#include +#include +#include +#include "DetourNavMeshQuery.h" +#include "DetourNode.h" +#include "DetourCommon.h" +#include "DetourAlloc.h" +#include "DetourAssert.h" +#include + + +// Search heuristic scale. +static const float H_SCALE = 0.999f; + +inline int opposite(int side) { return (side+4) & 0x7; } + +inline bool overlapBoxes(const float* amin, const float* amax, + const float* bmin, const float* bmax) +{ + bool overlap = true; + overlap = (amin[0] > bmax[0] || amax[0] < bmin[0]) ? false : overlap; + overlap = (amin[1] > bmax[1] || amax[1] < bmin[1]) ? false : overlap; + overlap = (amin[2] > bmax[2] || amax[2] < bmin[2]) ? false : overlap; + return overlap; +} + +inline bool passFilter(const dtQueryFilter* filter, unsigned short flags) +{ + return (flags & filter->includeFlags) != 0 && (flags & filter->excludeFlags) == 0; +} + +dtNavMeshQuery* dtAllocNavMeshQuery() +{ + return new(dtAlloc(sizeof(dtNavMeshQuery), DT_ALLOC_PERM)) dtNavMeshQuery; +} + +void dtFreeNavMeshQuery(dtNavMeshQuery* navmesh) +{ + if (!navmesh) return; + navmesh->~dtNavMeshQuery(); + dtFree(navmesh); +} + +////////////////////////////////////////////////////////////////////////////////////////// +dtNavMeshQuery::dtNavMeshQuery() : + m_tinyNodePool(0), + m_nodePool(0), + m_openList(0) +{ + for (int i = 0; i < DT_MAX_AREAS; ++i) + m_areaCost[i] = 1.0f; + memset(&m_query, 0, sizeof(dtQueryData)); +} + +dtNavMeshQuery::~dtNavMeshQuery() +{ + if (m_tinyNodePool) + m_tinyNodePool->~dtNodePool(); + if (m_nodePool) + m_nodePool->~dtNodePool(); + if (m_openList) + m_openList->~dtNodeQueue(); + dtFree(m_tinyNodePool); + dtFree(m_nodePool); + dtFree(m_openList); +} + +bool dtNavMeshQuery::init(dtNavMesh* nav, const int maxNodes) +{ + m_nav = nav; + + if (!m_nodePool || m_nodePool->getMaxNodes() < maxNodes) + { + if (m_nodePool) + { + m_nodePool->~dtNodePool(); + dtFree(m_nodePool); + m_nodePool = 0; + } + m_nodePool = new (dtAlloc(sizeof(dtNodePool), DT_ALLOC_PERM)) dtNodePool(maxNodes, dtNextPow2(maxNodes/4)); + if (!m_nodePool) + return false; + } + else + { + m_nodePool->clear(); + } + + if (!m_tinyNodePool) + { + m_tinyNodePool = new (dtAlloc(sizeof(dtNodePool), DT_ALLOC_PERM)) dtNodePool(64, 32); + if (!m_tinyNodePool) + return false; + } + else + { + m_tinyNodePool->clear(); + } + + // TODO: check the open list size too. + if (!m_openList || m_openList->getCapacity() < maxNodes) + { + if (m_openList) + { + m_openList->~dtNodeQueue(); + dtFree(m_openList); + m_openList = 0; + } + m_openList = new (dtAlloc(sizeof(dtNodeQueue), DT_ALLOC_PERM)) dtNodeQueue(maxNodes); + if (!m_openList) + return false; + } + else + { + m_openList->clear(); + } + + return true; +} + +////////////////////////////////////////////////////////////////////////////////////////// +bool dtNavMeshQuery::closestPointOnPoly(dtPolyRef ref, const float* pos, float* closest) const +{ + dtAssert(m_nav); + const dtMeshTile* tile = 0; + const dtPoly* poly = 0; + if (!m_nav->getTileAndPolyByRef(ref, &tile, &poly)) + return false; + if (!tile) return false; + return closestPointOnPolyInTile(tile, poly, pos, closest); +} + +bool dtNavMeshQuery::closestPointOnPolyInTile(const dtMeshTile* tile, const dtPoly* poly, const float* pos, float* closest) const +{ + const unsigned int ip = (unsigned int)(poly - tile->polys); + const dtPolyDetail* pd = &tile->detailMeshes[ip]; + + float closestDistSqr = FLT_MAX; + + for (int j = 0; j < pd->triCount; ++j) + { + const unsigned char* t = &tile->detailTris[(pd->triBase+j)*4]; + const float* v[3]; + for (int k = 0; k < 3; ++k) + { + if (t[k] < poly->vertCount) + v[k] = &tile->verts[poly->verts[t[k]]*3]; + else + v[k] = &tile->detailVerts[(pd->vertBase+(t[k]-poly->vertCount))*3]; + } + float pt[3]; + dtClosestPtPointTriangle(pt, pos, v[0], v[1], v[2]); + float d = dtVdistSqr(pos, pt); + if (d < closestDistSqr) + { + dtVcopy(closest, pt); + closestDistSqr = d; + } + } + + return true; +} + +bool dtNavMeshQuery::closestPointOnPolyBoundary(dtPolyRef ref, const float* pos, float* closest) const +{ + dtAssert(m_nav); + + const dtMeshTile* tile = 0; + const dtPoly* poly = 0; + if (!m_nav->getTileAndPolyByRef(ref, &tile, &poly)) + return false; + + // Collect vertices. + float verts[DT_VERTS_PER_POLYGON*3]; + float edged[DT_VERTS_PER_POLYGON]; + float edget[DT_VERTS_PER_POLYGON]; + int nv = 0; + for (int i = 0; i < (int)poly->vertCount; ++i) + { + dtVcopy(&verts[nv*3], &tile->verts[poly->verts[i]*3]); + nv++; + } + + bool inside = dtDistancePtPolyEdgesSqr(pos, verts, nv, edged, edget); + if (inside) + { + // Point is inside the polygon, return the point. + dtVcopy(closest, pos); + } + else + { + // Point is outside the polygon, dtClamp to nearest edge. + float dmin = FLT_MAX; + int imin = -1; + for (int i = 0; i < nv; ++i) + { + if (edged[i] < dmin) + { + dmin = edged[i]; + imin = i; + } + } + const float* va = &verts[imin*3]; + const float* vb = &verts[((imin+1)%nv)*3]; + dtVlerp(closest, va, vb, edget[imin]); + } + + return true; +} + + +bool dtNavMeshQuery::getPolyHeight(dtPolyRef ref, const float* pos, float* height) const +{ + dtAssert(m_nav); + + const dtMeshTile* tile = 0; + const dtPoly* poly = 0; + if (!m_nav->getTileAndPolyByRef(ref, &tile, &poly)) + return false; + + if (poly->type == DT_POLYTYPE_OFFMESH_CONNECTION) + { + const float* v0 = &tile->verts[poly->verts[0]*3]; + const float* v1 = &tile->verts[poly->verts[1]*3]; + const float d0 = dtVdist(pos, v0); + const float d1 = dtVdist(pos, v1); + const float u = d0 / (d0+d1); + if (height) + *height = v0[1] + (v1[1] - v0[1]) * u; + return true; + } + else + { + const unsigned int ip = (unsigned int)(poly - tile->polys); + const dtPolyDetail* pd = &tile->detailMeshes[ip]; + for (int j = 0; j < pd->triCount; ++j) + { + const unsigned char* t = &tile->detailTris[(pd->triBase+j)*4]; + const float* v[3]; + for (int k = 0; k < 3; ++k) + { + if (t[k] < poly->vertCount) + v[k] = &tile->verts[poly->verts[t[k]]*3]; + else + v[k] = &tile->detailVerts[(pd->vertBase+(t[k]-poly->vertCount))*3]; + } + float h; + if (dtClosestHeightPointTriangle(pos, v[0], v[1], v[2], h)) + { + if (height) + *height = h; + return true; + } + } + } + + return false; +} + +void dtNavMeshQuery::setAreaCost(const int area, float cost) +{ + if (area >= 0 && area < DT_MAX_AREAS) + m_areaCost[area] = cost; +} + +float dtNavMeshQuery::getAreaCost(const int area) const +{ + if (area >= 0 && area < DT_MAX_AREAS) + return m_areaCost[area]; + return -1; +} + +dtPolyRef dtNavMeshQuery::findNearestPoly(const float* center, const float* extents, + const dtQueryFilter* filter, float* nearestPt) const +{ + dtAssert(m_nav); + + // Get nearby polygons from proximity grid. + dtPolyRef polys[128]; + int polyCount = queryPolygons(center, extents, filter, polys, 128); + + // Find nearest polygon amongst the nearby polygons. + dtPolyRef nearest = 0; + float nearestDistanceSqr = FLT_MAX; + for (int i = 0; i < polyCount; ++i) + { + dtPolyRef ref = polys[i]; + float closestPtPoly[3]; + if (!closestPointOnPoly(ref, center, closestPtPoly)) + continue; + float d = dtVdistSqr(center, closestPtPoly); + if (d < nearestDistanceSqr) + { + if (nearestPt) + dtVcopy(nearestPt, closestPtPoly); + nearestDistanceSqr = d; + nearest = ref; + } + } + + return nearest; +} + +dtPolyRef dtNavMeshQuery::findNearestPolyInTile(const dtMeshTile* tile, const float* center, const float* extents, + const dtQueryFilter* filter, float* nearestPt) const +{ + dtAssert(m_nav); + + float bmin[3], bmax[3]; + dtVsub(bmin, center, extents); + dtVadd(bmax, center, extents); + + // Get nearby polygons from proximity grid. + dtPolyRef polys[128]; + int polyCount = queryPolygonsInTile(tile, bmin, bmax, filter, polys, 128); + + // Find nearest polygon amongst the nearby polygons. + dtPolyRef nearest = 0; + float nearestDistanceSqr = FLT_MAX; + for (int i = 0; i < polyCount; ++i) + { + dtPolyRef ref = polys[i]; + const dtPoly* poly = &tile->polys[m_nav->decodePolyIdPoly(ref)]; + float closestPtPoly[3]; + if (!closestPointOnPolyInTile(tile, poly, center, closestPtPoly)) + continue; + + float d = dtVdistSqr(center, closestPtPoly); + if (d < nearestDistanceSqr) + { + if (nearestPt) + dtVcopy(nearestPt, closestPtPoly); + nearestDistanceSqr = d; + nearest = ref; + } + } + + return nearest; +} + +int dtNavMeshQuery::queryPolygonsInTile(const dtMeshTile* tile, const float* qmin, const float* qmax, + const dtQueryFilter* filter, + dtPolyRef* polys, const int maxPolys) const +{ + dtAssert(m_nav); + + if (tile->bvTree) + { + const dtBVNode* node = &tile->bvTree[0]; + const dtBVNode* end = &tile->bvTree[tile->header->bvNodeCount]; + const float* tbmin = tile->header->bmin; + const float* tbmax = tile->header->bmax; + const float qfac = tile->header->bvQuantFactor; + + // Calculate quantized box + unsigned short bmin[3], bmax[3]; + // dtClamp query box to world box. + float minx = dtClamp(qmin[0], tbmin[0], tbmax[0]) - tbmin[0]; + float miny = dtClamp(qmin[1], tbmin[1], tbmax[1]) - tbmin[1]; + float minz = dtClamp(qmin[2], tbmin[2], tbmax[2]) - tbmin[2]; + float maxx = dtClamp(qmax[0], tbmin[0], tbmax[0]) - tbmin[0]; + float maxy = dtClamp(qmax[1], tbmin[1], tbmax[1]) - tbmin[1]; + float maxz = dtClamp(qmax[2], tbmin[2], tbmax[2]) - tbmin[2]; + // Quantize + bmin[0] = (unsigned short)(qfac * minx) & 0xfffe; + bmin[1] = (unsigned short)(qfac * miny) & 0xfffe; + bmin[2] = (unsigned short)(qfac * minz) & 0xfffe; + bmax[0] = (unsigned short)(qfac * maxx + 1) | 1; + bmax[1] = (unsigned short)(qfac * maxy + 1) | 1; + bmax[2] = (unsigned short)(qfac * maxz + 1) | 1; + + // Traverse tree + const dtPolyRef base = m_nav->getPolyRefBase(tile); + int n = 0; + while (node < end) + { + const bool overlap = dtCheckOverlapBox(bmin, bmax, node->bmin, node->bmax); + const bool isLeafNode = node->i >= 0; + + if (isLeafNode && overlap) + { + if (passFilter(filter, tile->polys[node->i].flags)) + { + if (n < maxPolys) + polys[n++] = base | (dtPolyRef)node->i; + } + } + + if (overlap || isLeafNode) + node++; + else + { + const int escapeIndex = -node->i; + node += escapeIndex; + } + } + + return n; + } + else + { + float bmin[3], bmax[3]; + int n = 0; + const dtPolyRef base = m_nav->getPolyRefBase(tile); + for (int i = 0; i < tile->header->polyCount; ++i) + { + // Calc polygon bounds. + dtPoly* p = &tile->polys[i]; + const float* v = &tile->verts[p->verts[0]*3]; + dtVcopy(bmin, v); + dtVcopy(bmax, v); + for (int j = 1; j < p->vertCount; ++j) + { + v = &tile->verts[p->verts[j]*3]; + dtVmin(bmin, v); + dtVmax(bmax, v); + } + if (overlapBoxes(qmin,qmax, bmin,bmax)) + { + if (passFilter(filter, p->flags)) + { + if (n < maxPolys) + polys[n++] = base | (dtPolyRef)i; + } + } + } + return n; + } +} + +int dtNavMeshQuery::queryPolygons(const float* center, const float* extents, const dtQueryFilter* filter, + dtPolyRef* polys, const int maxPolys) const +{ + dtAssert(m_nav); + + float bmin[3], bmax[3]; + dtVsub(bmin, center, extents); + dtVadd(bmax, center, extents); + + // Find tiles the query touches. + int minx, miny, maxx, maxy; + m_nav->calcTileLoc(bmin, &minx, &miny); + m_nav->calcTileLoc(bmax, &maxx, &maxy); + + int n = 0; + for (int y = miny; y <= maxy; ++y) + { + for (int x = minx; x <= maxx; ++x) + { + const dtMeshTile* tile = m_nav->getTileAt(x,y); + if (!tile) continue; + n += queryPolygonsInTile(tile, bmin, bmax, filter, polys+n, maxPolys-n); + if (n >= maxPolys) return n; + } + } + + return n; +} + +int dtNavMeshQuery::findPath(dtPolyRef startRef, dtPolyRef endRef, + const float* startPos, const float* endPos, + const dtQueryFilter* filter, + dtPolyRef* path, const int maxPathSize) const +{ + dtAssert(m_nav); + dtAssert(m_nodePool); + dtAssert(m_openList); + + if (!startRef || !endRef) + return 0; + + if (!maxPathSize) + return 0; + + // Validate input + if (!m_nav->isValidPolyRef(startRef) || !m_nav->isValidPolyRef(endRef)) + return 0; + + if (startRef == endRef) + { + path[0] = startRef; + return 1; + } + + m_nodePool->clear(); + m_openList->clear(); + + dtNode* startNode = m_nodePool->getNode(startRef); + startNode->pidx = 0; + startNode->cost = 0; + startNode->total = dtVdist(startPos, endPos) * H_SCALE; + startNode->id = startRef; + startNode->flags = DT_NODE_OPEN; + m_openList->push(startNode); + + dtNode* lastBestNode = startNode; + float lastBestNodeCost = startNode->total; + + while (!m_openList->empty()) + { + dtNode* bestNode = m_openList->pop(); + // Remove node from open list and put it in closed list. + bestNode->flags &= ~DT_NODE_OPEN; + bestNode->flags |= DT_NODE_CLOSED; + + // Reached the goal, stop searching. + if (bestNode->id == endRef) + { + lastBestNode = bestNode; + break; + } + + float previousEdgeMidPoint[3]; + + // Get current poly and tile. + // The API input has been cheked already, skip checking internal data. + const dtPolyRef bestRef = bestNode->id; + const dtMeshTile* bestTile = 0; + const dtPoly* bestPoly = 0; + m_nav->getTileAndPolyByRefUnsafe(bestRef, &bestTile, &bestPoly); + + // Get parent poly and tile. + dtPolyRef parentRef = 0; + const dtMeshTile* parentTile = 0; + const dtPoly* parentPoly = 0; + if (bestNode->pidx) + parentRef = m_nodePool->getNodeAtIdx(bestNode->pidx)->id; + if (parentRef) + { + m_nav->getTileAndPolyByRefUnsafe(parentRef, &parentTile, &parentPoly); + getEdgeMidPoint(parentRef, parentPoly, parentTile, + bestRef, bestPoly, bestTile, previousEdgeMidPoint); + } + else + { + dtVcopy(previousEdgeMidPoint, startPos); + } + + for (unsigned int i = bestPoly->firstLink; i != DT_NULL_LINK; i = bestTile->links[i].next) + { + dtPolyRef neighbourRef = bestTile->links[i].ref; + + // Skip invalid ids and do not expand back to where we came from. + if (!neighbourRef || neighbourRef == parentRef) + continue; + + // Get neighbour poly and tile. + // The API input has been cheked already, skip checking internal data. + const dtMeshTile* neighbourTile = 0; + const dtPoly* neighbourPoly = 0; + m_nav->getTileAndPolyByRefUnsafe(neighbourRef, &neighbourTile, &neighbourPoly); + + if (!passFilter(filter, neighbourPoly->flags)) + continue; + + dtNode newNode; + newNode.pidx = m_nodePool->getNodeIdx(bestNode); + newNode.id = neighbourRef; + + // Calculate cost. + float edgeMidPoint[3]; + + getEdgeMidPoint(bestRef, bestPoly, bestTile, + neighbourRef, neighbourPoly, neighbourTile, edgeMidPoint); + + // Special case for last node. + float h = 0; + if (neighbourRef == endRef) + { + // Cost + newNode.cost = bestNode->cost + + dtVdist(previousEdgeMidPoint,edgeMidPoint) * m_areaCost[bestPoly->area] + + dtVdist(edgeMidPoint, endPos) * m_areaCost[neighbourPoly->area]; + // Heuristic + h = 0; + } + else + { + // Cost + newNode.cost = bestNode->cost + + dtVdist(previousEdgeMidPoint,edgeMidPoint) * m_areaCost[bestPoly->area]; + // Heuristic + h = dtVdist(edgeMidPoint,endPos)*H_SCALE; + } + newNode.total = newNode.cost + h; + + dtNode* actualNode = m_nodePool->getNode(newNode.id); + if (!actualNode) + continue; + + // The node is already in open list and the new result is worse, skip. + if ((actualNode->flags & DT_NODE_OPEN) && newNode.total >= actualNode->total) + continue; + // The node is already visited and process, and the new result is worse, skip. + if ((actualNode->flags & DT_NODE_CLOSED) && newNode.total >= actualNode->total) + continue; + + // Add or update the node. + actualNode->flags &= ~DT_NODE_CLOSED; + actualNode->pidx = newNode.pidx; + actualNode->cost = newNode.cost; + actualNode->total = newNode.total; + + // Update nearest node to target so far. + if (h < lastBestNodeCost) + { + lastBestNodeCost = h; + lastBestNode = actualNode; + } + + if (actualNode->flags & DT_NODE_OPEN) + { + // Already in open, update node location. + m_openList->modify(actualNode); + } + else + { + // Put the node in open list. + actualNode->flags |= DT_NODE_OPEN; + m_openList->push(actualNode); + } + } + } + + // Reverse the path. + dtNode* prev = 0; + dtNode* node = lastBestNode; + do + { + dtNode* next = m_nodePool->getNodeAtIdx(node->pidx); + node->pidx = m_nodePool->getNodeIdx(prev); + prev = node; + node = next; + } + while (node); + + // Store path + node = prev; + int n = 0; + do + { + path[n++] = node->id; + node = m_nodePool->getNodeAtIdx(node->pidx); + } + while (node && n < maxPathSize); + + return n; +} + + + +dtQueryState dtNavMeshQuery::initSlicedFindPath(dtPolyRef startRef, dtPolyRef endRef, + const float* startPos, const float* endPos, + const dtQueryFilter* filter) +{ + dtAssert(m_nav); + dtAssert(m_nodePool); + dtAssert(m_openList); + + // Init path state. + memset(&m_query, 0, sizeof(dtQueryData)); + m_query.state = DT_QUERY_FAILED; + m_query.startRef = startRef; + m_query.endRef = endRef; + dtVcopy(m_query.startPos, startPos); + dtVcopy(m_query.endPos, endPos); + m_query.filter = *filter; + + if (!startRef || !endRef) + return DT_QUERY_FAILED; + + // Validate input + if (!m_nav->isValidPolyRef(startRef) || !m_nav->isValidPolyRef(endRef)) + return DT_QUERY_FAILED; + + if (startRef == endRef) + { + m_query.state = DT_QUERY_READY; + return DT_QUERY_READY; + } + + m_nodePool->clear(); + m_openList->clear(); + + dtNode* startNode = m_nodePool->getNode(startRef); + startNode->pidx = 0; + startNode->cost = 0; + startNode->total = dtVdist(startPos, endPos) * H_SCALE; + startNode->id = startRef; + startNode->flags = DT_NODE_OPEN; + m_openList->push(startNode); + + m_query.state = DT_QUERY_RUNNING; + m_query.lastBestNode = startNode; + m_query.lastBestNodeCost = startNode->total; + + return m_query.state; +} + +dtQueryState dtNavMeshQuery::updateSlicedFindPath(const int maxIter) +{ + if (m_query.state != DT_QUERY_RUNNING) + return m_query.state; + + // Make sure the request is still valid. + if (!m_nav->isValidPolyRef(m_query.startRef) || !m_nav->isValidPolyRef(m_query.endRef)) + { + m_query.state = DT_QUERY_FAILED; + return DT_QUERY_FAILED; + } + + int iter = 0; + while (iter < maxIter && !m_openList->empty()) + { + iter++; + + dtNode* bestNode = m_openList->pop(); + // Remove node from open list and put it in closed list. + bestNode->flags &= ~DT_NODE_OPEN; + bestNode->flags |= DT_NODE_CLOSED; + + // Reached the goal, stop searching. + if (bestNode->id == m_query.endRef) + { + m_query.lastBestNode = bestNode; + m_query.state = DT_QUERY_READY; + return m_query.state; + } + + float previousEdgeMidPoint[3]; + + // Get current poly and tile. + const dtPolyRef bestRef = bestNode->id; + const dtMeshTile* bestTile = 0; + const dtPoly* bestPoly = 0; + if (!m_nav->getTileAndPolyByRef(bestRef, &bestTile, &bestPoly)) + { + // The polygon has disappeared during the sliced query, fail. + m_query.state = DT_QUERY_FAILED; + return m_query.state; + } + + // Get parent poly and tile. + dtPolyRef parentRef = 0; + const dtMeshTile* parentTile = 0; + const dtPoly* parentPoly = 0; + dtNode* parentNode = 0; + if (bestNode->pidx) + { + parentNode = m_nodePool->getNodeAtIdx(bestNode->pidx); + parentRef = parentNode->id; + } + if (parentRef) + { + if (!m_nav->getTileAndPolyByRef(parentRef, &parentTile, &parentPoly)) + { + // The polygon has disappeared during the sliced query, fail. + m_query.state = DT_QUERY_FAILED; + return m_query.state; + } + getEdgeMidPoint(parentRef, parentPoly, parentTile, + bestRef, bestPoly, bestTile, previousEdgeMidPoint); + } + else + { + dtVcopy(previousEdgeMidPoint, m_query.startPos); + } + + for (unsigned int i = bestPoly->firstLink; i != DT_NULL_LINK; i = bestTile->links[i].next) + { + dtPolyRef neighbourRef = bestTile->links[i].ref; + + // Skip invalid ids and do not expand back to where we came from. + if (!neighbourRef || neighbourRef == parentRef) + continue; + + // Get neighbour poly and tile. + // The API input has been cheked already, skip checking internal data. + const dtMeshTile* neighbourTile = 0; + const dtPoly* neighbourPoly = 0; + m_nav->getTileAndPolyByRefUnsafe(neighbourRef, &neighbourTile, &neighbourPoly); + + if (!passFilter(&m_query.filter, neighbourPoly->flags)) + continue; + + dtNode newNode; + newNode.pidx = m_nodePool->getNodeIdx(bestNode); + newNode.id = neighbourRef; + + // Calculate cost. + float edgeMidPoint[3]; + + getEdgeMidPoint(bestRef, bestPoly, bestTile, + neighbourRef, neighbourPoly, neighbourTile, edgeMidPoint); + + // Special case for last node. + float h = 0; + if (neighbourRef == m_query.endRef) + { + // Cost + newNode.cost = bestNode->cost + + dtVdist(previousEdgeMidPoint,edgeMidPoint) * m_areaCost[bestPoly->area] + + dtVdist(edgeMidPoint, m_query.endPos) * m_areaCost[neighbourPoly->area]; + // Heuristic + h = 0; + } + else + { + // Cost + newNode.cost = bestNode->cost + + dtVdist(previousEdgeMidPoint,edgeMidPoint) * m_areaCost[bestPoly->area]; + // Heuristic + h = dtVdist(edgeMidPoint, m_query.endPos)*H_SCALE; + } + newNode.total = newNode.cost + h; + + dtNode* actualNode = m_nodePool->getNode(newNode.id); + if (!actualNode) + continue; + + // The node is already in open list and the new result is worse, skip. + if ((actualNode->flags & DT_NODE_OPEN) && newNode.total >= actualNode->total) + continue; + // The node is already visited and process, and the new result is worse, skip. + if ((actualNode->flags & DT_NODE_CLOSED) && newNode.total >= actualNode->total) + continue; + + // Add or update the node. + actualNode->flags &= ~DT_NODE_CLOSED; + actualNode->pidx = newNode.pidx; + actualNode->cost = newNode.cost; + actualNode->total = newNode.total; + + // Update nearest node to target so far. + if (h < m_query.lastBestNodeCost) + { + m_query.lastBestNodeCost = h; + m_query.lastBestNode = actualNode; + } + + if (actualNode->flags & DT_NODE_OPEN) + { + // Already in open, update node location. + m_openList->modify(actualNode); + } + else + { + // Put the node in open list. + actualNode->flags |= DT_NODE_OPEN; + m_openList->push(actualNode); + } + } + } + + if (m_openList->empty()) + m_query.state = DT_QUERY_READY; + + return m_query.state; +} + +int dtNavMeshQuery::finalizeSlicedFindPath(dtPolyRef* path, const int maxPathSize) +{ + if (m_query.state != DT_QUERY_READY) + return 0; + + // Reverse the path. + dtAssert(m_query.lastBestNode); + dtNode* prev = 0; + dtNode* node = m_query.lastBestNode; + do + { + dtNode* next = m_nodePool->getNodeAtIdx(node->pidx); + node->pidx = m_nodePool->getNodeIdx(prev); + prev = node; + node = next; + } + while (node); + + // Store path + node = prev; + int n = 0; + do + { + path[n++] = node->id; + node = m_nodePool->getNodeAtIdx(node->pidx); + } + while (node && n < maxPathSize); + + // Reset query. + memset(&m_query, 0, sizeof(dtQueryData)); + + return n; +} + + + +int dtNavMeshQuery::findStraightPath(const float* startPos, const float* endPos, + const dtPolyRef* path, const int pathSize, + float* straightPath, unsigned char* straightPathFlags, dtPolyRef* straightPathRefs, + const int maxStraightPathSize) const +{ + dtAssert(m_nav); + + if (!maxStraightPathSize) + return 0; + + if (!path[0]) + return 0; + + int straightPathSize = 0; + + // TODO: Should this be callers responsibility? + float closestStartPos[3]; + if (!closestPointOnPolyBoundary(path[0], startPos, closestStartPos)) + return 0; + + // Add start point. + dtVcopy(&straightPath[straightPathSize*3], closestStartPos); + if (straightPathFlags) + straightPathFlags[straightPathSize] = DT_STRAIGHTPATH_START; + if (straightPathRefs) + straightPathRefs[straightPathSize] = path[0]; + straightPathSize++; + if (straightPathSize >= maxStraightPathSize) + return straightPathSize; + + float closestEndPos[3]; + if (!closestPointOnPolyBoundary(path[pathSize-1], endPos, closestEndPos)) + return 0; + + if (pathSize > 1) + { + float portalApex[3], portalLeft[3], portalRight[3]; + dtVcopy(portalApex, closestStartPos); + dtVcopy(portalLeft, portalApex); + dtVcopy(portalRight, portalApex); + int apexIndex = 0; + int leftIndex = 0; + int rightIndex = 0; + + unsigned char leftPolyType = 0; + unsigned char rightPolyType = 0; + + dtPolyRef leftPolyRef = path[0]; + dtPolyRef rightPolyRef = path[0]; + + for (int i = 0; i < pathSize; ++i) + { + float left[3], right[3]; + unsigned char fromType, toType; + + if (i+1 < pathSize) + { + // Next portal. + if (!getPortalPoints(path[i], path[i+1], left, right, fromType, toType)) + { + if (!closestPointOnPolyBoundary(path[i], endPos, closestEndPos)) + return 0; + + dtVcopy(&straightPath[straightPathSize*3], closestEndPos); + if (straightPathFlags) + straightPathFlags[straightPathSize] = 0; + if (straightPathRefs) + straightPathRefs[straightPathSize] = path[i]; + straightPathSize++; + + return straightPathSize; + } + + // If starting really close the portal, advance. + if (i == 0) + { + float t; + if (dtDistancePtSegSqr2D(portalApex, left, right, t) < dtSqr(0.001f)) + continue; + } + } + else + { + // End of the path. + dtVcopy(left, closestEndPos); + dtVcopy(right, closestEndPos); + + fromType = toType = DT_POLYTYPE_GROUND; + } + + // Right vertex. + if (dtTriArea2D(portalApex, portalRight, right) <= 0.0f) + { + if (dtVequal(portalApex, portalRight) || dtTriArea2D(portalApex, portalLeft, right) > 0.0f) + { + dtVcopy(portalRight, right); + rightPolyRef = (i+1 < pathSize) ? path[i+1] : 0; + rightPolyType = toType; + rightIndex = i; + } + else + { + dtVcopy(portalApex, portalLeft); + apexIndex = leftIndex; + + unsigned char flags = 0; + if (!leftPolyRef) + flags = DT_STRAIGHTPATH_END; + else if (rightPolyType == DT_POLYTYPE_OFFMESH_CONNECTION) + flags = DT_STRAIGHTPATH_OFFMESH_CONNECTION; + dtPolyRef ref = leftPolyRef; + + if (!dtVequal(&straightPath[(straightPathSize-1)*3], portalApex)) + { + // Append new vertex. + dtVcopy(&straightPath[straightPathSize*3], portalApex); + if (straightPathFlags) + straightPathFlags[straightPathSize] = flags; + if (straightPathRefs) + straightPathRefs[straightPathSize] = ref; + straightPathSize++; + // If reached end of path or there is no space to append more vertices, return. + if (flags == DT_STRAIGHTPATH_END || straightPathSize >= maxStraightPathSize) + return straightPathSize; + } + else + { + // The vertices are equal, update flags and poly. + if (straightPathFlags) + straightPathFlags[straightPathSize-1] = flags; + if (straightPathRefs) + straightPathRefs[straightPathSize-1] = ref; + } + + dtVcopy(portalLeft, portalApex); + dtVcopy(portalRight, portalApex); + leftIndex = apexIndex; + rightIndex = apexIndex; + + // Restart + i = apexIndex; + + continue; + } + } + + // Left vertex. + if (dtTriArea2D(portalApex, portalLeft, left) >= 0.0f) + { + if (dtVequal(portalApex, portalLeft) || dtTriArea2D(portalApex, portalRight, left) < 0.0f) + { + dtVcopy(portalLeft, left); + leftPolyRef = (i+1 < pathSize) ? path[i+1] : 0; + leftPolyType = toType; + leftIndex = i; + } + else + { + dtVcopy(portalApex, portalRight); + apexIndex = rightIndex; + + unsigned char flags = 0; + if (!rightPolyRef) + flags = DT_STRAIGHTPATH_END; + else if (rightPolyType == DT_POLYTYPE_OFFMESH_CONNECTION) + flags = DT_STRAIGHTPATH_OFFMESH_CONNECTION; + dtPolyRef ref = rightPolyRef; + + if (!dtVequal(&straightPath[(straightPathSize-1)*3], portalApex)) + { + // Append new vertex. + dtVcopy(&straightPath[straightPathSize*3], portalApex); + if (straightPathFlags) + straightPathFlags[straightPathSize] = flags; + if (straightPathRefs) + straightPathRefs[straightPathSize] = ref; + straightPathSize++; + // If reached end of path or there is no space to append more vertices, return. + if (flags == DT_STRAIGHTPATH_END || straightPathSize >= maxStraightPathSize) + return straightPathSize; + } + else + { + // The vertices are equal, update flags and poly. + if (straightPathFlags) + straightPathFlags[straightPathSize-1] = flags; + if (straightPathRefs) + straightPathRefs[straightPathSize-1] = ref; + } + + dtVcopy(portalLeft, portalApex); + dtVcopy(portalRight, portalApex); + leftIndex = apexIndex; + rightIndex = apexIndex; + + // Restart + i = apexIndex; + + continue; + } + } + } + } + + // If the point already exists, remove it and add reappend the actual end location. + if (straightPathSize && dtVequal(&straightPath[(straightPathSize-1)*3], closestEndPos)) + straightPathSize--; + + // Add end point. + if (straightPathSize < maxStraightPathSize) + { + dtVcopy(&straightPath[straightPathSize*3], closestEndPos); + if (straightPathFlags) + straightPathFlags[straightPathSize] = DT_STRAIGHTPATH_END; + if (straightPathRefs) + straightPathRefs[straightPathSize] = 0; + straightPathSize++; + } + + return straightPathSize; +} + +int dtNavMeshQuery::moveAlongSurface(dtPolyRef startRef, const float* startPos, const float* endPos, + const dtQueryFilter* filter, + float* resultPos, dtPolyRef* visited, const int maxVisitedSize) const +{ + dtAssert(m_nav); + dtAssert(m_tinyNodePool); + + // Validate input + if (!startRef) return 0; + if (!m_nav->isValidPolyRef(startRef)) return 0; + + static const int MAX_STACK = 48; + dtNode* stack[MAX_STACK]; + int nstack = 0; + + m_tinyNodePool->clear(); + + dtNode* startNode = m_tinyNodePool->getNode(startRef); + startNode->pidx = 0; + startNode->cost = 0; + startNode->total = 0; + startNode->id = startRef; + startNode->flags = DT_NODE_CLOSED; + stack[nstack++] = startNode; + + float bestPos[3]; + float bestDist = FLT_MAX; + dtNode* bestNode = 0; + dtVcopy(bestPos, startPos); + + // Search constraints + float searchPos[3], searchRadSqr; + dtVlerp(searchPos, startPos, endPos, 0.5f); + searchRadSqr = dtSqr(dtVdist(startPos, endPos)/2.0f + 0.001f); + + float verts[DT_VERTS_PER_POLYGON*3]; + + while (nstack) + { + // Pop front. + dtNode* curNode = stack[0]; + for (int i = 0; i < nstack-1; ++i) + stack[i] = stack[i+1]; + nstack--; + + // Get poly and tile. + // The API input has been cheked already, skip checking internal data. + const dtPolyRef curRef = curNode->id; + const dtMeshTile* curTile = 0; + const dtPoly* curPoly = 0; + m_nav->getTileAndPolyByRefUnsafe(curRef, &curTile, &curPoly); + + // Collect vertices. + const int nverts = curPoly->vertCount; + for (int i = 0; i < nverts; ++i) + dtVcopy(&verts[i*3], &curTile->verts[curPoly->verts[i]*3]); + + // If target is inside the poly, stop search. + if (dtPointInPolygon(endPos, verts, nverts)) + { + bestNode = curNode; + dtVcopy(bestPos, endPos); + break; + } + + // Find wall edges and find nearest point inside the walls. + for (int i = 0, j = (int)curPoly->vertCount-1; i < (int)curPoly->vertCount; j = i++) + { + // Find links to neighbours. + static const int MAX_NEIS = 8; + int nneis = 0; + dtPolyRef neis[MAX_NEIS]; + + if (curPoly->neis[j] & DT_EXT_LINK) + { + // Tile border. + for (unsigned int k = curPoly->firstLink; k != DT_NULL_LINK; k = curTile->links[k].next) + { + const dtLink* link = &curTile->links[k]; + if (link->edge == j) + { + if (link->ref != 0 && passFilter(filter, m_nav->getPolyFlags(link->ref))) + { + if (nneis < MAX_NEIS) + neis[nneis++] = link->ref; + } + } + } + } + else if (curPoly->neis[j] && passFilter(filter, curTile->polys[curPoly->neis[j]-1].flags)) + { + // Internal edge, encode id. + neis[nneis++] = m_nav->getPolyRefBase(curTile) | (unsigned int)(curPoly->neis[j]-1); + } + + if (!nneis) + { + // Wall edge, calc distance. + const float* vj = &verts[j*3]; + const float* vi = &verts[i*3]; + float tseg; + const float distSqr = dtDistancePtSegSqr2D(endPos, vj, vi, tseg); + if (distSqr < bestDist) + { + // Update nearest distance. + dtVlerp(bestPos, vj,vi, tseg); + bestDist = distSqr; + bestNode = curNode; + } + } + else + { + for (int k = 0; k < nneis; ++k) + { + // Skip if no node can be allocated. + dtNode* neighbourNode = m_tinyNodePool->getNode(neis[k]); + if (!neighbourNode) + continue; + // Skip if already visited. + if (neighbourNode->flags & DT_NODE_CLOSED) + continue; + + // Skip the link if it is too far from search constraint. + // TODO: Maybe should use getPortalPoints(), but this one is way faster. + const float* vj = &verts[j*3]; + const float* vi = &verts[i*3]; + float tseg; + float distSqr = dtDistancePtSegSqr2D(searchPos, vj, vi, tseg); + if (distSqr > searchRadSqr) + continue; + + // Mark as the node as visited and push to queue. + if (nstack < MAX_STACK) + { + neighbourNode->pidx = m_tinyNodePool->getNodeIdx(curNode); + neighbourNode->flags |= DT_NODE_CLOSED; + stack[nstack++] = neighbourNode; + } + } + } + } + } + + int n = 0; + if (bestNode) + { + // Reverse the path. + dtNode* prev = 0; + dtNode* node = bestNode; + do + { + dtNode* next = m_tinyNodePool->getNodeAtIdx(node->pidx); + node->pidx = m_tinyNodePool->getNodeIdx(prev); + prev = node; + node = next; + } + while (node); + + // Store result + node = prev; + do + { + visited[n++] = node->id; + node = m_tinyNodePool->getNodeAtIdx(node->pidx); + } + while (node && n < maxVisitedSize); + } + + dtVcopy(resultPos, bestPos); + + return n; +} + + +bool dtNavMeshQuery::getPortalPoints(dtPolyRef from, dtPolyRef to, float* left, float* right, + unsigned char& fromType, unsigned char& toType) const +{ + dtAssert(m_nav); + + const dtMeshTile* fromTile = 0; + const dtPoly* fromPoly = 0; + if (!m_nav->getTileAndPolyByRef(from, &fromTile, &fromPoly)) + return false; + fromType = fromPoly->type; + + const dtMeshTile* toTile = 0; + const dtPoly* toPoly = 0; + if (!m_nav->getTileAndPolyByRef(to, &toTile, &toPoly)) + return false; + toType = toPoly->type; + + return getPortalPoints(from, fromPoly, fromTile, to, toPoly, toTile, left, right); +} + +// Returns portal points between two polygons. +bool dtNavMeshQuery::getPortalPoints(dtPolyRef from, const dtPoly* fromPoly, const dtMeshTile* fromTile, + dtPolyRef to, const dtPoly* toPoly, const dtMeshTile* toTile, + float* left, float* right) const +{ + // Find the link that points to the 'to' polygon. + const dtLink* link = 0; + for (unsigned int i = fromPoly->firstLink; i != DT_NULL_LINK; i = fromTile->links[i].next) + { + if (fromTile->links[i].ref == to) + { + link = &fromTile->links[i]; + break; + } + } + if (!link) + return false; + + // Handle off-mesh connections. + if (fromPoly->type == DT_POLYTYPE_OFFMESH_CONNECTION) + { + // Find link that points to first vertex. + for (unsigned int i = fromPoly->firstLink; i != DT_NULL_LINK; i = fromTile->links[i].next) + { + if (fromTile->links[i].ref == to) + { + const int v = fromTile->links[i].edge; + dtVcopy(left, &fromTile->verts[fromPoly->verts[v]*3]); + dtVcopy(right, &fromTile->verts[fromPoly->verts[v]*3]); + return true; + } + } + return false; + } + + if (toPoly->type == DT_POLYTYPE_OFFMESH_CONNECTION) + { + for (unsigned int i = toPoly->firstLink; i != DT_NULL_LINK; i = toTile->links[i].next) + { + if (toTile->links[i].ref == from) + { + const int v = toTile->links[i].edge; + dtVcopy(left, &toTile->verts[toPoly->verts[v]*3]); + dtVcopy(right, &toTile->verts[toPoly->verts[v]*3]); + return true; + } + } + return false; + } + + // Find portal vertices. + const int v0 = fromPoly->verts[link->edge]; + const int v1 = fromPoly->verts[(link->edge+1) % (int)fromPoly->vertCount]; + dtVcopy(left, &fromTile->verts[v0*3]); + dtVcopy(right, &fromTile->verts[v1*3]); + + // If the link is at tile boundary, dtClamp the vertices to + // the link width. + if (link->side != 0xff) + { + // Unpack portal limits. + if (link->bmin != 0 || link->bmax != 255) + { + const float s = 1.0f/255.0f; + const float tmin = link->bmin*s; + const float tmax = link->bmax*s; + dtVlerp(left, &fromTile->verts[v0*3], &fromTile->verts[v1*3], tmin); + dtVlerp(right, &fromTile->verts[v0*3], &fromTile->verts[v1*3], tmax); + } + } + + return true; +} + +// Returns edge mid point between two polygons. +bool dtNavMeshQuery::getEdgeMidPoint(dtPolyRef from, dtPolyRef to, float* mid) const +{ + float left[3], right[3]; + unsigned char fromType, toType; + if (!getPortalPoints(from, to, left,right, fromType, toType)) return false; + mid[0] = (left[0]+right[0])*0.5f; + mid[1] = (left[1]+right[1])*0.5f; + mid[2] = (left[2]+right[2])*0.5f; + return true; +} + +bool dtNavMeshQuery::getEdgeMidPoint(dtPolyRef from, const dtPoly* fromPoly, const dtMeshTile* fromTile, + dtPolyRef to, const dtPoly* toPoly, const dtMeshTile* toTile, + float* mid) const +{ + float left[3], right[3]; + if (!getPortalPoints(from, fromPoly, fromTile, to, toPoly, toTile, left, right)) + return false; + mid[0] = (left[0]+right[0])*0.5f; + mid[1] = (left[1]+right[1])*0.5f; + mid[2] = (left[2]+right[2])*0.5f; + return true; +} + +int dtNavMeshQuery::raycast(dtPolyRef centerRef, const float* startPos, const float* endPos, const dtQueryFilter* filter, + float& t, float* hitNormal, dtPolyRef* path, const int pathSize) const +{ + dtAssert(m_nav); + + t = 0; + + // Validate input + if (!centerRef || !m_nav->isValidPolyRef(centerRef)) + return 0; + + dtPolyRef curRef = centerRef; + float verts[DT_VERTS_PER_POLYGON*3]; + int n = 0; + + hitNormal[0] = 0; + hitNormal[1] = 0; + hitNormal[2] = 0; + + while (curRef) + { + // Cast ray against current polygon. + + // The API input has been cheked already, skip checking internal data. + const dtMeshTile* tile = 0; + const dtPoly* poly = 0; + m_nav->getTileAndPolyByRefUnsafe(curRef, &tile, &poly); + + // Collect vertices. + int nv = 0; + for (int i = 0; i < (int)poly->vertCount; ++i) + { + dtVcopy(&verts[nv*3], &tile->verts[poly->verts[i]*3]); + nv++; + } + + float tmin, tmax; + int segMin, segMax; + if (!dtIntersectSegmentPoly2D(startPos, endPos, verts, nv, tmin, tmax, segMin, segMax)) + { + // Could not hit the polygon, keep the old t and report hit. + return n; + } + // Keep track of furthest t so far. + if (tmax > t) + t = tmax; + + // Store visited polygons. + if (n < pathSize) + path[n++] = curRef; + + // Ray end is completely inside the polygon. + if (segMax == -1) + { + t = FLT_MAX; + return n; + } + + // Follow neighbours. + dtPolyRef nextRef = 0; + + for (unsigned int i = poly->firstLink; i != DT_NULL_LINK; i = tile->links[i].next) + { + const dtLink* link = &tile->links[i]; + + // Find link which contains this edge. + if ((int)link->edge != segMax) + continue; + + // Get pointer to the next polygon. + const dtMeshTile* nextTile = 0; + const dtPoly* nextPoly = 0; + m_nav->getTileAndPolyByRefUnsafe(link->ref, &nextTile, &nextPoly); + + // Skip off-mesh connections. + if (nextPoly->type == DT_POLYTYPE_OFFMESH_CONNECTION) + continue; + + // Skip links based on filter. + if (!passFilter(filter, nextPoly->flags)) + continue; + + // If the link is internal, just return the ref. + if (link->side == 0xff) + { + nextRef = link->ref; + break; + } + + // If the link is at tile boundary, + + // Check if the link spans the whole edge, and accept. + if (link->bmin == 0 && link->bmax == 255) + { + nextRef = link->ref; + break; + } + + // Check for partial edge links. + const int v0 = poly->verts[link->edge]; + const int v1 = poly->verts[(link->edge+1) % poly->vertCount]; + const float* left = &tile->verts[v0*3]; + const float* right = &tile->verts[v1*3]; + + // Check that the intersection lies inside the link portal. + if (link->side == 0 || link->side == 4) + { + // Calculate link size. + const float s = 1.0f/255.0f; + float lmin = left[2] + (right[2] - left[2])*(link->bmin*s); + float lmax = left[2] + (right[2] - left[2])*(link->bmax*s); + if (lmin > lmax) dtSwap(lmin, lmax); + + // Find Z intersection. + float z = startPos[2] + (endPos[2]-startPos[2])*tmax; + if (z >= lmin && z <= lmax) + { + nextRef = link->ref; + break; + } + } + else if (link->side == 2 || link->side == 6) + { + // Calculate link size. + const float s = 1.0f/255.0f; + float lmin = left[0] + (right[0] - left[0])*(link->bmin*s); + float lmax = left[0] + (right[0] - left[0])*(link->bmax*s); + if (lmin > lmax) dtSwap(lmin, lmax); + + // Find X intersection. + float x = startPos[0] + (endPos[0]-startPos[0])*tmax; + if (x >= lmin && x <= lmax) + { + nextRef = link->ref; + break; + } + } + } + + if (!nextRef) + { + // No neighbour, we hit a wall. + + // Calculate hit normal. + const int a = segMax; + const int b = segMax+1 < nv ? segMax+1 : 0; + const float* va = &verts[a*3]; + const float* vb = &verts[b*3]; + const float dx = vb[0] - va[0]; + const float dz = vb[2] - va[2]; + hitNormal[0] = dz; + hitNormal[1] = 0; + hitNormal[2] = -dx; + dtVnormalize(hitNormal); + + return n; + } + + // No hit, advance to neighbour polygon. + curRef = nextRef; + } + + return n; +} + +int dtNavMeshQuery::findPolysAroundCircle(dtPolyRef centerRef, const float* centerPos, const float radius, + const dtQueryFilter* filter, + dtPolyRef* resultRef, dtPolyRef* resultParent, float* resultCost, + const int maxResult) const +{ + dtAssert(m_nav); + dtAssert(m_nodePool); + dtAssert(m_openList); + + // Validate input + if (!centerRef) return 0; + if (!m_nav->isValidPolyRef(centerRef)) return 0; + + m_nodePool->clear(); + m_openList->clear(); + + dtNode* startNode = m_nodePool->getNode(centerRef); + startNode->pidx = 0; + startNode->cost = 0; + startNode->total = 0; + startNode->id = centerRef; + startNode->flags = DT_NODE_OPEN; + m_openList->push(startNode); + + int n = 0; + if (n < maxResult) + { + if (resultRef) + resultRef[n] = startNode->id; + if (resultParent) + resultParent[n] = 0; + if (resultCost) + resultCost[n] = 0; + ++n; + } + + const float radiusSqr = dtSqr(radius); + + while (!m_openList->empty()) + { + dtNode* bestNode = m_openList->pop(); + + float previousEdgeMidPoint[3]; + + // Get poly and tile. + // The API input has been cheked already, skip checking internal data. + const dtPolyRef bestRef = bestNode->id; + const dtMeshTile* bestTile = 0; + const dtPoly* bestPoly = 0; + m_nav->getTileAndPolyByRefUnsafe(bestRef, &bestTile, &bestPoly); + + // Get parent poly and tile. + dtPolyRef parentRef = 0; + const dtMeshTile* parentTile = 0; + const dtPoly* parentPoly = 0; + if (bestNode->pidx) + parentRef = m_nodePool->getNodeAtIdx(bestNode->pidx)->id; + if (parentRef) + { + m_nav->getTileAndPolyByRefUnsafe(parentRef, &parentTile, &parentPoly); + + getEdgeMidPoint(parentRef, parentPoly, parentTile, + bestRef, bestPoly, bestTile, previousEdgeMidPoint); + } + else + { + dtVcopy(previousEdgeMidPoint, centerPos); + } + + for (unsigned int i = bestPoly->firstLink; i != DT_NULL_LINK; i = bestTile->links[i].next) + { + const dtLink* link = &bestTile->links[i]; + dtPolyRef neighbourRef = link->ref; + // Skip invalid neighbours and do not follow back to parent. + if (!neighbourRef || neighbourRef == parentRef) + continue; + + // Expand to neighbour + const dtMeshTile* neighbourTile = 0; + const dtPoly* neighbourPoly = 0; + m_nav->getTileAndPolyByRefUnsafe(neighbourRef, &neighbourTile, &neighbourPoly); + + // Do not advance if the polygon is excluded by the filter. + if (!passFilter(filter, neighbourPoly->flags)) + continue; + + // Find edge and calc distance to the edge. + float va[3], vb[3]; + if (!getPortalPoints(bestRef, bestPoly, bestTile, neighbourRef, neighbourPoly, neighbourTile, va, vb)) + continue; + + // If the circle is not touching the next polygon, skip it. + float tseg; + float distSqr = dtDistancePtSegSqr2D(centerPos, va, vb, tseg); + if (distSqr > radiusSqr) + continue; + + dtNode newNode; + newNode.pidx = m_nodePool->getNodeIdx(bestNode); + newNode.id = neighbourRef; + + // Cost + float edgeMidPoint[3]; + dtVlerp(edgeMidPoint, va, vb, 0.5f); + + newNode.total = bestNode->total + dtVdist(previousEdgeMidPoint, edgeMidPoint); + + dtNode* actualNode = m_nodePool->getNode(newNode.id); + if (!actualNode) + continue; + + if (!((actualNode->flags & DT_NODE_OPEN) && newNode.total > actualNode->total) && + !((actualNode->flags & DT_NODE_CLOSED) && newNode.total > actualNode->total)) + { + actualNode->flags &= ~DT_NODE_CLOSED; + actualNode->pidx = newNode.pidx; + actualNode->total = newNode.total; + + if (actualNode->flags & DT_NODE_OPEN) + { + m_openList->modify(actualNode); + } + else + { + if (n < maxResult) + { + if (resultRef) + resultRef[n] = actualNode->id; + if (resultParent) + resultParent[n] = m_nodePool->getNodeAtIdx(actualNode->pidx)->id; + if (resultCost) + resultCost[n] = actualNode->total; + ++n; + } + actualNode->flags = DT_NODE_OPEN; + m_openList->push(actualNode); + } + } + } + } + + return n; +} + +int dtNavMeshQuery::findPolysAroundShape(dtPolyRef centerRef, const float* verts, const int nverts, + const dtQueryFilter* filter, + dtPolyRef* resultRef, dtPolyRef* resultParent, float* resultCost, + const int maxResult) const +{ + dtAssert(m_nav); + dtAssert(m_nodePool); + dtAssert(m_openList); + + // Validate input + if (!centerRef) return 0; + if (!m_nav->isValidPolyRef(centerRef)) return 0; + + m_nodePool->clear(); + m_openList->clear(); + + dtNode* startNode = m_nodePool->getNode(centerRef); + startNode->pidx = 0; + startNode->cost = 0; + startNode->total = 0; + startNode->id = centerRef; + startNode->flags = DT_NODE_OPEN; + m_openList->push(startNode); + + int n = 0; + if (n < maxResult) + { + if (resultRef) + resultRef[n] = startNode->id; + if (resultParent) + resultParent[n] = 0; + if (resultCost) + resultCost[n] = 0; + ++n; + } + + float centerPos[3] = {0,0,0}; + for (int i = 0; i < nverts; ++i) + dtVadd(centerPos,centerPos,&verts[i*3]); + dtVscale(centerPos,centerPos,1.0f/nverts); + + while (!m_openList->empty()) + { + dtNode* bestNode = m_openList->pop(); + + float previousEdgeMidPoint[3]; + + // Get poly and tile. + // The API input has been cheked already, skip checking internal data. + const dtPolyRef bestRef = bestNode->id; + const dtMeshTile* bestTile = 0; + const dtPoly* bestPoly = 0; + m_nav->getTileAndPolyByRefUnsafe(bestRef, &bestTile, &bestPoly); + + // Get parent poly and tile. + dtPolyRef parentRef = 0; + const dtMeshTile* parentTile = 0; + const dtPoly* parentPoly = 0; + if (bestNode->pidx) + parentRef = m_nodePool->getNodeAtIdx(bestNode->pidx)->id; + if (parentRef) + { + m_nav->getTileAndPolyByRefUnsafe(parentRef, &parentTile, &parentPoly); + getEdgeMidPoint(parentRef, parentPoly, parentTile, + bestRef, bestPoly, bestTile, previousEdgeMidPoint); + } + else + { + dtVcopy(previousEdgeMidPoint, centerPos); + } + + for (unsigned int i = bestPoly->firstLink; i != DT_NULL_LINK; i = bestTile->links[i].next) + { + const dtLink* link = &bestTile->links[i]; + dtPolyRef neighbourRef = link->ref; + // Skip invalid neighbours and do not follow back to parent. + if (!neighbourRef || neighbourRef == parentRef) + continue; + + // Expand to neighbour + const dtMeshTile* neighbourTile = 0; + const dtPoly* neighbourPoly = 0; + m_nav->getTileAndPolyByRefUnsafe(neighbourRef, &neighbourTile, &neighbourPoly); + + // Do not advance if the polygon is excluded by the filter. + if (!passFilter(filter, neighbourPoly->flags)) + continue; + + // Find edge and calc distance to the edge. + float va[3], vb[3]; + if (!getPortalPoints(bestRef, bestPoly, bestTile, neighbourRef, neighbourPoly, neighbourTile, va, vb)) + continue; + + // If the poly is not touching the edge to the next polygon, skip the connection it. + float tmin, tmax; + int segMin, segMax; + if (!dtIntersectSegmentPoly2D(va, vb, verts, nverts, tmin, tmax, segMin, segMax)) + continue; + if (tmin > 1.0f || tmax < 0.0f) + continue; + + dtNode newNode; + newNode.pidx = m_nodePool->getNodeIdx(bestNode); + newNode.id = neighbourRef; + + // Cost + float edgeMidPoint[3]; + dtVlerp(edgeMidPoint, va, vb, 0.5f); + + newNode.total = bestNode->total + dtVdist(previousEdgeMidPoint, edgeMidPoint); + + dtNode* actualNode = m_nodePool->getNode(newNode.id); + if (!actualNode) + continue; + + if (!((actualNode->flags & DT_NODE_OPEN) && newNode.total > actualNode->total) && + !((actualNode->flags & DT_NODE_CLOSED) && newNode.total > actualNode->total)) + { + actualNode->flags &= ~DT_NODE_CLOSED; + actualNode->pidx = newNode.pidx; + actualNode->total = newNode.total; + + if (actualNode->flags & DT_NODE_OPEN) + { + m_openList->modify(actualNode); + } + else + { + if (n < maxResult) + { + if (resultRef) + resultRef[n] = actualNode->id; + if (resultParent) + resultParent[n] = m_nodePool->getNodeAtIdx(actualNode->pidx)->id; + if (resultCost) + resultCost[n] = actualNode->total; + ++n; + } + actualNode->flags = DT_NODE_OPEN; + m_openList->push(actualNode); + } + } + } + } + + return n; +} + + +int dtNavMeshQuery::findLocalNeighbourhood(dtPolyRef centerRef, const float* centerPos, const float radius, + const dtQueryFilter* filter, + dtPolyRef* resultRef, dtPolyRef* resultParent, const int maxResult) const +{ + dtAssert(m_nav); + dtAssert(m_tinyNodePool); + + // Validate input + if (!centerRef) return 0; + if (!m_nav->isValidPolyRef(centerRef)) return 0; + + static const int MAX_STACK = 48; + dtNode* stack[MAX_STACK]; + int nstack = 0; + + m_tinyNodePool->clear(); + + dtNode* startNode = m_tinyNodePool->getNode(centerRef); + startNode->pidx = 0; + startNode->id = centerRef; + startNode->flags = DT_NODE_CLOSED; + stack[nstack++] = startNode; + + const float radiusSqr = dtSqr(radius); + + float pa[DT_VERTS_PER_POLYGON*3]; + float pb[DT_VERTS_PER_POLYGON*3]; + + int n = 0; + if (n < maxResult) + { + resultRef[n] = startNode->id; + if (resultParent) + resultParent[n] = 0; + ++n; + } + + while (nstack) + { + // Pop front. + dtNode* curNode = stack[0]; + for (int i = 0; i < nstack-1; ++i) + stack[i] = stack[i+1]; + nstack--; + + // Get poly and tile. + // The API input has been cheked already, skip checking internal data. + const dtPolyRef curRef = curNode->id; + const dtMeshTile* curTile = 0; + const dtPoly* curPoly = 0; + m_nav->getTileAndPolyByRefUnsafe(curRef, &curTile, &curPoly); + + for (unsigned int i = curPoly->firstLink; i != DT_NULL_LINK; i = curTile->links[i].next) + { + const dtLink* link = &curTile->links[i]; + dtPolyRef neighbourRef = link->ref; + // Skip invalid neighbours. + if (!neighbourRef) + continue; + + // Skip if cannot alloca more nodes. + dtNode* neighbourNode = m_tinyNodePool->getNode(neighbourRef); + if (!neighbourNode) + continue; + // Skip visited. + if (neighbourNode->flags & DT_NODE_CLOSED) + continue; + + // Expand to neighbour + const dtMeshTile* neighbourTile = 0; + const dtPoly* neighbourPoly = 0; + m_nav->getTileAndPolyByRefUnsafe(neighbourRef, &neighbourTile, &neighbourPoly); + + // Skip off-mesh connections. + if (neighbourPoly->type == DT_POLYTYPE_OFFMESH_CONNECTION) + continue; + + // Do not advance if the polygon is excluded by the filter. + if (!passFilter(filter, neighbourPoly->flags)) + continue; + + // Find edge and calc distance to the edge. + float va[3], vb[3]; + if (!getPortalPoints(curRef, curPoly, curTile, neighbourRef, neighbourPoly, neighbourTile, va, vb)) + continue; + + // If the circle is not touching the next polygon, skip it. + float tseg; + float distSqr = dtDistancePtSegSqr2D(centerPos, va, vb, tseg); + if (distSqr > radiusSqr) + continue; + + // Mark node visited, this is done before the overlap test so that + // we will not visit the poly again if the test fails. + neighbourNode->flags |= DT_NODE_CLOSED; + neighbourNode->pidx = m_tinyNodePool->getNodeIdx(curNode); + + // Check that the polygon does not collide with existing polygons. + + // Collect vertices of the neighbour poly. + const int npa = neighbourPoly->vertCount; + for (int k = 0; k < npa; ++k) + dtVcopy(&pa[k*3], &neighbourTile->verts[neighbourPoly->verts[k]*3]); + + bool overlap = false; + for (int j = 0; j < n; ++j) + { + dtPolyRef pastRef = resultRef[j]; + + // Connected polys do not overlap. + bool areConnected = false; + for (unsigned int k = curPoly->firstLink; k != DT_NULL_LINK; k = curTile->links[k].next) + { + if (curTile->links[k].ref == pastRef) + { + areConnected = true; + break; + } + } + if (areConnected) + continue; + + // Potentially overlapping. + const dtMeshTile* pastTile = 0; + const dtPoly* pastPoly = 0; + m_nav->getTileAndPolyByRefUnsafe(pastRef, &pastTile, &pastPoly); + + // Get vertices and test overlap + const int npb = pastPoly->vertCount; + for (int k = 0; k < npb; ++k) + dtVcopy(&pb[k*3], &pastTile->verts[pastPoly->verts[k]*3]); + + if (dtOverlapPolyPoly2D(pa,npa, pb,npb)) + { + overlap = true; + break; + } + } + if (overlap) + continue; + + // This poly is fine, store and advance to the poly. + if (n < maxResult) + { + resultRef[n] = neighbourRef; + if (resultParent) + resultParent[n] = curRef; + ++n; + } + + if (nstack < MAX_STACK) + { + stack[nstack++] = neighbourNode; + } + } + } + + return n; +} + + +struct dtSegInterval +{ + short tmin, tmax; +}; + +static void insertInterval(dtSegInterval* ints, int& nints, const int maxInts, + const short tmin, const short tmax) +{ + if (nints+1 > maxInts) return; + // Find insertion point. + int idx = 0; + while (idx < nints) + { + if (tmax <= ints[idx].tmin) + break; + idx++; + } + // Move current results. + if (nints-idx) + memmove(ints+idx+1, ints+idx, sizeof(dtSegInterval)*(nints-idx)); + // Store + ints[idx].tmin = tmin; + ints[idx].tmax = tmax; + nints++; +} + +int dtNavMeshQuery::getPolyWallSegments(dtPolyRef ref, const dtQueryFilter* filter, float* segments) +{ + dtAssert(m_nav); + + const dtMeshTile* tile = 0; + const dtPoly* poly = 0; + if (!m_nav->getTileAndPolyByRef(ref, &tile, &poly)) + return 0; + + int n = 0; + static const int MAX_INTERVAL = 16; + dtSegInterval ints[MAX_INTERVAL]; + int nints; + + for (int i = 0, j = (int)poly->vertCount-1; i < (int)poly->vertCount; j = i++) + { + // Skip non-solid edges. + nints = 0; + if (poly->neis[j] & DT_EXT_LINK) + { + // Tile border. + for (unsigned int k = poly->firstLink; k != DT_NULL_LINK; k = tile->links[k].next) + { + const dtLink* link = &tile->links[k]; + if (link->edge == j) + { + if (link->ref != 0 && passFilter(filter, m_nav->getPolyFlags(link->ref))) + { + insertInterval(ints, nints, MAX_INTERVAL, link->bmin, link->bmax); + } + } + } + } + else if (poly->neis[j] && passFilter(filter, tile->polys[poly->neis[j]-1].flags)) + { + // Internal edge + continue; + } + + // Add sentinels + insertInterval(ints, nints, MAX_INTERVAL, -1, 0); + insertInterval(ints, nints, MAX_INTERVAL, 255, 256); + + // Store segment. + const float* vj = &tile->verts[poly->verts[j]*3]; + const float* vi = &tile->verts[poly->verts[i]*3]; + for (int k = 1; k < nints; ++k) + { + // Find the space inbetween the opening areas. + const int imin = ints[k-1].tmax; + const int imax = ints[k].tmin; + if (imin == imax) continue; + if (imin == 0 && imax == 255) + { + if (n < DT_VERTS_PER_POLYGON) + { + float* seg = &segments[n*6]; + n++; + dtVcopy(seg+0, vj); + dtVcopy(seg+3, vi); + } + } + else + { + const float tmin = imin/255.0f; + const float tmax = imax/255.0f; + if (n < DT_VERTS_PER_POLYGON) + { + float* seg = &segments[n*6]; + n++; + dtVlerp(seg+0, vj,vi, tmin); + dtVlerp(seg+3, vj,vi, tmax); + } + } + } + } + + return n; +} + +float dtNavMeshQuery::findDistanceToWall(dtPolyRef centerRef, const float* centerPos, float maxRadius, const dtQueryFilter* filter, + float* hitPos, float* hitNormal) const +{ + dtAssert(m_nav); + dtAssert(m_nodePool); + dtAssert(m_openList); + + // Validate input + if (!centerRef) return 0; + if (!m_nav->isValidPolyRef(centerRef)) return 0; + + m_nodePool->clear(); + m_openList->clear(); + + dtNode* startNode = m_nodePool->getNode(centerRef); + startNode->pidx = 0; + startNode->cost = 0; + startNode->total = 0; + startNode->id = centerRef; + startNode->flags = DT_NODE_OPEN; + m_openList->push(startNode); + + float radiusSqr = dtSqr(maxRadius); + + while (!m_openList->empty()) + { + dtNode* bestNode = m_openList->pop(); + + float previousEdgeMidPoint[3]; + + // Get poly and tile. + // The API input has been cheked already, skip checking internal data. + const dtPolyRef bestRef = bestNode->id; + const dtMeshTile* bestTile = 0; + const dtPoly* bestPoly = 0; + m_nav->getTileAndPolyByRefUnsafe(bestRef, &bestTile, &bestPoly); + + // Get parent poly and tile. + dtPolyRef parentRef = 0; + const dtMeshTile* parentTile = 0; + const dtPoly* parentPoly = 0; + if (bestNode->pidx) + parentRef = m_nodePool->getNodeAtIdx(bestNode->pidx)->id; + if (parentRef) + { + m_nav->getTileAndPolyByRefUnsafe(parentRef, &parentTile, &parentPoly); + getEdgeMidPoint(parentRef, parentPoly, parentTile, + bestRef, bestPoly, bestTile, previousEdgeMidPoint); + } + else + { + dtVcopy(previousEdgeMidPoint, centerPos); + } + + // Hit test walls. + for (int i = 0, j = (int)bestPoly->vertCount-1; i < (int)bestPoly->vertCount; j = i++) + { + // Skip non-solid edges. + if (bestPoly->neis[j] & DT_EXT_LINK) + { + // Tile border. + bool solid = true; + for (unsigned int k = bestPoly->firstLink; k != DT_NULL_LINK; k = bestTile->links[k].next) + { + const dtLink* link = &bestTile->links[k]; + if (link->edge == j) + { + if (link->ref != 0 && passFilter(filter, m_nav->getPolyFlags(link->ref))) + solid = false; + break; + } + } + if (!solid) continue; + } + else if (bestPoly->neis[j] && passFilter(filter, bestTile->polys[bestPoly->neis[j]-1].flags)) + { + // Internal edge + continue; + } + + // Calc distance to the edge. + const float* vj = &bestTile->verts[bestPoly->verts[j]*3]; + const float* vi = &bestTile->verts[bestPoly->verts[i]*3]; + float tseg; + float distSqr = dtDistancePtSegSqr2D(centerPos, vj, vi, tseg); + + // Edge is too far, skip. + if (distSqr > radiusSqr) + continue; + + // Hit wall, update radius. + radiusSqr = distSqr; + // Calculate hit pos. + hitPos[0] = vj[0] + (vi[0] - vj[0])*tseg; + hitPos[1] = vj[1] + (vi[1] - vj[1])*tseg; + hitPos[2] = vj[2] + (vi[2] - vj[2])*tseg; + } + + for (unsigned int i = bestPoly->firstLink; i != DT_NULL_LINK; i = bestTile->links[i].next) + { + const dtLink* link = &bestTile->links[i]; + dtPolyRef neighbourRef = link->ref; + // Skip invalid neighbours and do not follow back to parent. + if (!neighbourRef || neighbourRef == parentRef) + continue; + + // Expand to neighbour. + const dtMeshTile* neighbourTile = 0; + const dtPoly* neighbourPoly = 0; + m_nav->getTileAndPolyByRefUnsafe(neighbourRef, &neighbourTile, &neighbourPoly); + + // Skip off-mesh connections. + if (neighbourPoly->type == DT_POLYTYPE_OFFMESH_CONNECTION) + continue; + + // Calc distance to the edge. + const float* va = &bestTile->verts[bestPoly->verts[link->edge]*3]; + const float* vb = &bestTile->verts[bestPoly->verts[(link->edge+1) % bestPoly->vertCount]*3]; + float tseg; + float distSqr = dtDistancePtSegSqr2D(centerPos, va, vb, tseg); + + // If the circle is not touching the next polygon, skip it. + if (distSqr > radiusSqr) + continue; + + if (!passFilter(filter, neighbourPoly->flags)) + continue; + + dtNode newNode; + newNode.pidx = m_nodePool->getNodeIdx(bestNode); + newNode.id = neighbourRef; + + // Cost + float edgeMidPoint[3]; + getEdgeMidPoint(bestRef, bestPoly, bestTile, + neighbourRef, neighbourPoly, neighbourTile, edgeMidPoint); + + newNode.total = bestNode->total + dtVdist(previousEdgeMidPoint, edgeMidPoint); + + dtNode* actualNode = m_nodePool->getNode(newNode.id); + if (!actualNode) + continue; + + if (!((actualNode->flags & DT_NODE_OPEN) && newNode.total > actualNode->total) && + !((actualNode->flags & DT_NODE_CLOSED) && newNode.total > actualNode->total)) + { + actualNode->flags &= ~DT_NODE_CLOSED; + actualNode->pidx = newNode.pidx; + actualNode->total = newNode.total; + + if (actualNode->flags & DT_NODE_OPEN) + { + m_openList->modify(actualNode); + } + else + { + actualNode->flags = DT_NODE_OPEN; + m_openList->push(actualNode); + } + } + } + } + + // Calc hit normal. + dtVsub(hitNormal, centerPos, hitPos); + dtVnormalize(hitNormal); + + return sqrtf(radiusSqr); +} + +bool dtNavMeshQuery::isInClosedList(dtPolyRef ref) const +{ + if (!m_nodePool) return false; + const dtNode* node = m_nodePool->findNode(ref); + return node && node->flags & DT_NODE_CLOSED; +} diff --git a/RecastDemo/Bin/Recast.app/Contents/MacOS/Recast b/RecastDemo/Bin/Recast.app/Contents/MacOS/Recast index 3c79184..4536443 100755 Binary files a/RecastDemo/Bin/Recast.app/Contents/MacOS/Recast and b/RecastDemo/Bin/Recast.app/Contents/MacOS/Recast differ diff --git a/RecastDemo/Build/Xcode/Recast.xcodeproj/memon.pbxuser b/RecastDemo/Build/Xcode/Recast.xcodeproj/memon.pbxuser index 612e29d..bc321f0 100644 --- a/RecastDemo/Build/Xcode/Recast.xcodeproj/memon.pbxuser +++ b/RecastDemo/Build/Xcode/Recast.xcodeproj/memon.pbxuser @@ -20,6 +20,7 @@ 6B42164711806B2F006C347B /* DetourDebugDraw.cpp:344 */, 6B10014C11AD1C1E0098A59A /* RecastMesh.cpp:1398 */, 6BAF3EB31212906D008CFCDF /* CrowdTool.cpp:774 */, + 6BAF42D6121AF2AC008CFCDF /* NavMeshTesterTool.cpp:149 */, ); codeSenseManager = 6B8632AA0F78115100E2684A /* Code sense */; executables = ( @@ -672,6 +673,158 @@ 6BAF4288121ADD46008CFCDF /* PBXTextBookmark */ = 6BAF4288121ADD46008CFCDF /* PBXTextBookmark */; 6BAF4289121ADD46008CFCDF /* PBXTextBookmark */ = 6BAF4289121ADD46008CFCDF /* PBXTextBookmark */; 6BAF428A121ADD46008CFCDF /* PBXTextBookmark */ = 6BAF428A121ADD46008CFCDF /* PBXTextBookmark */; + 6BAF428C121AEBDF008CFCDF /* PBXTextBookmark */ = 6BAF428C121AEBDF008CFCDF /* PBXTextBookmark */; + 6BAF428D121AEBDF008CFCDF /* PBXTextBookmark */ = 6BAF428D121AEBDF008CFCDF /* PBXTextBookmark */; + 6BAF428E121AEBDF008CFCDF /* PBXTextBookmark */ = 6BAF428E121AEBDF008CFCDF /* PBXTextBookmark */; + 6BAF428F121AEBDF008CFCDF /* PBXTextBookmark */ = 6BAF428F121AEBDF008CFCDF /* PBXTextBookmark */; + 6BAF4290121AEBDF008CFCDF /* PBXTextBookmark */ = 6BAF4290121AEBDF008CFCDF /* PBXTextBookmark */; + 6BAF4291121AEBDF008CFCDF /* PBXTextBookmark */ = 6BAF4291121AEBDF008CFCDF /* PBXTextBookmark */; + 6BAF4292121AEBDF008CFCDF /* PBXTextBookmark */ = 6BAF4292121AEBDF008CFCDF /* PBXTextBookmark */; + 6BAF4293121AEBDF008CFCDF /* PBXTextBookmark */ = 6BAF4293121AEBDF008CFCDF /* PBXTextBookmark */; + 6BAF4294121AEBDF008CFCDF /* PBXTextBookmark */ = 6BAF4294121AEBDF008CFCDF /* PBXTextBookmark */; + 6BAF4295121AEC2A008CFCDF /* PBXTextBookmark */ = 6BAF4295121AEC2A008CFCDF /* PBXTextBookmark */; + 6BAF4296121AEC2A008CFCDF /* PBXTextBookmark */ = 6BAF4296121AEC2A008CFCDF /* PBXTextBookmark */; + 6BAF4297121AEC2A008CFCDF /* PBXTextBookmark */ = 6BAF4297121AEC2A008CFCDF /* PBXTextBookmark */; + 6BAF4298121AEC2A008CFCDF /* PBXTextBookmark */ = 6BAF4298121AEC2A008CFCDF /* PBXTextBookmark */; + 6BAF4299121AEC2A008CFCDF /* PBXTextBookmark */ = 6BAF4299121AEC2A008CFCDF /* PBXTextBookmark */; + 6BAF429A121AED31008CFCDF /* PBXTextBookmark */ = 6BAF429A121AED31008CFCDF /* PBXTextBookmark */; + 6BAF429B121AED31008CFCDF /* PBXTextBookmark */ = 6BAF429B121AED31008CFCDF /* PBXTextBookmark */; + 6BAF429C121AED31008CFCDF /* PBXTextBookmark */ = 6BAF429C121AED31008CFCDF /* PBXTextBookmark */; + 6BAF429D121AED31008CFCDF /* PBXTextBookmark */ = 6BAF429D121AED31008CFCDF /* PBXTextBookmark */; + 6BAF429E121AED31008CFCDF /* PBXTextBookmark */ = 6BAF429E121AED31008CFCDF /* PBXTextBookmark */; + 6BAF429F121AED31008CFCDF /* PBXTextBookmark */ = 6BAF429F121AED31008CFCDF /* PBXTextBookmark */; + 6BAF42A0121AED31008CFCDF /* PBXTextBookmark */ = 6BAF42A0121AED31008CFCDF /* PBXTextBookmark */; + 6BAF42A1121AED31008CFCDF /* PBXTextBookmark */ = 6BAF42A1121AED31008CFCDF /* PBXTextBookmark */; + 6BAF42A2121AED31008CFCDF /* PBXTextBookmark */ = 6BAF42A2121AED31008CFCDF /* PBXTextBookmark */; + 6BAF42A3121AED31008CFCDF /* PBXTextBookmark */ = 6BAF42A3121AED31008CFCDF /* PBXTextBookmark */; + 6BAF42A4121AED31008CFCDF /* PBXTextBookmark */ = 6BAF42A4121AED31008CFCDF /* PBXTextBookmark */; + 6BAF42A5121AEFD9008CFCDF /* PBXTextBookmark */ = 6BAF42A5121AEFD9008CFCDF /* PBXTextBookmark */; + 6BAF42A6121AEFD9008CFCDF /* PBXTextBookmark */ = 6BAF42A6121AEFD9008CFCDF /* PBXTextBookmark */; + 6BAF42A7121AEFD9008CFCDF /* PBXTextBookmark */ = 6BAF42A7121AEFD9008CFCDF /* PBXTextBookmark */; + 6BAF42A8121AEFD9008CFCDF /* PBXTextBookmark */ = 6BAF42A8121AEFD9008CFCDF /* PBXTextBookmark */; + 6BAF42A9121AEFD9008CFCDF /* PBXTextBookmark */ = 6BAF42A9121AEFD9008CFCDF /* PBXTextBookmark */; + 6BAF42AA121AEFD9008CFCDF /* PBXTextBookmark */ = 6BAF42AA121AEFD9008CFCDF /* PBXTextBookmark */; + 6BAF42AB121AEFD9008CFCDF /* PBXTextBookmark */ = 6BAF42AB121AEFD9008CFCDF /* PBXTextBookmark */; + 6BAF42AC121AEFD9008CFCDF /* PBXTextBookmark */ = 6BAF42AC121AEFD9008CFCDF /* PBXTextBookmark */; + 6BAF42B3121AF141008CFCDF /* PBXTextBookmark */ = 6BAF42B3121AF141008CFCDF /* PBXTextBookmark */; + 6BAF42B4121AF141008CFCDF /* PBXTextBookmark */ = 6BAF42B4121AF141008CFCDF /* PBXTextBookmark */; + 6BAF42B5121AF141008CFCDF /* PBXTextBookmark */ = 6BAF42B5121AF141008CFCDF /* PBXTextBookmark */; + 6BAF42B6121AF141008CFCDF /* PBXTextBookmark */ = 6BAF42B6121AF141008CFCDF /* PBXTextBookmark */; + 6BAF42B7121AF141008CFCDF /* PBXTextBookmark */ = 6BAF42B7121AF141008CFCDF /* PBXTextBookmark */; + 6BAF42B8121AF141008CFCDF /* PBXTextBookmark */ = 6BAF42B8121AF141008CFCDF /* PBXTextBookmark */; + 6BAF42B9121AF141008CFCDF /* PBXTextBookmark */ = 6BAF42B9121AF141008CFCDF /* PBXTextBookmark */; + 6BAF42BA121AF141008CFCDF /* PBXTextBookmark */ = 6BAF42BA121AF141008CFCDF /* PBXTextBookmark */; + 6BAF42BB121AF141008CFCDF /* PBXTextBookmark */ = 6BAF42BB121AF141008CFCDF /* PBXTextBookmark */; + 6BAF42BC121AF141008CFCDF /* PBXTextBookmark */ = 6BAF42BC121AF141008CFCDF /* PBXTextBookmark */; + 6BAF42BD121AF141008CFCDF /* PBXTextBookmark */ = 6BAF42BD121AF141008CFCDF /* PBXTextBookmark */; + 6BAF42BE121AF141008CFCDF /* PBXTextBookmark */ = 6BAF42BE121AF141008CFCDF /* PBXTextBookmark */; + 6BAF42BF121AF141008CFCDF /* PBXTextBookmark */ = 6BAF42BF121AF141008CFCDF /* PBXTextBookmark */; + 6BAF42C0121AF141008CFCDF /* PBXTextBookmark */ = 6BAF42C0121AF141008CFCDF /* PBXTextBookmark */; + 6BAF42C1121AF141008CFCDF /* PBXTextBookmark */ = 6BAF42C1121AF141008CFCDF /* PBXTextBookmark */; + 6BAF42C3121AF27C008CFCDF /* PBXTextBookmark */ = 6BAF42C3121AF27C008CFCDF /* PBXTextBookmark */; + 6BAF42C4121AF27C008CFCDF /* PBXTextBookmark */ = 6BAF42C4121AF27C008CFCDF /* PBXTextBookmark */; + 6BAF42C5121AF27C008CFCDF /* PBXTextBookmark */ = 6BAF42C5121AF27C008CFCDF /* PBXTextBookmark */; + 6BAF42C6121AF27C008CFCDF /* PBXTextBookmark */ = 6BAF42C6121AF27C008CFCDF /* PBXTextBookmark */; + 6BAF42C7121AF27C008CFCDF /* PBXTextBookmark */ = 6BAF42C7121AF27C008CFCDF /* PBXTextBookmark */; + 6BAF42C8121AF27C008CFCDF /* PBXTextBookmark */ = 6BAF42C8121AF27C008CFCDF /* PBXTextBookmark */; + 6BAF42C9121AF27C008CFCDF /* PBXTextBookmark */ = 6BAF42C9121AF27C008CFCDF /* PBXTextBookmark */; + 6BAF42CA121AF27C008CFCDF /* PBXTextBookmark */ = 6BAF42CA121AF27C008CFCDF /* PBXTextBookmark */; + 6BAF42CB121AF27C008CFCDF /* PBXTextBookmark */ = 6BAF42CB121AF27C008CFCDF /* PBXTextBookmark */; + 6BAF42CC121AF27C008CFCDF /* PBXTextBookmark */ = 6BAF42CC121AF27C008CFCDF /* PBXTextBookmark */; + 6BAF42CD121AF27C008CFCDF /* PBXTextBookmark */ = 6BAF42CD121AF27C008CFCDF /* PBXTextBookmark */; + 6BAF42CE121AF27C008CFCDF /* PBXTextBookmark */ = 6BAF42CE121AF27C008CFCDF /* PBXTextBookmark */; + 6BAF42CF121AF27C008CFCDF /* PBXTextBookmark */ = 6BAF42CF121AF27C008CFCDF /* PBXTextBookmark */; + 6BAF42D0121AF27C008CFCDF /* PBXTextBookmark */ = 6BAF42D0121AF27C008CFCDF /* PBXTextBookmark */; + 6BAF42D2121AF2A3008CFCDF /* PBXTextBookmark */ = 6BAF42D2121AF2A3008CFCDF /* PBXTextBookmark */; + 6BAF42D3121AF2A8008CFCDF /* PBXTextBookmark */ = 6BAF42D3121AF2A8008CFCDF /* PBXTextBookmark */; + 6BAF42D4121AF2A8008CFCDF /* PBXTextBookmark */ = 6BAF42D4121AF2A8008CFCDF /* PBXTextBookmark */; + 6BAF42D8121AF2AF008CFCDF /* PBXTextBookmark */ = 6BAF42D8121AF2AF008CFCDF /* PBXTextBookmark */; + 6BAF42DB121AF2C3008CFCDF /* PBXTextBookmark */ = 6BAF42DB121AF2C3008CFCDF /* PBXTextBookmark */; + 6BAF42E1121AF3B8008CFCDF /* PBXTextBookmark */ = 6BAF42E1121AF3B8008CFCDF /* PBXTextBookmark */; + 6BAF42E2121AF3B8008CFCDF /* PBXTextBookmark */ = 6BAF42E2121AF3B8008CFCDF /* PBXTextBookmark */; + 6BAF42E3121AF3B8008CFCDF /* PBXTextBookmark */ = 6BAF42E3121AF3B8008CFCDF /* PBXTextBookmark */; + 6BAF42E4121AF3B8008CFCDF /* PBXTextBookmark */ = 6BAF42E4121AF3B8008CFCDF /* PBXTextBookmark */; + 6BAF42E5121AF3B8008CFCDF /* PBXTextBookmark */ = 6BAF42E5121AF3B8008CFCDF /* PBXTextBookmark */; + 6BAF42E6121AF3B8008CFCDF /* PBXTextBookmark */ = 6BAF42E6121AF3B8008CFCDF /* PBXTextBookmark */; + 6BAF42E7121AF3B8008CFCDF /* PBXTextBookmark */ = 6BAF42E7121AF3B8008CFCDF /* PBXTextBookmark */; + 6BAF42E8121AF3B8008CFCDF /* PBXTextBookmark */ = 6BAF42E8121AF3B8008CFCDF /* PBXTextBookmark */; + 6BAF42E9121AF3B8008CFCDF /* PBXTextBookmark */ = 6BAF42E9121AF3B8008CFCDF /* PBXTextBookmark */; + 6BAF42EC121AF3DE008CFCDF /* PBXTextBookmark */ = 6BAF42EC121AF3DE008CFCDF /* PBXTextBookmark */; + 6BAF42EE121AF43D008CFCDF /* PBXTextBookmark */ = 6BAF42EE121AF43D008CFCDF /* PBXTextBookmark */; + 6BAF42EF121AF43D008CFCDF /* PBXTextBookmark */ = 6BAF42EF121AF43D008CFCDF /* PBXTextBookmark */; + 6BAF42F0121AF43D008CFCDF /* PBXTextBookmark */ = 6BAF42F0121AF43D008CFCDF /* PBXTextBookmark */; + 6BAF42F1121AF43D008CFCDF /* PBXTextBookmark */ = 6BAF42F1121AF43D008CFCDF /* PBXTextBookmark */; + 6BAF42F2121AF43D008CFCDF /* PBXTextBookmark */ = 6BAF42F2121AF43D008CFCDF /* PBXTextBookmark */; + 6BAF42F3121AF43D008CFCDF /* PBXTextBookmark */ = 6BAF42F3121AF43D008CFCDF /* PBXTextBookmark */; + 6BAF42F4121AF43D008CFCDF /* PBXTextBookmark */ = 6BAF42F4121AF43D008CFCDF /* PBXTextBookmark */; + 6BAF42F9121AF514008CFCDF /* PBXTextBookmark */ = 6BAF42F9121AF514008CFCDF /* PBXTextBookmark */; + 6BAF42FA121AF514008CFCDF /* PBXTextBookmark */ = 6BAF42FA121AF514008CFCDF /* PBXTextBookmark */; + 6BAF42FB121AF514008CFCDF /* PBXTextBookmark */ = 6BAF42FB121AF514008CFCDF /* PBXTextBookmark */; + 6BAF42FC121AF514008CFCDF /* PBXTextBookmark */ = 6BAF42FC121AF514008CFCDF /* PBXTextBookmark */; + 6BAF42FD121AF514008CFCDF /* PBXTextBookmark */ = 6BAF42FD121AF514008CFCDF /* PBXTextBookmark */; + 6BAF42FE121AF514008CFCDF /* PBXTextBookmark */ = 6BAF42FE121AF514008CFCDF /* PBXTextBookmark */; + 6BAF42FF121AF514008CFCDF /* PBXTextBookmark */ = 6BAF42FF121AF514008CFCDF /* PBXTextBookmark */; + 6BAF4300121AF514008CFCDF /* PBXTextBookmark */ = 6BAF4300121AF514008CFCDF /* PBXTextBookmark */; + 6BAF4301121AF514008CFCDF /* PBXTextBookmark */ = 6BAF4301121AF514008CFCDF /* PBXTextBookmark */; + 6BAF4302121AF514008CFCDF /* PBXTextBookmark */ = 6BAF4302121AF514008CFCDF /* PBXTextBookmark */; + 6BAF4303121AF514008CFCDF /* PBXTextBookmark */ = 6BAF4303121AF514008CFCDF /* PBXTextBookmark */; + 6BAF4304121AF514008CFCDF /* PBXTextBookmark */ = 6BAF4304121AF514008CFCDF /* PBXTextBookmark */; + 6BAF4305121AF514008CFCDF /* PBXTextBookmark */ = 6BAF4305121AF514008CFCDF /* PBXTextBookmark */; + 6BAF4306121AF574008CFCDF /* PBXTextBookmark */ = 6BAF4306121AF574008CFCDF /* PBXTextBookmark */; + 6BAF4307121AF6E0008CFCDF /* PBXTextBookmark */ = 6BAF4307121AF6E0008CFCDF /* PBXTextBookmark */; + 6BAF4308121AF6E0008CFCDF /* PBXTextBookmark */ = 6BAF4308121AF6E0008CFCDF /* PBXTextBookmark */; + 6BAF4309121AF6E0008CFCDF /* PBXTextBookmark */ = 6BAF4309121AF6E0008CFCDF /* PBXTextBookmark */; + 6BAF430A121AF6E0008CFCDF /* PBXTextBookmark */ = 6BAF430A121AF6E0008CFCDF /* PBXTextBookmark */; + 6BAF430C121AF7CD008CFCDF /* PBXTextBookmark */ = 6BAF430C121AF7CD008CFCDF /* PBXTextBookmark */; + 6BAF430D121AF7CD008CFCDF /* PBXTextBookmark */ = 6BAF430D121AF7CD008CFCDF /* PBXTextBookmark */; + 6BAF430E121AF7CD008CFCDF /* PBXTextBookmark */ = 6BAF430E121AF7CD008CFCDF /* PBXTextBookmark */; + 6BAF430F121AF7CD008CFCDF /* PBXTextBookmark */ = 6BAF430F121AF7CD008CFCDF /* PBXTextBookmark */; + 6BAF4310121AF7CD008CFCDF /* PBXTextBookmark */ = 6BAF4310121AF7CD008CFCDF /* PBXTextBookmark */; + 6BAF4311121AF7CD008CFCDF /* PBXTextBookmark */ = 6BAF4311121AF7CD008CFCDF /* PBXTextBookmark */; + 6BAF4312121AF7CD008CFCDF /* PBXTextBookmark */ = 6BAF4312121AF7CD008CFCDF /* PBXTextBookmark */; + 6BAF4313121AF7CD008CFCDF /* PBXTextBookmark */ = 6BAF4313121AF7CD008CFCDF /* PBXTextBookmark */; + 6BAF4314121AF7CD008CFCDF /* PBXTextBookmark */ = 6BAF4314121AF7CD008CFCDF /* PBXTextBookmark */; + 6BAF4315121AF7CD008CFCDF /* PBXTextBookmark */ = 6BAF4315121AF7CD008CFCDF /* PBXTextBookmark */; + 6BAF4321121AF998008CFCDF /* PBXTextBookmark */ = 6BAF4321121AF998008CFCDF /* PBXTextBookmark */; + 6BAF4322121AF998008CFCDF /* PBXTextBookmark */ = 6BAF4322121AF998008CFCDF /* PBXTextBookmark */; + 6BAF4323121AF998008CFCDF /* PBXTextBookmark */ = 6BAF4323121AF998008CFCDF /* PBXTextBookmark */; + 6BAF4324121AF998008CFCDF /* PBXTextBookmark */ = 6BAF4324121AF998008CFCDF /* PBXTextBookmark */; + 6BAF4325121AF998008CFCDF /* PBXTextBookmark */ = 6BAF4325121AF998008CFCDF /* PBXTextBookmark */; + 6BAF4326121AF998008CFCDF /* PBXTextBookmark */ = 6BAF4326121AF998008CFCDF /* PBXTextBookmark */; + 6BAF4327121AF998008CFCDF /* PBXTextBookmark */ = 6BAF4327121AF998008CFCDF /* PBXTextBookmark */; + 6BAF4328121AF998008CFCDF /* PBXTextBookmark */ = 6BAF4328121AF998008CFCDF /* PBXTextBookmark */; + 6BAF4329121AF998008CFCDF /* PBXTextBookmark */ = 6BAF4329121AF998008CFCDF /* PBXTextBookmark */; + 6BAF432A121AF998008CFCDF /* PBXTextBookmark */ = 6BAF432A121AF998008CFCDF /* PBXTextBookmark */; + 6BAF432B121AF998008CFCDF /* PBXTextBookmark */ = 6BAF432B121AF998008CFCDF /* PBXTextBookmark */; + 6BAF432C121AF998008CFCDF /* PBXTextBookmark */ = 6BAF432C121AF998008CFCDF /* PBXTextBookmark */; + 6BAF432D121AF998008CFCDF /* PBXTextBookmark */ = 6BAF432D121AF998008CFCDF /* PBXTextBookmark */; + 6BAF432E121AF998008CFCDF /* PBXTextBookmark */ = 6BAF432E121AF998008CFCDF /* PBXTextBookmark */; + 6BAF432F121AF998008CFCDF /* PBXTextBookmark */ = 6BAF432F121AF998008CFCDF /* PBXTextBookmark */; + 6BAF4330121AF998008CFCDF /* PBXTextBookmark */ = 6BAF4330121AF998008CFCDF /* PBXTextBookmark */; + 6BAF4331121AF998008CFCDF /* PBXTextBookmark */ = 6BAF4331121AF998008CFCDF /* PBXTextBookmark */; + 6BAF4332121AF998008CFCDF /* PBXTextBookmark */ = 6BAF4332121AF998008CFCDF /* PBXTextBookmark */; + 6BAF4333121AF998008CFCDF /* PBXTextBookmark */ = 6BAF4333121AF998008CFCDF /* PBXTextBookmark */; + 6BAF4334121AF998008CFCDF /* PBXTextBookmark */ = 6BAF4334121AF998008CFCDF /* PBXTextBookmark */; + 6BAF4335121AF998008CFCDF /* PBXTextBookmark */ = 6BAF4335121AF998008CFCDF /* PBXTextBookmark */; + 6BAF4336121AF998008CFCDF /* PBXTextBookmark */ = 6BAF4336121AF998008CFCDF /* PBXTextBookmark */; + 6BAF4337121AF998008CFCDF /* PBXTextBookmark */ = 6BAF4337121AF998008CFCDF /* PBXTextBookmark */; + 6BAF4338121AF998008CFCDF /* PBXTextBookmark */ = 6BAF4338121AF998008CFCDF /* PBXTextBookmark */; + 6BAF4339121AF998008CFCDF /* PBXTextBookmark */ = 6BAF4339121AF998008CFCDF /* PBXTextBookmark */; + 6BAF433A121AF998008CFCDF /* PBXTextBookmark */ = 6BAF433A121AF998008CFCDF /* PBXTextBookmark */; + 6BAF433B121AF998008CFCDF /* PBXTextBookmark */ = 6BAF433B121AF998008CFCDF /* PBXTextBookmark */; + 6BAF433C121AF998008CFCDF /* PBXTextBookmark */ = 6BAF433C121AF998008CFCDF /* PBXTextBookmark */; + 6BAF433D121AF998008CFCDF /* PBXTextBookmark */ = 6BAF433D121AF998008CFCDF /* PBXTextBookmark */; + 6BAF433E121AF998008CFCDF /* PBXTextBookmark */ = 6BAF433E121AF998008CFCDF /* PBXTextBookmark */; + 6BAF433F121AF998008CFCDF /* PBXTextBookmark */ = 6BAF433F121AF998008CFCDF /* PBXTextBookmark */; + 6BAF4340121AF998008CFCDF /* PBXTextBookmark */ = 6BAF4340121AF998008CFCDF /* PBXTextBookmark */; + 6BAF4341121AF998008CFCDF /* PBXTextBookmark */ = 6BAF4341121AF998008CFCDF /* PBXTextBookmark */; + 6BAF4342121AF998008CFCDF /* PBXTextBookmark */ = 6BAF4342121AF998008CFCDF /* PBXTextBookmark */; + 6BAF4343121AF998008CFCDF /* PBXTextBookmark */ = 6BAF4343121AF998008CFCDF /* PBXTextBookmark */; + 6BAF4346121AFD0B008CFCDF /* PBXTextBookmark */ = 6BAF4346121AFD0B008CFCDF /* PBXTextBookmark */; + 6BAF4347121AFD0B008CFCDF /* PBXTextBookmark */ = 6BAF4347121AFD0B008CFCDF /* PBXTextBookmark */; + 6BAF4348121AFD0B008CFCDF /* PBXTextBookmark */ = 6BAF4348121AFD0B008CFCDF /* PBXTextBookmark */; + 6BAF4349121AFD0B008CFCDF /* PBXTextBookmark */ = 6BAF4349121AFD0B008CFCDF /* PBXTextBookmark */; + 6BAF434F121B00EF008CFCDF /* PBXTextBookmark */ = 6BAF434F121B00EF008CFCDF /* PBXTextBookmark */; 6BBB4AA1115B4F3400CF791D = 6BBB4AA1115B4F3400CF791D /* PBXTextBookmark */; 6BBB4AA5115B4F3400CF791D = 6BBB4AA5115B4F3400CF791D /* PBXTextBookmark */; 6BBB4AA6115B4F3400CF791D = 6BBB4AA6115B4F3400CF791D /* PBXTextBookmark */; @@ -797,21 +950,21 @@ ignoreCount = 0; lineNumber = 1398; location = Recast; - modificationTime = 303302369.986618; + modificationTime = 303756251.189612; state = 1; }; 6B1185F41006895B0018F96F /* DetourNode.cpp */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {933, 2400}}"; - sepNavSelRange = "{3326, 0}"; - sepNavVisRange = "{3038, 580}"; + sepNavSelRange = "{2743, 0}"; + sepNavVisRange = "{2449, 587}"; }; }; 6B1185F61006896B0018F96F /* DetourNode.h */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {933, 2432}}"; - sepNavSelRange = "{1049, 0}"; - sepNavVisRange = "{1035, 525}"; + sepNavIntBoundsRect = "{{0, 0}, {933, 2096}}"; + sepNavSelRange = "{1440, 0}"; + sepNavVisRange = "{1065, 607}"; }; }; 6B1185FC10068B040018F96F /* DetourCommon.h */ = { @@ -984,9 +1137,9 @@ }; 6B2AEC520FFB8958005BE9CC /* Sample_TileMesh.cpp */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {1223, 17072}}"; + sepNavIntBoundsRect = "{{0, 0}, {1223, 16864}}"; sepNavSelRange = "{11262, 0}"; - sepNavVisRange = "{10933, 434}"; + sepNavVisRange = "{10849, 874}"; sepNavWindowFrame = "{{38, 30}, {1214, 722}}"; }; }; @@ -1058,7 +1211,7 @@ ignoreCount = 0; lineNumber = 344; location = Recast; - modificationTime = 303302369.986238; + modificationTime = 303756251.189394; state = 1; }; 6B555DAE100B211D00247EA3 /* imguiRenderGL.h */ = { @@ -1180,9 +1333,9 @@ }; 6B8DE88B10B69E4C00DF20FB /* DetourNavMesh.h */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {933, 6384}}"; - sepNavSelRange = "{9670, 0}"; - sepNavVisRange = "{9355, 1084}"; + sepNavIntBoundsRect = "{{0, 0}, {933, 6048}}"; + sepNavSelRange = "{9902, 0}"; + sepNavVisRange = "{9407, 1261}"; }; }; 6B8DE88C10B69E4C00DF20FB /* DetourNavMeshBuilder.h */ = { @@ -1904,7 +2057,7 @@ fRef = 6BB7FC0910EBB6AA006DA0A6 /* NavMeshTesterTool.h */; name = "NavMeshTesterTool.h: 40"; rLen = 28; - rLoc = 1365; + rLoc = 1427; rType = 0; vrLen = 751; vrLoc = 1073; @@ -1914,7 +2067,7 @@ fRef = 6BB7FC0910EBB6AA006DA0A6 /* NavMeshTesterTool.h */; name = "NavMeshTesterTool.h: 40"; rLen = 0; - rLoc = 1393; + rLoc = 1455; rType = 0; vrLen = 751; vrLoc = 1073; @@ -1924,7 +2077,7 @@ fRef = 6BB7FC0910EBB6AA006DA0A6 /* NavMeshTesterTool.h */; name = "NavMeshTesterTool.h: 41"; rLen = 33; - rLoc = 1397; + rLoc = 1459; rType = 0; vrLen = 752; vrLoc = 1073; @@ -1934,7 +2087,7 @@ fRef = 6BB7FC0910EBB6AA006DA0A6 /* NavMeshTesterTool.h */; name = "NavMeshTesterTool.h: 69"; rLen = 21; - rLoc = 2043; + rLoc = 2105; rType = 0; vrLen = 798; vrLoc = 1302; @@ -1974,7 +2127,7 @@ fRef = 6BB7FC0910EBB6AA006DA0A6 /* NavMeshTesterTool.h */; name = "NavMeshTesterTool.h: 69"; rLen = 21; - rLoc = 2043; + rLoc = 2105; rType = 0; vrLen = 701; vrLoc = 1399; @@ -1984,7 +2137,7 @@ fRef = 6BB7FC0910EBB6AA006DA0A6 /* NavMeshTesterTool.h */; name = "NavMeshTesterTool.h: 69"; rLen = 4; - rLoc = 2054; + rLoc = 2116; rType = 0; vrLen = 701; vrLoc = 1399; @@ -2014,7 +2167,7 @@ fRef = 6BB7FC0910EBB6AA006DA0A6 /* NavMeshTesterTool.h */; name = "NavMeshTesterTool.h: 53"; rLen = 0; - rLoc = 1643; + rLoc = 1705; rType = 0; vrLen = 789; vrLoc = 1269; @@ -2024,7 +2177,7 @@ fRef = 6BB7FC0910EBB6AA006DA0A6 /* NavMeshTesterTool.h */; name = "NavMeshTesterTool.h: 53"; rLen = 0; - rLoc = 1643; + rLoc = 1705; rType = 0; vrLen = 770; vrLoc = 1269; @@ -2558,7 +2711,7 @@ fRef = 6BB7FC0910EBB6AA006DA0A6 /* NavMeshTesterTool.h */; name = "NavMeshTesterTool.h: 90"; rLen = 0; - rLoc = 2603; + rLoc = 2665; rType = 0; vrLen = 613; vrLoc = 2198; @@ -2608,7 +2761,7 @@ fRef = 6BB7FC0910EBB6AA006DA0A6 /* NavMeshTesterTool.h */; name = "NavMeshTesterTool.h: 93"; rLen = 0; - rLoc = 2704; + rLoc = 2766; rType = 0; vrLen = 876; vrLoc = 1975; @@ -2698,7 +2851,7 @@ fRef = 6BB7FC0910EBB6AA006DA0A6 /* NavMeshTesterTool.h */; name = "NavMeshTesterTool.h: 93"; rLen = 0; - rLoc = 2704; + rLoc = 2766; rType = 0; vrLen = 876; vrLoc = 1975; @@ -2877,7 +3030,7 @@ ignoreCount = 0; lineNumber = 774; location = Recast; - modificationTime = 303302369.988047; + modificationTime = 303756251.189829; state = 1; }; 6BAF3EE41212B890008CFCDF /* PBXTextBookmark */ = { @@ -2975,7 +3128,7 @@ fRef = 6BB7FC0A10EBB6AA006DA0A6 /* NavMeshTesterTool.cpp */; name = "NavMeshTesterTool.cpp: 901"; rLen = 0; - rLoc = 10416; + rLoc = 4259; rType = 0; vrLen = 1017; vrLoc = 24722; @@ -3372,16 +3525,16 @@ }; 6BAF40D912196A25008CFCDF /* DetourNavMeshQuery.h */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {1219, 4976}}"; - sepNavSelRange = "{1580, 0}"; - sepNavVisRange = "{1320, 500}"; + sepNavIntBoundsRect = "{{0, 0}, {933, 5648}}"; + sepNavSelRange = "{14986, 7}"; + sepNavVisRange = "{14379, 762}"; }; }; 6BAF40DA12196A3D008CFCDF /* DetourNavMeshQuery.cpp */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {933, 32864}}"; - sepNavSelRange = "{2897, 0}"; - sepNavVisRange = "{2540, 555}"; + sepNavIntBoundsRect = "{{0, 0}, {933, 37920}}"; + sepNavSelRange = "{23224, 0}"; + sepNavVisRange = "{23011, 629}"; }; }; 6BAF40F012197F3D008CFCDF /* PBXTextBookmark */ = { @@ -3539,7 +3692,7 @@ fRef = 6BAF40DA12196A3D008CFCDF /* DetourNavMeshQuery.cpp */; name = "DetourNavMeshQuery.cpp: 85"; rLen = 0; - rLoc = 2557; + rLoc = 2298; rType = 0; vrLen = 771; vrLoc = 2352; @@ -3549,7 +3702,7 @@ fRef = 6BAF40D912196A25008CFCDF /* DetourNavMeshQuery.h */; name = "DetourNavMeshQuery.h: 42"; rLen = 0; - rLoc = 1580; + rLoc = 1751; rType = 0; vrLen = 1202; vrLoc = 1296; @@ -3639,7 +3792,7 @@ fRef = 6BAF40D912196A25008CFCDF /* DetourNavMeshQuery.h */; name = "DetourNavMeshQuery.h: 1"; rLen = 0; - rLoc = 13992; + rLoc = 15460; rType = 0; vrLen = 0; vrLoc = 0; @@ -3709,7 +3862,7 @@ fRef = 6BAF40D912196A25008CFCDF /* DetourNavMeshQuery.h */; name = "DetourNavMeshQuery.h: 446"; rLen = 0; - rLoc = 1318; + rLoc = 1489; rType = 0; vrLen = 1574; vrLoc = 19399; @@ -3739,7 +3892,7 @@ fRef = 6BAF40D912196A25008CFCDF /* DetourNavMeshQuery.h */; name = "DetourNavMeshQuery.h: 557"; rLen = 0; - rLoc = 1318; + rLoc = 1489; rType = 0; vrLen = 1923; vrLoc = 22937; @@ -3749,7 +3902,7 @@ fRef = 6BAF40D912196A25008CFCDF /* DetourNavMeshQuery.h */; name = "DetourNavMeshQuery.h: 553"; rLen = 0; - rLoc = 1318; + rLoc = 1489; rType = 0; vrLen = 1881; vrLoc = 22979; @@ -3809,7 +3962,7 @@ fRef = 6BAF40D912196A25008CFCDF /* DetourNavMeshQuery.h */; name = "DetourNavMeshQuery.h: 345"; rLen = 0; - rLoc = 13501; + rLoc = 14728; rType = 0; vrLen = 1276; vrLoc = 2729; @@ -3829,7 +3982,7 @@ fRef = 6BAF40D912196A25008CFCDF /* DetourNavMeshQuery.h */; name = "DetourNavMeshQuery.h: 347"; rLen = 0; - rLoc = 13554; + rLoc = 15022; rType = 0; vrLen = 1739; vrLoc = 14760; @@ -3849,7 +4002,7 @@ fRef = 6BAF40D912196A25008CFCDF /* DetourNavMeshQuery.h */; name = "DetourNavMeshQuery.h: 243"; rLen = 0; - rLoc = 12022; + rLoc = 13249; rType = 0; vrLen = 1549; vrLoc = 10593; @@ -3899,7 +4052,7 @@ fRef = 6BAF40D912196A25008CFCDF /* DetourNavMeshQuery.h */; name = "DetourNavMeshQuery.h: 31"; rLen = 0; - rLoc = 1296; + rLoc = 1467; rType = 0; vrLen = 1367; vrLoc = 0; @@ -3989,7 +4142,7 @@ fRef = 6BAF40D912196A25008CFCDF /* DetourNavMeshQuery.h */; name = "DetourNavMeshQuery.h: 43"; rLen = 0; - rLoc = 1629; + rLoc = 1800; rType = 0; vrLen = 1152; vrLoc = 1296; @@ -3999,7 +4152,7 @@ fRef = 6BAF40D912196A25008CFCDF /* DetourNavMeshQuery.h */; name = "DetourNavMeshQuery.h: 42"; rLen = 34; - rLoc = 1591; + rLoc = 1762; rType = 0; vrLen = 1152; vrLoc = 1296; @@ -4059,7 +4212,7 @@ fRef = 6BAF40DA12196A3D008CFCDF /* DetourNavMeshQuery.cpp */; name = "DetourNavMeshQuery.cpp: 434"; rLen = 0; - rLoc = 8776; + rLoc = 2298; rType = 0; vrLen = 945; vrLoc = 11177; @@ -4069,7 +4222,7 @@ fRef = 6BAF40D912196A25008CFCDF /* DetourNavMeshQuery.h */; name = "DetourNavMeshQuery.h: 46"; rLen = 0; - rLoc = 1727; + rLoc = 1898; rType = 0; vrLen = 1264; vrLoc = 1119; @@ -4099,7 +4252,7 @@ fRef = 6BAF40DA12196A3D008CFCDF /* DetourNavMeshQuery.cpp */; name = "DetourNavMeshQuery.cpp: 1054"; rLen = 0; - rLoc = 8776; + rLoc = 2298; rType = 0; vrLen = 929; vrLoc = 27740; @@ -4109,7 +4262,7 @@ fRef = 6BAF40D912196A25008CFCDF /* DetourNavMeshQuery.h */; name = "DetourNavMeshQuery.h: 46"; rLen = 0; - rLoc = 1727; + rLoc = 1898; rType = 0; vrLen = 1264; vrLoc = 1119; @@ -4119,7 +4272,7 @@ fRef = 6BAF40DA12196A3D008CFCDF /* DetourNavMeshQuery.cpp */; name = "DetourNavMeshQuery.cpp: 1051"; rLen = 0; - rLoc = 8776; + rLoc = 2298; rType = 0; vrLen = 929; vrLoc = 27740; @@ -4129,7 +4282,7 @@ fRef = 6BAF40D912196A25008CFCDF /* DetourNavMeshQuery.h */; name = "DetourNavMeshQuery.h: 269"; rLen = 15; - rLoc = 12858; + rLoc = 14085; rType = 0; vrLen = 1613; vrLoc = 12036; @@ -4139,7 +4292,7 @@ fRef = 6BAF40DA12196A3D008CFCDF /* DetourNavMeshQuery.cpp */; name = "DetourNavMeshQuery.cpp: 1390"; rLen = 0; - rLoc = 8776; + rLoc = 2298; rType = 0; vrLen = 839; vrLoc = 36447; @@ -4239,7 +4392,7 @@ fRef = 6BAF40DA12196A3D008CFCDF /* DetourNavMeshQuery.cpp */; name = "DetourNavMeshQuery.cpp: 103"; rLen = 0; - rLoc = 3099; + rLoc = 2298; rType = 0; vrLen = 659; vrLoc = 2652; @@ -4259,7 +4412,7 @@ fRef = 6BAF40DA12196A3D008CFCDF /* DetourNavMeshQuery.cpp */; name = "DetourNavMeshQuery.cpp: 1187"; rLen = 0; - rLoc = 32000; + rLoc = 38401; rType = 0; vrLen = 873; vrLoc = 31973; @@ -4409,7 +4562,7 @@ fRef = 6BAF40D912196A25008CFCDF /* DetourNavMeshQuery.h */; name = "DetourNavMeshQuery.h: 42"; rLen = 0; - rLoc = 1580; + rLoc = 1751; rType = 0; vrLen = 1202; vrLoc = 1296; @@ -4419,7 +4572,7 @@ fRef = 6BAF40DA12196A3D008CFCDF /* DetourNavMeshQuery.cpp */; name = "DetourNavMeshQuery.cpp: 85"; rLen = 0; - rLoc = 2557; + rLoc = 2298; rType = 0; vrLen = 771; vrLoc = 2352; @@ -4429,7 +4582,7 @@ fRef = 6BAF40D912196A25008CFCDF /* DetourNavMeshQuery.h */; name = "DetourNavMeshQuery.h: 42"; rLen = 0; - rLoc = 1580; + rLoc = 1751; rType = 0; vrLen = 1152; vrLoc = 1296; @@ -4439,7 +4592,7 @@ fRef = 6BAF40D912196A25008CFCDF /* DetourNavMeshQuery.h */; name = "DetourNavMeshQuery.h: 42"; rLen = 0; - rLoc = 1580; + rLoc = 1751; rType = 0; vrLen = 433; vrLoc = 1296; @@ -4449,7 +4602,7 @@ fRef = 6BAF40D912196A25008CFCDF /* DetourNavMeshQuery.h */; name = "DetourNavMeshQuery.h: 42"; rLen = 0; - rLoc = 1580; + rLoc = 1751; rType = 0; vrLen = 1112; vrLoc = 1036; @@ -4539,7 +4692,7 @@ fRef = 6BB7FC0A10EBB6AA006DA0A6 /* NavMeshTesterTool.cpp */; name = "NavMeshTesterTool.cpp: 1086"; rLen = 0; - rLoc = 31188; + rLoc = 32740; rType = 0; vrLen = 815; vrLoc = 30646; @@ -4559,7 +4712,7 @@ fRef = 6BAF40D912196A25008CFCDF /* DetourNavMeshQuery.h */; name = "DetourNavMeshQuery.h: 42"; rLen = 0; - rLoc = 1580; + rLoc = 1751; rType = 0; vrLen = 1112; vrLoc = 1036; @@ -4699,7 +4852,7 @@ fRef = 6BB7FC0A10EBB6AA006DA0A6 /* NavMeshTesterTool.cpp */; name = "NavMeshTesterTool.cpp: 187"; rLen = 0; - rLoc = 4953; + rLoc = 4259; rType = 0; vrLen = 527; vrLoc = 4664; @@ -4719,7 +4872,7 @@ fRef = 6BB7FC0A10EBB6AA006DA0A6 /* NavMeshTesterTool.cpp */; name = "NavMeshTesterTool.cpp: 186"; rLen = 0; - rLoc = 4949; + rLoc = 4259; rType = 0; vrLen = 567; vrLoc = 4680; @@ -4749,7 +4902,7 @@ fRef = 6BB7FC0A10EBB6AA006DA0A6 /* NavMeshTesterTool.cpp */; name = "NavMeshTesterTool.cpp: 1086"; rLen = 0; - rLoc = 31188; + rLoc = 32740; rType = 0; vrLen = 815; vrLoc = 30646; @@ -4809,7 +4962,7 @@ fRef = 6BB7FC0A10EBB6AA006DA0A6 /* NavMeshTesterTool.cpp */; name = "NavMeshTesterTool.cpp: 306"; rLen = 0; - rLoc = 8126; + rLoc = 4259; rType = 0; vrLen = 522; vrLoc = 7759; @@ -5079,7 +5232,7 @@ fRef = 6BB7FC0A10EBB6AA006DA0A6 /* NavMeshTesterTool.cpp */; name = "NavMeshTesterTool.cpp: 306"; rLen = 0; - rLoc = 8126; + rLoc = 4259; rType = 0; vrLen = 522; vrLoc = 7759; @@ -5259,7 +5412,7 @@ fRef = 6BAF40D912196A25008CFCDF /* DetourNavMeshQuery.h */; name = "DetourNavMeshQuery.h: 42"; rLen = 0; - rLoc = 1538; + rLoc = 1709; rType = 0; vrLen = 1144; vrLoc = 1296; @@ -5289,7 +5442,7 @@ fRef = 6BAF40D912196A25008CFCDF /* DetourNavMeshQuery.h */; name = "DetourNavMeshQuery.h: 42"; rLen = 0; - rLoc = 1538; + rLoc = 1709; rType = 0; vrLen = 1144; vrLoc = 1296; @@ -5309,7 +5462,7 @@ fRef = 6BAF40D912196A25008CFCDF /* DetourNavMeshQuery.h */; name = "DetourNavMeshQuery.h: 42"; rLen = 0; - rLoc = 1538; + rLoc = 1709; rType = 0; vrLen = 1192; vrLoc = 1296; @@ -5319,7 +5472,7 @@ fRef = 6BAF40DA12196A3D008CFCDF /* DetourNavMeshQuery.cpp */; name = "DetourNavMeshQuery.cpp: 444"; rLen = 0; - rLoc = 12030; + rLoc = 2298; rType = 0; vrLen = 707; vrLoc = 11211; @@ -5349,7 +5502,7 @@ fRef = 6BAF40D912196A25008CFCDF /* DetourNavMeshQuery.h */; name = "DetourNavMeshQuery.h: 44"; rLen = 4; - rLoc = 1586; + rLoc = 1757; rType = 0; vrLen = 1186; vrLoc = 1296; @@ -5359,7 +5512,7 @@ fRef = 6BAF40D912196A25008CFCDF /* DetourNavMeshQuery.h */; name = "DetourNavMeshQuery.h: 42"; rLen = 0; - rLoc = 1538; + rLoc = 1709; rType = 0; vrLen = 1192; vrLoc = 1296; @@ -5399,7 +5552,7 @@ fRef = 6BAF40DA12196A3D008CFCDF /* DetourNavMeshQuery.cpp */; name = "DetourNavMeshQuery.cpp: 444"; rLen = 0; - rLoc = 12030; + rLoc = 2298; rType = 0; vrLen = 707; vrLoc = 11211; @@ -5429,7 +5582,7 @@ fRef = 6BB7FC0A10EBB6AA006DA0A6 /* NavMeshTesterTool.cpp */; name = "NavMeshTesterTool.cpp: 813"; rLen = 0; - rLoc = 22727; + rLoc = 4259; rType = 0; vrLen = 548; vrLoc = 22421; @@ -5459,7 +5612,7 @@ fRef = 6BAF40DA12196A3D008CFCDF /* DetourNavMeshQuery.cpp */; name = "DetourNavMeshQuery.cpp: 971"; rLen = 0; - rLoc = 26141; + rLoc = 32542; rType = 0; vrLen = 565; vrLoc = 25850; @@ -5499,7 +5652,7 @@ fRef = 6BB7FC0A10EBB6AA006DA0A6 /* NavMeshTesterTool.cpp */; name = "NavMeshTesterTool.cpp: 813"; rLen = 0; - rLoc = 22727; + rLoc = 4259; rType = 0; vrLen = 548; vrLoc = 22421; @@ -5539,7 +5692,7 @@ fRef = 6BAF40DA12196A3D008CFCDF /* DetourNavMeshQuery.cpp */; name = "DetourNavMeshQuery.cpp: 443"; rLen = 0; - rLoc = 12026; + rLoc = 2298; rType = 0; vrLen = 701; vrLoc = 11217; @@ -5568,8 +5721,8 @@ isa = PBXTextBookmark; fRef = 6BAF40DA12196A3D008CFCDF /* DetourNavMeshQuery.cpp */; name = "DetourNavMeshQuery.cpp: 344"; - rLen = 8; - rLoc = 9281; + rLen = 0; + rLoc = 2298; rType = 0; vrLen = 1165; vrLoc = 8952; @@ -5699,7 +5852,7 @@ fRef = 6BAF40DA12196A3D008CFCDF /* DetourNavMeshQuery.cpp */; name = "DetourNavMeshQuery.cpp: 971"; rLen = 0; - rLoc = 26141; + rLoc = 32542; rType = 0; vrLen = 565; vrLoc = 25850; @@ -5969,7 +6122,7 @@ fRef = 6BAF40D912196A25008CFCDF /* DetourNavMeshQuery.h */; name = "DetourNavMeshQuery.h: 267"; rLen = 18; - rLoc = 12741; + rLoc = 13968; rType = 0; vrLen = 1555; vrLoc = 11945; @@ -5978,8 +6131,8 @@ isa = PBXTextBookmark; fRef = 6BAF40DA12196A3D008CFCDF /* DetourNavMeshQuery.cpp */; name = "DetourNavMeshQuery.cpp: 133"; - rLen = 24; - rLoc = 3920; + rLen = 0; + rLoc = 2298; rType = 0; vrLen = 914; vrLoc = 3561; @@ -5998,8 +6151,8 @@ isa = PBXTextBookmark; fRef = 6BAF40DA12196A3D008CFCDF /* DetourNavMeshQuery.cpp */; name = "DetourNavMeshQuery.cpp: 133"; - rLen = 24; - rLoc = 3920; + rLen = 0; + rLoc = 2298; rType = 0; vrLen = 914; vrLoc = 3561; @@ -6009,7 +6162,7 @@ fRef = 6BAF40D912196A25008CFCDF /* DetourNavMeshQuery.h */; name = "DetourNavMeshQuery.h: 267"; rLen = 18; - rLoc = 12741; + rLoc = 13968; rType = 0; vrLen = 1555; vrLoc = 11945; @@ -6019,7 +6172,7 @@ fRef = 6BAF40DA12196A3D008CFCDF /* DetourNavMeshQuery.cpp */; name = "DetourNavMeshQuery.cpp: 139"; rLen = 0; - rLoc = 4177; + rLoc = 2298; rType = 0; vrLen = 968; vrLoc = 3345; @@ -6029,7 +6182,7 @@ fRef = 6BAF40DA12196A3D008CFCDF /* DetourNavMeshQuery.cpp */; name = "DetourNavMeshQuery.cpp: 169"; rLen = 0; - rLoc = 4834; + rLoc = 2298; rType = 0; vrLen = 692; vrLoc = 4008; @@ -6039,7 +6192,7 @@ fRef = 6BAF40DA12196A3D008CFCDF /* DetourNavMeshQuery.cpp */; name = "DetourNavMeshQuery.cpp: 325"; rLen = 0; - rLoc = 8669; + rLoc = 2298; rType = 0; vrLen = 788; vrLoc = 8090; @@ -6049,7 +6202,7 @@ fRef = 6BAF40DA12196A3D008CFCDF /* DetourNavMeshQuery.cpp */; name = "DetourNavMeshQuery.cpp: 557"; rLen = 0; - rLoc = 14939; + rLoc = 2298; rType = 0; vrLen = 901; vrLoc = 14127; @@ -6059,7 +6212,7 @@ fRef = 6BAF40DA12196A3D008CFCDF /* DetourNavMeshQuery.cpp */; name = "DetourNavMeshQuery.cpp: 1067"; rLen = 0; - rLoc = 28507; + rLoc = 34908; rType = 0; vrLen = 873; vrLoc = 27849; @@ -6069,7 +6222,7 @@ fRef = 6BAF40DA12196A3D008CFCDF /* DetourNavMeshQuery.cpp */; name = "DetourNavMeshQuery.cpp: 1940"; rLen = 0; - rLoc = 51737; + rLoc = 58138; rType = 0; vrLen = 786; vrLoc = 52107; @@ -6079,7 +6232,7 @@ fRef = 6BAF40DA12196A3D008CFCDF /* DetourNavMeshQuery.cpp */; name = "DetourNavMeshQuery.cpp: 2061"; rLen = 1; - rLoc = 55297; + rLoc = 61698; rType = 0; vrLen = 885; vrLoc = 54109; @@ -6089,7 +6242,7 @@ fRef = 6BAF40DA12196A3D008CFCDF /* DetourNavMeshQuery.cpp */; name = "DetourNavMeshQuery.cpp: 2061"; rLen = 1; - rLoc = 55297; + rLoc = 61698; rType = 0; vrLen = 885; vrLoc = 54109; @@ -6129,7 +6282,7 @@ fRef = 6BAF40DA12196A3D008CFCDF /* DetourNavMeshQuery.cpp */; name = "DetourNavMeshQuery.cpp: 2061"; rLen = 1; - rLoc = 55297; + rLoc = 61698; rType = 0; vrLen = 885; vrLoc = 54109; @@ -6189,7 +6342,7 @@ fRef = 6BAF40DA12196A3D008CFCDF /* DetourNavMeshQuery.cpp */; name = "DetourNavMeshQuery.cpp: 2042"; rLen = 1; - rLoc = 54978; + rLoc = 61379; rType = 0; vrLen = 458; vrLoc = 54536; @@ -6247,7 +6400,7 @@ fRef = 6BAF40DA12196A3D008CFCDF /* DetourNavMeshQuery.cpp */; name = "DetourNavMeshQuery.cpp: 2042"; rLen = 1; - rLoc = 54978; + rLoc = 61379; rType = 0; vrLen = 458; vrLoc = 54536; @@ -6266,8 +6419,8 @@ isa = PBXTextBookmark; fRef = 6BAF40DA12196A3D008CFCDF /* DetourNavMeshQuery.cpp */; name = "DetourNavMeshQuery.cpp: 137"; - rLen = 61; - rLoc = 4031; + rLen = 0; + rLoc = 2298; rType = 0; vrLen = 758; vrLoc = 3606; @@ -6306,8 +6459,8 @@ isa = PBXTextBookmark; comments = "error: 'class dtNavMesh' has no member named 'getPolyByRef'"; fRef = 6BB7FC0A10EBB6AA006DA0A6 /* NavMeshTesterTool.cpp */; - rLen = 1; - rLoc = 818; + rLen = 0; + rLoc = 148; rType = 1; }; 6BAF4254121AD7D7008CFCDF /* PBXTextBookmark */ = { @@ -6355,7 +6508,7 @@ fRef = 6BB7FC0A10EBB6AA006DA0A6 /* NavMeshTesterTool.cpp */; name = "NavMeshTesterTool.cpp: 829"; rLen = 0; - rLoc = 22986; + rLoc = 4259; rType = 0; vrLen = 516; vrLoc = 22476; @@ -6378,7 +6531,7 @@ fRef = 6BB7FC0A10EBB6AA006DA0A6 /* NavMeshTesterTool.cpp */; name = "NavMeshTesterTool.cpp: 815"; rLen = 0; - rLoc = 22658; + rLoc = 4259; rType = 0; vrLen = 516; vrLoc = 22476; @@ -6448,7 +6601,7 @@ fRef = 6BB7FC0A10EBB6AA006DA0A6 /* NavMeshTesterTool.cpp */; name = "NavMeshTesterTool.cpp: 815"; rLen = 0; - rLoc = 22658; + rLoc = 4259; rType = 0; vrLen = 516; vrLoc = 22476; @@ -6645,7 +6798,7 @@ fRef = 6BAF40DA12196A3D008CFCDF /* DetourNavMeshQuery.cpp */; name = "DetourNavMeshQuery.cpp: 1893"; rLen = 0; - rLoc = 50401; + rLoc = 56802; rType = 0; vrLen = 1207; vrLoc = 0; @@ -6685,11 +6838,1538 @@ fRef = 6BAF40DA12196A3D008CFCDF /* DetourNavMeshQuery.cpp */; name = "DetourNavMeshQuery.cpp: 101"; rLen = 0; - rLoc = 2897; + rLoc = 2298; rType = 0; vrLen = 555; vrLoc = 2540; }; + 6BAF428C121AEBDF008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6B8DE88B10B69E4C00DF20FB /* DetourNavMesh.h */; + name = "DetourNavMesh.h: 252"; + rLen = 0; + rLoc = 9902; + rType = 0; + vrLen = 1544; + vrLoc = 9124; + }; + 6BAF428D121AEBDF008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BAF40D912196A25008CFCDF /* DetourNavMeshQuery.h */; + name = "DetourNavMeshQuery.h: 33"; + rLen = 0; + rLoc = 1315; + rType = 0; + vrLen = 714; + vrLoc = 842; + }; + 6BAF428E121AEBDF008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BAF40DA12196A3D008CFCDF /* DetourNavMeshQuery.cpp */; + name = "DetourNavMeshQuery.cpp: 681"; + rLen = 0; + rLoc = 2298; + rType = 0; + vrLen = 595; + vrLoc = 17202; + }; + 6BAF428F121AEBDF008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BAF40DA12196A3D008CFCDF /* DetourNavMeshQuery.cpp */; + name = "DetourNavMeshQuery.cpp: 92"; + rLen = 0; + rLoc = 2298; + rType = 0; + vrLen = 560; + vrLoc = 2540; + }; + 6BAF4290121AEBDF008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6B8DE88B10B69E4C00DF20FB /* DetourNavMesh.h */; + name = "DetourNavMesh.h: 252"; + rLen = 0; + rLoc = 9902; + rType = 0; + vrLen = 1544; + vrLoc = 9124; + }; + 6BAF4291121AEBDF008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BAF40D912196A25008CFCDF /* DetourNavMeshQuery.h */; + name = "DetourNavMeshQuery.h: 265"; + rLen = 0; + rLoc = 13860; + rType = 0; + vrLen = 1592; + vrLoc = 11910; + }; + 6BAF4292121AEBDF008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BAF40DA12196A3D008CFCDF /* DetourNavMeshQuery.cpp */; + name = "DetourNavMeshQuery.cpp: 681"; + rLen = 0; + rLoc = 2298; + rType = 0; + vrLen = 595; + vrLoc = 17202; + }; + 6BAF4293121AEBDF008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BAF40D912196A25008CFCDF /* DetourNavMeshQuery.h */; + name = "DetourNavMeshQuery.h: 33"; + rLen = 0; + rLoc = 1315; + rType = 0; + vrLen = 714; + vrLoc = 842; + }; + 6BAF4294121AEBDF008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BAF40DA12196A3D008CFCDF /* DetourNavMeshQuery.cpp */; + name = "DetourNavMeshQuery.cpp: 687"; + rLen = 0; + rLoc = 2298; + rType = 0; + vrLen = 840; + vrLoc = 17256; + }; + 6BAF4295121AEC2A008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BAF40D912196A25008CFCDF /* DetourNavMeshQuery.h */; + name = "DetourNavMeshQuery.h: 291"; + rLen = 0; + rLoc = 15021; + rType = 0; + vrLen = 1424; + vrLoc = 12535; + }; + 6BAF4296121AEC2A008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BAF40DA12196A3D008CFCDF /* DetourNavMeshQuery.cpp */; + name = "DetourNavMeshQuery.cpp: 709"; + rLen = 0; + rLoc = 2298; + rType = 0; + vrLen = 846; + vrLoc = 17652; + }; + 6BAF4297121AEC2A008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BAF40DA12196A3D008CFCDF /* DetourNavMeshQuery.cpp */; + name = "DetourNavMeshQuery.cpp: 709"; + rLen = 0; + rLoc = 2298; + rType = 0; + vrLen = 846; + vrLoc = 17652; + }; + 6BAF4298121AEC2A008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BAF40D912196A25008CFCDF /* DetourNavMeshQuery.h */; + name = "DetourNavMeshQuery.h: 291"; + rLen = 0; + rLoc = 15021; + rType = 0; + vrLen = 1424; + vrLoc = 12535; + }; + 6BAF4299121AEC2A008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BAF40DA12196A3D008CFCDF /* DetourNavMeshQuery.cpp */; + name = "DetourNavMeshQuery.cpp: 705"; + rLen = 0; + rLoc = 2298; + rType = 0; + vrLen = 763; + vrLoc = 17255; + }; + 6BAF429A121AED31008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BAF40D912196A25008CFCDF /* DetourNavMeshQuery.h */; + name = "DetourNavMeshQuery.h: 293"; + rLen = 165; + rLoc = 14804; + rType = 0; + vrLen = 1235; + vrLoc = 12675; + }; + 6BAF429B121AED31008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BAF40DA12196A3D008CFCDF /* DetourNavMeshQuery.cpp */; + name = "DetourNavMeshQuery.cpp: 688"; + rLen = 0; + rLoc = 2298; + rType = 0; + vrLen = 783; + vrLoc = 17257; + }; + 6BAF429C121AED31008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BAF40DA12196A3D008CFCDF /* DetourNavMeshQuery.cpp */; + name = "DetourNavMeshQuery.cpp: 859"; + rLen = 0; + rLoc = 2298; + rType = 0; + vrLen = 1096; + vrLoc = 18802; + }; + 6BAF429D121AED31008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BAF40D912196A25008CFCDF /* DetourNavMeshQuery.h */; + name = "DetourNavMeshQuery.h: 300"; + rLen = 0; + rLoc = 14973; + rType = 0; + vrLen = 1236; + vrLoc = 12675; + }; + 6BAF429E121AED31008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BAF40DA12196A3D008CFCDF /* DetourNavMeshQuery.cpp */; + name = "DetourNavMeshQuery.cpp: 687"; + rLen = 0; + rLoc = 2298; + rType = 0; + vrLen = 746; + vrLoc = 17256; + }; + 6BAF429F121AED31008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BAF40D912196A25008CFCDF /* DetourNavMeshQuery.h */; + name = "DetourNavMeshQuery.h: 293"; + rLen = 165; + rLoc = 14804; + rType = 0; + vrLen = 1235; + vrLoc = 12675; + }; + 6BAF42A0121AED31008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BAF40DA12196A3D008CFCDF /* DetourNavMeshQuery.cpp */; + name = "DetourNavMeshQuery.cpp: 687"; + rLen = 0; + rLoc = 2298; + rType = 0; + vrLen = 778; + vrLoc = 17257; + }; + 6BAF42A1121AED31008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BAF40D912196A25008CFCDF /* DetourNavMeshQuery.h */; + name = "DetourNavMeshQuery.h: 291"; + rLen = 11; + rLoc = 14789; + rType = 0; + vrLen = 1235; + vrLoc = 12675; + }; + 6BAF42A2121AED31008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BAF40DA12196A3D008CFCDF /* DetourNavMeshQuery.cpp */; + name = "DetourNavMeshQuery.cpp: 688"; + rLen = 0; + rLoc = 2298; + rType = 0; + vrLen = 783; + vrLoc = 17257; + }; + 6BAF42A3121AED31008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BAF40D912196A25008CFCDF /* DetourNavMeshQuery.h */; + name = "DetourNavMeshQuery.h: 293"; + rLen = 165; + rLoc = 14804; + rType = 0; + vrLen = 1235; + vrLoc = 12675; + }; + 6BAF42A4121AED31008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BAF40DA12196A3D008CFCDF /* DetourNavMeshQuery.cpp */; + name = "DetourNavMeshQuery.cpp: 690"; + rLen = 0; + rLoc = 2298; + rType = 0; + vrLen = 834; + vrLoc = 17573; + }; + 6BAF42A5121AEFD9008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BAF40D912196A25008CFCDF /* DetourNavMeshQuery.h */; + name = "DetourNavMeshQuery.h: 300"; + rLen = 7; + rLoc = 14986; + rType = 0; + vrLen = 1235; + vrLoc = 12675; + }; + 6BAF42A6121AEFD9008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6B1185F41006895B0018F96F /* DetourNode.cpp */; + name = "DetourNode.cpp: 105"; + rLen = 0; + rLoc = 2743; + rType = 0; + vrLen = 587; + vrLoc = 2449; + }; + 6BAF42A7121AEFD9008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6B1185F61006896B0018F96F /* DetourNode.h */; + name = "DetourNode.h: 44"; + rLen = 7; + rLoc = 1304; + rType = 0; + vrLen = 637; + vrLoc = 1065; + }; + 6BAF42A8121AEFD9008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BAF40DA12196A3D008CFCDF /* DetourNavMeshQuery.cpp */; + name = "DetourNavMeshQuery.cpp: 752"; + rLen = 0; + rLoc = 2298; + rType = 0; + vrLen = 853; + vrLoc = 18910; + }; + 6BAF42A9121AEFD9008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BAF40D912196A25008CFCDF /* DetourNavMeshQuery.h */; + name = "DetourNavMeshQuery.h: 300"; + rLen = 7; + rLoc = 14986; + rType = 0; + vrLen = 1235; + vrLoc = 12675; + }; + 6BAF42AA121AEFD9008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6B1185F41006895B0018F96F /* DetourNode.cpp */; + name = "DetourNode.cpp: 105"; + rLen = 0; + rLoc = 2743; + rType = 0; + vrLen = 587; + vrLoc = 2449; + }; + 6BAF42AB121AEFD9008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6B1185F61006896B0018F96F /* DetourNode.h */; + name = "DetourNode.h: 44"; + rLen = 7; + rLoc = 1304; + rType = 0; + vrLen = 637; + vrLoc = 1065; + }; + 6BAF42AC121AEFD9008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BAF40DA12196A3D008CFCDF /* DetourNavMeshQuery.cpp */; + name = "DetourNavMeshQuery.cpp: 728"; + rLen = 0; + rLoc = 2298; + rType = 0; + vrLen = 575; + vrLoc = 22852; + }; + 6BAF42B3121AF141008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BAF40D912196A25008CFCDF /* DetourNavMeshQuery.h */; + name = "DetourNavMeshQuery.h: 302"; + rLen = 0; + rLoc = 14835; + rType = 0; + vrLen = 1162; + vrLoc = 13270; + }; + 6BAF42B4121AF141008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + comments = "error: 'H_SCALE' was not declared in this scope"; + fRef = 6BAF40DA12196A3D008CFCDF /* DetourNavMeshQuery.cpp */; + rLen = 0; + rLoc = 70; + rType = 1; + }; + 6BAF42B5121AF141008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BAF40DA12196A3D008CFCDF /* DetourNavMeshQuery.cpp */; + name = "DetourNavMeshQuery.cpp: 880"; + rLen = 0; + rLoc = 2298; + rType = 0; + vrLen = 639; + vrLoc = 22857; + }; + 6BAF42B6121AF141008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BAF40D912196A25008CFCDF /* DetourNavMeshQuery.h */; + name = "DetourNavMeshQuery.h: 104"; + rLen = 0; + rLoc = 5071; + rType = 0; + vrLen = 1545; + vrLoc = 3161; + }; + 6BAF42B7121AF141008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BAF40DA12196A3D008CFCDF /* DetourNavMeshQuery.cpp */; + name = "DetourNavMeshQuery.cpp: 719"; + rLen = 0; + rLoc = 2298; + rType = 0; + vrLen = 875; + vrLoc = 18063; + }; + 6BAF42B8121AF141008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BAF40D912196A25008CFCDF /* DetourNavMeshQuery.h */; + name = "DetourNavMeshQuery.h: 104"; + rLen = 0; + rLoc = 4849; + rType = 0; + vrLen = 1468; + vrLoc = 3230; + }; + 6BAF42B9121AF141008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BAF40DA12196A3D008CFCDF /* DetourNavMeshQuery.cpp */; + name = "DetourNavMeshQuery.cpp: 669"; + rLen = 0; + rLoc = 2298; + rType = 0; + vrLen = 812; + vrLoc = 17254; + }; + 6BAF42BA121AF141008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BAF40D912196A25008CFCDF /* DetourNavMeshQuery.h */; + name = "DetourNavMeshQuery.h: 105"; + rLen = 0; + rLoc = 4567; + rType = 0; + vrLen = 1467; + vrLoc = 3230; + }; + 6BAF42BB121AF141008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BAF40DA12196A3D008CFCDF /* DetourNavMeshQuery.cpp */; + name = "DetourNavMeshQuery.cpp: 886"; + rLen = 0; + rLoc = 2298; + rType = 0; + vrLen = 506; + vrLoc = 22998; + }; + 6BAF42BC121AF141008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BAF40D912196A25008CFCDF /* DetourNavMeshQuery.h */; + name = "DetourNavMeshQuery.h: 105"; + rLen = 0; + rLoc = 4567; + rType = 0; + vrLen = 1132; + vrLoc = 13350; + }; + 6BAF42BD121AF141008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BAF40DA12196A3D008CFCDF /* DetourNavMeshQuery.cpp */; + name = "DetourNavMeshQuery.cpp: 880"; + rLen = 0; + rLoc = 2298; + rType = 0; + vrLen = 555; + vrLoc = 22930; + }; + 6BAF42BE121AF141008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BAF40D912196A25008CFCDF /* DetourNavMeshQuery.h */; + name = "DetourNavMeshQuery.h: 108"; + rLen = 0; + rLoc = 5138; + rType = 0; + vrLen = 1689; + vrLoc = 3816; + }; + 6BAF42BF121AF141008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BAF40DA12196A3D008CFCDF /* DetourNavMeshQuery.cpp */; + name = "DetourNavMeshQuery.cpp: 886"; + rLen = 0; + rLoc = 2298; + rType = 0; + vrLen = 571; + vrLoc = 22930; + }; + 6BAF42C0121AF141008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BAF40D912196A25008CFCDF /* DetourNavMeshQuery.h */; + name = "DetourNavMeshQuery.h: 302"; + rLen = 0; + rLoc = 14835; + rType = 0; + vrLen = 1162; + vrLoc = 13270; + }; + 6BAF42C1121AF141008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BAF40DA12196A3D008CFCDF /* DetourNavMeshQuery.cpp */; + name = "DetourNavMeshQuery.cpp: 30"; + rLen = 0; + rLoc = 1149; + rType = 0; + vrLen = 956; + vrLoc = 842; + }; + 6BAF42C3121AF27C008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BAF40DA12196A3D008CFCDF /* DetourNavMeshQuery.cpp */; + name = "DetourNavMeshQuery.cpp: 78"; + rLen = 0; + rLoc = 2298; + rType = 0; + vrLen = 693; + vrLoc = 2043; + }; + 6BAF42C4121AF27C008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BAF40D912196A25008CFCDF /* DetourNavMeshQuery.h */; + name = "DetourNavMeshQuery.h: 34"; + rLen = 15; + rLoc = 1318; + rType = 0; + vrLen = 827; + vrLoc = 672; + }; + 6BAF42C5121AF27C008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BB7FC0910EBB6AA006DA0A6 /* NavMeshTesterTool.h */; + name = "NavMeshTesterTool.h: 40"; + rLen = 26; + rLoc = 1287; + rType = 0; + vrLen = 601; + vrLoc = 981; + }; + 6BAF42C6121AF27C008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BB7FC0A10EBB6AA006DA0A6 /* NavMeshTesterTool.cpp */; + name = "NavMeshTesterTool.cpp: 148"; + rLen = 0; + rLoc = 4228; + rType = 0; + vrLen = 594; + vrLoc = 4104; + }; + 6BAF42C7121AF27C008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BAF40DA12196A3D008CFCDF /* DetourNavMeshQuery.cpp */; + name = "DetourNavMeshQuery.cpp: 78"; + rLen = 0; + rLoc = 2298; + rType = 0; + vrLen = 693; + vrLoc = 2043; + }; + 6BAF42C8121AF27C008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BAF40D912196A25008CFCDF /* DetourNavMeshQuery.h */; + name = "DetourNavMeshQuery.h: 34"; + rLen = 15; + rLoc = 1318; + rType = 0; + vrLen = 827; + vrLoc = 672; + }; + 6BAF42C9121AF27C008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BB7FC0910EBB6AA006DA0A6 /* NavMeshTesterTool.h */; + name = "NavMeshTesterTool.h: 35"; + rLen = 0; + rLoc = 1237; + rType = 0; + vrLen = 562; + vrLoc = 923; + }; + 6BAF42CA121AF27C008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BB7FC0A10EBB6AA006DA0A6 /* NavMeshTesterTool.cpp */; + name = "NavMeshTesterTool.cpp: 169"; + rLen = 0; + rLoc = 4259; + rType = 0; + vrLen = 641; + vrLoc = 4163; + }; + 6BAF42CB121AF27C008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BB7FC0910EBB6AA006DA0A6 /* NavMeshTesterTool.h */; + name = "NavMeshTesterTool.h: 35"; + rLen = 0; + rLoc = 1237; + rType = 0; + vrLen = 562; + vrLoc = 923; + }; + 6BAF42CC121AF27C008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BB7FC0A10EBB6AA006DA0A6 /* NavMeshTesterTool.cpp */; + name = "NavMeshTesterTool.cpp: 169"; + rLen = 0; + rLoc = 4259; + rType = 0; + vrLen = 572; + vrLoc = 4090; + }; + 6BAF42CD121AF27C008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BB7FC0910EBB6AA006DA0A6 /* NavMeshTesterTool.h */; + name = "NavMeshTesterTool.h: 35"; + rLen = 0; + rLoc = 1237; + rType = 0; + vrLen = 562; + vrLoc = 923; + }; + 6BAF42CE121AF27C008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BB7FC0A10EBB6AA006DA0A6 /* NavMeshTesterTool.cpp */; + name = "NavMeshTesterTool.cpp: 148"; + rLen = 0; + rLoc = 4228; + rType = 0; + vrLen = 594; + vrLoc = 4104; + }; + 6BAF42CF121AF27C008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BB7FC0910EBB6AA006DA0A6 /* NavMeshTesterTool.h */; + name = "NavMeshTesterTool.h: 40"; + rLen = 26; + rLoc = 1287; + rType = 0; + vrLen = 601; + vrLoc = 981; + }; + 6BAF42D0121AF27C008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BB7FC0A10EBB6AA006DA0A6 /* NavMeshTesterTool.cpp */; + name = "NavMeshTesterTool.cpp: 500"; + rLen = 0; + rLoc = 4259; + rType = 0; + vrLen = 734; + vrLoc = 12922; + }; + 6BAF42D2121AF2A3008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BB7FC0A10EBB6AA006DA0A6 /* NavMeshTesterTool.cpp */; + name = "NavMeshTesterTool.cpp: 497"; + rLen = 0; + rLoc = 4259; + rType = 0; + vrLen = 764; + vrLoc = 12877; + }; + 6BAF42D3121AF2A8008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BAF40D912196A25008CFCDF /* DetourNavMeshQuery.h */; + name = "DetourNavMeshQuery.h: 50"; + rLen = 0; + rLoc = 1751; + rType = 0; + vrLen = 548; + vrLoc = 1422; + }; + 6BAF42D4121AF2A8008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BB7FC0A10EBB6AA006DA0A6 /* NavMeshTesterTool.cpp */; + name = "NavMeshTesterTool.cpp: 497"; + rLen = 0; + rLoc = 4259; + rType = 0; + vrLen = 556; + vrLoc = 12981; + }; + 6BAF42D6121AF2AC008CFCDF /* NavMeshTesterTool.cpp:149 */ = { + isa = PBXFileBreakpoint; + actions = ( + ); + breakpointStyle = 0; + continueAfterActions = 0; + countType = 0; + delayBeforeContinue = 0; + fileReference = 6BB7FC0A10EBB6AA006DA0A6 /* NavMeshTesterTool.cpp */; + functionName = "NavMeshTesterTool::handleUpdate(const float dt)"; + hitCount = 3; + ignoreCount = 0; + lineNumber = 149; + location = Recast; + modificationTime = 303756345.607579; + state = 1; + }; + 6BAF42D8121AF2AF008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BB7FC0A10EBB6AA006DA0A6 /* NavMeshTesterTool.cpp */; + name = "NavMeshTesterTool.cpp: 493"; + rLen = 0; + rLoc = 4259; + rType = 0; + vrLen = 767; + vrLoc = 12819; + }; + 6BAF42DB121AF2C3008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BB7FC0A10EBB6AA006DA0A6 /* NavMeshTesterTool.cpp */; + name = "NavMeshTesterTool.cpp: 493"; + rLen = 0; + rLoc = 4259; + rType = 0; + vrLen = 767; + vrLoc = 12819; + }; + 6BAF42E1121AF3B8008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BB7FC0A10EBB6AA006DA0A6 /* NavMeshTesterTool.cpp */; + name = "NavMeshTesterTool.cpp: 492"; + rLen = 0; + rLoc = 4259; + rType = 0; + vrLen = 836; + vrLoc = 12742; + }; + 6BAF42E2121AF3B8008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6B1185F61006896B0018F96F /* DetourNode.h */; + name = "DetourNode.h: 49"; + rLen = 0; + rLoc = 1440; + rType = 0; + vrLen = 607; + vrLoc = 1065; + }; + 6BAF42E3121AF3B8008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BAF40DA12196A3D008CFCDF /* DetourNavMeshQuery.cpp */; + rLen = 0; + rLoc = 70; + rType = 1; + }; + 6BAF42E4121AF3B8008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BB7FC0A10EBB6AA006DA0A6 /* NavMeshTesterTool.cpp */; + name = "NavMeshTesterTool.cpp: 493"; + rLen = 0; + rLoc = 4259; + rType = 0; + vrLen = 767; + vrLoc = 12819; + }; + 6BAF42E5121AF3B8008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BAF40DA12196A3D008CFCDF /* DetourNavMeshQuery.cpp */; + name = "DetourNavMeshQuery.cpp: 891"; + rLen = 0; + rLoc = 2299; + rType = 0; + vrLen = 581; + vrLoc = 22961; + }; + 6BAF42E6121AF3B8008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BB7FC0A10EBB6AA006DA0A6 /* NavMeshTesterTool.cpp */; + name = "NavMeshTesterTool.cpp: 492"; + rLen = 0; + rLoc = 4259; + rType = 0; + vrLen = 836; + vrLoc = 12742; + }; + 6BAF42E7121AF3B8008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BAF40DA12196A3D008CFCDF /* DetourNavMeshQuery.cpp */; + name = "DetourNavMeshQuery.cpp: 881"; + rLen = 0; + rLoc = 2298; + rType = 0; + vrLen = 616; + vrLoc = 22962; + }; + 6BAF42E8121AF3B8008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6B1185F61006896B0018F96F /* DetourNode.h */; + name = "DetourNode.h: 49"; + rLen = 0; + rLoc = 1440; + rType = 0; + vrLen = 607; + vrLoc = 1065; + }; + 6BAF42E9121AF3B8008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BAF40DA12196A3D008CFCDF /* DetourNavMeshQuery.cpp */; + name = "DetourNavMeshQuery.cpp: 889"; + rLen = 0; + rLoc = 2299; + rType = 0; + vrLen = 616; + vrLoc = 22962; + }; + 6BAF42EC121AF3DE008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BAF40DA12196A3D008CFCDF /* DetourNavMeshQuery.cpp */; + name = "DetourNavMeshQuery.cpp: 889"; + rLen = 0; + rLoc = 2299; + rType = 0; + vrLen = 601; + vrLoc = 22920; + }; + 6BAF42EE121AF43D008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BAF40DA12196A3D008CFCDF /* DetourNavMeshQuery.cpp */; + name = "DetourNavMeshQuery.cpp: 881"; + rLen = 0; + rLoc = 2298; + rType = 0; + vrLen = 308; + vrLoc = 23252; + }; + 6BAF42EF121AF43D008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BB7FC0A10EBB6AA006DA0A6 /* NavMeshTesterTool.cpp */; + rLen = 0; + rLoc = 148; + rType = 1; + }; + 6BAF42F0121AF43D008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BB7FC0A10EBB6AA006DA0A6 /* NavMeshTesterTool.cpp */; + name = "NavMeshTesterTool.cpp: 497"; + rLen = 0; + rLoc = 4259; + rType = 0; + vrLen = 554; + vrLoc = 12979; + }; + 6BAF42F1121AF43D008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BAF40DA12196A3D008CFCDF /* DetourNavMeshQuery.cpp */; + name = "DetourNavMeshQuery.cpp: 892"; + rLen = 0; + rLoc = 2299; + rType = 0; + vrLen = 266; + vrLoc = 23307; + }; + 6BAF42F2121AF43D008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BB7FC0A10EBB6AA006DA0A6 /* NavMeshTesterTool.cpp */; + name = "NavMeshTesterTool.cpp: 492"; + rLen = 0; + rLoc = 4259; + rType = 0; + vrLen = 554; + vrLoc = 12979; + }; + 6BAF42F3121AF43D008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BAF40DA12196A3D008CFCDF /* DetourNavMeshQuery.cpp */; + name = "DetourNavMeshQuery.cpp: 881"; + rLen = 0; + rLoc = 2298; + rType = 0; + vrLen = 308; + vrLoc = 23252; + }; + 6BAF42F4121AF43D008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BB7FC0A10EBB6AA006DA0A6 /* NavMeshTesterTool.cpp */; + name = "NavMeshTesterTool.cpp: 492"; + rLen = 0; + rLoc = 4259; + rType = 0; + vrLen = 554; + vrLoc = 12979; + }; + 6BAF42F9121AF514008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BAF40DA12196A3D008CFCDF /* DetourNavMeshQuery.cpp */; + name = "DetourNavMeshQuery.cpp: 889"; + rLen = 0; + rLoc = 2299; + rType = 0; + vrLen = 664; + vrLoc = 22894; + }; + 6BAF42FA121AF514008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BB7FC0A10EBB6AA006DA0A6 /* NavMeshTesterTool.cpp */; + name = "NavMeshTesterTool.cpp: 207"; + rLen = 0; + rLoc = 5601; + rType = 0; + vrLen = 821; + vrLoc = 5476; + }; + 6BAF42FB121AF514008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BB7FC0910EBB6AA006DA0A6 /* NavMeshTesterTool.h */; + name = "NavMeshTesterTool.h: 41"; + rLen = 24; + rLoc = 1317; + rType = 0; + vrLen = 651; + vrLoc = 980; + }; + 6BAF42FC121AF514008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BB7FC0A10EBB6AA006DA0A6 /* NavMeshTesterTool.cpp */; + name = "NavMeshTesterTool.cpp: 490"; + rLen = 0; + rLoc = 4259; + rType = 0; + vrLen = 840; + vrLoc = 12742; + }; + 6BAF42FD121AF514008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BB7FC0910EBB6AA006DA0A6 /* NavMeshTesterTool.h */; + name = "NavMeshTesterTool.h: 39"; + rLen = 24; + rLoc = 1259; + rType = 0; + vrLen = 601; + vrLoc = 981; + }; + 6BAF42FE121AF514008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BB7FC0A10EBB6AA006DA0A6 /* NavMeshTesterTool.cpp */; + name = "NavMeshTesterTool.cpp: 565"; + rLen = 0; + rLoc = 4259; + rType = 0; + vrLen = 1140; + vrLoc = 14317; + }; + 6BAF42FF121AF514008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BB7FC0910EBB6AA006DA0A6 /* NavMeshTesterTool.h */; + name = "NavMeshTesterTool.h: 39"; + rLen = 24; + rLoc = 1259; + rType = 0; + vrLen = 603; + vrLoc = 981; + }; + 6BAF4300121AF514008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BB7FC0A10EBB6AA006DA0A6 /* NavMeshTesterTool.cpp */; + name = "NavMeshTesterTool.cpp: 548"; + rLen = 0; + rLoc = 5507; + rType = 0; + vrLen = 1097; + vrLoc = 14041; + }; + 6BAF4301121AF514008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BB7FC0910EBB6AA006DA0A6 /* NavMeshTesterTool.h */; + name = "NavMeshTesterTool.h: 40"; + rLen = 26; + rLoc = 1287; + rType = 0; + vrLen = 651; + vrLoc = 980; + }; + 6BAF4302121AF514008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BB7FC0A10EBB6AA006DA0A6 /* NavMeshTesterTool.cpp */; + name = "NavMeshTesterTool.cpp: 226"; + rLen = 0; + rLoc = 5507; + rType = 0; + vrLen = 876; + vrLoc = 5516; + }; + 6BAF4303121AF514008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BB7FC0910EBB6AA006DA0A6 /* NavMeshTesterTool.h */; + name = "NavMeshTesterTool.h: 41"; + rLen = 24; + rLoc = 1317; + rType = 0; + vrLen = 651; + vrLoc = 980; + }; + 6BAF4304121AF514008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BB7FC0A10EBB6AA006DA0A6 /* NavMeshTesterTool.cpp */; + name = "NavMeshTesterTool.cpp: 207"; + rLen = 0; + rLoc = 5601; + rType = 0; + vrLen = 821; + vrLoc = 5476; + }; + 6BAF4305121AF514008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BB7FC0910EBB6AA006DA0A6 /* NavMeshTesterTool.h */; + name = "NavMeshTesterTool.h: 37"; + rLen = 0; + rLoc = 1253; + rType = 0; + vrLen = 632; + vrLoc = 980; + }; + 6BAF4306121AF574008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BB7FC0910EBB6AA006DA0A6 /* NavMeshTesterTool.h */; + name = "NavMeshTesterTool.h: 39"; + rLen = 0; + rLoc = 1284; + rType = 0; + vrLen = 653; + vrLoc = 980; + }; + 6BAF4307121AF6E0008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BB7FC0910EBB6AA006DA0A6 /* NavMeshTesterTool.h */; + name = "NavMeshTesterTool.h: 39"; + rLen = 0; + rLoc = 1284; + rType = 0; + vrLen = 653; + vrLoc = 980; + }; + 6BAF4308121AF6E0008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BAF40D912196A25008CFCDF /* DetourNavMeshQuery.h */; + name = "DetourNavMeshQuery.h: 34"; + rLen = 15; + rLoc = 1318; + rType = 0; + vrLen = 915; + vrLoc = 596; + }; + 6BAF4309121AF6E0008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BB7FC0910EBB6AA006DA0A6 /* NavMeshTesterTool.h */; + name = "NavMeshTesterTool.h: 39"; + rLen = 0; + rLoc = 1284; + rType = 0; + vrLen = 653; + vrLoc = 980; + }; + 6BAF430A121AF6E0008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BAF40D912196A25008CFCDF /* DetourNavMeshQuery.h */; + name = "DetourNavMeshQuery.h: 117"; + rLen = 0; + rLoc = 5075; + rType = 0; + vrLen = 1506; + vrLoc = 3450; + }; + 6BAF430C121AF7CD008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BAF40D912196A25008CFCDF /* DetourNavMeshQuery.h */; + name = "DetourNavMeshQuery.h: 326"; + rLen = 0; + rLoc = 14973; + rType = 0; + vrLen = 1343; + vrLoc = 14099; + }; + 6BAF430D121AF7CD008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BAF40DA12196A3D008CFCDF /* DetourNavMeshQuery.cpp */; + name = "DetourNavMeshQuery.cpp: 70"; + rLen = 0; + rLoc = 2286; + rType = 0; + vrLen = 849; + vrLoc = 1547; + }; + 6BAF430E121AF7CD008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BAF40D912196A25008CFCDF /* DetourNavMeshQuery.h */; + name = "DetourNavMeshQuery.h: 326"; + rLen = 7; + rLoc = 14986; + rType = 0; + vrLen = 1362; + vrLoc = 14099; + }; + 6BAF430F121AF7CD008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BAF40DA12196A3D008CFCDF /* DetourNavMeshQuery.cpp */; + name = "DetourNavMeshQuery.cpp: 71"; + rLen = 0; + rLoc = 2298; + rType = 0; + vrLen = 885; + vrLoc = 1476; + }; + 6BAF4310121AF7CD008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BAF40D912196A25008CFCDF /* DetourNavMeshQuery.h */; + name = "DetourNavMeshQuery.h: 326"; + rLen = 11; + rLoc = 14974; + rType = 0; + vrLen = 1362; + vrLoc = 14099; + }; + 6BAF4311121AF7CD008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BAF40DA12196A3D008CFCDF /* DetourNavMeshQuery.cpp */; + name = "DetourNavMeshQuery.cpp: 71"; + rLen = 0; + rLoc = 2287; + rType = 0; + vrLen = 902; + vrLoc = 1476; + }; + 6BAF4312121AF7CD008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BAF40D912196A25008CFCDF /* DetourNavMeshQuery.h */; + name = "DetourNavMeshQuery.h: 326"; + rLen = 7; + rLoc = 14986; + rType = 0; + vrLen = 1362; + vrLoc = 14099; + }; + 6BAF4313121AF7CD008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BAF40DA12196A3D008CFCDF /* DetourNavMeshQuery.cpp */; + name = "DetourNavMeshQuery.cpp: 70"; + rLen = 0; + rLoc = 2286; + rType = 0; + vrLen = 849; + vrLoc = 1547; + }; + 6BAF4314121AF7CD008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BAF40D912196A25008CFCDF /* DetourNavMeshQuery.h */; + name = "DetourNavMeshQuery.h: 326"; + rLen = 0; + rLoc = 14973; + rType = 0; + vrLen = 1343; + vrLoc = 14099; + }; + 6BAF4315121AF7CD008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BAF40DA12196A3D008CFCDF /* DetourNavMeshQuery.cpp */; + name = "DetourNavMeshQuery.cpp: 685"; + rLen = 0; + rLoc = 2299; + rType = 0; + vrLen = 810; + vrLoc = 17174; + }; + 6BAF4321121AF998008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BB7FC0910EBB6AA006DA0A6 /* NavMeshTesterTool.h */; + name = "NavMeshTesterTool.h: 35"; + rLen = 0; + rLoc = 1220; + rType = 0; + vrLen = 445; + vrLoc = 980; + }; + 6BAF4322121AF998008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6B8DE88B10B69E4C00DF20FB /* DetourNavMesh.h */; + name = "DetourNavMesh.h: 252"; + rLen = 0; + rLoc = 9902; + rType = 0; + vrLen = 1261; + vrLoc = 9407; + }; + 6BAF4323121AF998008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BAF40D912196A25008CFCDF /* DetourNavMeshQuery.h */; + name = "DetourNavMeshQuery.h: 326"; + rLen = 7; + rLoc = 14986; + rType = 0; + vrLen = 762; + vrLoc = 14379; + }; + 6BAF4324121AF998008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BAF40DA12196A3D008CFCDF /* DetourNavMeshQuery.cpp */; + name = "DetourNavMeshQuery.cpp: 678"; + rLen = 0; + rLoc = 17554; + rType = 0; + vrLen = 706; + vrLoc = 17303; + }; + 6BAF4325121AF998008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6B2AEC520FFB8958005BE9CC /* Sample_TileMesh.cpp */; + name = "Sample_TileMesh.cpp: 480"; + rLen = 0; + rLoc = 11262; + rType = 0; + vrLen = 874; + vrLoc = 10849; + }; + 6BAF4326121AF998008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + comments = "error: 'class dtNavMeshQuery' has no member named 'findPathBegin'"; + fRef = 6BB7FC0A10EBB6AA006DA0A6 /* NavMeshTesterTool.cpp */; + rLen = 1; + rLoc = 736; + rType = 1; + }; + 6BAF4327121AF998008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BAF40DA12196A3D008CFCDF /* DetourNavMeshQuery.cpp */; + name = "DetourNavMeshQuery.cpp: 678"; + rLen = 0; + rLoc = 2299; + rType = 0; + vrLen = 687; + vrLoc = 17174; + }; + 6BAF4328121AF998008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BAF40D912196A25008CFCDF /* DetourNavMeshQuery.h */; + name = "DetourNavMeshQuery.h: 113"; + rLen = 18; + rLoc = 4510; + rType = 0; + vrLen = 1500; + vrLoc = 3772; + }; + 6BAF4329121AF998008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BAF40DA12196A3D008CFCDF /* DetourNavMeshQuery.cpp */; + name = "DetourNavMeshQuery.cpp: 671"; + rLen = 0; + rLoc = 2299; + rType = 0; + vrLen = 692; + vrLoc = 17174; + }; + 6BAF432A121AF998008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BAF40D912196A25008CFCDF /* DetourNavMeshQuery.h */; + name = "DetourNavMeshQuery.h: 113"; + rLen = 12; + rLoc = 4497; + rType = 0; + vrLen = 1500; + vrLoc = 3772; + }; + 6BAF432B121AF998008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BAF40DA12196A3D008CFCDF /* DetourNavMeshQuery.cpp */; + name = "DetourNavMeshQuery.cpp: 675"; + rLen = 0; + rLoc = 2299; + rType = 0; + vrLen = 717; + vrLoc = 17174; + }; + 6BAF432C121AF998008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BAF40D912196A25008CFCDF /* DetourNavMeshQuery.h */; + name = "DetourNavMeshQuery.h: 319"; + rLen = 0; + rLoc = 14818; + rType = 0; + vrLen = 1563; + vrLoc = 13487; + }; + 6BAF432D121AF998008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BAF40DA12196A3D008CFCDF /* DetourNavMeshQuery.cpp */; + name = "DetourNavMeshQuery.cpp: 719"; + rLen = 0; + rLoc = 2299; + rType = 0; + vrLen = 829; + vrLoc = 18006; + }; + 6BAF432E121AF998008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BAF40D912196A25008CFCDF /* DetourNavMeshQuery.h */; + name = "DetourNavMeshQuery.h: 125"; + rLen = 0; + rLoc = 5014; + rType = 0; + vrLen = 1771; + vrLoc = 4347; + }; + 6BAF432F121AF998008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BAF40DA12196A3D008CFCDF /* DetourNavMeshQuery.cpp */; + name = "DetourNavMeshQuery.cpp: 719"; + rLen = 0; + rLoc = 2299; + rType = 0; + vrLen = 829; + vrLoc = 18006; + }; + 6BAF4330121AF998008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BAF40D912196A25008CFCDF /* DetourNavMeshQuery.h */; + name = "DetourNavMeshQuery.h: 121"; + rLen = 20; + rLoc = 4809; + rType = 0; + vrLen = 1775; + vrLoc = 4347; + }; + 6BAF4331121AF998008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BAF40DA12196A3D008CFCDF /* DetourNavMeshQuery.cpp */; + name = "DetourNavMeshQuery.cpp: 719"; + rLen = 0; + rLoc = 2299; + rType = 0; + vrLen = 835; + vrLoc = 18006; + }; + 6BAF4332121AF998008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BAF40D912196A25008CFCDF /* DetourNavMeshQuery.h */; + name = "DetourNavMeshQuery.h: 121"; + rLen = 12; + rLoc = 4796; + rType = 0; + vrLen = 1775; + vrLoc = 4347; + }; + 6BAF4333121AF998008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BAF40DA12196A3D008CFCDF /* DetourNavMeshQuery.cpp */; + name = "DetourNavMeshQuery.cpp: 879"; + rLen = 0; + rLoc = 2299; + rType = 0; + vrLen = 580; + vrLoc = 22821; + }; + 6BAF4334121AF998008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BAF40D912196A25008CFCDF /* DetourNavMeshQuery.h */; + name = "DetourNavMeshQuery.h: 127"; + rLen = 22; + rLoc = 5076; + rType = 0; + vrLen = 1775; + vrLoc = 4347; + }; + 6BAF4335121AF998008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BAF40DA12196A3D008CFCDF /* DetourNavMeshQuery.cpp */; + name = "DetourNavMeshQuery.cpp: 900"; + rLen = 0; + rLoc = 2299; + rType = 0; + vrLen = 431; + vrLoc = 23171; + }; + 6BAF4336121AF998008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BB7FC0A10EBB6AA006DA0A6 /* NavMeshTesterTool.cpp */; + name = "NavMeshTesterTool.cpp: 148"; + rLen = 0; + rLoc = 4219; + rType = 0; + vrLen = 442; + vrLoc = 3910; + }; + 6BAF4337121AF998008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BB7FC0910EBB6AA006DA0A6 /* NavMeshTesterTool.h */; + name = "NavMeshTesterTool.h: 35"; + rLen = 0; + rLoc = 1220; + rType = 0; + vrLen = 445; + vrLoc = 980; + }; + 6BAF4338121AF998008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6B8DE88B10B69E4C00DF20FB /* DetourNavMesh.h */; + name = "DetourNavMesh.h: 252"; + rLen = 0; + rLoc = 9902; + rType = 0; + vrLen = 1261; + vrLoc = 9407; + }; + 6BAF4339121AF998008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BAF40D912196A25008CFCDF /* DetourNavMeshQuery.h */; + name = "DetourNavMeshQuery.h: 319"; + rLen = 0; + rLoc = 14818; + rType = 0; + vrLen = 834; + vrLoc = 14310; + }; + 6BAF433A121AF998008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BAF40DA12196A3D008CFCDF /* DetourNavMeshQuery.cpp */; + name = "DetourNavMeshQuery.cpp: 719"; + rLen = 0; + rLoc = 2299; + rType = 0; + vrLen = 656; + vrLoc = 18229; + }; + 6BAF433B121AF998008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BB7FC0A10EBB6AA006DA0A6 /* NavMeshTesterTool.cpp */; + name = "NavMeshTesterTool.cpp: 147"; + rLen = 1; + rLoc = 4193; + rType = 0; + vrLen = 481; + vrLoc = 3933; + }; + 6BAF433C121AF998008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BAF40D912196A25008CFCDF /* DetourNavMeshQuery.h */; + name = "DetourNavMeshQuery.h: 326"; + rLen = 0; + rLoc = 14973; + rType = 0; + vrLen = 832; + vrLoc = 14310; + }; + 6BAF433D121AF998008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BAF40DA12196A3D008CFCDF /* DetourNavMeshQuery.cpp */; + name = "DetourNavMeshQuery.cpp: 671"; + rLen = 0; + rLoc = 2299; + rType = 0; + vrLen = 541; + vrLoc = 17173; + }; + 6BAF433E121AF998008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BAF40D912196A25008CFCDF /* DetourNavMeshQuery.h */; + name = "DetourNavMeshQuery.h: 326"; + rLen = 0; + rLoc = 14973; + rType = 0; + vrLen = 763; + vrLoc = 14379; + }; + 6BAF433F121AF998008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BAF40DA12196A3D008CFCDF /* DetourNavMeshQuery.cpp */; + name = "DetourNavMeshQuery.cpp: 676"; + rLen = 0; + rLoc = 2299; + rType = 0; + vrLen = 514; + vrLoc = 17173; + }; + 6BAF4340121AF998008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BAF40D912196A25008CFCDF /* DetourNavMeshQuery.h */; + name = "DetourNavMeshQuery.h: 326"; + rLen = 7; + rLoc = 14986; + rType = 0; + vrLen = 762; + vrLoc = 14379; + }; + 6BAF4341121AF998008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BAF40DA12196A3D008CFCDF /* DetourNavMeshQuery.cpp */; + name = "DetourNavMeshQuery.cpp: 678"; + rLen = 0; + rLoc = 17554; + rType = 0; + vrLen = 706; + vrLoc = 17303; + }; + 6BAF4342121AF998008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6B2AEC520FFB8958005BE9CC /* Sample_TileMesh.cpp */; + name = "Sample_TileMesh.cpp: 480"; + rLen = 0; + rLoc = 11262; + rType = 0; + vrLen = 874; + vrLoc = 10849; + }; + 6BAF4343121AF998008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BB7FC0A10EBB6AA006DA0A6 /* NavMeshTesterTool.cpp */; + name = "NavMeshTesterTool.cpp: 737"; + rLen = 0; + rLoc = 20098; + rType = 0; + vrLen = 684; + vrLoc = 19661; + }; + 6BAF4346121AFD0B008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BB7FC0A10EBB6AA006DA0A6 /* NavMeshTesterTool.cpp */; + name = "NavMeshTesterTool.cpp: 215"; + rLen = 0; + rLoc = 5747; + rType = 0; + vrLen = 852; + vrLoc = 5645; + }; + 6BAF4347121AFD0B008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BAF40DA12196A3D008CFCDF /* DetourNavMeshQuery.cpp */; + name = "DetourNavMeshQuery.cpp: 678"; + rLen = 0; + rLoc = 17554; + rType = 0; + vrLen = 782; + vrLoc = 17289; + }; + 6BAF4348121AFD0B008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BB7FC0A10EBB6AA006DA0A6 /* NavMeshTesterTool.cpp */; + name = "NavMeshTesterTool.cpp: 215"; + rLen = 0; + rLoc = 5747; + rType = 0; + vrLen = 852; + vrLoc = 5645; + }; + 6BAF4349121AFD0B008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BAF40DA12196A3D008CFCDF /* DetourNavMeshQuery.cpp */; + name = "DetourNavMeshQuery.cpp: 894"; + rLen = 0; + rLoc = 23399; + rType = 0; + vrLen = 640; + vrLoc = 23011; + }; + 6BAF434F121B00EF008CFCDF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BAF40DA12196A3D008CFCDF /* DetourNavMeshQuery.cpp */; + name = "DetourNavMeshQuery.cpp: 887"; + rLen = 0; + rLoc = 23224; + rType = 0; + vrLen = 629; + vrLoc = 23011; + }; 6BB788160FC0472B003C24DB /* ChunkyTriMesh.cpp */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {1112, 3888}}"; @@ -6706,16 +8386,16 @@ }; 6BB7FC0910EBB6AA006DA0A6 /* NavMeshTesterTool.h */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {933, 1584}}"; - sepNavSelRange = "{1168, 10}"; - sepNavVisRange = "{980, 480}"; + sepNavIntBoundsRect = "{{0, 0}, {933, 1648}}"; + sepNavSelRange = "{1220, 0}"; + sepNavVisRange = "{980, 445}"; }; }; 6BB7FC0A10EBB6AA006DA0A6 /* NavMeshTesterTool.cpp */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {933, 18640}}"; - sepNavSelRange = "{22658, 0}"; - sepNavVisRange = "{22476, 516}"; + sepNavIntBoundsRect = "{{0, 0}, {933, 19712}}"; + sepNavSelRange = "{5747, 0}"; + sepNavVisRange = "{5645, 852}"; sepNavWindowFrame = "{{38, 30}, {1214, 722}}"; }; }; @@ -7119,7 +8799,7 @@ ignoreCount = 0; lineNumber = 279; location = Recast; - modificationTime = 303302369.9854569; + modificationTime = 303756251.188963; state = 1; }; 6BC7619C11B63C7E00FF5E51 /* PBXTextBookmark */ = { diff --git a/RecastDemo/Build/Xcode/Recast.xcodeproj/memon.perspectivev3 b/RecastDemo/Build/Xcode/Recast.xcodeproj/memon.perspectivev3 index cc83728..cc82dc6 100644 --- a/RecastDemo/Build/Xcode/Recast.xcodeproj/memon.perspectivev3 +++ b/RecastDemo/Build/Xcode/Recast.xcodeproj/memon.perspectivev3 @@ -290,7 +290,7 @@ PBXSmartGroupTreeModuleOutlineStateVisibleRectKey - {{0, 8}, {264, 660}} + {{0, 107}, {264, 660}} PBXTopSmartGroupGIDs @@ -337,7 +337,7 @@ _historyCapacity 0 bookmark - 6BAF428A121ADD46008CFCDF + 6BAF434F121B00EF008CFCDF history 6BBB4AA5115B4F3400CF791D @@ -387,7 +387,6 @@ 6BAF40F212197F3D008CFCDF 6BAF40F312197F3D008CFCDF 6BAF40F412197F3D008CFCDF - 6BAF416F1219811E008CFCDF 6BAF41701219811E008CFCDF 6BAF419E12198419008CFCDF 6BAF419F12198419008CFCDF @@ -398,26 +397,26 @@ 6BAF41A612198419008CFCDF 6BAF41A812198419008CFCDF 6BAF41A912198419008CFCDF - 6BAF41AA12198419008CFCDF 6BAF41AB12198419008CFCDF 6BAF41D0121A5AEE008CFCDF - 6BAF41E3121ACD06008CFCDF - 6BAF421F121ACE5E008CFCDF 6BAF4250121AD7D7008CFCDF - 6BAF4251121AD7D7008CFCDF - 6BAF4264121AD99B008CFCDF 6BAF4267121AD99B008CFCDF 6BAF4269121AD99B008CFCDF - 6BAF427D121ADD46008CFCDF 6BAF427E121ADD46008CFCDF 6BAF427F121ADD46008CFCDF 6BAF4280121ADD46008CFCDF 6BAF4281121ADD46008CFCDF - 6BAF4282121ADD46008CFCDF + 6BAF42A6121AEFD9008CFCDF + 6BAF42E2121AF3B8008CFCDF + 6BAF4321121AF998008CFCDF + 6BAF4322121AF998008CFCDF + 6BAF4323121AF998008CFCDF + 6BAF4325121AF998008CFCDF + 6BAF4346121AFD0B008CFCDF + 6BAF4347121AFD0B008CFCDF prevStack - 6BBB4AD3115B4F3400CF791D 6BBB4AE0115B4F3400CF791D 6BBB4AE6115B4F3400CF791D 6BBB4AE7115B4F3400CF791D @@ -490,9 +489,7 @@ 6BAF410812197F3D008CFCDF 6BAF411712197F3D008CFCDF 6BAF411F12197F3D008CFCDF - 6BAF412E12197F3D008CFCDF 6BAF412F12197F3D008CFCDF - 6BAF414612197F3D008CFCDF 6BAF414812197F3D008CFCDF 6BAF414912197F3D008CFCDF 6BAF414A12197F3D008CFCDF @@ -549,18 +546,10 @@ 6BAF41D3121A5AEE008CFCDF 6BAF41DA121A5D13008CFCDF 6BAF41DB121A5D13008CFCDF - 6BAF41DF121A5D13008CFCDF 6BAF41E9121ACD06008CFCDF - 6BAF41ED121ACD06008CFCDF - 6BAF41EF121ACD06008CFCDF - 6BAF41F0121ACD06008CFCDF - 6BAF41FD121ACD06008CFCDF - 6BAF4222121ACE5E008CFCDF 6BAF4223121ACE5E008CFCDF - 6BAF4238121AD4A8008CFCDF 6BAF4243121AD679008CFCDF 6BAF4245121AD679008CFCDF - 6BAF4247121AD679008CFCDF 6BAF4254121AD7D7008CFCDF 6BAF4255121AD7D7008CFCDF 6BAF4256121AD7D7008CFCDF @@ -569,15 +558,94 @@ 6BAF426D121AD99B008CFCDF 6BAF426F121AD99B008CFCDF 6BAF4270121AD99B008CFCDF - 6BAF4271121AD99B008CFCDF 6BAF4272121AD99B008CFCDF 6BAF4283121ADD46008CFCDF 6BAF4284121ADD46008CFCDF 6BAF4285121ADD46008CFCDF - 6BAF4286121ADD46008CFCDF - 6BAF4287121ADD46008CFCDF 6BAF4288121ADD46008CFCDF 6BAF4289121ADD46008CFCDF + 6BAF4290121AEBDF008CFCDF + 6BAF4291121AEBDF008CFCDF + 6BAF4293121AEBDF008CFCDF + 6BAF4298121AEC2A008CFCDF + 6BAF429D121AED31008CFCDF + 6BAF429F121AED31008CFCDF + 6BAF42A1121AED31008CFCDF + 6BAF42A3121AED31008CFCDF + 6BAF42A9121AEFD9008CFCDF + 6BAF42B5121AF141008CFCDF + 6BAF42B6121AF141008CFCDF + 6BAF42B7121AF141008CFCDF + 6BAF42B8121AF141008CFCDF + 6BAF42B9121AF141008CFCDF + 6BAF42BA121AF141008CFCDF + 6BAF42BB121AF141008CFCDF + 6BAF42BC121AF141008CFCDF + 6BAF42BD121AF141008CFCDF + 6BAF42BE121AF141008CFCDF + 6BAF42BF121AF141008CFCDF + 6BAF42C0121AF141008CFCDF + 6BAF42C7121AF27C008CFCDF + 6BAF42C8121AF27C008CFCDF + 6BAF42C9121AF27C008CFCDF + 6BAF42CA121AF27C008CFCDF + 6BAF42CB121AF27C008CFCDF + 6BAF42CC121AF27C008CFCDF + 6BAF42CD121AF27C008CFCDF + 6BAF42CE121AF27C008CFCDF + 6BAF42CF121AF27C008CFCDF + 6BBB4AD3115B4F3400CF791D + 6BAF42E4121AF3B8008CFCDF + 6BAF42E5121AF3B8008CFCDF + 6BAF42E6121AF3B8008CFCDF + 6BAF42E7121AF3B8008CFCDF + 6BAF42E8121AF3B8008CFCDF + 6BAF42FC121AF514008CFCDF + 6BAF42FD121AF514008CFCDF + 6BAF42FE121AF514008CFCDF + 6BAF42FF121AF514008CFCDF + 6BAF4300121AF514008CFCDF + 6BAF4301121AF514008CFCDF + 6BAF4302121AF514008CFCDF + 6BAF4303121AF514008CFCDF + 6BAF4304121AF514008CFCDF + 6BAF4309121AF6E0008CFCDF + 6BAF430E121AF7CD008CFCDF + 6BAF430F121AF7CD008CFCDF + 6BAF4310121AF7CD008CFCDF + 6BAF4311121AF7CD008CFCDF + 6BAF4312121AF7CD008CFCDF + 6BAF4313121AF7CD008CFCDF + 6BAF4314121AF7CD008CFCDF + 6BAF4327121AF998008CFCDF + 6BAF4328121AF998008CFCDF + 6BAF4329121AF998008CFCDF + 6BAF432A121AF998008CFCDF + 6BAF432B121AF998008CFCDF + 6BAF432C121AF998008CFCDF + 6BAF432D121AF998008CFCDF + 6BAF432E121AF998008CFCDF + 6BAF432F121AF998008CFCDF + 6BAF4330121AF998008CFCDF + 6BAF4331121AF998008CFCDF + 6BAF4332121AF998008CFCDF + 6BAF4333121AF998008CFCDF + 6BAF4334121AF998008CFCDF + 6BAF4335121AF998008CFCDF + 6BAF4336121AF998008CFCDF + 6BAF4337121AF998008CFCDF + 6BAF4338121AF998008CFCDF + 6BAF4339121AF998008CFCDF + 6BAF433A121AF998008CFCDF + 6BAF433B121AF998008CFCDF + 6BAF433C121AF998008CFCDF + 6BAF433D121AF998008CFCDF + 6BAF433E121AF998008CFCDF + 6BAF433F121AF998008CFCDF + 6BAF4340121AF998008CFCDF + 6BAF4341121AF998008CFCDF + 6BAF4342121AF998008CFCDF + 6BAF4348121AFD0B008CFCDF SplitCount @@ -591,18 +659,18 @@ GeometryConfiguration Frame - {{0, 0}, {994, 505}} + {{0, 0}, {994, 559}} RubberWindowFrame 0 59 1280 719 0 0 1280 778 Module PBXNavigatorGroup Proportion - 505pt + 559pt Proportion - 168pt + 114pt Tabs @@ -670,7 +738,7 @@ GeometryConfiguration Frame - {{10, 27}, {994, 141}} + {{10, 27}, {994, 87}} RubberWindowFrame 0 59 1280 719 0 0 1280 778 @@ -892,6 +960,8 @@ 5 WindowOrderList + 6BAF42D9121AF2AF008CFCDF + 6BAF42DA121AF2AF008CFCDF /Users/memon/Code/recastnavigation/RecastDemo/Build/Xcode/Recast.xcodeproj WindowString diff --git a/RecastDemo/Include/NavMeshTesterTool.h b/RecastDemo/Include/NavMeshTesterTool.h index c08c244..a394bb4 100644 --- a/RecastDemo/Include/NavMeshTesterTool.h +++ b/RecastDemo/Include/NavMeshTesterTool.h @@ -32,10 +32,13 @@ class NavMeshTesterTool : public SampleTool dtQueryFilter m_filter; + dtQueryState m_pathFindState; + enum ToolMode { - TOOLMODE_PATHFIND_ITER, + TOOLMODE_PATHFIND_FOLLOW, TOOLMODE_PATHFIND_STRAIGHT, + TOOLMODE_PATHFIND_SLICED, TOOLMODE_RAYCAST, TOOLMODE_DISTANCE_TO_WALL, TOOLMODE_FIND_POLYS_IN_CIRCLE, diff --git a/RecastDemo/Source/NavMeshTesterTool.cpp b/RecastDemo/Source/NavMeshTesterTool.cpp index 2ae5593..cce6302 100644 --- a/RecastDemo/Source/NavMeshTesterTool.cpp +++ b/RecastDemo/Source/NavMeshTesterTool.cpp @@ -145,7 +145,8 @@ NavMeshTesterTool::NavMeshTesterTool() : m_sample(0), m_navMesh(0), m_navQuery(0), - m_toolMode(TOOLMODE_PATHFIND_ITER), + m_pathFindState(DT_QUERY_FAILED), + m_toolMode(TOOLMODE_PATHFIND_FOLLOW), m_startRef(0), m_endRef(0), m_npolys(0), @@ -197,7 +198,9 @@ void NavMeshTesterTool::init(Sample* sample) m_navQuery->setAreaCost(SAMPLE_POLYAREA_JUMP, 1.5f); } - if (m_toolMode == TOOLMODE_PATHFIND_ITER || m_toolMode == TOOLMODE_PATHFIND_STRAIGHT) + if (m_toolMode == TOOLMODE_PATHFIND_FOLLOW || + m_toolMode == TOOLMODE_PATHFIND_STRAIGHT || + m_toolMode == TOOLMODE_PATHFIND_SLICED) { unsigned char flags = 0; if (m_navMesh) @@ -210,9 +213,9 @@ void NavMeshTesterTool::init(Sample* sample) void NavMeshTesterTool::handleMenu() { - if (imguiCheck("Pathfind Iter", m_toolMode == TOOLMODE_PATHFIND_ITER)) + if (imguiCheck("Pathfind Follow", m_toolMode == TOOLMODE_PATHFIND_FOLLOW)) { - m_toolMode = TOOLMODE_PATHFIND_ITER; + m_toolMode = TOOLMODE_PATHFIND_FOLLOW; recalc(); } if (imguiCheck("Pathfind Straight", m_toolMode == TOOLMODE_PATHFIND_STRAIGHT)) @@ -220,6 +223,11 @@ void NavMeshTesterTool::handleMenu() m_toolMode = TOOLMODE_PATHFIND_STRAIGHT; recalc(); } + if (imguiCheck("Pathfind Sliced", m_toolMode == TOOLMODE_PATHFIND_SLICED)) + { + m_toolMode = TOOLMODE_PATHFIND_SLICED; + recalc(); + } if (imguiCheck("Distance to Wall", m_toolMode == TOOLMODE_DISTANCE_TO_WALL)) { m_toolMode = TOOLMODE_DISTANCE_TO_WALL; @@ -301,7 +309,7 @@ void NavMeshTesterTool::handleMenu() imguiSeparator(); - if (m_toolMode == TOOLMODE_PATHFIND_ITER || m_toolMode == TOOLMODE_PATHFIND_STRAIGHT) + if (m_toolMode == TOOLMODE_PATHFIND_FOLLOW || m_toolMode == TOOLMODE_PATHFIND_STRAIGHT) { unsigned char flags = 0; if (m_navMesh) @@ -335,7 +343,7 @@ void NavMeshTesterTool::handleClick(const float* s, const float* p, bool shift) void NavMeshTesterTool::handleStep() { // TODO: merge separate to a path iterator. Use same code in recalc() too. - if (m_toolMode != TOOLMODE_PATHFIND_ITER) + if (m_toolMode != TOOLMODE_PATHFIND_FOLLOW) return; if (!m_sposSet || !m_eposSet || !m_startRef || !m_endRef) @@ -481,6 +489,34 @@ void NavMeshTesterTool::handleStep() void NavMeshTesterTool::handleUpdate(const float dt) { + if (m_pathFindState == DT_QUERY_RUNNING) + { + m_pathFindState = m_navQuery->updateSlicedFindPath(1); + } + + if (m_pathFindState == DT_QUERY_READY) + { + m_npolys = m_navQuery->finalizeSlicedFindPath(m_polys, MAX_POLYS); + m_nstraightPath = 0; + if (m_npolys) + { + // In case of partial path, make sure the end point is clamped to the last polygon. + float epos[3]; + dtVcopy(epos, m_epos); + if (m_polys[m_npolys-1] != m_endRef) + m_navQuery->closestPointOnPoly(m_polys[m_npolys-1], m_epos, epos); + + m_nstraightPath = m_navQuery->findStraightPath(m_spos, epos, m_polys, m_npolys, + m_straightPath, m_straightPathFlags, + m_straightPathPolys, MAX_POLYS); + } + + m_pathFindState = DT_QUERY_FAILED; + } + + + + } void NavMeshTesterTool::reset() @@ -511,7 +547,9 @@ void NavMeshTesterTool::recalc() else m_endRef = 0; - if (m_toolMode == TOOLMODE_PATHFIND_ITER) + m_pathFindState = DT_QUERY_FAILED; + + if (m_toolMode == TOOLMODE_PATHFIND_FOLLOW) { m_pathIterNum = 0; if (m_sposSet && m_eposSet && m_startRef && m_endRef) @@ -684,6 +722,26 @@ void NavMeshTesterTool::recalc() m_nstraightPath = 0; } } + else if (m_toolMode == TOOLMODE_PATHFIND_SLICED) + { + if (m_sposSet && m_eposSet && m_startRef && m_endRef) + { +#ifdef DUMP_REQS + printf("ps %f %f %f %f %f %f 0x%x 0x%x\n", + m_spos[0],m_spos[1],m_spos[2], m_epos[0],m_epos[1],m_epos[2], + m_filter.includeFlags, m_filter.excludeFlags); +#endif + m_npolys = 0; + m_nstraightPath = 0; + + m_pathFindState = m_navQuery->initSlicedFindPath(m_startRef, m_endRef, m_spos, m_epos, &m_filter); + } + else + { + m_npolys = 0; + m_nstraightPath = 0; + } + } else if (m_toolMode == TOOLMODE_RAYCAST) { m_nstraightPath = 0; @@ -855,7 +913,7 @@ void NavMeshTesterTool::handleRender() return; } - if (m_toolMode == TOOLMODE_PATHFIND_ITER) + if (m_toolMode == TOOLMODE_PATHFIND_FOLLOW) { duDebugDrawNavMeshPoly(&dd, *m_navMesh, m_startRef, startCol); duDebugDrawNavMeshPoly(&dd, *m_navMesh, m_endRef, endCol); @@ -910,7 +968,7 @@ void NavMeshTesterTool::handleRender() dd.depthMask(true); } } - else if (m_toolMode == TOOLMODE_PATHFIND_STRAIGHT) + else if (m_toolMode == TOOLMODE_PATHFIND_STRAIGHT || m_toolMode == TOOLMODE_PATHFIND_SLICED) { duDebugDrawNavMeshPoly(&dd, *m_navMesh, m_startRef, startCol); duDebugDrawNavMeshPoly(&dd, *m_navMesh, m_endRef, endCol);