| 300 | |
| 301 | |
| 302 | static void drawMeshTileBVTree(duDebugDraw* dd, const dtMeshTile* tile) |
| 303 | { |
| 304 | // Draw BV nodes. |
| 305 | const float cs = 1.0f / tile->header->bvQuantFactor; |
| 306 | dd->begin(DU_DRAW_LINES, 1.0f); |
| 307 | for (int i = 0; i < tile->header->bvNodeCount; ++i) |
| 308 | { |
| 309 | const dtBVNode* n = &tile->bvTree[i]; |
| 310 | if (n->i < 0) // Leaf indices are positive. |
| 311 | continue; |
| 312 | duAppendBoxWire(dd, tile->header->bmin[0] + n->bmin[0]*cs, |
| 313 | tile->header->bmin[1] + n->bmin[1]*cs, |
| 314 | tile->header->bmin[2] + n->bmin[2]*cs, |
| 315 | tile->header->bmin[0] + n->bmax[0]*cs, |
| 316 | tile->header->bmin[1] + n->bmax[1]*cs, |
| 317 | tile->header->bmin[2] + n->bmax[2]*cs, |
| 318 | duRGBA(255,255,255,128)); |
| 319 | } |
| 320 | dd->end(); |
| 321 | } |
| 322 | |
| 323 | void duDebugDrawNavMeshBVTree(duDebugDraw* dd, const dtNavMesh& mesh) |
| 324 | { |
no test coverage detected