Fixed warnings in OctTree. Cleaned unit tests.
This commit is contained in:
@@ -300,7 +300,7 @@ void OctTree::OctChild::AddDynamicObject(const AABB& box)
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
//Since it hasn't been added yet to the real object list, the index is after the last =size.
|
//Since it hasn't been added yet to the real object list, the index is after the last =size.
|
||||||
m_DynamicObjIndices.push_back(m_DynamicObjectsRef.size());
|
m_DynamicObjIndices.push_back((int)m_DynamicObjectsRef.size());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -312,7 +312,7 @@ void OctTree::OctChild::AddStaticObject(const AABB& box)
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
//Since it hasn't been added yet to the real object list, the index is after the last =size.
|
//Since it hasn't been added yet to the real object list, the index is after the last =size.
|
||||||
m_StaticObjIndices.push_back(m_StaticObjectsRef.size());
|
m_StaticObjIndices.push_back((int)m_StaticObjectsRef.size());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -323,7 +323,7 @@ void OctTree::OctChild::BoxesInSameRegion(const AABB& box, std::vector<AABB>& ou
|
|||||||
m_Children[i]->BoxesInSameRegion(box, outBoxes);
|
m_Children[i]->BoxesInSameRegion(box, outBoxes);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
int startIndex = outBoxes.size();
|
size_t startIndex = outBoxes.size();
|
||||||
int numDuplicates = 0;
|
int numDuplicates = 0;
|
||||||
outBoxes.resize(outBoxes.size() + m_StaticObjIndices.size() + m_DynamicObjIndices.size());
|
outBoxes.resize(outBoxes.size() + m_StaticObjIndices.size() + m_DynamicObjIndices.size());
|
||||||
for (size_t i = 0; i < m_StaticObjIndices.size(); ++i){
|
for (size_t i = 0; i < m_StaticObjIndices.size(); ++i){
|
||||||
|
|||||||
@@ -44,9 +44,9 @@ const int BOXES = 400;
|
|||||||
const int NUM_DYNAMICS = 0;
|
const int NUM_DYNAMICS = 0;
|
||||||
const int NUM_STATICS = BOXES - NUM_DYNAMICS;
|
const int NUM_STATICS = BOXES - NUM_DYNAMICS;
|
||||||
const int SEED = 6548;
|
const int SEED = 6548;
|
||||||
const int TEST_FRAMES = 1; //300
|
const int TEST_FRAMES = 300;
|
||||||
const int NUM_FUNCTION_LOOPS = 1; //25
|
const int NUM_FUNCTION_LOOPS = 25;
|
||||||
const int TESTS = 1; //10
|
const int TESTS = 0; //10
|
||||||
|
|
||||||
template<typename Tree>
|
template<typename Tree>
|
||||||
void RegionTest(Tree& tree)
|
void RegionTest(Tree& tree)
|
||||||
@@ -116,9 +116,6 @@ void TestLoop(TestFunction xTest)
|
|||||||
}
|
}
|
||||||
tree.ClearObjects();
|
tree.ClearObjects();
|
||||||
}
|
}
|
||||||
int asda = 0;
|
|
||||||
asda = 123;
|
|
||||||
BOOST_CHECK(asda == 123);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOST_AUTO_TEST_CASE(octRegionPerfTestWithDuplicates)
|
BOOST_AUTO_TEST_CASE(octRegionPerfTestWithDuplicates)
|
||||||
|
|||||||
Reference in New Issue
Block a user