Commit Graph
815 Commits
Author SHA1 Message Date
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é 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é 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
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 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é dca4a3ff32 Hid main encroachment code in P3_mesh_triangulation_3
End goal is to hide periodic details in P3MT3 so that the criteria of Mesh_3
can be fully used without change in P3M3
2017-06-13 17:53:31 +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é f614b7ae3e 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é a8379e65f9 Renamed uses of invalidate_circumcenter() in accordance with the modified concept 2017-06-01 11:26:05 +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
Mael Rouxel-Labbé 061f112e07 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
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
Mael Rouxel-Labbé 4018368e11 Merge branch 'Periodic_3_Regular_triangulation_3-APelle-old' into Periodic_3_Regular_triangulation_3-APelle 2017-05-24 12:18:49 +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é 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é 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é 70e1ac97f6 Fixed Has_nested_type_Bare_point includes 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é 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