Commit Graph

1578 Commits

Author SHA1 Message Date
Mael Rouxel-Labbé 0d352759e6 Use boost::function_property_map to apply spatial_sort to weighted points 2017-06-15 10:34:15 +02:00
Mael Rouxel-Labbé a4503e7edc Moved facet dual computation functions from Mesh_3 to Regular_triangulation_3
... and improved them and gave them more overloads
2017-06-15 10:34:15 +02:00
Mael Rouxel-Labbé 02732237aa Avoid copies by using result_of in boost::bind() return type
Copies were previously done on purpose to go around the Lazy kernel, but this
can be done without copies (for all kernels) by using result_of.
2017-06-15 10:34:15 +02:00
Mael Rouxel-Labbé a4c1c2371f Removed obsolete file: Regular_traits_adaptor.h 2017-06-15 10:34:15 +02:00
Mael Rouxel-Labbé 411fbe4ea0 Removed useless include 2017-06-15 10:34:15 +02:00
Mael Rouxel-Labbé c0e71d3fae Reorganized Regular_triangulation_3 dual functions 2017-06-15 10:34:15 +02:00
Mael Rouxel-Labbé 1ef25bdfcf Copy boost::bind return object
The lazy kernel returns temporaries and gives garbage to compare_xyz_3...
2017-06-15 10:34:15 +02:00
Mael Rouxel-Labbé 2644989471 Renamed Regular_triangulation base typedef (Base > Tr_Base) 2017-06-15 10:34:15 +02:00
Mael Rouxel-Labbé d5c54f68b7 Removed useless construct_point_3
Construct_weighted_circumcenter_3 already returns a Bare_point
2017-06-15 10:34:15 +02:00
Mael Rouxel-Labbé 803f187370 Comparison result should be of type Comparison_result
(it worked anyway since Comparison_result is a Sign internally)
2017-06-15 10:34:15 +02:00
Mael Rouxel-Labbé 49625a6093 Fixed compilation of add_temporary_points_on_far_sphere() 2017-06-15 10:34:15 +02:00
Mael Rouxel-Labbé 15f2e6d7a7 Adapted the call to spatial_sort() to handle weighted points
Downside: we copy points at each comparison, which is terrible! No noticeable
changes when profiling the construction of a triangulation.

We need this copy because of Lazy kernel: despite construct_point_3 having
const Point_3& construct_point_3_object()(const Point_3&)
the Lazy kernel can return some copies.

Other solutions that were not used:
-- Distinguish the Ouput type of Unary_function_to_property map depending on
   the type of Kernel (ugly and not safe)
-- Use Weighted_point_mappers traits (but that blood will not be on my hands)
2017-06-15 10:34:15 +02:00
Mael Rouxel-Labbé 196afa074b Adapted sorting algorithms based on compare_xyz to handle weighted point vectors 2017-06-15 10:34:15 +02:00
Mael Rouxel-Labbé 713eccb729 Construct_plane() must use bare points arguments 2017-06-15 10:34:15 +02:00
Mael Rouxel-Labbé 66aa61c52b Fixed point typedef in Tr_3/benchmarks 2017-06-15 10:34:15 +02:00
Mael Rouxel-Labbé d148f8c940 Fixed Triangulation_benchmark_3.cpp
-- Fix Weighted_point_3 / Point_3 incompatibilities
-- Generator of weighted points also generates random weights
-- Do not use Regular_euclidean_triangulation_traits since they are deprecated
-- Do not use 'using namespace'
-- Use the new policy tag to disable hidden point caching (see b925281)
-- Remove unused objects (such as pts2_bbox)
2017-06-15 10:34:15 +02:00
Mael Rouxel-Labbé 90209853f6 Fixed test_RT_cell_base_with_weigh... and added it to the CMakeLists
-Some wrong Bare_point/Weighted_point usage
-Fully instantiate the Regular_triangulation_cell_base_with_weighted_circum...
 with all the template parameters of the regular cell base
2017-06-15 10:34:15 +02:00
Mael Rouxel-Labbé 6b8f05e08c Removed hiding-related functions from Triangulation_cell_base_3
Triangulation_cell_base_3 cannot be used anymore as a cell base of a regular
triangulation and thus there is no point keeping these functions.

People wishing to disable caching of hidden points in regular triangulations
should use the new policy, see commit b92528171c)
2017-06-15 10:34:15 +02:00
Mael Rouxel-Labbé eb18d7c007 Added a template parameter to Regular_tr_cell_base on hidden points handling
Before WP<->P implicit conversion changes, one could choose to not keep hidden
points by using `Triangulation_cell_base_3` as cell base instead of
`Regular_triangulation_cell_base_3`. This is not possible anymore as point types
will conflict.

This changes introduces a new template parameter to pass a policy on whether
to keep or discard hidden points.

It is a breaking change since it is placed before the container template
parameter, but it makes more sense that way and the container type template
was not documented.
2017-06-15 10:34:15 +02:00
Mael Rouxel-Labbé 70d7823c6b Removed Weighted_point_mapper_3 and RegTraits_3 shenanigans
There is no need anymore for sneaky traits adaptors to make Triangulation_3
a compatible base of Regular_triangulation_3:
- The Point type in Triangulation_3 is obtained through TDS::Vertex::Point (see
  commit 13d5e89)
- Triangulation_3 always ensures that we are passing bare points to the kernel
  functors that require bare point arguments (see commit db5da73)

This greatly clarifies the code of Regular_triangulation_3: there is only a
single traits type, a single base type, etc.
2017-06-15 10:34:15 +02:00
Mael Rouxel-Labbé 65b8b430ae Ensured that we call kernel functions with the correct (bare) point type
Note that if the type `Point` is already `Point_3`, Construct_point_3 does not
do anything (except in the lazy kernel, but in that case, the running time is
horrible anyway).
2017-06-15 10:34:15 +02:00
Mael Rouxel-Labbé 2f93c7c127 Deduce Triangulation_3's point type from the TDS
Since we have a distinc vertex_base for regular triangulations and that this
regular vertex base defines a type Point, it is redundant to get the Point
type from the Geom_traits.

This also allows to remove the Weighted_point_mapper trick, and pass more easily
custom point types.
2017-06-15 10:34:15 +02:00
Mael Rouxel-Labbé 1e5ad8c41e Fixed Regular_traits_adaptor
The functor members cannot be references because the Regular_triangulation
might be templated by a traits class that is not simply a Kernel (that is
the case in the package Interpolation).

When that is the case, calling this->K::function_object() might be a call
to a constructor in the base traits class. Thus, the functor members
of Reg_traits_adaptors get initialized to temporaries, which is problematic
because these temporaries are at a much lower scope and thus are quickly
cleaned, leaving us with references to nothing in Reg_traits_adaptor.
2017-06-15 10:34:15 +02:00
Mael Rouxel-Labbé fb8c22c3a1 Do not provide Bare_point overloads in Regular_triangulation 2017-06-15 10:32:03 +02:00
Mael Rouxel-Labbé 73b572a7f0 Fixed usage of Bare point and Weighted point across Triangulation_3 2017-06-15 10:32:03 +02:00
Mael Rouxel-Labbé d6efc61ddd Trimmed Regular triangulation euclidean traits (doc version)
Now that the traits is exactly the kernel, there isn't a big need for a lot of
documentation.
2017-06-15 10:32:03 +02:00
Mael Rouxel-Labbé 12a39cb727 Trimmed Regular triangulation euclidean traits
-- Code added as consequence of disabling implicit conversion between points and
   weighted points implies that defining
     typedef weighted_point point;
   creates ambiguous functors.

   This typedef is nevertheless still used, in Weighted_point_mappers.

