From 3830e126843165d10257914495538aa20a8aa71c Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Tue, 24 May 2011 12:48:07 +0000 Subject: [PATCH 1/6] Add a check that isfinite is *not* a macro, otherwise #error --- Installation/config/testfiles/CGAL_CFG_NO_CPP0X_ISFINITE.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Installation/config/testfiles/CGAL_CFG_NO_CPP0X_ISFINITE.cpp b/Installation/config/testfiles/CGAL_CFG_NO_CPP0X_ISFINITE.cpp index 871e7db876c..1f495cd0170 100644 --- a/Installation/config/testfiles/CGAL_CFG_NO_CPP0X_ISFINITE.cpp +++ b/Installation/config/testfiles/CGAL_CFG_NO_CPP0X_ISFINITE.cpp @@ -24,6 +24,11 @@ #include #include +#ifdef isfinite +# error isfinite cannot be a macro if one want to use C++0x std::isfinite +// On Intel Compiler 12, isfinite is a macro in :-( +#endif + template < typename T > void use(T) {} From 1ad7bac55b842340bb631256651542d544986741 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Tue, 24 May 2011 13:03:39 +0000 Subject: [PATCH 2/6] change license from QPL to LGPL --- STL_Extension/include/CGAL/Modifiable_priority_queue.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/STL_Extension/include/CGAL/Modifiable_priority_queue.h b/STL_Extension/include/CGAL/Modifiable_priority_queue.h index c0bd11df492..c11f695e4b7 100644 --- a/STL_Extension/include/CGAL/Modifiable_priority_queue.h +++ b/STL_Extension/include/CGAL/Modifiable_priority_queue.h @@ -1,8 +1,9 @@ -// Copyright (c) 2006 GeometryFactory (France). All rights reserved. +// Copyright (c) 2006-2011 GeometryFactory (France). All rights reserved. // -// This file is part of CGAL (www.cgal.org); you may redistribute it under -// the terms of the Q Public License version 1.0. -// See the file LICENSE.QPL distributed with CGAL. +// This file is part of CGAL (www.cgal.org); you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public License as +// published by the Free Software Foundation; version 2.1 of the License. +// See the file LICENSE.LGPL distributed with CGAL. // // Licensees holding a valid commercial license may use this file in // accordance with the commercial license agreement provided with the software. From 3b92a391002572075ae58be7488a4d96001daf76 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Tue, 24 May 2011 14:06:13 +0000 Subject: [PATCH 3/6] Fix a bug in the branch build: put CGAL_INSTALLATION_PACKAGE_DIR in CGALConfig.cmake If CGAL_INSTALLATION_PACKAGE_DIR is not set in CGALConfig.cmake, then when one compile a demo/example on Windows, Installation/auxiliary (where precompiled version of some third party libraries should be put) cannot be found and used. That replaces the old CMake variable CGAL_SOURCE_DIRECTORY (before branch-build). --- Installation/cmake/modules/CGALConfig_binary.cmake.in | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Installation/cmake/modules/CGALConfig_binary.cmake.in b/Installation/cmake/modules/CGALConfig_binary.cmake.in index ee2a7c4c1e3..ac6f6725760 100644 --- a/Installation/cmake/modules/CGALConfig_binary.cmake.in +++ b/Installation/cmake/modules/CGALConfig_binary.cmake.in @@ -8,6 +8,9 @@ set(CGAL_CONFIG_LOADED TRUE) +set(CGAL_INSTALLATION_PACKAGE_DIR "@CGAL_INSTALLATION_PACKAGE_DIR@") +set(CGAL_CORE_PACKAGE_DIR "@CGAL_CORE_PACKAGE_DIR@") + set(CGAL_MAJOR_VERSION "@CGAL_MAJOR_VERSION@" ) set(CGAL_MINOR_VERSION "@CGAL_MINOR_VERSION@" ) set(CGAL_BUILD_VERSION "@CGAL_BUILD_VERSION@" ) From cdb9ca77ff7f18f8754205c44f402a77dc34f07e Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Tue, 24 May 2011 14:24:44 +0000 Subject: [PATCH 4/6] Backport a fix for Windows from the Mesh_3-with-protecting ball branch --- Polyhedron/demo/Polyhedron/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Polyhedron/demo/Polyhedron/CMakeLists.txt b/Polyhedron/demo/Polyhedron/CMakeLists.txt index 517ae78daef..a3636982302 100644 --- a/Polyhedron/demo/Polyhedron/CMakeLists.txt +++ b/Polyhedron/demo/Polyhedron/CMakeLists.txt @@ -203,7 +203,7 @@ if(CGAL_Qt4_FOUND AND QT4_FOUND AND OPENGL_FOUND AND QGLVIEWER_FOUND) else() set(other_sources ${ARGN_TAIL}) endif() - qt4_generate_moc( "${CMAKE_CURRENT_SOURCE_DIR}/${plugin_implementation_base_name}.cpp" ${plugin_implementation_base_name}.moc ) + qt4_generate_moc( ${plugin_implementation_base_name}.cpp "${CMAKE_CURRENT_BINARY_DIR}/${moc_file_name}" ) add_file_dependencies( ${plugin_implementation_base_name}.moc "${CMAKE_CURRENT_SOURCE_DIR}/${plugin_implementation_base_name}.cpp" ) add_library(${plugin_name} MODULE ${option} ${plugin_implementation_base_name}.moc ${plugin_implementation_base_name}.cpp ${other_sources}) From 4934cff531dce56bf88b3ca8fc08264f9b0317b4 Mon Sep 17 00:00:00 2001 From: Olivier Devillers Date: Wed, 25 May 2011 08:39:09 +0000 Subject: [PATCH 5/6] add Point_dimension_d functor in kerneld and spatial_sorting_d traits class --- Kernel_d/doc_tex/Kernel_d_ref/Kernel.tex | 2 ++ Kernel_d/doc_tex/Kernel_d_ref/main.tex | 1 + Kernel_d/include/CGAL/Cartesian_d.h | 3 +++ Kernel_d/include/CGAL/Homogeneous_d.h | 3 +++ .../include/CGAL/Kernel_d/function_objectsCd.h | 13 +++++++++++++ .../include/CGAL/Kernel_d/function_objectsHd.h | 14 ++++++++++++++ .../Spatial_sorting_ref/SpatialSortingTraits_d.tex | 7 +++++++ .../include/CGAL/Hilbert_sort_median_d.h | 2 +- .../include/CGAL/Hilbert_sort_middle_d.h | 7 +++---- .../test/Spatial_sorting/test_hilbert.cpp | 2 +- 10 files changed, 48 insertions(+), 6 deletions(-) diff --git a/Kernel_d/doc_tex/Kernel_d_ref/Kernel.tex b/Kernel_d/doc_tex/Kernel_d_ref/Kernel.tex index 76d051ce30a..00116ee1002 100644 --- a/Kernel_d/doc_tex/Kernel_d_ref/Kernel.tex +++ b/Kernel_d/doc_tex/Kernel_d_ref/Kernel.tex @@ -126,6 +126,8 @@ replacing operators, especially for equality testing. \ccGlue \ccNestedType{Orthogonal_vector_d}{} \ccGlue +\ccNestedType{Point_dimension_d}{} +\ccGlue \ccNestedType{Point_of_sphere_d}{} \ccGlue \ccNestedType{Point_to_vector_d}{} diff --git a/Kernel_d/doc_tex/Kernel_d_ref/main.tex b/Kernel_d/doc_tex/Kernel_d_ref/main.tex index 7e481266a81..9ad0cc9a3d7 100644 --- a/Kernel_d/doc_tex/Kernel_d_ref/main.tex +++ b/Kernel_d/doc_tex/Kernel_d_ref/main.tex @@ -97,6 +97,7 @@ \input{Kernel_d_ref/Kernel_Orientation_d.tex} \input{Kernel_d_ref/Kernel_Oriented_side_d.tex} \input{Kernel_d_ref/Kernel_Orthogonal_vector_d.tex} +\input{Kernel_d_ref/Kernel_Point_dimension_d.tex} \input{Kernel_d_ref/Kernel_Point_of_sphere_d.tex} \input{Kernel_d_ref/Kernel_Point_to_vector_d.tex} \input{Kernel_d_ref/Kernel_Project_along_d_axis_d.tex} diff --git a/Kernel_d/include/CGAL/Cartesian_d.h b/Kernel_d/include/CGAL/Cartesian_d.h index e0dda612003..52097613d40 100644 --- a/Kernel_d/include/CGAL/Cartesian_d.h +++ b/Kernel_d/include/CGAL/Cartesian_d.h @@ -252,6 +252,7 @@ public: typedef Lt_from_compare Less_lexicographically_d; typedef Le_from_compare Less_or_equal_lexicographically_d; typedef Less_coordinateCd Less_coordinate_d; + typedef Point_dimensionCd Point_dimension_d; typedef Eq_from_method Equal_d; typedef Center_of_sphereCd Center_of_sphere_d; typedef Contained_in_linear_hullCd Contained_in_linear_hull_d; @@ -261,6 +262,8 @@ public: Compute_coordinate_d compute_coordinate_d_object() const { return Compute_coordinate_d(); } + Point_dimension_d point_dimension_d_object() const + { return Point_dimension_d(); } Less_coordinate_d less_coordinate_d_object() const { return Less_coordinate_d(); } Lift_to_paraboloid_d lift_to_paraboloid_d_object() const diff --git a/Kernel_d/include/CGAL/Homogeneous_d.h b/Kernel_d/include/CGAL/Homogeneous_d.h index e9fd5fddefe..d968a94c4f5 100644 --- a/Kernel_d/include/CGAL/Homogeneous_d.h +++ b/Kernel_d/include/CGAL/Homogeneous_d.h @@ -254,6 +254,7 @@ public: typedef Lt_from_compare Less_lexicographically_d; typedef Le_from_compare Less_or_equal_lexicographically_d; typedef Less_coordinateHd Less_coordinate_d; + typedef Point_dimensionHd Point_dimension_d; typedef Eq_from_method Equal_d; typedef Center_of_sphereHd Center_of_sphere_d; typedef Contained_in_linear_hullHd Contained_in_linear_hull_d; @@ -263,6 +264,8 @@ public: Compute_coordinate_d compute_coordinate_d_object() const { return Compute_coordinate_d(); } + Point_dimension_d point_dimension_d_object() const + { return Point_dimension_d(); } Less_coordinate_d less_coordinate_d_object() const { return Less_coordinate_d(); } Lift_to_paraboloid_d lift_to_paraboloid_d_object() const diff --git a/Kernel_d/include/CGAL/Kernel_d/function_objectsCd.h b/Kernel_d/include/CGAL/Kernel_d/function_objectsCd.h index 4884db18529..9eb7f1224b7 100644 --- a/Kernel_d/include/CGAL/Kernel_d/function_objectsCd.h +++ b/Kernel_d/include/CGAL/Kernel_d/function_objectsCd.h @@ -49,6 +49,19 @@ class Compute_coordinateCd { } }; +template +class Point_dimensionCd { + typedef typename K::FT FT; + typedef typename K::Point_d Point_d; + public: + typedef int result_type; + const result_type + operator()(const Point_d& p) const + { + return p.dimension(); + } +}; + template class Less_coordinateCd { typedef typename K::FT FT; diff --git a/Kernel_d/include/CGAL/Kernel_d/function_objectsHd.h b/Kernel_d/include/CGAL/Kernel_d/function_objectsHd.h index c34995abb12..0d692f48997 100644 --- a/Kernel_d/include/CGAL/Kernel_d/function_objectsHd.h +++ b/Kernel_d/include/CGAL/Kernel_d/function_objectsHd.h @@ -48,6 +48,19 @@ class Compute_coordinateHd { } }; +template +class Point_dimensionHd { + typedef typename K::RT RT; + typedef typename K::Point_d Point_d; + public: + typedef int result_type; + const result_type + operator()(const Point_d& p) const + { + return p.dimension(); + } +}; + template class Less_coordinateHd { typedef typename K::RT RT; @@ -62,6 +75,7 @@ class Less_coordinateHd { } }; + template struct Lift_to_paraboloidHd { typedef typename R::Point_d Point_d; diff --git a/Spatial_sorting/doc_tex/Spatial_sorting_ref/SpatialSortingTraits_d.tex b/Spatial_sorting/doc_tex/Spatial_sorting_ref/SpatialSortingTraits_d.tex index 06659646395..7b8039ba26f 100644 --- a/Spatial_sorting/doc_tex/Spatial_sorting_ref/SpatialSortingTraits_d.tex +++ b/Spatial_sorting/doc_tex/Spatial_sorting_ref/SpatialSortingTraits_d.tex @@ -22,6 +22,12 @@ functions and functors. } +\ccNestedType{Point_dimension_d}% + {Functor object type returning the dimension of a \ccc{Point_d}. + Must provide + \ccc{int operator()(Point_d p)} returning the dimension of $p$. + } + \ccNestedType{Compute_coordinate_d}% {Functor object type returning the coordinates of a \ccc{Point_d}. Must provide @@ -54,6 +60,7 @@ The following member functions to create instances of the above predicate object types must exist. \setlength\parskip{0mm} +\ccMemberFunction{Point_dimension_d point_dimension_d_object(); }{} \ccMemberFunction{Compute_coordinate_d compute_coordinate_d_object(); }{} \ccMemberFunction{Less_coordinate_d less_coordinate_d_object(); }{} diff --git a/Spatial_sorting/include/CGAL/Hilbert_sort_median_d.h b/Spatial_sorting/include/CGAL/Hilbert_sort_median_d.h index e879ddba8c5..80a2bcb3c3d 100644 --- a/Spatial_sorting/include/CGAL/Hilbert_sort_median_d.h +++ b/Spatial_sorting/include/CGAL/Hilbert_sort_median_d.h @@ -139,7 +139,7 @@ public: template void operator() (RandomAccessIterator begin, RandomAccessIterator end) const { - _dimension = begin->dimension(); + _dimension = _k.point_dimension_d_object()(*begin); two_to_dim = 1; Starting_position start(_dimension); diff --git a/Spatial_sorting/include/CGAL/Hilbert_sort_middle_d.h b/Spatial_sorting/include/CGAL/Hilbert_sort_middle_d.h index 1a6cb9f3e78..76c7dc3a0f2 100644 --- a/Spatial_sorting/include/CGAL/Hilbert_sort_middle_d.h +++ b/Spatial_sorting/include/CGAL/Hilbert_sort_middle_d.h @@ -146,17 +146,16 @@ public: template void operator() (RandomAccessIterator begin, RandomAccessIterator end) const { - K k; - _dimension = begin->dimension(); + _dimension = _k.point_dimension_d_object()(*begin); two_to_dim = 1; Starting_position start(_dimension); Corner min(_dimension),max(_dimension); for (int i=0; i<_dimension; ++i) - min[i]=max[i]=to_double( k.compute_coordinate_d_object() (*begin,i) ); + min[i]=max[i]=to_double( _k.compute_coordinate_d_object() (*begin,i) ); for(RandomAccessIterator it=begin+1; it max[i]) max[i] = d; } diff --git a/Spatial_sorting/test/Spatial_sorting/test_hilbert.cpp b/Spatial_sorting/test/Spatial_sorting/test_hilbert.cpp index a174c694faf..23ab7cbfb5d 100644 --- a/Spatial_sorting/test/Spatial_sorting/test_hilbert.cpp +++ b/Spatial_sorting/test/Spatial_sorting/test_hilbert.cpp @@ -297,7 +297,7 @@ int main () std::cout << " Sorting points... " << std::flush; cost.reset();cost.start(); - CGAL::hilbert_sort (v.begin(), v.end()); + CGAL::hilbert_sort (v.begin(), v.end(),CGAL::Hilbert_sort_median_policy()); cost.stop(); std::cout << "done in "< Date: Wed, 25 May 2011 08:43:59 +0000 Subject: [PATCH 6/6] add Point_dimension_d functor in kerneld and spatial_sorting_d traits class --- .gitattributes | 1 + .../doc_tex/Kernel_d_ref/Kernel_Point_dimension_d.tex | 9 +++++++++ 2 files changed, 10 insertions(+) create mode 100644 Kernel_d/doc_tex/Kernel_d_ref/Kernel_Point_dimension_d.tex diff --git a/.gitattributes b/.gitattributes index 07e64ed84fb..365a622e607 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1717,6 +1717,7 @@ Kernel_23/test/Kernel_23/CMakeLists.txt -text Kernel_d/doc_tex/Kernel_d/hypercube.png -text Kernel_d/doc_tex/Kernel_d_ref/Kernel_Compute_coordinate_d.tex -text Kernel_d/doc_tex/Kernel_d_ref/Kernel_Less_coordinate_d.tex -text +Kernel_d/doc_tex/Kernel_d_ref/Kernel_Point_dimension_d.tex -text Kernel_d/include/CGAL/Kernel_d/Cartesian_const_iterator_d.h -text Kernel_d/test/Kernel_d/Linear_algebra-test.cmd eol=lf Kinetic_data_structures/demo/Kinetic_data_structures/data/after002 -text diff --git a/Kernel_d/doc_tex/Kernel_d_ref/Kernel_Point_dimension_d.tex b/Kernel_d/doc_tex/Kernel_d_ref/Kernel_Point_dimension_d.tex new file mode 100644 index 00000000000..29b8b175a19 --- /dev/null +++ b/Kernel_d/doc_tex/Kernel_d_ref/Kernel_Point_dimension_d.tex @@ -0,0 +1,9 @@ +\begin{ccRefFunctionObjectConcept}{Kernel::Point_dimension_d} +A model for this must provide: + +\ccCreationVariable{fo} + +\ccMemberFunction{ int operator()(const Kernel::Point_d& + p);} {returns the dimension of $p$} + +\end{ccRefFunctionObjectConcept}