From 52bc6c2f1376c8f4b69847fabcd0eedf11f4720b Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Thu, 8 Nov 2001 13:50:32 +0000 Subject: [PATCH] Fixed the IntersectVisitor which was broken by a recent patch to catch parallel line and traingle combinations. --- src/osgUtil/IntersectVisitor.cpp | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/osgUtil/IntersectVisitor.cpp b/src/osgUtil/IntersectVisitor.cpp index ad1f63ac1..fda3fd8f9 100644 --- a/src/osgUtil/IntersectVisitor.cpp +++ b/src/osgUtil/IntersectVisitor.cpp @@ -419,25 +419,20 @@ struct TriangleIntersect if (ds310.0f) r3 = ds12/d312; + else if (d312!=0.0f) r3 = ds12/d312; else return; // the triangle and the line must be parallel intersection. float r1; if (ds23==0.0f) r1=0.0f; - else if (d123>0.0f) r1 = ds23/d123; + else if (d123!=0.0f) r1 = ds23/d123; else return; // the triangle and the line must be parallel intersection. float r2; if (ds31==0.0f) r2=0.0f; - else if (d231>0.0f) r2 = ds31/d231; + else if (d231!=0.0f) r2 = ds31/d231; else return; // the triangle and the line must be parallel intersection. float total_r = (r1+r2+r3);