From ff948edd549719ce98236537a5596d98a4f8a6d5 Mon Sep 17 00:00:00 2001 From: cignoni <paolo.cignoni@isti.cnr.it> Date: Wed, 5 May 2004 08:21:55 +0000 Subject: [PATCH] syntax errors in inersection plane line. --- vcg/space/intersection3.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/vcg/space/intersection3.h b/vcg/space/intersection3.h index f0ba8cb6..db718812 100644 --- a/vcg/space/intersection3.h +++ b/vcg/space/intersection3.h @@ -24,6 +24,10 @@ History $Log: not supported by cvs2svn $ +Revision 1.4 2004/05/04 02:37:58 ganovelli +Triangle3<T> replaced by TRIANGLE +Segment<T> replaced by EDGETYPE + Revision 1.3 2004/04/29 10:48:44 ganovelli error in plane segment corrected @@ -95,11 +99,11 @@ template<class T> inline bool Intersection( const Plane3<T> & pl, const Line3<T> & li, Point3<T> & po){ const T epsilon = T(1e-8); - T k = pl.n * li.dire; // Compute 'k' factor + T k = pl.Direction() * li.Direction(); // Compute 'k' factor if( (k > -epsilon) && (k < epsilon)) return false; - T r = (pl.d - pl.n*li.orig)/k; // Compute ray distance - po = li.orig + li.dire*r; + T r = (pl.Offset() - pl.Direction()*li.Origin())/k; // Compute ray distance + po = li.Origin() + li.Direction()*r; return true; }