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

Method drawOffMeshConnections

core/navmesh/NavMesh.cpp:294–319  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

292}
293
294void ax::NavMesh::drawOffMeshConnections()
295{
296 unsigned int conColor = duRGBA(192, 0, 128, 192);
297 unsigned int baseColor = duRGBA(0, 0, 0, 64);
298 _debugDraw.begin(DU_DRAW_LINES, 2.0f);
299 for (int i = 0; i < _geomData->offMeshConCount; ++i)
300 {
301 float* v = &_geomData->offMeshConVerts[i * 3 * 2];
302
303 _debugDraw.vertex(v[0], v[1], v[2], baseColor);
304 _debugDraw.vertex(v[0], v[1] + 0.2f, v[2], baseColor);
305
306 _debugDraw.vertex(v[3], v[4], v[5], baseColor);
307 _debugDraw.vertex(v[3], v[4] + 0.2f, v[5], baseColor);
308
309 duAppendCircle(&_debugDraw, v[0], v[1] + 0.1f, v[2], _geomData->offMeshConRads[i], baseColor);
310 duAppendCircle(&_debugDraw, v[3], v[4] + 0.1f, v[5], _geomData->offMeshConRads[i], baseColor);
311
312 if (/*hilight*/ true)
313 {
314 duAppendArc(&_debugDraw, v[0], v[1], v[2], v[3], v[4], v[5], 0.25f,
315 (_geomData->offMeshConDirs[i] & 1) ? 0.6f : 0.0f, 0.6f, conColor);
316 }
317 }
318 _debugDraw.end();
319}
320
321void ax::NavMesh::drawObstacles()
322{

Callers

nothing calls this directly

Calls 6

duRGBAFunction · 0.85
duAppendCircleFunction · 0.85
duAppendArcFunction · 0.85
beginMethod · 0.45
vertexMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected