Added weighted point-related functions to global functions

This commit is contained in:
Mael Rouxel-Labbé 2017-04-07 03:41:41 +02:00
parent bad97436fe
commit 2ae17980fe
4 changed files with 574 additions and 1 deletions

View File

@ -287,6 +287,16 @@ compare_distance_to_point(const Point_2<K>& p,
return internal::compare_distance_to_point(p, q, r, K());
}
template <class K >
inline
typename K::Comparison_result
compare_power_distance(const Point_2<K> &r,
const Weighted_point_2<K> &p,
const Weighted_point_2<K> &q)
{
return internal::compare_power_distance(r, p, q, K());
}
template <class K >
inline
typename K::Comparison_result
@ -939,11 +949,50 @@ orientation(const Vector_2<K> &u, const Vector_2<K> &v)
// parallel() functions are in global_functions.h
template <typename K>
inline
typename K::Orientation
power_side_of_oriented_power_circle(const Weighted_point_2<K> &p,
const Weighted_point_2<K> &q)
{
return internal::power_side_of_oriented_power_circle(p, q, K());
}
template <typename K>
inline
typename K::Orientation
power_side_of_oriented_power_circle(const Weighted_point_2<K> &p,
const Weighted_point_2<K> &q,
const Weighted_point_2<K> &r)
{
return internal::power_side_of_oriented_power_circle(p, q, r, K());
}
template <typename K>
inline
typename K::Orientation
power_side_of_oriented_power_circle(const Weighted_point_2<K> &p,
const Weighted_point_2<K> &q,
const Weighted_point_2<K> &r,
const Weighted_point_2<K> &s)
{
return internal::power_side_of_oriented_power_circle(p, q, r, s, K());
}
template <class K>
inline
typename K::Line_2
radical_axis(const Weighted_point_2<K> &p,
const Weighted_point_2<K> &q)
{
return internal::radical_axis(p, q, K());
}
template <class K>
inline
typename K::Line_2
radical_line(const Circle_2<K> &s1,
const Circle_2<K> &s2)
const Circle_2<K> &s2)
{
return K().construct_radical_line_2_object()(s1,s2);
}
@ -1020,6 +1069,16 @@ squared_radius(const Point_2<K>& p, const Point_2<K>& q, const Point_2<K>& r)
return internal::squared_radius(p, q, r, K());
}
template < class K >
inline
typename K::Point_2
weighted_circumcenter(const Weighted_point_2<K> &p,
const Weighted_point_2<K> &q,
const Weighted_point_2<K> &r)
{
return internal::weighted_circumcenter(p, q, r, K());
}
template < class K >
inline
typename K::Boolean

View File

