Octree returns correct boxes when testing along an axis by searching through the correct child subtrees.

This commit is contained in:
William Moberg
2016-01-18 18:24:11 +01:00
parent b2358a1854
commit 621d935d7a
2 changed files with 8 additions and 2 deletions
+2
View File
@@ -15,6 +15,8 @@ AABB::AABB(const glm::vec3& minPos, const glm::vec3& maxPos)
m_MinCorner.y = glm::min(m_MaxCorner.y, m_MinCorner.y);
m_MaxCorner.z = glm::max(m_MaxCorner.z, m_MinCorner.z);
m_MinCorner.z = glm::min(m_MaxCorner.z, m_MinCorner.z);
m_Origin = 0.5f * (m_MaxCorner + m_MinCorner);
m_HalfSize = 0.5f * (m_MaxCorner - m_MinCorner);
}
}