diff --git a/vcg/space/intersection3.h b/vcg/space/intersection3.h index 6e56cc83..151cae3f 100644 --- a/vcg/space/intersection3.h +++ b/vcg/space/intersection3.h @@ -24,6 +24,9 @@ History $Log: not supported by cvs2svn $ +Revision 1.17 2005/09/29 11:48:00 m_di_benedetto +Added functor RayTriangleIntersectionFunctor. + Revision 1.16 2005/09/28 19:40:55 m_di_benedetto Added intersection for ray-triangle (with Ray3 type). @@ -365,9 +368,20 @@ bool Intersection( const Line3 & ray, const Point3 & vert0, } + // ray-box template -bool Intersection( const Box3 & box, const Line3 & r, Point3 & coord ) +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,r,coord)); +} + +// ray-box +template +bool Intersection_Line_Box( const Box3 & box, const Line3 & r, Point3 & coord ) { const int NUMDIM = 3; const int RIGHT = 0;