MCPcopy Create free account
hub / github.com/Prograda/Skybolt / drawBoxOutline

Function drawBoxOutline

src/SkyboltExamples/ExamplesCommon/HudSystem.cpp:94–102  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

92}
93
94static void drawBoxOutline(VisHud& hud, const glm::vec2& position, float width, float height)
95{
96 float halfWidth = width * 0.5;
97 float halfHeight = height * 0.5;
98 hud.drawLine(position + glm::vec2(-halfWidth, -halfHeight), position + glm::vec2(halfWidth, -halfHeight));
99 hud.drawLine(position + glm::vec2(halfWidth, -halfHeight), position + glm::vec2(halfWidth, halfHeight));
100 hud.drawLine(position + glm::vec2(halfWidth, halfHeight), position + glm::vec2(-halfWidth, halfHeight));
101 hud.drawLine(position + glm::vec2(-halfWidth, halfHeight), position + glm::vec2(-halfWidth, -halfHeight));
102}
103
104float controlTickSize = 0.02;
105

Callers 1

drawControl2dFunction · 0.85

Calls 1

drawLineMethod · 0.80

Tested by

no test coverage detected