From 15e820825fc6e6d159f4c524fc09a9fc89036e24 Mon Sep 17 00:00:00 2001 From: AnyOldName3 Date: Tue, 21 Aug 2018 14:00:29 +0100 Subject: [PATCH] Fix another convex hull clipping issue and restore z-clipping --- components/sceneutil/mwshadowtechnique.cpp | 34 ++++++++++++++++++---- 1 file changed, 28 insertions(+), 6 deletions(-) diff --git a/components/sceneutil/mwshadowtechnique.cpp b/components/sceneutil/mwshadowtechnique.cpp index c3bf99c96..b90f67ff6 100644 --- a/components/sceneutil/mwshadowtechnique.cpp +++ b/components/sceneutil/mwshadowtechnique.cpp @@ -2079,7 +2079,7 @@ struct ConvexHull center /= double(intersections.size()); - typedef std::map VertexMap; + typedef std::map>> VertexMap; VertexMap vertexMap; for(Vertices::iterator itr = intersections.begin(); itr != intersections.end(); @@ -2090,16 +2090,38 @@ struct ConvexHull double v = dv * up; double angle = atan2(h,v); // OSG_NOTICE<<"angle = "<