-- The traits are not supposed to define Bare_point
2017-06-15 10:32:03 +02:00
Mael Rouxel-Labbé a6ad9df662 Fixed Triangulation_3's regular test
Constructing weighted points with (x,y,z,w) is ambiguous and that is why it was
disabled.
2017-06-15 10:32:03 +02:00
Mael Rouxel-Labbé 10fe0f4643 Removed unused typedef 2017-06-15 10:32:03 +02:00
Mael Rouxel-Labbé 04c8e53c5e Fixed missing typename 2017-06-15 10:32:03 +02:00
Mael Rouxel-Labbé 1d6522a982 Fixed Triangulation_3's test using Traits::Bare_point/Weighted_point 2017-06-15 10:32:03 +02:00
Mael Rouxel-Labbé a0153d77ce Added CGAL_NO_DEPRECATED_CODE macros to Regular_triangulation_euclidean_traits 2017-06-15 10:32:03 +02:00
Mael Rouxel-Labbé 2e379fb032 Cleaned #if 0 code 2017-06-15 10:32:03 +02:00
Mael Rouxel-Labbé c2ad237670 Fixed hide_point()
Hide weighted points since they can be re-inserted afterwards
2017-06-15 10:32:03 +02:00
Mael Rouxel-Labbé 65a2c08d2d Fixed initialization order warning 2017-06-15 10:32:03 +02:00
Jane Tournois 9d4b697503 make constructors of Weighted_point explicit
and fix compilation errors
2017-06-15 10:32:03 +02:00
Sébastien Loriot 8b49402d80 version without partial specialization
the norms says that partial specialization should be
done in a namespace (not inside a class)
2017-06-15 10:32:03 +02:00
Jane Tournois 9a087ffe6f fix compilation of tests wrt Point vs Weighted point 2017-06-15 10:29:26 +02:00
Jane Tournois 5180389e3a remove hybrid operators, that use Bare points and Weighted points in an ambiguous manner
this commit only fixes the testsuite of Mesh_3
2017-06-15 10:29:26 +02:00
Andreas Fabri 58c8d7cb1a WIP: test_meshing_polyhedron_with_features compiles and crashes in odt 2017-06-15 10:29:26 +02:00
Andreas Fabri 6a1b4c154b Changes after making Weighted_point_3(const Point_3) explicit 2017-06-15 10:29:26 +02:00
Andreas Fabri 80224bf2c8 Disable Point_3(const Weighted_point_3&) 2017-06-15 10:29:26 +02:00
Andreas Fabri 64e5c887ec The Weighted_point_mapper becomes a traits class; test_regular_3.cpp passes 2017-06-15 10:29:26 +02:00
Mael Rouxel-Labbé 5955f9c7c0 Merge branch 'Periodic_3_Regular_triangulation_3-APelle-old' into Periodic_3_Regular_triangulation_3-APelle
Based on Kernel_Weighted_point_without...
  @ 67c531af53
2017-06-08 14:37:26 +02:00
Mael Rouxel-Labbé d5175e0e2e Minor doc changes 2017-06-08 13:23:10 +02:00
Mael Rouxel-Labbé 7fd475eb88 Renamed uses of invalidate_circumcenter() in accordance with the modified concept 2017-06-08 13:23:10 +02:00
Mael Rouxel-Labbé c1693b9a75 Adapted the documentation to the new concept RegTrCellBaseWithWeightedCircumcenter
- MeshCellBase_3 loses "invalidate_circumcenter" and refines the new concept
- Reg_tr_cell_base_with_weighted_circumcenter_3 is a model of the new concept
2017-06-08 13:23:10 +02:00
Mael Rouxel-Labbé f7f7aad77d Added new concept RegularTriangulationCellBaseWithWeightedCircumcenter_3
Describes the requirements of a base cell that caches its weighted circumcenter
2017-06-08 13:23:10 +02:00
Mael Rouxel-Labbé 89a85923bd Fixed missing dependency in T3's documentation 2017-06-08 13:23:10 +02:00
Mael Rouxel-Labbé 9ac919dc9c Fixed Point / Point_3 issues in T3 and improved the documentation
-- Do not use concept names as template names in the doc
-- Fixed point / point_3 issues and other problems of coherence between concept
and model
-- Fixed some wrong refinement relationships
2017-06-08 13:23:10 +02:00
Mael Rouxel-Labbé 5199041815 Fixed Point typedef in Triangulation_3 doc 2017-06-08 13:23:10 +02:00
Mael Rouxel-Labbé 7b47b8f9e1 Fixed documentation of Regular cell bases
-- Regular_triangulation_cell_base_3 must document hidden_points handling
functions

-- Regular cell bases must document their Point type
2017-06-08 13:23:10 +02:00
Mael Rouxel-Labbé 50c5385015 Cleaned Weighted_point_mappers from the documentation 2017-06-08 13:23:10 +02:00
Mael Rouxel-Labbé 6ba16346c8 Fixed boost/core/is_same.hpp > boost/type_traits/is_same.hpp 2017-06-08 13:23:10 +02:00
Jane Tournois 9eb6fdb053 really use the GT given as a parameter
When the geom_traits given as parameter of `circumcenter` and/or
`weighted_circumcenter` was deriving from the cell base GT
(first template parameter), the gt was up-casted to the
cell base GT, and the function construct_circumcenter_3_object()
(or construct_weighted_circumcenter_3_object()) not
called on the right geom traits type --> possibly missing
the actual input of the function (the robust_circumcenter_traits in Mesh_3)

we add a static assert to check at compile time that point types are the same
2017-06-08 13:23:10 +02:00
Mael Rouxel-Labbé edab9775b9 Fixed using default templated class functions 2017-06-08 13:23:10 +02:00
Mael Rouxel-Labbé 42469ac33a Fixed wrong template type (which induced taking references of references) 2017-06-08 13:23:10 +02:00
Jane Tournois f2bd654c26 really use the GT given as a parameter
When the geom_traits given as parameter of `circumcenter` and/or
`weighted_circumcenter` was deriving from the cell base GT
(first template parameter), the gt was up-casted to the
cell base GT, and the function construct_circumcenter_3_object()
(or construct_weighted_circumcenter_3_object()) not
called on the right geom traits type --> possibly missing
the actual input of the function (the robust_circumcenter_traits in Mesh_3)

