History

removed findSpherePenetration() and findCapsulePenetration() from VoxelSystem, use VoxelTree

ZappoMan committed 12 years ago

Commit 9bd29bd1 parent ded73285 files · +31 −45Browse files

Showing the changes to interface/src/VoxelSystem.cpp (1 of 5 files). Show all

Unified · Split

interface/src/VoxelSystem.cpp+0−22
@@ -2280,28 +2280,6 @@ bool VoxelSystem::findRayIntersection(const glm::vec3& origin, const glm::vec3& · 2279 unmodified lines
2280 return result;2280 return result;
2281}2281}
2282 2282
2283bool VoxelSystem::findSpherePenetration(const glm::vec3& center, float radius, glm::vec3& penetration) {
2284 PerformanceWarning warn(Menu::getInstance()->isOptionChecked(MenuOption::PipelineWarnings),
2285 "VoxelSystem::findSpherePenetration()");
2286 bool result = false; // assume no penetration
2287 if (_tree->tryLockForRead()) {
2288 result = _tree->findSpherePenetration(center, radius, penetration);
2289 _tree->unlock();
2290 }
2291 return result;
2292}
2293
2294bool VoxelSystem::findCapsulePenetration(const glm::vec3& start, const glm::vec3& end, float radius, glm::vec3& penetration) {
2295 PerformanceWarning warn(Menu::getInstance()->isOptionChecked(MenuOption::PipelineWarnings),
2296 "VoxelSystem::findCapsulePenetration()");
2297 bool result = false; // assume no penetration
2298 if (_tree->tryLockForRead()) {
2299 result = _tree->findCapsulePenetration(start, end, radius, penetration);
2300 _tree->unlock();
2301 }
2302 return result;
2303}
2304
2305void VoxelSystem::copySubTreeIntoNewTree(VoxelTreeElement* startNode, VoxelSystem* destination, bool rebaseToRoot) {2283void VoxelSystem::copySubTreeIntoNewTree(VoxelTreeElement* startNode, VoxelSystem* destination, bool rebaseToRoot) {
2306 _tree->copySubTreeIntoNewTree(startNode, destination->_tree, rebaseToRoot);2284 _tree->copySubTreeIntoNewTree(startNode, destination->_tree, rebaseToRoot);
2307 destination->setupNewVoxelsForDrawing();2285 destination->setupNewVoxelsForDrawing();