MCPcopy Create free account
hub / github.com/chrxh/alien / markReferenceDomain

Method markReferenceDomain

source/Gui/SimulationView.cpp:369–380  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

367}
368
369void SimulationView::markReferenceDomain()
370{
371 ImDrawList* drawList = ImGui::GetBackgroundDrawList();
372 auto p1 = Viewport::get().mapWorldToViewPosition({0, 0}, false);
373 auto worldSize = _simulationFacade->getWorldSize();
374 auto p2 = Viewport::get().mapWorldToViewPosition(toRealVector2D(worldSize), false);
375 auto color = ImColor::HSV(0.66f, 1.0f, 1.0f, 0.8f);
376 drawList->AddLine({p1.x, p1.y}, {p2.x, p1.y}, color);
377 drawList->AddLine({p2.x, p1.y}, {p2.x, p2.y}, color);
378 drawList->AddLine({p2.x, p2.y}, {p1.x, p2.y}, color);
379 drawList->AddLine({p1.x, p2.y}, {p1.x, p1.y}, color);
380}
381

Callers

nothing calls this directly

Calls 3

toRealVector2DFunction · 0.85
getWorldSizeMethod · 0.80

Tested by

no test coverage detected