MCPcopy Create free account
hub / github.com/REGoth-project/REGoth / debugDrawWaynet

Function debugDrawWaynet

src/render/WorldRender.cpp:467–492  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

465 }
466
467 void debugDrawWaynet(const World::Waynet::WaynetInstance& waynet)
468 {
469 ddPush();
470
471 ddSetTransform(nullptr);
472 ddSetColor(0xFF0000FF);
473 //ddSetStipple(true, 1.0f);
474
475 const float wpAxisLen = 1.0f;
476 for (const World::Waynet::Waypoint& wp : waynet.waypoints)
477 {
478 ddDrawAxis(wp.position.x, wp.position.y, wp.position.z, wpAxisLen);
479 ddDrawAxis(wp.position.x, wp.position.y, wp.position.z, -wpAxisLen);
480
481 // FIXME: These would be drawn twice, but I don't care right now
482 for (size_t t : wp.edges)
483 {
484 const World::Waynet::Waypoint& target = waynet.waypoints[t];
485
486 ddMoveTo(wp.position.x, wp.position.y, wp.position.z);
487 ddLineTo(target.position.x, target.position.y, target.position.z);
488 }
489 }
490
491 ddPop();
492 }
493}
494
495void Render::debugDrawPath(const World::Waynet::WaynetInstance& waynet, const std::vector<size_t>& path)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected