Little more work with OctTreeTest
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user