Commit Graph

1134 Commits

Author SHA1 Message Date
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
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
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
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