Commit Graph

72446 Commits

Author SHA1 Message Date
Mael Rouxel-Labbé 2a8d77882e Triangulation_2's point type is deduced from the TDS::Vb, not from the traits 2017-05-01 16:20:29 +02:00
Mael Rouxel-Labbé 206247744b Removed obsolete Weighted_point_mapper trick for Regular_triangulation_2 2017-05-01 16:19:31 +02:00
Mael Rouxel-Labbé fbbd583b79 Removed useless class Regular_traits_adaptor_2.h 2017-05-01 16:17:55 +02:00
Mael Rouxel-Labbé 6f0d07f583 Periodic construct_point_2 must have access to the base construct_point_2 operator() 2017-05-01 16:16:41 +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é a923bab0db Revert "Added the Unary_function_to_property_map property map"
This reverts commit 1913b94ebe.

This property map actually already exists with almost exactly the same
implementation in boost, as boost::function_property_map...
2017-04-30 23:57:22 +02:00
Mael Rouxel-Labbé 864ab05080 Merge branch 'Kernel_Weighted_point_without_conversion-GF-old' into Kernel_Weighted_point_without_conversion-GF
Based on public-dev/Kernel-Fix_weighted_point-GF
@ 9f366d6acf
2017-04-30 20:45:30 +02:00
Mael Rouxel-Labbé 9f366d6acf Fixed missing _object(){ } for construct_wp/p functors of projection traits 2017-04-30 19:51:49 +02:00
Mael Rouxel-Labbé 5c21d4affc Fixed various Bare_point / Weighted_point usage across Mesh_3
Hopefully, this is the last batch
2017-04-28 17:59:33 +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é 52c105685b Avoided a default traits construction 2017-04-28 14:08:12 +02:00
Mael Rouxel-Labbé daa4d93ffb Periodic_3 construct point 3 needs access to its base operator() 2017-04-28 14:00:28 +02:00
Mael Rouxel-Labbé 7e06681485 Periodic_3 remove traits must overwrite construct_point_3() 2017-04-28 12:42:34 +02:00
Mael Rouxel-Labbé de9f467d8f Removed Regular_triangulation_euclidean_traits_3 usage in Lazy_alpha_nt_3
Regular_triangulation_euclidean_traits are deprecated (and do not do anything).
2017-04-27 17:04:25 +02:00
Mael Rouxel-Labbé 605e4a876b Fixed some Bare_point / Weighted_point typedefs in Alpha_shapes_3
The triangulation defines those types, not the traits
2017-04-27 17:02:24 +02:00
Mael Rouxel-Labbé fb63e5576e Made some typedefs readable for people without a 30" screen (no real changes) 2017-04-27 16:54:56 +02:00
Mael Rouxel-Labbé 217bd86676 Fixed test_fixed_alpha_shape_3 Point_3/Weighted_point_3 usage 2017-04-27 16:50:23 +02:00
Mael Rouxel-Labbé f9fc4966ca Fixed TDS in test of Alpha_shapes_3 (Regular_tr must use regular cell_base) 2017-04-27 16:34:10 +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é d66373519e Moved up the force_exact test to avoid computing useless determinants 2017-04-27 16:02:23 +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é 1913b94ebe Added the Unary_function_to_property_map property map
It is the opposite of Property_map_to_unary_function and allows to make
a property map out of a unary function: get(k) = f(k)
2017-04-27 13:22:54 +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é ab9cbbb6ba Weighted alpha shape traits are not based on RT_euclidean_traits anymore
Similarly to Regular_triangulation_euclidean_traits, the Kernel concept has now
absorbed all the functors that are needed by the alpha shape traits concept and
the weighted alpha shape traits can thus simply be empty shells.
2017-04-27 00:15:55 +02:00
Mael Rouxel-Labbé ecb1a5e8e1 Fixed doc typo 2017-04-25 16:36:28 +02:00
Mael Rouxel-Labbé bb7013f95a Fixed weighted Alpha_shapes_3 TDS construction
When weighted, Alpha_cell_base_3 must use Regular_triangulation_cell_base_3
as base
2017-04-25 10:52:09 +02:00
Mael Rouxel-Labbé 99aed6afaa Merge branch 'Kernel_Weighted_point_without_conversion-GF-old' into Kernel_Weighted_point_without_conversion-GF
Using cgal-public-dev/Kernel-Fix_weighted_point-GF
  @ 37eac35321
2017-04-24 12:01:13 +02:00
Mael Rouxel-Labbé 37eac35321 Added functions related to Weighted_point_2 to Projection_traits_3
+ tests
2017-04-21 18:14:38 +02:00
Mael Rouxel-Labbé 93d76014d2 Orientation_2 only accepts bare Point_2 2017-04-21 14:50:53 +02:00
Mael Rouxel-Labbé 6e07e59930 Merge branch 'Kernel_Weighted_point_without_conversion-GF-old' into Kernel_Weighted_point_without_conversion-GF
Update based on the branch cgal-public-dev/Kernel-Fix_weighted_point-GF
  @ 8915b4472d
2017-04-21 14:50:01 +02:00
Mael Rouxel-Labbé 2147244eb5 Improved readability of Lazy_alpha_nt_2 (no real changes) 2017-04-21 14:09:43 +02:00