fixing types for filtered kernels

This commit is contained in:
Sven Oesau 2025-10-24 17:07:52 +02:00
parent f79fc7fc58
commit 87cdde6876
2 changed files with 11 additions and 8 deletions

View File

@ -398,6 +398,7 @@ public:
typedef typename AT::Point Point; typedef typename AT::Point Point;
typedef typename AT::FT FT; typedef typename AT::FT FT;
typedef typename AT::Primitive Primitive; typedef typename AT::Primitive Primitive;
typedef typename GeomTraits::Boolean Boolean;
public: public:
CGAL::Comparison_result operator()(const Point& p, const Bounding_box& bb, const Point& bound) const CGAL::Comparison_result operator()(const Point& p, const Bounding_box& bb, const Point& bound) const
{ {
@ -426,7 +427,7 @@ public:
CGAL::LARGER; 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 const Bounding_box& box) const
{ {
typedef typename GeomTraits::FT FT; typedef typename GeomTraits::FT FT;
@ -454,7 +455,7 @@ public:
d = bxmin - *cci; d = bxmin - *cci;
d = square(d); d = square(d);
if (d > sr) if (d > sr)
return CGAL::LARGER; return false;
distance = d; distance = d;
} }
@ -463,7 +464,7 @@ public:
d = *cci - bxmax; d = *cci - bxmax;
d = square(d); d = square(d);
if (d > sr) if (d > sr)
return CGAL::LARGER; return false;
distance = d; distance = d;
} }
@ -474,7 +475,7 @@ public:
d = bymin - *cci; d = bymin - *cci;
d = square(d); d = square(d);
if (d > sr) if (d > sr)
return CGAL::LARGER; return false;
distance += d; distance += d;
} }
@ -483,7 +484,7 @@ public:
d = *cci - bymax; d = *cci - bymax;
d = square(d); d = square(d);
if (d > sr) if (d > sr)
return CGAL::LARGER; return false;
distance += d; distance += d;
} }
@ -494,7 +495,7 @@ public:
d = bzmin - *cci; d = bzmin - *cci;
d = square(d); d = square(d);
if (d > sr) if (d > sr)
return CGAL::LARGER; return false;
distance += d; distance += d;
} }
@ -503,13 +504,13 @@ public:
d = *cci - bzmax; d = *cci - bzmax;
d = square(d); d = square(d);
if (d > sr) if (d > sr)
return CGAL::LARGER; return false;
distance += d; distance += d;
} }
// Note that with the way the distance above is computed, the distance is '0' if the box strictly // 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 // contains the sphere. But since we use '>', we don't exit
return (distance <= sr) ? CGAL::SMALLER : CGAL::LARGER; return (distance <= sr);
} }
}; };

View File

@ -30,6 +30,8 @@ struct Custom_traits_Hausdorff
FT& operator+=(FT){ return *this; } FT& operator+=(FT){ return *this; }
}; };
typedef bool Boolean;
struct Point_3 struct Point_3
{ {
Point_3(){} Point_3(){}