Changed: Removed old vertex array boundingbox declaration, forced usage of temporary vector array in initial boundingbox calculations.

This commit is contained in:
Foxar
2020-12-21 19:05:33 +01:00
parent 02d7916925
commit 586fe136ea
4 changed files with 8 additions and 10 deletions
+1 -4
View File
@@ -94,6 +94,7 @@ void MeshFrame::allocateMaterials(const u32 &t_val)
void MeshFrame::calculateBoundingBoxes()
{
Vector3 boundingBox[8];
if (!_areVerticesAllocated)
{
PRINT_ERR("Can't calculate bounding box, because vertices were not allocated!");
@@ -134,10 +135,6 @@ void MeshFrame::calculateBoundingBoxes()
boundingBox[7].set(hiX, hiY, hiZ);
_isBoundingBoxCalculated = true;
//Function temporarily is a hybrid between old Vector3[8] boundingbox and
//the new class implementation. Upon confirmation that new implementation
//works correctly, delete the old code.
//BoundingBox is declared on the heap to prevent any ill-formed default
//constructor instantiated BoundingBox objects.
boundingBoxObj = new BoundingBox(boundingBox);