From 53be3838433f7bada27567d071a0a3c77f7e2a6b Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Thu, 20 Dec 2007 14:40:28 +0000 Subject: [PATCH] From Wojciech Lewandowski, "By complete coincidence I just have read an old OSG submission mail related to bugfixes in osg::Polytope.setToUnitFrustum and setToBoundingBox It was sent at beginning of december. I read it when purging my Thrash emails and found it there this because it was wrongly classified as SPAM. What stroke me in this email was the fact that there was once an error in Polytope class. Since I adopted CustomPolytope (osgSim OverlayNode.cpp) for my minimal shadow area computations I checked my code for this error. And I found it in CustomPolytope::setToUnitFrustum method. CustomPolytope::setToBoundingBox seemed OK. So I went back to the origin and fixed this error in OverlayNode.cpp as well. I have not tested it in OverlayNode though (I don't know how) so please look at this carefully. But it seems to work fine with my shadow calculations." --- src/osgSim/OverlayNode.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/osgSim/OverlayNode.cpp b/src/osgSim/OverlayNode.cpp index f3b73ee44..e4d91fb81 100644 --- a/src/osgSim/OverlayNode.cpp +++ b/src/osgSim/OverlayNode.cpp @@ -106,7 +106,7 @@ public: { // near plane Face& face = createFace(); face.name = "near"; - face.plane.set(0.0,0.0,-1.0,1.0); + face.plane.set(0.0,0.0,1.0,1.0); face.vertices.push_back(v000); face.vertices.push_back(v010); face.vertices.push_back(v110); @@ -117,7 +117,7 @@ public: { // far plane Face& face = createFace(); face.name = "far"; - face.plane.set(0.0,0.0,1.0,1.0); + face.plane.set(0.0,0.0,-1.0,1.0); face.vertices.push_back(v001); face.vertices.push_back(v101); face.vertices.push_back(v111);