we add a static assert to check at compile time that both geom traits
are compatible
2017-06-08 13:23:10 +02:00
Mael Rouxel-Labbé a6857ae2e4 Changed boost/core/enable_if.hpp to boost/utility/enable_if.hpp 2017-06-08 13:23:10 +02:00
Mael Rouxel-Labbé 84c830d25f Trimmed Construct_point_23's note in TriangulationTraits_23 2017-06-08 13:23:10 +02:00
Mael Rouxel-Labbé c0e18352f0 Fixed regular cell bases so they actually model the concept
Also, they should not use Bare_point / Weighted_point types, which are defined
in the triangulation (much later during compilation).
2017-06-08 13:23:10 +02:00
Mael Rouxel-Labbé c088a7d9e5 Aligned the concept RegularTriangulationCellBase_3 with other similar concepts
That is, it should define the type `Point` (instead of `Weighted_point`), like
in TriangulationVertexBase_3 and RegularTriangulationVertexBase_3.
2017-06-08 13:23:10 +02:00
Mael Rouxel-Labbé f2ec162b4f Clarified some documentation about the usage of Construct_point_23 in TTraits_23 2017-06-08 13:23:10 +02:00
Mael Rouxel-Labbé e861cc0f61 Fixed Has_nested_type_Bare_point includes 2017-06-08 13:23:10 +02:00
Mael Rouxel-Labbé a2f5f64fc3 Annihilated Regular_triangulation_euclidean_traits_23 across all packages
Left a little bit alive in the tests and in the Triangulation_23/doc
2017-06-08 13:23:10 +02:00
Mael Rouxel-Labbé 245a9549cb TriangulationTraits_23 refine SpatialSortingTraits_23 for Hilbert sorting 2017-06-08 13:23:10 +02:00
Mael Rouxel-Labbé f14c0c7479 Small improvements to the (Regular)TriangulationTraits_2/3 concepts 2017-06-08 13:23:10 +02:00
Mael Rouxel-Labbé 2640fb4d06 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)
2017-06-08 13:23:10 +02:00
Mael Rouxel-Labbé a42cde8431 Removed an ugly static_cast 2017-06-08 13:23:10 +02:00
Mael Rouxel-Labbé 2130ba057e Misc minor changes 2017-06-08 13:23:10 +02:00
Mael Rouxel-Labbé da8f194b20 Use boost::function_property_map to apply spatial_sort to weighted points 2017-06-08 13:23:10 +02:00
Mael Rouxel-Labbé c3b8870b5b Moved facet dual computation functions from Mesh_3 to Regular_triangulation_3
... and improved them and gave them more overloads
2017-06-08 13:23:10 +02:00
Mael Rouxel-Labbé 6e8de5d6d3 Avoid copies by using result_of in boost::bind() return type
Copies were previously done on purpose to go around the Lazy kernel, but this
can be done without copies (for all kernels) by using result_of.
2017-06-08 13:23:10 +02:00
Mael Rouxel-Labbé 799db0cc7c Removed obsolete file: Regular_traits_adaptor.h 2017-06-08 13:23:10 +02:00
Mael Rouxel-Labbé 550793cca9 Removed useless include 2017-06-08 13:23:10 +02:00
Mael Rouxel-Labbé e4f17b2ff5 Reorganized Regular_triangulation_3 dual functions 2017-06-08 13:23:10 +02:00
Mael Rouxel-Labbé b669bb2d13 Copy boost::bind return object
The lazy kernel returns temporaries and gives garbage to compare_xyz_3...
2017-06-08 13:23:10 +02:00
Mael Rouxel-Labbé 5981a4535b Renamed Regular_triangulation base typedef (Base > Tr_Base) 2017-06-08 13:23:10 +02:00
Mael Rouxel-Labbé 7e1fb62f9e Removed useless construct_point_3
Construct_weighted_circumcenter_3 already returns a Bare_point
2017-06-08 13:23:10 +02:00
Mael Rouxel-Labbé 53015e11a0 Comparison result should be of type Comparison_result
(it worked anyway since Comparison_result is a Sign internally)
2017-06-08 13:23:10 +02:00
Mael Rouxel-Labbé 82e6397f73 Fixed compilation of add_temporary_points_on_far_sphere() 2017-06-08 13:23:10 +02:00
Mael Rouxel-Labbé 40a7af0f30 Adapted the call to spatial_sort() to handle weighted points
Downside: we copy points at each comparison, which is terrible! No noticeable
changes when profiling the construction of a triangulation.

We need this copy because of Lazy kernel: despite construct_point_3 having
const Point_3& construct_point_3_object()(const Point_3&)
the Lazy kernel can return some copies.

Other solutions that were not used:
-- Distinguish the Ouput type of Unary_function_to_property map depending on
   the type of Kernel (ugly and not safe)
-- Use Weighted_point_mappers traits (but that blood will not be on my hands)
2017-06-08 13:23:10 +02:00
Mael Rouxel-Labbé 93b6e2659d Adapted sorting algorithms based on compare_xyz to handle weighted point vectors 2017-06-08 13:23:10 +02:00
Mael Rouxel-Labbé 091ca81d28 Construct_plane() must use bare points arguments 2017-06-08 13:23:10 +02:00
Mael Rouxel-Labbé 672b7e13e7 Fixed point typedef in Tr_3/benchmarks 2017-06-08 13:23:10 +02:00
Mael Rouxel-Labbé ad3e388aa1 Fixed Triangulation_benchmark_3.cpp
-- Fix Weighted_point_3 / Point_3 incompatibilities
-- Generator of weighted points also generates random weights
-- Do not use Regular_euclidean_triangulation_traits since they are deprecated
-- Do not use 'using namespace'
-- Use the new policy tag to disable hidden point caching (see b925281)
-- Remove unused objects (such as pts2_bbox)
2017-06-08 13:23:10 +02:00
Mael Rouxel-Labbé e62fa89355 Fixed test_RT_cell_base_with_weigh... and added it to the CMakeLists
-Some wrong Bare_point/Weighted_point usage
-Fully instantiate the Regular_triangulation_cell_base_with_weighted_circum...
 with all the template parameters of the regular cell base
2017-06-08 13:23:10 +02:00
Mael Rouxel-Labbé 8f2a8b4422 Removed hiding-related functions from Triangulation_cell_base_3
Triangulation_cell_base_3 cannot be used anymore as a cell base of a regular
triangulation and thus there is no point keeping these functions.

People wishing to disable caching of hidden points in regular triangulations
should use the new policy, see commit b92528171c)
2017-06-08 13:23:10 +02:00
Mael Rouxel-Labbé 5c81697ff9 Added a template parameter to Regular_tr_cell_base on hidden points handling
Before WP<->P implicit conversion changes, one could choose to not keep hidden
points by using `Triangulation_cell_base_3` as cell base instead of
`Regular_triangulation_cell_base_3`. This is not possible anymore as point types
will conflict.

This changes introduces a new template parameter to pass a policy on whether
to keep or discard hidden points.

It is a breaking change since it is placed before the container template
parameter, but it makes more sense that way and the container type template
was not documented.
2017-06-08 13:23:10 +02:00
Mael Rouxel-Labbé 12fb4e1be4 Removed Weighted_point_mapper_3 and RegTraits_3 shenanigans
There is no need anymore for sneaky traits adaptors to make Triangulation_3
a compatible base of Regular_triangulation_3:
- The Point type in Triangulation_3 is obtained through TDS::Vertex::Point (see
  commit 13d5e89)
- Triangulation_3 always ensures that we are passing bare points to the kernel
  functors that require bare point arguments (see commit db5da73)

