diff --git a/Kernel_23/include/CGAL/Kernel/global_functions_2.h b/Kernel_23/include/CGAL/Kernel/global_functions_2.h index 99ed9550b18..3d47d12099c 100644 --- a/Kernel_23/include/CGAL/Kernel/global_functions_2.h +++ b/Kernel_23/include/CGAL/Kernel/global_functions_2.h @@ -287,6 +287,16 @@ compare_distance_to_point(const Point_2& p, return internal::compare_distance_to_point(p, q, r, K()); } +template +inline +typename K::Comparison_result +compare_power_distance(const Point_2 &r, + const Weighted_point_2 &p, + const Weighted_point_2 &q) +{ + return internal::compare_power_distance(r, p, q, K()); +} + template inline typename K::Comparison_result @@ -939,11 +949,50 @@ orientation(const Vector_2 &u, const Vector_2 &v) // parallel() functions are in global_functions.h +template +inline +typename K::Orientation +power_side_of_oriented_power_circle(const Weighted_point_2 &p, + const Weighted_point_2 &q) +{ + return internal::power_side_of_oriented_power_circle(p, q, K()); +} + +template +inline +typename K::Orientation +power_side_of_oriented_power_circle(const Weighted_point_2 &p, + const Weighted_point_2 &q, + const Weighted_point_2 &r) +{ + return internal::power_side_of_oriented_power_circle(p, q, r, K()); +} + +template +inline +typename K::Orientation +power_side_of_oriented_power_circle(const Weighted_point_2 &p, + const Weighted_point_2 &q, + const Weighted_point_2 &r, + const Weighted_point_2 &s) +{ + return internal::power_side_of_oriented_power_circle(p, q, r, s, K()); +} + +template +inline +typename K::Line_2 +radical_axis(const Weighted_point_2 &p, + const Weighted_point_2 &q) +{ + return internal::radical_axis(p, q, K()); +} + template inline typename K::Line_2 radical_line(const Circle_2 &s1, - const Circle_2 &s2) + const Circle_2 &s2) { return K().construct_radical_line_2_object()(s1,s2); } @@ -1020,6 +1069,16 @@ squared_radius(const Point_2& p, const Point_2& q, const Point_2& r) return internal::squared_radius(p, q, r, K()); } +template < class K > +inline +typename K::Point_2 +weighted_circumcenter(const Weighted_point_2 &p, + const Weighted_point_2 &q, + const Weighted_point_2 &r) +{ + return internal::weighted_circumcenter(p, q, r, K()); +} + template < class K > inline typename K::Boolean diff --git a/Kernel_23/include/CGAL/Kernel/global_functions_3.h b/Kernel_23/include/CGAL/Kernel/global_functions_3.h index 43b6eb34f43..30605491fb6 100644 --- a/Kernel_23/include/CGAL/Kernel/global_functions_3.h +++ b/Kernel_23/include/CGAL/Kernel/global_functions_3.h @@ -344,6 +344,16 @@ compare_distance_to_point(const Point_3 &p, return internal::compare_distance_to_point(p, q, r, K()); } +template < class K > +inline +typename K::Comparison_result +compare_power_distance(const Point_3 &r, + const Weighted_point_3 &p, + const Weighted_point_3 &q) +{ + return internal::compare_power_distance(r, p, q, K()); +} + template < class K > inline typename K::Comparison_result @@ -436,6 +446,48 @@ compare_signed_distance_to_plane(const Point_3 &hp, return internal::compare_signed_distance_to_plane(hp, hq, hr, p, q, K()); } +template < class K > +inline +typename K::Comparison_result +compare_weighted_squared_radius(const Weighted_point_3 &p, + const typename K::FT &w) +{ + return internal::compare_weighted_squared_radius(p, w, K()); +} + +template < class K > +inline +typename K::Comparison_result +compare_weighted_squared_radius(const Weighted_point_3 &p, + const Weighted_point_3 &q, + const typename K::FT &w) +{ + return internal::compare_weighted_squared_radius(p, q, w, K()); +} + +template < class K > +inline +typename K::Comparison_result +compare_weighted_squared_radius(const Weighted_point_3 &p, + const Weighted_point_3 &q, + const Weighted_point_3 &r, + const typename K::FT &w) +{ + return internal::compare_weighted_squared_radius(p, q, r, w, K()); +} + +template < class K > +inline +typename K::Comparison_result +compare_weighted_squared_radius(const Weighted_point_3 &p, + const Weighted_point_3 &q, + const Weighted_point_3 &r, + const Weighted_point_3 &s, + const typename K::FT &w) +{ + return internal::compare_weighted_squared_radius(p, q, r, s, w, K()); +} + template < class K > inline typename K::Comparison_result @@ -1003,6 +1055,111 @@ orthogonal_vector(const Plane_3& p) // parallel() functions are in Kernel/global_functions.h +template +inline +typename K::FT +power_distance_to_power_sphere(const Weighted_point_3 &p, + const Weighted_point_3 &q, + const Weighted_point_3 &r, + const Weighted_point_3 &s, + const Weighted_point_3 &t) +{ + return internal::power_distance_to_power_sphere(p, q, r, s, t, K()); +} + +template +inline +typename K::FT +power_product(const Weighted_point_3 &p, + const Weighted_point_3 &q) +{ + return internal::power_product(p, q, K()); +} + +template +inline +typename K::Bounded_side +power_side_of_bounded_power_sphere(const Weighted_point_3 &p, + const Weighted_point_3 &q) +{ + return internal::power_side_of_bounded_power_sphere(p, q, K()); +} + +template +inline +typename K::Bounded_side +power_side_of_bounded_power_sphere(const Weighted_point_3 &p, + const Weighted_point_3 &q, + const Weighted_point_3 &r) +{ + return internal::power_side_of_bounded_power_sphere(p, q, r, K()); +} + +template +inline +typename K::Bounded_side +power_side_of_bounded_power_sphere(const Weighted_point_3 &p, + const Weighted_point_3 &q, + const Weighted_point_3 &r, + const Weighted_point_3 &s) +{ + return internal::power_side_of_bounded_power_sphere(p, q, r, s, K()); +} + +template +inline +typename K::Bounded_side +power_side_of_bounded_power_sphere(const Weighted_point_3 &p, + const Weighted_point_3 &q, + const Weighted_point_3 &r, + const Weighted_point_3 &s, + const Weighted_point_3 &t) +{ + return internal::power_side_of_bounded_power_sphere(p, q, r, s, t, K()); +} + +template +inline +typename K::Oriented_side +power_side_of_oriented_power_sphere(const Weighted_point_3 &p, + const Weighted_point_3 &q) +{ + return internal::power_side_of_oriented_power_sphere(p, q, K()); +} + +template +inline +typename K::Oriented_side +power_side_of_oriented_power_sphere(const Weighted_point_3 &p, + const Weighted_point_3 &q, + const Weighted_point_3 &r) +{ + return internal::power_side_of_oriented_power_sphere(p, q, r, K()); +} + +template +inline +typename K::Oriented_side +power_side_of_oriented_power_sphere(const Weighted_point_3 &p, + const Weighted_point_3 &q, + const Weighted_point_3 &r, + const Weighted_point_3 &s) +{ + return internal::power_side_of_oriented_power_sphere(p, q, r, s, K()); +} + +template +inline +typename K::Oriented_side +power_side_of_oriented_power_sphere(const Weighted_point_3 &p, + const Weighted_point_3 &q, + const Weighted_point_3 &r, + const Weighted_point_3 &s, + const Weighted_point_3 &t) +{ + return internal::power_side_of_oriented_power_sphere(p, q, r, s, t, K()); +} + template inline typename K::Plane_3 @@ -1106,6 +1263,44 @@ squared_radius(const Point_3 &p) return internal::squared_radius(p, K()); } +template < class K > +inline +typename K::FT +squared_radius_smallest_orthogonal_sphere(const Weighted_point_3 &p) +{ + return internal::squared_radius_smallest_orthogonal_sphere(p, K()); +} + +template < class K > +inline +typename K::FT +squared_radius_smallest_orthogonal_sphere(const Weighted_point_3 &p, + const Weighted_point_3 &q) +{ + return internal::squared_radius_smallest_orthogonal_sphere(p, q, K()); +} + +template < class K > +inline +typename K::FT +squared_radius_smallest_orthogonal_sphere(const Weighted_point_3 &p, + const Weighted_point_3 &q, + const Weighted_point_3 &r) +{ + return internal::squared_radius_smallest_orthogonal_sphere(p, q, r, K()); +} + +template < class K > +inline +typename K::FT +squared_radius_smallest_orthogonal_sphere(const Weighted_point_3 &p, + const Weighted_point_3 &q, + const Weighted_point_3 &r, + const Weighted_point_3 &s) +{ + return internal::squared_radius_smallest_orthogonal_sphere(p, q, r, s, K()); +} + template < class K > inline typename K::Vector_3 @@ -1123,6 +1318,36 @@ volume(const Point_3 &p, const Point_3 &q, return internal::volume(p, q, r, s, K()); } +template < class K > +inline +typename K::Point_3 +weighted_circumcenter(const Weighted_point_3 &p, + const Weighted_point_3 &q) +{ + return internal::weighted_circumcenter(p, q, K()); +} + +template < class K > +inline +typename K::Point_3 +weighted_circumcenter(const Weighted_point_3 &p, + const Weighted_point_3 &q, + const Weighted_point_3 &r) +{ + return internal::weighted_circumcenter(p, q, r, K()); +} + +template < class K > +inline +typename K::Point_3 +weighted_circumcenter(const Weighted_point_3 &p, + const Weighted_point_3 &q, + const Weighted_point_3 &r, + const Weighted_point_3 &s) +{ + return internal::weighted_circumcenter(p, q, r, s, K()); +} + template < class K > inline typename K::Boolean diff --git a/Kernel_23/include/CGAL/Kernel/global_functions_internal_2.h b/Kernel_23/include/CGAL/Kernel/global_functions_internal_2.h index 9f144ff7ada..44abff3c9f7 100644 --- a/Kernel_23/include/CGAL/Kernel/global_functions_internal_2.h +++ b/Kernel_23/include/CGAL/Kernel/global_functions_internal_2.h @@ -320,6 +320,16 @@ compare_distance_to_point(const typename K::Point_2 &p, return k.compare_distance_2_object()(p, q, r); } +template +inline +typename K::Comparison_result +compare_power_distance(const typename K::Point_2 &r, + const typename K::Weighted_point_2 &p, + const typename K::Weighted_point_2 &q, const K& k) +{ + return k.compare_power_distance_2_object()(r, p, q); +} + template inline typename K::Comparison_result @@ -852,6 +862,45 @@ parallel(const typename K::Segment_2 &s1, return k.are_parallel_2_object()(s1, s2); } +template +inline +typename K::Oriented_side +power_side_of_oriented_power_circle(const typename K::Weighted_point_2 &p, + const typename K::Weighted_point_2 &q, const K &k) +{ + return k.power_side_of_oriented_power_circle_2_object()(p, q); +} + +template +inline +typename K::Oriented_side +power_side_of_oriented_power_circle(const typename K::Weighted_point_2 &p, + const typename K::Weighted_point_2 &q, + const typename K::Weighted_point_2 &r, const K &k) +{ + return k.power_side_of_oriented_power_circle_2_object()(p, q, r); +} + +template +inline +typename K::Oriented_side +power_side_of_oriented_power_circle(const typename K::Weighted_point_2 &p, + const typename K::Weighted_point_2 &q, + const typename K::Weighted_point_2 &r, + const typename K::Weighted_point_2 &t, const K &k) +{ + return k.power_side_of_oriented_power_circle_2_object()(p, q, r, t); +} + +template +inline +typename K::Line_2 +radical_axis(const typename K::Weighted_point_2 &p, + const typename K::Weighted_point_2 &q, const K &k) +{ + return k.construct_radical_axis_2_object()(p, q); +} + template inline typename K::Boolean @@ -921,6 +970,16 @@ squared_radius(const typename K::Point_2 &p, return k.compute_squared_radius_2_object()(p, q, r); } +template < class K > +inline +typename K::Point_2 +weighted_circumcenter(const typename K::Weighted_point_2 &p, + const typename K::Weighted_point_2 &q, + const typename K::Weighted_point_2 &r, const K &k) +{ + return k.construct_weighted_circumcenter_2_object()(p, q, r); +} + template < class K > inline typename K::Boolean diff --git a/Kernel_23/include/CGAL/Kernel/global_functions_internal_3.h b/Kernel_23/include/CGAL/Kernel/global_functions_internal_3.h index 9a12175786d..7c603de5ccd 100644 --- a/Kernel_23/include/CGAL/Kernel/global_functions_internal_3.h +++ b/Kernel_23/include/CGAL/Kernel/global_functions_internal_3.h @@ -402,6 +402,17 @@ compare_distance_to_point(const typename K::Point_3 &p, return k.compare_distance_3_object()(p, q, r); } +template < class K > +inline +typename K::Comparison_result +compare_power_distance(const typename K::Point_3 &r, + const typename K::Weighted_point_3 &p, + const typename K::Weighted_point_3 &q, + const K& k) +{ + return k.compare_power_distance_3_object()(r, p, q); +} + template < class K > inline typename K::Comparison_result @@ -499,6 +510,48 @@ compare_signed_distance_to_plane(const typename K::Point_3 &hp, return EQUAL; } +template < class K > +inline +typename K::Comparison_result +compare_weighted_squared_radius(const typename K::Weighted_point_3 &p, + const typename K::FT &w, const K &k) +{ + return k.compare_weighted_squared_radius_3_object()(p, w); +} + +template < class K > +inline +typename K::Comparison_result +compare_weighted_squared_radius(const typename K::Weighted_point_3 &p, + const typename K::Weighted_point_3 &q, + const typename K::FT &w, const K &k) +{ + return k.compare_weighted_squared_radius_3_object()(p, q, w); +} + +template < class K > +inline +typename K::Comparison_result +compare_weighted_squared_radius(const typename K::Weighted_point_3 &p, + const typename K::Weighted_point_3 &q, + const typename K::Weighted_point_3 &r, + const typename K::FT &w, const K &k) +{ + return k.compare_weighted_squared_radius_3_object()(p, q, r, w); +} + +template < class K > +inline +typename K::Comparison_result +compare_weighted_squared_radius(const typename K::Weighted_point_3 &p, + const typename K::Weighted_point_3 &q, + const typename K::Weighted_point_3 &r, + const typename K::Weighted_point_3 &s, + const typename K::FT &w, const K &k) +{ + return k.compare_weighted_squared_radius_3_object()(p, q, r, s, w); +} + template < class K > inline typename K::Comparison_result @@ -847,6 +900,111 @@ parallel(const typename K::Segment_3 &s1, return k.are_parallel_3_object()(s1, s2); } +template +inline +typename K::FT +power_distance_to_power_sphere(const typename K::Weighted_point_3 &p, + const typename K::Weighted_point_3 &q, + const typename K::Weighted_point_3 &r, + const typename K::Weighted_point_3 &s, + const typename K::Weighted_point_3 &t, const K &k) +{ + return k.compute_power_distance_to_power_sphere_3_object()(p, q, r, s, t); +} + +template +inline +typename K::FT +power_product(const typename K::Weighted_point_3 &p, + const typename K::Weighted_point_3 &q, const K &k) +{ + return k.compute_power_product_3_object()(p, q); +} + +template +inline +typename K::Bounded_side +power_side_of_bounded_power_sphere(const typename K::Weighted_point_3 &p, + const typename K::Weighted_point_3 &q, const K &k) +{ + return k.power_side_of_bounded_power_sphere_3_object()(p, q); +} + +template +inline +typename K::Bounded_side +power_side_of_bounded_power_sphere(const typename K::Weighted_point_3 &p, + const typename K::Weighted_point_3 &q, + const typename K::Weighted_point_3 &r, const K &k) +{ + return k.power_side_of_bounded_power_sphere_3_object()(p, q, r); +} + +template +inline +typename K::Bounded_side +power_side_of_bounded_power_sphere(const typename K::Weighted_point_3 &p, + const typename K::Weighted_point_3 &q, + const typename K::Weighted_point_3 &r, + const typename K::Weighted_point_3 &s, const K &k) +{ + return k.power_side_of_bounded_power_sphere_3_object()(p, q, r, s); +} + +template +inline +typename K::Bounded_side +power_side_of_bounded_power_sphere(const typename K::Weighted_point_3 &p, + const typename K::Weighted_point_3 &q, + const typename K::Weighted_point_3 &r, + const typename K::Weighted_point_3 &s, + const typename K::Weighted_point_3 &t, const K &k) +{ + return k.power_side_of_bounded_power_sphere_3_object()(p, q, r, s, t); +} + +template +inline +typename K::Oriented_side +power_side_of_oriented_power_sphere(const typename K::Weighted_point_3 &p, + const typename K::Weighted_point_3 &q, const K &k) +{ + return k.power_side_of_oriented_power_sphere_3_object()(p, q); +} + +template +inline +typename K::Oriented_side +power_side_of_oriented_power_sphere(const typename K::Weighted_point_3 &p, + const typename K::Weighted_point_3 &q, + const typename K::Weighted_point_3 &r, const K &k) +{ + return k.power_side_of_oriented_power_sphere_3_object()(p, q, r); +} + +template +inline +typename K::Oriented_side +power_side_of_oriented_power_sphere(const typename K::Weighted_point_3 &p, + const typename K::Weighted_point_3 &q, + const typename K::Weighted_point_3 &r, + const typename K::Weighted_point_3 &s, const K &k) +{ + return k.power_side_of_oriented_power_sphere_3_object()(p, q, r, s); +} + +template +inline +typename K::Oriented_side +power_side_of_oriented_power_sphere(const typename K::Weighted_point_3 &p, + const typename K::Weighted_point_3 &q, + const typename K::Weighted_point_3 &r, + const typename K::Weighted_point_3 &s, + const typename K::Weighted_point_3 &t, const K &k) +{ + return k.power_side_of_oriented_power_sphere_3_object()(p, q, r, s, t); +} + template inline typename K::Bounded_side @@ -940,6 +1098,48 @@ squared_radius(const typename K::Point_3 &p, const K &k) return k.compute_squared_radius_3_object()(p); } +template < class K > +inline +typename K::FT +squared_radius_smallest_orthogonal_sphere(const typename K::Weighted_point_3 &p, + const K &k) +{ + return k.compute_squared_radius_smallest_orthogonal_sphere_3_object()(p); +} + +template < class K > +inline +typename K::FT +squared_radius_smallest_orthogonal_sphere(const typename K::Weighted_point_3 &p, + const typename K::Weighted_point_3 &q, + const K &k) +{ + return k.compute_squared_radius_smallest_orthogonal_sphere_3_object()(p, q); +} + +template < class K > +inline +typename K::FT +squared_radius_smallest_orthogonal_sphere(const typename K::Weighted_point_3 &p, + const typename K::Weighted_point_3 &q, + const typename K::Weighted_point_3 &r, + const K &k) +{ + return k.compute_squared_radius_smallest_orthogonal_sphere_3_object()(p, q, r); +} + +template < class K > +inline +typename K::FT +squared_radius_smallest_orthogonal_sphere(const typename K::Weighted_point_3 &p, + const typename K::Weighted_point_3 &q, + const typename K::Weighted_point_3 &r, + const typename K::Weighted_point_3 &s, + const K &k) +{ + return k.compute_squared_radius_smallest_orthogonal_sphere_3_object()(p, q, r, s); +} + template < class K > inline typename K::FT @@ -951,6 +1151,36 @@ volume(const typename K::Point_3 &p, return k.compute_volume_3_object()(p, q, r, s); } +template < class K > +inline +typename K::Point_3 +weighted_circumcenter(const typename K::Weighted_point_3 &p, + const typename K::Weighted_point_3 &q, const K &k) +{ + return k.construct_weighted_circumcenter_3_object()(p, q); +} + +template < class K > +inline +typename K::Point_3 +weighted_circumcenter(const typename K::Weighted_point_3 &p, + const typename K::Weighted_point_3 &q, + const typename K::Weighted_point_3 &r, const K &k) +{ + return k.construct_weighted_circumcenter_3_object()(p, q, r); +} + +template < class K > +inline +typename K::Point_3 +weighted_circumcenter(const typename K::Weighted_point_3 &p, + const typename K::Weighted_point_3 &q, + const typename K::Weighted_point_3 &r, + const typename K::Weighted_point_3 &s, const K &k) +{ + return k.construct_weighted_circumcenter_3_object()(p, q, r, s); +} + template < class K > inline typename K::Boolean