diff --git a/AABB_tree/include/CGAL/AABB_traits_3.h b/AABB_tree/include/CGAL/AABB_traits_3.h index 2e7799ad0a2..291f90cf085 100644 --- a/AABB_tree/include/CGAL/AABB_traits_3.h +++ b/AABB_tree/include/CGAL/AABB_traits_3.h @@ -398,6 +398,7 @@ public: typedef typename AT::Point Point; typedef typename AT::FT FT; typedef typename AT::Primitive Primitive; + typedef typename GeomTraits::Boolean Boolean; public: CGAL::Comparison_result operator()(const Point& p, const Bounding_box& bb, const Point& bound) const { @@ -426,7 +427,7 @@ public: CGAL::LARGER; } - CGAL::Comparison_result do_intersect_sphere_iso_cuboid_3(const typename GeomTraits::Sphere_3& sphere, + Boolean do_intersect_sphere_iso_cuboid_3(const typename GeomTraits::Sphere_3& sphere, const Bounding_box& box) const { typedef typename GeomTraits::FT FT; @@ -454,7 +455,7 @@ public: d = bxmin - *cci; d = square(d); if (d > sr) - return CGAL::LARGER; + return false; distance = d; } @@ -463,7 +464,7 @@ public: d = *cci - bxmax; d = square(d); if (d > sr) - return CGAL::LARGER; + return false; distance = d; } @@ -474,7 +475,7 @@ public: d = bymin - *cci; d = square(d); if (d > sr) - return CGAL::LARGER; + return false; distance += d; } @@ -483,7 +484,7 @@ public: d = *cci - bymax; d = square(d); if (d > sr) - return CGAL::LARGER; + return false; distance += d; } @@ -494,7 +495,7 @@ public: d = bzmin - *cci; d = square(d); if (d > sr) - return CGAL::LARGER; + return false; distance += d; } @@ -503,13 +504,13 @@ public: d = *cci - bzmax; d = square(d); if (d > sr) - return CGAL::LARGER; + return false; distance += d; } // Note that with the way the distance above is computed, the distance is '0' if the box strictly // contains the sphere. But since we use '>', we don't exit - return (distance <= sr) ? CGAL::SMALLER : CGAL::LARGER; + return (distance <= sr); } }; diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_pmp_distance.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_pmp_distance.cpp index 40b2206e345..8569290a59d 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_pmp_distance.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_pmp_distance.cpp @@ -30,6 +30,8 @@ struct Custom_traits_Hausdorff FT& operator+=(FT){ return *this; } }; + typedef bool Boolean; + struct Point_3 { Point_3(){}