This greatly clarifies the code of Regular_triangulation_3: there is only a
single traits type, a single base type, etc.
2017-06-08 13:23:10 +02:00
Mael Rouxel-Labbé d9bd1870b2 Ensured that we call kernel functions with the correct (bare) point type
Note that if the type `Point` is already `Point_3`, Construct_point_3 does not
do anything (except in the lazy kernel, but in that case, the running time is
horrible anyway).
2017-06-08 13:23:10 +02:00
Mael Rouxel-Labbé d7107dde7b Deduce Triangulation_3's point type from the TDS
Since we have a distinc vertex_base for regular triangulations and that this
regular vertex base defines a type Point, it is redundant to get the Point
type from the Geom_traits.

This also allows to remove the Weighted_point_mapper trick, and pass more easily
custom point types.
2017-06-08 13:23:10 +02:00
Mael Rouxel-Labbé 759d8b3a30 Fixed Regular_traits_adaptor
The functor members cannot be references because the Regular_triangulation
might be templated by a traits class that is not simply a Kernel (that is
the case in the package Interpolation).

When that is the case, calling this->K::function_object() might be a call
to a constructor in the base traits class. Thus, the functor members
of Reg_traits_adaptors get initialized to temporaries, which is problematic
because these temporaries are at a much lower scope and thus are quickly
cleaned, leaving us with references to nothing in Reg_traits_adaptor.
2017-06-08 13:23:10 +02:00
Mael Rouxel-Labbé 4f6dfdb9ca Do not provide Bare_point overloads in Regular_triangulation 2017-06-08 13:23:10 +02:00
Mael Rouxel-Labbé e8aaf7cfd4 Fixed usage of Bare point and Weighted point across Triangulation_3 2017-06-08 13:23:10 +02:00
Mael Rouxel-Labbé ed4ca2ee69 Trimmed Regular triangulation euclidean traits (doc version)
Now that the traits is exactly the kernel, there isn't a big need for a lot of
documentation.
2017-06-08 13:23:10 +02:00
Mael Rouxel-Labbé ee5b2d2876 Trimmed Regular triangulation euclidean traits
-- Code added as consequence of disabling implicit conversion between points and
   weighted points implies that defining
     typedef weighted_point point;
   creates ambiguous functors.

   This typedef is nevertheless still used, in Weighted_point_mappers.

-- The traits are not supposed to define Bare_point
2017-06-08 13:23:10 +02:00
Mael Rouxel-Labbé bdcb9e912f Fixed Triangulation_3's regular test
Constructing weighted points with (x,y,z,w) is ambiguous and that is why it was
disabled.
2017-06-08 13:23:10 +02:00
Mael Rouxel-Labbé ca32b2363d Removed unused typedef 2017-06-08 13:23:10 +02:00
Mael Rouxel-Labbé f7d231a528 Fixed missing typename 2017-06-08 13:23:10 +02:00
Mael Rouxel-Labbé 442da6bce3 Fixed Triangulation_3's test using Traits::Bare_point/Weighted_point 2017-06-08 13:23:10 +02:00
Mael Rouxel-Labbé f5d617f50c Added CGAL_NO_DEPRECATED_CODE macros to Regular_triangulation_euclidean_traits 2017-06-08 13:23:10 +02:00
Mael Rouxel-Labbé 8bb5329482 Cleaned #if 0 code 2017-06-08 13:23:10 +02:00
Mael Rouxel-Labbé 5eb7e74dee Fixed hide_point()
Hide weighted points since they can be re-inserted afterwards
2017-06-08 13:23:10 +02:00
Mael Rouxel-Labbé b0ee8b4d89 Fixed initialization order warning 2017-06-08 13:23:10 +02:00
Jane Tournois 815e6d6353 make constructors of Weighted_point explicit
and fix compilation errors
2017-06-08 13:23:10 +02:00
Sébastien Loriot f783413de9 version without partial specialization
the norms says that partial specialization should be
done in a namespace (not inside a class)
2017-06-08 13:23:10 +02:00
Jane Tournois 632a87f6b9 fix compilation of tests wrt Point vs Weighted point 2017-06-08 13:23:10 +02:00
Jane Tournois 9db380570f remove hybrid operators, that use Bare points and Weighted points in an ambiguous manner
this commit only fixes the testsuite of Mesh_3
2017-06-08 13:23:10 +02:00
Andreas Fabri a307b3f60a WIP: test_meshing_polyhedron_with_features compiles and crashes in odt 2017-06-08 13:23:10 +02:00
Andreas Fabri afd01a9932 Changes after making Weighted_point_3(const Point_3) explicit 2017-06-08 13:23:10 +02:00
Andreas Fabri 0cacadc042 Disable Point_3(const Weighted_point_3&) 2017-06-08 13:23:10 +02:00
Andreas Fabri 50db4d8813 The Weighted_point_mapper becomes a traits class; test_regular_3.cpp passes 2017-06-08 13:23:10 +02:00
Maxime Gimeno 419e6b4a4a Remove deprecated call to CGAL_SVN_REVISION and fix about functions in the help menu. 2017-06-06 15:07:11 +02:00
Mael Rouxel-Labbé 5df733c3af Merge branch 'Periodic_3_Regular_triangulation_3-APelle-old' into Periodic_3_Regular_triangulation_3-APelle
Based on Kernel_Weighted_point_without...
  @ 3e43409d01
2017-06-02 16:28:17 +02:00
Mael Rouxel-Labbé 70eb63cc24 Minor doc changes 2017-06-01 11:27:34 +02:00
Mael Rouxel-Labbé a8379e65f9 Renamed uses of invalidate_circumcenter() in accordance with the modified concept 2017-06-01 11:26:05 +02:00
Mael Rouxel-Labbé d8dfeec94b Adapted the documentation to the new concept RegTrCellBaseWithWeightedCircumcenter
- MeshCellBase_3 loses "invalidate_circumcenter" and refines the new concept
- Reg_tr_cell_base_with_weighted_circumcenter_3 is a model of the new concept
2017-06-01 11:23:04 +02:00
Mael Rouxel-Labbé ed37cf84af Added new concept RegularTriangulationCellBaseWithWeightedCircumcenter_3
Describes the requirements of a base cell that caches its weighted circumcenter
2017-06-01 11:18:48 +02:00
Mael Rouxel-Labbé 9fd7d90ffd Merge branch 'Periodic_3_Regular_triangulation_3-APelle-old' into Periodic_3_Regular_triangulation_3-APelle
Based on Kernel_Weighted_point_without...
  @ 95c71de2e5
2017-05-30 16:13:34 +02:00
Laurent Rineau 7e651b6b78 Merge branch 'releases/CGAL-4.10-branch'
Merges two pull-requests:

- 9384ff4 Merge pull request #2133 from maxGimeno/Fix_cmake_warning_CMP0053-GF
- 0005d61 Merge pull request #2132 from sloriot/Kernel-use_CGAL_compare
2017-05-24 17:45:58 +02:00
Mael Rouxel-Labbé 5354134469 Merge branch 'Periodic_3_Regular_triangulation_3-APelle-old' into Periodic_3_Regular_triangulation_3-APelle 2017-05-24 12:18:49 +02:00
Maxime Gimeno 5ae96fc2aa Explicitely set the policy of CMP0053 to OLD to silent the warning when it is not found. 2017-05-23 16:12:56 +02:00
Mael Rouxel-Labbé f0fc367b45 Fixed missing dependency in T3's documentation 2017-05-22 11:53:47 +02:00
Mael Rouxel-Labbé b0162b7ac0 Fixed Point / Point_3 issues in T3 and improved the documentation
-- Do not use concept names as template names in the doc
-- Fixed point / point_3 issues and other problems of coherence between concept
and model
-- Fixed some wrong refinement relationships
2017-05-22 11:27:02 +02:00
Mael Rouxel-Labbé f53e376ec2 Fixed Point typedef in Triangulation_3 doc 2017-05-22 11:27:02 +02:00
Mael Rouxel-Labbé 404e8b81ec Fixed documentation of Regular cell bases
-- Regular_triangulation_cell_base_3 must document hidden_points handling
functions

