diff --git a/.gitattributes b/.gitattributes index ae00e7df0f4..054b8adfb9d 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/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@" ) 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) {} 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/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} 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..1f742684f0d 100644 --- a/Kernel_d/include/CGAL/Kernel_d/function_objectsCd.h +++ b/Kernel_d/include/CGAL/Kernel_d/function_objectsCd.h @@ -49,14 +49,27 @@ 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; typedef typename K::Point_d Point_d; public: typedef bool result_type; - const result_type - operator()(const Point_d& p, const Point_d& q, int i) const + result_type + operator()(const Point_d& p, const Point_d& q, int i) const { return p.cartesian(i) +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/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}) 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. 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 94b3863882e..ec30e68a776 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 "<