From e9583c50205919d3e93c553292f5614348c70b41 Mon Sep 17 00:00:00 2001 From: ponchio Date: Mon, 3 Oct 2005 16:07:50 +0000 Subject: [PATCH] Changed order of functions intersection_line_box and intersectuion_ray_box --- vcg/space/intersection3.h | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/vcg/space/intersection3.h b/vcg/space/intersection3.h index 34991490..2ec7fd3d 100644 --- a/vcg/space/intersection3.h +++ b/vcg/space/intersection3.h @@ -24,6 +24,9 @@ History $Log: not supported by cvs2svn $ +Revision 1.19 2005/09/30 13:11:39 pietroni +corrected 1 compiling error on Ray_Box_Intersection function + Revision 1.18 2005/09/29 15:30:10 pietroni Added function RayBoxIntersection, renamed intersection line box from "Intersection" to "Intersection_Line_Box" @@ -370,19 +373,7 @@ bool Intersection( const Line3 & ray, const Point3 & vert0, return true; } - - -// ray-box -template -bool Intersection_Ray_Box( const Box3 & box, const Ray3 & r, Point3 & coord ) -{ - Line3 l; - l.SetOrigin(r.Origin()); - l.SetDirection(r.Direction()); - return(Intersection_Line_Box(box,l,coord)); -} - -// ray-box +// line-box template bool Intersection_Line_Box( const Box3 & box, const Line3 & r, Point3 & coord ) { @@ -456,6 +447,17 @@ bool Intersection_Line_Box( const Box3 & box, const Line3 & r, Point3 & return true; // ray hits box } +// ray-box +template +bool Intersection_Ray_Box( const Box3 & box, const Ray3 & r, Point3 & coord ) +{ + Line3 l; + l.SetOrigin(r.Origin()); + l.SetDirection(r.Direction()); + return(Intersection_Line_Box(box,l,coord)); +} + + template bool Intersection (const Plane3 & plane0, const Plane3 & plane1, Line3 & line)