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)
This commit is contained in:
Mael Rouxel-Labbé 2017-05-02 17:26:31 +02:00
parent 04eb6ce2b6
commit 1f34ef2b2d
4 changed files with 76 additions and 11 deletions

View File

@ -66,6 +66,15 @@ which is the degenerate power test for weighted points
*/ */
typedef unspecified_type Power_side_of_oriented_power_circle_2; 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 /// \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
construct_weighted_circumcenter_2_object(); construct_weighted_circumcenter_2_object();

View File

@ -40,6 +40,21 @@ The triangle type.
*/ */
typedef unspecified_type Triangle_2; 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`. 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(); Construct_segment_2 construct_segment_2_object();

View File

@ -141,7 +141,16 @@ typedef unspecified_type Compare_power_distance_3;
/*! /*!
A constructor type, 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 The `operator()` constructs the bare point
which is the center of the smallest orthogonal sphere to the input which is the center of the smallest orthogonal sphere to the input
weighted points. 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(); Compare_power_distance_3 compare_power_distance_3_object();
/*!
*/
Construct_point_3 construct_point_3_object();
/// @} /// @}

View File

@ -49,6 +49,19 @@ typedef unspecified_type Triangle_3;
/*! /*!
A constructor object that must provide the function operator 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
`Segment_3 operator()(Point_3 p, Point_3 q)`, `Segment_3 operator()(Point_3 p, Point_3 q)`,
which constructs a segment from two points. which constructs a segment from two points.
@ -130,7 +143,12 @@ Triangulation_traits_3(const Triangulation_traits_3 & tr);
/*! /*!
*/ */
Construct_tetrahedron_3 construct_tetrahedron_3_object(); Construct_point_3 construct_point_3_object();
/*!
*/
Construct_segment_3 construct_segment_3_object();
/*! /*!
@ -140,7 +158,7 @@ Construct_triangle_3 construct_triangle_3_object();
/*! /*!
*/ */
Construct_segment_3 construct_segment_3_object(); Construct_tetrahedron_3 construct_tetrahedron_3_object();
/*! /*!