Commit 411edfcd authored by Philip Trettner's avatar Philip Trettner

Added AABB orientation for renderAABB

parent 8e7a9ecf
......@@ -81,6 +81,13 @@ void DebugRenderer::renderLine(glm::vec3 start, glm::vec3 end, glm::vec4 color)
void DebugRenderer::renderAABB(glm::vec3 start, glm::vec3 end, glm::vec4 color, bool wireframe)
{
if (start.x > end.x)
std::swap(start.x, end.x);
if (start.y > end.y)
std::swap(start.y, end.y);
if (start.z > end.z)
std::swap(start.z, end.z);
if (!wireframe)
{
auto m = translate((start + end) / 2.0f) * scale((end - start) / 2.0f);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment