mirror of
https://github.com/recastnavigation/recastnavigation.git
synced 2026-08-19 01:30:07 +00:00
Make RecastDemo colors more meaningful (#254)
Implement a SampleDebugDraw which will color area types meaningfully, for example color water as blue, grass as green and so on.
This commit is contained in:
committed by
Jakob Botsch Nielsen
parent
16a7a30ada
commit
03eb2f92f3
@@ -445,7 +445,7 @@ void duDebugDrawNavMeshPoly(duDebugDraw* dd, const dtNavMesh& mesh, dtPolyRef re
|
||||
|
||||
dd->depthMask(false);
|
||||
|
||||
const unsigned int c = (col & 0x00ffffff) | (64 << 24);
|
||||
const unsigned int c = duTransCol(col, 64);
|
||||
const unsigned int ip = (unsigned int)(poly - tile->polys);
|
||||
|
||||
if (poly->getType() == DT_POLYTYPE_OFFMESH_CONNECTION)
|
||||
@@ -456,7 +456,7 @@ void duDebugDrawNavMeshPoly(duDebugDraw* dd, const dtNavMesh& mesh, dtPolyRef re
|
||||
|
||||
// Connection arc.
|
||||
duAppendArc(dd, con->pos[0],con->pos[1],con->pos[2], con->pos[3],con->pos[4],con->pos[5], 0.25f,
|
||||
(con->flags & 1) ? 0.6f : 0, 0.6f, c);
|
||||
(con->flags & 1) ? 0.6f : 0.0f, 0.6f, c);
|
||||
|
||||
dd->end();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user