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

Function duDebugDrawNavMeshNodes

3rdparty/recast/DetourDebugDraw.cpp:263–299  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

261}
262
263void duDebugDrawNavMeshNodes(struct duDebugDraw* dd, const dtNavMeshQuery& query)
264{
265 if (!dd) return;
266
267 const dtNodePool* pool = query.getNodePool();
268 if (pool)
269 {
270 const float off = 0.5f;
271 dd->begin(DU_DRAW_POINTS, 4.0f);
272 for (int i = 0; i < pool->getHashSize(); ++i)
273 {
274 for (dtNodeIndex j = pool->getFirst(i); j != DT_NULL_IDX; j = pool->getNext(j))
275 {
276 const dtNode* node = pool->getNodeAtIdx(j+1);
277 if (!node) continue;
278 dd->vertex(node->pos[0],node->pos[1]+off,node->pos[2], duRGBA(255,192,0,255));
279 }
280 }
281 dd->end();
282
283 dd->begin(DU_DRAW_LINES, 2.0f);
284 for (int i = 0; i < pool->getHashSize(); ++i)
285 {
286 for (dtNodeIndex j = pool->getFirst(i); j != DT_NULL_IDX; j = pool->getNext(j))
287 {
288 const dtNode* node = pool->getNodeAtIdx(j+1);
289 if (!node) continue;
290 if (!node->pidx) continue;
291 const dtNode* parent = pool->getNodeAtIdx(node->pidx);
292 if (!parent) continue;
293 dd->vertex(node->pos[0],node->pos[1]+off,node->pos[2], duRGBA(255,192,0,128));
294 dd->vertex(parent->pos[0],parent->pos[1]+off,parent->pos[2], duRGBA(255,192,0,128));
295 }
296 }
297 dd->end();
298 }
299}
300
301
302static void drawMeshTileBVTree(duDebugDraw* dd, const dtMeshTile* tile)

Callers

nothing calls this directly

Calls 9

duRGBAFunction · 0.85
getNodePoolMethod · 0.80
getHashSizeMethod · 0.80
getFirstMethod · 0.80
getNodeAtIdxMethod · 0.80
beginMethod · 0.45
getNextMethod · 0.45
vertexMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected