From: Mikko Rasa Date: Fri, 19 Aug 2016 23:24:20 +0000 (+0300) Subject: Adjust start_nesting in CompositeShape::get_intersections X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=36c65e8612aa7209f50270474003a4b22d67042b;p=libs%2Fmath.git 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. --- 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)