From 7de28b9c89ca4554f5c12746f481f5b385529479 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Mon, 17 Apr 2017 22:27:29 +0300 Subject: [PATCH] Fix composite shape ray intersection logic The test for start_nesting coalescence was written the wrong way, causing intersection shapes to return spurious hits when the ray started inside some part of the shape. Presumably union shapes did not return hits in some cases when they should. --- source/geometry/compositeshape.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/geometry/compositeshape.h b/source/geometry/compositeshape.h index 0f1dd43..e9aeadc 100644 --- a/source/geometry/compositeshape.h +++ b/source/geometry/compositeshape.h @@ -181,7 +181,7 @@ inline unsigned CompositeShape::get_intersections(const Ray &ray, n = k; if(i!=shapes.begin()) - start_nesting = (start_nesting>!Ops::shortcircuit(false)); + start_nesting = (start_nesting>!Ops::shortcircuit(true)); } if(buffer!=points) -- 2.43.0