From 3f6fd615a96a3cf347557f6f82b5daee767039a0 Mon Sep 17 00:00:00 2001 From: David Doan Date: Tue, 12 Dec 2023 22:29:39 -0500 Subject: isHit --- src/accelerate/kdtree.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/accelerate/kdtree.cpp') diff --git a/src/accelerate/kdtree.cpp b/src/accelerate/kdtree.cpp index 4156c98..f025b0a 100644 --- a/src/accelerate/kdtree.cpp +++ b/src/accelerate/kdtree.cpp @@ -218,8 +218,8 @@ float RayTracer::traverse( for (const auto &shape: tree->shapesWithinBounds) { glm::vec4 pObject = shape.shape.inverseCTM * p; glm::vec4 dObject = glm::normalize(shape.shape.inverseCTM * d); - - glm::vec4 intersection = findIntersection(pObject, dObject, shape.shape); + bool isHit = false; + glm::vec4 intersection = findIntersection(pObject, dObject, shape.shape, isHit); if (intersection.w == 0.f) { continue; } @@ -270,4 +270,4 @@ float RayTracer::traverse( } return traverse(p, d, t, tEnd, testShape, tree->rightChild); } -} \ No newline at end of file +} -- cgit v1.2.3-70-g09d2