-- Regular cell bases must document their Point type
2017-05-22 11:27:02 +02:00
Mael Rouxel-Labbé 09e319219d Cleaned Weighted_point_mappers from the documentation 2017-05-22 11:27:02 +02:00
Mael Rouxel-Labbé 7185d8fec0 Fixed boost/core/is_same.hpp > boost/type_traits/is_same.hpp 2017-05-22 11:27:02 +02:00
Jane Tournois 61aa1716af really use the GT given as a parameter
When the geom_traits given as parameter of `circumcenter` and/or
`weighted_circumcenter` was deriving from the cell base GT
(first template parameter), the gt was up-casted to the
cell base GT, and the function construct_circumcenter_3_object()
(or construct_weighted_circumcenter_3_object()) not
called on the right geom traits type --> possibly missing
the actual input of the function (the robust_circumcenter_traits in Mesh_3)

we add a static assert to check at compile time that point types are the same
2017-05-22 11:27:02 +02:00
Mael Rouxel-Labbé 8ab41b37db Fixed using default templated class functions 2017-05-22 11:27:02 +02:00
Mael Rouxel-Labbé 9debfdfd78 Fixed wrong template type (which induced taking references of references) 2017-05-22 11:27:02 +02:00
Jane Tournois c37857bd9e really use the GT given as a parameter
When the geom_traits given as parameter of `circumcenter` and/or
`weighted_circumcenter` was deriving from the cell base GT
(first template parameter), the gt was up-casted to the
cell base GT, and the function construct_circumcenter_3_object()
(or construct_weighted_circumcenter_3_object()) not
called on the right geom traits type --> possibly missing
the actual input of the function (the robust_circumcenter_traits in Mesh_3)

we add a static assert to check at compile time that both geom traits
are compatible
2017-05-22 11:27:02 +02:00
Mael Rouxel-Labbé ecd7bbdc3e Changed boost/core/enable_if.hpp to boost/utility/enable_if.hpp 2017-05-22 11:27:02 +02:00
Mael Rouxel-Labbé 550920dc80 Trimmed Construct_point_23's note in TriangulationTraits_23 2017-05-22 11:27:02 +02:00
Mael Rouxel-Labbé 768b3f5b02 Fixed regular cell bases so they actually model the concept
Also, they should not use Bare_point / Weighted_point types, which are defined
in the triangulation (much later during compilation).
2017-05-22 11:27:02 +02:00
Mael Rouxel-Labbé 63281390f8 Aligned the concept RegularTriangulationCellBase_3 with other similar concepts
That is, it should define the type `Point` (instead of `Weighted_point`), like
in TriangulationVertexBase_3 and RegularTriangulationVertexBase_3.
2017-05-22 11:27:02 +02:00
Mael Rouxel-Labbé 29b6f370a3 Clarified some documentation about the usage of Construct_point_23 in TTraits_23 2017-05-22 11:27:02 +02:00
Mael Rouxel-Labbé 70e1ac97f6 Fixed Has_nested_type_Bare_point includes 2017-05-22 11:27:02 +02:00
Mael Rouxel-Labbé 22322e3c83 Annihilated Regular_triangulation_euclidean_traits_23 across all packages
Left a little bit alive in the tests and in the Triangulation_23/doc
2017-05-22 11:27:02 +02:00
Mael Rouxel-Labbé 54bae5140a TriangulationTraits_23 refine SpatialSortingTraits_23 for Hilbert sorting 2017-05-22 11:27:02 +02:00
Mael Rouxel-Labbé fb36babdea Small improvements to the (Regular)TriangulationTraits_2/3 concepts 2017-05-22 11:27:02 +02:00
Mael Rouxel-Labbé 0e5d279f42 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)
2017-05-22 11:27:02 +02:00
Mael Rouxel-Labbé bfe99438cc Removed an ugly static_cast 2017-05-22 11:27:02 +02:00
Mael Rouxel-Labbé 9eac14e40c Misc minor changes 2017-05-22 11:27:02 +02:00
Mael Rouxel-Labbé 11a5bb7104 Use boost::function_property_map to apply spatial_sort to weighted points 2017-05-22 11:27:02 +02:00
Mael Rouxel-Labbé 41590d7790 Moved facet dual computation functions from Mesh_3 to Regular_triangulation_3
... and improved them and gave them more overloads
2017-05-22 11:27:02 +02:00
Mael Rouxel-Labbé 66fa6e1be6 Avoid copies by using result_of in boost::bind() return type
Copies were previously done on purpose to go around the Lazy kernel, but this
can be done without copies (for all kernels) by using result_of.
2017-05-22 11:27:02 +02:00
Mael Rouxel-Labbé 6d4b607a2a Removed obsolete file: Regular_traits_adaptor.h 2017-05-22 11:27:02 +02:00
Mael Rouxel-Labbé 64f9045991 Removed useless include 2017-05-22 11:27:02 +02:00
Mael Rouxel-Labbé 67d0dd4b5a Reorganized Regular_triangulation_3 dual functions 2017-05-22 11:27:02 +02:00
Mael Rouxel-Labbé 084225735f Copy boost::bind return object
The lazy kernel returns temporaries and gives garbage to compare_xyz_3...
2017-05-22 11:27:02 +02:00
Mael Rouxel-Labbé a19ab8e500 Renamed Regular_triangulation base typedef (Base > Tr_Base) 2017-05-22 11:27:02 +02:00
Mael Rouxel-Labbé b18b6c1f3e Removed useless construct_point_3
Construct_weighted_circumcenter_3 already returns a Bare_point
2017-05-22 11:27:02 +02:00
Mael Rouxel-Labbé 5a388d85ac Comparison result should be of type Comparison_result
(it worked anyway since Comparison_result is a Sign internally)
2017-05-22 11:27:02 +02:00
Mael Rouxel-Labbé 19c1d509e0 Fixed compilation of add_temporary_points_on_far_sphere() 2017-05-22 11:27:02 +02:00
Mael Rouxel-Labbé 81d3fae011 Adapted the call to spatial_sort() to handle weighted points
Downside: we copy points at each comparison, which is terrible! No noticeable
changes when profiling the construction of a triangulation.

We need this copy because of Lazy kernel: despite construct_point_3 having
const Point_3& construct_point_3_object()(const Point_3&)
the Lazy kernel can return some copies.

Other solutions that were not used:
-- Distinguish the Ouput type of Unary_function_to_property map depending on
   the type of Kernel (ugly and not safe)
