From 36c65e8612aa7209f50270474003a4b22d67042b Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Sat, 20 Aug 2016 02:24:20 +0300 Subject: [PATCH] Adjust start_nesting in CompositeShape::get_intersections The intersection points are coalesced to incrementally form a single composite shape so start_nesting must follow suit. --- source/geometry/compositeshape.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source/geometry/compositeshape.h b/source/geometry/compositeshape.h index 0c2c838..0f1dd43 100644 --- a/source/geometry/compositeshape.h +++ b/source/geometry/compositeshape.h @@ -179,6 +179,9 @@ inline unsigned CompositeShape::get_intersections(const Ray &ray, return 0; n = k; + + if(i!=shapes.begin()) + start_nesting = (start_nesting>!Ops::shortcircuit(false)); } if(buffer!=points) -- 2.43.0