From 1f34ef2b2d596b7f45bfb6308fca44cffa69dba5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Tue, 2 May 2017 17:26:31 +0200 Subject: [PATCH] Add Construct_point_2/3 to the concepts of triangulation traits -- TriangulationTraits_2 requires Point_2 construct_point_2(Point_2) -- RegularTriangulationTraits_2 requires Point_2 construct_point_2(Weighted_point_2) -- TriangulationTraits_3 requires Point_3 construct_point_3(Point_3) -- RegularTriangulationTraits_3 requires Point_3 construct_point_3(Weighted_point_3) --- .../Concepts/RegularTriangulationTraits_2.h | 14 +++++++ .../Concepts/TriangulationTraits_2.h | 20 ++++++++++ .../Concepts/RegularTriangulationTraits_3.h | 15 +++++++- .../Concepts/TriangulationTraits_3.h | 38 ++++++++++++++----- 4 files changed, 76 insertions(+), 11 deletions(-) diff --git a/Triangulation_2/doc/Triangulation_2/Concepts/RegularTriangulationTraits_2.h b/Triangulation_2/doc/Triangulation_2/Concepts/RegularTriangulationTraits_2.h index c568dee5d2f..ca7d38a680c 100644 --- a/Triangulation_2/doc/Triangulation_2/Concepts/RegularTriangulationTraits_2.h +++ b/Triangulation_2/doc/Triangulation_2/Concepts/RegularTriangulationTraits_2.h @@ -66,6 +66,15 @@ which is the degenerate power test for weighted points */ typedef unspecified_type Power_side_of_oriented_power_circle_2; +/*! +A constructor type, +model of `Kernel::ConstructPoint_2`. +The `operator()` extracts the bare point from a weighted point. + +`Point_2 operator() ( Weighted_point_2 p);` +*/ +typedef unspecified_type Construct_point_2; + /// @} /// \name Optional Types @@ -147,6 +156,11 @@ Compare_power_distance_2 compare_power_distance_2_object(); /*! +*/ +Construct_point_2 construct_point_2_object(); + +/*! + */ Construct_weighted_circumcenter_2 construct_weighted_circumcenter_2_object(); diff --git a/Triangulation_2/doc/Triangulation_2/Concepts/TriangulationTraits_2.h b/Triangulation_2/doc/Triangulation_2/Concepts/TriangulationTraits_2.h index 2ce2a4cfa24..c4d1957affa 100644 --- a/Triangulation_2/doc/Triangulation_2/Concepts/TriangulationTraits_2.h +++ b/Triangulation_2/doc/Triangulation_2/Concepts/TriangulationTraits_2.h @@ -40,6 +40,21 @@ The triangle type. */ typedef unspecified_type Triangle_2; +/*! +A function object to construct a `Point_2`. + +Provides: + +`Point_2 operator()(Point_2 p)`, + +which simply returns p. + +\note This constructor is necessary because `Regular_triangulation_2` +inherits `Triangulation_2` and will provide an overload of `Construct_point_2` +that strips the weight from a weighted point. +*/ +typedef unspecified_type Construct_point_2; + /*! A function object to construct a `Segment_2`. @@ -189,6 +204,11 @@ TriangulationTraits_2 operator=(TriangulationTraits_2 gtr); /*! +*/ +Construct_point_2 construct_point_2_object(); + +/*! + */ Construct_segment_2 construct_segment_2_object(); diff --git a/Triangulation_3/doc/Triangulation_3/Concepts/RegularTriangulationTraits_3.h b/Triangulation_3/doc/Triangulation_3/Concepts/RegularTriangulationTraits_3.h index 29ba41e55b1..e61b62c8375 100644 --- a/Triangulation_3/doc/Triangulation_3/Concepts/RegularTriangulationTraits_3.h +++ b/Triangulation_3/doc/Triangulation_3/Concepts/RegularTriangulationTraits_3.h @@ -141,7 +141,16 @@ typedef unspecified_type Compare_power_distance_3; /*! A constructor type, -model of `ConstructWeightedCircumcenter_3`. +model of `Kernel::ConstructPoint_3`. +The `operator()` extracts the bare point from a weighted point. + +`Point_3 operator() ( Weighted_point_3 p);` +*/ +typedef unspecified_type Construct_point_3; + +/*! +A constructor type, +model of `Kernel::ConstructWeightedCircumcenter_3`. The `operator()` constructs the bare point which is the center of the smallest orthogonal sphere to the input weighted points. @@ -217,6 +226,10 @@ Power_side_of_oriented_power_sphere_3 power_side_of_oriented_power_sphere_3_obje */ Compare_power_distance_3 compare_power_distance_3_object(); +/*! + +*/ +Construct_point_3 construct_point_3_object(); /// @} diff --git a/Triangulation_3/doc/Triangulation_3/Concepts/TriangulationTraits_3.h b/Triangulation_3/doc/Triangulation_3/Concepts/TriangulationTraits_3.h index 9a1d00ecf4f..7765534c4fb 100644 --- a/Triangulation_3/doc/Triangulation_3/Concepts/TriangulationTraits_3.h +++ b/Triangulation_3/doc/Triangulation_3/Concepts/TriangulationTraits_3.h @@ -46,6 +46,19 @@ The triangle type. */ typedef unspecified_type Triangle_3; +/*! +A constructor object that must provide the function operator + +`Point_3 operator()(Point_3 p)`, + +which simply returns p. + +\note This constructor is necessary because `Regular_triangulation_3` +inherits `Triangulation_3` and will provide an overload of `Construct_point_3` +that strips the weight from a weighted point. +*/ +typedef unspecified_type Construct_point_3; + /*! A constructor object that must provide the function operator @@ -129,21 +142,26 @@ Triangulation_traits_3(const Triangulation_traits_3 & tr); /*! +*/ +Construct_point_3 construct_point_3_object(); + +/*! + +*/ +Construct_segment_3 construct_segment_3_object(); + +/*! + +*/ +Construct_triangle_3 construct_triangle_3_object(); + +/*! + */ Construct_tetrahedron_3 construct_tetrahedron_3_object(); /*! -*/ -Construct_triangle_3 construct_triangle_3_object(); - -/*! - -*/ -Construct_segment_3 construct_segment_3_object(); - -/*! - */ Compare_xyz_3 compare_xyz_3_object();