-- Use Weighted_point_mappers traits (but that blood will not be on my hands)
2017-05-22 11:27:02 +02:00
Mael Rouxel-Labbé aa03fdc65e Adapted sorting algorithms based on compare_xyz to handle weighted point vectors 2017-05-22 11:27:02 +02:00
Mael Rouxel-Labbé f3c53cc53f Construct_plane() must use bare points arguments 2017-05-22 11:27:02 +02:00
Mael Rouxel-Labbé d3da6a8551 Fixed point typedef in Tr_3/benchmarks 2017-05-22 11:27:02 +02:00
Mael Rouxel-Labbé 6abd083cd3 Fixed Triangulation_benchmark_3.cpp
-- Fix Weighted_point_3 / Point_3 incompatibilities
-- Generator of weighted points also generates random weights
-- Do not use Regular_euclidean_triangulation_traits since they are deprecated
-- Do not use 'using namespace'
-- Use the new policy tag to disable hidden point caching (see b925281)
-- Remove unused objects (such as pts2_bbox)
2017-05-22 11:27:02 +02:00
Mael Rouxel-Labbé 9dc48b3d06 Fixed test_RT_cell_base_with_weigh... and added it to the CMakeLists
-Some wrong Bare_point/Weighted_point usage
-Fully instantiate the Regular_triangulation_cell_base_with_weighted_circum...
 with all the template parameters of the regular cell base
2017-05-22 11:27:02 +02:00
Mael Rouxel-Labbé 5d1b88bc7c Removed hiding-related functions from Triangulation_cell_base_3
Triangulation_cell_base_3 cannot be used anymore as a cell base of a regular
triangulation and thus there is no point keeping these functions.

People wishing to disable caching of hidden points in regular triangulations
should use the new policy, see commit b92528171c)
2017-05-22 11:27:02 +02:00
Mael Rouxel-Labbé 5872c22be3 Added a template parameter to Regular_tr_cell_base on hidden points handling
Before WP<->P implicit conversion changes, one could choose to not keep hidden
points by using `Triangulation_cell_base_3` as cell base instead of
`Regular_triangulation_cell_base_3`. This is not possible anymore as point types
will conflict.

This changes introduces a new template parameter to pass a policy on whether
to keep or discard hidden points.

It is a breaking change since it is placed before the container template
parameter, but it makes more sense that way and the container type template
was not documented.
2017-05-22 11:27:02 +02:00
Mael Rouxel-Labbé 320673924a Removed Weighted_point_mapper_3 and RegTraits_3 shenanigans
There is no need anymore for sneaky traits adaptors to make Triangulation_3
a compatible base of Regular_triangulation_3:
- The Point type in Triangulation_3 is obtained through TDS::Vertex::Point (see
  commit 13d5e89)
- Triangulation_3 always ensures that we are passing bare points to the kernel
  functors that require bare point arguments (see commit db5da73)

This greatly clarifies the code of Regular_triangulation_3: there is only a
single traits type, a single base type, etc.
2017-05-22 11:27:02 +02:00
Mael Rouxel-Labbé ccb2b32616 Ensured that we call kernel functions with the correct (bare) point type
Note that if the type `Point` is already `Point_3`, Construct_point_3 does not
do anything (except in the lazy kernel, but in that case, the running time is
horrible anyway).
2017-05-22 11:27:02 +02:00
Mael Rouxel-Labbé 1a693a0e89 Deduce Triangulation_3's point type from the TDS
Since we have a distinc vertex_base for regular triangulations and that this
regular vertex base defines a type Point, it is redundant to get the Point
type from the Geom_traits.

This also allows to remove the Weighted_point_mapper trick, and pass more easily
custom point types.
2017-05-22 11:27:02 +02:00
Mael Rouxel-Labbé 84d7f97975 Fixed Regular_traits_adaptor
The functor members cannot be references because the Regular_triangulation
might be templated by a traits class that is not simply a Kernel (that is
the case in the package Interpolation).

When that is the case, calling this->K::function_object() might be a call
to a constructor in the base traits class. Thus, the functor members
of Reg_traits_adaptors get initialized to temporaries, which is problematic
because these temporaries are at a much lower scope and thus are quickly
cleaned, leaving us with references to nothing in Reg_traits_adaptor.
2017-05-22 11:27:02 +02:00
Mael Rouxel-Labbé 729c054871 Do not provide Bare_point overloads in Regular_triangulation 2017-05-22 11:20:45 +02:00
Mael Rouxel-Labbé 5833272bd0 Fixed usage of Bare point and Weighted point across Triangulation_3 2017-05-22 11:20:45 +02:00
Mael Rouxel-Labbé 72be6f32d2 Trimmed Regular triangulation euclidean traits (doc version)
Now that the traits is exactly the kernel, there isn't a big need for a lot of
documentation.
2017-05-22 11:20:45 +02:00
Mael Rouxel-Labbé e041870954 Trimmed Regular triangulation euclidean traits
-- Code added as consequence of disabling implicit conversion between points and
   weighted points implies that defining
     typedef weighted_point point;
   creates ambiguous functors.

   This typedef is nevertheless still used, in Weighted_point_mappers.

-- The traits are not supposed to define Bare_point
2017-05-22 11:20:45 +02:00
Mael Rouxel-Labbé c597a79fe0 Fixed Triangulation_3's regular test
Constructing weighted points with (x,y,z,w) is ambiguous and that is why it was
disabled.
2017-05-22 11:20:45 +02:00
Mael Rouxel-Labbé fc62544731 Removed unused typedef 2017-05-22 11:20:45 +02:00
Mael Rouxel-Labbé 8f74332fbd Fixed missing typename 2017-05-22 11:20:45 +02:00
Mael Rouxel-Labbé ac1d7fb0a5 Fixed Triangulation_3's test using Traits::Bare_point/Weighted_point 2017-05-22 11:20:45 +02:00
Mael Rouxel-Labbé 4f81c8c794 Added CGAL_NO_DEPRECATED_CODE macros to Regular_triangulation_euclidean_traits 2017-05-22 11:20:45 +02:00
Mael Rouxel-Labbé ea14f683d7 Cleaned #if 0 code 2017-05-22 11:20:45 +02:00
Mael Rouxel-Labbé 62b90dd86b Fixed hide_point()
Hide weighted points since they can be re-inserted afterwards
2017-05-22 11:20:45 +02:00
Mael Rouxel-Labbé 83ab007236 Fixed initialization order warning 2017-05-22 11:20:45 +02:00
Jane Tournois ca25e3176c make constructors of Weighted_point explicit
and fix compilation errors
2017-05-22 11:20:45 +02:00
Sébastien Loriot 51bc69cca3 version without partial specialization
the norms says that partial specialization should be
done in a namespace (not inside a class)
2017-05-22 11:20:45 +02:00
Jane Tournois 8d1ca12a74 fix compilation of tests wrt Point vs Weighted point 2017-05-22 11:20:45 +02:00
Jane Tournois a4ee219f99 remove hybrid operators, that use Bare points and Weighted points in an ambiguous manner
this commit only fixes the testsuite of Mesh_3
2017-05-22 11:20:45 +02:00
Andreas Fabri 81ae80c465 WIP: test_meshing_polyhedron_with_features compiles and crashes in odt 2017-05-22 11:20:45 +02:00
Andreas Fabri c6f741c379 Changes after making Weighted_point_3(const Point_3) explicit 2017-05-22 11:20:45 +02:00
Andreas Fabri 57e6083b29 Disable Point_3(const Weighted_point_3&) 2017-05-22 11:20:45 +02:00
Andreas Fabri ea5f9934e2 The Weighted_point_mapper becomes a traits class; test_regular_3.cpp passes 2017-05-22 11:20:45 +02:00
Mael Rouxel-Labbé 9a4d531848 Fixed extra endif macro 2017-05-22 11:16:16 +02:00
Mael Rouxel-Labbé a66474b5fd Documented the use of the Robust_weig... traits in Mesh_triangulation_3 2017-05-22 11:15:50 +02:00
Mael Rouxel-Labbé 63a3adb8d5 Merge branch 'Periodic_3_Regular_triangulation_3-APelle-old' into Periodic_3_Regular_triangulation_3-APelle 2017-05-18 10:40:11 +02:00
Mael Rouxel-Labbé bd85e1b4c8 Fixed Point typedef in Triangulation_3 doc 2017-05-17 16:41:22 +02:00
Mael Rouxel-Labbé 1efa8b398a Fixed documentation of Regular cell bases
-- Regular_triangulation_cell_base_3 must document hidden_points handling
functions

