Raycast does not try to follow off-mesh links (Issue 64), use references instead of pointers in debugdraw api (Issue 62, Issue 63)
This commit is contained in:
parent
6f1e34e9fe
commit
d5c65a220f
@ -27,8 +27,8 @@ enum DrawNavMeshFlags
|
||||
DU_DRAWNAVMESH_OFFMESHCONS = 0x02
|
||||
};
|
||||
|
||||
void duDebugDrawNavMesh(struct duDebugDraw* dd, const dtNavMesh* mesh, unsigned char flags);
|
||||
void duDebugDrawNavMeshBVTree(struct duDebugDraw* dd, const dtNavMesh* mesh);
|
||||
void duDebugDrawNavMeshPoly(struct duDebugDraw* dd, const dtNavMesh* mesh, dtPolyRef ref, const unsigned int col);
|
||||
void duDebugDrawNavMesh(struct duDebugDraw* dd, const dtNavMesh& mesh, unsigned char flags);
|
||||
void duDebugDrawNavMeshBVTree(struct duDebugDraw* dd, const dtNavMesh& mesh);
|
||||
void duDebugDrawNavMeshPoly(struct duDebugDraw* dd, const dtNavMesh& mesh, dtPolyRef ref, const unsigned int col);
|
||||
|
||||
#endif // DETOURDEBUGDRAW_H
|
@ -55,6 +55,8 @@ inline unsigned int multCol(const unsigned int col, const unsigned int d)
|
||||
|
||||
void duCalcBoxColors(unsigned int* colors, unsigned int colTop, unsigned int colSide)
|
||||
{
|
||||
if (!colors) return;
|
||||
|
||||
colors[0] = multCol(colTop, 250);
|
||||
colors[1] = multCol(colSide, 140);
|
||||
colors[2] = multCol(colSide, 165);
|
||||
@ -66,6 +68,8 @@ void duCalcBoxColors(unsigned int* colors, unsigned int colTop, unsigned int col
|
||||
void duDebugDrawCylinderWire(struct duDebugDraw* dd, float minx, float miny, float minz,
|
||||
float maxx, float maxy, float maxz, unsigned int col, const float lineWidth)
|
||||
{
|
||||
if (!dd) return;
|
||||
|
||||
dd->begin(DU_DRAW_LINES, lineWidth);
|
||||
duAppendCylinderWire(dd, minx,miny,minz, maxx,maxy,maxz, col);
|
||||
dd->end();
|
||||
@ -74,6 +78,8 @@ void duDebugDrawCylinderWire(struct duDebugDraw* dd, float minx, float miny, flo
|
||||
void duDebugDrawBoxWire(struct duDebugDraw* dd, float minx, float miny, float minz,
|
||||
float maxx, float maxy, float maxz, unsigned int col, const float lineWidth)
|
||||
{
|
||||
if (!dd) return;
|
||||
|
||||
dd->begin(DU_DRAW_LINES, lineWidth);
|
||||
duAppendBoxWire(dd, minx,miny,minz, maxx,maxy,maxz, col);
|
||||
dd->end();
|
||||
@ -83,6 +89,8 @@ void duDebugDrawArc(struct duDebugDraw* dd, const float x0, const float y0, cons
|
||||
const float x1, const float y1, const float z1, const float h,
|
||||
const float as0, const float as1, unsigned int col, const float lineWidth)
|
||||
{
|
||||
if (!dd) return;
|
||||
|
||||
dd->begin(DU_DRAW_LINES, lineWidth);
|
||||
duAppendArc(dd, x0,y0,z0, x1,y1,z1, h, as0, as1, col);
|
||||
dd->end();
|
||||
@ -91,6 +99,8 @@ void duDebugDrawArc(struct duDebugDraw* dd, const float x0, const float y0, cons
|
||||
void duDebugDrawCircle(struct duDebugDraw* dd, const float x, const float y, const float z,
|
||||
const float r, unsigned int col, const float lineWidth)
|
||||
{
|
||||
if (!dd) return;
|
||||
|
||||
dd->begin(DU_DRAW_LINES, lineWidth);
|
||||
duAppendCircle(dd, x,y,z, r, col);
|
||||
dd->end();
|
||||
@ -99,6 +109,8 @@ void duDebugDrawCircle(struct duDebugDraw* dd, const float x, const float y, con
|
||||
void duDebugDrawCross(struct duDebugDraw* dd, const float x, const float y, const float z,
|
||||
const float size, unsigned int col, const float lineWidth)
|
||||
{
|
||||
if (!dd) return;
|
||||
|
||||
dd->begin(DU_DRAW_LINES, lineWidth);
|
||||
duAppendCross(dd, x,y,z, size, col);
|
||||
dd->end();
|
||||
@ -107,6 +119,8 @@ void duDebugDrawCross(struct duDebugDraw* dd, const float x, const float y, cons
|
||||
void duDebugDrawBox(struct duDebugDraw* dd, float minx, float miny, float minz,
|
||||
float maxx, float maxy, float maxz, const unsigned int* fcol)
|
||||
{
|
||||
if (!dd) return;
|
||||
|
||||
dd->begin(DU_DRAW_TRIS);
|
||||
duAppendBox(dd, minx,miny,minz, maxx,maxy,maxz, fcol);
|
||||
dd->end();
|
||||
@ -116,6 +130,8 @@ void duDebugDrawGridXZ(struct duDebugDraw* dd, const float ox, const float oy, c
|
||||
const int w, const int h, const float size,
|
||||
const unsigned int col, const float lineWidth)
|
||||
{
|
||||
if (!dd) return;
|
||||
|
||||
dd->begin(DU_DRAW_LINES, lineWidth);
|
||||
for (int i = 0; i <= h; ++i)
|
||||
{
|
||||
@ -134,6 +150,8 @@ void duDebugDrawGridXZ(struct duDebugDraw* dd, const float ox, const float oy, c
|
||||
void duAppendCylinderWire(struct duDebugDraw* dd, float minx, float miny, float minz,
|
||||
float maxx, float maxy, float maxz, unsigned int col)
|
||||
{
|
||||
if (!dd) return;
|
||||
|
||||
static const int NUM_SEG = 16;
|
||||
static float dir[NUM_SEG*2];
|
||||
static bool init = false;
|
||||
@ -170,6 +188,7 @@ void duAppendCylinderWire(struct duDebugDraw* dd, float minx, float miny, float
|
||||
void duAppendBoxWire(struct duDebugDraw* dd, float minx, float miny, float minz,
|
||||
float maxx, float maxy, float maxz, unsigned int col)
|
||||
{
|
||||
if (!dd) return;
|
||||
// Top
|
||||
dd->vertex(minx, miny, minz, col);
|
||||
dd->vertex(maxx, miny, minz, col);
|
||||
@ -204,6 +223,7 @@ void duAppendBoxWire(struct duDebugDraw* dd, float minx, float miny, float minz,
|
||||
void duAppendBoxPoints(struct duDebugDraw* dd, float minx, float miny, float minz,
|
||||
float maxx, float maxy, float maxz, unsigned int col)
|
||||
{
|
||||
if (!dd) return;
|
||||
// Top
|
||||
dd->vertex(minx, miny, minz, col);
|
||||
dd->vertex(maxx, miny, minz, col);
|
||||
@ -228,6 +248,7 @@ void duAppendBoxPoints(struct duDebugDraw* dd, float minx, float miny, float min
|
||||
void duAppendBox(struct duDebugDraw* dd, float minx, float miny, float minz,
|
||||
float maxx, float maxy, float maxz, const unsigned int* fcol)
|
||||
{
|
||||
if (!dd) return;
|
||||
const float verts[8*3] =
|
||||
{
|
||||
minx, miny, minz,
|
||||
@ -296,6 +317,7 @@ inline void vsub(float* dest, const float* v1, const float* v2)
|
||||
void appendArrowHead(struct duDebugDraw* dd, const float* p, const float* q,
|
||||
const float s, unsigned int col)
|
||||
{
|
||||
if (!dd) return;
|
||||
float ax[3], ay[3] = {0,1,0}, az[3];
|
||||
vsub(az, q, p);
|
||||
vnormalize(az);
|
||||
@ -317,6 +339,7 @@ void duAppendArc(struct duDebugDraw* dd, const float x0, const float y0, const f
|
||||
const float x1, const float y1, const float z1, const float h,
|
||||
const float as0, const float as1, unsigned int col)
|
||||
{
|
||||
if (!dd) return;
|
||||
static const int NUM_ARC_PTS = 8;
|
||||
static const float PAD = 0.05f;
|
||||
static const float ARC_PTS_SCALE = (1.0f-PAD*2) / (float)NUM_ARC_PTS;
|
||||
@ -357,6 +380,7 @@ void duAppendArc(struct duDebugDraw* dd, const float x0, const float y0, const f
|
||||
void duAppendCircle(struct duDebugDraw* dd, const float x, const float y, const float z,
|
||||
const float r, unsigned int col)
|
||||
{
|
||||
if (!dd) return;
|
||||
static const int NUM_SEG = 40;
|
||||
static float dir[40*2];
|
||||
static bool init = false;
|
||||
@ -381,6 +405,7 @@ void duAppendCircle(struct duDebugDraw* dd, const float x, const float y, const
|
||||
void duAppendCross(struct duDebugDraw* dd, const float x, const float y, const float z,
|
||||
const float s, unsigned int col)
|
||||
{
|
||||
if (!dd) return;
|
||||
dd->vertex(x-s,y,z, col);
|
||||
dd->vertex(x+s,y,z, col);
|
||||
dd->vertex(x,y-s,z, col);
|
||||
@ -466,8 +491,8 @@ void duDisplayList::end()
|
||||
|
||||
void duDisplayList::draw(struct duDebugDraw* dd)
|
||||
{
|
||||
if (!m_size)
|
||||
return;
|
||||
if (!dd) return;
|
||||
if (!m_size) return;
|
||||
dd->depthMask(m_depthMask);
|
||||
dd->begin(m_prim, m_primSize);
|
||||
for (int i = 0; i < m_size; ++i)
|
||||
|
@ -115,9 +115,9 @@ static void drawPolyBoundaries(duDebugDraw* dd, const dtMeshTile* tile,
|
||||
dd->end();
|
||||
}
|
||||
|
||||
static void drawMeshTile(duDebugDraw* dd, const dtNavMesh* mesh, const dtMeshTile* tile, unsigned char flags)
|
||||
static void drawMeshTile(duDebugDraw* dd, const dtNavMesh& mesh, const dtMeshTile* tile, unsigned char flags)
|
||||
{
|
||||
dtPolyRef base = mesh->getTilePolyRefBase(tile);
|
||||
dtPolyRef base = mesh.getTilePolyRefBase(tile);
|
||||
|
||||
dd->depthMask(false);
|
||||
|
||||
@ -131,7 +131,7 @@ static void drawMeshTile(duDebugDraw* dd, const dtNavMesh* mesh, const dtMeshTil
|
||||
const dtPolyDetail* pd = &tile->detailMeshes[i];
|
||||
|
||||
unsigned int col;
|
||||
if ((flags & DU_DRAWNAVMESH_CLOSEDLIST) && mesh->isInClosedList(base | (dtPolyRef)i))
|
||||
if ((flags & DU_DRAWNAVMESH_CLOSEDLIST) && mesh.isInClosedList(base | (dtPolyRef)i))
|
||||
col = duRGBA(255,196,0,64);
|
||||
else
|
||||
{
|
||||
@ -171,7 +171,7 @@ static void drawMeshTile(duDebugDraw* dd, const dtNavMesh* mesh, const dtMeshTil
|
||||
continue;
|
||||
|
||||
unsigned int col;
|
||||
if ((flags & DU_DRAWNAVMESH_CLOSEDLIST) && mesh->isInClosedList(base | (dtPolyRef)i))
|
||||
if ((flags & DU_DRAWNAVMESH_CLOSEDLIST) && mesh.isInClosedList(base | (dtPolyRef)i))
|
||||
col = duRGBA(255,196,0,220);
|
||||
else
|
||||
col = duDarkenColor(duIntToCol(p->area, 220));
|
||||
@ -314,13 +314,13 @@ static void drawMeshTile(duDebugDraw* dd, const dtNavMesh* mesh, const dtMeshTil
|
||||
|
||||
}
|
||||
|
||||
void duDebugDrawNavMesh(duDebugDraw* dd, const dtNavMesh* mesh, unsigned char flags)
|
||||
void duDebugDrawNavMesh(duDebugDraw* dd, const dtNavMesh& mesh, unsigned char flags)
|
||||
{
|
||||
if (!mesh) return;
|
||||
if (!dd) return;
|
||||
|
||||
for (int i = 0; i < mesh->getMaxTiles(); ++i)
|
||||
for (int i = 0; i < mesh.getMaxTiles(); ++i)
|
||||
{
|
||||
const dtMeshTile* tile = mesh->getTile(i);
|
||||
const dtMeshTile* tile = mesh.getTile(i);
|
||||
if (!tile->header) continue;
|
||||
drawMeshTile(dd, mesh, tile, flags);
|
||||
}
|
||||
@ -429,22 +429,24 @@ static void drawMeshTileBVTree(duDebugDraw* dd, const dtMeshTile* tile)
|
||||
glEnd();*/
|
||||
}
|
||||
|
||||
void duDebugDrawNavMeshBVTree(duDebugDraw* dd, const dtNavMesh* mesh)
|
||||
void duDebugDrawNavMeshBVTree(duDebugDraw* dd, const dtNavMesh& mesh)
|
||||
{
|
||||
if (!mesh) return;
|
||||
if (!dd) return;
|
||||
|
||||
for (int i = 0; i < mesh->getMaxTiles(); ++i)
|
||||
for (int i = 0; i < mesh.getMaxTiles(); ++i)
|
||||
{
|
||||
const dtMeshTile* tile = mesh->getTile(i);
|
||||
const dtMeshTile* tile = mesh.getTile(i);
|
||||
if (!tile->header) continue;
|
||||
drawMeshTileBVTree(dd, tile);
|
||||
}
|
||||
}
|
||||
|
||||
void duDebugDrawNavMeshPoly(duDebugDraw* dd, const dtNavMesh* mesh, dtPolyRef ref, const unsigned int col)
|
||||
void duDebugDrawNavMeshPoly(duDebugDraw* dd, const dtNavMesh& mesh, dtPolyRef ref, const unsigned int col)
|
||||
{
|
||||
if (!dd) return;
|
||||
|
||||
int ip = 0;
|
||||
const dtMeshTile* tile = mesh->getTileByPolyRef(ref, &ip);
|
||||
const dtMeshTile* tile = mesh.getTileByPolyRef(ref, &ip);
|
||||
if (!tile)
|
||||
return;
|
||||
const dtPoly* p = &tile->polys[ip];
|
||||
|
@ -26,6 +26,11 @@ void duDebugDrawTriMesh(duDebugDraw* dd, const float* verts, int /*nverts*/,
|
||||
const int* tris, const float* normals, int ntris,
|
||||
const unsigned char* flags)
|
||||
{
|
||||
if (!dd) return;
|
||||
if (!verts) return;
|
||||
if (!tris) return;
|
||||
if (!normals) return;
|
||||
|
||||
dd->begin(DU_DRAW_TRIS);
|
||||
for (int i = 0; i < ntris*3; i += 3)
|
||||
{
|
||||
@ -47,6 +52,11 @@ void duDebugDrawTriMeshSlope(duDebugDraw* dd, const float* verts, int /*nverts*/
|
||||
const int* tris, const float* normals, int ntris,
|
||||
const float walkableSlopeAngle)
|
||||
{
|
||||
if (!dd) return;
|
||||
if (!verts) return;
|
||||
if (!tris) return;
|
||||
if (!normals) return;
|
||||
|
||||
const float walkableThr = cosf(walkableSlopeAngle/180.0f*(float)M_PI);
|
||||
|
||||
dd->begin(DU_DRAW_TRIS);
|
||||
@ -69,6 +79,7 @@ void duDebugDrawTriMeshSlope(duDebugDraw* dd, const float* verts, int /*nverts*/
|
||||
|
||||
void duDebugDrawHeightfieldSolid(duDebugDraw* dd, const rcHeightfield& hf)
|
||||
{
|
||||
if (!dd) return;
|
||||
|
||||
const float* orig = hf.bmin;
|
||||
const float cs = hf.cs;
|
||||
@ -101,6 +112,8 @@ void duDebugDrawHeightfieldSolid(duDebugDraw* dd, const rcHeightfield& hf)
|
||||
|
||||
void duDebugDrawHeightfieldWalkable(duDebugDraw* dd, const rcHeightfield& hf)
|
||||
{
|
||||
if (!dd) return;
|
||||
|
||||
const float* orig = hf.bmin;
|
||||
const float cs = hf.cs;
|
||||
const float ch = hf.ch;
|
||||
@ -141,6 +154,8 @@ void duDebugDrawHeightfieldWalkable(duDebugDraw* dd, const rcHeightfield& hf)
|
||||
|
||||
void duDebugDrawCompactHeightfieldSolid(duDebugDraw* dd, const rcCompactHeightfield& chf)
|
||||
{
|
||||
if (!dd) return;
|
||||
|
||||
const float cs = chf.cs;
|
||||
const float ch = chf.ch;
|
||||
|
||||
@ -179,6 +194,8 @@ void duDebugDrawCompactHeightfieldSolid(duDebugDraw* dd, const rcCompactHeightfi
|
||||
|
||||
void duDebugDrawCompactHeightfieldRegions(duDebugDraw* dd, const rcCompactHeightfield& chf)
|
||||
{
|
||||
if (!dd) return;
|
||||
|
||||
const float cs = chf.cs;
|
||||
const float ch = chf.ch;
|
||||
|
||||
@ -216,8 +233,8 @@ void duDebugDrawCompactHeightfieldRegions(duDebugDraw* dd, const rcCompactHeight
|
||||
|
||||
void duDebugDrawCompactHeightfieldDistance(duDebugDraw* dd, const rcCompactHeightfield& chf)
|
||||
{
|
||||
if (!chf.dist)
|
||||
return;
|
||||
if (!dd) return;
|
||||
if (!chf.dist) return;
|
||||
|
||||
const float cs = chf.cs;
|
||||
const float ch = chf.ch;
|
||||
@ -285,55 +302,10 @@ static const rcContour* findContourFromSet(const rcContourSet& cset, unsigned sh
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
static const int NUM_ADU_PTS = 8;
|
||||
|
||||
void drawArc(duDebugDraw* dd, const float* p0, const float* p1, unsigned int color)
|
||||
{
|
||||
// Submits NPTS*2 vertices.
|
||||
float pts[NUM_ADU_PTS*3];
|
||||
float dir[3];
|
||||
vsub(dir, p1, p0);
|
||||
const float len = sqrtf(vdistSqr(p0, p1));
|
||||
for (int i = 0; i < NUM_ADU_PTS; ++i)
|
||||
{
|
||||
float u = (float)i / (float)(NUM_ADU_PTS-1);
|
||||
float* p = &pts[i*3];
|
||||
p[0] = p0[0] + dir[0] * u;
|
||||
p[1] = p0[1] + dir[1] * u + (len/4) * (1-rcSqr(u*2-1));
|
||||
p[2] = p0[2] + dir[2] * u;
|
||||
}
|
||||
for (int i = 0; i < NUM_ADU_PTS-1; ++i)
|
||||
{
|
||||
dd->vertex(&pts[i*3], color);
|
||||
dd->vertex(&pts[(i+1)*3], color);
|
||||
}
|
||||
}
|
||||
|
||||
void duDebugDrawArc(duDebugDraw* dd, const float* p0, const float* p1, const float* col, float lineWidth)
|
||||
{
|
||||
const unsigned int color = duRGBAf(col[0],col[1],col[2],col[3]);
|
||||
dd->begin(DU_DRAW_LINES, lineWidth);
|
||||
drawArc(dd, p0, p1, color);
|
||||
dd->end();
|
||||
}
|
||||
|
||||
void duDebugDrawCross(struct duDebugDraw* dd, const float* p, const float s, const float dy, const float* col, float lineWidth)
|
||||
{
|
||||
const unsigned int color = duRGBAf(col[0],col[1],col[2],col[3]);
|
||||
dd->begin(DU_DRAW_LINES, lineWidth);
|
||||
dd->vertex(p[0]-s,p[1]+dy,p[2], color);
|
||||
dd->vertex(p[0]+s,p[1]+dy,p[2], color);
|
||||
dd->vertex(p[0],p[1]-s+dy,p[2], color);
|
||||
dd->vertex(p[0],p[1]+s+dy,p[2], color);
|
||||
dd->vertex(p[0],p[1]+dy,p[2]-s, color);
|
||||
dd->vertex(p[0],p[1]+dy,p[2]+s, color);
|
||||
dd->end();
|
||||
}
|
||||
*/
|
||||
|
||||
void duDebugDrawRegionConnections(duDebugDraw* dd, const rcContourSet& cset, const float alpha)
|
||||
{
|
||||
if (!dd) return;
|
||||
|
||||
const float* orig = cset.bmin;
|
||||
const float cs = cset.cs;
|
||||
const float ch = cset.ch;
|
||||
@ -380,6 +352,8 @@ void duDebugDrawRegionConnections(duDebugDraw* dd, const rcContourSet& cset, con
|
||||
|
||||
void duDebugDrawRawContours(duDebugDraw* dd, const rcContourSet& cset, const float alpha)
|
||||
{
|
||||
if (!dd) return;
|
||||
|
||||
const float* orig = cset.bmin;
|
||||
const float cs = cset.cs;
|
||||
const float ch = cset.ch;
|
||||
@ -441,6 +415,8 @@ void duDebugDrawRawContours(duDebugDraw* dd, const rcContourSet& cset, const flo
|
||||
|
||||
void duDebugDrawContours(duDebugDraw* dd, const rcContourSet& cset, const float alpha)
|
||||
{
|
||||
if (!dd) return;
|
||||
|
||||
const float* orig = cset.bmin;
|
||||
const float cs = cset.cs;
|
||||
const float ch = cset.ch;
|
||||
@ -503,6 +479,8 @@ void duDebugDrawContours(duDebugDraw* dd, const rcContourSet& cset, const float
|
||||
|
||||
void duDebugDrawPolyMesh(duDebugDraw* dd, const struct rcPolyMesh& mesh)
|
||||
{
|
||||
if (!dd) return;
|
||||
|
||||
const int nvp = mesh.nvp;
|
||||
const float cs = mesh.cs;
|
||||
const float ch = mesh.ch;
|
||||
@ -612,6 +590,8 @@ void duDebugDrawPolyMesh(duDebugDraw* dd, const struct rcPolyMesh& mesh)
|
||||
|
||||
void duDebugDrawPolyMeshDetail(duDebugDraw* dd, const struct rcPolyMeshDetail& dmesh)
|
||||
{
|
||||
if (!dd) return;
|
||||
|
||||
dd->begin(DU_DRAW_TRIS);
|
||||
|
||||
for (int i = 0; i < dmesh.nmeshes; ++i)
|
||||
|
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@ -216,7 +216,7 @@
|
||||
<key>_historyCapacity</key>
|
||||
<integer>0</integer>
|
||||
<key>bookmark</key>
|
||||
<string>6BF5F4B1117644A2000502A6</string>
|
||||
<string>6BF5F5241176F5F8000502A6</string>
|
||||
<key>history</key>
|
||||
<array>
|
||||
<string>6BF5F3751175AACB000502A6</string>
|
||||
@ -323,14 +323,14 @@
|
||||
<key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key>
|
||||
<array>
|
||||
<array>
|
||||
<integer>18</integer>
|
||||
<integer>11</integer>
|
||||
<integer>5</integer>
|
||||
<integer>2</integer>
|
||||
<integer>1</integer>
|
||||
<integer>0</integer>
|
||||
</array>
|
||||
</array>
|
||||
<key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key>
|
||||
<string>{{0, 0}, {264, 643}}</string>
|
||||
<string>{{0, 22}, {264, 643}}</string>
|
||||
</dict>
|
||||
<key>PBXTopSmartGroupGIDs</key>
|
||||
<array/>
|
||||
@ -365,7 +365,7 @@
|
||||
<key>PBXProjectModuleGUID</key>
|
||||
<string>6B8632A30F78115100E2684A</string>
|
||||
<key>PBXProjectModuleLabel</key>
|
||||
<string>DetourNavMesh.cpp</string>
|
||||
<string>Sample_SoloMeshTiled.cpp</string>
|
||||
<key>PBXSplitModuleInNavigatorKey</key>
|
||||
<dict>
|
||||
<key>Split0</key>
|
||||
@ -373,17 +373,14 @@
|
||||
<key>PBXProjectModuleGUID</key>
|
||||
<string>6B8632A40F78115100E2684A</string>
|
||||
<key>PBXProjectModuleLabel</key>
|
||||
<string>DetourNavMesh.cpp</string>
|
||||
<string>Sample_SoloMeshTiled.cpp</string>
|
||||
<key>_historyCapacity</key>
|
||||
<integer>0</integer>
|
||||
<key>bookmark</key>
|
||||
<string>6BF5F4A7117644A2000502A6</string>
|
||||
<string>6BF5F5231176F5F8000502A6</string>
|
||||
<key>history</key>
|
||||
<array>
|
||||
<string>6BBB4A96115B4F3400CF791D</string>
|
||||
<string>6BBB4A99115B4F3400CF791D</string>
|
||||
<string>6BBB4A9A115B4F3400CF791D</string>
|
||||
<string>6BBB4A9B115B4F3400CF791D</string>
|
||||
<string>6BBB4A9E115B4F3400CF791D</string>
|
||||
<string>6BBB4AA1115B4F3400CF791D</string>
|
||||
<string>6BBB4AA3115B4F3400CF791D</string>
|
||||
@ -407,7 +404,6 @@
|
||||
<string>6BBB4ACD115B4F3400CF791D</string>
|
||||
<string>6BBB4B7F115B639200CF791D</string>
|
||||
<string>6BBB4C34115B7A3D00CF791D</string>
|
||||
<string>6BED8AE2117451EB00582F38</string>
|
||||
<string>6BF5F27011747CFA000502A6</string>
|
||||
<string>6BF5F27311747CFA000502A6</string>
|
||||
<string>6BF5F2E411748884000502A6</string>
|
||||
@ -421,10 +417,7 @@
|
||||
<string>6BF5F32F11759C3C000502A6</string>
|
||||
<string>6BF5F33011759C3C000502A6</string>
|
||||
<string>6BF5F33111759C3C000502A6</string>
|
||||
<string>6BF5F36A1175A3C9000502A6</string>
|
||||
<string>6BF5F36F1175AACB000502A6</string>
|
||||
<string>6BF5F3701175AACB000502A6</string>
|
||||
<string>6BF5F471117644A2000502A6</string>
|
||||
<string>6BF5F472117644A2000502A6</string>
|
||||
<string>6BF5F473117644A2000502A6</string>
|
||||
<string>6BF5F474117644A2000502A6</string>
|
||||
@ -432,19 +425,26 @@
|
||||
<string>6BF5F476117644A2000502A6</string>
|
||||
<string>6BF5F477117644A2000502A6</string>
|
||||
<string>6BF5F478117644A2000502A6</string>
|
||||
<string>6BF5F479117644A2000502A6</string>
|
||||
<string>6BF5F47A117644A2000502A6</string>
|
||||
<string>6BF5F47B117644A2000502A6</string>
|
||||
<string>6BF5F47C117644A2000502A6</string>
|
||||
<string>6BF5F47D117644A2000502A6</string>
|
||||
<string>6BF5F47E117644A2000502A6</string>
|
||||
<string>6BF5F47F117644A2000502A6</string>
|
||||
<string>6BF5F480117644A2000502A6</string>
|
||||
<string>6BF5F481117644A2000502A6</string>
|
||||
<string>6BF5F482117644A2000502A6</string>
|
||||
<string>6BF5F483117644A2000502A6</string>
|
||||
<string>6BF5F484117644A2000502A6</string>
|
||||
<string>6BF5F485117644A2000502A6</string>
|
||||
<string>6BF5F4C11176EB03000502A6</string>
|
||||
<string>6BF5F4EB1176F3A4000502A6</string>
|
||||
<string>6BF5F5031176F5F8000502A6</string>
|
||||
<string>6BF5F5041176F5F8000502A6</string>
|
||||
<string>6BF5F5051176F5F8000502A6</string>
|
||||
<string>6BF5F5061176F5F8000502A6</string>
|
||||
<string>6BF5F5071176F5F8000502A6</string>
|
||||
<string>6BF5F5081176F5F8000502A6</string>
|
||||
<string>6BF5F5091176F5F8000502A6</string>
|
||||
<string>6BF5F50A1176F5F8000502A6</string>
|
||||
<string>6BF5F50B1176F5F8000502A6</string>
|
||||
<string>6BF5F50C1176F5F8000502A6</string>
|
||||
<string>6BF5F50D1176F5F8000502A6</string>
|
||||
<string>6BF5F50E1176F5F8000502A6</string>
|
||||
</array>
|
||||
<key>prevStack</key>
|
||||
<array>
|
||||
@ -545,6 +545,57 @@
|
||||
<string>6BF5F4A4117644A2000502A6</string>
|
||||
<string>6BF5F4A5117644A2000502A6</string>
|
||||
<string>6BF5F4A6117644A2000502A6</string>
|
||||
<string>6BF5F4B61176E648000502A6</string>
|
||||
<string>6BF5F4B71176E648000502A6</string>
|
||||
<string>6BF5F4B81176E648000502A6</string>
|
||||
<string>6BF5F4B91176E648000502A6</string>
|
||||
<string>6BF5F4BA1176E648000502A6</string>
|
||||
<string>6BF5F4BB1176E648000502A6</string>
|
||||
<string>6BF5F4BC1176E648000502A6</string>
|
||||
<string>6BF5F4C31176EB03000502A6</string>
|
||||
<string>6BF5F4C41176EB03000502A6</string>
|
||||
<string>6BF5F4C51176EB03000502A6</string>
|
||||
<string>6BF5F4C61176EB03000502A6</string>
|
||||
<string>6BF5F4C71176EB03000502A6</string>
|
||||
<string>6BF5F4CD1176EE8E000502A6</string>
|
||||
<string>6BF5F4CE1176EE8E000502A6</string>
|
||||
<string>6BF5F4CF1176EE8E000502A6</string>
|
||||
<string>6BF5F4D41176F005000502A6</string>
|
||||
<string>6BF5F4D51176F005000502A6</string>
|
||||
<string>6BF5F4D61176F005000502A6</string>
|
||||
<string>6BF5F4D71176F005000502A6</string>
|
||||
<string>6BF5F4D81176F005000502A6</string>
|
||||
<string>6BF5F4D91176F005000502A6</string>
|
||||
<string>6BF5F4DA1176F005000502A6</string>
|
||||
<string>6BF5F4ED1176F3A4000502A6</string>
|
||||
<string>6BF5F4EE1176F3A4000502A6</string>
|
||||
<string>6BF5F4EF1176F3A4000502A6</string>
|
||||
<string>6BF5F4F01176F3A4000502A6</string>
|
||||
<string>6BF5F4F11176F3A4000502A6</string>
|
||||
<string>6BF5F4F21176F3A4000502A6</string>
|
||||
<string>6BF5F4F31176F3A4000502A6</string>
|
||||
<string>6BF5F4F41176F3A4000502A6</string>
|
||||
<string>6BF5F4F51176F3A4000502A6</string>
|
||||
<string>6BF5F50F1176F5F8000502A6</string>
|
||||
<string>6BF5F5101176F5F8000502A6</string>
|
||||
<string>6BF5F5111176F5F8000502A6</string>
|
||||
<string>6BF5F5121176F5F8000502A6</string>
|
||||
<string>6BF5F5131176F5F8000502A6</string>
|
||||
<string>6BF5F5141176F5F8000502A6</string>
|
||||
<string>6BF5F5151176F5F8000502A6</string>
|
||||
<string>6BF5F5161176F5F8000502A6</string>
|
||||
<string>6BF5F5171176F5F8000502A6</string>
|
||||
<string>6BF5F5181176F5F8000502A6</string>
|
||||
<string>6BF5F5191176F5F8000502A6</string>
|
||||
<string>6BF5F51A1176F5F8000502A6</string>
|
||||
<string>6BF5F51B1176F5F8000502A6</string>
|
||||
<string>6BF5F51C1176F5F8000502A6</string>
|
||||
<string>6BF5F51D1176F5F8000502A6</string>
|
||||
<string>6BF5F51E1176F5F8000502A6</string>
|
||||
<string>6BF5F51F1176F5F8000502A6</string>
|
||||
<string>6BF5F5201176F5F8000502A6</string>
|
||||
<string>6BF5F5211176F5F8000502A6</string>
|
||||
<string>6BF5F5221176F5F8000502A6</string>
|
||||
</array>
|
||||
</dict>
|
||||
<key>SplitCount</key>
|
||||
@ -558,18 +609,18 @@
|
||||
<key>GeometryConfiguration</key>
|
||||
<dict>
|
||||
<key>Frame</key>
|
||||
<string>{{0, 0}, {970, 456}}</string>
|
||||
<string>{{0, 0}, {970, 390}}</string>
|
||||
<key>RubberWindowFrame</key>
|
||||
<string>13 75 1256 702 0 0 1280 778 </string>
|
||||
</dict>
|
||||
<key>Module</key>
|
||||
<string>PBXNavigatorGroup</string>
|
||||
<key>Proportion</key>
|
||||
<string>456pt</string>
|
||||
<string>390pt</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Proportion</key>
|
||||
<string>200pt</string>
|
||||
<string>266pt</string>
|
||||
<key>Tabs</key>
|
||||
<array>
|
||||
<dict>
|
||||
@ -637,7 +688,7 @@
|
||||
<key>GeometryConfiguration</key>
|
||||
<dict>
|
||||
<key>Frame</key>
|
||||
<string>{{10, 27}, {970, 173}}</string>
|
||||
<string>{{10, 27}, {970, 239}}</string>
|
||||
<key>RubberWindowFrame</key>
|
||||
<string>13 75 1256 702 0 0 1280 778 </string>
|
||||
</dict>
|
||||
|
@ -725,13 +725,13 @@ void NavMeshTesterTool::handleRender()
|
||||
|
||||
if (m_toolMode == TOOLMODE_PATHFIND_ITER)
|
||||
{
|
||||
duDebugDrawNavMeshPoly(&dd, m_navMesh, m_startRef, startCol);
|
||||
duDebugDrawNavMeshPoly(&dd, m_navMesh, m_endRef, endCol);
|
||||
duDebugDrawNavMeshPoly(&dd, *m_navMesh, m_startRef, startCol);
|
||||
duDebugDrawNavMeshPoly(&dd, *m_navMesh, m_endRef, endCol);
|
||||
|
||||
if (m_npolys)
|
||||
{
|
||||
for (int i = 1; i < m_npolys-1; ++i)
|
||||
duDebugDrawNavMeshPoly(&dd, m_navMesh, m_polys[i], pathCol);
|
||||
duDebugDrawNavMeshPoly(&dd, *m_navMesh, m_polys[i], pathCol);
|
||||
}
|
||||
|
||||
if (m_nsmoothPath)
|
||||
@ -747,7 +747,7 @@ void NavMeshTesterTool::handleRender()
|
||||
|
||||
if (m_pathIterNum)
|
||||
{
|
||||
duDebugDrawNavMeshPoly(&dd, m_navMesh, m_pathIterPolys[0], duRGBA(255,255,255,128));
|
||||
duDebugDrawNavMeshPoly(&dd, *m_navMesh, m_pathIterPolys[0], duRGBA(255,255,255,128));
|
||||
|
||||
dd.depthMask(false);
|
||||
dd.begin(DU_DRAW_LINES, 1.0f);
|
||||
@ -780,13 +780,13 @@ void NavMeshTesterTool::handleRender()
|
||||
}
|
||||
else if (m_toolMode == TOOLMODE_PATHFIND_STRAIGHT)
|
||||
{
|
||||
duDebugDrawNavMeshPoly(&dd, m_navMesh, m_startRef, startCol);
|
||||
duDebugDrawNavMeshPoly(&dd, m_navMesh, m_endRef, endCol);
|
||||
duDebugDrawNavMeshPoly(&dd, *m_navMesh, m_startRef, startCol);
|
||||
duDebugDrawNavMeshPoly(&dd, *m_navMesh, m_endRef, endCol);
|
||||
|
||||
if (m_npolys)
|
||||
{
|
||||
for (int i = 1; i < m_npolys-1; ++i)
|
||||
duDebugDrawNavMeshPoly(&dd, m_navMesh, m_polys[i], pathCol);
|
||||
duDebugDrawNavMeshPoly(&dd, *m_navMesh, m_polys[i], pathCol);
|
||||
}
|
||||
|
||||
if (m_nstraightPath)
|
||||
@ -827,12 +827,12 @@ void NavMeshTesterTool::handleRender()
|
||||
}
|
||||
else if (m_toolMode == TOOLMODE_RAYCAST)
|
||||
{
|
||||
duDebugDrawNavMeshPoly(&dd, m_navMesh, m_startRef, startCol);
|
||||
duDebugDrawNavMeshPoly(&dd, *m_navMesh, m_startRef, startCol);
|
||||
|
||||
if (m_nstraightPath)
|
||||
{
|
||||
for (int i = 1; i < m_npolys; ++i)
|
||||
duDebugDrawNavMeshPoly(&dd, m_navMesh, m_polys[i], pathCol);
|
||||
duDebugDrawNavMeshPoly(&dd, *m_navMesh, m_polys[i], pathCol);
|
||||
|
||||
dd.depthMask(false);
|
||||
const unsigned int pathCol = m_hitResult ? duRGBA(64,16,0,220) : duRGBA(240,240,240,220);
|
||||
@ -863,7 +863,7 @@ void NavMeshTesterTool::handleRender()
|
||||
}
|
||||
else if (m_toolMode == TOOLMODE_DISTANCE_TO_WALL)
|
||||
{
|
||||
duDebugDrawNavMeshPoly(&dd, m_navMesh, m_startRef, startCol);
|
||||
duDebugDrawNavMeshPoly(&dd, *m_navMesh, m_startRef, startCol);
|
||||
dd.depthMask(false);
|
||||
duDebugDrawCircle(&dd, m_spos[0], m_spos[1]+agentHeight/2, m_spos[2], m_distanceToWall, duRGBA(64,16,0,220), 2.0f);
|
||||
dd.begin(DU_DRAW_LINES, 3.0f);
|
||||
@ -876,7 +876,7 @@ void NavMeshTesterTool::handleRender()
|
||||
{
|
||||
for (int i = 0; i < m_npolys; ++i)
|
||||
{
|
||||
duDebugDrawNavMeshPoly(&dd, m_navMesh, m_polys[i], pathCol);
|
||||
duDebugDrawNavMeshPoly(&dd, *m_navMesh, m_polys[i], pathCol);
|
||||
dd.depthMask(false);
|
||||
if (m_parent[i])
|
||||
{
|
||||
|
@ -153,10 +153,10 @@ void Sample_Debug::handleRender()
|
||||
}
|
||||
|
||||
if (m_navMesh)
|
||||
duDebugDrawNavMesh(&dd, m_navMesh, DU_DRAWNAVMESH_CLOSEDLIST|DU_DRAWNAVMESH_OFFMESHCONS);
|
||||
duDebugDrawNavMesh(&dd, *m_navMesh, DU_DRAWNAVMESH_CLOSEDLIST|DU_DRAWNAVMESH_OFFMESHCONS);
|
||||
|
||||
if (m_ref)
|
||||
duDebugDrawNavMeshPoly(&dd, m_navMesh, m_ref, duRGBA(255,0,0,128));
|
||||
if (m_ref && m_navMesh)
|
||||
duDebugDrawNavMeshPoly(&dd, *m_navMesh, m_ref, duRGBA(255,0,0,128));
|
||||
|
||||
float bmin[3], bmax[3];
|
||||
rcVsub(bmin, m_center, m_ext);
|
||||
|
@ -234,9 +234,9 @@ void Sample_SoloMeshSimple::handleRender()
|
||||
m_drawMode == DRAWMODE_NAVMESH_INVIS))
|
||||
{
|
||||
if (m_drawMode != DRAWMODE_NAVMESH_INVIS)
|
||||
duDebugDrawNavMesh(&dd, m_navMesh, m_navMeshDrawFlags);
|
||||
duDebugDrawNavMesh(&dd, *m_navMesh, m_navMeshDrawFlags);
|
||||
if (m_drawMode == DRAWMODE_NAVMESH_BVTREE)
|
||||
duDebugDrawNavMeshBVTree(&dd, m_navMesh);
|
||||
duDebugDrawNavMeshBVTree(&dd, *m_navMesh);
|
||||
}
|
||||
|
||||
glDepthMask(GL_TRUE);
|
||||
|
@ -369,9 +369,9 @@ void Sample_SoloMeshTiled::handleRender()
|
||||
m_drawMode == DRAWMODE_NAVMESH_INVIS))
|
||||
{
|
||||
if (m_drawMode != DRAWMODE_NAVMESH_INVIS)
|
||||
duDebugDrawNavMesh(&dd, m_navMesh, m_navMeshDrawFlags);
|
||||
duDebugDrawNavMesh(&dd, *m_navMesh, m_navMeshDrawFlags);
|
||||
if (m_drawMode == DRAWMODE_NAVMESH_BVTREE)
|
||||
duDebugDrawNavMeshBVTree(&dd, m_navMesh);
|
||||
duDebugDrawNavMeshBVTree(&dd, *m_navMesh);
|
||||
}
|
||||
|
||||
glDepthMask(GL_TRUE);
|
||||
|
@ -447,7 +447,7 @@ void Sample_TileMesh::handleRender()
|
||||
duDebugDrawBoxWire(&dd, m_tileBmin[0],m_tileBmin[1],m_tileBmin[2], m_tileBmax[0],m_tileBmax[1],m_tileBmax[2], m_tileCol, 2.0f);
|
||||
|
||||
if (m_navMesh)
|
||||
duDebugDrawNavMesh(&dd, m_navMesh, m_navMeshDrawFlags);
|
||||
duDebugDrawNavMesh(&dd, *m_navMesh, m_navMeshDrawFlags);
|
||||
|
||||
if (m_tool)
|
||||
m_tool->handleRender();
|
||||
|
Loading…
x
Reference in New Issue
Block a user