Little more work with OctTreeTest

This commit is contained in:
verysecrethero
2015-12-09 13:56:59 +01:00
parent 519178dfba
commit 8949db5456
3 changed files with 11 additions and 95 deletions
+4 -5
View File
@@ -30,7 +30,7 @@ BOOST_AUTO_TEST_CASE(octTreeTest)
BOOST_CHECK(someAABB.Center() == 0.5f * (minCorner + maxCorner));
//simple OctTree constructor check
auto someOctTree = OctTree(someAABB, 5);
OctTree someOctTree(someAABB, 5);
BOOST_CHECK(someOctTree.m_Children[0] != nullptr);
//TODO: a check so it split the tree properly
@@ -40,14 +40,13 @@ BOOST_AUTO_TEST_CASE(octTreeTest)
//advanced AddBox check
//add a boxcontainer - which crosses the mid-split
auto someAABB2 = AABB(glm::vec3(0.45f, 0.45f, 0.45f), glm::vec3(0.55f, 0.55f, 0.55f));
someOctTree.AddBox(someAABB2);
someOctTree.AddDynamicObject(someAABB2);
//clear the boxcontainer
//need to check so it added the box properly
someOctTree.ClearBoxes();
someOctTree.ClearDynamicObjects();
//add a boxcontainer
someOctTree.AddBox(someAABB2);
someOctTree.AddDynamicObject(someAABB2);
//simple destructor check in the end, just look for memleaks, then it didnt clear the AABB structure