Renamed all OctTree to Octree (More OCD)

This commit is contained in:
2016-01-13 12:15:36 +01:00
parent 8164a955d6
commit 311475cbb6
6 changed files with 69 additions and 69 deletions
+2 -2
View File
@@ -205,9 +205,9 @@ BOOST_AUTO_TEST_CASE(octTest)
{
glm::vec3 mini = glm::vec3(-1, -1, -1);
glm::vec3 maxi = glm::vec3(1, 1, 1);
OctTree tree(AABB(mini, maxi), 2);
Octree tree(AABB(mini, maxi), 2);
tree.AddDynamicObject(AABB(mini, -0.9f*maxi));
OctTree::Output data;
Octree::Output data;
glm::vec3 origin = 3.0f * mini;
bool rayIntersected = tree.RayCollides(Ray(origin , mini - origin), data);
BOOST_CHECK(rayIntersected);
+5 -5
View File
@@ -13,7 +13,7 @@ BOOST_AUTO_TEST_CASE(octSameRegionTest)
{
glm::vec3 mini = glm::vec3(-1, -1, -1);
glm::vec3 maxi = glm::vec3(1, 1, 1);
OctTree tree(AABB(mini, maxi), 2);
Octree tree(AABB(mini, maxi), 2);
AABB firstQuadrant(mini, 0.8f*mini);
tree.AddStaticObject(firstQuadrant);
AABB testBox(0.9f*mini, 0.8f*mini);
@@ -117,7 +117,7 @@ BOOST_AUTO_TEST_CASE(octRegionPerfTestWithDuplicates)
BOOST_AUTO_TEST_CASE(octRegionPerfTestNoDuplicates)
{
TestLoop<OctTree>(RegionTest<OctTree>);
TestLoop<Octree>(RegionTest<Octree>);
BOOST_CHECK(true);
}
@@ -129,7 +129,7 @@ BOOST_AUTO_TEST_CASE(octBoxPerfTestWithDuplicates)
BOOST_AUTO_TEST_CASE(octBoxPerfTestNoDuplicates)
{
TestLoop<OctTree>(BoxTest<OctTree>);
TestLoop<Octree>(BoxTest<Octree>);
BOOST_CHECK(true);
}
@@ -141,7 +141,7 @@ BOOST_AUTO_TEST_CASE(octRayPerfTestWithDuplicates)
BOOST_AUTO_TEST_CASE(octRayPerfTestNoDuplicates)
{
TestLoop<OctTree>(RayTest<OctTree>);
TestLoop<Octree>(RayTest<Octree>);
BOOST_CHECK(true);
}
@@ -153,7 +153,7 @@ BOOST_AUTO_TEST_CASE(octNopPerfTestWithDuplicates)
BOOST_AUTO_TEST_CASE(octNopPerfTestNoDuplicates)
{
TestLoop<OctTree>(NopTest<OctTree>);
TestLoop<Octree>(NopTest<Octree>);
BOOST_CHECK(true);
}
+1 -1
View File
@@ -55,7 +55,7 @@ private:
glm::quat m_PrevOri;
glm::vec3 worldSize = glm::vec3(50, 50, 50);
OctTree someOctTree;
Octree someOctTree;
};
+4 -4
View File
@@ -16,9 +16,9 @@ class HardcodedTestWorld : public World
public:
struct LinkOctTreeAndModel {
EntityID entId;
OctTree::OctChild* child;
Octree::Child* child;
glm::vec3 posxyz;
LinkOctTreeAndModel(EntityID eId, OctTree::OctChild* ch, glm::vec3 pos)
LinkOctTreeAndModel(EntityID eId, Octree::Child* ch, glm::vec3 pos)
{
entId = eId;
child = ch;
@@ -27,7 +27,7 @@ public:
};
EntityID anotherBoxTransformId;
std::vector<LinkOctTreeAndModel> linkOM;
OctTree someOctTree;
Octree someOctTree;
//constructor
HardcodedTestWorld()
@@ -115,7 +115,7 @@ private:
model["Resource"] = "Models/Core/UnitBox.obj";
}
void AddBoxModel(const glm::vec3 &center, const float &halfSize, OctTree::OctChild* child, EntityID &outEntityId) {
void AddBoxModel(const glm::vec3 &center, const float &halfSize, Octree::Child* child, EntityID &outEntityId) {
World& world = *this;
EntityID entityDummyScene = world.CreateEntity();