diff --git a/AABB_tree/doc/AABB_tree/Concepts/AABBGeomTraits.h b/AABB_tree/doc/AABB_tree/Concepts/AABBGeomTraits.h index a579453e9f2..ec017f1efe3 100644 --- a/AABB_tree/doc/AABB_tree/Concepts/AABBGeomTraits.h +++ b/AABB_tree/doc/AABB_tree/Concepts/AABBGeomTraits.h @@ -66,7 +66,8 @@ typedef unspecified_type Construct_sphere_3; /*! A functor object to compute the point on a geometric primitive which is closest from a query. Provides the operator: -`Point_3 operator()(const Type_2& type_2, const Point_3& p);` where `Type_2` is any type among `Segment_3` and `Triangle_3`. The operator returns the point on `type_2` which is closest to `p`. +`Point_3 operator()(const Type_2& type_2, const Point_3& p);` where `Type_2` can be any of the following types : `Segment_3`, `Ray_3`, or `Triangle_3`. +The operator returns the point on `type_2` which is closest to `p`. */ typedef unspecified_type Construct_projected_point_3; diff --git a/AABB_tree/include/CGAL/AABB_traits.h b/AABB_tree/include/CGAL/AABB_traits.h index da2fd2da756..632f2256d4b 100644 --- a/AABB_tree/include/CGAL/AABB_traits.h +++ b/AABB_tree/include/CGAL/AABB_traits.h @@ -291,7 +291,8 @@ public: */ class Sort_primitives { - const AABB_traits& m_traits; + typedef AABB_traits Traits; + const Traits& m_traits; public: Sort_primitives(const AABB_traits& traits) : m_traits(traits) {} @@ -302,16 +303,16 @@ public: const typename AT::Bounding_box& bbox) const { PrimitiveIterator middle = first + (beyond - first)/2; - switch(longest_axis(bbox)) + switch(Traits::longest_axis(bbox)) { case AT::CGAL_AXIS_X: // sort along x - std::nth_element(first, middle, beyond, boost::bind(less_x,_1,_2,m_traits)); + std::nth_element(first, middle, beyond, boost::bind(Traits::less_x,_1,_2,m_traits)); break; case AT::CGAL_AXIS_Y: // sort along y - std::nth_element(first, middle, beyond, boost::bind(less_y,_1,_2,m_traits)); + std::nth_element(first, middle, beyond, boost::bind(Traits::less_y,_1,_2,m_traits)); break; case AT::CGAL_AXIS_Z: // sort along z - std::nth_element(first, middle, beyond, boost::bind(less_z,_1,_2,m_traits)); + std::nth_element(first, middle, beyond, boost::bind(Traits::less_z,_1,_2,m_traits)); break; default: CGAL_error(); diff --git a/AABB_tree/test/AABB_tree/AABB_test_util.h b/AABB_tree/test/AABB_tree/AABB_test_util.h index 55eeb4d84c8..bd5443a8548 100644 --- a/AABB_tree/test/AABB_tree/AABB_test_util.h +++ b/AABB_tree/test/AABB_tree/AABB_test_util.h @@ -29,7 +29,7 @@ #include #include -#include +#include #include diff --git a/AABB_tree/test/AABB_tree/aabb_any_all_benchmark.cpp b/AABB_tree/test/AABB_tree/aabb_any_all_benchmark.cpp index 70626442ac3..394bce109b5 100644 --- a/AABB_tree/test/AABB_tree/aabb_any_all_benchmark.cpp +++ b/AABB_tree/test/AABB_tree/aabb_any_all_benchmark.cpp @@ -15,7 +15,6 @@ #include #include -#include #include diff --git a/AABB_tree/test/AABB_tree/aabb_correctness_triangle_test.cpp b/AABB_tree/test/AABB_tree/aabb_correctness_triangle_test.cpp index 556a6f81bdd..8d511bea090 100644 --- a/AABB_tree/test/AABB_tree/aabb_correctness_triangle_test.cpp +++ b/AABB_tree/test/AABB_tree/aabb_correctness_triangle_test.cpp @@ -32,7 +32,6 @@ #include #include -#include #include #include diff --git a/AABB_tree/test/AABB_tree/aabb_distance_edge_test.cpp b/AABB_tree/test/AABB_tree/aabb_distance_edge_test.cpp index 3da5b2fa1b7..5c3ba4ca6e1 100644 --- a/AABB_tree/test/AABB_tree/aabb_distance_edge_test.cpp +++ b/AABB_tree/test/AABB_tree/aabb_distance_edge_test.cpp @@ -33,7 +33,6 @@ #include #include -#include #include diff --git a/AABB_tree/test/AABB_tree/aabb_distance_triangle_hint_test.cpp b/AABB_tree/test/AABB_tree/aabb_distance_triangle_hint_test.cpp index 0e248bf8b4e..2c8e715276a 100644 --- a/AABB_tree/test/AABB_tree/aabb_distance_triangle_hint_test.cpp +++ b/AABB_tree/test/AABB_tree/aabb_distance_triangle_hint_test.cpp @@ -33,7 +33,6 @@ #include #include -#include #include diff --git a/AABB_tree/test/AABB_tree/aabb_distance_triangle_test.cpp b/AABB_tree/test/AABB_tree/aabb_distance_triangle_test.cpp index 6dfe77e2594..ff1e2775200 100644 --- a/AABB_tree/test/AABB_tree/aabb_distance_triangle_test.cpp +++ b/AABB_tree/test/AABB_tree/aabb_distance_triangle_test.cpp @@ -29,7 +29,6 @@ #include #include -#include #include #include "AABB_test_util.h" diff --git a/AABB_tree/test/AABB_tree/aabb_intersection_triangle_test.cpp b/AABB_tree/test/AABB_tree/aabb_intersection_triangle_test.cpp index 30121277365..3cdf2b07f8e 100644 --- a/AABB_tree/test/AABB_tree/aabb_intersection_triangle_test.cpp +++ b/AABB_tree/test/AABB_tree/aabb_intersection_triangle_test.cpp @@ -32,7 +32,6 @@ #include #include -#include #include #include diff --git a/AABB_tree/test/AABB_tree/aabb_naive_vs_tree_distance_segment_test.cpp b/AABB_tree/test/AABB_tree/aabb_naive_vs_tree_distance_segment_test.cpp index 85a7a03ad41..acdfe0d2695 100644 --- a/AABB_tree/test/AABB_tree/aabb_naive_vs_tree_distance_segment_test.cpp +++ b/AABB_tree/test/AABB_tree/aabb_naive_vs_tree_distance_segment_test.cpp @@ -33,7 +33,6 @@ #include #include -#include #include #include diff --git a/AABB_tree/test/AABB_tree/aabb_naive_vs_tree_distance_triangle_test.cpp b/AABB_tree/test/AABB_tree/aabb_naive_vs_tree_distance_triangle_test.cpp index 803f7397b50..04f6bbfbb8c 100644 --- a/AABB_tree/test/AABB_tree/aabb_naive_vs_tree_distance_triangle_test.cpp +++ b/AABB_tree/test/AABB_tree/aabb_naive_vs_tree_distance_triangle_test.cpp @@ -35,7 +35,6 @@ #include #include -#include #include #include diff --git a/AABB_tree/test/AABB_tree/aabb_naive_vs_tree_triangle_test.cpp b/AABB_tree/test/AABB_tree/aabb_naive_vs_tree_triangle_test.cpp index 22340369dc9..0035f0b5259 100644 --- a/AABB_tree/test/AABB_tree/aabb_naive_vs_tree_triangle_test.cpp +++ b/AABB_tree/test/AABB_tree/aabb_naive_vs_tree_triangle_test.cpp @@ -34,7 +34,6 @@ #include #include -#include #include #include diff --git a/AABB_tree/test/AABB_tree/aabb_test_ray_intersection.cpp b/AABB_tree/test/AABB_tree/aabb_test_ray_intersection.cpp index 90f6902f679..549f925fb9e 100644 --- a/AABB_tree/test/AABB_tree/aabb_test_ray_intersection.cpp +++ b/AABB_tree/test/AABB_tree/aabb_test_ray_intersection.cpp @@ -12,7 +12,6 @@ #include #include -#include #include #include #include diff --git a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d_1.h b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d_1.h index 905b6d8eba2..c60e509abea 100644 --- a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d_1.h +++ b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d_1.h @@ -201,7 +201,9 @@ public: }; // class Algebraic_real_traits - + + struct Construct_algebraic_real_1; + // Functors of Algebraic_kernel_d_1 struct Solve_1 { public: diff --git a/Alpha_shapes_2/include/CGAL/internal/Lazy_alpha_nt_2.h b/Alpha_shapes_2/include/CGAL/internal/Lazy_alpha_nt_2.h index eaafd27f71d..83eeac727d5 100644 --- a/Alpha_shapes_2/include/CGAL/internal/Lazy_alpha_nt_2.h +++ b/Alpha_shapes_2/include/CGAL/internal/Lazy_alpha_nt_2.h @@ -45,7 +45,7 @@ namespace internal { // template < class Input_traits, class Kernel_approx, class Kernel_exact, class Weighted_tag > -class Is_traits_point_convertible +class Is_traits_point_convertible_2 { typedef typename Kernel_traits::Kernel Kernel_input; @@ -60,7 +60,7 @@ public: }; template < class Input_traits, class Kernel_approx, class Kernel_exact > -class Is_traits_point_convertible { typedef typename Kernel_traits::Kernel Kernel_input; @@ -157,7 +157,7 @@ class Lazy_alpha_nt_2 Approx_point to_approx(const Input_point& wp) const { // The traits class' Point_2 must be convertible using the Cartesian converter - CGAL_static_assertion((Is_traits_point_convertible< + CGAL_static_assertion((Is_traits_point_convertible_2< Input_traits, Kernel_approx, Kernel_exact, Weighted_tag>::value)); To_approx converter; @@ -167,7 +167,7 @@ class Lazy_alpha_nt_2 Exact_point to_exact(const Input_point& wp) const { // The traits class' Point_2 must be convertible using the Cartesian converter - CGAL_static_assertion((Is_traits_point_convertible< + CGAL_static_assertion((Is_traits_point_convertible_2< Input_traits, Kernel_approx, Kernel_exact, Weighted_tag>::value)); To_exact converter; diff --git a/Alpha_shapes_3/include/CGAL/internal/Lazy_alpha_nt_3.h b/Alpha_shapes_3/include/CGAL/internal/Lazy_alpha_nt_3.h index 8a4effe1a4b..97005825a79 100644 --- a/Alpha_shapes_3/include/CGAL/internal/Lazy_alpha_nt_3.h +++ b/Alpha_shapes_3/include/CGAL/internal/Lazy_alpha_nt_3.h @@ -45,7 +45,7 @@ namespace internal{ // template < class Input_traits, class Kernel_approx, class Kernel_exact, class Weighted_tag > -class Is_traits_point_convertible +class Is_traits_point_convertible_3 { typedef typename Kernel_traits::Kernel Kernel_input; @@ -60,7 +60,7 @@ public: }; template < class Input_traits, class Kernel_approx, class Kernel_exact > -class Is_traits_point_convertible { typedef typename Kernel_traits::Kernel Kernel_input; @@ -148,7 +148,7 @@ class Lazy_alpha_nt_3{ Approx_point to_approx(const Input_point& wp) const { // The traits class' Point_3 must be convertible using the Cartesian converter - CGAL_static_assertion((Is_traits_point_convertible< + CGAL_static_assertion((Is_traits_point_convertible_3< Input_traits, Kernel_approx, Kernel_exact, Weighted_tag>::value)); To_approx converter; @@ -158,7 +158,7 @@ class Lazy_alpha_nt_3{ Exact_point to_exact(const Input_point& wp) const { // The traits class' Point_3 must be convertible using the Cartesian converter - CGAL_static_assertion((Is_traits_point_convertible< + CGAL_static_assertion((Is_traits_point_convertible_3< Input_traits, Kernel_approx, Kernel_exact, Weighted_tag>::value)); To_exact converter; diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_circle_segment_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_circle_segment_traits_2.h index bdbd53d20a4..6a45bafe0c9 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_circle_segment_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_circle_segment_traits_2.h @@ -31,6 +31,7 @@ * The header file for the Arr_circle_segment_traits_2 class. */ +#include #include #include #include @@ -84,7 +85,11 @@ public: /*! Get the next curve index. */ static unsigned int get_index () { - static unsigned int index = 0; +#ifdef CGAL_NO_ATOMIC + static unsigned int index; +#else + static CGAL::cpp11::atomic index; +#endif return (++index); } diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_conic_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_conic_traits_2.h index 69e7e29b755..d84c112662c 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_conic_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_conic_traits_2.h @@ -31,6 +31,7 @@ * The conic traits-class for the arrangement package. */ +#include #include #include #include @@ -114,7 +115,11 @@ public: /*! Get the next conic index. */ static unsigned int get_index () { - static unsigned int index = 0; +#ifdef CGAL_NO_ATOMIC + static unsigned int index; +#else + static CGAL::cpp11::atomic index; +#endif return (++index); } diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_polycurve_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_polycurve_traits_2.h index 34c7931e702..ef0d6e94e4c 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_polycurve_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_polycurve_traits_2.h @@ -163,6 +163,9 @@ public: /// \name Construction functors(based on the subcurve traits). //@{ +#ifndef DOXYGEN_RUNNING + class Push_back_2; +#endif /*! \class * A functor that divides an arc into x-monotone arcs. That are, arcs that * do not cross the identification arc. diff --git a/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_overlay_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_overlay_traits_2.h index 1ef10dcf3c9..6df312301ba 100644 --- a/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_overlay_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_overlay_traits_2.h @@ -347,6 +347,9 @@ public: return os; } + class Parameter_space_in_x_2; + class Parameter_space_in_y_2; + /*! A functor that computes intersections between x-monotone curves. */ class Intersect_2 { protected: diff --git a/BGL/examples/BGL_LCC/copy_lcc.cpp b/BGL/examples/BGL_LCC/copy_lcc.cpp index c2ec115e12d..0def9a59b53 100644 --- a/BGL/examples/BGL_LCC/copy_lcc.cpp +++ b/BGL/examples/BGL_LCC/copy_lcc.cpp @@ -2,8 +2,6 @@ #include #include -#include -#include #include diff --git a/BGL/examples/BGL_LCC/transform_iterator_lcc.cpp b/BGL/examples/BGL_LCC/transform_iterator_lcc.cpp index 1268d4d9d77..40f1f884fee 100644 --- a/BGL/examples/BGL_LCC/transform_iterator_lcc.cpp +++ b/BGL/examples/BGL_LCC/transform_iterator_lcc.cpp @@ -1,5 +1,4 @@ #include -#include #include #include #include diff --git a/BGL/include/CGAL/boost/graph/graph_traits_OpenMesh.h b/BGL/include/CGAL/boost/graph/graph_traits_OpenMesh.h index bf95392fdb4..71baeb00990 100644 --- a/BGL/include/CGAL/boost/graph/graph_traits_OpenMesh.h +++ b/BGL/include/CGAL/boost/graph/graph_traits_OpenMesh.h @@ -34,7 +34,6 @@ #include #include - #if defined(BOOST_MSVC) # pragma warning(push) # pragma warning(disable:4267) diff --git a/BGL/test/BGL/borders.cpp b/BGL/test/BGL/borders.cpp index e2c848718f9..4df20313137 100644 --- a/BGL/test/BGL/borders.cpp +++ b/BGL/test/BGL/borders.cpp @@ -2,8 +2,6 @@ #include #include -#include -#include #include #include #include diff --git a/BGL/test/BGL/graph_concept_Dual.cpp b/BGL/test/BGL/graph_concept_Dual.cpp index fc01a31ecae..6c29ab3fd57 100644 --- a/BGL/test/BGL/graph_concept_Dual.cpp +++ b/BGL/test/BGL/graph_concept_Dual.cpp @@ -1,5 +1,5 @@ #include -#include +#include #include #include diff --git a/BGL/test/BGL/graph_concept_Gwdwg_Surface_mesh.cpp b/BGL/test/BGL/graph_concept_Gwdwg_Surface_mesh.cpp index 02a5b6cf1e7..3e8c442a57e 100644 --- a/BGL/test/BGL/graph_concept_Gwdwg_Surface_mesh.cpp +++ b/BGL/test/BGL/graph_concept_Gwdwg_Surface_mesh.cpp @@ -1,5 +1,4 @@ -#include -#include +#include #include #include diff --git a/BGL/test/BGL/graph_concept_Polyhedron_3.cpp b/BGL/test/BGL/graph_concept_Polyhedron_3.cpp index 00b9bd6103d..8a0d04458b1 100644 --- a/BGL/test/BGL/graph_concept_Polyhedron_3.cpp +++ b/BGL/test/BGL/graph_concept_Polyhedron_3.cpp @@ -1,5 +1,5 @@ #include -#include +#include #include #include diff --git a/BGL/test/BGL/graph_concept_Seam_mesh_Surface_mesh.cpp b/BGL/test/BGL/graph_concept_Seam_mesh_Surface_mesh.cpp index 459b0709e92..222b683cd5f 100644 --- a/BGL/test/BGL/graph_concept_Seam_mesh_Surface_mesh.cpp +++ b/BGL/test/BGL/graph_concept_Seam_mesh_Surface_mesh.cpp @@ -1,5 +1,4 @@ -#include -#include +#include #include #include diff --git a/BGL/test/BGL/graph_concept_Surface_mesh.cpp b/BGL/test/BGL/graph_concept_Surface_mesh.cpp index dfeef4b03b6..1466fab4634 100644 --- a/BGL/test/BGL/graph_concept_Surface_mesh.cpp +++ b/BGL/test/BGL/graph_concept_Surface_mesh.cpp @@ -1,5 +1,4 @@ -#include -#include +#include #include #include diff --git a/BGL/test/BGL/test_Manifold_face_removal.cpp b/BGL/test/BGL/test_Manifold_face_removal.cpp index adc6f3bbe49..454a0d94ac5 100644 --- a/BGL/test/BGL/test_Manifold_face_removal.cpp +++ b/BGL/test/BGL/test_Manifold_face_removal.cpp @@ -1,6 +1,5 @@ #include #include -#include #include #include diff --git a/BGL/test/BGL/test_bgl_read_write.cpp b/BGL/test/BGL/test_bgl_read_write.cpp index bbbb1c4dbb7..894b772a610 100644 --- a/BGL/test/BGL/test_bgl_read_write.cpp +++ b/BGL/test/BGL/test_bgl_read_write.cpp @@ -1,10 +1,9 @@ #include #include -#include #include -#include +#include #include #include diff --git a/BGL/test/BGL/test_circulator.cpp b/BGL/test/BGL/test_circulator.cpp index ce2b1a7fb8e..8cd8ac1e6ec 100644 --- a/BGL/test/BGL/test_circulator.cpp +++ b/BGL/test/BGL/test_circulator.cpp @@ -1,7 +1,5 @@ #include #include -#include -#include #include #include diff --git a/CGAL_Core/include/CGAL/CORE/CoreDefs.h b/CGAL_Core/include/CGAL/CORE/CoreDefs.h index 90759e086fa..499d7b1dbf3 100644 --- a/CGAL_Core/include/CGAL/CORE/CoreDefs.h +++ b/CGAL_Core/include/CGAL/CORE/CoreDefs.h @@ -41,6 +41,7 @@ #include #include +#include #ifdef CGAL_HEADER_ONLY @@ -340,4 +341,6 @@ inline void setPositionalFormat(std::ostream& o = std::cout) { #include #endif // CGAL_HEADER_ONLY +#include + #endif // _CORE_COREDEFS_H_ diff --git a/Cartesian_kernel/include/CGAL/Cartesian/function_objects.h b/Cartesian_kernel/include/CGAL/Cartesian/function_objects.h index 600fe1af0d5..a53b3fe55a8 100644 --- a/Cartesian_kernel/include/CGAL/Cartesian/function_objects.h +++ b/Cartesian_kernel/include/CGAL/Cartesian/function_objects.h @@ -3181,6 +3181,7 @@ namespace CartesianKernelFunctors { typedef typename K::Line_3 Line_3; typedef typename K::Triangle_3 Triangle_3; typedef typename K::Segment_3 Segment_3; + typedef typename K::Ray_3 Ray_3; typedef typename K::FT FT; public: typedef Point_3 result_type; @@ -3215,6 +3216,10 @@ namespace CartesianKernelFunctors { Point_3 operator()( const Segment_3& s, const Point_3& p ) const { return CommonKernelFunctors::Construct_projected_point_3()(p,s,K()); } + + Point_3 + operator()( const Ray_3& r, const Point_3& p ) const + { return CommonKernelFunctors::Construct_projected_point_3()(p,r,K()); } }; template diff --git a/Classification/include/CGAL/Classification/Point_set_feature_generator.h b/Classification/include/CGAL/Classification/Point_set_feature_generator.h index 04c476d6548..b74ef1d16f6 100644 --- a/Classification/include/CGAL/Classification/Point_set_feature_generator.h +++ b/Classification/include/CGAL/Classification/Point_set_feature_generator.h @@ -496,7 +496,7 @@ private: launch_feature_computation (new Feature_adder_verticality (this, normal_map, 0)); } - void generate_normal_based_features(const CGAL::Default_property_map&) + void generate_normal_based_features(const CGAL::Constant_property_map&) { generate_multiscale_feature_variant_0 (); } @@ -544,7 +544,7 @@ private: 2, 25.f * float(i), 12.5f)); } - void generate_color_based_features(const CGAL::Default_property_map&) + void generate_color_based_features(const CGAL::Constant_property_map&) { } @@ -581,7 +581,7 @@ private: launch_feature_computation (new Feature_adder_echo (this, echo_map, i)); } - void generate_echo_based_features(const CGAL::Default_property_map&) + void generate_echo_based_features(const CGAL::Constant_property_map&) { } @@ -615,10 +615,10 @@ private: } template - Default_property_map + Constant_property_map get_parameter (const Default&) { - return Default_property_map(); + return Constant_property_map(); } template diff --git a/Convex_hull_3/test/Convex_hull_3/test_halfspace_intersections.cpp b/Convex_hull_3/test/Convex_hull_3/test_halfspace_intersections.cpp index 7e0e00e9345..385236066d9 100644 --- a/Convex_hull_3/test/Convex_hull_3/test_halfspace_intersections.cpp +++ b/Convex_hull_3/test/Convex_hull_3/test_halfspace_intersections.cpp @@ -5,7 +5,7 @@ #include #include -#include +#include #include diff --git a/Generalized_map/test/Generalized_map/Generalized_map_2_test.h b/Generalized_map/test/Generalized_map/Generalized_map_2_test.h index ff1ae0576f0..15274a323fa 100644 --- a/Generalized_map/test/Generalized_map/Generalized_map_2_test.h +++ b/Generalized_map/test/Generalized_map/Generalized_map_2_test.h @@ -24,9 +24,7 @@ #include #include -#include #include -#include using namespace std; diff --git a/Generator/test/Generator/generic_random_test.cpp b/Generator/test/Generator/generic_random_test.cpp index d1c79fd0197..152071b8c44 100644 --- a/Generator/test/Generator/generic_random_test.cpp +++ b/Generator/test/Generator/generic_random_test.cpp @@ -18,7 +18,6 @@ #include #include -#include #include #include diff --git a/GraphicsView/demo/Triangulation_2/TriangulationCircumcircle.h b/GraphicsView/demo/Triangulation_2/TriangulationCircumcircle.h index 59589cf1815..dad56939a61 100644 --- a/GraphicsView/demo/Triangulation_2/TriangulationCircumcircle.h +++ b/GraphicsView/demo/Triangulation_2/TriangulationCircumcircle.h @@ -33,6 +33,7 @@ protected: private: DT * dt; + typedef typename DT::Vertex_handle Vertex_handle; typename DT::Vertex_handle hint; typename DT::Face_handle fh; QGraphicsScene *scene_; @@ -89,8 +90,12 @@ TriangulationCircumcircle::mouseMoveEvent(QGraphicsSceneMouseEvent *event) { if(dt->dimension() != 2){ circle->hide(); + hint = Vertex_handle(); return; } + if (hint == Vertex_handle()){ + hint = dt->infinite_vertex(); + } typename T::Point p = typename T::Point(event->scenePos().x(), event->scenePos().y()); fh = dt->locate(p, hint->face()); hint = fh->vertex(0); diff --git a/Hash_map/test/Hash_map/Hash.cpp b/Hash_map/test/Hash_map/Hash.cpp index fd558a42659..77e2c5c3b2f 100644 --- a/Hash_map/test/Hash_map/Hash.cpp +++ b/Hash_map/test/Hash_map/Hash.cpp @@ -9,7 +9,6 @@ #include #include #include -#include #include #include #include diff --git a/Homogeneous_kernel/include/CGAL/Homogeneous/function_objects.h b/Homogeneous_kernel/include/CGAL/Homogeneous/function_objects.h index 080bd4929ea..40c2e3b2f65 100644 --- a/Homogeneous_kernel/include/CGAL/Homogeneous/function_objects.h +++ b/Homogeneous_kernel/include/CGAL/Homogeneous/function_objects.h @@ -3315,6 +3315,7 @@ namespace HomogeneousKernelFunctors { typedef typename K::Vector_3 Vector_3; typedef typename K::Triangle_3 Triangle_3; typedef typename K::Segment_3 Segment_3; + typedef typename K::Ray_3 Ray_3; public: typedef Point_3 result_type; @@ -3351,6 +3352,10 @@ namespace HomogeneousKernelFunctors { Point_3 operator()( const Segment_3& s, const Point_3& p ) const { return CommonKernelFunctors::Construct_projected_point_3()(p,s,K()); } + + Point_3 + operator()( const Ray_3& r, const Point_3& p ) const + { return CommonKernelFunctors::Construct_projected_point_3()(p,r,K()); } }; template diff --git a/Installation/include/CGAL/disable_warnings.h b/Installation/include/CGAL/disable_warnings.h index 6c180ab3514..587492aad9c 100644 --- a/Installation/include/CGAL/disable_warnings.h +++ b/Installation/include/CGAL/disable_warnings.h @@ -34,6 +34,7 @@ # pragma warning(disable: 4714) // function marked as __forceinline not inlined # pragma warning(disable: 4800) // forcing value to bool 'true' or 'false' (performance warning) # pragma warning(disable: 4913) // user defined binary operator ',' exists but no overload could convert all operands, default built-in binary operator ',' used +# pragma warning(disable: 4834) // discarding return value of function with 'nodiscard' attribute #endif diff --git a/Intersections_3/test/Intersections_3/test_intersections_3.cpp b/Intersections_3/test/Intersections_3/test_intersections_3.cpp index 1390d6a407b..4a4ec69e0bf 100644 --- a/Intersections_3/test/Intersections_3/test_intersections_3.cpp +++ b/Intersections_3/test/Intersections_3/test_intersections_3.cpp @@ -9,7 +9,7 @@ #include #include -#include +#include #include #include diff --git a/Kernel_23/doc/Kernel_23/Concepts/FunctionObjectConcepts.h b/Kernel_23/doc/Kernel_23/Concepts/FunctionObjectConcepts.h index 2cb3db219c7..ef058713356 100644 --- a/Kernel_23/doc/Kernel_23/Concepts/FunctionObjectConcepts.h +++ b/Kernel_23/doc/Kernel_23/Concepts/FunctionObjectConcepts.h @@ -5976,6 +5976,12 @@ public: */ Kernel::Point_3 operator()(const Kernel::Segment_3& s, const Kernel::Point_3& p); + + /*! + returns the point of `r` that is the closest to `p`. + */ + Kernel::Point_3 operator()(const Kernel::Ray_3& r, + const Kernel::Point_3& p); /*! returns the point of `t` that is the closest to `p`. diff --git a/Kernel_23/include/CGAL/Kernel/function_objects.h b/Kernel_23/include/CGAL/Kernel/function_objects.h index 0ff0de5764b..ec0681875e5 100644 --- a/Kernel_23/include/CGAL/Kernel/function_objects.h +++ b/Kernel_23/include/CGAL/Kernel/function_objects.h @@ -2855,10 +2855,7 @@ namespace CommonKernelFunctors { const typename K::Segment_3& segment, const K& k) { - typedef typename K::Point_3 Point_3; - typename K::Construct_projected_point_3 projection = - k.construct_projected_point_3_object(); typename K::Is_degenerate_3 is_degenerate = k.is_degenerate_3_object(); typename K::Construct_vertex_3 vertex = @@ -2867,20 +2864,27 @@ namespace CommonKernelFunctors { if(is_degenerate(segment)) return vertex(segment, 0); - // Project query on segment supporting line - const Point_3 proj = projection(segment.supporting_line(), query); - - Point_3 closest_point_on_segment; - bool inside = is_inside_segment_3(proj,segment,closest_point_on_segment,k); - + if(segment.to_vector() * (query-segment.source()) <= 0) + return segment.source(); + if(segment.to_vector() * (query-segment.target()) >= 0) + return segment.target(); // If proj is inside segment, returns it - if ( inside ) - return proj; - - // Else returns the constructed point - return closest_point_on_segment; + return k.construct_projected_point_3_object()(segment.supporting_line(), query); } + typename K::Point_3 + operator()(const typename K::Point_3& query, + const typename K::Ray_3& ray, + const K& k) + { + if ( ray.to_vector() * (query-ray.source()) <= 0) + return ray.source(); + else + { + return k.construct_projected_point_3_object()(ray.supporting_line(), query); + } + } + // code for operator for plane and point is defined in // CGAL/Cartesian/function_objects.h and CGAL/Homogeneous/function_objects.h }; diff --git a/Kernel_23/test/Kernel_23/include/CGAL/_test_fct_constructions_3.h b/Kernel_23/test/Kernel_23/include/CGAL/_test_fct_constructions_3.h index 2c3ff790b01..72326c520a7 100644 --- a/Kernel_23/test/Kernel_23/include/CGAL/_test_fct_constructions_3.h +++ b/Kernel_23/test/Kernel_23/include/CGAL/_test_fct_constructions_3.h @@ -26,12 +26,13 @@ template bool -_test_fct_constructions_3(const R&) +_test_fct_constructions_3(const R& r) { typedef typename R::RT RT; typedef typename R::Point_3 Point; typedef typename R::Weighted_point_3 Weighted_point; typedef typename R::Segment_3 Segment; + typedef typename R::Ray_3 Ray; typedef typename R::Plane_3 Plane; typedef typename R::Vector_3 Vector; typedef typename R::Triangle_3 Triangle; @@ -129,6 +130,12 @@ _test_fct_constructions_3(const R&) assert( CGAL::weighted_circumcenter( wp000_b, wp100_b, wp010_b) == wp000_b); assert( CGAL::weighted_circumcenter( wp000_b, wp100_b, wp010_b, wp001_b) == wp000_b); + // projected point + Ray ray(Point(0,0,0), Point (1,1,0)); + Segment s(Point(0,0,0), Point (1,1,0)); + assert( r.construct_projected_point_3_object()(ray, Point(-1,0,0)) == Point(0,0,0)); + assert( r.construct_projected_point_3_object()(s, Point(-1,0,0)) == Point(0,0,0)); + assert( r.construct_projected_point_3_object()(s, Point(2,0,0)) == Point(1,1,0)); return true; } diff --git a/Mesh_2/doc/Mesh_2/Mesh_2.txt b/Mesh_2/doc/Mesh_2/Mesh_2.txt index 7d6484b1f90..64012f69e97 100644 --- a/Mesh_2/doc/Mesh_2/Mesh_2.txt +++ b/Mesh_2/doc/Mesh_2/Mesh_2.txt @@ -98,11 +98,7 @@ printed. See \cgalFigureRef{Conformexampleconform} \cgalFigureBegin{Conformexampleconform,example-conform-Delaunay-Gabriel.png} -Initial triangulation and the corresponding Delaunay and Gabriel triangulation. -\cgalFigureEnd - -\cgalFigureBegin{ConformexampleconformDelaunay,example-conform-Delaunay.png} -The corresponding conforming Delaunay triangulation. +From left to right: Initial Delaunay triangulation, the corresponding conforming Delaunay, and the corresponding Gabriel triangulation. \cgalFigureEnd \section secMesh_2_meshes Meshes diff --git a/Mesh_2/doc/Mesh_2/fig/example-conform-Delaunay.png b/Mesh_2/doc/Mesh_2/fig/example-conform-Delaunay.png deleted file mode 100644 index 580db6feb3d..00000000000 Binary files a/Mesh_2/doc/Mesh_2/fig/example-conform-Delaunay.png and /dev/null differ diff --git a/Mesh_3/examples/Mesh_3/mesh_hybrid_mesh_domain.cpp b/Mesh_3/examples/Mesh_3/mesh_hybrid_mesh_domain.cpp index 72a191e696e..eb6cec632ac 100644 --- a/Mesh_3/examples/Mesh_3/mesh_hybrid_mesh_domain.cpp +++ b/Mesh_3/examples/Mesh_3/mesh_hybrid_mesh_domain.cpp @@ -7,13 +7,11 @@ #include #include +#include #include #include #include -// IO -#include - // Ouput #include diff --git a/Mesh_3/test/Mesh_3/test_c3t3.cpp b/Mesh_3/test/Mesh_3/test_c3t3.cpp index 1c296cbb970..83eae437387 100644 --- a/Mesh_3/test/Mesh_3/test_c3t3.cpp +++ b/Mesh_3/test/Mesh_3/test_c3t3.cpp @@ -32,7 +32,7 @@ // IO #include #include -#include +#include #include #include diff --git a/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/AABB_traits_2.h b/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/AABB_traits_2.h index 7088fd1b83d..1eb99e9e72a 100644 --- a/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/AABB_traits_2.h +++ b/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/AABB_traits_2.h @@ -102,11 +102,11 @@ public: if (bbox.xmax()-bbox.xmin() >= bbox.ymax()-bbox.ymin()) { - std::nth_element(first, middle, beyond, less_x); // sort along x + std::nth_element(first, middle, beyond, AABB_traits_2::less_x); // sort along x } else { - std::nth_element(first, middle, beyond, less_y); // sort along y + std::nth_element(first, middle, beyond, AABB_traits_2::less_y); // sort along y } } }; diff --git a/Nef_3/examples/Nef_3/handling_double_coordinates.cpp b/Nef_3/examples/Nef_3/handling_double_coordinates.cpp index 7f194599b50..9a570ef0599 100644 --- a/Nef_3/examples/Nef_3/handling_double_coordinates.cpp +++ b/Nef_3/examples/Nef_3/handling_double_coordinates.cpp @@ -1,6 +1,5 @@ #include #include -#include #include #include diff --git a/Nef_3/examples/Nef_3/interface_polyhedron.cpp b/Nef_3/examples/Nef_3/interface_polyhedron.cpp index ab6b36ca7a6..6cd007b3a0b 100644 --- a/Nef_3/examples/Nef_3/interface_polyhedron.cpp +++ b/Nef_3/examples/Nef_3/interface_polyhedron.cpp @@ -1,7 +1,6 @@ #include #include #include -#include #include #include #include diff --git a/Nef_3/examples/Nef_3/offIO.cpp b/Nef_3/examples/Nef_3/offIO.cpp index 94f69d586fc..ffc0fa34b24 100644 --- a/Nef_3/examples/Nef_3/offIO.cpp +++ b/Nef_3/examples/Nef_3/offIO.cpp @@ -1,7 +1,6 @@ #include #include #include -#include #include #include #include diff --git a/Nef_3/test/Nef_3/nef_union_error_llvm.cpp b/Nef_3/test/Nef_3/nef_union_error_llvm.cpp index bca9fec0243..d0683165374 100644 --- a/Nef_3/test/Nef_3/nef_union_error_llvm.cpp +++ b/Nef_3/test/Nef_3/nef_union_error_llvm.cpp @@ -1,6 +1,5 @@ #include #include -#include #include #include #include diff --git a/Partition_2/include/CGAL/Partition_2/Rotation_tree_2.h b/Partition_2/include/CGAL/Partition_2/Rotation_tree_2.h index f9228e36d0b..a149a137f06 100644 --- a/Partition_2/include/CGAL/Partition_2/Rotation_tree_2.h +++ b/Partition_2/include/CGAL/Partition_2/Rotation_tree_2.h @@ -36,6 +36,8 @@ #ifndef CGAL_ROTATION_TREE_H #define CGAL_ROTATION_TREE_H +#include + #include @@ -178,6 +180,8 @@ private: #include +#include + #endif // CGAL_ROTATION_TREE_H // For the Emacs editor: diff --git a/Point_set_processing_3/include/CGAL/mst_orient_normals.h b/Point_set_processing_3/include/CGAL/mst_orient_normals.h index b46e626e91f..f441f209de9 100644 --- a/Point_set_processing_3/include/CGAL/mst_orient_normals.h +++ b/Point_set_processing_3/include/CGAL/mst_orient_normals.h @@ -501,11 +501,12 @@ create_mst_graph( /** \ingroup PkgPointSetProcessingAlgorithms Orients the normals of the range of `points` using the propagation - of a seed orientation through a minimum spanning tree of the Riemannian graph [Hoppe92]. - + of a seed orientation through a minimum spanning tree of the Riemannian graph. This method modifies the order of input points so as to pack all sucessfully oriented points first, and returns an iterator over the first point with an unoriented normal (see erase-remove idiom). For this reason it should not be called on sorted containers. + It is based on \cgalCite{cgal:hddms-srup-92}. + \warning This function may fail when Boost version 1.54 is used, because of the following bug: https://svn.boost.org/trac/boost/ticket/9012 diff --git a/Poisson_surface_reconstruction_3/examples/Poisson_surface_reconstruction_3/poisson_reconstruction_example.cpp b/Poisson_surface_reconstruction_3/examples/Poisson_surface_reconstruction_3/poisson_reconstruction_example.cpp index e45b6ea9ee0..31f49252ad2 100644 --- a/Poisson_surface_reconstruction_3/examples/Poisson_surface_reconstruction_3/poisson_reconstruction_example.cpp +++ b/Poisson_surface_reconstruction_3/examples/Poisson_surface_reconstruction_3/poisson_reconstruction_example.cpp @@ -1,7 +1,6 @@ #include #include #include -#include #include #include #include diff --git a/Poisson_surface_reconstruction_3/examples/Poisson_surface_reconstruction_3/poisson_reconstruction_function.cpp b/Poisson_surface_reconstruction_3/examples/Poisson_surface_reconstruction_3/poisson_reconstruction_function.cpp index 704c88bb495..8ddef0b3273 100644 --- a/Poisson_surface_reconstruction_3/examples/Poisson_surface_reconstruction_3/poisson_reconstruction_function.cpp +++ b/Poisson_surface_reconstruction_3/examples/Poisson_surface_reconstruction_3/poisson_reconstruction_function.cpp @@ -1,6 +1,5 @@ #include #include -#include #include #include diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/fairing_test.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/fairing_test.cpp index dfbff75feb6..b3eff2f4aab 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/fairing_test.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/fairing_test.cpp @@ -1,8 +1,6 @@ #include #include #include -#include -#include #include diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/orient_polygon_soup_test.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/orient_polygon_soup_test.cpp index a763b6b8128..eabf7f14538 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/orient_polygon_soup_test.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/orient_polygon_soup_test.cpp @@ -2,13 +2,11 @@ #include #include -#include #include #include #include -#include #include #include diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/point_inside_polyhedron_boundary_test.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/point_inside_polyhedron_boundary_test.cpp index e4ce28785ae..d2081853d35 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/point_inside_polyhedron_boundary_test.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/point_inside_polyhedron_boundary_test.cpp @@ -2,8 +2,6 @@ #include #include #include -#include -#include #include "point_inside_helpers.h" diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/polygon_mesh_slicer_test.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/polygon_mesh_slicer_test.cpp index 6d6820b9288..a08b5302938 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/polygon_mesh_slicer_test.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/polygon_mesh_slicer_test.cpp @@ -4,11 +4,8 @@ #include #ifdef USE_SURFACE_MESH #include -#include #else #include -#include -#include #endif #include diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/surface_intersection_sm_poly.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/surface_intersection_sm_poly.cpp index c362b06b61e..154b56bd6d4 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/surface_intersection_sm_poly.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/surface_intersection_sm_poly.cpp @@ -2,8 +2,6 @@ #include #include #include -#include -#include #include #include #include diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_corefinement_bool_op.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_corefinement_bool_op.cpp index 6b1d61c739d..29501f793ea 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_corefinement_bool_op.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_corefinement_bool_op.cpp @@ -7,7 +7,6 @@ #include #include -#include #include #include diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_detect_features.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_detect_features.cpp index 2e88a149549..7199a5f4e58 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_detect_features.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_detect_features.cpp @@ -49,6 +49,7 @@ int main(int argc, char* argv[]) = PMP::sharp_edges_segmentation(mesh, 90, eif, pid, PMP::parameters::first_index(1) .vertex_incident_patches_map(vip)); + CGAL_assertion(number_of_patches == 6); PMP::detect_sharp_edges(mesh, 90, eif); @@ -89,3 +90,4 @@ int main(int argc, char* argv[]) return 0; } + diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_is_polygon_soup_a_polygon_mesh.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_is_polygon_soup_a_polygon_mesh.cpp index 06197919b57..edfc4802110 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_is_polygon_soup_a_polygon_mesh.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_is_polygon_soup_a_polygon_mesh.cpp @@ -1,5 +1,4 @@ #include -#include #include #include diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_pmp_remove_border_edge.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_pmp_remove_border_edge.cpp index 2fa0e4cef27..80d530789da 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_pmp_remove_border_edge.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_pmp_remove_border_edge.cpp @@ -1,8 +1,6 @@ #include #include #include -#include -#include #include #include diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_stitching.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_stitching.cpp index 14fc54b703e..21b85e5fb4b 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_stitching.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_stitching.cpp @@ -1,8 +1,6 @@ #include #include #include -#include -#include #include #include diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/triangulate_faces_test.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/triangulate_faces_test.cpp index 33d2e65f3c4..a301cb0e2d6 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/triangulate_faces_test.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/triangulate_faces_test.cpp @@ -1,7 +1,6 @@ #include #include #include -#include #include #include diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/triangulate_hole_Polyhedron_3_no_delaunay_test.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/triangulate_hole_Polyhedron_3_no_delaunay_test.cpp index e3c7b62d9b6..213cfa95b5a 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/triangulate_hole_Polyhedron_3_no_delaunay_test.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/triangulate_hole_Polyhedron_3_no_delaunay_test.cpp @@ -5,13 +5,8 @@ #include #ifdef POLY #include -#include -#include -#include #else #include -#include -#include #endif #include diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/triangulate_hole_Polyhedron_3_test.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/triangulate_hole_Polyhedron_3_test.cpp index 4003415e2e4..afff2c7acba 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/triangulate_hole_Polyhedron_3_test.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/triangulate_hole_Polyhedron_3_test.cpp @@ -3,13 +3,8 @@ #include #ifdef POLY #include -#include -#include -#include #else #include -#include -#include #endif #include diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/triangulate_hole_polyline_test.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/triangulate_hole_polyline_test.cpp index c6998746633..16cfe36105a 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/triangulate_hole_polyline_test.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/triangulate_hole_polyline_test.cpp @@ -9,9 +9,6 @@ #include #include -#include -#include -#include #include diff --git a/Polyhedron/examples/Polyhedron/polyhedron_prog_cut_cube.cpp b/Polyhedron/examples/Polyhedron/polyhedron_prog_cut_cube.cpp index 74dcfff094a..c244c1c1c74 100644 --- a/Polyhedron/examples/Polyhedron/polyhedron_prog_cut_cube.cpp +++ b/Polyhedron/examples/Polyhedron/polyhedron_prog_cut_cube.cpp @@ -1,5 +1,4 @@ #include -#include #include #include #include diff --git a/Polyhedron/examples/Polyhedron/polyhedron_prog_subdiv.cpp b/Polyhedron/examples/Polyhedron/polyhedron_prog_subdiv.cpp index 009841ff69a..bf1104c3c3b 100644 --- a/Polyhedron/examples/Polyhedron/polyhedron_prog_subdiv.cpp +++ b/Polyhedron/examples/Polyhedron/polyhedron_prog_subdiv.cpp @@ -1,6 +1,5 @@ #include #include -#include #include #include #include diff --git a/Polyhedron/examples/Polyhedron/polyhedron_prog_subdiv_with_boundary.cpp b/Polyhedron/examples/Polyhedron/polyhedron_prog_subdiv_with_boundary.cpp index 90ead40b2ff..744440fd123 100644 --- a/Polyhedron/examples/Polyhedron/polyhedron_prog_subdiv_with_boundary.cpp +++ b/Polyhedron/examples/Polyhedron/polyhedron_prog_subdiv_with_boundary.cpp @@ -1,6 +1,5 @@ #include #include -#include #include #include #include diff --git a/Polyhedron/examples/Polyhedron/polyhedron_self_intersection.cpp b/Polyhedron/examples/Polyhedron/polyhedron_self_intersection.cpp index 5bea593eaa1..a70ee0fd0e2 100644 --- a/Polyhedron/examples/Polyhedron/polyhedron_self_intersection.cpp +++ b/Polyhedron/examples/Polyhedron/polyhedron_self_intersection.cpp @@ -1,6 +1,5 @@ #include #include -#include #include #include #include diff --git a/Polyhedron/test/Polyhedron/bug_polyhedron_incremental_builder_3.cpp b/Polyhedron/test/Polyhedron/bug_polyhedron_incremental_builder_3.cpp index 17ead1f548f..df51270184b 100644 --- a/Polyhedron/test/Polyhedron/bug_polyhedron_incremental_builder_3.cpp +++ b/Polyhedron/test/Polyhedron/bug_polyhedron_incremental_builder_3.cpp @@ -1,7 +1,6 @@ #include #include #include -#include #include typedef CGAL::Simple_cartesian K; diff --git a/Polyhedron_IO/examples/Polyhedron_IO/off2stl.cpp b/Polyhedron_IO/examples/Polyhedron_IO/off2stl.cpp index 71e2c2b7723..0419f5e218e 100644 --- a/Polyhedron_IO/examples/Polyhedron_IO/off2stl.cpp +++ b/Polyhedron_IO/examples/Polyhedron_IO/off2stl.cpp @@ -2,7 +2,6 @@ #include #include -#include #include #include #include diff --git a/Polyhedron_IO/examples/Polyhedron_IO/polyhedron2vrml.cpp b/Polyhedron_IO/examples/Polyhedron_IO/polyhedron2vrml.cpp index a2466f354e1..f6431fd9b57 100644 --- a/Polyhedron_IO/examples/Polyhedron_IO/polyhedron2vrml.cpp +++ b/Polyhedron_IO/examples/Polyhedron_IO/polyhedron2vrml.cpp @@ -1,6 +1,5 @@ #include #include -#include #include #include diff --git a/Polyhedron_IO/examples/Polyhedron_IO/polyhedron_copy.cpp b/Polyhedron_IO/examples/Polyhedron_IO/polyhedron_copy.cpp index b192f224fe5..f93cd531db5 100644 --- a/Polyhedron_IO/examples/Polyhedron_IO/polyhedron_copy.cpp +++ b/Polyhedron_IO/examples/Polyhedron_IO/polyhedron_copy.cpp @@ -2,7 +2,6 @@ #include #include -#include #include #include #include diff --git a/Polyhedron_IO/test/Polyhedron_IO/test_polyhedron_io.cpp b/Polyhedron_IO/test/Polyhedron_IO/test_polyhedron_io.cpp index 181062a7990..f737d11d10f 100644 --- a/Polyhedron_IO/test/Polyhedron_IO/test_polyhedron_io.cpp +++ b/Polyhedron_IO/test/Polyhedron_IO/test_polyhedron_io.cpp @@ -32,7 +32,6 @@ // disabled compilers. #ifndef CGAL_USE_POLYHEDRON_DESIGN_ONE -#include #include #include #include diff --git a/Polynomial/include/CGAL/Polynomial_traits_d.h b/Polynomial/include/CGAL/Polynomial_traits_d.h index 42c96b05c15..1c8b7f827af 100644 --- a/Polynomial/include/CGAL/Polynomial_traits_d.h +++ b/Polynomial/include/CGAL/Polynomial_traits_d.h @@ -729,7 +729,9 @@ public: return gic( gc( p, exponent ), ev ); }; }; - + + typedef CGAL::internal::Monomial_representation Monomial_representation; + // Swap variable x_i with x_j struct Swap { typedef Polynomial_d result_type; @@ -1537,10 +1539,6 @@ struct Construct_innermost_coefficient_const_iterator_range }; - typedef - CGAL::internal::Monomial_representation - Monomial_representation; - // returns the Exponten_vector of the innermost leading coefficient struct Degree_vector{ typedef Exponent_vector result_type; diff --git a/Property_map/include/CGAL/property_map.h b/Property_map/include/CGAL/property_map.h index e8612db429c..6280b0c653f 100644 --- a/Property_map/include/CGAL/property_map.h +++ b/Property_map/include/CGAL/property_map.h @@ -440,20 +440,29 @@ make_property_map(const std::vector& v) } /// \ingroup PkgProperty_map -/// Property map that only returns the default value type -/// \cgalModels `ReadablePropertyMap` -template -struct Default_property_map{ +/// Property map that returns a fixed value. +/// Note that this value is chosen when the map is constructed and cannot +/// be changed afterwards. Specifically, the free function `put()` does nothing. +/// +/// \cgalModels `ReadWritePropertyMap` +template +struct Constant_property_map +{ const ValueType default_value; - - typedef typename InputIterator::value_type key_type; - typedef boost::readable_property_map_tag category; - Default_property_map(const ValueType& default_value = ValueType()) : default_value (default_value) { } - - /// Free function to use a get the value from an iterator using Input_iterator_property_map. - inline friend ValueType - get (const Default_property_map&, const key_type&){ return ValueType(); } + typedef KeyType key_type; + typedef ValueType value_type; + typedef boost::read_write_property_map_tag category; + + Constant_property_map(const value_type& default_value = value_type()) : default_value (default_value) { } + + /// Free function that returns `pm.default_value`. + inline friend value_type + get (const Constant_property_map& pm, const key_type&){ return pm.default_value; } + + /// Free function that does nothing. + inline friend void + put (const Constant_property_map&, const key_type&, const value_type&) { } }; /// \ingroup PkgProperty_map diff --git a/Ridges_3/examples/Ridges_3/PolyhedralSurf.h b/Ridges_3/examples/Ridges_3/PolyhedralSurf.h index 13f555e1cf8..44a36ea7fd5 100644 --- a/Ridges_3/examples/Ridges_3/PolyhedralSurf.h +++ b/Ridges_3/examples/Ridges_3/PolyhedralSurf.h @@ -3,9 +3,6 @@ #include #include -#include -#include -#include #include #include #include diff --git a/Ridges_3/test/Ridges_3/PolyhedralSurf.h b/Ridges_3/test/Ridges_3/PolyhedralSurf.h index 13f555e1cf8..44a36ea7fd5 100644 --- a/Ridges_3/test/Ridges_3/PolyhedralSurf.h +++ b/Ridges_3/test/Ridges_3/PolyhedralSurf.h @@ -3,9 +3,6 @@ #include #include -#include -#include -#include #include #include #include diff --git a/STL_Extension/include/CGAL/internal/boost/array_binary_tree.hpp b/STL_Extension/include/CGAL/internal/boost/array_binary_tree.hpp index ed646779099..e2d5ebd2f66 100644 --- a/STL_Extension/include/CGAL/internal/boost/array_binary_tree.hpp +++ b/STL_Extension/include/CGAL/internal/boost/array_binary_tree.hpp @@ -20,7 +20,7 @@ #ifndef CGAL_INTERNAL_ARRAY_BINARY_TREE_HPP #define CGAL_INTERNAL_ARRAY_BINARY_TREE_HPP -#include +#include #include #include @@ -52,12 +52,12 @@ public: struct children_type { struct iterator - : ::boost::iterator { // replace with iterator_adaptor implementation -JGS + typedef std::forward_iterator_tag Category; + typedef ArrayBinaryTreeNode value_type; + typedef size_type difference_type; + typedef ArrayBinaryTreeNode* Pointer; + typedef ArrayBinaryTreeNode& Reference; inline iterator() : i(0), n(0) { } inline iterator(const iterator& x) : r(x.r), i(x.i), n(x.n), id(x.id) { } diff --git a/SearchStructures/include/CGAL/Segment_tree_d.h b/SearchStructures/include/CGAL/Segment_tree_d.h index 1c0b6dafe39..625050bd1c5 100644 --- a/SearchStructures/include/CGAL/Segment_tree_d.h +++ b/SearchStructures/include/CGAL/Segment_tree_d.h @@ -107,7 +107,8 @@ protected: typedef Segment_tree_node Segment_tree_node_t; typedef Segment_tree_node *link_type; - std::allocator alloc; + typedef std::allocator allocator_type; + allocator_type alloc; C_Interface m_interface; bool is_built; @@ -197,7 +198,11 @@ protected: { Segment_tree_node_t node(l,r,kl,kr); Segment_tree_node_t* node_ptr = alloc.allocate(1); +#ifdef CGAL_CXX11 + std::allocator_traits::construct(alloc, node_ptr, node); +#else alloc.construct(node_ptr, node); +#endif return node_ptr; } @@ -205,7 +210,11 @@ protected: { Segment_tree_node_t node(kl,kr); Segment_tree_node_t* node_ptr = alloc.allocate(1); +#ifdef CGAL_CXX11 + std::allocator_traits::construct(alloc, node_ptr, node); +#else alloc.construct(node_ptr, node); +#endif return node_ptr; } @@ -213,7 +222,11 @@ protected: { Segment_tree_node_t node; Segment_tree_node_t* node_ptr = alloc.allocate(1); +#ifdef CGAL_CXX11 + std::allocator_traits::construct(alloc, node_ptr, node); +#else alloc.construct(node_ptr, node); +#endif return node_ptr; } @@ -298,7 +311,11 @@ protected: void delete_node(Segment_tree_node_t* node_ptr) { +#ifdef CGAL_CXX11 + std::allocator_traits::destroy(alloc, node_ptr); +#else alloc.destroy(node_ptr); +#endif alloc.deallocate(node_ptr,1); } diff --git a/Skin_surface_3/test/Skin_surface_3/degenerate_test.cpp b/Skin_surface_3/test/Skin_surface_3/degenerate_test.cpp index fbc6f377732..59638cf9178 100644 --- a/Skin_surface_3/test/Skin_surface_3/degenerate_test.cpp +++ b/Skin_surface_3/test/Skin_surface_3/degenerate_test.cpp @@ -3,7 +3,6 @@ #include #include #include -#include #include #include diff --git a/Skin_surface_3/test/Skin_surface_3/degenerate_test_exact.cpp b/Skin_surface_3/test/Skin_surface_3/degenerate_test_exact.cpp index 86590e8a36b..ca7fd696be9 100644 --- a/Skin_surface_3/test/Skin_surface_3/degenerate_test_exact.cpp +++ b/Skin_surface_3/test/Skin_surface_3/degenerate_test_exact.cpp @@ -2,7 +2,6 @@ #include #include #include -#include #include #include diff --git a/Surface_mesh_deformation/test/Surface_mesh_deformation/Cactus_deformation_session.cpp b/Surface_mesh_deformation/test/Surface_mesh_deformation/Cactus_deformation_session.cpp index 23d96f039f7..383b5cd2f66 100644 --- a/Surface_mesh_deformation/test/Surface_mesh_deformation/Cactus_deformation_session.cpp +++ b/Surface_mesh_deformation/test/Surface_mesh_deformation/Cactus_deformation_session.cpp @@ -5,7 +5,6 @@ #include #include #include -#include #include #include diff --git a/Surface_mesh_deformation/test/Surface_mesh_deformation/Cactus_performance_test.cpp b/Surface_mesh_deformation/test/Surface_mesh_deformation/Cactus_performance_test.cpp index 081c53030b2..6045e1cf4a7 100644 --- a/Surface_mesh_deformation/test/Surface_mesh_deformation/Cactus_performance_test.cpp +++ b/Surface_mesh_deformation/test/Surface_mesh_deformation/Cactus_performance_test.cpp @@ -6,7 +6,6 @@ #include #include -#include #include #include diff --git a/Surface_mesh_deformation/test/Surface_mesh_deformation/Surface_mesh_deformation_test_commons.h b/Surface_mesh_deformation/test/Surface_mesh_deformation/Surface_mesh_deformation_test_commons.h index 2650b7dbc91..b165ac6c6b2 100644 --- a/Surface_mesh_deformation/test/Surface_mesh_deformation/Surface_mesh_deformation_test_commons.h +++ b/Surface_mesh_deformation/test/Surface_mesh_deformation/Surface_mesh_deformation_test_commons.h @@ -1,6 +1,4 @@ -#include -#include - +#include #include #include #include diff --git a/Surface_mesh_deformation/test/Surface_mesh_deformation/Symmetry_test.cpp b/Surface_mesh_deformation/test/Surface_mesh_deformation/Symmetry_test.cpp index 6dddddf8008..cea63122867 100644 --- a/Surface_mesh_deformation/test/Surface_mesh_deformation/Symmetry_test.cpp +++ b/Surface_mesh_deformation/test/Surface_mesh_deformation/Symmetry_test.cpp @@ -8,7 +8,6 @@ #include #include #include -#include typedef CGAL::Simple_cartesian Kernel; typedef CGAL::Polyhedron_3 Polyhedron; diff --git a/Surface_mesh_segmentation/test/Surface_mesh_segmentation/Fast_sdf_calculation_test.cpp b/Surface_mesh_segmentation/test/Surface_mesh_segmentation/Fast_sdf_calculation_test.cpp index 3b1c54d11cd..4f6c44ed6c9 100644 --- a/Surface_mesh_segmentation/test/Surface_mesh_segmentation/Fast_sdf_calculation_test.cpp +++ b/Surface_mesh_segmentation/test/Surface_mesh_segmentation/Fast_sdf_calculation_test.cpp @@ -1,6 +1,5 @@ #include -#include -#include +#include #include #include diff --git a/Surface_mesh_segmentation/test/Surface_mesh_segmentation/Filters_test.cpp b/Surface_mesh_segmentation/test/Surface_mesh_segmentation/Filters_test.cpp index 831ce389984..e4897a0dd6c 100644 --- a/Surface_mesh_segmentation/test/Surface_mesh_segmentation/Filters_test.cpp +++ b/Surface_mesh_segmentation/test/Surface_mesh_segmentation/Filters_test.cpp @@ -1,8 +1,7 @@ #include #include -#include -#include +#include #include #include diff --git a/Surface_mesh_segmentation/test/Surface_mesh_segmentation/mesh_segmentation_test.cpp b/Surface_mesh_segmentation/test/Surface_mesh_segmentation/mesh_segmentation_test.cpp index ebd3e4019c6..2afde8999d9 100644 --- a/Surface_mesh_segmentation/test/Surface_mesh_segmentation/mesh_segmentation_test.cpp +++ b/Surface_mesh_segmentation/test/Surface_mesh_segmentation/mesh_segmentation_test.cpp @@ -1,6 +1,5 @@ #include -#include -#include +#include #include diff --git a/Surface_mesh_segmentation/test/Surface_mesh_segmentation/mesh_segmentation_test_using_boost.cpp b/Surface_mesh_segmentation/test/Surface_mesh_segmentation/mesh_segmentation_test_using_boost.cpp index 992203e964d..eaf9f8b1f81 100644 --- a/Surface_mesh_segmentation/test/Surface_mesh_segmentation/mesh_segmentation_test_using_boost.cpp +++ b/Surface_mesh_segmentation/test/Surface_mesh_segmentation/mesh_segmentation_test_using_boost.cpp @@ -1,8 +1,7 @@ #define CGAL_DO_NOT_USE_BOYKOV_KOLMOGOROV_MAXFLOW_SOFTWARE #include -#include -#include +#include #include diff --git a/Surface_mesh_segmentation/test/Surface_mesh_segmentation/test_compute_sdf_values_and_segment_exact_rational.cpp b/Surface_mesh_segmentation/test/Surface_mesh_segmentation/test_compute_sdf_values_and_segment_exact_rational.cpp index 80703d42805..36b3989e902 100644 --- a/Surface_mesh_segmentation/test/Surface_mesh_segmentation/test_compute_sdf_values_and_segment_exact_rational.cpp +++ b/Surface_mesh_segmentation/test/Surface_mesh_segmentation/test_compute_sdf_values_and_segment_exact_rational.cpp @@ -1,8 +1,7 @@ #include #include -#include +#include -#include #include #include diff --git a/Surface_mesh_shortest_path/test/Surface_mesh_shortest_path/Surface_mesh_shortest_path_test_1.cpp b/Surface_mesh_shortest_path/test/Surface_mesh_shortest_path/Surface_mesh_shortest_path_test_1.cpp index f5af383014e..457c5f951a0 100644 --- a/Surface_mesh_shortest_path/test/Surface_mesh_shortest_path/Surface_mesh_shortest_path_test_1.cpp +++ b/Surface_mesh_shortest_path/test/Surface_mesh_shortest_path/Surface_mesh_shortest_path_test_1.cpp @@ -9,9 +9,7 @@ #include #include -#include -#include #include #include diff --git a/Surface_mesh_shortest_path/test/Surface_mesh_shortest_path/Surface_mesh_shortest_path_test_2.cpp b/Surface_mesh_shortest_path/test/Surface_mesh_shortest_path/Surface_mesh_shortest_path_test_2.cpp index 8b5493eea39..5a895e77fc4 100644 --- a/Surface_mesh_shortest_path/test/Surface_mesh_shortest_path/Surface_mesh_shortest_path_test_2.cpp +++ b/Surface_mesh_shortest_path/test/Surface_mesh_shortest_path/Surface_mesh_shortest_path_test_2.cpp @@ -11,11 +11,8 @@ #include #include -#include #include -#include -#include #include #include diff --git a/Surface_mesh_shortest_path/test/Surface_mesh_shortest_path/Surface_mesh_shortest_path_test_3.cpp b/Surface_mesh_shortest_path/test/Surface_mesh_shortest_path/Surface_mesh_shortest_path_test_3.cpp index eb81aa1df7d..96af1eed022 100644 --- a/Surface_mesh_shortest_path/test/Surface_mesh_shortest_path/Surface_mesh_shortest_path_test_3.cpp +++ b/Surface_mesh_shortest_path/test/Surface_mesh_shortest_path/Surface_mesh_shortest_path_test_3.cpp @@ -2,12 +2,10 @@ #include #include -#include #include #include -#include #include #include diff --git a/Surface_mesh_shortest_path/test/Surface_mesh_shortest_path/Surface_mesh_shortest_path_test_4.cpp b/Surface_mesh_shortest_path/test/Surface_mesh_shortest_path/Surface_mesh_shortest_path_test_4.cpp index 87020292d7c..c6ab30e0fef 100644 --- a/Surface_mesh_shortest_path/test/Surface_mesh_shortest_path/Surface_mesh_shortest_path_test_4.cpp +++ b/Surface_mesh_shortest_path/test/Surface_mesh_shortest_path/Surface_mesh_shortest_path_test_4.cpp @@ -2,12 +2,10 @@ #include #include -#include #include #include -#include #include #include diff --git a/Surface_mesh_shortest_path/test/Surface_mesh_shortest_path/Surface_mesh_shortest_path_test_5.cpp b/Surface_mesh_shortest_path/test/Surface_mesh_shortest_path/Surface_mesh_shortest_path_test_5.cpp index a00e74fa66e..aea9ead5bd8 100644 --- a/Surface_mesh_shortest_path/test/Surface_mesh_shortest_path/Surface_mesh_shortest_path_test_5.cpp +++ b/Surface_mesh_shortest_path/test/Surface_mesh_shortest_path/Surface_mesh_shortest_path_test_5.cpp @@ -10,9 +10,7 @@ #include #include -#include -#include #include #include diff --git a/Surface_mesh_shortest_path/test/Surface_mesh_shortest_path/Surface_mesh_shortest_path_traits_test.cpp b/Surface_mesh_shortest_path/test/Surface_mesh_shortest_path/Surface_mesh_shortest_path_traits_test.cpp index d3e575d5e68..04744d1b3ac 100644 --- a/Surface_mesh_shortest_path/test/Surface_mesh_shortest_path/Surface_mesh_shortest_path_traits_test.cpp +++ b/Surface_mesh_shortest_path/test/Surface_mesh_shortest_path/Surface_mesh_shortest_path_traits_test.cpp @@ -2,14 +2,12 @@ #include #include -#include #include #include #include #include -#include #include #include diff --git a/Surface_mesh_shortest_path/test/Surface_mesh_shortest_path/TestMesh.cpp b/Surface_mesh_shortest_path/test/Surface_mesh_shortest_path/TestMesh.cpp index 2edc30b901c..89f57b80826 100644 --- a/Surface_mesh_shortest_path/test/Surface_mesh_shortest_path/TestMesh.cpp +++ b/Surface_mesh_shortest_path/test/Surface_mesh_shortest_path/TestMesh.cpp @@ -20,14 +20,12 @@ #include #include -#include #include #include #include #include -#include #include #include diff --git a/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_bounded_normal_change.cpp b/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_bounded_normal_change.cpp index 037d75c4c27..f46b2bfb847 100644 --- a/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_bounded_normal_change.cpp +++ b/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_bounded_normal_change.cpp @@ -2,8 +2,6 @@ #include #include #include -#include -#include // Simplification function #include diff --git a/Surface_mesh_simplification/test/Surface_mesh_simplification/basics.h b/Surface_mesh_simplification/test/Surface_mesh_simplification/basics.h index 6f3b1ae089d..0dc8b196a84 100644 --- a/Surface_mesh_simplification/test/Surface_mesh_simplification/basics.h +++ b/Surface_mesh_simplification/test/Surface_mesh_simplification/basics.h @@ -27,7 +27,6 @@ void Surface_simplification_external_trace( std::string s ) #include #include -#include #include #include @@ -35,7 +34,6 @@ void Surface_simplification_external_trace( std::string s ) #include #include -#include #include #include diff --git a/Surface_mesh_simplification/test/Surface_mesh_simplification/edge_collapse_topology.cpp b/Surface_mesh_simplification/test/Surface_mesh_simplification/edge_collapse_topology.cpp index e6c6d3d18ac..2501ead0069 100644 --- a/Surface_mesh_simplification/test/Surface_mesh_simplification/edge_collapse_topology.cpp +++ b/Surface_mesh_simplification/test/Surface_mesh_simplification/edge_collapse_topology.cpp @@ -3,9 +3,6 @@ #include #include -#include - -#include // Simplification function #include diff --git a/Surface_mesh_skeletonization/test/Surface_mesh_skeletonization/MCF_Skeleton_test.cpp b/Surface_mesh_skeletonization/test/Surface_mesh_skeletonization/MCF_Skeleton_test.cpp index 4467550ae86..63deba74b69 100644 --- a/Surface_mesh_skeletonization/test/Surface_mesh_skeletonization/MCF_Skeleton_test.cpp +++ b/Surface_mesh_skeletonization/test/Surface_mesh_skeletonization/MCF_Skeleton_test.cpp @@ -1,10 +1,8 @@ #include #include -#include #include #include #include -#include #include diff --git a/Surface_mesh_skeletonization/test/Surface_mesh_skeletonization/skeleton_connectivity_test.cpp b/Surface_mesh_skeletonization/test/Surface_mesh_skeletonization/skeleton_connectivity_test.cpp index 0fab0e9af72..4409100ab7e 100644 --- a/Surface_mesh_skeletonization/test/Surface_mesh_skeletonization/skeleton_connectivity_test.cpp +++ b/Surface_mesh_skeletonization/test/Surface_mesh_skeletonization/skeleton_connectivity_test.cpp @@ -1,10 +1,8 @@ #include #include -#include #include #include #include -#include #include