@ -344,6 +344,16 @@ compare_distance_to_point(const Point_3<K> &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<K> &r,
const Weighted_point_3<K> &p,
const Weighted_point_3<K> &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<K> &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<K> &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<K> &p,
const Weighted_point_3<K> &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<K> &p,
const Weighted_point_3<K> &q,
const Weighted_point_3<K> &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<K> &p,
const Weighted_point_3<K> &q,
const Weighted_point_3<K> &r,
const Weighted_point_3<K> &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<K>& p)
// parallel() functions are in Kernel/global_functions.h
template <class K >
inline
typename K::FT
power_distance_to_power_sphere(const Weighted_point_3<K> &p,
const Weighted_point_3<K> &q,
const Weighted_point_3<K> &r,
const Weighted_point_3<K> &s,
const Weighted_point_3<K> &t)
{
return internal::power_distance_to_power_sphere(p, q, r, s, t, K());
}
template <class K >
inline
typename K::FT
power_product(const Weighted_point_3<K> &p,
const Weighted_point_3<K> &q)
{
return internal::power_product(p, q, K());
}
template <class K >
inline
typename K::Bounded_side
power_side_of_bounded_power_sphere(const Weighted_point_3<K> &p,
const Weighted_point_3<K> &q)
{
return internal::power_side_of_bounded_power_sphere(p, q, K());
}
template <class K >
inline
typename K::Bounded_side
power_side_of_bounded_power_sphere(const Weighted_point_3<K> &p,
const Weighted_point_3<K> &q,
const Weighted_point_3<K> &r)
{
return internal::power_side_of_bounded_power_sphere(p, q, r, K());
}
template <class K >
inline
typename K::Bounded_side
power_side_of_bounded_power_sphere(const Weighted_point_3<K> &p,
const Weighted_point_3<K> &q,
const Weighted_point_3<K> &r,
const Weighted_point_3<K> &s)
{
return internal::power_side_of_bounded_power_sphere(p, q, r, s, K());
}
template <class K >
inline
typename K::Bounded_side
power_side_of_bounded_power_sphere(const Weighted_point_3<K> &p,
const Weighted_point_3<K> &q,
const Weighted_point_3<K> &r,
const Weighted_point_3<K> &s,
const Weighted_point_3<K> &t)
{
return internal::power_side_of_bounded_power_sphere(p, q, r, s, t, K());
}
template <class K >
inline
typename K::Oriented_side
power_side_of_oriented_power_sphere(const Weighted_point_3<K> &p,
const Weighted_point_3<K> &q)
{
return internal::power_side_of_oriented_power_sphere(p, q, K());
}
template <class K >
inline
typename K::Oriented_side
power_side_of_oriented_power_sphere(const Weighted_point_3<K> &p,
const Weighted_point_3<K> &q,
const Weighted_point_3<K> &r)
{
return internal::power_side_of_oriented_power_sphere(p, q, r, K());
}
template <class K >
inline
typename K::Oriented_side
power_side_of_oriented_power_sphere(const Weighted_point_3<K> &p,
const Weighted_point_3<K> &q,
const Weighted_point_3<K> &r,
const Weighted_point_3<K> &s)
{
return internal::power_side_of_oriented_power_sphere(p, q, r, s, K());
}
template <class K >
inline
typename K::Oriented_side
power_side_of_oriented_power_sphere(const Weighted_point_3<K> &p,
const Weighted_point_3<K> &q,
const Weighted_point_3<K> &r,
const Weighted_point_3<K> &s,
const Weighted_point_3<K> &t)
{
return internal::power_side_of_oriented_power_sphere(p, q, r, s, t, K());
}
template <class K>
inline
typename K::Plane_3
@ -1106,6 +1263,44 @@ squared_radius(const Point_3<K> &p)
return internal::squared_radius(p, K());
}
template < class K >
inline
typename K::FT
squared_radius_smallest_orthogonal_sphere(const Weighted_point_3<K> &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<K> &p,
const Weighted_point_3<K> &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<K> &p,
const Weighted_point_3<K> &q,
const Weighted_point_3<K> &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<K> &p,
const Weighted_point_3<K> &q,
const Weighted_point_3<K> &r,
const Weighted_point_3<K> &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<K> &p, const Point_3<K> &q,
return internal::volume(p, q, r, s, K());
}
template < class K >
inline
typename K::Point_3
weighted_circumcenter(const Weighted_point_3<K> &p,
const Weighted_point_3<K> &q)
{
return internal::weighted_circumcenter(p, q, K());
}
template < class K >
inline
typename K::Point_3
weighted_circumcenter(const Weighted_point_3<K> &p,
const Weighted_point_3<K> &q,
const Weighted_point_3<K> &r)
{
return internal::weighted_circumcenter(p, q, r, K());
}
template < class K >
inline
typename K::Point_3
weighted_circumcenter(const Weighted_point_3<K> &p,
const Weighted_point_3<K> &q,
const Weighted_point_3<K> &r,
const Weighted_point_3<K> &s)
{
return internal::weighted_circumcenter(p, q, r, s, K());
}
template < class K >
inline
typename K::Boolean

View File

@ -320,6 +320,16 @@ compare_distance_to_point(const typename K::Point_2 &p,
return k.compare_distance_2_object()(p, q, r);
}
template <class K >
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 <class K >
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 <class K>
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 <class K>
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 <class K>
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 <typename K>
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 <typename K>
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

View File

@ -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 <typename K>
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 <class K >
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 <class K >
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 <class K >
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 <class K >
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 <class K >
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 <class K >
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 <class K >
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 <class K >
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 <class K >
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 <class K >
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