From 29ebb2f6ac0628b323ad48a452c39bbb48075823 Mon Sep 17 00:00:00 2001 From: Jamie Robertson Date: Fri, 13 Dec 2024 11:19:16 +0000 Subject: [PATCH] Update PolytopeIntersector.cpp In the PolytopeInterctor constructor with screen coordinates, the eyespace polytope should have been placed in the polytope stack before the worldspace polytope (as per LineSegmentIntersector constructor). The omission meant that intersections were not calculated properly for nodes under transforms. --- src/vsg/utils/PolytopeIntersector.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/vsg/utils/PolytopeIntersector.cpp b/src/vsg/utils/PolytopeIntersector.cpp index 644896d988..c5dd48fefd 100644 --- a/src/vsg/utils/PolytopeIntersector.cpp +++ b/src/vsg/utils/PolytopeIntersector.cpp @@ -229,6 +229,8 @@ PolytopeIntersector::PolytopeIntersector(const Camera& camera, double xMin, doub eyespace.push_back(pl * projectionMatrix); } + _polytopeStack.push_back(eyespace); + vsg::Polytope worldspace; for (auto& pl : eyespace) {