-- Regular cell bases must document their Point type
2017-05-17 16:40:28 +02:00
Mael Rouxel-Labbé c0d5b24466 Cleaned Weighted_point_mappers from the documentation 2017-05-17 16:40:04 +02:00
Mael Rouxel-Labbé a1a6a17271 Improved Periodic_3 documentation 2017-05-17 15:07:12 +02:00
Mael Rouxel-Labbé aaed0f6737 Fixed using default templated member functions 2017-05-16 17:49:32 +02:00
Mael Rouxel-Labbé f45c008721 Merge branch 'Periodic_3_Regular_triangulation_3-APelle-old' into Periodic_3_Regular_triangulation_3-APelle
Using afabri/Kernel_Weighted_point_without_conversion-GF
  @ 5c2a089e3e
2017-05-16 17:48:07 +02:00
Andreas Fabri 40d6a3e68a Change comment to avoid warning 2017-05-16 10:17:41 +02:00
Mael Rouxel-Labbé 266775bafa Silenced depreciation warnings from Regular_triangulation_euclidean_traits_23 2017-05-16 10:17:41 +02:00
Mael Rouxel-Labbé cd2a562ffa Fixed improper guards against the inclusion of deprecated headers 2017-05-16 10:17:41 +02:00
Mael Rouxel-Labbé c353f0f49c Added CGAL_NO_DEPRECATED_CODE macros to Regular_triangulation_euclidean_traits 2017-05-16 10:17:41 +02:00
Mael Rouxel-Labbé d07976b2ac All triangulations now use Perturbation_order in tests using symbolic perturbations 2017-05-15 17:13:38 +02:00
Mael Rouxel-Labbé 757203e390 Removed wrong tests (see also issue 2067) 2017-05-13 22:25:39 +02:00
Mael Rouxel-Labbé 5c2a089e3e Fixed boost/core/is_same.hpp > boost/type_traits/is_same.hpp 2017-05-13 22:21:59 +02:00
Mael Rouxel-Labbé 01b2d61493 (Re)-added the unhide_point() function that is required for P3T3 2017-05-12 17:08:36 +02:00
Mael Rouxel-Labbé 2f0f955a59 Merge branch 'Kernel_Weighted_point_without_conversion-GF' of github.com:afabri/cgal into Kernel_Weighted_point_without_conversion-GF 2017-05-12 13:12:47 +02:00
Jane Tournois 6ed6af00a0 really use the GT given as a parameter
When the geom_traits given as parameter of `circumcenter` and/or
`weighted_circumcenter` was deriving from the cell base GT
(first template parameter), the gt was up-casted to the
cell base GT, and the function construct_circumcenter_3_object()
(or construct_weighted_circumcenter_3_object()) not
called on the right geom traits type --> possibly missing
the actual input of the function (the robust_circumcenter_traits in Mesh_3)

we add a static assert to check at compile time that point types are the same
2017-05-12 13:07:00 +02:00
Mael Rouxel-Labbé b88bee84b2 Fixed using default templated class functions 2017-05-12 12:23:49 +02:00
Mael Rouxel-Labbé 9f865e87bb Fixed wrong template type (which induced taking references of references) 2017-05-12 12:21:39 +02:00
Mael Rouxel-Labbé bf425a46e6 Merge branch 'Periodic_3_Regular_triangulation_3-APelle-old' into Periodic_3_Regular_triangulation_3-APelle
Strongly breaks P3T3, will be fixed in the next commits
2017-05-11 17:45:15 +02:00
Mael Rouxel-Labbé 13d8a6879f Changed boost/core/enable_if.hpp to boost/utility/enable_if.hpp 2017-05-11 14:25:18 +02:00
Mael Rouxel-Labbé 1d93d4d89e Trimmed Construct_point_23's note in TriangulationTraits_23 2017-05-10 17:39:47 +02:00
Mael Rouxel-Labbé f2a308d9f1 Fixed regular cell bases so they actually model the concept
Also, they should not use Bare_point / Weighted_point types, which are defined
in the triangulation (much later during compilation).
2017-05-10 16:35:28 +02:00
Mael Rouxel-Labbé 9bb70c10d4 Aligned the concept RegularTriangulationCellBase_3 with other similar concepts
That is, it should define the type `Point` (instead of `Weighted_point`), like
in TriangulationVertexBase_3 and RegularTriangulationVertexBase_3.
2017-05-10 16:34:53 +02:00
Mael Rouxel-Labbé 82878dccfe Clarified some documentation about the usage of Construct_point_23 in TTraits_23 2017-05-10 12:37:20 +02:00
Mael Rouxel-Labbé 46b489b2b5 Fixed Has_nested_type_Bare_point includes 2017-05-10 12:33:43 +02:00
Mael Rouxel-Labbé 97b789a741 Merge branch 'Kernel_Weighted_point_without_conversion-GF-old' into Kernel_Weighted_point_without_conversion-GF 2017-05-10 12:32:46 +02:00
Mael Rouxel-Labbé a7cabb5369 Annihilated Regular_triangulation_euclidean_traits_23 across all packages
Left a little bit alive in the tests and in the Triangulation_23/doc
2017-05-05 12:56:18 +02:00
Mael Rouxel-Labbé 4857cad651 TriangulationTraits_23 refine SpatialSortingTraits_23 for Hilbert sorting 2017-05-03 18:53:23 +02:00
Mael Rouxel-Labbé 9fda4a395a Small improvements to the (Regular)TriangulationTraits_2/3 concepts 2017-05-02 17:28:11 +02:00
Mael Rouxel-Labbé b04ac5a0df 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)
2017-05-02 17:26:31 +02:00
Mael Rouxel-Labbé be441f8dd1 Removed an ugly static_cast 2017-05-01 16:15:40 +02:00
Mael Rouxel-Labbé 169d0be212 Misc minor changes 2017-05-01 16:15:31 +02:00
Mael Rouxel-Labbé d6576d1857 Use boost::function_property_map to apply spatial_sort to weighted points 2017-05-01 16:14:57 +02:00
Mael Rouxel-Labbé 6610dc7116 Moved facet dual computation functions from Mesh_3 to Regular_triangulation_3
... and improved them and gave them more overloads
2017-04-28 17:51:22 +02:00
Mael Rouxel-Labbé 5e9bad8e5d Avoid copies by using result_of in boost::bind() return type
Copies were previously done on purpose to go around the Lazy kernel, but this
can be done without copies (for all kernels) by using result_of.
2017-04-28 17:30:37 +02:00
Mael Rouxel-Labbé 37d7d0ab2e Removed obsolete file: Regular_traits_adaptor.h 2017-04-28 17:26:19 +02:00
Mael Rouxel-Labbé 2e78fee32e Removed useless include 2017-04-28 17:24:44 +02:00
Mael Rouxel-Labbé 31f82720e8 Reorganized Regular_triangulation_3 dual functions 2017-04-28 15:00:29 +02:00
Mael Rouxel-Labbé fe3c728a42 Copy boost::bind return object
The lazy kernel returns temporaries and gives garbage to compare_xyz_3...
2017-04-28 14:38:27 +02:00
Mael Rouxel-Labbé 88f97d2974 Renamed Regular_triangulation base typedef (Base > Tr_Base) 2017-04-27 16:31:35 +02:00
Mael Rouxel-Labbé 3681ec4460 Removed useless construct_point_3
Construct_weighted_circumcenter_3 already returns a Bare_point
2017-04-27 16:13:48 +02:00
Mael Rouxel-Labbé 4c96e75a8d Comparison result should be of type Comparison_result
(it worked anyway since Comparison_result is a Sign internally)
2017-04-27 14:23:41 +02:00
Mael Rouxel-Labbé 863a223860 Fixed compilation of add_temporary_points_on_far_sphere() 2017-04-27 14:01:58 +02:00
Mael Rouxel-Labbé 2a06660a2b Adapted the call to spatial_sort() to handle weighted points
Downside: we copy points at each comparison, which is terrible! No noticeable
changes when profiling the construction of a triangulation.

