Showing the changes to interface/src/VoxelSystem.cpp (1 of 19 files). Show all
Unified · Split
| @@ -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 | |||
| 874 | bool 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 | |||