Commit Graph

510 Commits

Author SHA1 Message Date
Mael Rouxel-Labbé e861cc0f61 Fixed Has_nested_type_Bare_point includes 2017-06-08 13:23:10 +02:00
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é 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é 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é 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
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 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
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
Mael Rouxel-Labbé c353f0f49c Added CGAL_NO_DEPRECATED_CODE macros to Regular_triangulation_euclidean_traits 2017-05-16 10:17:41 +02:00
Laurent Rineau dce8bb77ba Merge pull request #2053 from cjamin/Mesh_3-code_improvements-cjamin
Mesh_3: code improvements + bug fix
2017-04-14 18:32:05 +02:00
Laurent Rineau 93311493c4 Merge pull request #1998 from afabri/CGAL-test_license_check-GF
CGAL: Test the license check mechanism
2017-04-07 12:06:23 +02:00
Andreas Fabri 8cbbe0e165 Remove dependencies of Triangulation_3 on Triangulation_2 2017-04-06 11:08:37 +02:00
Clement Jamin 6ea82bbe2a Unnecessary double "if" blocks 2017-03-09 17:46:46 +01:00
Laurent Rineau c55e391f97 WIP: works with one thread 2017-02-17 16:37:11 +01:00
Sébastien Loriot 50510c05ea add include directive for license of all GPL header files
done using:
ack-grep "^GPL" */package_info/*/license.txt -l | awk -F "/" '{print $1}' > /tmp/gpl_packages
for i in `cat /tmp/gpl_packages | \
          grep -v Operations_on_polyhedra | \
          grep -v Algebraic_kernel_for_circles | \
          grep -v Algebraic_kernel_for_spheres | \
          grep -v Polyhedron_IO`;
do
  echo $i
  python Scripts/developer_scripts/add_license_in_pkg_header.py $i
done
python Scripts/developer_scripts/add_license_in_pkg_header.py Operations_on_polyhedra Polygon_mesh_processing
python Scripts/developer_scripts/add_license_in_pkg_header.py Algebraic_kernel_for_circles Circular_kernel_2
python Scripts/developer_scripts/add_license_in_pkg_header.py Algebraic_kernel_for_spheres Circular_kernel_3
python Scripts/developer_scripts/add_license_in_pkg_header.py Polyhedron_IO Polyhedron
2017-01-19 15:20:25 +01:00
Sébastien Loriot fe5e925367 Merge pull request #1701 from afabri/Convex_hull_3-FaceGraph-GF
Convex_hull_3: Switch to FaceGraph
2016-12-30 15:14:34 +01:00
Laurent Rineau bbf430b0b1 Merge pull request #585 from afabri/Kernel-Weighted_point-GF
Introduce Kernel::Weighted_point_3 together with functors
2016-12-20 19:52:02 +01:00
Andreas Fabri 9ee11501ac Changes after the review by Sebastien 2016-11-30 10:03:00 +01:00
Guillaume Damiand 12328929b2 Update LCC tests: now they are done both for CMap and GMap. 2016-11-29 11:43:38 +01:00