Showing the changes to interface/src/MetavoxelSystem.cpp (1 of 3 files). Show all
Unified · Split
| @@ -2319,9 +2319,16 @@ void StaticModelRenderer::renderUnclipped(float alpha, Mode mode) { · 2318 unmodified lines | ||
| 2319 | 2319 | _model->render(alpha); |
| 2320 | 2320 | } |
| 2321 | 2321 | |
| 2322 | −bool StaticModelRenderer::findRayIntersection(RayIntersectionInfo& intersection, | |
| 2323 | − const glm::vec3& clipMinimum, float clipSize) const { | |
| 2324 | − return _model->findRayIntersection(intersection); | |
| 2322 | +bool StaticModelRenderer::findRayIntersection(const glm::vec3& origin, const glm::vec3& direction, | |
| 2323 | + const glm::vec3& clipMinimum, float clipSize, float& distance) const { | |
| 2324 | + RayIntersectionInfo info; | |
| 2325 | + info._rayStart = origin; | |
| 2326 | + info._rayDirection = direction; | |
| 2327 | + if (!_model->findRayIntersection(info)) { | |
| 2328 | + return false; | |
| 2329 | + } | |
| 2330 | + distance = info._hitDistance; | |
| 2331 | + return true; | |
| 2325 | 2332 | } |
| 2326 | 2333 | |
| 2327 | 2334 | void StaticModelRenderer::applyTranslation(const glm::vec3& translation) { |