Commit Graph

72920 Commits

Author SHA1 Message Date
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é 28a31c9b00 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-06-08 13:23:10 +02:00
Mael Rouxel-Labbé 0d791e5b94 Fixed doc typo 2017-06-08 13:23:10 +02:00
Mael Rouxel-Labbé 4f25ee078b Fixed weighted Alpha_shapes_3 TDS construction
When weighted, Alpha_cell_base_3 must use Regular_triangulation_cell_base_3
as base
2017-06-08 13:23:10 +02:00
Mael Rouxel-Labbé 5c1f2d8795 Improved readability of Lazy_alpha_nt_2 (no real changes) 2017-06-08 13:23:10 +02:00
Mael Rouxel-Labbé f954f8f6cf Fixed default constructed traits 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é 439730c647 Fixed a comment in Interpolation
The OutputIterator type in regular_neighbor_coordinates is a pair of a weighted
point (and _not_ a point) and a FT
2017-06-08 13:23:10 +02:00
Mael Rouxel-Labbé e566393ced Voronoi_intersection_2_traits_3.h should not define a Weight type 2017-06-08 13:23:10 +02:00
Mael Rouxel-Labbé b129094552 Corrected documentation of Voronoi_intersection_2_traits_3
-- the traits class is not a model of InterpolationTraits
-- plenty of typedef that were not documented
-- added new requirements due to changes in points/weighted_points
-- constructor with a kernel parameter
2017-06-08 13:23:10 +02:00
Mael Rouxel-Labbé b3e47c5edf Fixed Interpolation demo
The regular triangulation must be built using weighted points
2017-06-08 13:23:10 +02:00
Mael Rouxel-Labbé f670b06493 Improved Interpolation readability (no real changes)
-- Removed trailing whitespace
-- Fixed (some) includes
-- Fixed indentation
-- Fixed some remaining french
2017-06-08 13:23:10 +02:00
Mael Rouxel-Labbé b0f3ac67e6 Proper use of Bare_point/Weighted_point 2017-06-08 13:23:10 +02:00
Mael Rouxel-Labbé d6558ccc98 Simplified the usage of traits' functors in NN_coordinates_3
There is no need to define local versions of functors that are already available
through the traits / kernel.

Also do not default construct traits.
2017-06-08 13:23:10 +02:00
Mael Rouxel-Labbé 0cc58623e2 Fixed surface_neighbors_3
Short version: the regular triangulation must be build using weighted points,
but the return type is (bare) points
2017-06-08 13:23:10 +02:00
Mael Rouxel-Labbé 4e950e6d81 Fixed surface_neighbor_coordinates
Short version: the regular triangulation must be build using weighted points,
but the return type is (bare) points
2017-06-08 13:23:10 +02:00
Mael Rouxel-Labbé 5193e2e57f Fixed Voronoi_intersection_2_traits_3
-- Required fixes due to the removal of implicit conversions between Point and
   Weighted_point
-- Removed 'Bare_point' typedef: it is not for the traits to define this type
-- The traits class derives from a Kernel so that it can still provide
   the functors that are not redeclared in this traits class
-- Use const& for predicate members to avoid copies (the traits will live
   longer than the predicates so it's safe)
-- Minor changes (trailing whitespace, useless semicolons) that was
   too difficult to separate into a different commit
2017-06-08 13:23:10 +02:00
Mael Rouxel-Labbé 96ec1bd7f0 Removed useless includes 2017-06-08 13:23:10 +02:00
Mael Rouxel-Labbé e6c14f115e Removed an empty line 2017-06-08 13:23:10 +02:00
Mael Rouxel-Labbé da5c683e76 Cleaned uses of obsolete traits class Regular_triangulation_euclidean_traits 2017-06-08 13:23:10 +02:00
Mael Rouxel-Labbé 2672713308 Renamed Bare_point_3 > Bare_point 2017-06-08 13:23:10 +02:00
Mael Rouxel-Labbé 866948aae1 Removed useless semicolon 2017-06-08 13:23:10 +02:00
Mael Rouxel-Labbé 2c18546c0b Fixed using Weighted_point_creator to construct weighted point
This class is obsolete; kernel functors should be used.
2017-06-08 13:23:10 +02:00
Mael Rouxel-Labbé 338c5746a5 Fixed (almost all) default constructed traits in Mesh_3
Also fixed constructing points/weighted_points not through the traits and
uses of point().point()
2017-06-08 13:23:10 +02:00
Mael Rouxel-Labbé 8274aec2e0 Improved readiblity of Regular_triangulation_2.h (no real changes)
Only whitespace cleaning, indentation fixing, empty lines removal, etc.
2017-06-08 13:23:10 +02:00
Mael Rouxel-Labbé d277c44b7d Improved readability of Triangulation_2.h (no real changes)
Only whitespace cleaning, indentation fixing, empty lines removal, etc.
2017-06-08 13:23:10 +02:00
Mael Rouxel-Labbé eb837bfd39 Improved readability of Delaunay_triangulation_2.h (no real changes)
Only whitespace cleaning, indentation fixing, empty lines removal, etc.
2017-06-08 13:23:10 +02:00
Mael Rouxel-Labbé 5205d3c1f3 Do not provide Bare_point overloads in Regular_triangulation_2
Additional:
-- Simplify the hierarchy_2: there is no need to distinguish between
   Bare_point and Weighted_point, that is the point (!) of the type "Point"
   in Triangulation_2.
-- Use Weighted_point in tests
2017-06-08 13:23:10 +02:00
Mael Rouxel-Labbé 4baa9531c1 Fixed Bare_point / Weighted_point usage in Triangulation_2 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é 974c68b27d Removed ambiguous weighted point constructor
This constructor was already cleaned in the branch that this branch
is based upon... I must have messed up a merge conflict...
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é af8f71e001 Fixed (wrongly) assuming that traits define Bare_point / Weighted_point 2017-06-08 13:23:10 +02:00
Mael Rouxel-Labbé a5c4543f73 Use Skin_surface_3::Bare_point over Weighted_point::Point
Just in case they are different
2017-06-08 13:23:10 +02:00
Mael Rouxel-Labbé e4b596fb72 Fixed documentation of Bare_point and Weighted_point in concept SkinSurface3 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é ef20f3a750 Fixed (remaining) Bare_point / Weighted_point wrong usages across Mesh_3 2017-06-08 13:23:10 +02:00
Mael Rouxel-Labbé c52f8ff97d Removed Bare_point definition from Mesh_3's Robust_weighted_...etc..._traits
It is not for the traits to define Bare_point. It is defined in the regular
triangulation.

This commit breaks stuff, but it'll be fixed in the following commits.
2017-06-08 13:23:10 +02:00
Mael Rouxel-Labbé d7904dd0af Improved readability of Skin_surface_3
Only indentation and whitespace is changed.

Almost like a skin (sur)facelift !
2017-06-08 13:23:10 +02:00
Mael Rouxel-Labbé f4ef613550 Removed unused variable 2017-06-08 13:23:10 +02:00
Mael Rouxel-Labbé 062461926f Removed any use of Regular_triangulation_euclidean_traits from Skin surface 2017-06-08 13:23:10 +02:00