MCPcopy Create free account
hub / github.com/TombEngine/TombEngine / DrawBox

Function DrawBox

TombEngine/Game/control/box.cpp:149–166  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

147}
148
149static void DrawBox(int boxIndex, const Vector3& color)
150{
151 if (boxIndex <= NO_VALUE || boxIndex >= g_Level.PathfindingBoxes.size())
152 return;
153
154 auto& currBox = g_Level.PathfindingBoxes[boxIndex];
155
156 auto center = GetBoxCenter(boxIndex);
157 auto corner = Vector3(currBox.bottom * BLOCK(1), currBox.height + CLICK(1), currBox.right * BLOCK(1));
158 auto extents = (corner - center) * 0.9f;
159 auto dBox = BoundingOrientedBox(center, extents, Vector4::UnitY);
160
161 for (int i = 0; i <= 10; i++)
162 {
163 dBox.Extents = extents + Vector3(i);
164 DrawDebugBox(dBox, Vector4(color.x, color.y, color.z, 1), RendererDebugPage::PathfindingStats);
165 }
166}
167
168void DrawLaraPathfinding(int boxIndex)
169{

Callers 2

DrawLaraPathfindingFunction · 0.85
DrawItemPathfindingFunction · 0.85

Calls 5

GetBoxCenterFunction · 0.85
DrawDebugBoxFunction · 0.85
Vector3Function · 0.50
Vector4Function · 0.50
sizeMethod · 0.45

Tested by

no test coverage detected