diff --git a/Filtered_kernel/include/CGAL/Filtered_kernel/internal/Do_intersect_3.h b/Filtered_kernel/include/CGAL/Filtered_kernel/internal/Do_intersect_3.h index 36a87dd8396..cdaec52c331 100644 --- a/Filtered_kernel/include/CGAL/Filtered_kernel/internal/Do_intersect_3.h +++ b/Filtered_kernel/include/CGAL/Filtered_kernel/internal/Do_intersect_3.h @@ -128,15 +128,14 @@ public: } - result_type operator()(const Tetrahedron_3 &t, const Bbox_3& b) const { Get_approx get_approx; double px, py, pz; - { - const Point_3& p = t[0]; + for(int i = 0; i < 4; ++i) { + const Point_3& p = t[i]; if (fit_in_double(get_approx(p).x(), px) && fit_in_double(get_approx(p).y(), py) && fit_in_double(get_approx(p).z(), pz) ) { @@ -148,49 +147,18 @@ public: } } - { - const Point_3& p = t[1]; - if (fit_in_double(get_approx(p).x(), px) && fit_in_double(get_approx(p).y(), py) && - fit_in_double(get_approx(p).z(), pz) ) - { - if( (px >= b.xmin() && px <= b.xmax()) && (py >= b.ymin() && py <= b.ymax()) && (pz >= b.zmin() && pz <= b.zmax()) ){ - return true; - } - }else{ - return Base::operator()(t,b); - } - } - - { - const Point_3& p = t[2]; - if (fit_in_double(get_approx(p).x(), px) && fit_in_double(get_approx(p).y(), py) && - fit_in_double(get_approx(p).z(), pz) ) - { - if( (px >= b.xmin() && px <= b.xmax()) && (py >= b.ymin() && py <= b.ymax()) && (pz >= b.zmin() && pz <= b.zmax()) ){ - return true; - } - }else{ - return Base::operator()(t,b); - } - } - - - - { - const Point_3& p = t[3]; - if (fit_in_double(get_approx(p).x(), px) && fit_in_double(get_approx(p).y(), py) && - fit_in_double(get_approx(p).z(), pz) ) - { - if( (px >= b.xmin() && px <= b.xmax()) && (py >= b.ymin() && py <= b.ymax()) && (pz >= b.zmin() && pz <= b.zmax()) ){ - return true; - } - } - } - return Base::operator()(t,b); } + result_type + operator()(const Bbox_3& b, const Tetrahedron_3 &t) const + { + return this->operator()(t, b); + } + + + result_type operator()(const Bbox_3& b, const Ray_3 &r) const {