We need this copy because of Lazy kernel: despite construct_point_3 having
const Point_3& construct_point_3_object()(const Point_3&)
the Lazy kernel can return some copies.

Other solutions that were not used:
-- Distinguish the Ouput type of Unary_function_to_property map depending on
   the type of Kernel (ugly and not safe)
-- Use Weighted_point_mappers traits (but that blood will not be on my hands)
2017-04-27 13:56:01 +02:00
Mael Rouxel-Labbé 9651371c6f Adapted sorting algorithms based on compare_xyz to handle weighted point vectors 2017-04-27 13:52:20 +02:00
Mael Rouxel-Labbé 7108383498 Construct_plane() must use bare points arguments 2017-04-27 12:03:47 +02:00
Mael Rouxel-Labbé 75d19b0c1b Fixed point typedef in Tr_3/benchmarks 2017-04-27 12:02:39 +02:00
Mael Rouxel-Labbé de78203ff5 Fixed Triangulation_benchmark_3.cpp
-- Fix Weighted_point_3 / Point_3 incompatibilities
-- Generator of weighted points also generates random weights
-- Do not use Regular_euclidean_triangulation_traits since they are deprecated
-- Do not use 'using namespace'
-- Use the new policy tag to disable hidden point caching (see b925281)
-- Remove unused objects (such as pts2_bbox)
2017-04-27 12:01:23 +02:00
Mael Rouxel-Labbé 9b763f8634 Fixed test_RT_cell_base_with_weigh... and added it to the CMakeLists
-Some wrong Bare_point/Weighted_point usage
-Fully instantiate the Regular_triangulation_cell_base_with_weighted_circum...
 with all the template parameters of the regular cell base
2017-04-27 11:53:03 +02:00
Mael Rouxel-Labbé d9666bd342 Removed hiding-related functions from Triangulation_cell_base_3
Triangulation_cell_base_3 cannot be used anymore as a cell base of a regular
triangulation and thus there is no point keeping these functions.

People wishing to disable caching of hidden points in regular triangulations
should use the new policy, see commit b92528171c)
2017-04-27 11:50:54 +02:00
Mael Rouxel-Labbé b92528171c Added a template parameter to Regular_tr_cell_base on hidden points handling
Before WP<->P implicit conversion changes, one could choose to not keep hidden
points by using `Triangulation_cell_base_3` as cell base instead of
`Regular_triangulation_cell_base_3`. This is not possible anymore as point types
will conflict.

This changes introduces a new template parameter to pass a policy on whether
to keep or discard hidden points.

It is a breaking change since it is placed before the container template
parameter, but it makes more sense that way and the container type template
was not documented.
2017-04-27 11:42:34 +02:00
Mael Rouxel-Labbé 450c78e814 Removed Weighted_point_mapper_3 and RegTraits_3 shenanigans
There is no need anymore for sneaky traits adaptors to make Triangulation_3
a compatible base of Regular_triangulation_3:
- The Point type in Triangulation_3 is obtained through TDS::Vertex::Point (see
  commit 13d5e89)
- Triangulation_3 always ensures that we are passing bare points to the kernel
  functors that require bare point arguments (see commit db5da73)

This greatly clarifies the code of Regular_triangulation_3: there is only a
single traits type, a single base type, etc.
2017-04-27 08:44:32 +02:00
Mael Rouxel-Labbé db5da73483 Ensured that we call kernel functions with the correct (bare) point type
Note that if the type `Point` is already `Point_3`, Construct_point_3 does not
do anything (except in the lazy kernel, but in that case, the running time is
horrible anyway).
2017-04-27 00:25:12 +02:00
Mael Rouxel-Labbé 13d5e895ac Deduce Triangulation_3's point type from the TDS
Since we have a distinc vertex_base for regular triangulations and that this
regular vertex base defines a type Point, it is redundant to get the Point
type from the Geom_traits.

This also allows to remove the Weighted_point_mapper trick, and pass more easily
custom point types.
2017-04-27 00:21:47 +02:00
Mael Rouxel-Labbé ac63b66286 Fixed Regular_traits_adaptor
The functor members cannot be references because the Regular_triangulation
might be templated by a traits class that is not simply a Kernel (that is
the case in the package Interpolation).

When that is the case, calling this->K::function_object() might be a call
to a constructor in the base traits class. Thus, the functor members
of Reg_traits_adaptors get initialized to temporaries, which is problematic
because these temporaries are at a much lower scope and thus are quickly
cleaned, leaving us with references to nothing in Reg_traits_adaptor.
2017-04-18 15:16:43 +02:00
Laurent Rineau dce8bb77ba Merge pull request #2053 from cjamin/Mesh_3-code_improvements-cjamin
Mesh_3: code improvements + bug fix
2017-04-14 18:32:05 +02:00
Mael Rouxel-Labbé f1c1cd26c4 Do not provide Bare_point overloads in Regular_triangulation 2017-04-14 16:49:50 +02:00
Mael Rouxel-Labbé 5856c7de2b Fixed usage of Bare point and Weighted point across Triangulation_3 2017-04-14 16:48:31 +02:00
Mael Rouxel-Labbé f67d75e0df Trimmed Regular triangulation euclidean traits (doc version)
Now that the traits is exactly the kernel, there isn't a big need for a lot of
documentation.
2017-04-14 15:53:12 +02:00