History

Merge branch 'master' of https://github.com/worklist/hifi into render_voxels_optimization

ZappoMan committed 13 years ago

Commit c73d4dd2 parents f490f3e 3bb40b519 files · +712 −647Browse files

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

Unified · Split

interface/src/VoxelSystem.cpp+17−0
@@ -870,3 +870,20 @@ void VoxelSystem::falseColorizeRandomEveryOther() { · 869 unmodified lines
870 args.totalNodes, args.colorableNodes, args.coloredNodes);870 args.totalNodes, args.colorableNodes, args.coloredNodes);
871 setupNewVoxelsForDrawing();871 setupNewVoxelsForDrawing();
872}872}
873
874bool VoxelSystem::findRayIntersection(const glm::vec3& origin, const glm::vec3& direction,
875 VoxelDetail& detail, float& distance, BoxFace& face) {
876 VoxelNode* node;
877 if (!_tree->findRayIntersection(origin, direction, node, distance, face)) {
878 return false;
879 }
880 detail.x = node->getCorner().x;
881 detail.y = node->getCorner().y;
882 detail.z = node->getCorner().z;
883 detail.s = node->getScale();
884 detail.red = node->getColor()[0];
885 detail.green = node->getColor()[1];
886 detail.blue = node->getColor()[2];
887 return true;
888}
889