diff --git a/Detour/Include/DetourCommon.h b/Detour/Include/DetourCommon.h index 87e6c1c..132f329 100644 --- a/Detour/Include/DetourCommon.h +++ b/Detour/Include/DetourCommon.h @@ -21,75 +21,75 @@ ////////////////////////////////////////////////////////////////////////////////////////// -template inline void swap(T& a, T& b) { T t = a; a = b; b = t; } -template inline T min(T a, T b) { return a < b ? a : b; } -template inline T max(T a, T b) { return a > b ? a : b; } -template inline T abs(T a) { return a < 0 ? -a : a; } -template inline T sqr(T a) { return a*a; } -template inline T clamp(T v, T mn, T mx) { return v < mn ? mn : (v > mx ? mx : v); } +template inline void dtSwap(T& a, T& b) { T t = a; a = b; b = t; } +template inline T dtMin(T a, T b) { return a < b ? a : b; } +template inline T dtMax(T a, T b) { return a > b ? a : b; } +template inline T dtAbs(T a) { return a < 0 ? -a : a; } +template inline T dtSqr(T a) { return a*a; } +template inline T dtClamp(T v, T mn, T mx) { return v < mn ? mn : (v > mx ? mx : v); } -inline void vcross(float* dest, const float* v1, const float* v2) +inline void dtVcross(float* dest, const float* v1, const float* v2) { dest[0] = v1[1]*v2[2] - v1[2]*v2[1]; dest[1] = v1[2]*v2[0] - v1[0]*v2[2]; dest[2] = v1[0]*v2[1] - v1[1]*v2[0]; } -inline float vdot(const float* v1, const float* v2) +inline float dtVdot(const float* v1, const float* v2) { return v1[0]*v2[0] + v1[1]*v2[1] + v1[2]*v2[2]; } -inline void vmad(float* dest, const float* v1, const float* v2, const float s) +inline void dtVmad(float* dest, const float* v1, const float* v2, const float s) { dest[0] = v1[0]+v2[0]*s; dest[1] = v1[1]+v2[1]*s; dest[2] = v1[2]+v2[2]*s; } -inline void vlerp(float* dest, const float* v1, const float* v2, const float t) +inline void dtVlerp(float* dest, const float* v1, const float* v2, const float t) { dest[0] = v1[0]+(v2[0]-v1[0])*t; dest[1] = v1[1]+(v2[1]-v1[1])*t; dest[2] = v1[2]+(v2[2]-v1[2])*t; } -inline void vadd(float* dest, const float* v1, const float* v2) +inline void dtVadd(float* dest, const float* v1, const float* v2) { dest[0] = v1[0]+v2[0]; dest[1] = v1[1]+v2[1]; dest[2] = v1[2]+v2[2]; } -inline void vsub(float* dest, const float* v1, const float* v2) +inline void dtVsub(float* dest, const float* v1, const float* v2) { dest[0] = v1[0]-v2[0]; dest[1] = v1[1]-v2[1]; dest[2] = v1[2]-v2[2]; } -inline void vmin(float* mn, const float* v) +inline void dtVmin(float* mn, const float* v) { - mn[0] = min(mn[0], v[0]); - mn[1] = min(mn[1], v[1]); - mn[2] = min(mn[2], v[2]); + mn[0] = dtMin(mn[0], v[0]); + mn[1] = dtMin(mn[1], v[1]); + mn[2] = dtMin(mn[2], v[2]); } -inline void vmax(float* mx, const float* v) +inline void dtVmax(float* mx, const float* v) { - mx[0] = max(mx[0], v[0]); - mx[1] = max(mx[1], v[1]); - mx[2] = max(mx[2], v[2]); + mx[0] = dtMax(mx[0], v[0]); + mx[1] = dtMax(mx[1], v[1]); + mx[2] = dtMax(mx[2], v[2]); } -inline void vcopy(float* dest, const float* a) +inline void dtVcopy(float* dest, const float* a) { dest[0] = a[0]; dest[1] = a[1]; dest[2] = a[2]; } -inline float vdist(const float* v1, const float* v2) +inline float dtVdist(const float* v1, const float* v2) { float dx = v2[0] - v1[0]; float dy = v2[1] - v1[1]; @@ -97,7 +97,7 @@ inline float vdist(const float* v1, const float* v2) return sqrtf(dx*dx + dy*dy + dz*dz); } -inline float vdistSqr(const float* v1, const float* v2) +inline float dtVdistSqr(const float* v1, const float* v2) { float dx = v2[0] - v1[0]; float dy = v2[1] - v1[1]; @@ -105,18 +105,18 @@ inline float vdistSqr(const float* v1, const float* v2) return dx*dx + dy*dy + dz*dz; } -inline void vnormalize(float* v) +inline void dtVnormalize(float* v) { - float d = 1.0f / sqrtf(sqr(v[0]) + sqr(v[1]) + sqr(v[2])); + float d = 1.0f / sqrtf(dtSqr(v[0]) + dtSqr(v[1]) + dtSqr(v[2])); v[0] *= d; v[1] *= d; v[2] *= d; } -inline bool vequal(const float* p0, const float* p1) +inline bool dtVequal(const float* p0, const float* p1) { - static const float thr = sqr(1.0f/16384.0f); - const float d = vdistSqr(p0, p1); + static const float thr = dtSqr(1.0f/16384.0f); + const float d = dtVdistSqr(p0, p1); return d < thr; } diff --git a/Detour/Source/DetourCommon.cpp b/Detour/Source/DetourCommon.cpp index ad99326..7016cf8 100644 --- a/Detour/Source/DetourCommon.cpp +++ b/Detour/Source/DetourCommon.cpp @@ -24,27 +24,27 @@ void closestPtPointTriangle(float* closest, const float* p, { // Check if P in vertex region outside A float ab[3], ac[3], ap[3]; - vsub(ab, b, a); - vsub(ac, c, a); - vsub(ap, p, a); - float d1 = vdot(ab, ap); - float d2 = vdot(ac, ap); + dtVsub(ab, b, a); + dtVsub(ac, c, a); + dtVsub(ap, p, a); + float d1 = dtVdot(ab, ap); + float d2 = dtVdot(ac, ap); if (d1 <= 0.0f && d2 <= 0.0f) { // barycentric coordinates (1,0,0) - vcopy(closest, a); + dtVcopy(closest, a); return; } // Check if P in vertex region outside B float bp[3]; - vsub(bp, p, b); - float d3 = vdot(ab, bp); - float d4 = vdot(ac, bp); + dtVsub(bp, p, b); + float d3 = dtVdot(ab, bp); + float d4 = dtVdot(ac, bp); if (d3 >= 0.0f && d4 <= d3) { // barycentric coordinates (0,1,0) - vcopy(closest, b); + dtVcopy(closest, b); return; } @@ -62,13 +62,13 @@ void closestPtPointTriangle(float* closest, const float* p, // Check if P in vertex region outside C float cp[3]; - vsub(cp, p, c); - float d5 = vdot(ab, cp); - float d6 = vdot(ac, cp); + dtVsub(cp, p, c); + float d5 = dtVdot(ab, cp); + float d6 = dtVdot(ac, cp); if (d6 >= 0.0f && d5 <= d6) { // barycentric coordinates (0,0,1) - vcopy(closest, c); + dtVcopy(closest, c); return; } @@ -118,16 +118,16 @@ bool intersectSegmentPoly2D(const float* p0, const float* p1, segMax = -1; float dir[3]; - vsub(dir, p1, p0); + dtVsub(dir, p1, p0); for (int i = 0, j = nverts-1; i < nverts; j=i++) { float edge[3], diff[3]; - vsub(edge, &verts[i*3], &verts[j*3]); - vsub(diff, p0, &verts[j*3]); + dtVsub(edge, &verts[i*3], &verts[j*3]); + dtVsub(diff, p0, &verts[j*3]); float n = vperp2D(edge, diff); float d = -vperp2D(edge, dir); - if (fabs(d) < EPS) + if (fabsf(d) < EPS) { // S is nearly parallel to this edge if (n < 0) @@ -202,9 +202,9 @@ void calcPolyCenter(float* tc, const unsigned short* idx, int nidx, const float* bool closestHeightPointTriangle(const float* p, const float* a, const float* b, const float* c, float& h) { float v0[3], v1[3], v2[3]; - vsub(v0, c,a); - vsub(v1, b,a); - vsub(v2, p,a); + dtVsub(v0, c,a); + dtVsub(v1, b,a); + dtVsub(v2, p,a); const float dot00 = vdot2D(v0, v0); const float dot01 = vdot2D(v0, v1); diff --git a/Detour/Source/DetourNavMesh.cpp b/Detour/Source/DetourNavMesh.cpp index 0a854ef..2e47aec 100644 --- a/Detour/Source/DetourNavMesh.cpp +++ b/Detour/Source/DetourNavMesh.cpp @@ -52,17 +52,17 @@ static void calcRect(const float* va, const float* vb, { if (side == 0 || side == 4) { - bmin[0] = min(va[2],vb[2]) + padx; - bmin[1] = min(va[1],vb[1]) - pady; - bmax[0] = max(va[2],vb[2]) - padx; - bmax[1] = max(va[1],vb[1]) + pady; + bmin[0] = dtMin(va[2],vb[2]) + padx; + bmin[1] = dtMin(va[1],vb[1]) - pady; + bmax[0] = dtMax(va[2],vb[2]) - padx; + bmax[1] = dtMax(va[1],vb[1]) + pady; } else if (side == 2 || side == 6) { - bmin[0] = min(va[0],vb[0]) + padx; - bmin[1] = min(va[1],vb[1]) - pady; - bmax[0] = max(va[0],vb[0]) - padx; - bmax[1] = max(va[1],vb[1]) + pady; + bmin[0] = dtMin(va[0],vb[0]) + padx; + bmin[1] = dtMin(va[1],vb[1]) - pady; + bmax[0] = dtMax(va[0],vb[0]) - padx; + bmax[1] = dtMax(va[1],vb[1]) + pady; } } @@ -141,7 +141,7 @@ dtNavMesh::~dtNavMesh() bool dtNavMesh::init(const dtNavMeshParams* params) { memcpy(&m_params, params, sizeof(dtNavMeshParams)); - vcopy(m_orig, params->orig); + dtVcopy(m_orig, params->orig); m_tileWidth = params->tileWidth; m_tileHeight = params->tileHeight; @@ -181,8 +181,8 @@ bool dtNavMesh::init(const dtNavMeshParams* params) } // Init ID generator values. - m_tileBits = max((unsigned int)1,ilog2(nextPow2((unsigned int)params->maxTiles))); - m_polyBits = max((unsigned int)1,ilog2(nextPow2((unsigned int)params->maxPolys))); + m_tileBits = dtMax((unsigned int)1,ilog2(nextPow2((unsigned int)params->maxTiles))); + m_polyBits = dtMax((unsigned int)1,ilog2(nextPow2((unsigned int)params->maxPolys))); m_saltBits = 32 - m_tileBits - m_polyBits; if (m_saltBits < 10) return false; @@ -200,7 +200,7 @@ bool dtNavMesh::init(unsigned char* data, int dataSize, int flags, int maxNodes) return false; dtNavMeshParams params; - vcopy(params.orig, header->bmin); + dtVcopy(params.orig, header->bmin); params.tileWidth = header->bmax[0] - header->bmin[0]; params.tileHeight = header->bmax[2] - header->bmin[2]; params.maxTiles = 1; @@ -250,8 +250,8 @@ int dtNavMesh::findConnectingPolys(const float* va, const float* vb, // Add return value. if (n < maxcon) { - conarea[n*2+0] = max(amin[0], bmin[0]); - conarea[n*2+1] = min(amax[0], bmax[0]); + conarea[n*2+0] = dtMax(amin[0], bmin[0]); + conarea[n*2+1] = dtMin(amax[0], bmax[0]); con[n] = base | (unsigned int)i; n++; } @@ -332,17 +332,17 @@ void dtNavMesh::connectExtLinks(dtMeshTile* tile, dtMeshTile* target, int side) // Compress portal limits to a byte value. if (side == 0 || side == 4) { - const float lmin = min(va[2], vb[2]); - const float lmax = max(va[2], vb[2]); - link->bmin = (unsigned char)(clamp((neia[k*2+0]-lmin)/(lmax-lmin), 0.0f, 1.0f)*255.0f); - link->bmax = (unsigned char)(clamp((neia[k*2+1]-lmin)/(lmax-lmin), 0.0f, 1.0f)*255.0f); + const float lmin = dtMin(va[2], vb[2]); + const float lmax = dtMax(va[2], vb[2]); + link->bmin = (unsigned char)(dtClamp((neia[k*2+0]-lmin)/(lmax-lmin), 0.0f, 1.0f)*255.0f); + link->bmax = (unsigned char)(dtClamp((neia[k*2+1]-lmin)/(lmax-lmin), 0.0f, 1.0f)*255.0f); } else if (side == 2 || side == 6) { - const float lmin = min(va[0], vb[0]); - const float lmax = max(va[0], vb[0]); - link->bmin = (unsigned char)(clamp((neia[k*2+0]-lmin)/(lmax-lmin), 0.0f, 1.0f)*255.0f); - link->bmax = (unsigned char)(clamp((neia[k*2+1]-lmin)/(lmax-lmin), 0.0f, 1.0f)*255.0f); + const float lmin = dtMin(va[0], vb[0]); + const float lmax = dtMax(va[0], vb[0]); + link->bmin = (unsigned char)(dtClamp((neia[k*2+0]-lmin)/(lmax-lmin), 0.0f, 1.0f)*255.0f); + link->bmax = (unsigned char)(dtClamp((neia[k*2+1]-lmin)/(lmax-lmin), 0.0f, 1.0f)*255.0f); } } } @@ -375,11 +375,11 @@ void dtNavMesh::connectExtOffMeshLinks(dtMeshTile* tile, dtMeshTile* target, int dtPolyRef ref = findNearestPolyInTile(tile, p, ext, &defaultFilter, nearestPt); if (!ref) continue; // findNearestPoly may return too optimistic results, further check to make sure. - if (sqr(nearestPt[0]-p[0])+sqr(nearestPt[2]-p[2]) > sqr(targetCon->rad)) + if (dtSqr(nearestPt[0]-p[0])+dtSqr(nearestPt[2]-p[2]) > dtSqr(targetCon->rad)) continue; // Make sure the location is on current mesh. float* v = &target->verts[targetPoly->verts[1]*3]; - vcopy(v, nearestPt); + dtVcopy(v, nearestPt); // Link off-mesh connection to target poly. unsigned int idx = allocLink(target); @@ -481,11 +481,11 @@ void dtNavMesh::connectIntOffMeshLinks(dtMeshTile* tile) dtPolyRef ref = findNearestPolyInTile(tile, p, ext, &defaultFilter, nearestPt); if (!ref) continue; // findNearestPoly may return too optimistic results, further check to make sure. - if (sqr(nearestPt[0]-p[0])+sqr(nearestPt[2]-p[2]) > sqr(con->rad)) + if (dtSqr(nearestPt[0]-p[0])+dtSqr(nearestPt[2]-p[2]) > dtSqr(con->rad)) continue; // Make sure the location is on current mesh. float* v = &tile->verts[poly->verts[j]*3]; - vcopy(v, nearestPt); + dtVcopy(v, nearestPt); // Link off-mesh connection to target poly. unsigned int idx = allocLink(tile); @@ -927,10 +927,10 @@ bool dtNavMesh::closestPointOnPolyInTile(const dtMeshTile* tile, unsigned int ip } float pt[3]; closestPtPointTriangle(pt, pos, v[0], v[1], v[2]); - float d = vdistSqr(pos, pt); + float d = dtVdistSqr(pos, pt); if (d < closestDistSqr) { - vcopy(closest, pt); + dtVcopy(closest, pt); closestDistSqr = d; } } @@ -956,7 +956,7 @@ bool dtNavMesh::closestPointOnPolyBoundary(dtPolyRef ref, const float* pos, floa int nv = 0; for (int i = 0; i < (int)poly->vertCount; ++i) { - vcopy(&verts[nv*3], &tile->verts[poly->verts[i]*3]); + dtVcopy(&verts[nv*3], &tile->verts[poly->verts[i]*3]); nv++; } @@ -964,11 +964,11 @@ bool dtNavMesh::closestPointOnPolyBoundary(dtPolyRef ref, const float* pos, floa if (inside) { // Point is inside the polygon, return the point. - vcopy(closest, pos); + dtVcopy(closest, pos); } else { - // Point is outside the polygon, clamp to nearest edge. + // Point is outside the polygon, dtClamp to nearest edge. float dmin = FLT_MAX; int imin = -1; for (int i = 0; i < nv; ++i) @@ -981,7 +981,7 @@ bool dtNavMesh::closestPointOnPolyBoundary(dtPolyRef ref, const float* pos, floa } const float* va = &verts[imin*3]; const float* vb = &verts[((imin+1)%nv)*3]; - vlerp(closest, va, vb, edget[imin]); + dtVlerp(closest, va, vb, edget[imin]); } return true; @@ -1021,8 +1021,8 @@ bool dtNavMesh::getOffMeshConnectionPolyEndPoints(dtPolyRef prevRef, dtPolyRef p } } - vcopy(startPos, &tile->verts[poly->verts[idx0]*3]); - vcopy(endPos, &tile->verts[poly->verts[idx1]*3]); + dtVcopy(startPos, &tile->verts[poly->verts[idx0]*3]); + dtVcopy(endPos, &tile->verts[poly->verts[idx1]*3]); return true; } @@ -1043,8 +1043,8 @@ bool dtNavMesh::getPolyHeight(dtPolyRef ref, const float* pos, float* height) co { const float* v0 = &tile->verts[poly->verts[0]*3]; const float* v1 = &tile->verts[poly->verts[1]*3]; - const float d0 = vdist(pos, v0); - const float d1 = vdist(pos, v1); + 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; @@ -1105,11 +1105,11 @@ dtPolyRef dtNavMesh::findNearestPoly(const float* center, const float* extents, float closestPtPoly[3]; if (!closestPointOnPoly(ref, center, closestPtPoly)) continue; - float d = vdistSqr(center, closestPtPoly); + float d = dtVdistSqr(center, closestPtPoly); if (d < nearestDistanceSqr) { if (nearestPt) - vcopy(nearestPt, closestPtPoly); + dtVcopy(nearestPt, closestPtPoly); nearestDistanceSqr = d; nearest = ref; } @@ -1122,8 +1122,8 @@ dtPolyRef dtNavMesh::findNearestPolyInTile(dtMeshTile* tile, const float* center dtQueryFilter* filter, float* nearestPt) { float bmin[3], bmax[3]; - vsub(bmin, center, extents); - vadd(bmax, center, extents); + dtVsub(bmin, center, extents); + dtVadd(bmax, center, extents); // Get nearby polygons from proximity grid. dtPolyRef polys[128]; @@ -1138,11 +1138,11 @@ dtPolyRef dtNavMesh::findNearestPolyInTile(dtMeshTile* tile, const float* center float closestPtPoly[3]; if (!closestPointOnPolyInTile(tile, decodePolyIdPoly(ref), center, closestPtPoly)) continue; - float d = vdistSqr(center, closestPtPoly); + float d = dtVdistSqr(center, closestPtPoly); if (d < nearestDistanceSqr) { if (nearestPt) - vcopy(nearestPt, closestPtPoly); + dtVcopy(nearestPt, closestPtPoly); nearestDistanceSqr = d; nearest = ref; } @@ -1165,13 +1165,13 @@ int dtNavMesh::queryPolygonsInTile(dtMeshTile* tile, const float* qmin, const fl // Calculate quantized box unsigned short bmin[3], bmax[3]; - // Clamp query box to world box. - float minx = clamp(qmin[0], tbmin[0], tbmax[0]) - tbmin[0]; - float miny = clamp(qmin[1], tbmin[1], tbmax[1]) - tbmin[1]; - float minz = clamp(qmin[2], tbmin[2], tbmax[2]) - tbmin[2]; - float maxx = clamp(qmax[0], tbmin[0], tbmax[0]) - tbmin[0]; - float maxy = clamp(qmax[1], tbmin[1], tbmax[1]) - tbmin[1]; - float maxz = clamp(qmax[2], tbmin[2], tbmax[2]) - tbmin[2]; + // 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; @@ -1218,13 +1218,13 @@ int dtNavMesh::queryPolygonsInTile(dtMeshTile* tile, const float* qmin, const fl // Calc polygon bounds. dtPoly* p = &tile->polys[i]; const float* v = &tile->verts[p->verts[0]*3]; - vcopy(bmin, v); - vcopy(bmax, v); + dtVcopy(bmin, v); + dtVcopy(bmax, v); for (int j = 1; j < p->vertCount; ++j) { v = &tile->verts[p->verts[j]*3]; - vmin(bmin, v); - vmax(bmax, v); + dtVmin(bmin, v); + dtVmax(bmax, v); } if (overlapBoxes(qmin,qmax, bmin,bmax)) { @@ -1243,8 +1243,8 @@ int dtNavMesh::queryPolygons(const float* center, const float* extents, dtQueryF dtPolyRef* polys, const int maxPolys) { float bmin[3], bmax[3]; - vsub(bmin, center, extents); - vadd(bmax, center, extents); + dtVsub(bmin, center, extents); + dtVadd(bmax, center, extents); // Find tiles the query touches. const int minx = (int)floorf((bmin[0]-m_orig[0]) / m_tileWidth); @@ -1298,7 +1298,7 @@ int dtNavMesh::findPath(dtPolyRef startRef, dtPolyRef endRef, dtNode* startNode = m_nodePool->getNode(startRef); startNode->pidx = 0; startNode->cost = 0; - startNode->total = vdist(startPos, endPos) * H_SCALE; + startNode->total = dtVdist(startPos, endPos) * H_SCALE; startNode->id = startRef; startNode->flags = DT_NODE_OPEN; m_openList->push(startNode); @@ -1350,7 +1350,7 @@ int dtNavMesh::findPath(dtPolyRef startRef, dtPolyRef endRef, } else { - vcopy(previousEdgeMidPoint, startPos); + dtVcopy(previousEdgeMidPoint, startPos); } for (unsigned int i = bestPoly->firstLink; i != DT_NULL_LINK; i = bestTile->links[i].next) @@ -1387,8 +1387,8 @@ int dtNavMesh::findPath(dtPolyRef startRef, dtPolyRef endRef, { // Cost newNode.cost = bestNode->cost + - vdist(previousEdgeMidPoint,edgeMidPoint) * m_areaCost[bestPoly->area] + - vdist(edgeMidPoint, endPos) * m_areaCost[neighbourPoly->area]; + dtVdist(previousEdgeMidPoint,edgeMidPoint) * m_areaCost[bestPoly->area] + + dtVdist(edgeMidPoint, endPos) * m_areaCost[neighbourPoly->area]; // Heuristic h = 0; } @@ -1396,9 +1396,9 @@ int dtNavMesh::findPath(dtPolyRef startRef, dtPolyRef endRef, { // Cost newNode.cost = bestNode->cost + - vdist(previousEdgeMidPoint,edgeMidPoint) * m_areaCost[bestPoly->area]; + dtVdist(previousEdgeMidPoint,edgeMidPoint) * m_areaCost[bestPoly->area]; // Heuristic - h = vdist(edgeMidPoint,endPos)*H_SCALE; + h = dtVdist(edgeMidPoint,endPos)*H_SCALE; } newNode.total = newNode.cost + h; @@ -1484,7 +1484,7 @@ int dtNavMesh::findStraightPath(const float* startPos, const float* endPos, return 0; // Add start point. - vcopy(&straightPath[straightPathSize*3], closestStartPos); + dtVcopy(&straightPath[straightPathSize*3], closestStartPos); if (straightPathFlags) straightPathFlags[straightPathSize] = DT_STRAIGHTPATH_START; if (straightPathRefs) @@ -1500,9 +1500,9 @@ int dtNavMesh::findStraightPath(const float* startPos, const float* endPos, if (pathSize > 1) { float portalApex[3], portalLeft[3], portalRight[3]; - vcopy(portalApex, closestStartPos); - vcopy(portalLeft, portalApex); - vcopy(portalRight, portalApex); + dtVcopy(portalApex, closestStartPos); + dtVcopy(portalLeft, portalApex); + dtVcopy(portalRight, portalApex); int apexIndex = 0; int leftIndex = 0; int rightIndex = 0; @@ -1526,7 +1526,7 @@ int dtNavMesh::findStraightPath(const float* startPos, const float* endPos, if (!closestPointOnPolyBoundary(path[i], endPos, closestEndPos)) return 0; - vcopy(&straightPath[straightPathSize*3], closestEndPos); + dtVcopy(&straightPath[straightPathSize*3], closestEndPos); if (straightPathFlags) straightPathFlags[straightPathSize] = 0; if (straightPathRefs) @@ -1547,8 +1547,8 @@ int dtNavMesh::findStraightPath(const float* startPos, const float* endPos, else { // End of the path. - vcopy(left, closestEndPos); - vcopy(right, closestEndPos); + dtVcopy(left, closestEndPos); + dtVcopy(right, closestEndPos); fromType = toType = DT_POLYTYPE_GROUND; } @@ -1556,16 +1556,16 @@ int dtNavMesh::findStraightPath(const float* startPos, const float* endPos, // Right vertex. if (triArea2D(portalApex, portalRight, right) <= 0.0f) { - if (vequal(portalApex, portalRight) || triArea2D(portalApex, portalLeft, right) > 0.0f) + if (dtVequal(portalApex, portalRight) || triArea2D(portalApex, portalLeft, right) > 0.0f) { - vcopy(portalRight, right); + dtVcopy(portalRight, right); rightPolyRef = (i+1 < pathSize) ? path[i+1] : 0; rightPolyType = toType; rightIndex = i; } else { - vcopy(portalApex, portalLeft); + dtVcopy(portalApex, portalLeft); apexIndex = leftIndex; unsigned char flags = 0; @@ -1575,10 +1575,10 @@ int dtNavMesh::findStraightPath(const float* startPos, const float* endPos, flags = DT_STRAIGHTPATH_OFFMESH_CONNECTION; dtPolyRef ref = leftPolyRef; - if (!vequal(&straightPath[(straightPathSize-1)*3], portalApex)) + if (!dtVequal(&straightPath[(straightPathSize-1)*3], portalApex)) { // Append new vertex. - vcopy(&straightPath[straightPathSize*3], portalApex); + dtVcopy(&straightPath[straightPathSize*3], portalApex); if (straightPathFlags) straightPathFlags[straightPathSize] = flags; if (straightPathRefs) @@ -1597,8 +1597,8 @@ int dtNavMesh::findStraightPath(const float* startPos, const float* endPos, straightPathRefs[straightPathSize-1] = ref; } - vcopy(portalLeft, portalApex); - vcopy(portalRight, portalApex); + dtVcopy(portalLeft, portalApex); + dtVcopy(portalRight, portalApex); leftIndex = apexIndex; rightIndex = apexIndex; @@ -1612,16 +1612,16 @@ int dtNavMesh::findStraightPath(const float* startPos, const float* endPos, // Left vertex. if (triArea2D(portalApex, portalLeft, left) >= 0.0f) { - if (vequal(portalApex, portalLeft) || triArea2D(portalApex, portalRight, left) < 0.0f) + if (dtVequal(portalApex, portalLeft) || triArea2D(portalApex, portalRight, left) < 0.0f) { - vcopy(portalLeft, left); + dtVcopy(portalLeft, left); leftPolyRef = (i+1 < pathSize) ? path[i+1] : 0; leftPolyType = toType; leftIndex = i; } else { - vcopy(portalApex, portalRight); + dtVcopy(portalApex, portalRight); apexIndex = rightIndex; unsigned char flags = 0; @@ -1631,10 +1631,10 @@ int dtNavMesh::findStraightPath(const float* startPos, const float* endPos, flags = DT_STRAIGHTPATH_OFFMESH_CONNECTION; dtPolyRef ref = rightPolyRef; - if (!vequal(&straightPath[(straightPathSize-1)*3], portalApex)) + if (!dtVequal(&straightPath[(straightPathSize-1)*3], portalApex)) { // Append new vertex. - vcopy(&straightPath[straightPathSize*3], portalApex); + dtVcopy(&straightPath[straightPathSize*3], portalApex); if (straightPathFlags) straightPathFlags[straightPathSize] = flags; if (straightPathRefs) @@ -1653,8 +1653,8 @@ int dtNavMesh::findStraightPath(const float* startPos, const float* endPos, straightPathRefs[straightPathSize-1] = ref; } - vcopy(portalLeft, portalApex); - vcopy(portalRight, portalApex); + dtVcopy(portalLeft, portalApex); + dtVcopy(portalRight, portalApex); leftIndex = apexIndex; rightIndex = apexIndex; @@ -1668,13 +1668,13 @@ int dtNavMesh::findStraightPath(const float* startPos, const float* endPos, } // If the point already exists, remove it and add reappend the actual end location. - if (straightPathSize && vequal(&straightPath[(straightPathSize-1)*3], closestEndPos)) + if (straightPathSize && dtVequal(&straightPath[(straightPathSize-1)*3], closestEndPos)) straightPathSize--; // Add end point. if (straightPathSize < maxStraightPathSize) { - vcopy(&straightPath[straightPathSize*3], closestEndPos); + dtVcopy(&straightPath[straightPathSize*3], closestEndPos); if (straightPathFlags) straightPathFlags[straightPathSize] = DT_STRAIGHTPATH_END; if (straightPathRefs) @@ -1700,7 +1700,7 @@ int dtNavMesh::moveAlongPathCorridor(const float* startPos, const float* endPos, static const float SLOP = 0.01f; - vcopy(resultPos, startPos); + dtVcopy(resultPos, startPos); while (n < pathSize) { @@ -1722,7 +1722,7 @@ int dtNavMesh::moveAlongPathCorridor(const float* startPos, const float* endPos, unsigned char fromType, toType; if (!getPortalPoints(path[n], path[n+1], left, right, fromType, toType)) return n; - vcopy(resultPos, endPos); + dtVcopy(resultPos, endPos); } return n+1; } @@ -1731,7 +1731,7 @@ int dtNavMesh::moveAlongPathCorridor(const float* startPos, const float* endPos, int nv = 0; for (int i = 0; i < (int)poly->vertCount; ++i) { - vcopy(&verts[nv*3], &tile->verts[poly->verts[i]*3]); + dtVcopy(&verts[nv*3], &tile->verts[poly->verts[i]*3]); nv++; } @@ -1739,7 +1739,7 @@ int dtNavMesh::moveAlongPathCorridor(const float* startPos, const float* endPos, if (inside) { // The end point is inside the current polygon. - vcopy(resultPos, endPos); + dtVcopy(resultPos, endPos); return n; } @@ -1757,7 +1757,7 @@ int dtNavMesh::moveAlongPathCorridor(const float* startPos, const float* endPos, } const float* va = &verts[imin*3]; const float* vb = &verts[((imin+1)%nv)*3]; - vlerp(resultPos, va, vb, edget[imin]); + dtVlerp(resultPos, va, vb, edget[imin]); // Check to see if the point is on the portal edge to the next polygon. if (n+1 >= pathSize) @@ -1767,7 +1767,7 @@ int dtNavMesh::moveAlongPathCorridor(const float* startPos, const float* endPos, unsigned char fromType, toType; if (!getPortalPoints(path[n], path[n+1], left, right, fromType, toType)) return n; - // If the clamped point is close to the next portal edge, advance to next poly. + // If the dtClamped point is close to the next portal edge, advance to next poly. float t; float d = distancePtSegSqr2D(resultPos, left, right, t); if (d > SLOP*SLOP) @@ -1831,8 +1831,8 @@ bool dtNavMesh::getPortalPoints(dtPolyRef from, const dtPoly* fromPoly, const dt if (fromTile->links[i].ref == to) { const int v = fromTile->links[i].edge; - vcopy(left, &fromTile->verts[fromPoly->verts[v]*3]); - vcopy(right, &fromTile->verts[fromPoly->verts[v]*3]); + dtVcopy(left, &fromTile->verts[fromPoly->verts[v]*3]); + dtVcopy(right, &fromTile->verts[fromPoly->verts[v]*3]); return true; } } @@ -1846,8 +1846,8 @@ bool dtNavMesh::getPortalPoints(dtPolyRef from, const dtPoly* fromPoly, const dt if (toTile->links[i].ref == from) { const int v = toTile->links[i].edge; - vcopy(left, &toTile->verts[toPoly->verts[v]*3]); - vcopy(right, &toTile->verts[toPoly->verts[v]*3]); + dtVcopy(left, &toTile->verts[toPoly->verts[v]*3]); + dtVcopy(right, &toTile->verts[toPoly->verts[v]*3]); return true; } } @@ -1857,36 +1857,36 @@ bool dtNavMesh::getPortalPoints(dtPolyRef from, const dtPoly* fromPoly, const dt // Find portal vertices. const int v0 = fromPoly->verts[link->edge]; const int v1 = fromPoly->verts[(link->edge+1) % (int)fromPoly->vertCount]; - vcopy(left, &fromTile->verts[v0*3]); - vcopy(right, &fromTile->verts[v1*3]); + dtVcopy(left, &fromTile->verts[v0*3]); + dtVcopy(right, &fromTile->verts[v1*3]); - // If the link is at tile boundary, clamp the vertices to + // If the link is at tile boundary, dtClamp the vertices to // the link width. if (link->side == 0 || link->side == 4) { // Unpack portal limits. - const float smin = min(left[2],right[2]); - const float smax = max(left[2],right[2]); + const float smin = dtMin(left[2],right[2]); + const float smax = dtMax(left[2],right[2]); const float s = (smax-smin) / 255.0f; const float lmin = smin + link->bmin*s; const float lmax = smin + link->bmax*s; - left[2] = max(left[2],lmin); - left[2] = min(left[2],lmax); - right[2] = max(right[2],lmin); - right[2] = min(right[2],lmax); + left[2] = dtMax(left[2],lmin); + left[2] = dtMin(left[2],lmax); + right[2] = dtMax(right[2],lmin); + right[2] = dtMin(right[2],lmax); } else if (link->side == 2 || link->side == 6) { // Unpack portal limits. - const float smin = min(left[0],right[0]); - const float smax = max(left[0],right[0]); + const float smin = dtMin(left[0],right[0]); + const float smax = dtMax(left[0],right[0]); const float s = (smax-smin) / 255.0f; const float lmin = smin + link->bmin*s; const float lmax = smin + link->bmax*s; - left[0] = max(left[0],lmin); - left[0] = min(left[0],lmax); - right[0] = max(right[0],lmin); - right[0] = min(right[0],lmax); + left[0] = dtMax(left[0],lmin); + left[0] = dtMin(left[0],lmax); + right[0] = dtMax(right[0],lmin); + right[0] = dtMin(right[0],lmax); } return true; @@ -1996,7 +1996,7 @@ int dtNavMesh::raycast(dtPolyRef centerRef, const float* startPos, const float* int nv = 0; for (int i = 0; i < (int)poly->vertCount; ++i) { - vcopy(&verts[nv*3], &tile->verts[poly->verts[i]*3]); + dtVcopy(&verts[nv*3], &tile->verts[poly->verts[i]*3]); nv++; } @@ -2047,8 +2047,8 @@ int dtNavMesh::raycast(dtPolyRef centerRef, const float* startPos, const float* if (link->side == 0 || link->side == 4) { // Calculate link size. - const float smin = min(left[2],right[2]); - const float smax = max(left[2],right[2]); + const float smin = dtMin(left[2],right[2]); + const float smax = dtMax(left[2],right[2]); const float s = (smax-smin) / 255.0f; const float lmin = smin + link->bmin*s; const float lmax = smin + link->bmax*s; @@ -2063,8 +2063,8 @@ int dtNavMesh::raycast(dtPolyRef centerRef, const float* startPos, const float* else if (link->side == 2 || link->side == 6) { // Calculate link size. - const float smin = min(left[0],right[0]); - const float smax = max(left[0],right[0]); + const float smin = dtMin(left[0],right[0]); + const float smax = dtMax(left[0],right[0]); const float s = (smax-smin) / 255.0f; const float lmin = smin + link->bmin*s; const float lmax = smin + link->bmax*s; @@ -2093,7 +2093,7 @@ int dtNavMesh::raycast(dtPolyRef centerRef, const float* startPos, const float* hitNormal[0] = dz; hitNormal[1] = 0; hitNormal[2] = -dx; - vnormalize(hitNormal); + dtVnormalize(hitNormal); return n; } @@ -2136,7 +2136,7 @@ int dtNavMesh::findPolysAround(dtPolyRef centerRef, const float* centerPos, floa ++n; } - const float radiusSqr = sqr(radius); + const float radiusSqr = dtSqr(radius); unsigned int it, ip; @@ -2172,7 +2172,7 @@ int dtNavMesh::findPolysAround(dtPolyRef centerRef, const float* centerPos, floa } else { - vcopy(previousEdgeMidPoint, centerPos); + dtVcopy(previousEdgeMidPoint, centerPos); } for (unsigned int i = bestPoly->firstLink; i != DT_NULL_LINK; i = bestTile->links[i].next) @@ -2211,7 +2211,7 @@ int dtNavMesh::findPolysAround(dtPolyRef centerRef, const float* centerPos, floa getEdgeMidPoint(bestRef, bestPoly, bestTile, neighbourRef, neighbourPoly, neighbourTile, edgeMidPoint); - newNode.total = bestNode->total + vdist(previousEdgeMidPoint, edgeMidPoint); + newNode.total = bestNode->total + dtVdist(previousEdgeMidPoint, edgeMidPoint); dtNode* actualNode = m_nodePool->getNode(newNode.id); if (!actualNode) @@ -2268,7 +2268,7 @@ float dtNavMesh::findDistanceToWall(dtPolyRef centerRef, const float* centerPos, startNode->flags = DT_NODE_OPEN; m_openList->push(startNode); - float radiusSqr = sqr(maxRadius); + float radiusSqr = dtSqr(maxRadius); unsigned int it, ip; @@ -2304,7 +2304,7 @@ float dtNavMesh::findDistanceToWall(dtPolyRef centerRef, const float* centerPos, } else { - vcopy(previousEdgeMidPoint, centerPos); + dtVcopy(previousEdgeMidPoint, centerPos); } // Hit test walls. @@ -2387,7 +2387,7 @@ float dtNavMesh::findDistanceToWall(dtPolyRef centerRef, const float* centerPos, getEdgeMidPoint(bestRef, bestPoly, bestTile, neighbourRef, neighbourPoly, neighbourTile, edgeMidPoint); - newNode.total = bestNode->total + vdist(previousEdgeMidPoint, edgeMidPoint); + newNode.total = bestNode->total + dtVdist(previousEdgeMidPoint, edgeMidPoint); dtNode* actualNode = m_nodePool->getNode(newNode.id); if (!actualNode) @@ -2414,8 +2414,8 @@ float dtNavMesh::findDistanceToWall(dtPolyRef centerRef, const float* centerPos, } // Calc hit normal. - vsub(hitNormal, centerPos, hitPos); - vnormalize(hitNormal); + dtVsub(hitNormal, centerPos, hitPos); + dtVnormalize(hitNormal); return sqrtf(radiusSqr); } diff --git a/Detour/Source/DetourNavMeshBuilder.cpp b/Detour/Source/DetourNavMeshBuilder.cpp index 3a9a7a5..ce9ed47 100644 --- a/Detour/Source/DetourNavMeshBuilder.cpp +++ b/Detour/Source/DetourNavMeshBuilder.cpp @@ -375,8 +375,8 @@ bool dtCreateNavMeshData(dtNavMeshCreateParams* params, unsigned char** outData, header->polyCount = totPolyCount; header->vertCount = totVertCount; header->maxLinkCount = maxLinkCount; - vcopy(header->bmin, params->bmin); - vcopy(header->bmax, params->bmax); + dtVcopy(header->bmin, params->bmin); + dtVcopy(header->bmax, params->bmax); header->detailMeshCount = params->polyCount; header->detailVertCount = uniqueDetailVertCount; header->detailTriCount = params->detailTriCount; @@ -410,8 +410,8 @@ bool dtCreateNavMeshData(dtNavMeshCreateParams* params, unsigned char** outData, { const float* linkv = ¶ms->offMeshConVerts[i*2*3]; float* v = &navVerts[(offMeshVertsBase + n*2)*3]; - vcopy(&v[0], &linkv[0]); - vcopy(&v[3], &linkv[3]); + dtVcopy(&v[0], &linkv[0]); + dtVcopy(&v[3], &linkv[3]); n++; } } @@ -519,8 +519,8 @@ bool dtCreateNavMeshData(dtNavMeshCreateParams* params, unsigned char** outData, con->poly = (unsigned short)(offMeshPolyBase + n); // Copy connection end-points. const float* endPts = ¶ms->offMeshConVerts[i*2*3]; - vcopy(&con->pos[0], &endPts[0]); - vcopy(&con->pos[3], &endPts[3]); + dtVcopy(&con->pos[0], &endPts[0]); + dtVcopy(&con->pos[3], &endPts[3]); con->rad = params->offMeshConRad[i]; con->flags = params->offMeshConDir[i] ? DT_OFFMESH_CON_BIDIR : 0; con->side = offMeshConClass[i*2+1]; diff --git a/Recast/Include/Recast.h b/Recast/Include/Recast.h index 050a772..7c75d9f 100644 --- a/Recast/Include/Recast.h +++ b/Recast/Include/Recast.h @@ -300,61 +300,61 @@ template inline T rcSqr(T a) { return a*a; } template inline T rcClamp(T v, T mn, T mx) { return v < mn ? mn : (v > mx ? mx : v); } // Common vector helper functions. -inline void vcross(float* dest, const float* v1, const float* v2) +inline void rcVcross(float* dest, const float* v1, const float* v2) { dest[0] = v1[1]*v2[2] - v1[2]*v2[1]; dest[1] = v1[2]*v2[0] - v1[0]*v2[2]; dest[2] = v1[0]*v2[1] - v1[1]*v2[0]; } -inline float vdot(const float* v1, const float* v2) +inline float rcVdot(const float* v1, const float* v2) { return v1[0]*v2[0] + v1[1]*v2[1] + v1[2]*v2[2]; } -inline void vmad(float* dest, const float* v1, const float* v2, const float s) +inline void rcVmad(float* dest, const float* v1, const float* v2, const float s) { dest[0] = v1[0]+v2[0]*s; dest[1] = v1[1]+v2[1]*s; dest[2] = v1[2]+v2[2]*s; } -inline void vadd(float* dest, const float* v1, const float* v2) +inline void rcVadd(float* dest, const float* v1, const float* v2) { dest[0] = v1[0]+v2[0]; dest[1] = v1[1]+v2[1]; dest[2] = v1[2]+v2[2]; } -inline void vsub(float* dest, const float* v1, const float* v2) +inline void rcVsub(float* dest, const float* v1, const float* v2) { dest[0] = v1[0]-v2[0]; dest[1] = v1[1]-v2[1]; dest[2] = v1[2]-v2[2]; } -inline void vmin(float* mn, const float* v) +inline void rcVmin(float* mn, const float* v) { mn[0] = rcMin(mn[0], v[0]); mn[1] = rcMin(mn[1], v[1]); mn[2] = rcMin(mn[2], v[2]); } -inline void vmax(float* mx, const float* v) +inline void rcVmax(float* mx, const float* v) { mx[0] = rcMax(mx[0], v[0]); mx[1] = rcMax(mx[1], v[1]); mx[2] = rcMax(mx[2], v[2]); } -inline void vcopy(float* dest, const float* v) +inline void rcVcopy(float* dest, const float* v) { dest[0] = v[0]; dest[1] = v[1]; dest[2] = v[2]; } -inline float vdist(const float* v1, const float* v2) +inline float rcVdist(const float* v1, const float* v2) { float dx = v2[0] - v1[0]; float dy = v2[1] - v1[1]; @@ -362,7 +362,7 @@ inline float vdist(const float* v1, const float* v2) return sqrtf(dx*dx + dy*dy + dz*dz); } -inline float vdistSqr(const float* v1, const float* v2) +inline float rcVdistSqr(const float* v1, const float* v2) { float dx = v2[0] - v1[0]; float dy = v2[1] - v1[1]; @@ -370,7 +370,7 @@ inline float vdistSqr(const float* v1, const float* v2) return dx*dx + dy*dy + dz*dz; } -inline void vnormalize(float* v) +inline void rcVnormalize(float* v) { float d = 1.0f / sqrtf(rcSqr(v[0]) + rcSqr(v[1]) + rcSqr(v[2])); v[0] *= d; @@ -378,10 +378,10 @@ inline void vnormalize(float* v) v[2] *= d; } -inline bool vequal(const float* p0, const float* p1) +inline bool rcVequal(const float* p0, const float* p1) { static const float thr = rcSqr(1.0f/16384.0f); - const float d = vdistSqr(p0, p1); + const float d = rcVdistSqr(p0, p1); return d < thr; } diff --git a/Recast/Source/Recast.cpp b/Recast/Source/Recast.cpp index f039ed1..9fed737 100644 --- a/Recast/Source/Recast.cpp +++ b/Recast/Source/Recast.cpp @@ -44,13 +44,13 @@ void rcIntArray::resize(int n) void rcCalcBounds(const float* verts, int nv, float* bmin, float* bmax) { // Calculate bounding box. - vcopy(bmin, verts); - vcopy(bmax, verts); + rcVcopy(bmin, verts); + rcVcopy(bmax, verts); for (int i = 1; i < nv; ++i) { const float* v = &verts[i*3]; - vmin(bmin, v); - vmax(bmax, v); + rcVmin(bmin, v); + rcVmax(bmax, v); } } @@ -67,8 +67,8 @@ bool rcCreateHeightfield(rcHeightfield& hf, int width, int height, hf.width = width; hf.height = height; hf.spans = new rcSpan*[hf.width*hf.height]; - vcopy(hf.bmin, bmin); - vcopy(hf.bmax, bmax); + rcVcopy(hf.bmin, bmin); + rcVcopy(hf.bmax, bmax); hf.cs = cs; hf.ch = ch; if (!hf.spans) @@ -80,10 +80,10 @@ bool rcCreateHeightfield(rcHeightfield& hf, int width, int height, static void calcTriNormal(const float* v0, const float* v1, const float* v2, float* norm) { float e0[3], e1[3]; - vsub(e0, v1, v0); - vsub(e1, v2, v0); - vcross(norm, e0, e1); - vnormalize(norm); + rcVsub(e0, v1, v0); + rcVsub(e1, v2, v0); + rcVcross(norm, e0, e1); + rcVnormalize(norm); } void rcMarkWalkableTriangles(const float walkableSlopeAngle, @@ -141,8 +141,8 @@ bool rcBuildCompactHeightfield(const int walkableHeight, const int walkableClimb chf.walkableHeight = walkableHeight; chf.walkableClimb = walkableClimb; chf.maxRegions = 0; - vcopy(chf.bmin, hf.bmin); - vcopy(chf.bmax, hf.bmax); + rcVcopy(chf.bmin, hf.bmin); + rcVcopy(chf.bmax, hf.bmax); chf.bmax[1] += walkableHeight*hf.ch; chf.cs = hf.cs; chf.ch = hf.ch; diff --git a/Recast/Source/RecastArea.cpp b/Recast/Source/RecastArea.cpp index b937af2..56a7bb2 100644 --- a/Recast/Source/RecastArea.cpp +++ b/Recast/Source/RecastArea.cpp @@ -265,12 +265,12 @@ void rcMarkConvexPolyArea(const float* verts, const int nverts, rcCompactHeightfield& chf) { float bmin[3], bmax[3]; - vcopy(bmin, verts); - vcopy(bmax, verts); + rcVcopy(bmin, verts); + rcVcopy(bmax, verts); for (int i = 1; i < nverts; ++i) { - vmin(bmin, &verts[i*3]); - vmax(bmax, &verts[i*3]); + rcVmin(bmin, &verts[i*3]); + rcVmax(bmax, &verts[i*3]); } bmin[1] = hmin; bmax[1] = hmax; diff --git a/Recast/Source/RecastContour.cpp b/Recast/Source/RecastContour.cpp index 8484e60..1340bcf 100644 --- a/Recast/Source/RecastContour.cpp +++ b/Recast/Source/RecastContour.cpp @@ -565,8 +565,8 @@ bool rcBuildContours(rcCompactHeightfield& chf, rcTimeVal startTime = rcGetPerformanceTimer(); - vcopy(cset.bmin, chf.bmin); - vcopy(cset.bmax, chf.bmax); + rcVcopy(cset.bmin, chf.bmin); + rcVcopy(cset.bmax, chf.bmax); cset.cs = chf.cs; cset.ch = chf.ch; diff --git a/Recast/Source/RecastMesh.cpp b/Recast/Source/RecastMesh.cpp index f74e2f6..2236e5f 100644 --- a/Recast/Source/RecastMesh.cpp +++ b/Recast/Source/RecastMesh.cpp @@ -819,8 +819,8 @@ bool rcBuildPolyMesh(rcContourSet& cset, int nvp, rcPolyMesh& mesh) { rcTimeVal startTime = rcGetPerformanceTimer(); - vcopy(mesh.bmin, cset.bmin); - vcopy(mesh.bmax, cset.bmax); + rcVcopy(mesh.bmin, cset.bmin); + rcVcopy(mesh.bmax, cset.bmax); mesh.cs = cset.cs; mesh.ch = cset.ch; @@ -1125,16 +1125,16 @@ bool rcMergePolyMeshes(rcPolyMesh** meshes, const int nmeshes, rcPolyMesh& mesh) mesh.nvp = meshes[0]->nvp; mesh.cs = meshes[0]->cs; mesh.ch = meshes[0]->ch; - vcopy(mesh.bmin, meshes[0]->bmin); - vcopy(mesh.bmax, meshes[0]->bmax); + rcVcopy(mesh.bmin, meshes[0]->bmin); + rcVcopy(mesh.bmax, meshes[0]->bmax); int maxVerts = 0; int maxPolys = 0; int maxVertsPerMesh = 0; for (int i = 0; i < nmeshes; ++i) { - vmin(mesh.bmin, meshes[i]->bmin); - vmax(mesh.bmax, meshes[i]->bmax); + rcVmin(mesh.bmin, meshes[i]->bmin); + rcVmax(mesh.bmax, meshes[i]->bmax); maxVertsPerMesh = rcMax(maxVertsPerMesh, meshes[i]->nverts); maxVerts += meshes[i]->nverts; maxPolys += meshes[i]->npolys; diff --git a/Recast/Source/RecastMeshDetail.cpp b/Recast/Source/RecastMeshDetail.cpp index 06cabd7..42fe11e 100644 --- a/Recast/Source/RecastMeshDetail.cpp +++ b/Recast/Source/RecastMeshDetail.cpp @@ -90,9 +90,9 @@ static bool circumCircle(const float* p1, const float* p2, const float* p3, static float distPtTri(const float* p, const float* a, const float* b, const float* c) { float v0[3], v1[3], v2[3]; - vsub(v0, c,a); - vsub(v1, b,a); - vsub(v2, p,a); + rcVsub(v0, c,a); + rcVsub(v1, b,a); + rcVsub(v2, p,a); const float dot00 = vdot2(v0, v0); const float dot01 = vdot2(v0, v1); @@ -508,7 +508,7 @@ static bool buildPolyDetail(const float* in, const int nin, nverts = 0; for (int i = 0; i < nin; ++i) - vcopy(&verts[i*3], &in[i*3]); + rcVcopy(&verts[i*3], &in[i*3]); nverts = nin; const float cs = chf.cs; @@ -602,7 +602,7 @@ static bool buildPolyDetail(const float* in, const int nin, { for (int k = nidx-2; k > 0; --k) { - vcopy(&verts[nverts*3], &edge[idx[k]*3]); + rcVcopy(&verts[nverts*3], &edge[idx[k]*3]); hull[nhull++] = nverts; nverts++; } @@ -611,7 +611,7 @@ static bool buildPolyDetail(const float* in, const int nin, { for (int k = 1; k < nidx-1; ++k) { - vcopy(&verts[nverts*3], &edge[idx[k]*3]); + rcVcopy(&verts[nverts*3], &edge[idx[k]*3]); hull[nhull++] = nverts; nverts++; } @@ -645,12 +645,12 @@ static bool buildPolyDetail(const float* in, const int nin, { // Create sample locations in a grid. float bmin[3], bmax[3]; - vcopy(bmin, in); - vcopy(bmax, in); + rcVcopy(bmin, in); + rcVcopy(bmax, in); for (int i = 1; i < nin; ++i) { - vmin(bmin, &in[i*3]); - vmax(bmax, &in[i*3]); + rcVmin(bmin, &in[i*3]); + rcVmax(bmax, &in[i*3]); } int x0 = (int)floorf(bmin[0]/sampleDist); int x1 = (int)ceilf(bmax[0]/sampleDist); @@ -693,7 +693,7 @@ static bool buildPolyDetail(const float* in, const int nin, if (d > bestd) { bestd = d; - vcopy(bestpt,pt); + rcVcopy(bestpt,pt); } } // If the max error is within accepted threshold, stop tesselating. @@ -701,7 +701,7 @@ static bool buildPolyDetail(const float* in, const int nin, break; // Add the new sample point. - vcopy(&verts[nverts*3],bestpt); + rcVcopy(&verts[nverts*3],bestpt); nverts++; // Create new triangulation. @@ -1200,7 +1200,7 @@ bool rcMergePolyMeshDetails(rcPolyMeshDetail** meshes, const int nmeshes, rcPoly for (int k = 0; k < dm->nverts; ++k) { - vcopy(&mesh.verts[mesh.nverts*3], &dm->verts[k*3]); + rcVcopy(&mesh.verts[mesh.nverts*3], &dm->verts[k*3]); mesh.nverts++; } for (int k = 0; k < dm->ntris; ++k) diff --git a/Recast/Source/RecastRasterization.cpp b/Recast/Source/RecastRasterization.cpp index 3f6720f..abc8815 100644 --- a/Recast/Source/RecastRasterization.cpp +++ b/Recast/Source/RecastRasterization.cpp @@ -196,12 +196,12 @@ static void rasterizeTri(const float* v0, const float* v1, const float* v2, const float by = bmax[1] - bmin[1]; // Calculate the bounding box of the triangle. - vcopy(tmin, v0); - vcopy(tmax, v0); - vmin(tmin, v1); - vmin(tmin, v2); - vmax(tmax, v1); - vmax(tmax, v2); + rcVcopy(tmin, v0); + rcVcopy(tmax, v0); + rcVmin(tmin, v1); + rcVmin(tmin, v2); + rcVmax(tmax, v1); + rcVmax(tmax, v2); // If the triangle does not touch the bbox of the heightfield, skip the triagle. if (!overlapBounds(bmin, bmax, tmin, tmax)) @@ -223,9 +223,9 @@ static void rasterizeTri(const float* v0, const float* v1, const float* v2, for (int y = y0; y <= y1; ++y) { // Clip polygon to row. - vcopy(&in[0], v0); - vcopy(&in[1*3], v1); - vcopy(&in[2*3], v2); + rcVcopy(&in[0], v0); + rcVcopy(&in[1*3], v1); + rcVcopy(&in[2*3], v2); int nvrow = 3; const float cz = bmin[2] + y*cs; nvrow = clipPoly(in, nvrow, out, 0, 1, -cz); diff --git a/RecastDemo/Bin/Recast.app/Contents/MacOS/Recast b/RecastDemo/Bin/Recast.app/Contents/MacOS/Recast index c412a56..41a4909 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 c1531ff..93c3689 100644 --- a/RecastDemo/Build/Xcode/Recast.xcodeproj/memon.pbxuser +++ b/RecastDemo/Build/Xcode/Recast.xcodeproj/memon.pbxuser @@ -19,7 +19,7 @@ 6BBB4BAE115B649300CF791D /* Sample_TileMesh.cpp:559 */, 6BBB4BBE115B64E600CF791D /* Sample_TileMesh.cpp:592 */, 6BBB4C4C115B7BAD00CF791D /* Sample_TileMesh.cpp:264 */, - 6BF5F32C11759C35000502A6 /* DetourNavMesh.cpp:1977 */, + 6BF5F32C11759C35000502A6 /* DetourNavMesh.cpp:144 */, ); codeSenseManager = 6B8632AA0F78115100E2684A /* Code sense */; executables = ( @@ -319,6 +319,62 @@ 6BF5F3731175AACB000502A6 = 6BF5F3731175AACB000502A6 /* PBXTextBookmark */; 6BF5F3741175AACB000502A6 = 6BF5F3741175AACB000502A6 /* PBXTextBookmark */; 6BF5F3751175AACB000502A6 = 6BF5F3751175AACB000502A6 /* PBXTextBookmark */; + 6BF5F471117644A2000502A6 /* PBXTextBookmark */ = 6BF5F471117644A2000502A6 /* PBXTextBookmark */; + 6BF5F472117644A2000502A6 /* PBXTextBookmark */ = 6BF5F472117644A2000502A6 /* PBXTextBookmark */; + 6BF5F473117644A2000502A6 /* PBXTextBookmark */ = 6BF5F473117644A2000502A6 /* PBXTextBookmark */; + 6BF5F474117644A2000502A6 /* PBXTextBookmark */ = 6BF5F474117644A2000502A6 /* PBXTextBookmark */; + 6BF5F475117644A2000502A6 /* PBXTextBookmark */ = 6BF5F475117644A2000502A6 /* PBXTextBookmark */; + 6BF5F476117644A2000502A6 /* PBXTextBookmark */ = 6BF5F476117644A2000502A6 /* PBXTextBookmark */; + 6BF5F477117644A2000502A6 /* PBXTextBookmark */ = 6BF5F477117644A2000502A6 /* PBXTextBookmark */; + 6BF5F478117644A2000502A6 /* PBXTextBookmark */ = 6BF5F478117644A2000502A6 /* PBXTextBookmark */; + 6BF5F479117644A2000502A6 /* PBXTextBookmark */ = 6BF5F479117644A2000502A6 /* PBXTextBookmark */; + 6BF5F47A117644A2000502A6 /* PBXTextBookmark */ = 6BF5F47A117644A2000502A6 /* PBXTextBookmark */; + 6BF5F47B117644A2000502A6 /* PBXTextBookmark */ = 6BF5F47B117644A2000502A6 /* PBXTextBookmark */; + 6BF5F47C117644A2000502A6 /* PBXTextBookmark */ = 6BF5F47C117644A2000502A6 /* PBXTextBookmark */; + 6BF5F47D117644A2000502A6 /* PBXTextBookmark */ = 6BF5F47D117644A2000502A6 /* PBXTextBookmark */; + 6BF5F47E117644A2000502A6 /* PBXTextBookmark */ = 6BF5F47E117644A2000502A6 /* PBXTextBookmark */; + 6BF5F47F117644A2000502A6 /* PBXTextBookmark */ = 6BF5F47F117644A2000502A6 /* PBXTextBookmark */; + 6BF5F480117644A2000502A6 /* PBXTextBookmark */ = 6BF5F480117644A2000502A6 /* PBXTextBookmark */; + 6BF5F481117644A2000502A6 /* PBXTextBookmark */ = 6BF5F481117644A2000502A6 /* PBXTextBookmark */; + 6BF5F482117644A2000502A6 /* PBXTextBookmark */ = 6BF5F482117644A2000502A6 /* PBXTextBookmark */; + 6BF5F483117644A2000502A6 /* PBXTextBookmark */ = 6BF5F483117644A2000502A6 /* PBXTextBookmark */; + 6BF5F484117644A2000502A6 /* PBXTextBookmark */ = 6BF5F484117644A2000502A6 /* PBXTextBookmark */; + 6BF5F485117644A2000502A6 /* PBXTextBookmark */ = 6BF5F485117644A2000502A6 /* PBXTextBookmark */; + 6BF5F486117644A2000502A6 /* PBXTextBookmark */ = 6BF5F486117644A2000502A6 /* PBXTextBookmark */; + 6BF5F487117644A2000502A6 /* PBXTextBookmark */ = 6BF5F487117644A2000502A6 /* PBXTextBookmark */; + 6BF5F488117644A2000502A6 /* PBXTextBookmark */ = 6BF5F488117644A2000502A6 /* PBXTextBookmark */; + 6BF5F489117644A2000502A6 /* PBXTextBookmark */ = 6BF5F489117644A2000502A6 /* PBXTextBookmark */; + 6BF5F48A117644A2000502A6 /* PBXTextBookmark */ = 6BF5F48A117644A2000502A6 /* PBXTextBookmark */; + 6BF5F48B117644A2000502A6 /* PBXTextBookmark */ = 6BF5F48B117644A2000502A6 /* PBXTextBookmark */; + 6BF5F48C117644A2000502A6 /* PBXTextBookmark */ = 6BF5F48C117644A2000502A6 /* PBXTextBookmark */; + 6BF5F48D117644A2000502A6 /* PBXTextBookmark */ = 6BF5F48D117644A2000502A6 /* PBXTextBookmark */; + 6BF5F48E117644A2000502A6 /* PBXTextBookmark */ = 6BF5F48E117644A2000502A6 /* PBXTextBookmark */; + 6BF5F48F117644A2000502A6 /* PBXTextBookmark */ = 6BF5F48F117644A2000502A6 /* PBXTextBookmark */; + 6BF5F490117644A2000502A6 /* PBXTextBookmark */ = 6BF5F490117644A2000502A6 /* PBXTextBookmark */; + 6BF5F491117644A2000502A6 /* PBXTextBookmark */ = 6BF5F491117644A2000502A6 /* PBXTextBookmark */; + 6BF5F492117644A2000502A6 /* PBXTextBookmark */ = 6BF5F492117644A2000502A6 /* PBXTextBookmark */; + 6BF5F493117644A2000502A6 /* PBXTextBookmark */ = 6BF5F493117644A2000502A6 /* PBXTextBookmark */; + 6BF5F494117644A2000502A6 /* PBXTextBookmark */ = 6BF5F494117644A2000502A6 /* PBXTextBookmark */; + 6BF5F495117644A2000502A6 /* PBXTextBookmark */ = 6BF5F495117644A2000502A6 /* PBXTextBookmark */; + 6BF5F496117644A2000502A6 /* PBXTextBookmark */ = 6BF5F496117644A2000502A6 /* PBXTextBookmark */; + 6BF5F497117644A2000502A6 /* PBXTextBookmark */ = 6BF5F497117644A2000502A6 /* PBXTextBookmark */; + 6BF5F498117644A2000502A6 /* PBXTextBookmark */ = 6BF5F498117644A2000502A6 /* PBXTextBookmark */; + 6BF5F499117644A2000502A6 /* PBXTextBookmark */ = 6BF5F499117644A2000502A6 /* PBXTextBookmark */; + 6BF5F49A117644A2000502A6 /* PBXTextBookmark */ = 6BF5F49A117644A2000502A6 /* PBXTextBookmark */; + 6BF5F49B117644A2000502A6 /* PBXTextBookmark */ = 6BF5F49B117644A2000502A6 /* PBXTextBookmark */; + 6BF5F49C117644A2000502A6 /* PBXTextBookmark */ = 6BF5F49C117644A2000502A6 /* PBXTextBookmark */; + 6BF5F49D117644A2000502A6 /* PBXTextBookmark */ = 6BF5F49D117644A2000502A6 /* PBXTextBookmark */; + 6BF5F49E117644A2000502A6 /* PBXTextBookmark */ = 6BF5F49E117644A2000502A6 /* PBXTextBookmark */; + 6BF5F49F117644A2000502A6 /* PBXTextBookmark */ = 6BF5F49F117644A2000502A6 /* PBXTextBookmark */; + 6BF5F4A0117644A2000502A6 /* PBXTextBookmark */ = 6BF5F4A0117644A2000502A6 /* PBXTextBookmark */; + 6BF5F4A1117644A2000502A6 /* PBXTextBookmark */ = 6BF5F4A1117644A2000502A6 /* PBXTextBookmark */; + 6BF5F4A2117644A2000502A6 /* PBXTextBookmark */ = 6BF5F4A2117644A2000502A6 /* PBXTextBookmark */; + 6BF5F4A3117644A2000502A6 /* PBXTextBookmark */ = 6BF5F4A3117644A2000502A6 /* PBXTextBookmark */; + 6BF5F4A4117644A2000502A6 /* PBXTextBookmark */ = 6BF5F4A4117644A2000502A6 /* PBXTextBookmark */; + 6BF5F4A5117644A2000502A6 /* PBXTextBookmark */ = 6BF5F4A5117644A2000502A6 /* PBXTextBookmark */; + 6BF5F4A6117644A2000502A6 /* PBXTextBookmark */ = 6BF5F4A6117644A2000502A6 /* PBXTextBookmark */; + 6BF5F4A7117644A2000502A6 /* PBXTextBookmark */ = 6BF5F4A7117644A2000502A6 /* PBXTextBookmark */; + 6BF5F4B1117644A2000502A6 /* PBXTextBookmark */ = 6BF5F4B1117644A2000502A6 /* PBXTextBookmark */; }; sourceControlManager = 6B8632A90F78115100E2684A /* Source Control */; userBookmarkGroup = 6B8DE6F010A88F0500DF20FB /* PBXBookmarkGroup */; @@ -349,16 +405,16 @@ }; 6B1185FC10068B040018F96F /* DetourCommon.h */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {815, 3024}}"; - sepNavSelRange = "{148, 0}"; - sepNavVisRange = "{0, 1063}"; + sepNavIntBoundsRect = "{{0, 0}, {909, 3408}}"; + sepNavSelRange = "{3389, 0}"; + sepNavVisRange = "{3129, 468}"; }; }; 6B1185FD10068B150018F96F /* DetourCommon.cpp */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {815, 3728}}"; - sepNavSelRange = "{5828, 0}"; - sepNavVisRange = "{5622, 583}"; + sepNavIntBoundsRect = "{{0, 0}, {909, 4000}}"; + sepNavSelRange = "{5158, 0}"; + sepNavVisRange = "{4839, 694}"; }; }; 6B137C6C0F7FCBBB00459200 /* imgui.cpp */ = { @@ -405,9 +461,9 @@ }; 6B137C7E0F7FCBFE00459200 /* Recast.h */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {815, 10288}}"; - sepNavSelRange = "{3406, 0}"; - sepNavVisRange = "{3108, 629}"; + sepNavIntBoundsRect = "{{0, 0}, {909, 10976}}"; + sepNavSelRange = "{12739, 0}"; + sepNavVisRange = "{12575, 890}"; }; }; 6B137C800F7FCBFE00459200 /* RecastLog.h */ = { @@ -427,16 +483,16 @@ }; 6B137C820F7FCC1100459200 /* Recast.cpp */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {815, 4608}}"; - sepNavSelRange = "{3214, 0}"; - sepNavVisRange = "{3040, 525}"; + sepNavIntBoundsRect = "{{0, 0}, {1034, 4576}}"; + sepNavSelRange = "{6024, 0}"; + sepNavVisRange = "{5556, 1070}"; }; }; 6B137C830F7FCC1100459200 /* RecastContour.cpp */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {909, 12864}}"; - sepNavSelRange = "{15251, 0}"; - sepNavVisRange = "{14919, 939}"; + sepNavIntBoundsRect = "{{0, 0}, {909, 12272}}"; + sepNavSelRange = "{14629, 0}"; + sepNavVisRange = "{14302, 603}"; sepNavWindowFrame = "{{38, 30}, {1214, 722}}"; }; }; @@ -457,16 +513,16 @@ }; 6B137C870F7FCC1100459200 /* RecastMesh.cpp */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {815, 20016}}"; - sepNavSelRange = "{11515, 0}"; - sepNavVisRange = "{11277, 450}"; + sepNavIntBoundsRect = "{{0, 0}, {909, 19948}}"; + sepNavSelRange = "{20942, 0}"; + sepNavVisRange = "{20593, 527}"; }; }; 6B137C880F7FCC1100459200 /* RecastRasterization.cpp */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {815, 5360}}"; - sepNavSelRange = "{1159, 0}"; - sepNavVisRange = "{842, 726}"; + sepNavIntBoundsRect = "{{0, 0}, {909, 5612}}"; + sepNavSelRange = "{5843, 0}"; + sepNavVisRange = "{5633, 746}"; }; }; 6B137C890F7FCC1100459200 /* RecastRegion.cpp */ = { @@ -514,9 +570,9 @@ }; 6B2AEC520FFB8958005BE9CC /* Sample_TileMesh.cpp */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {1223, 18112}}"; - sepNavSelRange = "{12389, 0}"; - sepNavVisRange = "{12187, 761}"; + sepNavIntBoundsRect = "{{0, 0}, {1048, 15468}}"; + sepNavSelRange = "{25328, 0}"; + sepNavVisRange = "{24874, 860}"; sepNavWindowFrame = "{{38, 30}, {1214, 722}}"; }; }; @@ -529,9 +585,9 @@ }; 6B324C65111C5D9A00EBD2FD /* ConvexVolumeTool.cpp */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {815, 4208}}"; - sepNavSelRange = "{2134, 0}"; - sepNavVisRange = "{1841, 593}"; + sepNavIntBoundsRect = "{{0, 0}, {909, 4340}}"; + sepNavSelRange = "{5379, 0}"; + sepNavVisRange = "{5919, 795}"; }; }; 6B555DAE100B211D00247EA3 /* imguiRenderGL.h */ = { @@ -557,9 +613,9 @@ }; 6B624169103434880002E346 /* RecastMeshDetail.cpp */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {815, 19584}}"; - sepNavSelRange = "{22234, 0}"; - sepNavVisRange = "{21816, 592}"; + sepNavIntBoundsRect = "{{0, 0}, {909, 19608}}"; + sepNavSelRange = "{16693, 0}"; + sepNavVisRange = "{16259, 695}"; sepNavWindowFrame = "{{61, 36}, {1011, 695}}"; }; }; @@ -572,9 +628,9 @@ }; 6B8036AD113BAABE005ED67B /* Sample_Debug.cpp */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {909, 3436}}"; - sepNavSelRange = "{1298, 59}"; - sepNavVisRange = "{1188, 420}"; + sepNavIntBoundsRect = "{{0, 0}, {909, 3536}}"; + sepNavSelRange = "{3931, 0}"; + sepNavVisRange = "{3571, 825}"; }; }; 6B8632970F78114600E2684A /* Recast */ = { @@ -584,7 +640,7 @@ argumentStrings = ( ); autoAttachOnCrash = 1; - breakpointsEnabled = 1; + breakpointsEnabled = 0; configStateDict = { }; customDataFormattersEnabled = 1; @@ -628,17 +684,17 @@ }; 6B8DE88710B69E3E00DF20FB /* DetourNavMesh.cpp */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {909, 39840}}"; - sepNavSelRange = "{55744, 0}"; - sepNavVisRange = "{55411, 1075}"; + sepNavIntBoundsRect = "{{0, 0}, {909, 39936}}"; + sepNavSelRange = "{37873, 0}"; + sepNavVisRange = "{37368, 703}"; sepNavWindowFrame = "{{15, 51}, {1214, 722}}"; }; }; 6B8DE88810B69E3E00DF20FB /* DetourNavMeshBuilder.cpp */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {909, 11680}}"; - sepNavSelRange = "{16766, 0}"; - sepNavVisRange = "{19240, 698}"; + sepNavIntBoundsRect = "{{0, 0}, {909, 10848}}"; + sepNavSelRange = "{11979, 0}"; + sepNavVisRange = "{11498, 732}"; }; }; 6B8DE88B10B69E4C00DF20FB /* DetourNavMesh.h */ = { @@ -667,16 +723,16 @@ }; 6BA1E88810C7BFC9008007F6 /* Sample_SoloMeshSimple.cpp */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {909, 11664}}"; - sepNavSelRange = "{2277, 116}"; - sepNavVisRange = "{1992, 599}"; + sepNavIntBoundsRect = "{{0, 0}, {909, 11308}}"; + sepNavSelRange = "{19258, 0}"; + sepNavVisRange = "{18776, 907}"; }; }; 6BA1E88910C7BFC9008007F6 /* Sample_SoloMeshTiled.cpp */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {909, 19856}}"; - sepNavSelRange = "{5056, 0}"; - sepNavVisRange = "{2030, 813}"; + sepNavIntBoundsRect = "{{0, 0}, {1006, 18732}}"; + sepNavSelRange = "{32437, 0}"; + sepNavVisRange = "{31955, 907}"; }; }; 6BA1E88E10C7BFD3008007F6 /* Sample_SoloMeshSimple.h */ = { @@ -716,9 +772,9 @@ }; 6BB7FC0A10EBB6AA006DA0A6 /* NavMeshTesterTool.cpp */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {1195, 15296}}"; - sepNavSelRange = "{16316, 0}"; - sepNavVisRange = "{16266, 230}"; + sepNavIntBoundsRect = "{{0, 0}, {909, 15328}}"; + sepNavSelRange = "{9634, 0}"; + sepNavVisRange = "{9406, 745}"; }; }; 6BB7FDA310F36EFC006DA0A6 /* InputGeom.h */ = { @@ -730,9 +786,9 @@ }; 6BB7FDA410F36F0E006DA0A6 /* InputGeom.cpp */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {815, 7008}}"; - sepNavSelRange = "{10873, 0}"; - sepNavVisRange = "{10414, 708}"; + sepNavIntBoundsRect = "{{0, 0}, {909, 7188}}"; + sepNavSelRange = "{7189, 0}"; + sepNavVisRange = "{7211, 531}"; }; }; 6BB93C7710CFE1D500F74F2B /* DebugDraw.h */ = { @@ -797,7 +853,7 @@ fRef = 6B1185FD10068B150018F96F /* DetourCommon.cpp */; name = "DetourCommon.cpp: 226"; rLen = 0; - rLoc = 5828; + rLoc = 5869; rType = 0; vrLen = 583; vrLoc = 5622; @@ -897,7 +953,7 @@ fRef = 6BB7FDA410F36F0E006DA0A6 /* InputGeom.cpp */; name = "InputGeom.cpp: 426"; rLen = 0; - rLoc = 10873; + rLoc = 10905; rType = 0; vrLen = 708; vrLoc = 10414; @@ -1057,7 +1113,7 @@ fRef = 6B137C820F7FCC1100459200 /* Recast.cpp */; name = "Recast.cpp: 121"; rLen = 0; - rLoc = 3214; + rLoc = 3234; rType = 0; vrLen = 525; vrLoc = 3040; @@ -1107,7 +1163,7 @@ fRef = 6BF7C4531115C277002B3F46 /* RecastArea.cpp */; name = "RecastArea.cpp: 303"; rLen = 0; - rLoc = 8512; + rLoc = 8520; rType = 0; vrLen = 628; vrLoc = 8137; @@ -1137,7 +1193,7 @@ fRef = 6B624169103434880002E346 /* RecastMeshDetail.cpp */; name = "RecastMeshDetail.cpp: 928"; rLen = 0; - rLoc = 22234; + rLoc = 22258; rType = 0; vrLen = 592; vrLoc = 21816; @@ -1197,7 +1253,7 @@ fRef = 6B1185FD10068B150018F96F /* DetourCommon.cpp */; name = "DetourCommon.cpp: 231"; rLen = 0; - rLoc = 5890; + rLoc = 5931; rType = 0; vrLen = 583; vrLoc = 5622; @@ -1317,7 +1373,7 @@ fRef = 6BB7FDA410F36F0E006DA0A6 /* InputGeom.cpp */; name = "InputGeom.cpp: 426"; rLen = 0; - rLoc = 10873; + rLoc = 10905; rType = 0; vrLen = 708; vrLoc = 10414; @@ -1427,7 +1483,7 @@ fRef = 6BCF32351104CD05009445BF /* OffMeshConnectionTool.cpp */; name = "OffMeshConnectionTool.cpp: 122"; rLen = 0; - rLoc = 2934; + rLoc = 2938; rType = 0; vrLen = 449; vrLoc = 2809; @@ -1497,7 +1553,7 @@ fRef = 6BA1E88810C7BFC9008007F6 /* Sample_SoloMeshSimple.cpp */; name = "Sample_SoloMeshSimple.cpp: 485"; rLen = 0; - rLoc = 15301; + rLoc = 15305; rType = 0; vrLen = 753; vrLoc = 14781; @@ -1567,7 +1623,7 @@ fRef = 6B137C820F7FCC1100459200 /* Recast.cpp */; name = "Recast.cpp: 121"; rLen = 0; - rLoc = 3214; + rLoc = 3234; rType = 0; vrLen = 525; vrLoc = 3040; @@ -1617,7 +1673,7 @@ fRef = 6BF7C4531115C277002B3F46 /* RecastArea.cpp */; name = "RecastArea.cpp: 303"; rLen = 0; - rLoc = 8512; + rLoc = 8520; rType = 0; vrLen = 628; vrLoc = 8137; @@ -1637,7 +1693,7 @@ fRef = 6B137C830F7FCC1100459200 /* RecastContour.cpp */; name = "RecastContour.cpp: 604"; rLen = 0; - rLoc = 15425; + rLoc = 15429; rType = 0; vrLen = 681; vrLoc = 15076; @@ -1657,7 +1713,7 @@ fRef = 6B624169103434880002E346 /* RecastMeshDetail.cpp */; name = "RecastMeshDetail.cpp: 928"; rLen = 0; - rLoc = 22234; + rLoc = 22258; rType = 0; vrLen = 592; vrLoc = 21816; @@ -1677,7 +1733,7 @@ fRef = 6B8DE88810B69E3E00DF20FB /* DetourNavMeshBuilder.cpp */; name = "DetourNavMeshBuilder.cpp: 596"; rLen = 0; - rLoc = 16766; + rLoc = 16778; rType = 0; vrLen = 698; vrLoc = 19240; @@ -1707,7 +1763,7 @@ fRef = 6B8DE88810B69E3E00DF20FB /* DetourNavMeshBuilder.cpp */; name = "DetourNavMeshBuilder.cpp: 596"; rLen = 0; - rLoc = 16766; + rLoc = 16778; rType = 0; vrLen = 698; vrLoc = 19240; @@ -1806,9 +1862,9 @@ }; 6BCF32351104CD05009445BF /* OffMeshConnectionTool.cpp */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {909, 2704}}"; - sepNavSelRange = "{2909, 0}"; - sepNavVisRange = "{2592, 670}"; + sepNavIntBoundsRect = "{{0, 0}, {909, 2728}}"; + sepNavSelRange = "{2918, 0}"; + sepNavVisRange = "{2872, 504}"; }; }; 6BED8AE2117451EB00582F38 /* PBXTextBookmark */ = { @@ -1826,7 +1882,7 @@ fRef = 6BB7FC0A10EBB6AA006DA0A6 /* NavMeshTesterTool.cpp */; name = "NavMeshTesterTool.cpp: 896"; rLen = 0; - rLoc = 25264; + rLoc = 25324; rType = 0; vrLen = 989; vrLoc = 24647; @@ -1836,7 +1892,7 @@ fRef = 6BB7FC0A10EBB6AA006DA0A6 /* NavMeshTesterTool.cpp */; name = "NavMeshTesterTool.cpp: 896"; rLen = 0; - rLoc = 25264; + rLoc = 25324; rType = 0; vrLen = 989; vrLoc = 24647; @@ -1846,7 +1902,7 @@ fRef = 6BCF32351104CD05009445BF /* OffMeshConnectionTool.cpp */; name = "OffMeshConnectionTool.cpp: 120"; rLen = 0; - rLoc = 2909; + rLoc = 2911; rType = 0; vrLen = 670; vrLoc = 2592; @@ -1856,7 +1912,7 @@ fRef = 6B8DE88710B69E3E00DF20FB /* DetourNavMesh.cpp */; name = "DetourNavMesh.cpp: 1635"; rLen = 0; - rLoc = 44290; + rLoc = 3950; rType = 0; vrLen = 1130; vrLoc = 43415; @@ -1955,6 +2011,11 @@ name = glimage.h; path = /Users/memon/Code/recastnavigation/Backups/Backup_slideshow/Include/glimage.h; sourceTree = ""; + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {1155, 592}}"; + sepNavSelRange = "{419, 71}"; + sepNavVisRange = "{0, 495}"; + }; }; 6BF5F2C511747E9F000502A6 /* stb_image.h */ = { uiCtxt = { @@ -2015,7 +2076,7 @@ fRef = 6B137C830F7FCC1100459200 /* RecastContour.cpp */; name = "RecastContour.cpp: 596"; rLen = 0; - rLoc = 15251; + rLoc = 15255; rType = 0; vrLen = 939; vrLoc = 14919; @@ -2165,7 +2226,7 @@ fRef = 6B137C830F7FCC1100459200 /* RecastContour.cpp */; name = "RecastContour.cpp: 596"; rLen = 0; - rLoc = 15251; + rLoc = 15255; rType = 0; vrLen = 939; vrLoc = 14919; @@ -2205,7 +2266,7 @@ fRef = 6BA1E88810C7BFC9008007F6 /* Sample_SoloMeshSimple.cpp */; name = "Sample_SoloMeshSimple.cpp: 682"; rLen = 0; - rLoc = 22915; + rLoc = 22923; rType = 0; vrLen = 3066; vrLoc = 19865; @@ -2260,7 +2321,7 @@ vrLen = 845; vrLoc = 920; }; - 6BF5F32C11759C35000502A6 /* DetourNavMesh.cpp:1977 */ = { + 6BF5F32C11759C35000502A6 /* DetourNavMesh.cpp:144 */ = { isa = PBXFileBreakpoint; actions = ( ); @@ -2272,7 +2333,7 @@ functionName = "dtNavMesh::raycast(dtPolyRef centerRef, const float* startPos, const float* endPos, dtQueryFilter* filter, float& t, float* hitNormal, dtPolyRef* path, const int pathSize)"; hitCount = 1; ignoreCount = 0; - lineNumber = 1977; + lineNumber = 144; location = Recast; modificationTime = 292920411.683684; state = 1; @@ -2332,7 +2393,7 @@ fRef = 6BA1E88910C7BFC9008007F6 /* Sample_SoloMeshTiled.cpp */; name = "Sample_SoloMeshTiled.cpp: 202"; rLen = 0; - rLoc = 5056; + rLoc = 5058; rType = 0; vrLen = 813; vrLoc = 2030; @@ -2342,7 +2403,7 @@ fRef = 6B2AEC520FFB8958005BE9CC /* Sample_TileMesh.cpp */; name = "Sample_TileMesh.cpp: 541"; rLen = 0; - rLoc = 12389; + rLoc = 12393; rType = 0; vrLen = 761; vrLoc = 12187; @@ -2372,7 +2433,7 @@ fRef = 6B2AEC520FFB8958005BE9CC /* Sample_TileMesh.cpp */; name = "Sample_TileMesh.cpp: 356"; rLen = 0; - rLoc = 7960; + rLoc = 7962; rType = 0; vrLen = 627; vrLoc = 7665; @@ -2432,7 +2493,7 @@ fRef = 6BA1E88810C7BFC9008007F6 /* Sample_SoloMeshSimple.cpp */; name = "Sample_SoloMeshSimple.cpp: 694"; rLen = 78; - rLoc = 23060; + rLoc = 23068; rType = 0; vrLen = 2687; vrLoc = 20503; @@ -2502,7 +2563,7 @@ fRef = 6B2AEC520FFB8958005BE9CC /* Sample_TileMesh.cpp */; name = "Sample_TileMesh.cpp: 160"; rLen = 0; - rLoc = 3719; + rLoc = 3721; rType = 0; vrLen = 457; vrLoc = 3512; @@ -2522,7 +2583,7 @@ fRef = 6B2AEC520FFB8958005BE9CC /* Sample_TileMesh.cpp */; name = "Sample_TileMesh.cpp: 160"; rLen = 0; - rLoc = 3718; + rLoc = 3720; rType = 0; vrLen = 545; vrLoc = 3512; @@ -2552,7 +2613,7 @@ fRef = 6BA1E88910C7BFC9008007F6 /* Sample_SoloMeshTiled.cpp */; name = "Sample_SoloMeshTiled.cpp: 202"; rLen = 0; - rLoc = 5056; + rLoc = 5058; rType = 0; vrLen = 781; vrLoc = 4621; @@ -2562,7 +2623,7 @@ fRef = 6B2AEC520FFB8958005BE9CC /* Sample_TileMesh.cpp */; name = "Sample_TileMesh.cpp: 596"; rLen = 0; - rLoc = 13811; + rLoc = 13815; rType = 0; vrLen = 719; vrLoc = 13666; @@ -2572,7 +2633,7 @@ fRef = 6B8DE88710B69E3E00DF20FB /* DetourNavMesh.cpp */; name = "DetourNavMesh.cpp: 1638"; rLen = 0; - rLoc = 44466; + rLoc = 3950; rType = 0; vrLen = 793; vrLoc = 1565; @@ -2582,7 +2643,7 @@ fRef = 6BA1E88910C7BFC9008007F6 /* Sample_SoloMeshTiled.cpp */; name = "Sample_SoloMeshTiled.cpp: 202"; rLen = 0; - rLoc = 5056; + rLoc = 5058; rType = 0; vrLen = 813; vrLoc = 2030; @@ -2592,7 +2653,7 @@ fRef = 6B2AEC520FFB8958005BE9CC /* Sample_TileMesh.cpp */; name = "Sample_TileMesh.cpp: 541"; rLen = 0; - rLoc = 12389; + rLoc = 12393; rType = 0; vrLen = 761; vrLoc = 12187; @@ -2602,7 +2663,7 @@ fRef = 6B8DE88710B69E3E00DF20FB /* DetourNavMesh.cpp */; name = "DetourNavMesh.cpp: 2030"; rLen = 0; - rLoc = 55847; + rLoc = 3950; rType = 0; vrLen = 1059; vrLoc = 55387; @@ -2622,7 +2683,7 @@ fRef = 6B8DE88710B69E3E00DF20FB /* DetourNavMesh.cpp */; name = "DetourNavMesh.cpp: 1842"; rLen = 0; - rLoc = 50384; + rLoc = 3950; rType = 0; vrLen = 959; vrLoc = 50928; @@ -2642,7 +2703,7 @@ fRef = 6B8DE88710B69E3E00DF20FB /* DetourNavMesh.cpp */; name = "DetourNavMesh.cpp: 1990"; rLen = 0; - rLoc = 54904; + rLoc = 3950; rType = 0; vrLen = 751; vrLoc = 54164; @@ -2662,7 +2723,7 @@ fRef = 6B8DE88710B69E3E00DF20FB /* DetourNavMesh.cpp */; name = "DetourNavMesh.cpp: 1990"; rLen = 0; - rLoc = 54904; + rLoc = 3950; rType = 0; vrLen = 751; vrLoc = 54164; @@ -2682,7 +2743,7 @@ fRef = 6B8DE88710B69E3E00DF20FB /* DetourNavMesh.cpp */; name = "DetourNavMesh.cpp: 1990"; rLen = 0; - rLoc = 54871; + rLoc = 3950; rType = 0; vrLen = 751; vrLoc = 54164; @@ -2702,7 +2763,7 @@ fRef = 6B8DE88710B69E3E00DF20FB /* DetourNavMesh.cpp */; name = "DetourNavMesh.cpp: 359"; rLen = 0; - rLoc = 9870; + rLoc = 3950; rType = 0; vrLen = 938; vrLoc = 9425; @@ -2722,7 +2783,7 @@ fRef = 6B8DE88710B69E3E00DF20FB /* DetourNavMesh.cpp */; name = "DetourNavMesh.cpp: 2001"; rLen = 0; - rLoc = 55194; + rLoc = 3950; rType = 0; vrLen = 1077; vrLoc = 55436; @@ -2761,8 +2822,8 @@ isa = PBXTextBookmark; fRef = 6B8DE88710B69E3E00DF20FB /* DetourNavMesh.cpp */; name = "DetourNavMesh.cpp: 2034"; - rLen = 4; - rLoc = 55843; + rLen = 0; + rLoc = 3950; rType = 0; vrLen = 832; vrLoc = 55510; @@ -2792,7 +2853,7 @@ fRef = 6B8DE88710B69E3E00DF20FB /* DetourNavMesh.cpp */; name = "DetourNavMesh.cpp: 2040"; rLen = 0; - rLoc = 55744; + rLoc = 3950; rType = 0; vrLen = 1075; vrLoc = 55411; @@ -2822,7 +2883,7 @@ fRef = 6B8DE88710B69E3E00DF20FB /* DetourNavMesh.cpp */; name = "DetourNavMesh.cpp: 2040"; rLen = 0; - rLoc = 55744; + rLoc = 3950; rType = 0; vrLen = 1075; vrLoc = 55411; @@ -2874,6 +2935,564 @@ path = /Users/memon/Code/recastnavigation/Backups/Backup_slideshow/Include/glimage.h; sourceTree = ""; }; + 6BF5F471117644A2000502A6 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BB93C7A10CFE1D500F74F2B /* DebugDraw.cpp */; + name = "DebugDraw.cpp: 68"; + rLen = 0; + rLoc = 2304; + rType = 0; + vrLen = 1196; + vrLoc = 2054; + }; + 6BF5F472117644A2000502A6 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6B137C7E0F7FCBFE00459200 /* Recast.h */; + name = "Recast.h: 384"; + rLen = 0; + rLoc = 12739; + rType = 0; + vrLen = 890; + vrLoc = 12575; + }; + 6BF5F473117644A2000502A6 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6B137C820F7FCC1100459200 /* Recast.cpp */; + name = "Recast.cpp: 223"; + rLen = 0; + rLoc = 6024; + rType = 0; + vrLen = 1070; + vrLoc = 5556; + }; + 6BF5F474117644A2000502A6 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BB7FDA410F36F0E006DA0A6 /* InputGeom.cpp */; + name = "InputGeom.cpp: 292"; + rLen = 0; + rLoc = 7189; + rType = 0; + vrLen = 519; + vrLoc = 7170; + }; + 6BF5F475117644A2000502A6 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BCF32351104CD05009445BF /* OffMeshConnectionTool.cpp */; + name = "OffMeshConnectionTool.cpp: 121"; + rLen = 0; + rLoc = 2918; + rType = 0; + vrLen = 463; + vrLoc = 2866; + }; + 6BF5F476117644A2000502A6 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BF7C13F1111953A002B3F46 /* TestCase.cpp */; + name = "TestCase.cpp: 289"; + rLen = 0; + rLoc = 6946; + rType = 0; + vrLen = 750; + vrLoc = 7612; + }; + 6BF5F477117644A2000502A6 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BF7C4531115C277002B3F46 /* RecastArea.cpp */; + name = "RecastArea.cpp: 276"; + rLen = 0; + rLoc = 7726; + rType = 0; + vrLen = 502; + vrLoc = 8390; + }; + 6BF5F478117644A2000502A6 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6B324C65111C5D9A00EBD2FD /* ConvexVolumeTool.cpp */; + name = "ConvexVolumeTool.cpp: 220"; + rLen = 0; + rLoc = 5379; + rType = 0; + vrLen = 798; + vrLoc = 5916; + }; + 6BF5F479117644A2000502A6 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6B8036AD113BAABE005ED67B /* Sample_Debug.cpp */; + name = "Sample_Debug.cpp: 162"; + rLen = 0; + rLoc = 3931; + rType = 0; + vrLen = 825; + vrLoc = 3571; + }; + 6BF5F47A117644A2000502A6 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BA1E88810C7BFC9008007F6 /* Sample_SoloMeshSimple.cpp */; + name = "Sample_SoloMeshSimple.cpp: 626"; + rLen = 0; + rLoc = 19258; + rType = 0; + vrLen = 837; + vrLoc = 18776; + }; + 6BF5F47B117644A2000502A6 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6B624169103434880002E346 /* RecastMeshDetail.cpp */; + name = "RecastMeshDetail.cpp: 696"; + rLen = 0; + rLoc = 16693; + rType = 0; + vrLen = 646; + vrLoc = 16259; + }; + 6BF5F47C117644A2000502A6 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6B2AEC520FFB8958005BE9CC /* Sample_TileMesh.cpp */; + name = "Sample_TileMesh.cpp: 964"; + rLen = 0; + rLoc = 25328; + rType = 0; + vrLen = 830; + vrLoc = 24874; + }; + 6BF5F47D117644A2000502A6 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6B137C880F7FCC1100459200 /* RecastRasterization.cpp */; + name = "RecastRasterization.cpp: 228"; + rLen = 0; + rLoc = 5843; + rType = 0; + vrLen = 701; + vrLoc = 5633; + }; + 6BF5F47E117644A2000502A6 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6B137C870F7FCC1100459200 /* RecastMesh.cpp */; + name = "RecastMesh.cpp: 823"; + rLen = 0; + rLoc = 20942; + rType = 0; + vrLen = 524; + vrLoc = 20593; + }; + 6BF5F47F117644A2000502A6 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6B137C830F7FCC1100459200 /* RecastContour.cpp */; + name = "RecastContour.cpp: 569"; + rLen = 0; + rLoc = 14629; + rType = 0; + vrLen = 603; + vrLoc = 14302; + }; + 6BF5F480117644A2000502A6 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BA1E88910C7BFC9008007F6 /* Sample_SoloMeshTiled.cpp */; + name = "Sample_SoloMeshTiled.cpp: 1085"; + rLen = 0; + rLoc = 32437; + rType = 0; + vrLen = 837; + vrLoc = 31955; + }; + 6BF5F481117644A2000502A6 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BB7FC0A10EBB6AA006DA0A6 /* NavMeshTesterTool.cpp */; + name = "NavMeshTesterTool.cpp: 361"; + rLen = 0; + rLoc = 9634; + rType = 0; + vrLen = 745; + vrLoc = 9406; + }; + 6BF5F482117644A2000502A6 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6B1185FC10068B040018F96F /* DetourCommon.h */; + name = "DetourCommon.h: 118"; + rLen = 0; + rLoc = 3389; + rType = 0; + vrLen = 468; + vrLoc = 3129; + }; + 6BF5F483117644A2000502A6 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6B8DE88810B69E3E00DF20FB /* DetourNavMeshBuilder.cpp */; + name = "DetourNavMeshBuilder.cpp: 414"; + rLen = 0; + rLoc = 11979; + rType = 0; + vrLen = 732; + vrLoc = 11498; + }; + 6BF5F484117644A2000502A6 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6B1185FD10068B150018F96F /* DetourCommon.cpp */; + name = "DetourCommon.cpp: 205"; + rLen = 0; + rLoc = 5158; + rType = 0; + vrLen = 694; + vrLoc = 4839; + }; + 6BF5F485117644A2000502A6 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + comments = "error: 'vdist' was not declared in this scope"; + fRef = 6B8DE88710B69E3E00DF20FB /* DetourNavMesh.cpp */; + rLen = 1; + rLoc = 1400; + rType = 1; + }; + 6BF5F486117644A2000502A6 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BB93C7A10CFE1D500F74F2B /* DebugDraw.cpp */; + name = "DebugDraw.cpp: 68"; + rLen = 0; + rLoc = 2304; + rType = 0; + vrLen = 1196; + vrLoc = 2054; + }; + 6BF5F487117644A2000502A6 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6B8DE88710B69E3E00DF20FB /* DetourNavMesh.cpp */; + name = "DetourNavMesh.cpp: 1434"; + rLen = 0; + rLoc = 3950; + rType = 0; + vrLen = 757; + vrLoc = 38453; + }; + 6BF5F488117644A2000502A6 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6B137C7E0F7FCBFE00459200 /* Recast.h */; + name = "Recast.h: 384"; + rLen = 0; + rLoc = 12739; + rType = 0; + vrLen = 890; + vrLoc = 12575; + }; + 6BF5F489117644A2000502A6 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6B137C820F7FCC1100459200 /* Recast.cpp */; + name = "Recast.cpp: 223"; + rLen = 0; + rLoc = 6024; + rType = 0; + vrLen = 1070; + vrLoc = 5556; + }; + 6BF5F48A117644A2000502A6 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6B137C830F7FCC1100459200 /* RecastContour.cpp */; + name = "RecastContour.cpp: 568"; + rLen = 0; + rLoc = 14572; + rType = 0; + vrLen = 569; + vrLoc = 14318; + }; + 6BF5F48B117644A2000502A6 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6B137C870F7FCC1100459200 /* RecastMesh.cpp */; + name = "RecastMesh.cpp: 1137"; + rLen = 0; + rLoc = 29099; + rType = 0; + vrLen = 830; + vrLoc = 30056; + }; + 6BF5F48C117644A2000502A6 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6B137C880F7FCC1100459200 /* RecastRasterization.cpp */; + name = "RecastRasterization.cpp: 204"; + rLen = 0; + rLoc = 5144; + rType = 0; + vrLen = 828; + vrLoc = 9067; + }; + 6BF5F48D117644A2000502A6 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6B2AEC520FFB8958005BE9CC /* Sample_TileMesh.cpp */; + name = "Sample_TileMesh.cpp: 696"; + rLen = 0; + rLoc = 17086; + rType = 0; + vrLen = 1038; + vrLoc = 16714; + }; + 6BF5F48E117644A2000502A6 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6B624169103434880002E346 /* RecastMeshDetail.cpp */; + name = "RecastMeshDetail.cpp: 1203"; + rLen = 57; + rLoc = 29424; + rType = 0; + vrLen = 684; + vrLoc = 29073; + }; + 6BF5F48F117644A2000502A6 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BA1E88810C7BFC9008007F6 /* Sample_SoloMeshSimple.cpp */; + name = "Sample_SoloMeshSimple.cpp: 374"; + rLen = 0; + rLoc = 11354; + rType = 0; + vrLen = 1078; + vrLoc = 10840; + }; + 6BF5F490117644A2000502A6 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BA1E88910C7BFC9008007F6 /* Sample_SoloMeshTiled.cpp */; + name = "Sample_SoloMeshTiled.cpp: 720"; + rLen = 0; + rLoc = 20934; + rType = 0; + vrLen = 992; + vrLoc = 20465; + }; + 6BF5F491117644A2000502A6 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BB7FC0A10EBB6AA006DA0A6 /* NavMeshTesterTool.cpp */; + name = "NavMeshTesterTool.cpp: 343"; + rLen = 41; + rLoc = 9088; + rType = 0; + vrLen = 668; + vrLoc = 8760; + }; + 6BF5F492117644A2000502A6 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BB7FDA410F36F0E006DA0A6 /* InputGeom.cpp */; + name = "InputGeom.cpp: 292"; + rLen = 0; + rLoc = 7189; + rType = 0; + vrLen = 519; + vrLoc = 7170; + }; + 6BF5F493117644A2000502A6 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BCF32351104CD05009445BF /* OffMeshConnectionTool.cpp */; + name = "OffMeshConnectionTool.cpp: 121"; + rLen = 0; + rLoc = 2918; + rType = 0; + vrLen = 463; + vrLoc = 2866; + }; + 6BF5F494117644A2000502A6 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BF7C13F1111953A002B3F46 /* TestCase.cpp */; + name = "TestCase.cpp: 289"; + rLen = 0; + rLoc = 6946; + rType = 0; + vrLen = 750; + vrLoc = 7612; + }; + 6BF5F495117644A2000502A6 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BF7C4531115C277002B3F46 /* RecastArea.cpp */; + name = "RecastArea.cpp: 276"; + rLen = 0; + rLoc = 7726; + rType = 0; + vrLen = 502; + vrLoc = 8390; + }; + 6BF5F496117644A2000502A6 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6B324C65111C5D9A00EBD2FD /* ConvexVolumeTool.cpp */; + name = "ConvexVolumeTool.cpp: 220"; + rLen = 0; + rLoc = 5379; + rType = 0; + vrLen = 798; + vrLoc = 5916; + }; + 6BF5F497117644A2000502A6 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6B8036AD113BAABE005ED67B /* Sample_Debug.cpp */; + name = "Sample_Debug.cpp: 162"; + rLen = 0; + rLoc = 3931; + rType = 0; + vrLen = 825; + vrLoc = 3571; + }; + 6BF5F498117644A2000502A6 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BB7FC0A10EBB6AA006DA0A6 /* NavMeshTesterTool.cpp */; + name = "NavMeshTesterTool.cpp: 328"; + rLen = 0; + rLoc = 8564; + rType = 0; + vrLen = 913; + vrLoc = 8125; + }; + 6BF5F499117644A2000502A6 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BA1E88910C7BFC9008007F6 /* Sample_SoloMeshTiled.cpp */; + name = "Sample_SoloMeshTiled.cpp: 740"; + rLen = 0; + rLoc = 21558; + rType = 0; + vrLen = 802; + vrLoc = 21238; + }; + 6BF5F49A117644A2000502A6 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BA1E88810C7BFC9008007F6 /* Sample_SoloMeshSimple.cpp */; + name = "Sample_SoloMeshSimple.cpp: 626"; + rLen = 0; + rLoc = 19258; + rType = 0; + vrLen = 837; + vrLoc = 18776; + }; + 6BF5F49B117644A2000502A6 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6B624169103434880002E346 /* RecastMeshDetail.cpp */; + name = "RecastMeshDetail.cpp: 696"; + rLen = 0; + rLoc = 16693; + rType = 0; + vrLen = 646; + vrLoc = 16259; + }; + 6BF5F49C117644A2000502A6 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6B2AEC520FFB8958005BE9CC /* Sample_TileMesh.cpp */; + name = "Sample_TileMesh.cpp: 964"; + rLen = 0; + rLoc = 25328; + rType = 0; + vrLen = 830; + vrLoc = 24874; + }; + 6BF5F49D117644A2000502A6 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6B137C880F7FCC1100459200 /* RecastRasterization.cpp */; + name = "RecastRasterization.cpp: 228"; + rLen = 0; + rLoc = 5843; + rType = 0; + vrLen = 701; + vrLoc = 5633; + }; + 6BF5F49E117644A2000502A6 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6B137C870F7FCC1100459200 /* RecastMesh.cpp */; + name = "RecastMesh.cpp: 823"; + rLen = 0; + rLoc = 20942; + rType = 0; + vrLen = 524; + vrLoc = 20593; + }; + 6BF5F49F117644A2000502A6 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6B137C830F7FCC1100459200 /* RecastContour.cpp */; + name = "RecastContour.cpp: 569"; + rLen = 0; + rLoc = 14629; + rType = 0; + vrLen = 603; + vrLoc = 14302; + }; + 6BF5F4A0117644A2000502A6 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BA1E88910C7BFC9008007F6 /* Sample_SoloMeshTiled.cpp */; + name = "Sample_SoloMeshTiled.cpp: 1085"; + rLen = 0; + rLoc = 32437; + rType = 0; + vrLen = 837; + vrLoc = 31955; + }; + 6BF5F4A1117644A2000502A6 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BB7FC0A10EBB6AA006DA0A6 /* NavMeshTesterTool.cpp */; + name = "NavMeshTesterTool.cpp: 361"; + rLen = 0; + rLoc = 9634; + rType = 0; + vrLen = 745; + vrLoc = 9406; + }; + 6BF5F4A2117644A2000502A6 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6B1185FC10068B040018F96F /* DetourCommon.h */; + name = "DetourCommon.h: 118"; + rLen = 0; + rLoc = 3391; + rType = 0; + vrLen = 468; + vrLoc = 3129; + }; + 6BF5F4A3117644A2000502A6 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6B8DE88810B69E3E00DF20FB /* DetourNavMeshBuilder.cpp */; + name = "DetourNavMeshBuilder.cpp: 379"; + rLen = 0; + rLoc = 10725; + rType = 0; + vrLen = 928; + vrLoc = 10307; + }; + 6BF5F4A4117644A2000502A6 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6B1185FC10068B040018F96F /* DetourCommon.h */; + name = "DetourCommon.h: 118"; + rLen = 0; + rLoc = 3389; + rType = 0; + vrLen = 468; + vrLoc = 3129; + }; + 6BF5F4A5117644A2000502A6 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6B8DE88810B69E3E00DF20FB /* DetourNavMeshBuilder.cpp */; + name = "DetourNavMeshBuilder.cpp: 414"; + rLen = 0; + rLoc = 11979; + rType = 0; + vrLen = 732; + vrLoc = 11498; + }; + 6BF5F4A6117644A2000502A6 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6B1185FD10068B150018F96F /* DetourCommon.cpp */; + name = "DetourCommon.cpp: 205"; + rLen = 0; + rLoc = 5158; + rType = 0; + vrLen = 694; + vrLoc = 4839; + }; + 6BF5F4A7117644A2000502A6 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6B8DE88710B69E3E00DF20FB /* DetourNavMesh.cpp */; + name = "DetourNavMesh.cpp: 1396"; + rLen = 0; + rLoc = 37873; + rType = 0; + vrLen = 703; + vrLoc = 37368; + }; + 6BF5F4B1117644A2000502A6 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6BF5F2B911747E6F000502A6 /* glimage.h */; + name = "glimage.h: 30"; + rLen = 71; + rLoc = 419; + rType = 0; + vrLen = 495; + vrLoc = 0; + }; 6BF7C13E11119520002B3F46 /* TestCase.h */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {815, 1264}}"; @@ -2883,16 +3502,16 @@ }; 6BF7C13F1111953A002B3F46 /* TestCase.cpp */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {815, 5232}}"; - sepNavSelRange = "{1047, 0}"; - sepNavVisRange = "{446, 731}"; + sepNavIntBoundsRect = "{{0, 0}, {909, 5080}}"; + sepNavSelRange = "{6946, 0}"; + sepNavVisRange = "{8025, 337}"; }; }; 6BF7C4531115C277002B3F46 /* RecastArea.cpp */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {815, 5216}}"; - sepNavSelRange = "{8512, 0}"; - sepNavVisRange = "{8137, 628}"; + sepNavIntBoundsRect = "{{0, 0}, {909, 5316}}"; + sepNavSelRange = "{7726, 0}"; + sepNavVisRange = "{8604, 288}"; }; }; 8D1107260486CEB800E47090 /* Recast */ = { diff --git a/RecastDemo/Build/Xcode/Recast.xcodeproj/memon.perspectivev3 b/RecastDemo/Build/Xcode/Recast.xcodeproj/memon.perspectivev3 index 309c3a0..a6477e0 100644 --- a/RecastDemo/Build/Xcode/Recast.xcodeproj/memon.perspectivev3 +++ b/RecastDemo/Build/Xcode/Recast.xcodeproj/memon.perspectivev3 @@ -216,10 +216,10 @@ _historyCapacity 0 bookmark - 6BF5F3751175AACB000502A6 + 6BF5F4B1117644A2000502A6 history - 6BF5F2B811747E6F000502A6 + 6BF5F3751175AACB000502A6 SplitCount @@ -323,8 +323,8 @@ PBXSmartGroupTreeModuleOutlineStateSelectionKey - 5 - 2 + 18 + 11 1 0 @@ -365,7 +365,7 @@ PBXProjectModuleGUID 6B8632A30F78115100E2684A PBXProjectModuleLabel - DebugDraw.cpp + DetourNavMesh.cpp PBXSplitModuleInNavigatorKey Split0 @@ -373,23 +373,19 @@ PBXProjectModuleGUID 6B8632A40F78115100E2684A PBXProjectModuleLabel - DebugDraw.cpp + DetourNavMesh.cpp _historyCapacity 0 bookmark - 6BF5F3741175AACB000502A6 + 6BF5F4A7117644A2000502A6 history - 6BBB4A94115B4F3400CF791D - 6BBB4A95115B4F3400CF791D 6BBB4A96115B4F3400CF791D 6BBB4A99115B4F3400CF791D 6BBB4A9A115B4F3400CF791D 6BBB4A9B115B4F3400CF791D 6BBB4A9E115B4F3400CF791D - 6BBB4AA0115B4F3400CF791D 6BBB4AA1115B4F3400CF791D - 6BBB4AA2115B4F3400CF791D 6BBB4AA3115B4F3400CF791D 6BBB4AA4115B4F3400CF791D 6BBB4AA5115B4F3400CF791D @@ -397,39 +393,27 @@ 6BBB4AA7115B4F3400CF791D 6BBB4AAB115B4F3400CF791D 6BBB4AB0115B4F3400CF791D - 6BBB4AB1115B4F3400CF791D 6BBB4AB2115B4F3400CF791D 6BBB4AB3115B4F3400CF791D 6BBB4AB4115B4F3400CF791D 6BBB4ABB115B4F3400CF791D - 6BBB4ABD115B4F3400CF791D 6BBB4ABE115B4F3400CF791D 6BBB4ABF115B4F3400CF791D - 6BBB4AC0115B4F3400CF791D 6BBB4AC1115B4F3400CF791D 6BBB4AC2115B4F3400CF791D - 6BBB4AC3115B4F3400CF791D 6BBB4AC4115B4F3400CF791D - 6BBB4AC5115B4F3400CF791D 6BBB4AC6115B4F3400CF791D - 6BBB4AC8115B4F3400CF791D - 6BBB4AC9115B4F3400CF791D 6BBB4ACB115B4F3400CF791D 6BBB4ACD115B4F3400CF791D - 6BBB4B7A115B639200CF791D - 6BBB4B7D115B639200CF791D 6BBB4B7F115B639200CF791D 6BBB4C34115B7A3D00CF791D 6BED8AE2117451EB00582F38 - 6BED8AEE117455CB00582F38 - 6BED8AF21174567000582F38 6BF5F27011747CFA000502A6 6BF5F27311747CFA000502A6 6BF5F2E411748884000502A6 6BF5F2E511748884000502A6 6BF5F2E611748884000502A6 6BF5F2E711748884000502A6 - 6BF5F2E911748884000502A6 6BF5F2EA11748884000502A6 6BF5F30E1174904B000502A6 6BF5F31C117490A1000502A6 @@ -437,14 +421,30 @@ 6BF5F32F11759C3C000502A6 6BF5F33011759C3C000502A6 6BF5F33111759C3C000502A6 - 6BF5F33211759C3C000502A6 - 6BF5F33311759C3C000502A6 - 6BF5F33411759C3C000502A6 6BF5F36A1175A3C9000502A6 - 6BF5F36E1175AACB000502A6 6BF5F36F1175AACB000502A6 6BF5F3701175AACB000502A6 - 6BBB4A9C115B4F3400CF791D + 6BF5F471117644A2000502A6 + 6BF5F472117644A2000502A6 + 6BF5F473117644A2000502A6 + 6BF5F474117644A2000502A6 + 6BF5F475117644A2000502A6 + 6BF5F476117644A2000502A6 + 6BF5F477117644A2000502A6 + 6BF5F478117644A2000502A6 + 6BF5F479117644A2000502A6 + 6BF5F47A117644A2000502A6 + 6BF5F47B117644A2000502A6 + 6BF5F47C117644A2000502A6 + 6BF5F47D117644A2000502A6 + 6BF5F47E117644A2000502A6 + 6BF5F47F117644A2000502A6 + 6BF5F480117644A2000502A6 + 6BF5F481117644A2000502A6 + 6BF5F482117644A2000502A6 + 6BF5F483117644A2000502A6 + 6BF5F484117644A2000502A6 + 6BF5F485117644A2000502A6 prevStack @@ -506,73 +506,45 @@ 6BF5F27811747CFA000502A6 6BF5F28011747CFA000502A6 6BF5F28D11747CFA000502A6 - 6BF5F2EC11748884000502A6 6BF5F2ED11748884000502A6 6BF5F2EE11748884000502A6 - 6BF5F2EF11748884000502A6 - 6BF5F2F011748884000502A6 - 6BF5F2F111748884000502A6 - 6BF5F2F211748884000502A6 - 6BF5F2F311748884000502A6 - 6BF5F2F411748884000502A6 - 6BF5F2F511748884000502A6 - 6BF5F2F611748884000502A6 - 6BF5F2F711748884000502A6 6BF5F2F811748884000502A6 - 6BF5F2F911748884000502A6 - 6BF5F2FA11748884000502A6 - 6BF5F3121174904B000502A6 - 6BF5F3131174904B000502A6 - 6BF5F3141174904B000502A6 - 6BF5F3151174904B000502A6 - 6BF5F31E117490A1000502A6 - 6BF5F31F117490A1000502A6 - 6BF5F33611759C3C000502A6 - 6BF5F33711759C3C000502A6 6BF5F33811759C3C000502A6 6BF5F33911759C3C000502A6 - 6BF5F33A11759C3C000502A6 - 6BF5F33B11759C3C000502A6 - 6BF5F33C11759C3C000502A6 - 6BF5F33D11759C3C000502A6 - 6BF5F33E11759C3C000502A6 - 6BF5F33F11759C3C000502A6 - 6BF5F34011759C3C000502A6 - 6BF5F34111759C3C000502A6 - 6BF5F34211759C3C000502A6 - 6BF5F34311759C3C000502A6 - 6BF5F34411759C3C000502A6 - 6BF5F34511759C3C000502A6 - 6BF5F34611759C3C000502A6 - 6BF5F34711759C3C000502A6 - 6BF5F34811759C3C000502A6 - 6BF5F34911759C3C000502A6 6BF5F34A11759C3C000502A6 - 6BF5F34B11759C3C000502A6 - 6BF5F34C11759C3C000502A6 - 6BF5F34D11759C3C000502A6 - 6BF5F34E11759C3C000502A6 - 6BF5F3541175A187000502A6 - 6BF5F3551175A187000502A6 - 6BF5F3561175A187000502A6 - 6BF5F3571175A187000502A6 - 6BF5F3581175A187000502A6 - 6BF5F3591175A187000502A6 - 6BF5F35A1175A187000502A6 - 6BF5F35B1175A187000502A6 - 6BF5F35C1175A187000502A6 - 6BF5F35D1175A187000502A6 - 6BF5F35E1175A187000502A6 - 6BF5F35F1175A187000502A6 - 6BF5F3601175A187000502A6 - 6BF5F3611175A187000502A6 - 6BF5F3621175A187000502A6 - 6BF5F3631175A187000502A6 - 6BF5F3671175A3A4000502A6 - 6BF5F36B1175A3C9000502A6 - 6BF5F3711175AACB000502A6 - 6BF5F3721175AACB000502A6 - 6BF5F3731175AACB000502A6 + 6BF5F486117644A2000502A6 + 6BF5F487117644A2000502A6 + 6BF5F488117644A2000502A6 + 6BF5F489117644A2000502A6 + 6BF5F48A117644A2000502A6 + 6BF5F48B117644A2000502A6 + 6BF5F48C117644A2000502A6 + 6BF5F48D117644A2000502A6 + 6BF5F48E117644A2000502A6 + 6BF5F48F117644A2000502A6 + 6BF5F490117644A2000502A6 + 6BF5F491117644A2000502A6 + 6BF5F492117644A2000502A6 + 6BF5F493117644A2000502A6 + 6BF5F494117644A2000502A6 + 6BF5F495117644A2000502A6 + 6BF5F496117644A2000502A6 + 6BF5F497117644A2000502A6 + 6BF5F498117644A2000502A6 + 6BF5F499117644A2000502A6 + 6BF5F49A117644A2000502A6 + 6BF5F49B117644A2000502A6 + 6BF5F49C117644A2000502A6 + 6BF5F49D117644A2000502A6 + 6BF5F49E117644A2000502A6 + 6BF5F49F117644A2000502A6 + 6BF5F4A0117644A2000502A6 + 6BF5F4A1117644A2000502A6 + 6BF5F4A2117644A2000502A6 + 6BF5F4A3117644A2000502A6 + 6BF5F4A4117644A2000502A6 + 6BF5F4A5117644A2000502A6 + 6BF5F4A6117644A2000502A6 SplitCount @@ -586,18 +558,18 @@ GeometryConfiguration Frame - {{0, 0}, {970, 546}} + {{0, 0}, {970, 456}} RubberWindowFrame 13 75 1256 702 0 0 1280 778 Module PBXNavigatorGroup Proportion - 546pt + 456pt Proportion - 110pt + 200pt Tabs @@ -611,7 +583,7 @@ GeometryConfiguration Frame - {{10, 27}, {970, 92}} + {{10, 27}, {970, 83}} Module XCDetailModule @@ -665,7 +637,7 @@ GeometryConfiguration Frame - {{10, 27}, {970, 83}} + {{10, 27}, {970, 173}} RubberWindowFrame 13 75 1256 702 0 0 1280 778 @@ -695,11 +667,11 @@ TableOfContents - 6BF5F2FC11748884000502A6 + 6BF5F4A8117644A2000502A6 1CA23ED40692098700951B8B - 6BF5F2FD11748884000502A6 + 6BF5F4A9117644A2000502A6 6B8632A30F78115100E2684A - 6BF5F2FE11748884000502A6 + 6BF5F4AA117644A2000502A6 1CA23EDF0692099D00951B8B 1CA23EE00692099D00951B8B 1CA23EE10692099D00951B8B @@ -848,14 +820,14 @@ TableOfContents - 6BF5F2FF11748884000502A6 + 6BF5F4AB117644A2000502A6 1CCC7628064C1048000F2A68 1CCC7629064C1048000F2A68 - 6BF5F30011748884000502A6 - 6BF5F30111748884000502A6 - 6BF5F30211748884000502A6 - 6BF5F30311748884000502A6 - 6BF5F30411748884000502A6 + 6BF5F4AC117644A2000502A6 + 6BF5F4AD117644A2000502A6 + 6BF5F4AE117644A2000502A6 + 6BF5F4AF117644A2000502A6 + 6BF5F4B0117644A2000502A6 ToolbarConfigUserDefaultsMinorVersion 2 @@ -887,8 +859,6 @@ 5 WindowOrderList - 6BF5F322117490A1000502A6 - 6BF5F323117490A1000502A6 6BF5F29911747CFA000502A6 /Users/memon/Code/recastnavigation/RecastDemo/Build/Xcode/Recast.xcodeproj diff --git a/RecastDemo/Source/ConvexVolumeTool.cpp b/RecastDemo/Source/ConvexVolumeTool.cpp index d137ed5..f571a04 100644 --- a/RecastDemo/Source/ConvexVolumeTool.cpp +++ b/RecastDemo/Source/ConvexVolumeTool.cpp @@ -191,14 +191,14 @@ void ConvexVolumeTool::handleClick(const float* p, bool shift) // Create // If clicked on that last pt, create the shape. - if (m_npts && vdistSqr(p, &m_pts[(m_npts-1)*3]) < rcSqr(0.2f)) + if (m_npts && rcVdistSqr(p, &m_pts[(m_npts-1)*3]) < rcSqr(0.2f)) { if (m_nhull > 2) { // Create shape. float verts[MAX_PTS*3]; for (int i = 0; i < m_nhull; ++i) - vcopy(&verts[i*3], &m_pts[m_hull[i]*3]); + rcVcopy(&verts[i*3], &m_pts[m_hull[i]*3]); float minh = FLT_MAX, maxh = 0; for (int i = 0; i < m_nhull; ++i) @@ -217,7 +217,7 @@ void ConvexVolumeTool::handleClick(const float* p, bool shift) // Add new point if (m_npts < MAX_PTS) { - vcopy(&m_pts[m_npts*3], p); + rcVcopy(&m_pts[m_npts*3], p); m_npts++; // Update hull. if (m_npts > 1) diff --git a/RecastDemo/Source/InputGeom.cpp b/RecastDemo/Source/InputGeom.cpp index 8cfa278..1397a00 100644 --- a/RecastDemo/Source/InputGeom.cpp +++ b/RecastDemo/Source/InputGeom.cpp @@ -36,32 +36,32 @@ static bool intersectSegmentTriangle(const float* sp, const float* sq, { float v, w; float ab[3], ac[3], qp[3], ap[3], norm[3], e[3]; - vsub(ab, b, a); - vsub(ac, c, a); - vsub(qp, sp, sq); + rcVsub(ab, b, a); + rcVsub(ac, c, a); + rcVsub(qp, sp, sq); // Compute triangle normal. Can be precalculated or cached if // intersecting multiple segments against the same triangle - vcross(norm, ab, ac); + rcVcross(norm, ab, ac); // Compute denominator d. If d <= 0, segment is parallel to or points // away from triangle, so exit early - float d = vdot(qp, norm); + float d = rcVdot(qp, norm); if (d <= 0.0f) return false; // Compute intersection t value of pq with plane of triangle. A ray // intersects iff 0 <= t. Segment intersects iff 0 <= t <= 1. Delay // dividing by d until intersection has been found to pierce triangle - vsub(ap, sp, a); - t = vdot(ap, norm); + rcVsub(ap, sp, a); + t = rcVdot(ap, norm); if (t < 0.0f) return false; if (t > d) return false; // For segment; exclude this code line for a ray test // Compute barycentric coordinate components and test if within bounds - vcross(e, qp, ap); - v = vdot(ac, e); + rcVcross(e, qp, ap); + v = rcVdot(ac, e); if (v < 0.0f || v > d) return false; - w = -vdot(ab, e); + w = -rcVdot(ab, e); if (w < 0.0f || v + w > d) return false; // Segment/ray intersects triangle. Perform delayed division @@ -289,7 +289,7 @@ bool InputGeom::save(const char* filepath) bool InputGeom::raycastMesh(float* src, float* dst, float& tmin) { float dir[3]; - vsub(dir, dst, src); + rcVsub(dir, dst, src); int nt = m_mesh->getTriCount(); const float* verts = m_mesh->getVerts(); @@ -301,7 +301,7 @@ bool InputGeom::raycastMesh(float* src, float* dst, float& tmin) for (int i = 0; i < nt*3; i += 3) { const float* n = &normals[i]; - if (vdot(dir, n) > 0) + if (rcVdot(dir, n) > 0) continue; float t = 1; @@ -328,8 +328,8 @@ void InputGeom::addOffMeshConnection(const float* spos, const float* epos, const m_offMeshConDirs[m_offMeshConCount] = bidir; m_offMeshConAreas[m_offMeshConCount] = area; m_offMeshConFlags[m_offMeshConCount] = flags; - vcopy(&v[0], spos); - vcopy(&v[3], epos); + rcVcopy(&v[0], spos); + rcVcopy(&v[3], epos); m_offMeshConCount++; } @@ -338,8 +338,8 @@ void InputGeom::deleteOffMeshConnection(int i) m_offMeshConCount--; float* src = &m_offMeshConVerts[m_offMeshConCount*3*2]; float* dst = &m_offMeshConVerts[i*3*2]; - vcopy(&dst[0], &src[0]); - vcopy(&dst[3], &src[3]); + rcVcopy(&dst[0], &src[0]); + rcVcopy(&dst[3], &src[3]); m_offMeshConRads[i] = m_offMeshConRads[m_offMeshConCount]; m_offMeshConDirs[i] = m_offMeshConDirs[m_offMeshConCount]; m_offMeshConAreas[i] = m_offMeshConAreas[m_offMeshConCount]; diff --git a/RecastDemo/Source/NavMeshTesterTool.cpp b/RecastDemo/Source/NavMeshTesterTool.cpp index b801bc5..92d2383 100644 --- a/RecastDemo/Source/NavMeshTesterTool.cpp +++ b/RecastDemo/Source/NavMeshTesterTool.cpp @@ -66,7 +66,7 @@ static bool getSteerTarget(dtNavMesh* navMesh, const float* startPos, const floa { *outPointCount = nsteerPath; for (int i = 0; i < nsteerPath; ++i) - vcopy(&outPoints[i*3], &steerPath[i*3]); + rcVcopy(&outPoints[i*3], &steerPath[i*3]); } @@ -84,7 +84,7 @@ static bool getSteerTarget(dtNavMesh* navMesh, const float* startPos, const floa if (ns >= nsteerPath) return false; - vcopy(steerPos, &steerPath[ns*3]); + rcVcopy(steerPos, &steerPath[ns*3]); steerPosFlag = steerPathFlags[ns]; steerPosRef = steerPathPolys[ns]; @@ -258,12 +258,12 @@ void NavMeshTesterTool::handleClick(const float* p, bool shift) if (shift) { m_sposSet = true; - vcopy(m_spos, p); + rcVcopy(m_spos, p); } else { m_eposSet = true; - vcopy(m_epos, p); + rcVcopy(m_epos, p); } recalc(); } @@ -297,12 +297,12 @@ void NavMeshTesterTool::handleStep() m_nsmoothPath = 0; - vcopy(&m_smoothPath[m_nsmoothPath*3], m_iterPos); + rcVcopy(&m_smoothPath[m_nsmoothPath*3], m_iterPos); m_nsmoothPath++; } } - vcopy(m_prevIterPos, m_iterPos); + rcVcopy(m_prevIterPos, m_iterPos); m_pathIterNum++; @@ -325,22 +325,22 @@ void NavMeshTesterTool::handleStep() m_steerPoints, &m_steerPointCount)) return; - vcopy(m_steerPos, steerPos); + rcVcopy(m_steerPos, steerPos); bool endOfPath = (steerPosFlag & DT_STRAIGHTPATH_END) ? true : false; bool offMeshConnection = (steerPosFlag & DT_STRAIGHTPATH_OFFMESH_CONNECTION) ? true : false; // Find movement delta. float delta[3], len; - vsub(delta, steerPos, m_iterPos); - len = sqrtf(vdot(delta,delta)); + rcVsub(delta, steerPos, m_iterPos); + len = sqrtf(rcVdot(delta,delta)); // If the steer target is end of path or off-mesh link, do not move past the location. if ((endOfPath || offMeshConnection) && len < STEP_SIZE) len = 1; else len = STEP_SIZE / len; float moveTgt[3]; - vmad(moveTgt, m_iterPos, delta, len); + rcVmad(moveTgt, m_iterPos, delta, len); // Move float result[3]; @@ -355,16 +355,16 @@ void NavMeshTesterTool::handleStep() m_pathIterPolyCount -= n; } // Update position. - vcopy(m_iterPos, result); + rcVcopy(m_iterPos, result); // Handle end of path and off-mesh links when close enough. if (endOfPath && inRange(m_iterPos, steerPos, SLOP, 1.0f)) { // Reached end of path. - vcopy(m_iterPos, m_targetPos); + rcVcopy(m_iterPos, m_targetPos); if (m_nsmoothPath < MAX_SMOOTH) { - vcopy(&m_smoothPath[m_nsmoothPath*3], m_iterPos); + rcVcopy(&m_smoothPath[m_nsmoothPath*3], m_iterPos); m_nsmoothPath++; } return; @@ -389,17 +389,17 @@ void NavMeshTesterTool::handleStep() { if (m_nsmoothPath < MAX_SMOOTH) { - vcopy(&m_smoothPath[m_nsmoothPath*3], startPos); + rcVcopy(&m_smoothPath[m_nsmoothPath*3], startPos); m_nsmoothPath++; // Hack to make the dotted path not visible during off-mesh connection. if (m_nsmoothPath & 1) { - vcopy(&m_smoothPath[m_nsmoothPath*3], startPos); + rcVcopy(&m_smoothPath[m_nsmoothPath*3], startPos); m_nsmoothPath++; } } // Move position at the other side of the off-mesh link. - vcopy(m_iterPos, endPos); + rcVcopy(m_iterPos, endPos); float h; m_navMesh->getPolyHeight(m_pathIterPolys[0], m_iterPos, &h); m_iterPos[1] = h; @@ -409,7 +409,7 @@ void NavMeshTesterTool::handleStep() // Store results. if (m_nsmoothPath < MAX_SMOOTH) { - vcopy(&m_smoothPath[m_nsmoothPath*3], m_iterPos); + rcVcopy(&m_smoothPath[m_nsmoothPath*3], m_iterPos); m_nsmoothPath++; } @@ -473,7 +473,7 @@ void NavMeshTesterTool::recalc() m_nsmoothPath = 0; - vcopy(&m_smoothPath[m_nsmoothPath*3], iterPos); + rcVcopy(&m_smoothPath[m_nsmoothPath*3], iterPos); m_nsmoothPath++; // Move towards target a small advancement at a time until target reached or @@ -494,15 +494,15 @@ void NavMeshTesterTool::recalc() // Find movement delta. float delta[3], len; - vsub(delta, steerPos, iterPos); - len = sqrtf(vdot(delta,delta)); + rcVsub(delta, steerPos, iterPos); + len = sqrtf(rcVdot(delta,delta)); // If the steer target is end of path or off-mesh link, do not move past the location. if ((endOfPath || offMeshConnection) && len < STEP_SIZE) len = 1; else len = STEP_SIZE / len; float moveTgt[3]; - vmad(moveTgt, iterPos, delta, len); + rcVmad(moveTgt, iterPos, delta, len); // Move float result[3]; @@ -517,16 +517,16 @@ void NavMeshTesterTool::recalc() npolys -= n; } // Update position. - vcopy(iterPos, result); + rcVcopy(iterPos, result); // Handle end of path and off-mesh links when close enough. if (endOfPath && inRange(iterPos, steerPos, SLOP, 1.0f)) { // Reached end of path. - vcopy(iterPos, targetPos); + rcVcopy(iterPos, targetPos); if (m_nsmoothPath < MAX_SMOOTH) { - vcopy(&m_smoothPath[m_nsmoothPath*3], iterPos); + rcVcopy(&m_smoothPath[m_nsmoothPath*3], iterPos); m_nsmoothPath++; } break; @@ -551,17 +551,17 @@ void NavMeshTesterTool::recalc() { if (m_nsmoothPath < MAX_SMOOTH) { - vcopy(&m_smoothPath[m_nsmoothPath*3], startPos); + rcVcopy(&m_smoothPath[m_nsmoothPath*3], startPos); m_nsmoothPath++; // Hack to make the dotted path not visible during off-mesh connection. if (m_nsmoothPath & 1) { - vcopy(&m_smoothPath[m_nsmoothPath*3], startPos); + rcVcopy(&m_smoothPath[m_nsmoothPath*3], startPos); m_nsmoothPath++; } } // Move position at the other side of the off-mesh link. - vcopy(iterPos, endPos); + rcVcopy(iterPos, endPos); float h; m_navMesh->getPolyHeight(polys[0], iterPos, &h); iterPos[1] = h; @@ -571,7 +571,7 @@ void NavMeshTesterTool::recalc() // Store results. if (m_nsmoothPath < MAX_SMOOTH) { - vcopy(&m_smoothPath[m_nsmoothPath*3], iterPos); + rcVcopy(&m_smoothPath[m_nsmoothPath*3], iterPos); m_nsmoothPath++; } } @@ -628,7 +628,7 @@ void NavMeshTesterTool::recalc() if (t > 1) { // No hit - vcopy(m_hitPos, m_epos); + rcVcopy(m_hitPos, m_epos); m_hitResult = false; } else @@ -645,7 +645,7 @@ void NavMeshTesterTool::recalc() } m_hitResult = true; } - vcopy(&m_straightPath[3], m_hitPos); + rcVcopy(&m_straightPath[3], m_hitPos); } } else if (m_toolMode == TOOLMODE_DISTANCE_TO_WALL) diff --git a/RecastDemo/Source/OffMeshConnectionTool.cpp b/RecastDemo/Source/OffMeshConnectionTool.cpp index 5505471..9ede57d 100644 --- a/RecastDemo/Source/OffMeshConnectionTool.cpp +++ b/RecastDemo/Source/OffMeshConnectionTool.cpp @@ -99,7 +99,7 @@ void OffMeshConnectionTool::handleClick(const float* p, bool shift) for (int i = 0; i < geom->getOffMeshConnectionCount()*2; ++i) { const float* v = &verts[i*3]; - float d = vdistSqr(p, v); + float d = rcVdistSqr(p, v); if (d < nearestDist) { nearestDist = d; @@ -118,7 +118,7 @@ void OffMeshConnectionTool::handleClick(const float* p, bool shift) // Create if (!m_hitPosSet) { - vcopy(m_hitPos, p); + rcVcopy(m_hitPos, p); m_hitPosSet = true; } else diff --git a/RecastDemo/Source/Sample_Debug.cpp b/RecastDemo/Source/Sample_Debug.cpp index 8ad8a30..a62972c 100644 --- a/RecastDemo/Source/Sample_Debug.cpp +++ b/RecastDemo/Source/Sample_Debug.cpp @@ -159,8 +159,8 @@ void Sample_Debug::handleRender() duDebugDrawNavMeshPoly(&dd, m_navMesh, m_ref, duRGBA(255,0,0,128)); float bmin[3], bmax[3]; - vsub(bmin, m_center, m_ext); - vadd(bmax, m_center, m_ext); + rcVsub(bmin, m_center, m_ext); + rcVadd(bmax, m_center, m_ext); duDebugDrawBoxWire(&dd, bmin[0],bmin[1],bmin[2], bmax[0],bmax[1],bmax[2], duRGBA(255,255,255,128), 1.0f); duDebugDrawCross(&dd, m_center[0], m_center[1], m_center[2], 1.0f, duRGBA(255,255,255,128), 2.0f); diff --git a/RecastDemo/Source/Sample_SoloMeshSimple.cpp b/RecastDemo/Source/Sample_SoloMeshSimple.cpp index 237b57f..0022ac3 100644 --- a/RecastDemo/Source/Sample_SoloMeshSimple.cpp +++ b/RecastDemo/Source/Sample_SoloMeshSimple.cpp @@ -370,8 +370,8 @@ bool Sample_SoloMeshSimple::handleBuild() // Set the area where the navigation will be build. // Here the bounds of the input mesh are used, but the // area could be specified by an user defined box, etc. - vcopy(m_cfg.bmin, bmin); - vcopy(m_cfg.bmax, bmax); + rcVcopy(m_cfg.bmin, bmin); + rcVcopy(m_cfg.bmax, bmax); rcCalcGridSize(m_cfg.bmin, m_cfg.bmax, m_cfg.cs, &m_cfg.width, &m_cfg.height); // Reset build times gathering. @@ -622,8 +622,8 @@ bool Sample_SoloMeshSimple::handleBuild() params.walkableHeight = m_agentHeight; params.walkableRadius = m_agentRadius; params.walkableClimb = m_agentMaxClimb; - vcopy(params.bmin, m_pmesh->bmin); - vcopy(params.bmax, m_pmesh->bmax); + rcVcopy(params.bmin, m_pmesh->bmin); + rcVcopy(params.bmax, m_pmesh->bmax); params.cs = m_cfg.cs; params.ch = m_cfg.ch; diff --git a/RecastDemo/Source/Sample_SoloMeshTiled.cpp b/RecastDemo/Source/Sample_SoloMeshTiled.cpp index b5ec4c8..9c7febc 100644 --- a/RecastDemo/Source/Sample_SoloMeshTiled.cpp +++ b/RecastDemo/Source/Sample_SoloMeshTiled.cpp @@ -81,7 +81,7 @@ public: virtual void handleClick(const float* p, bool /*shift*/) { m_hitPosSet = true; - vcopy(m_hitPos,p); + rcVcopy(m_hitPos,p); if (m_sample) m_sample->setHighlightedTile(m_hitPos); } @@ -716,8 +716,8 @@ bool Sample_SoloMeshTiled::handleBuild() // Set the area where the navigation will be build. // Here the bounds of the input mesh are used, but the // area could be specified by an user defined box, etc. - vcopy(m_cfg.bmin, bmin); - vcopy(m_cfg.bmax, bmax); + rcVcopy(m_cfg.bmin, bmin); + rcVcopy(m_cfg.bmax, bmax); rcCalcGridSize(m_cfg.bmin, m_cfg.bmax, m_cfg.cs, &m_cfg.width, &m_cfg.height); // Reset build times gathering. @@ -735,8 +735,8 @@ bool Sample_SoloMeshTiled::handleBuild() rcGetLog()->log(RC_LOG_ERROR, "buildTiledNavigation: Out of memory 'tileSet'."); return false; } - vcopy(m_tileSet->bmin, m_cfg.bmin); - vcopy(m_tileSet->bmax, m_cfg.bmax); + rcVcopy(m_tileSet->bmin, m_cfg.bmin); + rcVcopy(m_tileSet->bmax, m_cfg.bmax); m_tileSet->cs = m_cfg.cs; m_tileSet->ch = m_cfg.ch; m_tileSet->width = (m_cfg.width + m_cfg.tileSize-1) / m_cfg.tileSize; @@ -1081,8 +1081,8 @@ bool Sample_SoloMeshTiled::handleBuild() params.walkableHeight = m_agentHeight; params.walkableRadius = m_agentRadius; params.walkableClimb = m_agentMaxClimb; - vcopy(params.bmin, m_pmesh->bmin); - vcopy(params.bmax, m_pmesh->bmax); + rcVcopy(params.bmin, m_pmesh->bmin); + rcVcopy(params.bmax, m_pmesh->bmax); params.cs = m_cfg.cs; params.ch = m_cfg.ch; diff --git a/RecastDemo/Source/Sample_TileMesh.cpp b/RecastDemo/Source/Sample_TileMesh.cpp index 83bbc90..bb332dc 100644 --- a/RecastDemo/Source/Sample_TileMesh.cpp +++ b/RecastDemo/Source/Sample_TileMesh.cpp @@ -115,7 +115,7 @@ public: virtual void handleClick(const float* p, bool shift) { m_hitPosSet = true; - vcopy(m_hitPos,p); + rcVcopy(m_hitPos,p); if (m_sample) { if (shift) @@ -509,7 +509,7 @@ bool Sample_TileMesh::handleBuild() } dtNavMeshParams params; - vcopy(params.orig, m_geom->getMeshBoundsMin()); + rcVcopy(params.orig, m_geom->getMeshBoundsMin()); params.tileWidth = m_tileSize*m_cellSize; params.tileHeight = m_tileSize*m_cellSize; params.maxTiles = m_maxTiles; @@ -692,8 +692,8 @@ unsigned char* Sample_TileMesh::buildTileMesh(const int tx, const int ty, const m_cfg.detailSampleDist = m_detailSampleDist < 0.9f ? 0 : m_cellSize * m_detailSampleDist; m_cfg.detailSampleMaxError = m_cellHeight * m_detailSampleMaxError; - vcopy(m_cfg.bmin, bmin); - vcopy(m_cfg.bmax, bmax); + rcVcopy(m_cfg.bmin, bmin); + rcVcopy(m_cfg.bmax, bmax); m_cfg.bmin[0] -= m_cfg.borderSize*m_cfg.cs; m_cfg.bmin[2] -= m_cfg.borderSize*m_cfg.cs; m_cfg.bmax[0] += m_cfg.borderSize*m_cfg.cs; @@ -960,8 +960,8 @@ unsigned char* Sample_TileMesh::buildTileMesh(const int tx, const int ty, const params.walkableClimb = m_agentMaxClimb; params.tileX = tx; params.tileY = ty; - vcopy(params.bmin, bmin); - vcopy(params.bmax, bmax); + rcVcopy(params.bmin, bmin); + rcVcopy(params.bmax, bmax); params.cs = m_cfg.cs; params.ch = m_cfg.ch; params.tileSize = m_cfg.tileSize; diff --git a/RecastDemo/Source/TestCase.cpp b/RecastDemo/Source/TestCase.cpp index 4e265fd..04a6998 100644 --- a/RecastDemo/Source/TestCase.cpp +++ b/RecastDemo/Source/TestCase.cpp @@ -234,8 +234,8 @@ void TestCase::handleRender() for (Test* iter = m_tests; iter; iter = iter->next) { float dir[3]; - vsub(dir, iter->epos, iter->spos); - vnormalize(dir); + rcVsub(dir, iter->epos, iter->spos); + rcVnormalize(dir); glColor4ub(128,25,0,192); glVertex3f(iter->spos[0],iter->spos[1]-0.3f,iter->spos[2]); glVertex3f(iter->spos[0],iter->spos[1]+0.3f,iter->spos[2]); @@ -273,20 +273,20 @@ bool TestCase::handleRenderOverlay(double* proj, double* model, int* view) float pt[3], dir[3]; if (iter->nstraight) { - vcopy(pt, &iter->straight[3]); - if (vdist(pt, iter->spos) > LABEL_DIST) + rcVcopy(pt, &iter->straight[3]); + if (rcVdist(pt, iter->spos) > LABEL_DIST) { - vsub(dir, pt, iter->spos); - vnormalize(dir); - vmad(pt, iter->spos, dir, LABEL_DIST); + rcVsub(dir, pt, iter->spos); + rcVnormalize(dir); + rcVmad(pt, iter->spos, dir, LABEL_DIST); } pt[1]+=0.5f; } else { - vsub(dir, iter->epos, iter->spos); - vnormalize(dir); - vmad(pt, iter->spos, dir, LABEL_DIST); + rcVsub(dir, iter->epos, iter->spos); + rcVnormalize(dir); + rcVmad(pt, iter->spos, dir, LABEL_DIST); pt[1]+=0.5f; }