MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / renderTileData

Method renderTileData

Engine/source/navigation/navMesh.cpp:1441–1467  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1439}
1440
1441void NavMesh::renderTileData(duDebugDrawTorque &dd, U32 tile)
1442{
1443 if(tile >= mTileData.size())
1444 return;
1445 if(nm)
1446 {
1447 dd.beginGroup(0);
1448 if(mTileData[tile].chf) duDebugDrawCompactHeightfieldSolid(&dd, *mTileData[tile].chf);
1449
1450 dd.beginGroup(1);
1451 int col = duRGBA(255, 0, 255, 255);
1452 RecastPolyList &in = mTileData[tile].geom;
1453 dd.begin(DU_DRAW_LINES);
1454 const F32 *verts = in.getVerts();
1455 const S32 *tris = in.getTris();
1456 for(U32 t = 0; t < in.getTriCount(); t++)
1457 {
1458 dd.vertex(&verts[tris[t*3]*3], col);
1459 dd.vertex(&verts[tris[t*3+1]*3], col);
1460 dd.vertex(&verts[tris[t*3+1]*3], col);
1461 dd.vertex(&verts[tris[t*3+2]*3], col);
1462 dd.vertex(&verts[tris[t*3+2]*3], col);
1463 dd.vertex(&verts[tris[t*3]*3], col);
1464 }
1465 dd.end();
1466 }
1467}
1468
1469void NavMesh::onEditorEnable()
1470{

Callers 1

on3DMouseDownMethod · 0.80

Calls 10

duRGBAFunction · 0.85
getVertsMethod · 0.80
getTrisMethod · 0.80
getTriCountMethod · 0.80
sizeMethod · 0.45
beginGroupMethod · 0.45
beginMethod · 0.45
vertexMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected