MCPcopy Create free account
hub / github.com/axmolengine/axmol / drawMeshTileBVTree

Function drawMeshTileBVTree

3rdparty/recast/DetourDebugDraw.cpp:302–321  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

300
301
302static 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
323void duDebugDrawNavMeshBVTree(duDebugDraw* dd, const dtNavMesh& mesh)
324{

Callers 1

duDebugDrawNavMeshBVTreeFunction · 0.85

Calls 4

duAppendBoxWireFunction · 0.85
duRGBAFunction · 0.85
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected