History

removed VoxelSystem::findRayIntersection() use tree directly

ZappoMan committed 12 years ago

Commit f0e73d21 parent 9bd29bd5 files · +29 −29Browse files

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

Unified · Split

interface/src/VoxelSystem.cpp+0−24
@@ -2256,30 +2256,6 @@ bool VoxelSystem::hideOutOfViewOperation(OctreeElement* element, void* extraData · 2255 unmodified lines
22562256 }
22572257
22582258
2259−bool VoxelSystem::findRayIntersection(const glm::vec3& origin, const glm::vec3& direction,
2260− VoxelDetail& detail, float& distance, BoxFace& face) {
2261−
2262− PerformanceWarning warn(Menu::getInstance()->isOptionChecked(MenuOption::PipelineWarnings),
2263− "VoxelSystem::findRayIntersection()");
2264− bool result = false; // assume no intersection
2265− if (_tree->tryLockForRead()) {
2266− OctreeElement* element;
2267− result = _tree->findRayIntersection(origin, direction, element, distance, face);
2268− if (result) {
2269− VoxelTreeElement* voxel = (VoxelTreeElement*)element;
2270− detail.x = voxel->getCorner().x;
2271− detail.y = voxel->getCorner().y;
2272− detail.z = voxel->getCorner().z;
2273− detail.s = voxel->getScale();
2274− detail.red = voxel->getColor()[0];
2275− detail.green = voxel->getColor()[1];
2276− detail.blue = voxel->getColor()[2];
2277− }
2278− _tree->unlock();
2279− }
2280− return result;
2281−}
2282−
22832259 void VoxelSystem::copySubTreeIntoNewTree(VoxelTreeElement* startNode, VoxelSystem* destination, bool rebaseToRoot) {
22842260 _tree->copySubTreeIntoNewTree(startNode, destination->_tree, rebaseToRoot);
22852261 destination->setupNewVoxelsForDrawing();