Commit Graph

1125 Commits

Author SHA1 Message Date
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
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
Mael Rouxel-Labbé 3c9063cd88 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-04-14 15:39:30 +02:00
Mael Rouxel-Labbé 3f0c1c72bb Fixed Triangulation_3's regular test
Constructing weighted points with (x,y,z,w) is ambiguous and that is why it was
disabled.
2017-04-14 15:35:00 +02:00
Mael Rouxel-Labbé 29402979c7 Removed unused typedef 2017-04-14 11:59:09 +02:00
Mael Rouxel-Labbé 013b684355 Fixed missing typename 2017-04-14 11:58:54 +02:00
Mael Rouxel-Labbé 3b7b8128d8 Fixed Triangulation_3's test using Traits::Bare_point/Weighted_point 2017-04-14 11:22:46 +02:00
Mael Rouxel-Labbé 863584e863 Added CGAL_NO_DEPRECATED_CODE macros to Regular_triangulation_euclidean_traits 2017-04-14 10:59:42 +02:00
Mael Rouxel-Labbé 2b8684c874 Cleaned #if 0 code 2017-04-12 15:06:03 +02:00
Mael Rouxel-Labbé 2c79d6e939 Fixed hide_point()
Hide weighted points since they can be re-inserted afterwards
2017-04-11 17:04:34 +02:00
Mael Rouxel-Labbé 77c83642f2 Fixed initialization order warning 2017-04-11 17:04:03 +02:00
Mael Rouxel-Labbé 2ee5b13e6f Merge branch 'Kernel_Weighted_point_without_conversion-GF-old' into Kernel_Weighted_point_without_conversion-GF
Using Kernel-Fix_weighted_point-GF @ 8703f5c122
2017-04-11 17:01:25 +02:00
Jane Tournois a18f17a7f1 Merge branch 'Kernel_Weighted_point_without_conversion-GF' of github.com:afabri/cgal into Kernel_Weighted_point_without_conversion-GF 2017-03-06 13:55:04 +01:00
Jane Tournois 55e1533ded make constructors of Weighted_point explicit
and fix compilation errors
2017-03-06 13:54:29 +01:00
Sébastien Loriot ac0dfe3465 version without partial specialization
the norms says that partial specialization should be
done in a namespace (not inside a class)
2017-03-06 12:10:24 +01:00
Jane Tournois fb54d23c8a fix compilation of tests wrt Point vs Weighted point 2017-03-03 14:08:49 +01:00
Jane Tournois 30fe153651 remove hybrid operators, that use Bare points and Weighted points in an ambiguous manner
this commit only fixes the testsuite of Mesh_3
2017-03-03 12:14:30 +01:00
Andreas Fabri 741838b9c4 WIP: test_meshing_polyhedron_with_features compiles and crashes in odt 2017-03-02 15:51:41 +01:00
Andreas Fabri 30b7f131d7 Changes after making Weighted_point_3(const Point_3) explicit 2017-02-17 16:38:39 +01:00
Laurent Rineau c55e391f97 WIP: works with one thread 2017-02-17 16:37:11 +01:00
Andreas Fabri 4922f9e86d Disable Point_3(const Weighted_point_3&) 2017-02-15 14:33:31 +01:00