mirror of https://github.com/CGAL/cgal
merge changes from next
This commit is contained in:
commit
503d441f1e
|
|
@ -1424,9 +1424,12 @@ Convex_decomposition_3/examples/Convex_decomposition_3/list_of_convex_parts.cin
|
|||
Convex_decomposition_3/test/Convex_decomposition_3/check_decomposition.cin -text
|
||||
Convex_decomposition_3/test/Convex_decomposition_3/reflex_sedge.cpp -text
|
||||
Convex_decomposition_3/test/Convex_decomposition_3/star.nef3 -text
|
||||
Convex_hull_2/benchmark/Convex_hull_2/static_ch2.cpp -text
|
||||
Convex_hull_2/demo/Convex_hull_2/help/index.html svneol=native#text/html
|
||||
Convex_hull_2/doc_tex/Convex_hull_2/convex_hull.png -text
|
||||
Convex_hull_2/doc_tex/Convex_hull_2/saarhull.png -text svneol=unset#image/png
|
||||
Convex_hull_2/examples/Convex_hull_2/iostream_convex_hull_2.cin -text
|
||||
Convex_hull_2/test/Convex_hull_2/ch2_projection_3.cpp -text
|
||||
Convex_hull_3/benchmark/Convex_hull_3/compare_different_approach.cpp -text
|
||||
Convex_hull_3/benchmark/Convex_hull_3/is_on_positive_side.cpp -text
|
||||
Convex_hull_3/demo/Convex_hull_3/CMakeLists.txt -text
|
||||
|
|
@ -1724,7 +1727,6 @@ Installation/cmake/modules/CGAL_CheckCXXFileRuns.cmake -text
|
|||
Installation/cmake/modules/CGAL_Common.cmake -text
|
||||
Installation/cmake/modules/CGAL_CreateSingleSourceCGALProgram.cmake -text
|
||||
Installation/cmake/modules/CGAL_CreateSingleSourceCGALProgramQt4.cmake -text
|
||||
Installation/cmake/modules/CGAL_FindPackageHandleStandardArgs.cmake -text
|
||||
Installation/cmake/modules/CGAL_GeneratorSpecificSettings.cmake -text
|
||||
Installation/cmake/modules/CGAL_Locate_CGAL_TAUCS.cmake -text
|
||||
Installation/cmake/modules/CGAL_Macros.cmake -text
|
||||
|
|
@ -1747,7 +1749,6 @@ Installation/cmake/modules/CGAL_UseRS.cmake -text
|
|||
Installation/cmake/modules/CGAL_UseTAUCS.cmake -text
|
||||
Installation/cmake/modules/CGAL_VersionUtils.cmake -text
|
||||
Installation/cmake/modules/FindBLAS.cmake -text
|
||||
Installation/cmake/modules/FindBoost.cmake -text
|
||||
Installation/cmake/modules/FindCGAL.cmake -text
|
||||
Installation/cmake/modules/FindCGAL_CORE.cmake -text
|
||||
Installation/cmake/modules/FindCORE.cmake -text
|
||||
|
|
@ -1764,7 +1765,6 @@ Installation/cmake/modules/FindMPFI.cmake -text
|
|||
Installation/cmake/modules/FindMPFR.cmake -text
|
||||
Installation/cmake/modules/FindNTL.cmake -text
|
||||
Installation/cmake/modules/FindOpenGL.cmake -text
|
||||
Installation/cmake/modules/FindPackageMessage.cmake -text
|
||||
Installation/cmake/modules/FindQGLViewer.cmake -text
|
||||
Installation/cmake/modules/FindQt3-patched.cmake -text
|
||||
Installation/cmake/modules/FindRS.cmake -text
|
||||
|
|
@ -1812,7 +1812,7 @@ Intersections_3/include/CGAL/internal/Intersections_3/Triangle_3_Line_3_intersec
|
|||
Intersections_3/test/Intersections_3/segment_segment.cpp -text
|
||||
Intersections_3/test/Intersections_3/triangle_3_triangle_3_intersection.cpp -text
|
||||
Interval_skip_list/doc_tex/Interval_skip_list/query.png -text
|
||||
Interval_skip_list/examples/Interval_skip_list/isl_terrain.pts -text
|
||||
Interval_skip_list/examples/Interval_skip_list/terrain.pts -text
|
||||
Interval_support/include/CGAL/Test/_test_bigfloat_interval_traits.h -text
|
||||
Interval_support/include/CGAL/Test/_test_convert_to_bfi.h -text
|
||||
Interval_support/package_info/Interval_support/description.txt -text
|
||||
|
|
@ -1868,7 +1868,9 @@ Kernel_23/examples/Kernel_23/MyPointC2_iostream.h -text
|
|||
Kernel_23/examples/Kernel_23/cartesian_converter.cpp -text
|
||||
Kernel_23/include/CGAL/functions_on_enums.h -text
|
||||
Kernel_23/include/CGAL/internal/Projection_traits_3.h -text
|
||||
Kernel_23/test/Kernel_23/include/CGAL/_Result_of_kernel.h -text
|
||||
Kernel_23/test/Kernel_23/overload_bug.cpp -text
|
||||
Kernel_23/test/Kernel_23/test_result_of.cpp -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
|
||||
|
|
@ -1947,6 +1949,7 @@ Largest_empty_rect_2/doc_tex/Inscribed_areas_ref/ler-detail.png -text
|
|||
Largest_empty_rect_2/doc_tex/Inscribed_areas_ref/ler.png -text
|
||||
Largest_empty_rect_2/test/Largest_empty_rect_2/cgal_test eol=lf
|
||||
Largest_empty_rect_2/test/Largest_empty_rect_2/cgal_test_with_cmake eol=lf
|
||||
Linear_cell_complex/demo/Linear_cell_complex/CreateMenger.ui -text
|
||||
Linear_cell_complex/demo/Linear_cell_complex/CreateMesh.ui -text
|
||||
Linear_cell_complex/demo/Linear_cell_complex/Linear_cell_complex_3.qrc -text
|
||||
Linear_cell_complex/demo/Linear_cell_complex/Linear_cell_complex_3_subdivision.cpp -text
|
||||
|
|
@ -2139,6 +2142,7 @@ Maintenance/infrastructure/cgal.geometryfactory.com/bin/create_release -text
|
|||
Maintenance/infrastructure/cgal.geometryfactory.com/bin/dump_crontab -text
|
||||
Maintenance/infrastructure/cgal.geometryfactory.com/bin/update_manual_tools -text
|
||||
Maintenance/infrastructure/cgal.geometryfactory.com/crontab -text
|
||||
Maintenance/infrastructure/cgal.geometryfactory.com/partition-table-sda.txt -text
|
||||
Maintenance/infrastructure/cgal.geometryfactory.com/reference-platforms/boostrap -text
|
||||
Maintenance/infrastructure/cgal.geometryfactory.com/reference-platforms/common-setup -text
|
||||
Maintenance/infrastructure/cgal.geometryfactory.com/reference-platforms/i686_Linux-2.6_g++-3.4.6_CentOS-5.1-O2/CMakeCache.txt -text
|
||||
|
|
@ -3222,12 +3226,17 @@ Polyhedron/doc_tex/Polyhedron_ref/fig/add_facet.pdf -text svneol=unset#applicati
|
|||
Polyhedron/doc_tex/Polyhedron_ref/fig/add_facet1.gif -text svneol=unset#image/gif
|
||||
Polyhedron/doc_tex/Polyhedron_ref/fig/add_facet2.gif -text svneol=unset#image/gif
|
||||
Polyhedron/doc_tex/Polyhedron_ref/fig/euler.pdf -text svneol=unset#application/pdf
|
||||
Polyhedron/doc_tex/Polyhedron_ref/fig/euler.svg -text
|
||||
Polyhedron/doc_tex/Polyhedron_ref/fig/euler_center.gif -text svneol=unset#image/gif
|
||||
Polyhedron/doc_tex/Polyhedron_ref/fig/euler_center.pdf -text svneol=unset#application/pdf
|
||||
Polyhedron/doc_tex/Polyhedron_ref/fig/euler_facet.gif -text svneol=unset#image/gif
|
||||
Polyhedron/doc_tex/Polyhedron_ref/fig/euler_facet.pdf -text svneol=unset#application/pdf
|
||||
Polyhedron/doc_tex/Polyhedron_ref/fig/euler_facet.svg -text
|
||||
Polyhedron/doc_tex/Polyhedron_ref/fig/euler_loop.gif -text svneol=unset#image/gif
|
||||
Polyhedron/doc_tex/Polyhedron_ref/fig/euler_loop.pdf -text svneol=unset#application/pdf
|
||||
Polyhedron/doc_tex/Polyhedron_ref/fig/euler_vertex.gif -text svneol=unset#image/gif
|
||||
Polyhedron/doc_tex/Polyhedron_ref/fig/euler_vertex.pdf -text svneol=unset#application/pdf
|
||||
Polyhedron/doc_tex/Polyhedron_ref/fig/euler_vertex.svg -text
|
||||
Polyhedron/doc_tex/Polyhedron_ref/fig/halfedge.gif -text svneol=unset#image/gif
|
||||
Polyhedron/doc_tex/Polyhedron_ref/fig/halfedge.pdf -text svneol=unset#application/pdf
|
||||
Polyhedron/doc_tex/Polyhedron_ref/fig/halfedge_small.gif -text svneol=unset#image/gif
|
||||
|
|
|
|||
|
|
@ -75,6 +75,7 @@ CGALimageIO/demo/CGALimageIO/cmake_install.cmake
|
|||
CGALimageIO/demo/CGALimageIO/image_to_vtk_viewer
|
||||
CGALimageIO/examples/CGALimageIO/*.exe
|
||||
CGALimageIO/examples/CGALimageIO/Makefile
|
||||
CGALimageIO/examples/CGALimageIO/cgal_test_with_cmake
|
||||
CGALimageIO/examples/CGALimageIO/convert_raw_image_to_inr
|
||||
CGALimageIO/examples/CGALimageIO/makefile
|
||||
CGALimageIO/examples/CGALimageIO/test_imageio
|
||||
|
|
@ -163,6 +164,7 @@ Installation/auxiliary/gdb/test
|
|||
Installation/cmake/modules/*.tmp
|
||||
Installation/test/Installation/cgal_test
|
||||
Installation/test/Installation/deprecation_warning
|
||||
Interpolation/demo/Interpolation/cgal_test_with_cmake
|
||||
Intersections_3/test/Intersections_3/CMakeLists.txt
|
||||
Intersections_3/test/Intersections_3/bbox_other_do_intersect_test
|
||||
Intersections_3/test/Intersections_3/cgal_test_with_cmake
|
||||
|
|
@ -514,6 +516,8 @@ Mesh_2/doc_tex/Mesh_2_ref/semantic.cache
|
|||
Mesh_2/doxygen
|
||||
Mesh_2/examples/Mesh_2/*.core
|
||||
Mesh_2/examples/Mesh_2/.*.deps
|
||||
Mesh_2/examples/Mesh_2/CMakeLists.txt
|
||||
Mesh_2/examples/Mesh_2/cgal_test_with_cmake
|
||||
Mesh_2/examples/Mesh_2/conform
|
||||
Mesh_2/examples/Mesh_2/conforming
|
||||
Mesh_2/examples/Mesh_2/depends
|
||||
|
|
@ -580,6 +584,7 @@ Mesh_3/examples/Mesh_3/*.png
|
|||
Mesh_3/examples/Mesh_3/.*.deps
|
||||
Mesh_3/examples/Mesh_3/Makefile
|
||||
Mesh_3/examples/Mesh_3/applications
|
||||
Mesh_3/examples/Mesh_3/cgal_test_with_cmake
|
||||
Mesh_3/examples/Mesh_3/cgal_to_medit
|
||||
Mesh_3/examples/Mesh_3/chair-after.mesh
|
||||
Mesh_3/examples/Mesh_3/chair-after.png
|
||||
|
|
@ -595,6 +600,16 @@ Mesh_3/examples/Mesh_3/implicit_surfaces_mesher_3
|
|||
Mesh_3/examples/Mesh_3/lanteri
|
||||
Mesh_3/examples/Mesh_3/lanteri_output_tet_mesh
|
||||
Mesh_3/examples/Mesh_3/medit_to_cgal
|
||||
Mesh_3/examples/Mesh_3/mesh_3D_gray_image
|
||||
Mesh_3/examples/Mesh_3/mesh_3D_image
|
||||
Mesh_3/examples/Mesh_3/mesh_3D_image_variable_size
|
||||
Mesh_3/examples/Mesh_3/mesh_implicit_sphere
|
||||
Mesh_3/examples/Mesh_3/mesh_implicit_sphere_variable_size
|
||||
Mesh_3/examples/Mesh_3/mesh_optimization_example
|
||||
Mesh_3/examples/Mesh_3/mesh_optimization_lloyd_example
|
||||
Mesh_3/examples/Mesh_3/mesh_polyhedral_domain
|
||||
Mesh_3/examples/Mesh_3/mesh_polyhedral_domain_with_features
|
||||
Mesh_3/examples/Mesh_3/mesh_two_implicit_spheres_with_balls
|
||||
Mesh_3/examples/Mesh_3/my_makefile
|
||||
Mesh_3/examples/Mesh_3/off_to_ghs
|
||||
Mesh_3/examples/Mesh_3/out*.mesh.*
|
||||
|
|
@ -695,6 +710,8 @@ Min_ellipse_2/.tmp
|
|||
Min_ellipse_2/Makefile
|
||||
Min_ellipse_2/bin
|
||||
Min_ellipse_2/doc_ps
|
||||
Minkowski_sum_3/test/Minkowski_sum_3/CMakeLists.txt
|
||||
Minkowski_sum_3/test/Minkowski_sum_3/cgal_test_with_cmake
|
||||
Modular_arithmetic/doc_html
|
||||
Modular_arithmetic/doc_pdf
|
||||
Modular_arithmetic/doc_ps
|
||||
|
|
@ -976,6 +993,28 @@ Ridges_3/test/Ridges_3/*.sln
|
|||
Ridges_3/test/Ridges_3/*.vcproj
|
||||
Ridges_3/test/Ridges_3/Makefile
|
||||
Ridges_3/test/Ridges_3/ridge_test
|
||||
STL_Extension/test/STL_Extension/CMakeLists.txt
|
||||
STL_Extension/test/STL_Extension/cgal_test_with_cmake
|
||||
STL_Extension/test/STL_Extension/test_Cache
|
||||
STL_Extension/test/STL_Extension/test_Compact_container
|
||||
STL_Extension/test/STL_Extension/test_Concatenate_iterator
|
||||
STL_Extension/test/STL_Extension/test_Flattening_iterator
|
||||
STL_Extension/test/STL_Extension/test_Handle_with_policy
|
||||
STL_Extension/test/STL_Extension/test_In_place_list
|
||||
STL_Extension/test/STL_Extension/test_Modifiable_priority_queue
|
||||
STL_Extension/test/STL_Extension/test_Nested_iterator
|
||||
STL_Extension/test/STL_Extension/test_Uncertain
|
||||
STL_Extension/test/STL_Extension/test_complexity_tags
|
||||
STL_Extension/test/STL_Extension/test_composition
|
||||
STL_Extension/test/STL_Extension/test_dispatch_output
|
||||
STL_Extension/test/STL_Extension/test_is_iterator
|
||||
STL_Extension/test/STL_Extension/test_is_streamable
|
||||
STL_Extension/test/STL_Extension/test_lexcompare_outputrange
|
||||
STL_Extension/test/STL_Extension/test_multiset
|
||||
STL_Extension/test/STL_Extension/test_nth_element
|
||||
STL_Extension/test/STL_Extension/test_stl_extension
|
||||
STL_Extension/test/STL_Extension/test_type_traits
|
||||
STL_Extension/test/STL_Extension/test_vector
|
||||
Skin_surface_3/.cdtproject
|
||||
Skin_surface_3/.project
|
||||
Skin_surface_3/.settings
|
||||
|
|
@ -988,6 +1027,8 @@ Skin_surface_3/test/Skin_surface_3/error.txt
|
|||
Skin_surface_3/test/Skin_surface_3/makefile
|
||||
Skin_surface_3/test/Skin_surface_3/msgs.txt
|
||||
Skin_surface_3/test/Skin_surface_3/subdivision_test
|
||||
Spatial_sorting/test/Spatial_sorting/CMakeLists.txt
|
||||
Spatial_sorting/test/Spatial_sorting/cgal_test_with_cmake
|
||||
Stream_lines_2/demo/Stream_lines_2/*.exe
|
||||
Stream_lines_2/demo/Stream_lines_2/*.sln
|
||||
Stream_lines_2/demo/Stream_lines_2/*.vcproj
|
||||
|
|
@ -1196,12 +1237,17 @@ Surface_reconstruction_points_3/test/Surface_reconstruction_points_3/error.txt
|
|||
Surface_reconstruction_points_3/test/Surface_reconstruction_points_3/poisson_reconstruction_test
|
||||
Surface_reconstruction_points_3/test/Surface_reconstruction_points_3/release
|
||||
Testsuite/test/myrun_testsuite_with_cmake
|
||||
Triangulation_2/CMakeLists.txt
|
||||
Triangulation_2/cgal_test_with_cmake
|
||||
Triangulation_2/demo/Triangulation_2/*.exe
|
||||
Triangulation_2/demo/Triangulation_2/Makefile
|
||||
Triangulation_2/demo/Triangulation_2/constrained
|
||||
Triangulation_2/demo/Triangulation_2/constrained_delaunay_triangulation_2
|
||||
Triangulation_2/demo/Triangulation_2/delaunay_triangulation_2
|
||||
Triangulation_2/demo/Triangulation_2/regular_triangulation_2
|
||||
Triangulation_2/examples/Triangulation_2/CMakeLists.txt
|
||||
Triangulation_2/examples/Triangulation_2/cgal_test_with_cmake
|
||||
Triangulation_2/examples/Triangulation_2/regular
|
||||
Triangulation_2/test/Triangulation_2/*.exe
|
||||
Triangulation_2/test/Triangulation_2/CMakeLists.txt
|
||||
Triangulation_2/test/Triangulation_2/Makefile
|
||||
|
|
@ -1222,6 +1268,9 @@ Triangulation_2/test/Triangulation_2/test_triangulation_2_bis
|
|||
Triangulation_2/test/Triangulation_2/test_triangulation_geom_traits
|
||||
Triangulation_2/test/Triangulation_2/test_triangulation_tds
|
||||
Triangulation_2/test/Triangulation_2/vrml_tds*
|
||||
Triangulation_3/benchmark/Triangulation_3/CMakeLists.txt
|
||||
Triangulation_3/benchmark/Triangulation_3/cgal_test_with_cmake
|
||||
Triangulation_3/benchmark/Triangulation_3/simple
|
||||
Triangulation_3/examples/Triangulation_3/*.exe
|
||||
Triangulation_3/examples/Triangulation_3/CMakeLists.txt
|
||||
Triangulation_3/examples/Triangulation_3/adding_handles_3
|
||||
|
|
@ -1257,6 +1306,7 @@ Triangulation_3/test/Triangulation_3/makefile
|
|||
Triangulation_3/test/Triangulation_3/test_delaunay_3
|
||||
Triangulation_3/test/Triangulation_3/test_delaunay_hierarchy_3
|
||||
Triangulation_3/test/Triangulation_3/test_delaunay_hierarchy_3_old
|
||||
Triangulation_3/test/Triangulation_3/test_dt_deterministic_3
|
||||
Triangulation_3/test/Triangulation_3/test_regular_3
|
||||
Triangulation_3/test/Triangulation_3/test_regular_as_delaunay_3
|
||||
Triangulation_3/test/Triangulation_3/test_regular_remove_3
|
||||
|
|
|
|||
|
|
@ -95,10 +95,10 @@ for which the class \ccc{AABB_tree<AT>} may receive a distance query.
|
|||
\ccMethod{Closest_point closest_point_object();}{Returns the closest point constructor.}
|
||||
|
||||
\ccHasModels
|
||||
\ccc{AABB_traits<GeomTraits,TrianglePrimitive>}.
|
||||
\ccc{AABB_traits<GeomTraits,Primitive>}.
|
||||
|
||||
\ccSeeAlso
|
||||
\ccc{AABB_traits<GeomTraits,TrianglePrimitive>}\\
|
||||
\ccc{AABB_traits<GeomTraits,Primitive>}\\
|
||||
\ccc{AABB_tree<AT>}
|
||||
\ccc{AABBPrimitive}
|
||||
|
||||
|
|
|
|||
|
|
@ -25,11 +25,19 @@
|
|||
|
||||
namespace CGAL{
|
||||
|
||||
#if CGAL_USE_RS3
|
||||
inline
|
||||
bool operator<(const Algebraic_1 &n1,const Algebraic_1 &n2){
|
||||
typedef CGAL::Rsgcd_1 Gcd;
|
||||
return(CGAL::RS_COMPARE::compare_1<Gcd>(n1,n2)==SMALLER);
|
||||
}
|
||||
#else
|
||||
inline
|
||||
bool operator<(const Algebraic_1 &n1,const Algebraic_1 &n2){
|
||||
typedef CGAL::Cgalgcd_1 Gcd;
|
||||
return(CGAL::RS_COMPARE::compare_1<Gcd>(n1,n2)==SMALLER);
|
||||
}
|
||||
#endif
|
||||
|
||||
inline
|
||||
bool operator==(const Algebraic_1 &n1,const Algebraic_1 &n2){
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@ namespace RS_COMPARE{
|
|||
|
||||
// compare two algebraic numbers, knowing they are not equal
|
||||
//template <class _Gcd_policy>
|
||||
inline
|
||||
Comparison_result
|
||||
compare_1_unequal(const Algebraic_1 &r1,const Algebraic_1 &r2){
|
||||
/*typedef _Gcd_policy Gcd;
|
||||
|
|
|
|||
|
|
@ -65,6 +65,7 @@ std::ostream& operator<<(std::ostream &os,const RS_polynomial_1 &p){
|
|||
}
|
||||
}
|
||||
|
||||
inline
|
||||
std::istream& operator>>(std::istream &is,RS_polynomial_1 &pol){
|
||||
std::istream::int_type c;
|
||||
std::ios::fmtflags old_flags=is.flags();
|
||||
|
|
|
|||
|
|
@ -19,13 +19,16 @@
|
|||
#ifndef CGAL_RS_POLYNOMIAL_1_UTILS_H
|
||||
#define CGAL_RS_POLYNOMIAL_1_UTILS_H
|
||||
|
||||
#include <CGAL/basic.h>
|
||||
#include <gmp.h>
|
||||
#include <rs3_fncts.h>
|
||||
#include <CGAL/RS/polynomial_1.h>
|
||||
#include <CGAL/RS/polynomial_converter.h>
|
||||
#include <CGAL/RS/solve_1.h>
|
||||
#include <CGAL/RS/ugcd.h>
|
||||
#include <rs_exports.h>
|
||||
#ifdef CGAL_USE_RS3
|
||||
#include <rs3_fncts.h>
|
||||
#endif
|
||||
|
||||
namespace CGAL{
|
||||
|
||||
|
|
|
|||
|
|
@ -164,7 +164,7 @@ logarithmic query time, while the query time for the landmark
|
|||
strategy is only logarithmic on average --- and we may have
|
||||
scenarios where the query time can be linear. In practice however,
|
||||
the query times of both strategies are competitive. For a detailed
|
||||
experimental comparison, see \cite{cgal:hh-eplca-05}
|
||||
experimental comparison, see \cite{hh-esplp-08}
|
||||
|
||||
The main drawback in the current implementation of the landmark
|
||||
strategy, compared to the trapezoidal RIC strategy, is that while
|
||||
|
|
|
|||
|
|
@ -508,7 +508,8 @@ namespace CGAL {
|
|||
// in Arr_circular_line_arc_traits_2.
|
||||
namespace internal_Argt_traits{
|
||||
struct Not_X_Monotone{};
|
||||
std::ostream& operator<<(std::ostream& os,const Not_X_Monotone&) {return os;}
|
||||
inline std::ostream& operator << (std::ostream& os, const Not_X_Monotone&)
|
||||
{return os;}
|
||||
}
|
||||
|
||||
/// Traits class for CGAL::Arrangement_2 (and similar) based on a CircularKernel.
|
||||
|
|
|
|||
|
|
@ -607,9 +607,7 @@ public:
|
|||
/*!
|
||||
*/
|
||||
template <class Geometry_traits_2,
|
||||
#ifndef CGAL_CFG_NO_TMPL_IN_TMPL_PARAM
|
||||
template <class T>
|
||||
#endif
|
||||
class T_Dcel = Arr_polyhedral_sgm_arr_dcel>
|
||||
class Arr_polyhedral_sgm :
|
||||
public Arr_spherical_gaussian_map_3<Geometry_traits_2, T_Dcel>
|
||||
|
|
@ -621,11 +619,7 @@ public:
|
|||
typedef typename Geometry_traits_2::Point_3 Point_3;
|
||||
typedef typename Geometry_traits_2::Vector_3 Vector_3;
|
||||
|
||||
#ifndef CGAL_CFG_NO_TMPL_IN_TMPL_PARAM
|
||||
typedef T_Dcel<Geometry_traits_2> Dcel;
|
||||
#else
|
||||
typedef typename T_Dcel::template Dcel<Geometry_traits_2> Dcel;
|
||||
#endif
|
||||
|
||||
// For some reason MSVC barfs on the friend statement below. Therefore,
|
||||
// we declare the Base to be public to overcome the problem.
|
||||
|
|
|
|||
|
|
@ -331,18 +331,12 @@ protected:
|
|||
* embedded on the sphere.
|
||||
*/
|
||||
template <class T_Traits,
|
||||
#ifndef CGAL_CFG_NO_TMPL_IN_TMPL_PARAM
|
||||
template <class T>
|
||||
#endif
|
||||
class T_Dcel = Arr_default_dcel>
|
||||
class Arr_spherical_gaussian_map_3 :
|
||||
public Arrangement_on_surface_2<T_Traits,
|
||||
Arr_spherical_topology_traits_2<T_Traits,
|
||||
#ifndef CGAL_CFG_NO_TMPL_IN_TMPL_PARAM
|
||||
T_Dcel<T_Traits>
|
||||
#else
|
||||
typename T_Dcel::template Dcel<T_Traits>
|
||||
#endif
|
||||
>
|
||||
>
|
||||
{
|
||||
|
|
|
|||
|
|
@ -218,9 +218,12 @@ void Basic_sweep_line_2<Tr, Vis, Subcv, Evnt, Alloc>::_init_structures()
|
|||
{
|
||||
CGAL_assertion(m_queue->empty());
|
||||
CGAL_assertion((m_statusLine.size() == 0));
|
||||
|
||||
// Allocate all of the Subcurve objects as one block.
|
||||
m_subCurves = m_subCurveAlloc.allocate(m_num_of_subCurves);
|
||||
|
||||
// Allocate all of the Subcurve objects as one block. Don't allocate
|
||||
// anything when there are no subcurves.
|
||||
if (m_num_of_subCurves > 0) {
|
||||
m_subCurves = m_subCurveAlloc.allocate(m_num_of_subCurves);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -24,12 +24,7 @@
|
|||
|
||||
#include <CGAL/Polyhedron_3.h>
|
||||
|
||||
#ifndef CGAL_CFG_NO_TMPL_IN_TMPL_PARAM
|
||||
# define CGAL_HDS_PARAM_ template < class Traits, class Items, class Alloc> class HDS
|
||||
#else
|
||||
# define CGAL_HDS_PARAM_ class HDS
|
||||
#endif
|
||||
|
||||
#define CGAL_HDS_PARAM_ template < class Traits, class Items, class Alloc> class HDS
|
||||
|
||||
//
|
||||
// NOTE: The BGL algorithms are NOT const-correct: i.e., they take a "G const&"
|
||||
|
|
|
|||
|
|
@ -26,11 +26,7 @@
|
|||
#include <CGAL/boost/graph/halfedge_graph_traits.h>
|
||||
#include <CGAL/boost/graph/halfedge_graph_traits_HalfedgeDS.h>
|
||||
|
||||
#ifndef CGAL_CFG_NO_TMPL_IN_TMPL_PARAM
|
||||
# define CGAL_HDS_PARAM_ template < class Traits, class Items, class Alloc> class HDS
|
||||
#else
|
||||
# define CGAL_HDS_PARAM_ class HDS
|
||||
#endif
|
||||
#define CGAL_HDS_PARAM_ template < class Traits, class Items, class Alloc> class HDS
|
||||
|
||||
//
|
||||
// NOTE: The BGL algorithms are NOT const-correct: i.e., they take a "G const&"
|
||||
|
|
|
|||
|
|
@ -24,11 +24,7 @@
|
|||
#include <CGAL/boost/graph/graph_traits_Polyhedron_3.h>
|
||||
#include <CGAL/Unique_hash_map.h>
|
||||
|
||||
#ifndef CGAL_CFG_NO_TMPL_IN_TMPL_PARAM
|
||||
# define CGAL_HDS_PARAM_ template < class Traits, class Items, class Alloc> class HDS
|
||||
#else
|
||||
# define CGAL_HDS_PARAM_ class HDS
|
||||
#endif
|
||||
#define CGAL_HDS_PARAM_ template < class Traits, class Items, class Alloc> class HDS
|
||||
|
||||
namespace CGAL {
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
#include <string>
|
||||
#include <sstream>
|
||||
#include <iostream>
|
||||
#include <fstream>\
|
||||
#include <fstream>
|
||||
|
||||
#define SHOW(attribut) "\n "#attribut": " << image->attribut
|
||||
#define SHOWENUM(enumitem) #enumitem"=" << enumitem
|
||||
|
|
|
|||
|
|
@ -247,7 +247,7 @@ Image_3::trilinear_interpolation(const Coord_type& x,
|
|||
lz < 0 ||
|
||||
lz >= dimz-1 ||
|
||||
ly >= dimy-1 ||
|
||||
lz >= dimx-1)
|
||||
lx >= dimx-1)
|
||||
{
|
||||
return transform(value_outside);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -988,36 +988,35 @@ namespace CartesianKernelFunctors {
|
|||
typedef typename K::Point_2 Point_2;
|
||||
typedef typename K::Circle_2 Circle_2;
|
||||
public:
|
||||
typedef FT result_type;
|
||||
template<class>
|
||||
struct result {
|
||||
typedef FT type;
|
||||
};
|
||||
|
||||
template<typename F>
|
||||
struct result<F(Circle_2)> {
|
||||
typedef const FT& type;
|
||||
};
|
||||
|
||||
const result_type&
|
||||
const FT&
|
||||
operator()( const Circle_2& c) const
|
||||
{ return c.rep().squared_radius(); }
|
||||
|
||||
result_type
|
||||
FT
|
||||
operator()( const Point_2& /*p*/) const
|
||||
{ return FT(0); }
|
||||
|
||||
result_type
|
||||
FT
|
||||
operator()( const Point_2& p, const Point_2& q) const
|
||||
{ return squared_radiusC2(p.x(), p.y(), q.x(), q.y()); }
|
||||
|
||||
result_type
|
||||
FT
|
||||
operator()( const Point_2& p, const Point_2& q, const Point_2& r) const
|
||||
{ return squared_radiusC2(p.x(), p.y(), q.x(), q.y(), r.x(), r.y()); }
|
||||
};
|
||||
|
||||
} //namespace CartesianKernelFunctors
|
||||
|
||||
#ifndef CGAL_CFG_DONT_OVERLOAD_TOO_MUCH
|
||||
template < typename K>
|
||||
struct Qualified_result_of<CartesianKernelFunctors::Compute_squared_radius_2<K>,
|
||||
typename K::Circle_2>
|
||||
{
|
||||
typedef typename K::FT const & type;
|
||||
};
|
||||
#endif
|
||||
|
||||
// For the non specialized template will do the right thing,
|
||||
// namely return a copy of an FT
|
||||
|
||||
|
|
@ -1104,22 +1103,22 @@ namespace CartesianKernelFunctors {
|
|||
|
||||
|
||||
template <typename K>
|
||||
class Compute_x_2 : Has_qrt
|
||||
class Compute_x_2
|
||||
{
|
||||
typedef typename K::FT FT;
|
||||
typedef typename K::Point_2 Point_2;
|
||||
typedef typename K::Vector_2 Vector_2;
|
||||
|
||||
public:
|
||||
typedef FT result_type;
|
||||
typedef const FT& result_type;
|
||||
|
||||
const result_type &
|
||||
result_type
|
||||
operator()(const Point_2& p) const
|
||||
{
|
||||
return p.rep().x();
|
||||
}
|
||||
|
||||
const result_type &
|
||||
result_type
|
||||
operator()(const Vector_2& v) const
|
||||
{
|
||||
return v.rep().x();
|
||||
|
|
@ -1127,22 +1126,22 @@ namespace CartesianKernelFunctors {
|
|||
};
|
||||
|
||||
template <typename K>
|
||||
class Compute_x_3 : Has_qrt
|
||||
class Compute_x_3
|
||||
{
|
||||
typedef typename K::FT FT;
|
||||
typedef typename K::Point_3 Point_3;
|
||||
typedef typename K::Vector_3 Vector_3;
|
||||
|
||||
public:
|
||||
typedef FT result_type;
|
||||
typedef const FT& result_type;
|
||||
|
||||
const result_type &
|
||||
result_type
|
||||
operator()(const Point_3& p) const
|
||||
{
|
||||
return p.rep().x();
|
||||
}
|
||||
|
||||
const result_type &
|
||||
result_type
|
||||
operator()(const Vector_3& v) const
|
||||
{
|
||||
return v.rep().x();
|
||||
|
|
@ -1151,22 +1150,22 @@ namespace CartesianKernelFunctors {
|
|||
|
||||
|
||||
template <typename K>
|
||||
class Compute_y_2 : Has_qrt
|
||||
class Compute_y_2
|
||||
{
|
||||
typedef typename K::FT FT;
|
||||
typedef typename K::Point_2 Point_2;
|
||||
typedef typename K::Vector_2 Vector_2;
|
||||
|
||||
public:
|
||||
typedef FT result_type;
|
||||
typedef const FT& result_type;
|
||||
|
||||
const result_type &
|
||||
result_type
|
||||
operator()(const Point_2& p) const
|
||||
{
|
||||
return p.rep().y();
|
||||
}
|
||||
|
||||
const result_type &
|
||||
result_type
|
||||
operator()(const Vector_2& v) const
|
||||
{
|
||||
return v.rep().y();
|
||||
|
|
@ -1175,22 +1174,22 @@ namespace CartesianKernelFunctors {
|
|||
|
||||
|
||||
template <typename K>
|
||||
class Compute_y_3 : Has_qrt
|
||||
class Compute_y_3
|
||||
{
|
||||
typedef typename K::FT FT;
|
||||
typedef typename K::Point_3 Point_3;
|
||||
typedef typename K::Vector_3 Vector_3;
|
||||
|
||||
public:
|
||||
typedef FT result_type;
|
||||
typedef const FT& result_type;
|
||||
|
||||
const result_type &
|
||||
result_type
|
||||
operator()(const Point_3& p) const
|
||||
{
|
||||
return p.rep().y();
|
||||
}
|
||||
|
||||
const result_type &
|
||||
result_type
|
||||
operator()(const Vector_3& v) const
|
||||
{
|
||||
return v.rep().y();
|
||||
|
|
@ -1198,22 +1197,22 @@ namespace CartesianKernelFunctors {
|
|||
};
|
||||
|
||||
template <typename K>
|
||||
class Compute_z_3 : Has_qrt
|
||||
class Compute_z_3
|
||||
{
|
||||
typedef typename K::FT FT;
|
||||
typedef typename K::Point_3 Point_3;
|
||||
typedef typename K::Vector_3 Vector_3;
|
||||
|
||||
public:
|
||||
typedef FT result_type;
|
||||
typedef const FT& result_type;
|
||||
|
||||
const result_type &
|
||||
result_type
|
||||
operator()(const Point_3& p) const
|
||||
{
|
||||
return p.rep().z();
|
||||
}
|
||||
|
||||
const result_type &
|
||||
result_type
|
||||
operator()(const Vector_3& v) const
|
||||
{
|
||||
return v.rep().z();
|
||||
|
|
@ -1223,15 +1222,15 @@ namespace CartesianKernelFunctors {
|
|||
|
||||
|
||||
template <typename K>
|
||||
class Compute_dx_2 : public Has_qrt
|
||||
class Compute_dx_2
|
||||
{
|
||||
typedef typename K::FT FT;
|
||||
typedef typename K::Direction_2 Direction_2;
|
||||
typedef typename K::Direction_2 Direction_2;
|
||||
|
||||
public:
|
||||
typedef FT result_type;
|
||||
typedef const FT& result_type;
|
||||
|
||||
const result_type &
|
||||
result_type
|
||||
operator()(const Direction_2& d) const
|
||||
{
|
||||
return d.rep().dx();
|
||||
|
|
@ -1239,15 +1238,15 @@ namespace CartesianKernelFunctors {
|
|||
};
|
||||
|
||||
template <typename K>
|
||||
class Compute_dx_3 : public Has_qrt
|
||||
class Compute_dx_3
|
||||
{
|
||||
typedef typename K::FT FT;
|
||||
typedef typename K::Direction_3 Direction_3;
|
||||
typedef typename K::Direction_3 Direction_3;
|
||||
|
||||
public:
|
||||
typedef FT result_type;
|
||||
typedef const FT& result_type;
|
||||
|
||||
const result_type &
|
||||
result_type
|
||||
operator()(const Direction_3& d) const
|
||||
{
|
||||
return d.rep().dx();
|
||||
|
|
@ -1255,15 +1254,15 @@ namespace CartesianKernelFunctors {
|
|||
};
|
||||
|
||||
template <typename K>
|
||||
class Compute_dy_2 : public Has_qrt
|
||||
class Compute_dy_2
|
||||
{
|
||||
typedef typename K::FT FT;
|
||||
typedef typename K::Direction_2 Direction_2;
|
||||
typedef typename K::Direction_2 Direction_2;
|
||||
|
||||
public:
|
||||
typedef FT result_type;
|
||||
typedef const FT& result_type;
|
||||
|
||||
const result_type &
|
||||
result_type
|
||||
operator()(const Direction_2& d) const
|
||||
{
|
||||
return d.rep().dy();
|
||||
|
|
@ -1271,15 +1270,15 @@ namespace CartesianKernelFunctors {
|
|||
};
|
||||
|
||||
template <typename K>
|
||||
class Compute_dy_3 : public Has_qrt
|
||||
class Compute_dy_3
|
||||
{
|
||||
typedef typename K::FT FT;
|
||||
typedef typename K::Direction_3 Direction_3;
|
||||
typedef typename K::Direction_3 Direction_3;
|
||||
|
||||
public:
|
||||
typedef FT result_type;
|
||||
typedef const FT& result_type;
|
||||
|
||||
const result_type &
|
||||
result_type
|
||||
operator()(const Direction_3& d) const
|
||||
{
|
||||
return d.rep().dy();
|
||||
|
|
@ -1287,15 +1286,15 @@ namespace CartesianKernelFunctors {
|
|||
};
|
||||
|
||||
template <typename K>
|
||||
class Compute_dz_3 : public Has_qrt
|
||||
class Compute_dz_3
|
||||
{
|
||||
typedef typename K::FT FT;
|
||||
typedef typename K::Direction_3 Direction_3;
|
||||
|
||||
public:
|
||||
typedef FT result_type;
|
||||
typedef const FT& result_type;
|
||||
|
||||
const result_type &
|
||||
result_type
|
||||
operator()(const Direction_3& d) const
|
||||
{
|
||||
return d.rep().dz();
|
||||
|
|
@ -1303,68 +1302,68 @@ namespace CartesianKernelFunctors {
|
|||
};
|
||||
|
||||
template <typename K>
|
||||
class Compute_hx_2 : public Has_qrt
|
||||
{
|
||||
typedef typename K::FT FT;
|
||||
typedef typename K::Point_2 Point_2;
|
||||
typedef typename K::Vector_2 Vector_2;
|
||||
|
||||
public:
|
||||
typedef FT result_type;
|
||||
|
||||
const result_type &
|
||||
operator()(const Point_2& p) const
|
||||
{
|
||||
return p.rep().hx();
|
||||
}
|
||||
|
||||
const result_type &
|
||||
operator()(const Vector_2& v) const
|
||||
{
|
||||
return v.rep().hx();
|
||||
}
|
||||
};
|
||||
|
||||
template <typename K>
|
||||
class Compute_hx_3 : public Has_qrt
|
||||
{
|
||||
typedef typename K::FT FT;
|
||||
typedef typename K::Point_3 Point_3;
|
||||
typedef typename K::Vector_3 Vector_3;
|
||||
|
||||
public:
|
||||
typedef FT result_type;
|
||||
|
||||
const result_type &
|
||||
operator()(const Point_3& p) const
|
||||
{
|
||||
return p.rep().hx();
|
||||
}
|
||||
|
||||
const result_type &
|
||||
operator()(const Vector_3& v) const
|
||||
{
|
||||
return v.rep().hx();
|
||||
}
|
||||
};
|
||||
|
||||
template <typename K>
|
||||
class Compute_hy_2 : public Has_qrt
|
||||
class Compute_hx_2
|
||||
{
|
||||
typedef typename K::FT FT;
|
||||
typedef typename K::Point_2 Point_2;
|
||||
typedef typename K::Vector_2 Vector_2;
|
||||
|
||||
public:
|
||||
typedef FT result_type;
|
||||
typedef const FT& result_type;
|
||||
|
||||
const result_type &
|
||||
result_type
|
||||
operator()(const Point_2& p) const
|
||||
{
|
||||
return p.rep().hx();
|
||||
}
|
||||
|
||||
result_type
|
||||
operator()(const Vector_2& v) const
|
||||
{
|
||||
return v.rep().hx();
|
||||
}
|
||||
};
|
||||
|
||||
template <typename K>
|
||||
class Compute_hx_3
|
||||
{
|
||||
typedef typename K::FT FT;
|
||||
typedef typename K::Point_3 Point_3;
|
||||
typedef typename K::Vector_3 Vector_3;
|
||||
|
||||
public:
|
||||
typedef const FT& result_type;
|
||||
|
||||
result_type
|
||||
operator()(const Point_3& p) const
|
||||
{
|
||||
return p.rep().hx();
|
||||
}
|
||||
|
||||
result_type
|
||||
operator()(const Vector_3& v) const
|
||||
{
|
||||
return v.rep().hx();
|
||||
}
|
||||
};
|
||||
|
||||
template <typename K>
|
||||
class Compute_hy_2
|
||||
{
|
||||
typedef typename K::FT FT;
|
||||
typedef typename K::Point_2 Point_2;
|
||||
typedef typename K::Vector_2 Vector_2;
|
||||
|
||||
public:
|
||||
typedef const FT& result_type;
|
||||
|
||||
result_type
|
||||
operator()(const Point_2& p) const
|
||||
{
|
||||
return p.rep().hy();
|
||||
}
|
||||
|
||||
const result_type &
|
||||
result_type
|
||||
operator()(const Vector_2& v) const
|
||||
{
|
||||
return v.rep().hy();
|
||||
|
|
@ -1372,22 +1371,22 @@ namespace CartesianKernelFunctors {
|
|||
};
|
||||
|
||||
template <typename K>
|
||||
class Compute_hy_3 : public Has_qrt
|
||||
class Compute_hy_3
|
||||
{
|
||||
typedef typename K::FT FT;
|
||||
typedef typename K::Point_3 Point_3;
|
||||
typedef typename K::Vector_3 Vector_3;
|
||||
|
||||
public:
|
||||
typedef FT result_type;
|
||||
typedef const FT& result_type;
|
||||
|
||||
const result_type &
|
||||
result_type
|
||||
operator()(const Point_3& p) const
|
||||
{
|
||||
return p.rep().hy();
|
||||
}
|
||||
|
||||
const result_type &
|
||||
result_type
|
||||
operator()(const Vector_3& v) const
|
||||
{
|
||||
return v.rep().hy();
|
||||
|
|
@ -1395,22 +1394,22 @@ namespace CartesianKernelFunctors {
|
|||
};
|
||||
|
||||
template <typename K>
|
||||
class Compute_hz_3 : public Has_qrt
|
||||
class Compute_hz_3
|
||||
{
|
||||
typedef typename K::FT FT;
|
||||
typedef typename K::Point_3 Point_3;
|
||||
typedef typename K::Vector_3 Vector_3;
|
||||
|
||||
public:
|
||||
typedef FT result_type;
|
||||
typedef const FT& result_type;
|
||||
|
||||
const result_type &
|
||||
result_type
|
||||
operator()(const Point_3& p) const
|
||||
{
|
||||
return p.rep().hz();
|
||||
}
|
||||
|
||||
const result_type &
|
||||
result_type
|
||||
operator()(const Vector_3& v) const
|
||||
{
|
||||
return v.rep().hz();
|
||||
|
|
@ -1418,22 +1417,22 @@ namespace CartesianKernelFunctors {
|
|||
};
|
||||
|
||||
template <typename K>
|
||||
class Compute_hw_2 : public Has_qrt
|
||||
class Compute_hw_2
|
||||
{
|
||||
typedef typename K::FT FT;
|
||||
typedef typename K::Point_2 Point_2;
|
||||
typedef typename K::Vector_2 Vector_2;
|
||||
|
||||
public:
|
||||
typedef FT result_type;
|
||||
typedef const FT& result_type;
|
||||
|
||||
const result_type &
|
||||
result_type
|
||||
operator()(const Point_2& p) const
|
||||
{
|
||||
return p.rep().hw();
|
||||
}
|
||||
|
||||
const result_type &
|
||||
result_type
|
||||
operator()(const Vector_2& v) const
|
||||
{
|
||||
return v.rep().hw();
|
||||
|
|
@ -1441,22 +1440,22 @@ namespace CartesianKernelFunctors {
|
|||
};
|
||||
|
||||
template <typename K>
|
||||
class Compute_hw_3 : public Has_qrt
|
||||
class Compute_hw_3
|
||||
{
|
||||
typedef typename K::FT FT;
|
||||
typedef typename K::Point_3 Point_3;
|
||||
typedef typename K::Vector_3 Vector_3;
|
||||
|
||||
public:
|
||||
typedef FT result_type;
|
||||
typedef const FT& result_type;
|
||||
|
||||
const result_type &
|
||||
result_type
|
||||
operator()(const Point_3& p) const
|
||||
{
|
||||
return p.rep().hw();
|
||||
}
|
||||
|
||||
const result_type &
|
||||
result_type
|
||||
operator()(const Vector_3& v) const
|
||||
{
|
||||
return v.rep().hw();
|
||||
|
|
@ -1465,15 +1464,15 @@ namespace CartesianKernelFunctors {
|
|||
|
||||
|
||||
template <typename K>
|
||||
class Compute_xmin_2 : public Has_qrt
|
||||
class Compute_xmin_2
|
||||
{
|
||||
typedef typename K::FT FT;
|
||||
typedef typename K::Iso_rectangle_2 Iso_rectangle_2;
|
||||
|
||||
public:
|
||||
typedef FT result_type;
|
||||
typedef const FT& result_type;
|
||||
|
||||
const result_type &
|
||||
result_type
|
||||
operator()(const Iso_rectangle_2& r) const
|
||||
{
|
||||
return (r.min)().x();
|
||||
|
|
@ -1481,15 +1480,15 @@ namespace CartesianKernelFunctors {
|
|||
};
|
||||
|
||||
template <typename K>
|
||||
class Compute_xmax_2 : public Has_qrt
|
||||
class Compute_xmax_2
|
||||
{
|
||||
typedef typename K::FT FT;
|
||||
typedef typename K::Iso_rectangle_2 Iso_rectangle_2;
|
||||
|
||||
public:
|
||||
typedef FT result_type;
|
||||
typedef const FT& result_type;
|
||||
|
||||
const result_type &
|
||||
result_type
|
||||
operator()(const Iso_rectangle_2& r) const
|
||||
{
|
||||
return (r.max)().x();
|
||||
|
|
@ -1497,15 +1496,15 @@ namespace CartesianKernelFunctors {
|
|||
};
|
||||
|
||||
template <typename K>
|
||||
class Compute_ymin_2 : public Has_qrt
|
||||
class Compute_ymin_2
|
||||
{
|
||||
typedef typename K::FT FT;
|
||||
typedef typename K::Iso_rectangle_2 Iso_rectangle_2;
|
||||
|
||||
public:
|
||||
typedef FT result_type;
|
||||
typedef const FT& result_type;
|
||||
|
||||
const result_type &
|
||||
result_type
|
||||
operator()(const Iso_rectangle_2& r) const
|
||||
{
|
||||
return (r.min)().y();
|
||||
|
|
@ -1513,15 +1512,15 @@ namespace CartesianKernelFunctors {
|
|||
};
|
||||
|
||||
template <typename K>
|
||||
class Compute_ymax_2 : public Has_qrt
|
||||
class Compute_ymax_2
|
||||
{
|
||||
typedef typename K::FT FT;
|
||||
typedef typename K::Iso_rectangle_2 Iso_rectangle_2;
|
||||
|
||||
public:
|
||||
typedef FT result_type;
|
||||
typedef const FT& result_type;
|
||||
|
||||
const result_type &
|
||||
result_type
|
||||
operator()(const Iso_rectangle_2& r) const
|
||||
{
|
||||
return (r.max)().y();
|
||||
|
|
@ -3346,7 +3345,15 @@ namespace CartesianKernelFunctors {
|
|||
typedef typename K::Iso_rectangle_2 Iso_rectangle_2;
|
||||
typedef typename K::Triangle_2 Triangle_2;
|
||||
public:
|
||||
typedef Point_2 result_type;
|
||||
template<class>
|
||||
struct result {
|
||||
typedef const Point_2& type;
|
||||
};
|
||||
|
||||
template<typename F>
|
||||
struct result<F(Iso_rectangle_2, int)> {
|
||||
typedef Point_2 type;
|
||||
};
|
||||
|
||||
const Point_2 &
|
||||
operator()( const Segment_2& s, int i) const
|
||||
|
|
@ -3370,22 +3377,6 @@ namespace CartesianKernelFunctors {
|
|||
|
||||
} //namespace CartesianKernelFunctors
|
||||
|
||||
#ifndef CGAL_CFG_DONT_OVERLOAD_TOO_MUCH
|
||||
template < typename K>
|
||||
struct Qualified_result_of<CartesianKernelFunctors::Construct_vertex_2<K>, typename K::Segment_2, int >
|
||||
{
|
||||
typedef typename K::Point_2 const & type;
|
||||
};
|
||||
|
||||
template < typename K>
|
||||
struct Qualified_result_of<CartesianKernelFunctors::Construct_vertex_2<K>, typename K::Triangle_2, int >
|
||||
{
|
||||
typedef typename K::Point_2 const & type;
|
||||
};
|
||||
#endif
|
||||
|
||||
// For Iso_rectangle the non specialized template will do the right thing, namely return a copy of a point
|
||||
|
||||
namespace CartesianKernelFunctors {
|
||||
|
||||
template <typename K>
|
||||
|
|
|
|||
|
|
@ -110,33 +110,25 @@ public:
|
|||
{}
|
||||
|
||||
|
||||
typename Qualified_result_of
|
||||
<typename R::Construct_circular_source_vertex_2,Circular_arc_2>::type
|
||||
//const Circular_arc_point_2 &
|
||||
typename boost::result_of<typename R::Construct_circular_source_vertex_2(Circular_arc_2)>::type
|
||||
source() const
|
||||
{
|
||||
return typename R::Construct_circular_source_vertex_2()(*this);
|
||||
}
|
||||
|
||||
typename Qualified_result_of
|
||||
<typename R::Construct_circular_target_vertex_2,Circular_arc_2>::type
|
||||
//const Circular_arc_point_2 &
|
||||
typename boost::result_of<typename R::Construct_circular_target_vertex_2(Circular_arc_2)>::type
|
||||
target() const
|
||||
{
|
||||
return typename R::Construct_circular_target_vertex_2()(*this);
|
||||
}
|
||||
|
||||
typename Qualified_result_of
|
||||
<typename R::Construct_circular_min_vertex_2,Circular_arc_2>::type
|
||||
//const Circular_arc_point_2 &
|
||||
typename boost::result_of<typename R::Construct_circular_min_vertex_2(Circular_arc_2)>::type
|
||||
left() const
|
||||
{
|
||||
return typename R::Construct_circular_min_vertex_2()(*this);
|
||||
}
|
||||
|
||||
typename Qualified_result_of
|
||||
<typename R::Construct_circular_max_vertex_2,Circular_arc_2>::type
|
||||
//const Circular_arc_point_2 &
|
||||
typename boost::result_of<typename R::Construct_circular_max_vertex_2(Circular_arc_2)>::type
|
||||
right() const
|
||||
{
|
||||
return typename R::Construct_circular_max_vertex_2()(*this);
|
||||
|
|
@ -152,25 +144,19 @@ public:
|
|||
return typename R::Is_y_monotone_2()(*this);
|
||||
}
|
||||
|
||||
typename Qualified_result_of
|
||||
<typename R::Construct_circle_2,Circular_arc_2>::type
|
||||
// const Circle_2 &
|
||||
typename boost::result_of<typename R::Construct_circle_2(Circular_arc_2)>::type
|
||||
supporting_circle() const
|
||||
{
|
||||
return typename R::Construct_circle_2()(*this);
|
||||
}
|
||||
|
||||
typename Qualified_result_of
|
||||
<typename R::Construct_center_2,Circular_arc_2>::type
|
||||
// const Point_2 &
|
||||
typename boost::result_of<typename R::Construct_center_2(Circular_arc_2)>::type
|
||||
center() const
|
||||
{
|
||||
return typename R::Construct_center_2()(*this);
|
||||
}
|
||||
|
||||
typename Qualified_result_of
|
||||
<typename R::Compute_squared_radius_2, Circular_arc_2>::type
|
||||
// const FT &
|
||||
typename boost::result_of<typename R::Compute_squared_radius_2( Circular_arc_2)>::type
|
||||
squared_radius() const
|
||||
{
|
||||
return typename R::Compute_squared_radius_2()(*this);
|
||||
|
|
|
|||
|
|
@ -73,17 +73,15 @@ public:
|
|||
: RCircular_arc_point_2(typename R::Construct_circular_arc_point_2()(p))
|
||||
{}
|
||||
|
||||
typename Qualified_result_of
|
||||
<typename R::Compute_circular_x_2,Circular_arc_point_2>::type
|
||||
//const Root_of_2 &
|
||||
typename
|
||||
boost::result_of<typename R::Compute_circular_x_2(Circular_arc_point_2)>::type
|
||||
x() const
|
||||
{
|
||||
return typename R::Compute_circular_x_2()(*this);
|
||||
}
|
||||
|
||||
typename Qualified_result_of
|
||||
<typename R::Compute_circular_y_2,Circular_arc_point_2>::type
|
||||
//const Root_of_2 &
|
||||
typename
|
||||
boost::result_of<typename R::Compute_circular_y_2(Circular_arc_point_2)>::type
|
||||
y() const
|
||||
{
|
||||
return typename R::Compute_circular_y_2()(*this);
|
||||
|
|
|
|||
|
|
@ -36,41 +36,33 @@ namespace CGAL {
|
|||
namespace CircularFunctors {
|
||||
|
||||
template < class CK >
|
||||
class Construct_circle_2 : public CK::Linear_kernel::Construct_circle_2
|
||||
class Construct_circle_2 : public CK::Linear_kernel::Construct_circle_2
|
||||
{
|
||||
public:
|
||||
|
||||
typedef typename CK::Circular_arc_2 Circular_arc_2;
|
||||
typedef typename CK::Linear_kernel::Construct_circle_2::result_type
|
||||
result_type;
|
||||
typedef typename CK::Linear_kernel::Construct_circle_2 Base_functor;
|
||||
|
||||
using CK::Linear_kernel::Construct_circle_2::operator();
|
||||
typedef typename CK::FT FT;
|
||||
typedef typename CK::Linear_kernel::Point_2 Point_2;
|
||||
public:
|
||||
typedef typename Base_functor::result_type result_type;
|
||||
|
||||
using Base_functor::operator();
|
||||
|
||||
typedef typename CK::Circular_arc_2 Circular_arc_2;
|
||||
|
||||
result_type
|
||||
operator() ( const typename CK::Polynomial_for_circles_2_2 &eq )
|
||||
{
|
||||
return construct_circle_2<CK>(eq);
|
||||
}
|
||||
operator() ( const typename CK::Polynomial_for_circles_2_2 &eq ) {
|
||||
return construct_circle_2<CK>(eq);
|
||||
}
|
||||
|
||||
const result_type&
|
||||
operator() (const Circular_arc_2 & a) const
|
||||
{
|
||||
return (a.rep().supporting_circle());
|
||||
}
|
||||
result_type
|
||||
operator() (const Circular_arc_2 & a) const {
|
||||
return (a.rep().supporting_circle());
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
} // namespace CircularFunctors
|
||||
|
||||
#ifndef CGAL_CFG_DONT_OVERLOAD_TOO_MUCH
|
||||
template < typename K>
|
||||
struct Qualified_result_of<CircularFunctors::Construct_circle_2<K>,
|
||||
typename K::Circular_arc_2>
|
||||
{
|
||||
typedef const typename K::Circle_2 & type;
|
||||
};
|
||||
#endif
|
||||
|
||||
} // namespace CGAL
|
||||
|
||||
#endif // CGAL_CIRCULAR_KERNEL_FUNCTION_OBJECTS_ON_CIRCLE_2_H
|
||||
|
|
|
|||
|
|
@ -830,17 +830,15 @@ namespace CircularFunctors {
|
|||
|
||||
|
||||
template <class CK>
|
||||
class Compute_circular_x_2: Has_qrt
|
||||
class Compute_circular_x_2
|
||||
{
|
||||
typedef typename CK::Circular_arc_point_2 Circular_arc_point_2;
|
||||
typedef typename CK::Root_of_2 Root_of_2;
|
||||
|
||||
public:
|
||||
typedef const Root_of_2& result_type;
|
||||
|
||||
typedef Root_of_2 result_type;
|
||||
typedef const result_type & qualified_result_type;
|
||||
|
||||
qualified_result_type operator() (const Circular_arc_point_2 & a) const
|
||||
result_type operator() (const Circular_arc_point_2 & a) const
|
||||
{
|
||||
return (a.rep().x());
|
||||
}
|
||||
|
|
@ -848,17 +846,16 @@ namespace CircularFunctors {
|
|||
|
||||
|
||||
template <class CK>
|
||||
class Compute_circular_y_2: Has_qrt
|
||||
{
|
||||
class Compute_circular_y_2
|
||||
{
|
||||
typedef typename CK::Circular_arc_point_2 Circular_arc_point_2;
|
||||
typedef typename CK::Root_of_2 Root_of_2;
|
||||
|
||||
public:
|
||||
|
||||
typedef Root_of_2 result_type;
|
||||
typedef const result_type & qualified_result_type;
|
||||
typedef const Root_of_2& result_type;
|
||||
|
||||
qualified_result_type operator() (const Circular_arc_point_2 & a) const
|
||||
result_type operator() (const Circular_arc_point_2 & a) const
|
||||
{
|
||||
return (a.rep().y());
|
||||
}
|
||||
|
|
@ -866,27 +863,21 @@ namespace CircularFunctors {
|
|||
|
||||
|
||||
template <class CK>
|
||||
class Construct_circular_min_vertex_2 : Has_qrt
|
||||
class Construct_circular_min_vertex_2
|
||||
{
|
||||
typedef typename CK::Circular_arc_2 Circular_arc_2;
|
||||
typedef typename CK::Line_arc_2 Line_arc_2;
|
||||
typedef typename CK::Circular_arc_point_2 Circular_arc_point_2;
|
||||
|
||||
public:
|
||||
typedef const Circular_arc_point_2 & result_type;
|
||||
|
||||
typedef Circular_arc_point_2 result_type;
|
||||
typedef const result_type & qualified_result_type;
|
||||
|
||||
qualified_result_type operator() (const Circular_arc_2 & a) const
|
||||
result_type operator() (const Circular_arc_2 & a) const
|
||||
{
|
||||
// if (a.rep().Cache_minmax == 't')
|
||||
// return (a.rep().source());
|
||||
// if (a.rep().Cache_minmax == 's')
|
||||
// return (a.rep().target());
|
||||
return (a.rep().left());
|
||||
}
|
||||
|
||||
qualified_result_type operator() (const Line_arc_2 & a) const
|
||||
result_type operator() (const Line_arc_2 & a) const
|
||||
{
|
||||
return (a.rep().left());
|
||||
}
|
||||
|
|
@ -894,7 +885,7 @@ namespace CircularFunctors {
|
|||
};
|
||||
|
||||
template <class CK>
|
||||
class Construct_circular_max_vertex_2: Has_qrt
|
||||
class Construct_circular_max_vertex_2
|
||||
{
|
||||
typedef typename CK::Circular_arc_2 Circular_arc_2;
|
||||
typedef typename CK::Line_arc_2 Line_arc_2;
|
||||
|
|
@ -902,19 +893,14 @@ namespace CircularFunctors {
|
|||
|
||||
public:
|
||||
|
||||
typedef Circular_arc_point_2 result_type;
|
||||
typedef const result_type & qualified_result_type;
|
||||
typedef const Circular_arc_point_2& result_type;
|
||||
|
||||
qualified_result_type operator() (const Circular_arc_2 & a) const
|
||||
result_type operator() (const Circular_arc_2 & a) const
|
||||
{
|
||||
// if (a.rep().Cache_minmax == 's')
|
||||
// return (a.rep().source());
|
||||
// if (a.rep().Cache_minmax == 't')
|
||||
// return (a.rep().target());
|
||||
return (a.rep().right());
|
||||
}
|
||||
|
||||
qualified_result_type operator() (const Line_arc_2 & a) const
|
||||
result_type operator() (const Line_arc_2 & a) const
|
||||
{
|
||||
return (a.rep().right());
|
||||
}
|
||||
|
|
@ -922,7 +908,7 @@ namespace CircularFunctors {
|
|||
};
|
||||
|
||||
template <class CK>
|
||||
class Construct_circular_source_vertex_2: Has_qrt
|
||||
class Construct_circular_source_vertex_2
|
||||
{
|
||||
typedef typename CK::Circular_arc_2 Circular_arc_2;
|
||||
typedef typename CK::Line_arc_2 Line_arc_2;
|
||||
|
|
@ -930,20 +916,19 @@ namespace CircularFunctors {
|
|||
|
||||
public:
|
||||
|
||||
typedef Circular_arc_point_2 result_type;
|
||||
typedef const result_type & qualified_result_type;
|
||||
typedef const Circular_arc_point_2& result_type;
|
||||
|
||||
qualified_result_type operator() (const Circular_arc_2 & a) const
|
||||
result_type operator() (const Circular_arc_2 & a) const
|
||||
{ return a.rep().source(); }
|
||||
|
||||
qualified_result_type operator() (const Line_arc_2 & a) const
|
||||
result_type operator() (const Line_arc_2 & a) const
|
||||
{ return a.rep().source();}
|
||||
|
||||
};
|
||||
|
||||
|
||||
template <class CK>
|
||||
class Construct_circular_target_vertex_2: Has_qrt
|
||||
class Construct_circular_target_vertex_2
|
||||
{
|
||||
typedef typename CK::Circular_arc_2 Circular_arc_2;
|
||||
typedef typename CK::Line_arc_2 Line_arc_2;
|
||||
|
|
@ -951,13 +936,12 @@ namespace CircularFunctors {
|
|||
|
||||
public:
|
||||
|
||||
typedef Circular_arc_point_2 result_type;
|
||||
typedef const result_type & qualified_result_type;
|
||||
typedef const Circular_arc_point_2& result_type;
|
||||
|
||||
qualified_result_type operator() (const Circular_arc_2 & a) const
|
||||
result_type operator() (const Circular_arc_2 & a) const
|
||||
{ return a.rep().target();}
|
||||
|
||||
qualified_result_type operator() (const Line_arc_2 & a) const
|
||||
result_type operator() (const Line_arc_2 & a) const
|
||||
{ return a.rep().target();}
|
||||
|
||||
};
|
||||
|
|
@ -1195,7 +1179,7 @@ namespace CircularFunctors {
|
|||
|
||||
#ifndef CGAL_NO_DEPRECATED_CODE
|
||||
template <class CK>
|
||||
class Construct_supporting_circle_2: Has_qrt
|
||||
class Construct_supporting_circle_2
|
||||
{
|
||||
typedef typename CK::Circular_arc_2 Circular_arc_2;
|
||||
typedef typename CK::Circle_2 Circle_2;
|
||||
|
|
@ -1212,7 +1196,7 @@ namespace CircularFunctors {
|
|||
|
||||
|
||||
template <class CK>
|
||||
class Construct_supporting_line_2: Has_qrt
|
||||
class Construct_supporting_line_2
|
||||
{
|
||||
typedef typename CK::Line_arc_2 Line_arc_2;
|
||||
typedef typename CK::Line_2 Line_2;
|
||||
|
|
@ -1233,32 +1217,27 @@ namespace CircularFunctors {
|
|||
class Construct_center_2
|
||||
#ifndef CGAL_CFG_MATCHING_BUG_6
|
||||
: public CK::Linear_kernel::Construct_center_2
|
||||
#else
|
||||
: public Has_qrt
|
||||
#endif
|
||||
{
|
||||
typedef typename CK::Circular_arc_2 Circular_arc_2;
|
||||
public:
|
||||
|
||||
#ifndef CGAL_CFG_MATCHING_BUG_6
|
||||
typedef typename CK::Linear_kernel::Construct_center_2::result_type result_type;
|
||||
using CK::Linear_kernel::Construct_center_2::operator();
|
||||
#else
|
||||
public:
|
||||
typedef typename CK::Linear_kernel::Construct_center_2::result_type result_type;
|
||||
#ifndef CGAL_CFG_MATCHING_BUG_6
|
||||
using CK::Linear_kernel::Construct_center_2::operator();
|
||||
#else
|
||||
|
||||
typedef typename CK::Linear_kernel LK;
|
||||
typedef typename LK::Construct_center_2 LK_Construct_center_2;
|
||||
typedef typename CK::Point_2 Point_2;
|
||||
typedef typename CK::Circle_2 Circle_2;
|
||||
public:
|
||||
typedef Point_2 result_type;
|
||||
typedef typename CK::Point_2 Point_2;
|
||||
typedef typename CK::Circle_2 Circle_2;
|
||||
|
||||
const result_type&
|
||||
operator()( const Circle_2& c) const
|
||||
{ return LK_Construct_center_2()(c); }
|
||||
|
||||
#endif
|
||||
|
||||
const result_type&
|
||||
public:
|
||||
result_type
|
||||
operator()( const Circle_2& c) const
|
||||
{ return LK_Construct_center_2()(c); }
|
||||
|
||||
#endif
|
||||
result_type
|
||||
operator()(const Circular_arc_2& c) const
|
||||
{ return c.rep().center(); }
|
||||
|
||||
|
|
@ -1266,75 +1245,55 @@ namespace CircularFunctors {
|
|||
|
||||
template <typename CK>
|
||||
class Compute_squared_radius_2
|
||||
#ifndef CGAL_CFG_MATCHING_BUG_6
|
||||
: public CK::Linear_kernel::Compute_squared_radius_2
|
||||
#endif
|
||||
{
|
||||
|
||||
private:
|
||||
typedef typename CK::Circular_arc_2 Circular_arc_2;
|
||||
public:
|
||||
|
||||
#ifndef CGAL_CFG_MATCHING_BUG_6
|
||||
typedef typename CK::Linear_kernel::Compute_squared_radius_2::result_type result_type;
|
||||
using CK::Linear_kernel::Compute_squared_radius_2::operator();
|
||||
#else
|
||||
|
||||
typedef typename CK::Linear_kernel LK;
|
||||
typedef typename LK::Compute_squared_radius_2 LK_Compute_squared_radius_2;
|
||||
typedef typename CK::FT FT;
|
||||
typedef typename CK::Point_2 Point_2;
|
||||
typedef typename CK::Circle_2 Circle_2;
|
||||
typedef FT forwarded_result_type;
|
||||
public:
|
||||
typedef FT result_type;
|
||||
template<typename>
|
||||
struct result {
|
||||
typedef forwarded_result_type type;
|
||||
};
|
||||
|
||||
template<typename F>
|
||||
struct result<F(Circular_arc_2)> {
|
||||
typedef const forwarded_result_type& type;
|
||||
};
|
||||
|
||||
template<typename F>
|
||||
struct result<F(Circle_2)> {
|
||||
typedef const forwarded_result_type& type;
|
||||
};
|
||||
|
||||
const result_type&
|
||||
const forwarded_result_type&
|
||||
operator()( const Circle_2& c) const
|
||||
{ return LK_Compute_squared_radius_2()(c); }
|
||||
|
||||
result_type
|
||||
forwarded_result_type
|
||||
operator()( const Point_2& p) const
|
||||
{ return LK_Compute_squared_radius_2()(p); }
|
||||
|
||||
result_type
|
||||
forwarded_result_type
|
||||
operator()( const Point_2& p, const Point_2& q) const
|
||||
{ return LK_Compute_squared_radius_2()(p, q); }
|
||||
|
||||
result_type
|
||||
forwarded_result_type
|
||||
operator()( const Point_2& p, const Point_2& q, const Point_2& r) const
|
||||
{ return LK_Compute_squared_radius_2()(p, q, r); }
|
||||
|
||||
#endif
|
||||
|
||||
const result_type&
|
||||
const forwarded_result_type&
|
||||
operator()(const Circular_arc_2& c) const
|
||||
{ return c.rep().squared_radius(); }
|
||||
|
||||
};
|
||||
|
||||
} // namespace CircularFunctors
|
||||
|
||||
#ifndef CGAL_CFG_DONT_OVERLOAD_TOO_MUCH
|
||||
template < typename K>
|
||||
struct Qualified_result_of<CircularFunctors::Construct_center_2<K>,
|
||||
typename K::Circular_arc_2>
|
||||
{
|
||||
typedef typename K::Point_2 const & type;
|
||||
};
|
||||
|
||||
template < typename K>
|
||||
struct Qualified_result_of<CircularFunctors::Compute_squared_radius_2<K>,
|
||||
typename K::Circular_arc_2>
|
||||
{
|
||||
typedef typename K::FT const & type;
|
||||
};
|
||||
|
||||
template < typename K>
|
||||
struct Qualified_result_of<CircularFunctors::Compute_squared_radius_2<K>,
|
||||
typename K::Circle_2>
|
||||
{
|
||||
typedef typename K::FT const & type;
|
||||
};
|
||||
#endif
|
||||
|
||||
} // namespace CGAL
|
||||
|
||||
#endif // CGAL_CIRCULAR_KERNEL_FUNCTION_OBJECTS_POLYNOMIAL_CIRCULAR_H
|
||||
|
|
|
|||
|
|
@ -93,33 +93,25 @@ public:
|
|||
: RLine_arc_2(a)
|
||||
{}
|
||||
|
||||
typename Qualified_result_of
|
||||
<typename R::Construct_circular_source_vertex_2,Line_arc_2>::type
|
||||
//const Circular_arc_point_2 &
|
||||
typename boost::result_of< typename R::Construct_circular_source_vertex_2(Line_arc_2)>::type
|
||||
source() const
|
||||
{
|
||||
return typename R::Construct_circular_source_vertex_2()(*this);
|
||||
}
|
||||
|
||||
typename Qualified_result_of
|
||||
<typename R::Construct_circular_target_vertex_2,Line_arc_2>::type
|
||||
//const Circular_arc_point_2 &
|
||||
typename boost::result_of< typename R::Construct_circular_target_vertex_2(Line_arc_2)>::type
|
||||
target() const
|
||||
{
|
||||
return typename R::Construct_circular_target_vertex_2()(*this);
|
||||
}
|
||||
|
||||
typename Qualified_result_of
|
||||
<typename R::Construct_circular_min_vertex_2,Line_arc_2>::type
|
||||
//const Circular_arc_point_2 & left() const
|
||||
typename boost::result_of< typename R::Construct_circular_min_vertex_2(Line_arc_2)>::type
|
||||
left() const
|
||||
{
|
||||
return typename R::Construct_circular_min_vertex_2()(*this);
|
||||
}
|
||||
|
||||
typename Qualified_result_of
|
||||
<typename R::Construct_circular_max_vertex_2,Line_arc_2>::type
|
||||
//const Circular_arc_point_2 & right() const
|
||||
typename boost::result_of< typename R::Construct_circular_max_vertex_2(Line_arc_2)>::type
|
||||
right() const
|
||||
{
|
||||
return typename R::Construct_circular_max_vertex_2()(*this);
|
||||
|
|
|
|||
|
|
@ -120,22 +120,19 @@ namespace CGAL {
|
|||
: RCircular_arc_3(a)
|
||||
{}
|
||||
|
||||
typename Qualified_result_of
|
||||
<typename R::Construct_circular_source_vertex_3,Circular_arc_3>::type
|
||||
typename boost::result_of<typename R::Construct_circular_source_vertex_3(Circular_arc_3)>::type
|
||||
source() const
|
||||
{
|
||||
return typename R::Construct_circular_source_vertex_3()(*this);
|
||||
}
|
||||
|
||||
typename Qualified_result_of
|
||||
<typename R::Construct_circular_target_vertex_3,Circular_arc_3>::type
|
||||
typename boost::result_of<typename R::Construct_circular_target_vertex_3(Circular_arc_3)>::type
|
||||
target() const
|
||||
{
|
||||
return typename R::Construct_circular_target_vertex_3()(*this);
|
||||
}
|
||||
|
||||
typename Qualified_result_of
|
||||
<typename R::Construct_circle_3,Circular_arc_3>::type
|
||||
typename boost::result_of<typename R::Construct_circle_3(Circular_arc_3)>::type
|
||||
supporting_circle() const
|
||||
{
|
||||
return typename R::Construct_circle_3()(*this);
|
||||
|
|
|
|||
|
|
@ -197,18 +197,15 @@ public:
|
|||
|
||||
|
||||
|
||||
typename Qualified_result_of<typename R::Compute_circular_x_3,Circular_arc_point_3>::type
|
||||
//const Root_of_2 &
|
||||
typename boost::result_of<typename R::Compute_circular_x_3(Circular_arc_point_3)>::type
|
||||
x() const
|
||||
{ return typename R::Compute_circular_x_3()(*this);}
|
||||
|
||||
typename Qualified_result_of<typename R::Compute_circular_y_3,Circular_arc_point_3>::type
|
||||
//const Root_of_2 &
|
||||
typename boost::result_of<typename R::Compute_circular_y_3(Circular_arc_point_3)>::type
|
||||
y() const
|
||||
{ return typename R::Compute_circular_y_3()(*this);}
|
||||
|
||||
typename Qualified_result_of<typename R::Compute_circular_z_3,Circular_arc_point_3>::type
|
||||
//const Root_of_2 &
|
||||
typename boost::result_of<typename R::Compute_circular_z_3(Circular_arc_point_3)>::type
|
||||
z() const
|
||||
{ return typename R::Compute_circular_z_3()(*this);}
|
||||
|
||||
|
|
|
|||
|
|
@ -107,47 +107,44 @@ template < class SK > \
|
|||
CGAL_SPHERICAL_KERNEL_MACRO_FUNCTOR_COMPARE_(xyz)
|
||||
|
||||
template <class SK>
|
||||
class Compute_circular_x_3: Has_qrt
|
||||
class Compute_circular_x_3
|
||||
{
|
||||
typedef typename SK::Circular_arc_point_3 Circular_arc_point_3;
|
||||
typedef typename SK::Root_of_2 Root_of_2;
|
||||
typedef typename SK::Root_of_2 Root_of_2;
|
||||
|
||||
public:
|
||||
|
||||
typedef Root_of_2 result_type;
|
||||
typedef const result_type & qualified_result_type;
|
||||
typedef const Root_of_2& result_type;
|
||||
|
||||
qualified_result_type operator() (const Circular_arc_point_3 & a) const
|
||||
result_type operator() (const Circular_arc_point_3 & a) const
|
||||
{ return (a.rep().x()); }
|
||||
};
|
||||
|
||||
template <class SK>
|
||||
class Compute_circular_y_3: Has_qrt
|
||||
class Compute_circular_y_3
|
||||
{
|
||||
typedef typename SK::Circular_arc_point_3 Circular_arc_point_3;
|
||||
typedef typename SK::Root_of_2 Root_of_2;
|
||||
|
||||
public:
|
||||
|
||||
typedef Root_of_2 result_type;
|
||||
typedef const result_type & qualified_result_type;
|
||||
typedef const Root_of_2& result_type;
|
||||
|
||||
qualified_result_type operator() (const Circular_arc_point_3 & a) const
|
||||
result_type operator() (const Circular_arc_point_3 & a) const
|
||||
{ return (a.rep().y()); }
|
||||
};
|
||||
|
||||
template <class SK>
|
||||
class Compute_circular_z_3: Has_qrt
|
||||
class Compute_circular_z_3
|
||||
{
|
||||
typedef typename SK::Circular_arc_point_3 Circular_arc_point_3;
|
||||
typedef typename SK::Root_of_2 Root_of_2;
|
||||
|
||||
public:
|
||||
|
||||
typedef Root_of_2 result_type;
|
||||
typedef const result_type & qualified_result_type;
|
||||
typedef const Root_of_2& result_type;
|
||||
|
||||
qualified_result_type operator() (const Circular_arc_point_3 & a) const
|
||||
result_type operator() (const Circular_arc_point_3 & a) const
|
||||
{ return (a.rep().z()); }
|
||||
};
|
||||
|
||||
|
|
@ -415,25 +412,18 @@ template < class SK > \
|
|||
|
||||
template < class SK >
|
||||
class Construct_sphere_3
|
||||
#ifndef CGAL_CFG_MATCHING_BUG_6
|
||||
: public SK::Linear_kernel::Construct_sphere_3
|
||||
#endif
|
||||
{
|
||||
typedef typename SK::Circular_arc_3 Circular_arc_3;
|
||||
|
||||
public:
|
||||
|
||||
typedef typename SK::Linear_kernel::Construct_sphere_3::result_type result_type;
|
||||
#ifndef CGAL_CFG_MATCHING_BUG_6
|
||||
using SK::Linear_kernel::Construct_sphere_3::operator();
|
||||
#else
|
||||
typedef typename SK::Circular_arc_3 Circular_arc_3;
|
||||
typedef typename SK::Linear_kernel LK;
|
||||
typedef typename LK::Point_3 Point_3;
|
||||
typedef typename LK::Circle_3 Circle_3;
|
||||
typedef typename LK::Sphere_3 Sphere_3;
|
||||
typedef typename LK::Construct_sphere_3 LK_Construct_sphere_3;
|
||||
typedef typename LK::FT FT;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
typedef typename SK::Linear_kernel::Construct_sphere_3::result_type result_type;
|
||||
|
||||
result_type
|
||||
operator()( Return_base_tag tag, const Point_3& center, const FT& squared_radius,
|
||||
|
|
@ -496,11 +486,6 @@ template < class SK > \
|
|||
operator() (const Circle_3 & c) const
|
||||
{ return LK_Construct_sphere_3()(c); }
|
||||
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
result_type
|
||||
operator() ( const typename SK::Polynomial_for_spheres_2_3 &eq )
|
||||
{ return SphericalFunctors::construct_sphere_3<SK>(eq); }
|
||||
|
|
@ -512,19 +497,8 @@ template < class SK > \
|
|||
|
||||
template < class SK >
|
||||
class Construct_plane_3
|
||||
#ifndef CGAL_CFG_MATCHING_BUG_6
|
||||
: public SK::Linear_kernel::Construct_plane_3
|
||||
#endif
|
||||
{
|
||||
typedef typename SK::Circular_arc_3 Circular_arc_3;
|
||||
|
||||
public:
|
||||
|
||||
typedef typename SK::Linear_kernel::Construct_plane_3::result_type result_type;
|
||||
|
||||
#ifndef CGAL_CFG_MATCHING_BUG_6
|
||||
using SK::Linear_kernel::Construct_plane_3::operator();
|
||||
#else
|
||||
typedef typename SK::Circular_arc_3 Circular_arc_3;
|
||||
typedef typename SK::Linear_kernel LK;
|
||||
typedef typename LK::Construct_plane_3 LK_Construct_plane_3;
|
||||
typedef typename LK::RT RT;
|
||||
|
|
@ -537,6 +511,10 @@ template < class SK > \
|
|||
typedef typename LK::Plane_3 Plane_3;
|
||||
typedef typename LK::Circle_3 Circle_3;
|
||||
|
||||
public:
|
||||
|
||||
typedef typename SK::Linear_kernel::Construct_plane_3::result_type result_type;
|
||||
|
||||
public:
|
||||
|
||||
result_type
|
||||
|
|
@ -603,8 +581,6 @@ template < class SK > \
|
|||
operator()(const Circle_3 & c) const
|
||||
{ return this->operator()(Return_base_tag(), c); }
|
||||
|
||||
#endif
|
||||
|
||||
result_type
|
||||
operator() ( const typename SK::Polynomial_1_3 &eq )
|
||||
{ return SphericalFunctors::construct_plane_3<SK>(eq); }
|
||||
|
|
@ -617,32 +593,18 @@ template < class SK > \
|
|||
|
||||
template <class SK>
|
||||
class Construct_line_3
|
||||
#ifndef CGAL_CFG_MATCHING_BUG_6
|
||||
|
||||
: public SK::Linear_kernel::Construct_line_3
|
||||
#endif
|
||||
{
|
||||
typedef typename SK::Line_arc_3 Line_arc_3;
|
||||
typedef typename SK::Line_3 Line_3;
|
||||
|
||||
public:
|
||||
|
||||
typedef typename SK::Linear_kernel::Construct_line_3::result_type
|
||||
result_type;
|
||||
|
||||
typedef const result_type & qualified_result_type;
|
||||
|
||||
#ifndef CGAL_CFG_MATCHING_BUG_6
|
||||
using SK::Linear_kernel::Construct_line_3::operator();
|
||||
#else
|
||||
|
||||
typedef typename SK::Point_3 Point_3;
|
||||
typedef typename SK::Direction_3 Direction_3;
|
||||
typedef typename SK::Vector_3 Vector_3;
|
||||
typedef typename SK::Segment_3 Segment_3;
|
||||
typedef typename SK::Ray_3 Ray_3;
|
||||
public:
|
||||
typedef typename SK::Linear_kernel::Construct_line_3 LK_Construct_line_3;
|
||||
|
||||
typedef typename LK_Construct_line_3::result_type result_type;
|
||||
|
||||
result_type
|
||||
operator()(Return_base_tag, const Point_3& p, const Point_3& q) const
|
||||
{ return LK_Construct_line_3()(p, Vector_3(p, q)); }
|
||||
|
|
@ -684,9 +646,8 @@ template < class SK > \
|
|||
operator()(const Ray_3& r) const
|
||||
{ return this->operator()(Return_base_tag(), r); }
|
||||
|
||||
|
||||
#endif
|
||||
qualified_result_type operator() (const Line_arc_3 & a) const
|
||||
const result_type&
|
||||
operator() (const Line_arc_3 & a) const
|
||||
{ return (a.rep().supporting_line()); }
|
||||
|
||||
result_type
|
||||
|
|
@ -696,10 +657,10 @@ template < class SK > \
|
|||
};
|
||||
|
||||
template < class SK >
|
||||
class Construct_circle_3 : public SK::Linear_kernel::Construct_circle_3
|
||||
class Construct_circle_3
|
||||
{
|
||||
public:
|
||||
|
||||
typedef typename SK::Linear_kernel::Construct_circle_3 Extended;
|
||||
typedef typename Extended::result_type forwarded_result_type;
|
||||
typedef typename SK::FT FT;
|
||||
typedef typename SK::Point_3 Point_3;
|
||||
typedef typename SK::Plane_3 Plane_3;
|
||||
|
|
@ -710,17 +671,61 @@ template < class SK > \
|
|||
typedef typename SK::Circular_arc_3 Circular_arc_3;
|
||||
typedef typename SK::Kernel_base::Circle_3 RCircle_3;
|
||||
typedef typename Circle_3::Rep Rep;
|
||||
public:
|
||||
template<typename>
|
||||
struct result {
|
||||
typedef forwarded_result_type type;
|
||||
};
|
||||
|
||||
template<typename F>
|
||||
struct result<F(Circular_arc_3)> {
|
||||
typedef const forwarded_result_type& type;
|
||||
};
|
||||
|
||||
typedef typename SK::Linear_kernel::Construct_circle_3::result_type result_type;
|
||||
typedef const result_type & qualified_result_type;
|
||||
forwarded_result_type
|
||||
operator()(const Point_3& p, const FT& sr,
|
||||
const Plane_3& plane) const
|
||||
{ return Extended()(p, sr, plane); }
|
||||
|
||||
using SK::Linear_kernel::Construct_circle_3::operator();
|
||||
forwarded_result_type
|
||||
operator() (const Point_3& p, const FT& sr,
|
||||
const Vector_3& v) const
|
||||
{ return Extended()(p, sr, v); }
|
||||
|
||||
result_type
|
||||
forwarded_result_type
|
||||
operator() (const Point_3& p, const FT& sr,
|
||||
const Direction_3& d) const
|
||||
{ return Extended()(p, sr, d); }
|
||||
|
||||
forwarded_result_type
|
||||
operator() (const Sphere_3& s1, const Sphere_3& s2) const
|
||||
{ return Extended()(s1, s2); }
|
||||
|
||||
forwarded_result_type
|
||||
operator() (const Plane_3& p, const Sphere_3& s) const
|
||||
{ return Extended()(p, s); }
|
||||
|
||||
forwarded_result_type
|
||||
operator() (const Sphere_3& s, const Plane_3& p) const
|
||||
{ return Extended()(p, s); }
|
||||
|
||||
forwarded_result_type
|
||||
operator() (const Plane_3& p, const Sphere_3& s, int a) const
|
||||
{ return Extended()(p, s, a); }
|
||||
|
||||
forwarded_result_type
|
||||
operator() (const Sphere_3& s, const Plane_3& p, int a) const
|
||||
{ return Extended()(p, s, a); }
|
||||
|
||||
forwarded_result_type
|
||||
operator()( const Point_3& p1, const Point_3& p2, const Point_3& p3) const
|
||||
{ return Extended()(p1, p2, p3); }
|
||||
|
||||
forwarded_result_type
|
||||
operator() ( const typename SK::Polynomials_for_circle_3 &eq )
|
||||
{ return Rep(construct_circle_3<SK>(eq)); }
|
||||
|
||||
qualified_result_type
|
||||
const forwarded_result_type&
|
||||
operator() (const Circular_arc_3 & a) const
|
||||
{ return (a.rep().supporting_circle()); }
|
||||
|
||||
|
|
@ -882,39 +887,37 @@ template < class SK > \
|
|||
};
|
||||
|
||||
template <class SK>
|
||||
class Construct_circular_min_vertex_3 : Has_qrt
|
||||
class Construct_circular_min_vertex_3
|
||||
{
|
||||
typedef typename SK::Line_arc_3 Line_arc_3;
|
||||
typedef typename SK::Circular_arc_point_3 Circular_arc_point_3;
|
||||
|
||||
public:
|
||||
|
||||
typedef Circular_arc_point_3 result_type;
|
||||
typedef const result_type & qualified_result_type;
|
||||
typedef const Circular_arc_point_3& result_type;
|
||||
|
||||
qualified_result_type operator() (const Line_arc_3 & a) const
|
||||
result_type operator() (const Line_arc_3 & a) const
|
||||
{ return (a.rep().lower_xyz_extremity()); }
|
||||
|
||||
};
|
||||
|
||||
template <class SK>
|
||||
class Construct_circular_max_vertex_3 : Has_qrt
|
||||
class Construct_circular_max_vertex_3
|
||||
{
|
||||
typedef typename SK::Line_arc_3 Line_arc_3;
|
||||
typedef typename SK::Circular_arc_point_3 Circular_arc_point_3;
|
||||
|
||||
public:
|
||||
|
||||
typedef Circular_arc_point_3 result_type;
|
||||
typedef const result_type & qualified_result_type;
|
||||
typedef const Circular_arc_point_3& result_type;
|
||||
|
||||
qualified_result_type operator() (const Line_arc_3 & a) const
|
||||
result_type operator() (const Line_arc_3 & a) const
|
||||
{ return (a.rep().higher_xyz_extremity()); }
|
||||
|
||||
};
|
||||
|
||||
template <class SK>
|
||||
class Construct_circular_source_vertex_3 : Has_qrt
|
||||
class Construct_circular_source_vertex_3
|
||||
{
|
||||
typedef typename SK::Line_arc_3 Line_arc_3;
|
||||
typedef typename SK::Circular_arc_3 Circular_arc_3;
|
||||
|
|
@ -922,19 +925,18 @@ template < class SK > \
|
|||
|
||||
public:
|
||||
|
||||
typedef Circular_arc_point_3 result_type;
|
||||
typedef const result_type & qualified_result_type;
|
||||
typedef const Circular_arc_point_3& result_type;
|
||||
|
||||
qualified_result_type operator() (const Line_arc_3 & a) const
|
||||
result_type operator() (const Line_arc_3 & a) const
|
||||
{ return (a.rep().source()); }
|
||||
|
||||
qualified_result_type operator() (const Circular_arc_3 & a) const
|
||||
result_type operator() (const Circular_arc_3 & a) const
|
||||
{ return (a.rep().source()); }
|
||||
|
||||
};
|
||||
|
||||
template <class SK>
|
||||
class Construct_circular_target_vertex_3 : Has_qrt
|
||||
class Construct_circular_target_vertex_3
|
||||
{
|
||||
typedef typename SK::Line_arc_3 Line_arc_3;
|
||||
typedef typename SK::Circular_arc_point_3 Circular_arc_point_3;
|
||||
|
|
@ -942,13 +944,12 @@ template < class SK > \
|
|||
|
||||
public:
|
||||
|
||||
typedef Circular_arc_point_3 result_type;
|
||||
typedef const result_type & qualified_result_type;
|
||||
typedef const Circular_arc_point_3& result_type;
|
||||
|
||||
qualified_result_type operator() (const Line_arc_3 & a) const
|
||||
result_type operator() (const Line_arc_3 & a) const
|
||||
{ return (a.rep().target()); }
|
||||
|
||||
qualified_result_type operator() (const Circular_arc_3 & a) const
|
||||
result_type operator() (const Circular_arc_3 & a) const
|
||||
{ return (a.rep().target()); }
|
||||
|
||||
};
|
||||
|
|
@ -1845,20 +1846,6 @@ template < class SK > \
|
|||
|
||||
} // namespace SphericalFunctors
|
||||
|
||||
template < typename K >
|
||||
struct Qualified_result_of<SphericalFunctors::Construct_line_3<K>,
|
||||
typename K::Line_arc_3>
|
||||
{
|
||||
typedef typename K::Line_3 const & type;
|
||||
};
|
||||
|
||||
template < typename K >
|
||||
struct Qualified_result_of<SphericalFunctors::Construct_circle_3<K>,
|
||||
typename K::Circular_arc_3>
|
||||
{
|
||||
typedef typename K::Circle_3 const & type;
|
||||
};
|
||||
|
||||
} // namespace CGAL
|
||||
|
||||
#endif // CGAL_SPHERICAL_KERNEL_FUNCTION_OBJECTS_POLYNOMIAL_SPHERE_H
|
||||
|
|
|
|||
|
|
@ -122,37 +122,32 @@ namespace CGAL {
|
|||
Line_arc_3(const RLine_arc_3 &a)
|
||||
: RLine_arc_3(a)
|
||||
{}
|
||||
|
||||
typename Qualified_result_of
|
||||
<typename R::Construct_circular_source_vertex_3,Line_arc_3>::type
|
||||
|
||||
typename boost::result_of<typename R::Construct_circular_source_vertex_3(Line_arc_3)>::type
|
||||
source() const
|
||||
{
|
||||
return typename R::Construct_circular_source_vertex_3()(*this);
|
||||
}
|
||||
|
||||
typename Qualified_result_of
|
||||
<typename R::Construct_circular_target_vertex_3,Line_arc_3>::type
|
||||
typename boost::result_of<typename R::Construct_circular_target_vertex_3(Line_arc_3)>::type
|
||||
target() const
|
||||
{
|
||||
return typename R::Construct_circular_target_vertex_3()(*this);
|
||||
}
|
||||
|
||||
typename Qualified_result_of
|
||||
<typename R::Construct_circular_min_vertex_3,Line_arc_3>::type
|
||||
typename boost::result_of<typename R::Construct_circular_min_vertex_3(Line_arc_3)>::type
|
||||
lower_xyz_extremity() const
|
||||
{
|
||||
return typename R::Construct_circular_min_vertex_3()(*this);
|
||||
}
|
||||
|
||||
typename Qualified_result_of
|
||||
<typename R::Construct_circular_max_vertex_3,Line_arc_3>::type
|
||||
typename boost::result_of<typename R::Construct_circular_max_vertex_3(Line_arc_3)>::type
|
||||
higher_xyz_extremity() const
|
||||
{
|
||||
return typename R::Construct_circular_max_vertex_3()(*this);
|
||||
}
|
||||
|
||||
typename Qualified_result_of
|
||||
<typename R::Construct_line_3,Line_arc_3>::type
|
||||
typename boost::result_of<typename R::Construct_line_3(Line_arc_3)>::type
|
||||
supporting_line() const
|
||||
{
|
||||
return typename R::Construct_line_3()(*this);
|
||||
|
|
|
|||
|
|
@ -149,8 +149,8 @@ namespace CGAL {
|
|||
}
|
||||
|
||||
/// Postfix ++ operator.
|
||||
void operator++(int)
|
||||
{ operator++(); }
|
||||
Self operator++(int)
|
||||
{ Self res=*this; operator ++(); return res; }
|
||||
|
||||
private:
|
||||
/// A mark used to mark treated cells.
|
||||
|
|
@ -237,8 +237,8 @@ namespace CGAL {
|
|||
}
|
||||
|
||||
/// Postfix ++ operator.
|
||||
void operator++(int)
|
||||
{ operator++(); }
|
||||
Self operator++(int)
|
||||
{ Self res=*this; operator ++(); return res; }
|
||||
|
||||
/// Prefix ++ operator.
|
||||
Self& operator++()
|
||||
|
|
@ -339,8 +339,8 @@ namespace CGAL {
|
|||
}
|
||||
|
||||
/// Postfix ++ operator.
|
||||
void operator++(int)
|
||||
{ operator++(); }
|
||||
Self operator++(int)
|
||||
{ Self res=*this; operator ++(); return res; }
|
||||
|
||||
/// Prefix ++ operator.
|
||||
Self& operator++()
|
||||
|
|
|
|||
|
|
@ -51,12 +51,6 @@ namespace CGAL {
|
|||
class Alloc_=CGAL_ALLOCATOR(int) >
|
||||
class Combinatorial_map_base
|
||||
{
|
||||
template <typename Map,unsigned int i>
|
||||
friend struct internal::sew_functor;
|
||||
|
||||
template <typename Map,unsigned int i>
|
||||
friend struct internal::unsew_functor;
|
||||
|
||||
template<class Map, unsigned int i, unsigned int nmi>
|
||||
friend struct Remove_cell_functor;
|
||||
|
||||
|
|
@ -834,6 +828,38 @@ namespace CGAL {
|
|||
(mattribute_containers);
|
||||
}
|
||||
|
||||
/** Double link a dart with beta 0 to a second dart.
|
||||
* \em adart1 is 0-linked to \em adart2 and \em adart2 is 1-linked
|
||||
* with \em adart1. Attributes are not updated, thus we can obtain
|
||||
* a non-valid map with darts belonging to a same orbit and having
|
||||
* different attributes.
|
||||
* @param adart1 a first dart.
|
||||
* @param adart2 a second dart.
|
||||
*/
|
||||
void basic_link_beta_0(Dart_handle adart1, Dart_handle adart2)
|
||||
{
|
||||
CGAL_assertion(adart1 != NULL && adart2 != NULL);
|
||||
CGAL_assertion(adart1 != null_dart_handle && adart2 != null_dart_handle);
|
||||
adart1->basic_link_beta(adart2, 0);
|
||||
adart2->basic_link_beta(adart1, 1);
|
||||
}
|
||||
|
||||
/** Double link a dart with beta 0 to a second dart.
|
||||
* \em adart1 is 0-linked to \em adart2 and \em adart2 is 1-linked
|
||||
* with \em adart1. Attributes are not updated, thus we can obtain
|
||||
* a non-valid map with darts belonging to a same orbit and having
|
||||
* different attributes.
|
||||
* @param adart1 a first dart.
|
||||
* @param adart2 a second dart.
|
||||
*/
|
||||
void basic_link_beta_1(Dart_handle adart1, Dart_handle adart2)
|
||||
{
|
||||
CGAL_assertion(adart1 != NULL && adart2 != NULL);
|
||||
CGAL_assertion(adart1 != null_dart_handle && adart2 != null_dart_handle);
|
||||
adart1->basic_link_beta(adart2, 1);
|
||||
adart2->basic_link_beta(adart1, 0);
|
||||
}
|
||||
|
||||
/** Double link a dart with beta i to a second dart, when i>=2.
|
||||
* \em adart1 is i-linked to \em adart2 and \em adart2 is i-linked
|
||||
* with \em adart1. Attributes are not updated, thus we can obtain
|
||||
|
|
@ -841,9 +867,10 @@ namespace CGAL {
|
|||
* different attributes.
|
||||
* @param adart1 a first dart.
|
||||
* @param adart2 a second dart.
|
||||
* @param i the dimension of the beta
|
||||
* @param i the dimension of the beta.
|
||||
*/
|
||||
void basic_link_beta(Dart_handle adart1, Dart_handle adart2, unsigned int i)
|
||||
void basic_link_beta_for_involution(Dart_handle adart1, Dart_handle adart2,
|
||||
unsigned int i)
|
||||
{
|
||||
CGAL_assertion( i>=2 && i<=dimension );
|
||||
CGAL_assertion(adart1 != NULL && adart2 != NULL && adart1!=adart2);
|
||||
|
|
@ -862,34 +889,81 @@ namespace CGAL {
|
|||
*/
|
||||
template<unsigned int i>
|
||||
void basic_link_beta(Dart_handle adart1, Dart_handle adart2)
|
||||
{ internal::basic_link_beta_functor<Self,i>::run(*this,adart1,adart2); }
|
||||
|
||||
/** Double unlink a dart with beta0.
|
||||
* beta0(\em adart) is 1-unlinked and \em adart is 0-unlinked.
|
||||
* The attributes are not updated, thus we can obtain a non-valid map
|
||||
* with darts belonging to different orbits and having the same
|
||||
* attributes.
|
||||
* @param adart a dart.
|
||||
*/
|
||||
template<unsigned int i>
|
||||
void unlink_beta(Dart_handle adart)
|
||||
{ internal::unlink_beta_functor<Self,i>::run(*this,adart); }
|
||||
|
||||
/** Double unlink a dart with beta i, for i>=2.
|
||||
* betai(\em adart) is i-unlinked and \em adart is i-unlinked.
|
||||
* The attributes are not updated, thus we can obtain a non-valid map
|
||||
* with darts belonging to different orbits and having the same
|
||||
* attributes.
|
||||
* @param adart a dart.
|
||||
* @param i the dimension of the beta
|
||||
*/
|
||||
void unlink_beta(Dart_handle adart, unsigned int i)
|
||||
{
|
||||
CGAL_assertion(adart!=NULL && adart!=null_dart_handle &&
|
||||
!adart->is_free(i));
|
||||
CGAL_assertion(2<=i && i<=dimension);
|
||||
adart->beta(i)->unlink_beta(i);
|
||||
adart->unlink_beta(i);
|
||||
if ( i==0 ) basic_link_beta_0(adart1, adart2);
|
||||
else if ( i==1 ) basic_link_beta_1(adart1, adart2);
|
||||
else basic_link_beta_for_involution(adart1, adart2, i);
|
||||
}
|
||||
void basic_link_beta(Dart_handle adart1, Dart_handle adart2,
|
||||
unsigned int i)
|
||||
{
|
||||
if ( i==0 ) basic_link_beta_0(adart1, adart2);
|
||||
else if ( i==1 ) basic_link_beta_1(adart1, adart2);
|
||||
else basic_link_beta_for_involution(adart1, adart2, i);
|
||||
}
|
||||
|
||||
/** Double link two darts, and update the NULL attributes.
|
||||
* \em adart1 is 0-linked to \em adart2 and \em adart2 is 1-linked
|
||||
* with \em adart1. The NULL attributes of \em adart1 are updated to
|
||||
* non NULL attributes associated to \em adart2, and vice-versa.
|
||||
* We can obtain a non-valid map with darts belonging to a same cell
|
||||
* and having different attributes.
|
||||
* @param adart1 a first dart.
|
||||
* @param adart2 a second dart.
|
||||
*/
|
||||
void link_beta_0(Dart_handle adart1, Dart_handle adart2)
|
||||
{
|
||||
CGAL_assertion(adart1 != NULL && adart2 != NULL);
|
||||
CGAL_assertion(adart1 != null_dart_handle && adart2 != null_dart_handle);
|
||||
Helper::template Foreach_enabled_attributes
|
||||
<internal::Group_attribute_functor_of_dart<Self> >::
|
||||
run(this,adart1,adart2,0);
|
||||
adart1->basic_link_beta(adart2, 0);
|
||||
adart2->basic_link_beta(adart1, 1);
|
||||
}
|
||||
|
||||
/** Double link two darts, and update the NULL attributes.
|
||||
* \em adart1 is 1-linked to \em adart2 and \em adart2 is 0-linked
|
||||
* with \em adart1. The NULL attributes of \em adart1 are updated to
|
||||
* non NULL attributes associated to \em adart2, and vice-versa.
|
||||
* We can obtain a non-valid map with darts belonging to a same cell
|
||||
* and having different attributes.
|
||||
* @param adart1 a first dart.
|
||||
* @param adart2 a second dart.
|
||||
*/
|
||||
void link_beta_1(Dart_handle adart1, Dart_handle adart2)
|
||||
{
|
||||
CGAL_assertion(adart1 != NULL && adart2 != NULL);
|
||||
CGAL_assertion(adart1 != null_dart_handle && adart2 != null_dart_handle);
|
||||
Helper::template Foreach_enabled_attributes
|
||||
<internal::Group_attribute_functor_of_dart<Self> >::
|
||||
run(this,adart1,adart2,1);
|
||||
adart1->basic_link_beta(adart2, 1);
|
||||
adart2->basic_link_beta(adart1, 0);
|
||||
}
|
||||
|
||||
/** Double link two darts, and update the NULL attributes.
|
||||
* \em adart1 is i-linked to \em adart2 and \em adart2 is i^-1-linked
|
||||
* with \em adart1. The NULL attributes of \em adart1 are updated to
|
||||
* non NULL attributes associated to \em adart2, and vice-versa.
|
||||
* We can obtain a non-valid map with darts belonging to a same cell
|
||||
* and having different attributes.
|
||||
* @param adart1 a first dart.
|
||||
* @param adart2 a second dart.
|
||||
* @param i the dimension of the beta.
|
||||
* @pre 2<=i<=dimension.
|
||||
*/
|
||||
void link_beta_for_involution(Dart_handle adart1, Dart_handle adart2,
|
||||
unsigned int i)
|
||||
{
|
||||
CGAL_assertion(adart1 != NULL && adart2 != NULL && adart1!=adart2 );
|
||||
CGAL_assertion(adart1 != null_dart_handle && adart2 != null_dart_handle);
|
||||
CGAL_assertion( 2<=i && i<=dimension );
|
||||
Helper::template Foreach_enabled_attributes
|
||||
<internal::Group_attribute_functor_of_dart<Self> >::
|
||||
run(this,adart1,adart2,i);
|
||||
adart1->basic_link_beta(adart2, i);
|
||||
adart2->basic_link_beta(adart1, i);
|
||||
}
|
||||
|
||||
/** Double link two darts, and update the NULL attributes.
|
||||
|
|
@ -903,29 +977,16 @@ namespace CGAL {
|
|||
*/
|
||||
template<unsigned int i>
|
||||
void link_beta(Dart_handle adart1, Dart_handle adart2)
|
||||
{ internal::link_beta_functor<Self,i>::run(*this,adart1,adart2); }
|
||||
|
||||
/** Double link two darts, and update the NULL attributes.
|
||||
* \em adart1 is i-linked to \em adart2 and \em adart2 is i^-1-linked
|
||||
* with \em adart1. The NULL attributes of \em adart1 are updated to
|
||||
* non NULL attributes associated to \em adart2, and vice-versa.
|
||||
* We can obtain a non-valid map with darts belonging to a same cell
|
||||
* and having different attributes.
|
||||
* @param adart1 a first dart.
|
||||
* @param adart2 a second dart.
|
||||
* @param i the dimension of the beta.
|
||||
* @pre 2<=i<=dimension
|
||||
*/
|
||||
{
|
||||
if ( i==0 ) link_beta_0(adart1, adart2);
|
||||
else if ( i==1 ) link_beta_1(adart1, adart2);
|
||||
else link_beta_for_involution(adart1, adart2, i);
|
||||
}
|
||||
void link_beta(Dart_handle adart1, Dart_handle adart2, unsigned int i)
|
||||
{
|
||||
CGAL_assertion(adart1 != NULL && adart2 != NULL && adart1!=adart2 );
|
||||
CGAL_assertion(adart1 != null_dart_handle && adart2 != null_dart_handle);
|
||||
CGAL_assertion( 2<=i && i<=dimension );
|
||||
adart1->basic_link_beta(adart2, i);
|
||||
adart2->basic_link_beta(adart1, i);
|
||||
Helper::template Foreach_enabled_attributes
|
||||
<internal::Group_attribute_functor_of_dart<Self> >::
|
||||
run(this,adart1,adart2,i);
|
||||
if ( i==0 ) link_beta_0(adart1, adart2);
|
||||
else if ( i==1 ) link_beta_1(adart1, adart2);
|
||||
else link_beta_for_involution(adart1, adart2, i);
|
||||
}
|
||||
|
||||
/** Double link a dart with betai to a second dart.
|
||||
|
|
@ -935,7 +996,7 @@ namespace CGAL {
|
|||
* if update_attributes==true.
|
||||
* @param adart1 a first dart.
|
||||
* @param adart2 a second dart.
|
||||
* @param update_attributes a boolean to update the enabled attributes
|
||||
* @param update_attributes a boolean to update the enabled attributes.
|
||||
*/
|
||||
template<unsigned int i>
|
||||
void link_beta(Dart_handle adart1, Dart_handle adart2,
|
||||
|
|
@ -945,6 +1006,167 @@ namespace CGAL {
|
|||
else basic_link_beta<i>(adart1, adart2);
|
||||
}
|
||||
|
||||
/** Double unlink a dart with beta 0.
|
||||
* beta0(\em adart) is 1-unlinked and \em adart is 0-unlinked.
|
||||
* The attributes are not updated, thus we can obtain a non-valid map
|
||||
* with darts belonging to different orbits and having the same
|
||||
* attributes.
|
||||
* @param adart a dart.
|
||||
*/
|
||||
void unlink_beta_0(Dart_handle adart)
|
||||
{
|
||||
CGAL_assertion(adart != NULL && !adart->is_free(0));
|
||||
adart->beta(0)->unlink_beta(1);
|
||||
adart->unlink_beta(0);
|
||||
}
|
||||
|
||||
/** Double unlink a dart with beta 1.
|
||||
* beta1(\em adart) is 0-unlinked and \em adart is 1-unlinked.
|
||||
* The attributes are not updated, thus we can obtain a non-valid map
|
||||
* with darts belonging to different orbits and having the same
|
||||
* attributes.
|
||||
* @param adart a dart.
|
||||
*/
|
||||
void unlink_beta_1(Dart_handle adart)
|
||||
{
|
||||
CGAL_assertion(adart != NULL && !adart->is_free(1));
|
||||
adart->beta(1)->unlink_beta(0);
|
||||
adart->unlink_beta(1);
|
||||
}
|
||||
|
||||
/** Double unlink a dart with beta i, for i>=2.
|
||||
* betai(\em adart) is i-unlinked and \em adart is i-unlinked.
|
||||
* The attributes are not updated, thus we can obtain a non-valid map
|
||||
* with darts belonging to different orbits and having the same
|
||||
* attributes.
|
||||
* @param adart a dart.
|
||||
* @param i the dimension of the beta.
|
||||
*/
|
||||
void unlink_beta_for_involution(Dart_handle adart, unsigned int i)
|
||||
{
|
||||
CGAL_assertion(adart!=NULL && adart!=null_dart_handle &&
|
||||
!adart->is_free(i));
|
||||
CGAL_assertion(2<=i && i<=dimension);
|
||||
adart->beta(i)->unlink_beta(i);
|
||||
adart->unlink_beta(i);
|
||||
}
|
||||
|
||||
/** Double unlink a dart with beta i.
|
||||
* betai(\em adart) is i-1-unlinked and \em adart is i-unlinked.
|
||||
* The attributes are not updated, thus we can obtain a non-valid map
|
||||
* with darts belonging to different orbits and having the same
|
||||
* attributes.
|
||||
* @param adart a dart.
|
||||
* @param i the dimension of the beta.
|
||||
*/
|
||||
template<unsigned int i>
|
||||
void unlink_beta(Dart_handle adart)
|
||||
{
|
||||
if ( i==0 ) unlink_beta_0(adart);
|
||||
else if ( i==1 ) unlink_beta_1(adart);
|
||||
else unlink_beta_for_involution(adart, i);
|
||||
}
|
||||
void unlink_beta(Dart_handle adart, unsigned int i)
|
||||
{
|
||||
if ( i==0 ) unlink_beta_0(adart);
|
||||
else if ( i==1 ) unlink_beta_1(adart);
|
||||
else unlink_beta_for_involution(adart, i);
|
||||
}
|
||||
|
||||
/** Test if it is possible to sew by beta1 the two given darts
|
||||
* @param adart1 the first dart.
|
||||
* @param adart2 the second dart.
|
||||
* @return true iff \em adart1 can be 1-sewn with \em adart2.
|
||||
*/
|
||||
bool is_sewable_1(Dart_const_handle adart1, Dart_const_handle adart2) const
|
||||
{
|
||||
CGAL_assertion(adart1!=NULL && adart2!=NULL);
|
||||
|
||||
if ( !adart1->is_free(1) || !adart2->is_free(0) )
|
||||
return false;
|
||||
|
||||
if ( adart1 == adart2 ) return true;
|
||||
|
||||
CMap_dart_const_iterator_of_involution <Self,1> I1(*this, adart1);
|
||||
CMap_dart_const_iterator_of_involution_inv<Self,1> I2(*this, adart2);
|
||||
bool res = true;
|
||||
while (res && I1.cont() && I2.cont())
|
||||
{
|
||||
// We can remove this constraint which is not required for
|
||||
// combinatorial map definition, but which imposes quite "normal"
|
||||
// configurations
|
||||
if ( I1==adart2 || I2==adart1 ) res=false;
|
||||
|
||||
for (unsigned int j=3;res && j<=Self::dimension; ++j)
|
||||
{
|
||||
if ( I1->is_free(j)!=I2->is_free(j) )
|
||||
{
|
||||
res = false;
|
||||
}
|
||||
}
|
||||
++I1; ++I2;
|
||||
}
|
||||
if (I1.cont() != I2.cont())
|
||||
res = false;
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
/** Test if it is possible to sew by beta0 the two given darts
|
||||
* @param adart1 the first dart.
|
||||
* @param adart2 the second dart.
|
||||
* @return true iff \em adart1 can be 0-sewn with \em adart2.
|
||||
*/
|
||||
bool is_sewable_0(Dart_const_handle adart1, Dart_const_handle adart2) const
|
||||
{ return is_sewable_1(adart2, adart1); }
|
||||
|
||||
/** Test if it is possible to sew by betai the two given darts
|
||||
* for 2<=i<=dimension.
|
||||
* @param adart1 the first dart.
|
||||
* @param adart2 the second dart.
|
||||
* @return true iff \em adart1 can be 1-sewn with \em adart2.
|
||||
*/
|
||||
template<unsigned int i>
|
||||
bool is_sewable_for_involution(Dart_const_handle adart1,
|
||||
Dart_const_handle adart2) const
|
||||
{
|
||||
CGAL_assertion(2<=i && i<=Self::dimension);
|
||||
CGAL_assertion(adart1!=NULL && adart2!=NULL);
|
||||
|
||||
if ( !adart1->is_free(i) || !adart2->is_free(i) || adart1==adart2 )
|
||||
return false;
|
||||
|
||||
CMap_dart_const_iterator_of_involution<Self,i> I1(*this, adart1);
|
||||
CMap_dart_const_iterator_of_involution_inv<Self,i> I2(*this, adart2);
|
||||
bool res = true;
|
||||
while (res && I1.cont() && I2.cont())
|
||||
{
|
||||
// We can remove this constraint which is not required for
|
||||
// combinatorial map definition, but which is quite "normal"
|
||||
if ( I1==adart2 || I2==adart1 ) res=false;
|
||||
|
||||
// Special case to consider beta0 and beta1
|
||||
if ( i>2 )
|
||||
{
|
||||
if ( I1->is_free(0)!=I2->is_free(1) ) res = false;
|
||||
else if ( I1->is_free(1)!=I2->is_free(0) ) res = false;
|
||||
}
|
||||
|
||||
// General case
|
||||
for (unsigned int j=2;res && j<=Self::dimension; ++j)
|
||||
{
|
||||
if ( j+1!=i && j!=i && j!=i+1 &&
|
||||
I1->is_free(j)!=I2->is_free(j) )
|
||||
{ res = false; }
|
||||
}
|
||||
++I1; ++I2;
|
||||
}
|
||||
if (I1.cont() != I2.cont())
|
||||
res = false;
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
/** Test if it is possible to sew by betai the two given darts
|
||||
* @param adart1 the first dart.
|
||||
* @param adart2 the second dart.
|
||||
|
|
@ -952,9 +1174,84 @@ namespace CGAL {
|
|||
*/
|
||||
template<unsigned int i>
|
||||
bool is_sewable(Dart_const_handle adart1, Dart_const_handle adart2) const
|
||||
{ return internal::is_sewable_functor<Self,i>::run(*this,adart1,adart2); }
|
||||
{
|
||||
if ( i==0 ) return is_sewable_0(adart1, adart2);
|
||||
else if ( i==1 ) return is_sewable_1(adart1, adart2);
|
||||
else return is_sewable_for_involution<i>(adart1, adart2);
|
||||
}
|
||||
|
||||
/** Topological sew by betai the two given darts plus all the required darts
|
||||
/** Topological sew by beta1 the two given darts plus all the required darts
|
||||
* to satisfy the combinatorial map validity: but do not update attributes
|
||||
* thus the map can be non valid.
|
||||
* @param adart1 the first dart.
|
||||
* @param adart2 the second dart.
|
||||
* @pre is_sewable_1(adart1, adart2).
|
||||
*/
|
||||
void topo_sew_1(Dart_handle adart1, Dart_handle adart2)
|
||||
{
|
||||
CGAL_assertion( (is_sewable_1(adart1,adart2)) );
|
||||
|
||||
int m = get_new_mark();
|
||||
std::vector<Dart_handle> dartv;
|
||||
for (CMap_dart_iterator_basic_of_cell<Self,0> it(*this,adart1,m);
|
||||
it.cont(); ++it)
|
||||
{
|
||||
mark(it,m);
|
||||
dartv.push_back(it);
|
||||
}
|
||||
|
||||
CMap_dart_iterator_of_involution<Self,1> I1(*this, adart1);
|
||||
CMap_dart_iterator_of_involution_inv<Self,1> I2(*this, adart2);
|
||||
while ( I1.cont() )
|
||||
{
|
||||
if ( is_marked(I1,m) )
|
||||
basic_link_beta_1(I1, I2);
|
||||
else
|
||||
basic_link_beta_0(I1, I2);
|
||||
++I1; ++I2;
|
||||
}
|
||||
|
||||
for (typename std::vector<Dart_handle>::iterator
|
||||
it=dartv.begin(); it!=dartv.end(); ++it)
|
||||
{ unmark(*it,m); }
|
||||
CGAL_assertion( is_whole_map_unmarked(m) );
|
||||
free_mark(m);
|
||||
}
|
||||
|
||||
/** Topological sew by beta0 two given darts plus all the required darts
|
||||
* to satisfy the combinatorial map validity: but do not update attributes
|
||||
* thus the map can be non valid.
|
||||
* @param adart1 the first dart.
|
||||
* @param adart2 the second dart.
|
||||
* @pre is_sewable_0(adart1, adart2).
|
||||
*/
|
||||
void topo_sew_0(Dart_handle adart1, Dart_handle adart2)
|
||||
{ topo_sew_1(adart2, adart1); }
|
||||
|
||||
/** Topological sew by betai two given darts plus all the required darts
|
||||
* to satisfy the combinatorial map validity: but do not update attributes
|
||||
* thus the map can be non valid.
|
||||
* @param adart1 the first dart.
|
||||
* @param adart2 the second dart.
|
||||
* @pre 2<=i<=dimension.
|
||||
* @pre is_sewable_for_involution<i>(adart1, adart2).
|
||||
*/
|
||||
template<unsigned int i>
|
||||
void topo_sew_for_involution(Dart_handle adart1, Dart_handle adart2)
|
||||
{
|
||||
CGAL_assertion(2<=i && i<=Self::dimension);
|
||||
CGAL_assertion( (is_sewable_for_involution<i>(adart1,adart2)) );
|
||||
|
||||
CMap_dart_iterator_of_involution<Self,i> I1(*this, adart1);
|
||||
CMap_dart_iterator_of_involution_inv<Self,i> I2(*this, adart2);
|
||||
while ( I1.cont() )
|
||||
{
|
||||
basic_link_beta_for_involution(I1, I2, i);
|
||||
++I1; ++I2;
|
||||
}
|
||||
}
|
||||
|
||||
/** Topological sew by betai two given darts plus all the required darts
|
||||
* to satisfy the combinatorial map validity: but do not update attributes
|
||||
* thus the map can be non valid.
|
||||
* @param adart1 the first dart.
|
||||
|
|
@ -963,7 +1260,136 @@ namespace CGAL {
|
|||
*/
|
||||
template<unsigned int i>
|
||||
void topo_sew(Dart_handle adart1, Dart_handle adart2)
|
||||
{ return internal::topo_sew_functor<Self,i>::run(*this,adart1,adart2); }
|
||||
{
|
||||
if ( i==0 ) topo_sew_0(adart1, adart2);
|
||||
else if ( i==1 ) topo_sew_1(adart1, adart2);
|
||||
else topo_sew_for_involution<i>(adart1, adart2);
|
||||
}
|
||||
|
||||
/** Sew by beta0 the two given darts plus all the required darts
|
||||
* to satisfy the combinatorial map validity, and updates enabled
|
||||
* attributes when necessary so that the final map is valid.
|
||||
* @param adart1 the first dart.
|
||||
* @param adart2 the second dart.
|
||||
* @pre is_sewable_0(adart1, adart2).
|
||||
* @post is_valid()
|
||||
*/
|
||||
void sew_0(Dart_handle adart1, Dart_handle adart2)
|
||||
{
|
||||
CGAL_assertion( (is_sewable_0(adart1,adart2)) );
|
||||
|
||||
int m = get_new_mark();
|
||||
std::vector<Dart_handle> dartv;
|
||||
for (CMap_dart_iterator_basic_of_cell<Self,0> it(*this,adart1,m);
|
||||
it.cont(); ++it)
|
||||
{
|
||||
mark(it,m);
|
||||
dartv.push_back(it);
|
||||
}
|
||||
|
||||
CMap_dart_iterator_of_involution<Self,1> I1(*this, adart1);
|
||||
CMap_dart_iterator_of_involution_inv<Self,1> I2(*this, adart2);
|
||||
while ( I1.cont() )
|
||||
{
|
||||
Dart_handle od1=I1->other_extremity();
|
||||
Dart_handle od2=I2->other_extremity();
|
||||
if (od1!=NULL && od2!=NULL)
|
||||
group_all_attributes_except(od1, od2, 1);
|
||||
++I1; ++I2;
|
||||
}
|
||||
|
||||
I1.rewind(); I2.rewind();
|
||||
while ( I1.cont() )
|
||||
{
|
||||
if ( is_marked(I1,m) )
|
||||
basic_link_beta_0(I1, I2);
|
||||
else
|
||||
basic_link_beta_1(I1, I2);
|
||||
++I1; ++I2;
|
||||
}
|
||||
|
||||
for (typename std::vector<Dart_handle>::iterator
|
||||
it=dartv.begin(); it!=dartv.end(); ++it)
|
||||
{ unmark(*it,m); }
|
||||
CGAL_assertion( is_whole_map_unmarked(m) );
|
||||
free_mark(m);
|
||||
}
|
||||
|
||||
/** Sew by beta1 the two given darts plus all the required darts
|
||||
* to satisfy the combinatorial map validity, and updates enabled
|
||||
* attributes when necessary so that the final map is valid.
|
||||
* @param adart1 the first dart.
|
||||
* @param adart2 the second dart.
|
||||
* @pre is_sewable_1(adart1, adart2).
|
||||
* @post is_valid()
|
||||
*/
|
||||
void sew_1(Dart_handle adart1, Dart_handle adart2)
|
||||
{
|
||||
CGAL_assertion( (is_sewable_1(adart1,adart2)) );
|
||||
int m = get_new_mark();
|
||||
std::vector<Dart_handle> dartv;
|
||||
for (CMap_dart_iterator_basic_of_cell<Self,0> it(*this,adart1,m);
|
||||
it.cont(); ++it)
|
||||
{
|
||||
mark(it,m);
|
||||
dartv.push_back(it);
|
||||
}
|
||||
|
||||
CMap_dart_iterator_of_involution<Self,1> I1(*this, adart1);
|
||||
CMap_dart_iterator_of_involution_inv<Self,1> I2(*this, adart2);
|
||||
while ( I1.cont() )
|
||||
{
|
||||
group_all_attributes_except(I1,I2,1);
|
||||
++I1; ++I2;
|
||||
}
|
||||
|
||||
I1.rewind(); I2.rewind();
|
||||
while ( I1.cont() )
|
||||
{
|
||||
if ( is_marked(I1,m) )
|
||||
basic_link_beta_1(I1, I2);
|
||||
else
|
||||
basic_link_beta_0(I1, I2);
|
||||
++I1; ++I2;
|
||||
}
|
||||
|
||||
for (typename std::vector<Dart_handle>::iterator
|
||||
it=dartv.begin(); it!=dartv.end(); ++it)
|
||||
{ unmark(*it,m); }
|
||||
CGAL_assertion( is_whole_map_unmarked(m) );
|
||||
free_mark(m);
|
||||
}
|
||||
|
||||
/** Sew by betai the two given darts plus all the required darts
|
||||
* to satisfy the combinatorial map validity, and updates enabled
|
||||
* attributes when necessary so that the final map is valid.
|
||||
* @param adart1 the first dart.
|
||||
* @param adart2 the second dart.
|
||||
* @pre is_sewable<i>(adart1, adart2).
|
||||
* @pre 2<=i<=dimension.
|
||||
* @post is_valid()
|
||||
*/
|
||||
template<unsigned int i>
|
||||
void sew_for_involution(Dart_handle adart1, Dart_handle adart2)
|
||||
{
|
||||
CGAL_assertion(2<=i && i<=dimension);
|
||||
CGAL_assertion( (is_sewable_for_involution<i>(adart1,adart2)) );
|
||||
|
||||
CMap_dart_iterator_of_involution<Self,i> I1(*this, adart1);
|
||||
CMap_dart_iterator_of_involution_inv<Self,i> I2(*this, adart2);
|
||||
while ( I1.cont() )
|
||||
{
|
||||
group_all_attributes_except(I1,I2,i);
|
||||
++I1; ++I2;
|
||||
}
|
||||
|
||||
I1.rewind(); I2.rewind();
|
||||
while ( I1.cont() )
|
||||
{
|
||||
basic_link_beta_for_involution(I1, I2, i);
|
||||
++I1; ++I2;
|
||||
}
|
||||
}
|
||||
|
||||
/** Sew by betai the two given darts plus all the required darts
|
||||
* to satisfy the combinatorial map validity, and updates enabled
|
||||
|
|
@ -975,7 +1401,11 @@ namespace CGAL {
|
|||
*/
|
||||
template<unsigned int i>
|
||||
void sew(Dart_handle adart1, Dart_handle adart2)
|
||||
{ return internal::sew_functor<Self,i>::run(*this,adart1,adart2); }
|
||||
{
|
||||
if ( i==0 ) sew_0(adart1, adart2);
|
||||
else if ( i==1 ) sew_1(adart1, adart2);
|
||||
else sew_for_involution<i>(adart1, adart2);
|
||||
}
|
||||
|
||||
/** Sew by betai the two given darts plus all the required darts
|
||||
* to satisfy the combinatorial map validity. Enabled attributes
|
||||
|
|
@ -988,8 +1418,77 @@ namespace CGAL {
|
|||
template<unsigned int i>
|
||||
void sew(Dart_handle adart1, Dart_handle adart2, bool update_attributes)
|
||||
{
|
||||
if ( update_attributes ) sew(adart1, adart2);
|
||||
else topo_sew(adart1, adart2);
|
||||
if ( update_attributes ) sew<i>(adart1, adart2);
|
||||
else topo_sew<i>(adart1, adart2);
|
||||
}
|
||||
|
||||
/** Topological unsew by beta1 the given dart plus all the required darts
|
||||
* to satisfy the combinatorial map validity: but do not update attributes
|
||||
* thus the map can be non valid
|
||||
* @param adart first dart.
|
||||
* @pre !adart->is_free(1).
|
||||
*/
|
||||
void topo_unsew_1(Dart_handle adart)
|
||||
{
|
||||
CGAL_assertion( adart!=NULL && !adart->is_free(1) );
|
||||
|
||||
int m = get_new_mark();
|
||||
std::vector<Dart_handle> dartv;
|
||||
for (CMap_dart_iterator_basic_of_cell<Self,0> it(*this,adart,m);
|
||||
it.cont(); ++it)
|
||||
{
|
||||
mark(*it,m);
|
||||
dartv.push_back(*it);
|
||||
}
|
||||
|
||||
{
|
||||
CMap_dart_iterator_of_involution<Self,1> it(*this, adart);
|
||||
while ( it.cont() )
|
||||
{
|
||||
if ( is_marked(*it,m) ) basic_unlink_beta_1(*it);
|
||||
else basic_unlink_beta_0(*it);
|
||||
++it;
|
||||
}
|
||||
}
|
||||
|
||||
for (typename std::vector<Dart_handle>::iterator
|
||||
it=dartv.begin(); it!=dartv.end(); ++it)
|
||||
{ unmark(*it,m); }
|
||||
CGAL_assertion( is_whole_map_unmarked(m) );
|
||||
free_mark(m);
|
||||
}
|
||||
|
||||
/** Topological unsew by beta0 the given dart plus all the required darts
|
||||
* to satisfy the combinatorial map validity: but do not update attributes
|
||||
* thus the map can be non valid
|
||||
* @param adart first dart.
|
||||
* @pre !adart->is_free(0).
|
||||
*/
|
||||
void topo_unsew_0(Dart_handle adart)
|
||||
{
|
||||
CGAL_assertion( adart!=NULL && !adart->is_free(0) );
|
||||
topo_unsew_1(adart->beta(0));
|
||||
}
|
||||
|
||||
/** Topological unsew by betai the given dart plus all the required darts
|
||||
* to satisfy the combinatorial map validity: but do not update attributes
|
||||
* thus the map can be non valid
|
||||
* @param adart first dart.
|
||||
* @pre !adart->is_free(i).
|
||||
* @pre 2<=i<=dimension.
|
||||
*/
|
||||
template<unsigned int i>
|
||||
void topo_unsew_for_involution(Dart_handle adart)
|
||||
{
|
||||
CGAL_assertion( adart!=NULL && !adart->is_free(i) );
|
||||
CGAL_assertion(2<=i && i<=Self::dimension);
|
||||
|
||||
CMap_dart_iterator_of_involution<Self,i> it(*this, adart);
|
||||
while ( it.cont() )
|
||||
{
|
||||
unlink_beta(*it, i);
|
||||
++it;
|
||||
}
|
||||
}
|
||||
|
||||
/** Topological unsew by betai the given dart plus all the required darts
|
||||
|
|
@ -1000,7 +1499,140 @@ namespace CGAL {
|
|||
*/
|
||||
template<unsigned int i>
|
||||
void topo_unsew(Dart_handle adart)
|
||||
{ return internal::topo_unsew_functor<Self,i>::run(*this,adart); }
|
||||
{
|
||||
if ( i==0 ) topo_unsew_0(adart);
|
||||
else if ( i==1 ) topo_unsew_1(adart);
|
||||
else topo_unsew_for_involution<i>(adart);
|
||||
}
|
||||
|
||||
/** Unsew by beta0 the given dart plus all the required darts
|
||||
* to satisfy the combinatorial map validity, and update enabled
|
||||
* attributes when necessary so that the final map is valid.
|
||||
* @param adart first dart.
|
||||
* @pre !adart->is_free(0).
|
||||
* @post is_valid()
|
||||
*/
|
||||
void unsew_0(Dart_handle adart)
|
||||
{
|
||||
CGAL_assertion( adart!=NULL && !adart->is_free(0) );
|
||||
Dart_handle d2 = NULL;
|
||||
|
||||
int m = get_new_mark();
|
||||
std::vector<Dart_handle> dartv;
|
||||
for (CMap_dart_iterator_basic_of_cell<Self,0> it(*this,adart,m);
|
||||
it.cont(); ++it)
|
||||
{
|
||||
mark(it,m);
|
||||
dartv.push_back(it);
|
||||
}
|
||||
|
||||
{
|
||||
CMap_dart_iterator_of_involution<Self,1> it(*this, adart);
|
||||
while ( it.cont() )
|
||||
{
|
||||
if ( is_marked(it,m) )
|
||||
{
|
||||
d2 = it->beta(0);
|
||||
unlink_beta_0(it);
|
||||
}
|
||||
else
|
||||
{
|
||||
d2 = it->beta(1);
|
||||
unlink_beta_1(it);
|
||||
}
|
||||
|
||||
// TODO do the degroup after the loop (cf unsew_for_involution)
|
||||
Dart_handle od1=it->other_extremity();
|
||||
Dart_handle od2=d2->other_extremity();
|
||||
if ( od1!=NULL && od2!=NULL )
|
||||
degroup_all_attributes_except(od1,od2,1);
|
||||
|
||||
++it;
|
||||
}
|
||||
}
|
||||
|
||||
for (typename std::vector<Dart_handle>::iterator
|
||||
it=dartv.begin(); it!=dartv.end(); ++it)
|
||||
{ unmark(*it,m); }
|
||||
|
||||
CGAL_assertion( is_whole_map_unmarked(m) );
|
||||
free_mark(m);
|
||||
}
|
||||
|
||||
/** Unsew by beta1 the given dart plus all the required darts
|
||||
* to satisfy the combinatorial map validity, and update enabled
|
||||
* attributes when necessary so that the final map is valid.
|
||||
* @param adart first dart.
|
||||
* @pre !adart->is_free(1).
|
||||
* @post is_valid()
|
||||
*/
|
||||
void unsew_1(Dart_handle adart)
|
||||
{
|
||||
CGAL_assertion( adart!=NULL && !adart->is_free(1) );
|
||||
Dart_handle d2 = NULL;
|
||||
|
||||
int m = get_new_mark();
|
||||
std::vector<Dart_handle> dartv;
|
||||
for (CMap_dart_iterator_basic_of_cell<Self,0> it(*this,adart,m);
|
||||
it.cont(); ++it)
|
||||
{
|
||||
mark(it,m);
|
||||
dartv.push_back(it);
|
||||
}
|
||||
|
||||
{
|
||||
CMap_dart_iterator_of_involution<Self,1> it(*this, adart);
|
||||
while ( it.cont() )
|
||||
{
|
||||
if ( is_marked(it,m) )
|
||||
{ d2 = it->beta(1); unlink_beta_1(it); }
|
||||
else
|
||||
{ d2 = it->beta(0); unlink_beta_0(it); }
|
||||
// TODO do the degroup after the loop (cf unsew_for_involution)
|
||||
degroup_all_attributes_except(it,d2,1);
|
||||
++it;
|
||||
}
|
||||
}
|
||||
|
||||
for (typename std::vector<Dart_handle>::iterator
|
||||
it=dartv.begin(); it!=dartv.end(); ++it)
|
||||
{ unmark(*it,m); }
|
||||
CGAL_assertion( is_whole_map_unmarked(m) );
|
||||
free_mark(m);
|
||||
}
|
||||
|
||||
/** Unsew by betai the given dart plus all the required darts
|
||||
* to satisfy the combinatorial map validity, and update enabled
|
||||
* attributes when necessary so that the final map is valid.
|
||||
* @param adart first dart.
|
||||
* @pre !adart->is_free(i).
|
||||
* @post is_valid()
|
||||
* @pre 2<=i<=dimension
|
||||
*/
|
||||
template<unsigned int i>
|
||||
void unsew_for_involution(Dart_handle adart)
|
||||
{
|
||||
CGAL_assertion(2<=i && i<=Self::dimension);
|
||||
CGAL_assertion( adart!=NULL && !adart->is_free(i) );
|
||||
|
||||
std::stack<internal::Couple_dart_and_dim<Dart_handle> > todegroup;
|
||||
|
||||
CMap_dart_iterator_of_involution<Self,i> it(*this, adart);
|
||||
while ( it.cont() )
|
||||
{
|
||||
todegroup.push(internal::Couple_dart_and_dim<Dart_handle>
|
||||
(it,it->beta(i),i));
|
||||
unlink_beta_for_involution(it,i);
|
||||
++it;
|
||||
}
|
||||
|
||||
while (!todegroup.empty() )
|
||||
{
|
||||
internal::Couple_dart_and_dim<Dart_handle> c=todegroup.top();
|
||||
todegroup.pop();
|
||||
degroup_all_attributes_except(c.d1,c.d2,c.dim);
|
||||
}
|
||||
}
|
||||
|
||||
/** Unsew by betai the given dart plus all the required darts
|
||||
* to satisfy the combinatorial map validity, and update enabled
|
||||
|
|
@ -1011,7 +1643,11 @@ namespace CGAL {
|
|||
*/
|
||||
template<unsigned int i>
|
||||
void unsew(Dart_handle adart)
|
||||
{ return internal::unsew_functor<Self,i>::run(*this,adart); }
|
||||
{
|
||||
if ( i==0 ) unsew_0(adart);
|
||||
else if ( i==1 ) unsew_1(adart);
|
||||
else unsew_for_involution<i>(adart);
|
||||
}
|
||||
|
||||
/** Unsew by betai the given dart plus all the required darts
|
||||
* to satisfy the combinatorial map validity. Enabled attributes
|
||||
|
|
@ -1023,8 +1659,8 @@ namespace CGAL {
|
|||
template<unsigned int i>
|
||||
void unsew(Dart_handle adart, bool update_attributes)
|
||||
{
|
||||
if ( update_attributes ) unsew(adart);
|
||||
else topo_unsew(adart);
|
||||
if ( update_attributes ) unsew<i>(adart);
|
||||
else topo_unsew<i>(adart);
|
||||
}
|
||||
|
||||
/** Count the marked cells (at least one marked dart).
|
||||
|
|
@ -1298,10 +1934,24 @@ namespace CGAL {
|
|||
// If the two attributes are equal, nothing to do.
|
||||
if ( a1 == a2 ) return;
|
||||
|
||||
if ( a1==NULL )
|
||||
set_attribute_of_dart<i>(dh1, a2);
|
||||
else
|
||||
set_attribute_of_dart<i>(dh2, a1);
|
||||
if ( a1==NULL ) set_attribute_of_dart<i>(dh1, a2);
|
||||
else set_attribute_of_dart<i>(dh2, a1);
|
||||
}
|
||||
|
||||
/** Group all the dart attributes of adart1 and adart2, except the
|
||||
* adim-cell attribute.
|
||||
* @param adart1 the first dart.
|
||||
* @param adart1 the second dart.
|
||||
* @param adim the dimension to not group (-1 to group all dimensions).
|
||||
* note that 0-attr are always grouped if adart1-> other_extremity()!=NULL.
|
||||
*/
|
||||
void group_all_dart_attributes_except(Dart_handle adart1,
|
||||
Dart_handle adart2, int adim)
|
||||
{
|
||||
CGAL_assertion( adim==-1 || (1<=adim && (unsigned int)adim<=dimension) );
|
||||
Helper::template Foreach_enabled_attributes
|
||||
<internal::Group_attribute_functor_of_dart<Self> >::
|
||||
run(this,adart1,adart2,adim);
|
||||
}
|
||||
|
||||
/** Group all the cells attributes of adart1 and adart2, except the
|
||||
|
|
@ -1309,6 +1959,7 @@ namespace CGAL {
|
|||
* @param adart1 the first dart.
|
||||
* @param adart1 the second dart.
|
||||
* @param adim the dimension to not group (-1 to group all dimensions).
|
||||
* note that 0-attr are always grouped if adart1-> other_extremity()!=NULL.
|
||||
*/
|
||||
void group_all_attributes_except(Dart_handle adart1, Dart_handle adart2,
|
||||
int adim)
|
||||
|
|
@ -1455,6 +2106,7 @@ namespace CGAL {
|
|||
" are disabled");
|
||||
if ( is_marked(adart, amark) ) return true;
|
||||
bool valid = true;
|
||||
bool found_dart = false;
|
||||
|
||||
typename Attribute_const_handle<i>::type
|
||||
a=adart->template attribute<i>();
|
||||
|
|
@ -1466,6 +2118,8 @@ namespace CGAL {
|
|||
if ( it->template attribute<i>() != a )
|
||||
valid = false;
|
||||
|
||||
if ( a!=NULL && it==a->dart() ) found_dart = true;
|
||||
|
||||
mark(it, amark);
|
||||
++nb;
|
||||
}
|
||||
|
|
@ -1473,6 +2127,9 @@ namespace CGAL {
|
|||
if ( a!=NULL && a->get_nb_refs()!=nb )
|
||||
valid = false;
|
||||
|
||||
if ( a!=NULL && a->dart()!=NULL && !found_dart )
|
||||
valid = false;
|
||||
|
||||
return valid;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ namespace CGAL {
|
|||
{
|
||||
typename Map::Dart_handle d1 = amap.create_dart();
|
||||
typename Map::Dart_handle d2 = amap.create_dart();
|
||||
amap.template basic_link_beta<2>(d1, d2);
|
||||
amap.basic_link_beta_for_involution(d1, d2, 2);
|
||||
return d1;
|
||||
}
|
||||
|
||||
|
|
@ -56,11 +56,11 @@ namespace CGAL {
|
|||
for ( unsigned int nb=1; nb<alg; ++nb )
|
||||
{
|
||||
typename Map::Dart_handle cur = amap.create_dart();
|
||||
amap.template basic_link_beta<1>(prev, cur);
|
||||
amap.basic_link_beta_1(prev, cur);
|
||||
prev=cur;
|
||||
}
|
||||
|
||||
amap.template basic_link_beta<1>(prev, start);
|
||||
amap.basic_link_beta_1(prev, start);
|
||||
return start;
|
||||
}
|
||||
|
||||
|
|
@ -80,12 +80,12 @@ namespace CGAL {
|
|||
typename Map::Dart_handle d3,
|
||||
typename Map::Dart_handle d4)
|
||||
{
|
||||
amap.basic_link_beta(d1, d2, 2);
|
||||
amap.basic_link_beta(d3, d2->beta(0), 2);
|
||||
amap.basic_link_beta(d1->beta(1), d3->beta(0), 2);
|
||||
amap.basic_link_beta(d4, d2->beta(1), 2);
|
||||
amap.basic_link_beta(d4->beta(0), d3->beta(1), 2);
|
||||
amap.basic_link_beta(d4->beta(1), d1->beta(0), 2);
|
||||
amap.basic_link_beta_for_involution(d1, d2, 2);
|
||||
amap.basic_link_beta_for_involution(d3, d2->beta(0), 2);
|
||||
amap.basic_link_beta_for_involution(d1->beta(1), d3->beta(0), 2);
|
||||
amap.basic_link_beta_for_involution(d4, d2->beta(1), 2);
|
||||
amap.basic_link_beta_for_involution(d4->beta(0), d3->beta(1), 2);
|
||||
amap.basic_link_beta_for_involution(d4->beta(1), d1->beta(0), 2);
|
||||
|
||||
return d1;
|
||||
}
|
||||
|
|
@ -125,21 +125,33 @@ namespace CGAL {
|
|||
typename Map::Dart_handle d5,
|
||||
typename Map::Dart_handle d6)
|
||||
{
|
||||
amap.basic_link_beta(d1, d4->beta(1)->beta(1), 2);
|
||||
amap.basic_link_beta(d1->beta(1), d6->beta(0) , 2);
|
||||
amap.basic_link_beta(d1->beta(1)->beta(1), d2 , 2);
|
||||
amap.basic_link_beta(d1->beta(0), d5 , 2);
|
||||
amap.basic_link_beta_for_involution(d1,
|
||||
d4->beta(1)->beta(1), 2);
|
||||
amap.basic_link_beta_for_involution(d1->beta(1),
|
||||
d6->beta(0) , 2);
|
||||
amap.basic_link_beta_for_involution(d1->beta(1)->beta(1),
|
||||
d2 , 2);
|
||||
amap.basic_link_beta_for_involution(d1->beta(0),
|
||||
d5 , 2);
|
||||
|
||||
amap.basic_link_beta(d3, d2->beta(1)->beta(1), 2);
|
||||
amap.basic_link_beta(d3->beta(1), d6->beta(1) , 2);
|
||||
amap.basic_link_beta(d3->beta(1)->beta(1), d4 , 2);
|
||||
amap.basic_link_beta(d3->beta(0), d5->beta(1)->beta(1), 2);
|
||||
amap.basic_link_beta_for_involution(d3,
|
||||
d2->beta(1)->beta(1), 2);
|
||||
amap.basic_link_beta_for_involution(d3->beta(1),
|
||||
d6->beta(1) , 2);
|
||||
amap.basic_link_beta_for_involution(d3->beta(1)->beta(1),
|
||||
d4 , 2);
|
||||
amap.basic_link_beta_for_involution(d3->beta(0),
|
||||
d5->beta(1)->beta(1), 2);
|
||||
|
||||
amap.basic_link_beta(d6, d4->beta(1) , 2);
|
||||
amap.basic_link_beta(d6->beta(1)->beta(1), d2->beta(1) , 2);
|
||||
amap.basic_link_beta_for_involution(d6,
|
||||
d4->beta(1) , 2);
|
||||
amap.basic_link_beta_for_involution(d6->beta(1)->beta(1),
|
||||
d2->beta(1) , 2);
|
||||
|
||||
amap.basic_link_beta(d5->beta(0), d4->beta(0) , 2);
|
||||
amap.basic_link_beta(d5->beta(1), d2->beta(0) , 2);
|
||||
amap.basic_link_beta_for_involution(d5->beta(0),
|
||||
d4->beta(0) , 2);
|
||||
amap.basic_link_beta_for_involution(d5->beta(1),
|
||||
d2->beta(0) , 2);
|
||||
|
||||
return d1;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -128,8 +128,8 @@ namespace CGAL {
|
|||
Self& operator--()
|
||||
{ return *this; }
|
||||
/// operator -- in private to invalidate the base operator.
|
||||
void operator--(int)
|
||||
{}
|
||||
Self operator--(int)
|
||||
{ return *this; }
|
||||
|
||||
protected:
|
||||
/// test if adart->beta(ai) exists and is not marked for amark
|
||||
|
|
@ -388,8 +388,8 @@ namespace CGAL {
|
|||
using Base::operator++;
|
||||
|
||||
/// Postfix ++ operator.
|
||||
void operator++(int)
|
||||
{ operator ++(); }
|
||||
Self operator++(int)
|
||||
{ Self res=*this; operator ++(); return res; }
|
||||
|
||||
protected:
|
||||
/// Unmark all the marked darts during the iterator.
|
||||
|
|
|
|||
|
|
@ -84,22 +84,22 @@ namespace CGAL {
|
|||
if (!cur->is_free(0))
|
||||
{
|
||||
n1 = amap.create_dart();
|
||||
amap.template link_beta<0>(cur, n1);
|
||||
amap.link_beta_0(cur, n1);
|
||||
}
|
||||
else n1 = NULL;
|
||||
|
||||
if (!cur->is_free(1))
|
||||
{
|
||||
n2 = amap.create_dart();
|
||||
amap.template link_beta<1>(cur, n2);
|
||||
amap.link_beta_1(cur, n2);
|
||||
}
|
||||
else n2 = NULL;
|
||||
|
||||
if (n1 != NULL && n2 != NULL)
|
||||
amap.template link_beta<0>(n1, n2);
|
||||
amap.link_beta_0(n1, n2);
|
||||
|
||||
if (n1 != NULL && prev != NULL)
|
||||
amap.link_beta(prev, n1, 2);
|
||||
amap.link_beta_for_involution(prev, n1, 2);
|
||||
|
||||
for (unsigned int dim=3; dim<=Map::dimension; ++dim)
|
||||
{
|
||||
|
|
@ -110,24 +110,24 @@ namespace CGAL {
|
|||
if (n1!=NULL)
|
||||
{
|
||||
nn1=amap.create_dart();
|
||||
amap.template link_beta<1>(cur->beta(dim), nn1);
|
||||
amap.link_beta(n1, nn1, dim);
|
||||
amap.link_beta_1(cur->beta(dim), nn1);
|
||||
amap.link_beta_for_involution(n1, nn1, dim);
|
||||
}
|
||||
else nn1=NULL;
|
||||
|
||||
if (n2!=NULL)
|
||||
{
|
||||
nn2=amap.create_dart();
|
||||
amap.template link_beta<0>(cur->beta(dim), nn2);
|
||||
amap.link_beta(n2, nn2, dim);
|
||||
amap.link_beta_0(cur->beta(dim), nn2);
|
||||
amap.link_beta_for_involution(n2, nn2, dim);
|
||||
}
|
||||
else nn2=NULL;
|
||||
|
||||
if (nn1 != NULL && nn2 != NULL)
|
||||
amap.template basic_link_beta<1>(nn1, nn2);
|
||||
amap.basic_link_beta_1(nn1, nn2);
|
||||
|
||||
if (nn1 != NULL && prev != NULL)
|
||||
amap.link_beta(nn1, prev->beta(dim), 2);
|
||||
amap.link_beta_for_involution(nn1, prev->beta(dim), 2);
|
||||
|
||||
amap.mark(cur->beta(dim), treated);
|
||||
tounmark.push(cur->beta(dim));
|
||||
|
|
@ -135,9 +135,9 @@ namespace CGAL {
|
|||
else
|
||||
{
|
||||
if ( n1!=NULL )
|
||||
amap.link_beta(n1, cur->beta(dim)->beta(1), dim);
|
||||
amap.link_beta_for_involution(n1, cur->beta(dim)->beta(1), dim);
|
||||
if ( n2!=NULL )
|
||||
amap.link_beta(n2, cur->beta(dim)->beta(0), dim);
|
||||
amap.link_beta_for_involution(n2, cur->beta(dim)->beta(0), dim);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -147,12 +147,12 @@ namespace CGAL {
|
|||
|
||||
if (n2 != NULL)
|
||||
{
|
||||
amap.link_beta(first->beta(0), n2, 2);
|
||||
amap.link_beta_for_involution(first->beta(0), n2, 2);
|
||||
for (unsigned int dim=3; dim<=Map::dimension; ++dim)
|
||||
{
|
||||
if ( !adart->is_free(dim) )
|
||||
{
|
||||
amap.link_beta(first->beta(0)->beta(dim), n2->beta(dim), 2);
|
||||
amap.link_beta_for_involution(first->beta(0)->beta(dim), n2->beta(dim), 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -282,7 +282,8 @@ namespace CGAL {
|
|||
{
|
||||
if ( !d1->is_free(i) )
|
||||
{
|
||||
todegroup.push(Dart_pair(d1, d1->beta(i)));
|
||||
if ( !amap.is_marked(d1->beta(i), mark) )
|
||||
todegroup.push(Dart_pair(d1, d1->beta(i)));
|
||||
d1->unlink_beta(i);
|
||||
}
|
||||
}
|
||||
|
|
@ -291,7 +292,8 @@ namespace CGAL {
|
|||
{
|
||||
if ( !d2->is_free(CGAL_BETAINV(i)) )
|
||||
{
|
||||
todegroup.push(Dart_pair(d2, d2->beta_inv(i)));
|
||||
if ( !amap.is_marked(d2->beta_inv(i), mark) )
|
||||
todegroup.push(Dart_pair(d2, d2->beta_inv(i)));
|
||||
d2->unlink_beta(CGAL_BETAINV(i));
|
||||
}
|
||||
}
|
||||
|
|
@ -301,7 +303,8 @@ namespace CGAL {
|
|||
d1 = (*it)->beta(i);
|
||||
if ( !d1->is_free(CGAL_BETAINV(i)) )
|
||||
{
|
||||
todegroup.push(Dart_pair(d1, d1->beta_inv(i)));
|
||||
if ( !amap.is_marked(d1->beta_inv(i), mark))
|
||||
todegroup.push(Dart_pair(d1, d1->beta_inv(i)));
|
||||
d1->unlink_beta(CGAL_BETAINV(i));
|
||||
}
|
||||
}
|
||||
|
|
@ -372,7 +375,7 @@ namespace CGAL {
|
|||
if ( !(*it)->is_free(Map::dimension) )
|
||||
{
|
||||
todegroup.push(Dart_pair(*it, (*it)->beta(Map::dimension)));
|
||||
amap.unlink_beta(*it,Map::dimension);
|
||||
amap.unlink_beta_for_involution(*it,Map::dimension);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -607,8 +610,6 @@ namespace CGAL {
|
|||
|
||||
if (!(*it)->is_free(1))
|
||||
{ amap.template basic_link_beta<1>(d1, (*it)->beta(1)); }
|
||||
|
||||
amap.template link_beta<1>(*it, d1);
|
||||
|
||||
for ( unsigned int dim = 2; dim<=Map::dimension; ++dim )
|
||||
{
|
||||
|
|
@ -618,7 +619,10 @@ namespace CGAL {
|
|||
amap.basic_link_beta(*it, (*it)->beta(dim)->beta(1), dim);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
amap.template basic_link_beta<1>(*it, d1);
|
||||
amap.group_all_dart_attributes_except(*it, d1, 1);
|
||||
|
||||
amap.mark(*it, mark);
|
||||
}
|
||||
|
||||
|
|
@ -628,8 +632,6 @@ namespace CGAL {
|
|||
amap.free_mark(mark);
|
||||
|
||||
amap.template degroup_attribute<1>(adart, adart->beta(1));
|
||||
|
||||
// CGAL_postcondition(amap.is_valid());
|
||||
|
||||
return adart->beta(1);
|
||||
}
|
||||
|
|
@ -689,16 +691,17 @@ namespace CGAL {
|
|||
amap.template basic_link_beta<1>(d1,d2);
|
||||
}
|
||||
|
||||
amap.link_beta(d1, d2, 2);
|
||||
amap.link_beta_for_involution(d1, d2, 2);
|
||||
|
||||
for ( unsigned int dim=3; dim<=Map::dimension; ++dim)
|
||||
{
|
||||
if ( !it1->is_free(dim) &&
|
||||
amap.is_marked(it1->beta(dim), treated) )
|
||||
{
|
||||
amap.basic_link_beta(it1->beta(dim)->beta_inv(s1), d1, dim);
|
||||
amap.basic_link_beta(it1->beta(dim)->beta_inv(s1)->beta(2),
|
||||
d2, dim);
|
||||
amap.basic_link_beta_for_involution(it1->beta(dim)->beta_inv(s1), d1,
|
||||
dim);
|
||||
amap.basic_link_beta_for_involution
|
||||
(it1->beta(dim)->beta_inv(s1)->beta(2), d2, dim);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -778,36 +781,37 @@ namespace CGAL {
|
|||
|
||||
if ( !it1->is_free(s1) )
|
||||
{
|
||||
if ( s1==0 ) amap.template basic_link_beta<1>(it1->beta(0), d2);
|
||||
else amap.template link_beta<0>(it1->beta(1), d2);
|
||||
if ( s1==0 ) amap.basic_link_beta_1(it1->beta(0), d2);
|
||||
else amap.link_beta_0(it1->beta(1), d2);
|
||||
}
|
||||
|
||||
if ( !it2->is_free(s1) )
|
||||
{
|
||||
if ( s1==0 ) amap.template basic_link_beta<1>(it2->beta(0), d1);
|
||||
else amap.template link_beta<0>(it2->beta(1), d1);
|
||||
if ( s1==0 ) amap.basic_link_beta_1(it2->beta(0), d1);
|
||||
else amap.link_beta_0(it2->beta(1), d1);
|
||||
}
|
||||
|
||||
if ( s1==0 )
|
||||
{
|
||||
amap.template link_beta<0>(it1, d1);
|
||||
amap.template link_beta<0>(it2, d2);
|
||||
amap.link_beta_0(it1, d1);
|
||||
amap.link_beta_0(it2, d2);
|
||||
}
|
||||
else
|
||||
{
|
||||
amap.template basic_link_beta<1>(it1, d1);
|
||||
amap.template basic_link_beta<1>(it2, d2);
|
||||
amap.basic_link_beta_1(it1, d1);
|
||||
amap.basic_link_beta_1(it2, d2);
|
||||
}
|
||||
amap.link_beta(d2, d1, 2);
|
||||
amap.link_beta_for_involution(d2, d1, 2);
|
||||
|
||||
for ( unsigned int dim=3; dim<=CMap::dimension; ++dim)
|
||||
{
|
||||
if ( !it1->is_free(dim) &&
|
||||
amap.is_marked(it1->beta(dim), treated) )
|
||||
{
|
||||
amap.basic_link_beta(it1->beta(dim)->beta_inv(s1), d1, dim);
|
||||
amap.basic_link_beta(it1->beta(dim)->beta_inv(s1)->beta(2),
|
||||
d2, dim);
|
||||
amap.basic_link_beta_for_involution
|
||||
(it1->beta(dim)->beta_inv(s1), d1, dim);
|
||||
amap.basic_link_beta_for_involution
|
||||
(it1->beta(dim)->beta_inv(s1)->beta(2), d2, dim);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -875,7 +879,7 @@ namespace CGAL {
|
|||
if (withBeta3)
|
||||
{
|
||||
dd = amap.create_dart();
|
||||
amap.basic_link_beta(d, dd, 3);
|
||||
amap.basic_link_beta_for_involution(d, dd, 3);
|
||||
}
|
||||
|
||||
if (prec != NULL)
|
||||
|
|
@ -886,9 +890,9 @@ namespace CGAL {
|
|||
else first = d;
|
||||
|
||||
if (!(*it)->is_free(2))
|
||||
amap.link_beta((*it)->beta(2), dd, 2);
|
||||
amap.link_beta_for_involution((*it)->beta(2), dd, 2);
|
||||
|
||||
amap.link_beta(*it, d, 2);
|
||||
amap.link_beta_for_involution(*it, d, 2);
|
||||
|
||||
prec = d;
|
||||
}
|
||||
|
|
@ -911,19 +915,19 @@ namespace CGAL {
|
|||
it.cont(); ++it )
|
||||
{
|
||||
d = amap.create_dart();
|
||||
amap.link_beta(it->beta(2),d,dim);
|
||||
amap.link_beta_for_involution(it->beta(2),d,dim);
|
||||
if ( withBeta3 )
|
||||
{
|
||||
dd = amap.create_dart();
|
||||
amap.link_beta(it->beta(2)->beta(3),dd,dim);
|
||||
amap.basic_link_beta(d, dd, 3);
|
||||
amap.link_beta_for_involution(it->beta(2)->beta(3),dd,dim);
|
||||
amap.basic_link_beta_for_involution(d, dd, 3);
|
||||
}
|
||||
if ( prec!=NULL )
|
||||
{
|
||||
amap.template link_beta<0>(prec,d);
|
||||
amap.link_beta_0(prec,d);
|
||||
if ( withBeta3 )
|
||||
{
|
||||
amap.template link_beta<1>(prec->beta(3),dd);
|
||||
amap.link_beta_1(prec->beta(3),dd);
|
||||
}
|
||||
}
|
||||
else first2 = prec;
|
||||
|
|
@ -934,11 +938,12 @@ namespace CGAL {
|
|||
{
|
||||
if ( !it->is_free(dim2) &&
|
||||
it->beta(dim2)->is_free(dim) )
|
||||
amap.basic_link_beta(it->beta(dim2)->beta(dim), d, dim2);
|
||||
amap.basic_link_beta_for_involution(it->beta(dim2)->beta(dim),
|
||||
d, dim2);
|
||||
if ( withBeta3 && !it->beta(3)->is_free(dim2) &&
|
||||
it->beta(3)->beta(dim2)->is_free(dim) )
|
||||
amap.basic_link_beta(it->beta(3)->beta(dim2)->beta(dim),
|
||||
dd, dim2);
|
||||
amap.basic_link_beta_for_involution
|
||||
(it->beta(3)->beta(dim2)->beta(dim), dd, dim2);
|
||||
}
|
||||
}
|
||||
prec = d;
|
||||
|
|
|
|||
|
|
@ -67,15 +67,9 @@ namespace CGAL {
|
|||
template<class Map, unsigned int i, unsigned int nmi>
|
||||
friend struct Remove_cell_functor;
|
||||
|
||||
template <typename Map,unsigned int i>
|
||||
friend struct internal::basic_link_beta_functor;
|
||||
|
||||
template <typename Map,unsigned int i>
|
||||
friend struct internal::link_beta_functor;
|
||||
|
||||
template <typename Map,unsigned int i>
|
||||
friend struct internal::unlink_beta_functor;
|
||||
|
||||
public:
|
||||
typedef Dart<d,Refs> Self;
|
||||
typedef typename Refs::Dart_handle Dart_handle;
|
||||
|
|
|
|||
|
|
@ -1891,8 +1891,8 @@ namespace CGAL {
|
|||
Base(amap, adart),
|
||||
mmark_number(amark)
|
||||
{
|
||||
CGAL_static_assertion( d>=3 && d<=Map::dimension );
|
||||
CGAL_static_assertion( i>=3 && i<=Map::dimension );
|
||||
CGAL_assertion( d>=3 && d<=Map::dimension );
|
||||
CGAL_assertion( i>=3 && i<=Map::dimension );
|
||||
if (adart!=NULL) this->mmap->mark(adart, mmark_number);
|
||||
}
|
||||
|
||||
|
|
@ -1913,7 +1913,7 @@ namespace CGAL {
|
|||
|
||||
Dart_handle nd = NULL;
|
||||
|
||||
for ( unsigned int k=0; k<2; ++k )
|
||||
for ( int k=0; k<2; ++k )
|
||||
{
|
||||
if ( this->is_unmarked((*this), k, mmark_number) )
|
||||
{
|
||||
|
|
@ -1932,7 +1932,7 @@ namespace CGAL {
|
|||
}
|
||||
}
|
||||
|
||||
for ( unsigned int k=2; k<=d; ++k )
|
||||
for ( int k=2; k<=d; ++k )
|
||||
{
|
||||
if ( k!=i-1 && k!=i && k!=i+1 &&
|
||||
this->is_unmarked((*this), k, mmark_number) )
|
||||
|
|
@ -2011,7 +2011,7 @@ namespace CGAL {
|
|||
Base(amap, adart),
|
||||
mmark_number(amark)
|
||||
{
|
||||
CGAL_static_assertion( i>=3 && i<=Map::dimension );
|
||||
CGAL_assertion( i>=3 && i<=Map::dimension );
|
||||
if (adart!=NULL) this->mmap->mark(adart, mmark_number);
|
||||
}
|
||||
|
||||
|
|
@ -2050,7 +2050,7 @@ namespace CGAL {
|
|||
}
|
||||
}
|
||||
}
|
||||
for ( unsigned int k=2; k<=d; ++k )
|
||||
for ( int k=2; k<=d; ++k )
|
||||
{
|
||||
if ( k!=i-1 && k!=i && k!=i+1 &&
|
||||
this->is_unmarked((*this), k, mmark_number) )
|
||||
|
|
|
|||
|
|
@ -42,520 +42,6 @@ namespace CGAL {
|
|||
int dim;
|
||||
};
|
||||
|
||||
|
||||
/// Functor used to test if it is possible to i-sew two darts,
|
||||
/// 2<=i<=dimension
|
||||
template <typename Map,unsigned int i>
|
||||
struct is_sewable_functor{
|
||||
static bool run(const Map& amap,
|
||||
typename Map::Dart_const_handle adart1,
|
||||
typename Map::Dart_const_handle adart2)
|
||||
{
|
||||
CGAL_static_assertion(2<=i && i<=Map::dimension);
|
||||
CGAL_assertion(adart1!=NULL && adart2!=NULL);
|
||||
|
||||
if ( !adart1->is_free(i) || !adart2->is_free(i) || adart1==adart2 )
|
||||
return false;
|
||||
|
||||
CMap_dart_const_iterator_of_involution<Map,i> I1(amap, adart1);
|
||||
CMap_dart_const_iterator_of_involution_inv<Map,i> I2(amap, adart2);
|
||||
bool res = true;
|
||||
while (res && I1.cont() && I2.cont())
|
||||
{
|
||||
// We can remove this constraint which is not required for
|
||||
// combinatorial map definition, but which is quite "normal"
|
||||
if ( I1==adart2 || I2==adart1 ) res=false;
|
||||
|
||||
// Special case to consider beta0 and beta1
|
||||
if ( i>2 )
|
||||
{
|
||||
if ( I1->is_free(0)!=I2->is_free(1) ) res = false;
|
||||
else if ( I1->is_free(1)!=I2->is_free(0) ) res = false;
|
||||
}
|
||||
|
||||
// General case
|
||||
for (unsigned int j=2;res && j<=Map::dimension; ++j)
|
||||
{
|
||||
if ( j+1!=i && j!=i && j!=i+1 &&
|
||||
I1->is_free(j)!=I2->is_free(j) )
|
||||
{ res = false; }
|
||||
}
|
||||
++I1; ++I2;
|
||||
}
|
||||
if (I1.cont() != I2.cont())
|
||||
res = false;
|
||||
|
||||
return res;
|
||||
}
|
||||
};
|
||||
|
||||
/// Functor used to test if it is possible to 1-sew two darts.
|
||||
template <typename Map>
|
||||
struct is_sewable_functor<Map,1>{
|
||||
static bool run(const Map& amap,
|
||||
typename Map::Dart_const_handle adart1,
|
||||
typename Map::Dart_const_handle adart2)
|
||||
{
|
||||
CGAL_assertion(adart1!=NULL && adart2!=NULL);
|
||||
|
||||
if ( !adart1->is_free(1) || !adart2->is_free(0) )
|
||||
return false;
|
||||
|
||||
if ( adart1 == adart2 ) return true;
|
||||
|
||||
CMap_dart_const_iterator_of_involution <Map,1> I1(amap, adart1);
|
||||
CMap_dart_const_iterator_of_involution_inv<Map,1> I2(amap, adart2);
|
||||
bool res = true;
|
||||
while (res && I1.cont() && I2.cont())
|
||||
{
|
||||
// We can remove this constraint which is not required for
|
||||
// combinatorial map definition, but which imposes quite "normal"
|
||||
// configurations
|
||||
if ( I1==adart2 || I2==adart1 ) res=false;
|
||||
|
||||
for (unsigned int j=3;res && j<=Map::dimension; ++j)
|
||||
{
|
||||
if ( I1->is_free(j)!=I2->is_free(j) )
|
||||
{
|
||||
res = false;
|
||||
}
|
||||
}
|
||||
++I1; ++I2;
|
||||
}
|
||||
if (I1.cont() != I2.cont())
|
||||
res = false;
|
||||
|
||||
return res;
|
||||
}
|
||||
};
|
||||
|
||||
/// Functor used to test if it is possible to 0-sew two darts.
|
||||
template <typename Map>
|
||||
struct is_sewable_functor<Map,0>{
|
||||
static bool run(const Map& amap,
|
||||
typename Map::Dart_const_handle adart1,
|
||||
typename Map::Dart_const_handle adart2)
|
||||
{ return is_sewable_functor<Map,1>::run(amap,adart2,adart1); }
|
||||
};
|
||||
|
||||
/// Functor used to i-topo_sew two darts, 2<=i<=dimension.
|
||||
template <typename Map,unsigned int i>
|
||||
struct topo_sew_functor{
|
||||
static void run(Map& amap,typename Map::Dart_handle adart1,
|
||||
typename Map::Dart_handle adart2)
|
||||
{
|
||||
CGAL_static_assertion(2<=i && i<=Map::dimension);
|
||||
CGAL_assertion( (is_sewable_functor<Map,i>::run(amap,adart1,adart2)) );
|
||||
|
||||
CMap_dart_iterator_of_involution<Map,i> I1(amap, adart1);
|
||||
CMap_dart_iterator_of_involution_inv<Map,i> I2(amap, adart2);
|
||||
while ( I1.cont() )
|
||||
{
|
||||
amap.basic_link_beta(I1, I2, i);
|
||||
++I1; ++I2;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
/// Functor used to 1-topo_sew two darts.
|
||||
template <typename Map>
|
||||
struct topo_sew_functor<Map,1>{
|
||||
static void run(Map& amap,typename Map::Dart_handle adart1,
|
||||
typename Map::Dart_handle adart2)
|
||||
{
|
||||
CGAL_assertion( (is_sewable_functor<Map,1>::run(amap,adart1,adart2)) );
|
||||
|
||||
int mark = amap.get_new_mark();
|
||||
std::vector<typename Map::Dart_handle> dartv;
|
||||
for (CMap_dart_iterator_basic_of_cell<Map,0> it(amap,adart1,mark);
|
||||
it.cont(); ++it)
|
||||
{
|
||||
amap.mark(*it,mark);
|
||||
dartv.push_back(*it);
|
||||
}
|
||||
|
||||
CMap_dart_iterator_of_involution<Map,1> I1(amap, adart1);
|
||||
CMap_dart_iterator_of_involution_inv<Map,1> I2(amap, adart2);
|
||||
while ( I1.cont() )
|
||||
{
|
||||
if ( amap.is_marked(*I1,mark) )
|
||||
amap.template basic_link_beta<1>(*I1, *I2);
|
||||
else
|
||||
amap.template basic_link_beta<0>(*I1, *I2);
|
||||
++I1; ++I2;
|
||||
}
|
||||
|
||||
for (typename std::vector<typename Map::Dart_handle>::iterator
|
||||
it=dartv.begin(); it!=dartv.end(); ++it)
|
||||
{ amap.unmark(*it,mark); }
|
||||
CGAL_assertion( amap.is_whole_map_unmarked(mark) );
|
||||
amap.free_mark(mark);
|
||||
}
|
||||
};
|
||||
|
||||
/// Functor used to 0-topo_sew two darts.
|
||||
template <typename Map>
|
||||
struct topo_sew_functor<Map,0>{
|
||||
static void run(Map& amap,typename Map::Dart_handle adart1,
|
||||
typename Map::Dart_handle adart2)
|
||||
{ topo_sew_functor<Map,1>::run(amap,adart2,adart1); }
|
||||
};
|
||||
|
||||
/// Functor used to i-sew two darts, 2<=i<=dimension.
|
||||
template <typename Map,unsigned int i>
|
||||
struct sew_functor{
|
||||
static void run(Map& amap,typename Map::Dart_handle adart1,
|
||||
typename Map::Dart_handle adart2)
|
||||
{
|
||||
CGAL_static_assertion(2<=i && i<=Map::dimension);
|
||||
CGAL_assertion( (is_sewable_functor<Map,i>::run(amap,adart1,adart2)) );
|
||||
|
||||
CMap_dart_iterator_of_involution<Map,i> I1(amap, adart1);
|
||||
CMap_dart_iterator_of_involution_inv<Map,i> I2(amap, adart2);
|
||||
while ( I1.cont() )
|
||||
{
|
||||
amap.group_all_attributes_except(I1,I2,i);
|
||||
++I1; ++I2;
|
||||
}
|
||||
|
||||
I1.rewind(); I2.rewind();
|
||||
while ( I1.cont() )
|
||||
{
|
||||
amap.basic_link_beta(I1, I2, i);
|
||||
++I1; ++I2;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
/// Functor used to 0-sew two darts.
|
||||
template <typename Map>
|
||||
struct sew_functor<Map,0>{
|
||||
static void run(Map& amap,typename Map::Dart_handle adart1,
|
||||
typename Map::Dart_handle adart2)
|
||||
{
|
||||
CGAL_assertion( (is_sewable_functor<Map,0>::run(amap,adart1,adart2)) );
|
||||
|
||||
int mark = amap.get_new_mark();
|
||||
std::vector<typename Map::Dart_handle> dartv;
|
||||
for (CMap_dart_iterator_basic_of_cell<Map,0> it(amap,adart1,mark);
|
||||
it.cont(); ++it)
|
||||
{
|
||||
amap.mark(it,mark);
|
||||
dartv.push_back(it);
|
||||
}
|
||||
|
||||
CMap_dart_iterator_of_involution<Map,1> I1(amap, adart1);
|
||||
CMap_dart_iterator_of_involution_inv<Map,1> I2(amap, adart2);
|
||||
while ( I1.cont() )
|
||||
{
|
||||
typename Map::Dart_handle od1=I1->other_extremity();
|
||||
typename Map::Dart_handle od2=I2->other_extremity();
|
||||
if (od1!=NULL && od2!=NULL)
|
||||
amap.group_all_attributes_except(od1, od2, 1);
|
||||
++I1; ++I2;
|
||||
}
|
||||
|
||||
I1.rewind(); I2.rewind();
|
||||
while ( I1.cont() )
|
||||
{
|
||||
if ( amap.is_marked(I1,mark) )
|
||||
amap.template basic_link_beta<0>(I1, I2);
|
||||
else
|
||||
amap.template basic_link_beta<1>(I1, I2);
|
||||
++I1; ++I2;
|
||||
}
|
||||
|
||||
for (typename std::vector<typename Map::Dart_handle>::iterator
|
||||
it=dartv.begin(); it!=dartv.end(); ++it)
|
||||
{ amap.unmark(*it,mark); }
|
||||
CGAL_assertion( amap.is_whole_map_unmarked(mark) );
|
||||
amap.free_mark(mark);
|
||||
}
|
||||
};
|
||||
|
||||
/// Functor used to 1-sew two darts.
|
||||
template <typename Map>
|
||||
struct sew_functor<Map,1>{
|
||||
static void run(Map& amap,typename Map::Dart_handle adart1,
|
||||
typename Map::Dart_handle adart2)
|
||||
{
|
||||
CGAL_assertion( (is_sewable_functor<Map,1>::run(amap,adart1,adart2)) );
|
||||
int mark = amap.get_new_mark();
|
||||
std::vector<typename Map::Dart_handle> dartv;
|
||||
for (CMap_dart_iterator_basic_of_cell<Map,0> it(amap,adart1,mark);
|
||||
it.cont(); ++it)
|
||||
{
|
||||
amap.mark(it,mark);
|
||||
dartv.push_back(it);
|
||||
}
|
||||
|
||||
CMap_dart_iterator_of_involution<Map,1> I1(amap, adart1);
|
||||
CMap_dart_iterator_of_involution_inv<Map,1> I2(amap, adart2);
|
||||
while ( I1.cont() )
|
||||
{
|
||||
amap.group_all_attributes_except(I1,I2,1);
|
||||
++I1; ++I2;
|
||||
}
|
||||
|
||||
I1.rewind(); I2.rewind();
|
||||
while ( I1.cont() )
|
||||
{
|
||||
if ( amap.is_marked(I1,mark) )
|
||||
amap.template basic_link_beta<1>(I1, I2);
|
||||
else
|
||||
amap.template basic_link_beta<0>(I1, I2);
|
||||
++I1; ++I2;
|
||||
}
|
||||
|
||||
for (typename std::vector<typename Map::Dart_handle>::iterator
|
||||
it=dartv.begin(); it!=dartv.end(); ++it)
|
||||
{ amap.unmark(*it,mark); }
|
||||
CGAL_assertion( amap.is_whole_map_unmarked(mark) );
|
||||
amap.free_mark(mark);
|
||||
}
|
||||
};
|
||||
|
||||
/// Functor used to i-topo_unsew one dart, 2<=i<=dimension.
|
||||
template <typename Map,unsigned int i>
|
||||
struct topo_unsew_functor{
|
||||
static void run(Map& amap,typename Map::Dart_handle adart)
|
||||
{
|
||||
CGAL_assertion( adart!=NULL && !adart->is_free(i) );
|
||||
CGAL_static_assertion(2<=i && i<=Map::dimension);
|
||||
|
||||
CMap_dart_iterator_of_involution<Map,i> it(amap, adart);
|
||||
while ( it.cont() )
|
||||
{
|
||||
amap.unlink_beta(*it, i);
|
||||
++it;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
/// Functor used to 1-topo_unsew one dart.
|
||||
template <typename Map>
|
||||
struct topo_unsew_functor<Map,1>{
|
||||
static void run(Map& amap,typename Map::Dart_handle adart)
|
||||
{
|
||||
CGAL_assertion( adart!=NULL && !adart->is_free(1) );
|
||||
|
||||
int mark = amap.get_new_mark();
|
||||
std::vector<typename Map::Dart_handle> dartv;
|
||||
for (CMap_dart_iterator_basic_of_cell<Map,0> it(amap,adart,mark);
|
||||
it.cont(); ++it)
|
||||
{
|
||||
amap.mark(*it,mark);
|
||||
dartv.push_back(*it);
|
||||
}
|
||||
|
||||
{
|
||||
CMap_dart_iterator_of_involution<Map,1> it(amap, adart);
|
||||
while ( it.cont() )
|
||||
{
|
||||
if ( amap.is_marked(*it,mark) ) amap.unlink_beta<1>(*it);
|
||||
else amap.unlink_beta<0>(*it);
|
||||
++it;
|
||||
}
|
||||
}
|
||||
|
||||
for (typename std::vector<typename Map::Dart_handle>::iterator
|
||||
it=dartv.begin(); it!=dartv.end(); ++it)
|
||||
{ amap.unmark(*it,mark); }
|
||||
CGAL_assertion( amap.is_whole_map_unmarked(mark) );
|
||||
amap.free_mark(mark);
|
||||
}
|
||||
};
|
||||
|
||||
/// Functor used to 1-topo_unsew one dart.
|
||||
template <typename Map>
|
||||
struct topo_unsew_functor<Map,0>{
|
||||
static void run(Map& amap,typename Map::Dart_handle adart)
|
||||
{
|
||||
CGAL_assertion( adart!=NULL && !adart->is_free(0) );
|
||||
topo_unsew_functor<Map,1>::run(adart->beta(0));
|
||||
}
|
||||
};
|
||||
|
||||
/// Functor used to i-unsew one dart, 2<=i<=dimension.
|
||||
template <typename Map,unsigned int i>
|
||||
struct unsew_functor{
|
||||
static void run(Map& amap,typename Map::Dart_handle adart)
|
||||
{
|
||||
CGAL_static_assertion(2<=i && i<=Map::dimension);
|
||||
CGAL_assertion( adart!=NULL && !adart->is_free(i) );
|
||||
|
||||
std::stack<Couple_dart_and_dim<typename Map::Dart_handle> > todegroup;
|
||||
|
||||
CMap_dart_iterator_of_involution<Map,i> it(amap, adart);
|
||||
while ( it.cont() )
|
||||
{
|
||||
todegroup.push(Couple_dart_and_dim<typename Map::Dart_handle>
|
||||
(it,it->beta(i),i));
|
||||
amap.unlink_beta(it, i);
|
||||
++it;
|
||||
}
|
||||
|
||||
while (!todegroup.empty() )
|
||||
{
|
||||
Couple_dart_and_dim<typename Map::Dart_handle> c=todegroup.top();
|
||||
todegroup.pop();
|
||||
amap.degroup_all_attributes_except(c.d1,c.d2,c.dim);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
/// Functor used to 1-unsew one dart.
|
||||
template <typename Map>
|
||||
struct unsew_functor<Map,1>{
|
||||
static void run(Map& amap,typename Map::Dart_handle adart)
|
||||
{
|
||||
CGAL_assertion( adart!=NULL && !adart->is_free(1) );
|
||||
typename Map::Dart_handle d2 = NULL;
|
||||
|
||||
int mark = amap.get_new_mark();
|
||||
std::vector<typename Map::Dart_handle> dartv;
|
||||
for (CMap_dart_iterator_basic_of_cell<Map,0> it(amap,adart,mark);
|
||||
it.cont(); ++it)
|
||||
{
|
||||
amap.mark(it,mark);
|
||||
dartv.push_back(it);
|
||||
}
|
||||
|
||||
{
|
||||
CMap_dart_iterator_of_involution<Map,1> it(amap, adart);
|
||||
while ( it.cont() )
|
||||
{
|
||||
if ( amap.is_marked(it,mark) )
|
||||
{ d2 = it->beta(1); amap.template unlink_beta<1>(it); }
|
||||
else
|
||||
{ d2 = it->beta(0); amap.template unlink_beta<0>(it); }
|
||||
amap.degroup_all_attributes_except(it,d2,1);
|
||||
++it;
|
||||
}
|
||||
}
|
||||
|
||||
for (typename std::vector<typename Map::Dart_handle>::iterator
|
||||
it=dartv.begin(); it!=dartv.end(); ++it)
|
||||
{ amap.unmark(*it,mark); }
|
||||
CGAL_assertion( amap.is_whole_map_unmarked(mark) );
|
||||
amap.free_mark(mark);
|
||||
}
|
||||
};
|
||||
|
||||
/// Functor used to 0-unsew one dart.
|
||||
template <typename Map>
|
||||
struct unsew_functor<Map,0>{
|
||||
static void run(Map& amap,typename Map::Dart_handle adart)
|
||||
{
|
||||
CGAL_assertion( adart!=NULL && !adart->is_free(0) );
|
||||
typename Map::Dart_handle d2 = NULL;
|
||||
|
||||
int mark = amap.get_new_mark();
|
||||
std::vector<typename Map::Dart_handle> dartv;
|
||||
for (CMap_dart_iterator_basic_of_cell<Map,0> it(amap,adart,mark);
|
||||
it.cont(); ++it)
|
||||
{
|
||||
amap.mark(it,mark);
|
||||
dartv.push_back(it);
|
||||
}
|
||||
|
||||
{
|
||||
CMap_dart_iterator_of_involution<Map,1> it(amap, adart);
|
||||
while ( it.cont() )
|
||||
{
|
||||
if ( amap.is_marked(it,mark) )
|
||||
{ d2 = it->beta(0); amap.template unlink_beta<0>(it); }
|
||||
else
|
||||
{ d2 = it->beta(1); amap.template unlink_beta<1>(it); }
|
||||
|
||||
typename Map::Dart_handle od1=it->other_extremity();
|
||||
typename Map::Dart_handle od2=d2->other_extremity();
|
||||
if ( od1!=NULL && od2!=NULL )
|
||||
amap.degroup_all_attributes_except(od1,od2,1);
|
||||
|
||||
++it;
|
||||
}
|
||||
}
|
||||
|
||||
for (typename std::vector<typename Map::Dart_handle>::iterator
|
||||
it=dartv.begin(); it!=dartv.end(); ++it)
|
||||
{ amap.unmark(*it,mark); }
|
||||
CGAL_assertion( amap.is_whole_map_unmarked(mark) );
|
||||
amap.free_mark(mark);
|
||||
}
|
||||
};
|
||||
|
||||
/// Functor used to i-link two darts, 2<=i<=dimension.
|
||||
template <typename Map,unsigned int i>
|
||||
struct basic_link_beta_functor{
|
||||
static void run(Map&,typename Map::Dart_handle adart1,
|
||||
typename Map::Dart_handle adart2)
|
||||
{
|
||||
CGAL_assertion(adart1 != NULL && adart2 != NULL && adart1!=adart2);
|
||||
CGAL_static_assertion( i>=2 && i<=Map::dimension );
|
||||
adart1->basic_link_beta(adart2, i);
|
||||
adart2->basic_link_beta(adart1, i);
|
||||
}
|
||||
};
|
||||
|
||||
/// Functor used to 0-link two darts.
|
||||
template <typename Map>
|
||||
struct basic_link_beta_functor<Map,0>{
|
||||
static void run(Map&,typename Map::Dart_handle adart1,
|
||||
typename Map::Dart_handle adart2)
|
||||
{
|
||||
CGAL_assertion(adart1 != NULL && adart2 != NULL );
|
||||
adart1->basic_link_beta(adart2, 0);
|
||||
adart2->basic_link_beta(adart1, 1);
|
||||
}
|
||||
};
|
||||
|
||||
/// Functor used to 1-link two darts.
|
||||
template <typename Map>
|
||||
struct basic_link_beta_functor<Map,1>{
|
||||
static void run(Map& ,typename Map::Dart_handle adart1,
|
||||
typename Map::Dart_handle adart2)
|
||||
{
|
||||
CGAL_assertion(adart1 != NULL && adart2 != NULL);
|
||||
adart1->basic_link_beta(adart2, 1);
|
||||
adart2->basic_link_beta(adart1, 0);
|
||||
}
|
||||
};
|
||||
|
||||
/// Functor used to i-unlink one dart.
|
||||
template <typename Map,unsigned int i>
|
||||
struct unlink_beta_functor{
|
||||
static void run(Map&,typename Map::Dart_handle adart)
|
||||
{
|
||||
CGAL_assertion(adart != NULL && !adart->is_free(i));
|
||||
CGAL_static_assertion(2<=i && i<=Map::dimension);
|
||||
adart->beta(i)->unlink_beta(i);
|
||||
adart->unlink_beta(i);
|
||||
}
|
||||
};
|
||||
|
||||
/// Functor used to 0-unlink one dart.
|
||||
template <typename Map>
|
||||
struct unlink_beta_functor<Map,0>{
|
||||
static void run(Map&,typename Map::Dart_handle adart)
|
||||
{
|
||||
CGAL_assertion(adart != NULL && !adart->is_free(0));
|
||||
adart->beta(0)->unlink_beta(1);
|
||||
adart->unlink_beta(0);
|
||||
}
|
||||
};
|
||||
|
||||
/// Functor used to 1-unlink one dart.
|
||||
template <typename Map>
|
||||
struct unlink_beta_functor<Map,1>{
|
||||
static void run(Map&,typename Map::Dart_handle adart)
|
||||
{
|
||||
CGAL_assertion(adart != NULL && !adart->is_free(1));
|
||||
adart->beta(1)->unlink_beta(0);
|
||||
adart->unlink_beta(1);
|
||||
}
|
||||
};
|
||||
|
||||
// Functor used to group one attribute of two given darts
|
||||
template <typename CMap, unsigned int i, typename Type_attr>
|
||||
struct Group_one_attribute_functor
|
||||
|
|
@ -855,7 +341,7 @@ namespace CGAL {
|
|||
{
|
||||
CGAL_assertion( adim==-1 ||
|
||||
(0<=adim && (unsigned int)adim<=CMap::dimension) );
|
||||
|
||||
// todo ASSERT (1<=adim && ...) ???
|
||||
if ( adim!=0 )
|
||||
{
|
||||
typename CMap::Dart_handle od = dh1->other_extremity();
|
||||
|
|
@ -897,49 +383,6 @@ namespace CGAL {
|
|||
}
|
||||
};
|
||||
|
||||
/// Functor used to i-link two darts, 2<=i<=dimension.
|
||||
template <typename CMap,unsigned int i>
|
||||
struct link_beta_functor{
|
||||
static void run(CMap& amap,typename CMap::Dart_handle adart1,
|
||||
typename CMap::Dart_handle adart2)
|
||||
{
|
||||
CGAL_assertion(adart1 != NULL && adart2 != NULL && adart1!=adart2 );
|
||||
CGAL_static_assertion( 2<=i && i<=CMap::dimension );
|
||||
adart1->basic_link_beta(adart2, i);
|
||||
adart2->basic_link_beta(adart1, i);
|
||||
CMap::Helper::template Foreach_enabled_attributes
|
||||
<Group_attribute_functor_of_dart<CMap> >::run(&amap,adart1,adart2,i);
|
||||
}
|
||||
};
|
||||
|
||||
/// Functor used to 0-link two darts.
|
||||
template <typename Map>
|
||||
struct link_beta_functor<Map,0>{
|
||||
static void run(Map& amap,typename Map::Dart_handle adart1,
|
||||
typename Map::Dart_handle adart2)
|
||||
{
|
||||
CGAL_assertion(adart1 != NULL && adart2 != NULL);
|
||||
adart1->basic_link_beta(adart2,0);
|
||||
adart2->basic_link_beta(adart1, 1);
|
||||
Map::Helper::template Foreach_enabled_attributes
|
||||
<Group_attribute_functor_of_dart<Map> >::run(&amap,adart1,adart2,0);
|
||||
}
|
||||
};
|
||||
|
||||
/// Functor used to 1-link two darts.
|
||||
template <typename Map>
|
||||
struct link_beta_functor<Map,1>{
|
||||
static void run(Map& amap,typename Map::Dart_handle adart1,
|
||||
typename Map::Dart_handle adart2)
|
||||
{
|
||||
CGAL_assertion(adart1 != NULL && adart2 != NULL);
|
||||
adart1->basic_link_beta(adart2,1);
|
||||
adart2->basic_link_beta(adart1,0);
|
||||
Map::Helper::template Foreach_enabled_attributes
|
||||
<Group_attribute_functor_of_dart<Map> >::run(&amap,adart1,adart2,1);
|
||||
}
|
||||
};
|
||||
|
||||
// Functor used to call the On_split functor between the two given darts.
|
||||
template<typename Map,unsigned int i,
|
||||
typename Enabled=
|
||||
|
|
|
|||
|
|
@ -0,0 +1,101 @@
|
|||
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
|
||||
#include <CGAL/convex_hull_2.h>
|
||||
#include <CGAL/ch_jarvis.h>
|
||||
#include <CGAL/ch_eddy.h>
|
||||
#include <CGAL/Timer.h>
|
||||
|
||||
#include <CGAL/point_generators_2.h>
|
||||
#include <CGAL/algorithm.h>
|
||||
#include <boost/math/special_functions/next.hpp>
|
||||
|
||||
#include <iostream>
|
||||
#include <vector>
|
||||
|
||||
|
||||
#define bench(METHOD,CONTAINER) \
|
||||
{\
|
||||
std::size_t previous=0;\
|
||||
unsigned run=0;\
|
||||
CGAL::Timer time;\
|
||||
do{\
|
||||
result.clear();\
|
||||
time.start();\
|
||||
METHOD( CONTAINER.begin(), CONTAINER.end(), std::back_inserter(result) );\
|
||||
time.stop();\
|
||||
if( previous!=0 && previous!=result.size()) std::cerr << "error got different result" << std::endl;\
|
||||
previous=result.size();\
|
||||
}while(++run<repeat+1);\
|
||||
std::cout << result.size() << " points on the convex hull using "<< #METHOD << "; Done in "<< time.time() << "s\n";\
|
||||
}
|
||||
|
||||
typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
|
||||
typedef K::Point_2 Point_2;
|
||||
typedef std::vector<Point_2> Points;
|
||||
typedef CGAL::Creator_uniform_2<double,Point_2> Creator;
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
unsigned nbpts=100000;
|
||||
unsigned repeat=0;
|
||||
unsigned seed=0;
|
||||
|
||||
if (argc>1) nbpts=atoi(argv[1]);
|
||||
|
||||
if (argc>2) repeat=atoi(argv[2]);
|
||||
if (argc>3) seed=atoi(argv[3]);
|
||||
|
||||
Points points, result;
|
||||
|
||||
CGAL::Random r(seed);
|
||||
CGAL::Random_points_in_disc_2<Point_2,Creator> g( 150.0,r);
|
||||
CGAL::cpp0x::copy_n( g, nbpts, std::back_inserter(points));
|
||||
|
||||
//the following code is for testing when there is only two extreme points, affine hull is 2D
|
||||
/*
|
||||
CGAL::Bbox_2 bbox=points.begin()->bbox();
|
||||
for (Points::iterator it=points.begin();it!=points.end();++it)
|
||||
bbox=bbox+it->bbox();
|
||||
|
||||
points.push_back( Point_2(bbox.xmin()-1,bbox.ymin()-1) );
|
||||
points.push_back( Point_2(bbox.xmax()+1,bbox.ymax()+1) );
|
||||
*/
|
||||
|
||||
//the following code is for testing when there is only three extreme points
|
||||
/*
|
||||
CGAL::Bbox_2 bbox=points.begin()->bbox();
|
||||
for (Points::iterator it=points.begin();it!=points.end();++it)
|
||||
bbox=bbox+it->bbox();
|
||||
|
||||
points.push_back( Point_2(bbox.xmin()-1,bbox.ymin()-1) );
|
||||
points.push_back( Point_2(bbox.xmax()+1,bbox.ymax()+1) );
|
||||
points.push_back( Point_2(bbox.xmax(),bbox.ymax()+2) );
|
||||
*/
|
||||
|
||||
//the following code is for testing when there is only two extreme points, affine hull is 1D
|
||||
/*
|
||||
points.clear();
|
||||
for (unsigned i=0;i<nbpts;++i)
|
||||
points.push_back(Point_2(i,i));
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
std::cout << "seed is " << seed << "; using " << nbpts << " pts; on " << repeat+1 << " run(s).\n";
|
||||
|
||||
std::cout << "Using vector" << std::endl;
|
||||
bench(CGAL::convex_hull_2,points)
|
||||
//bench(CGAL::ch_akl_toussaint,points)
|
||||
//bench(CGAL::ch_bykat,points)
|
||||
//bench(CGAL::ch_eddy,points)
|
||||
//bench(CGAL::ch_graham_andrew,points)
|
||||
//bench(CGAL::ch_jarvis,points)
|
||||
|
||||
{
|
||||
std::list<Point_2> pt_list;
|
||||
std::copy(points.begin(),points.end(),std::back_inserter(pt_list));
|
||||
std::cout << "Using list" << std::endl;
|
||||
bench(CGAL::convex_hull_2,pt_list)
|
||||
}
|
||||
}
|
||||
|
|
@ -1 +1,2 @@
|
|||
demo
|
||||
demo
|
||||
benchmark
|
||||
|
|
|
|||
|
|
@ -0,0 +1,500 @@
|
|||
5887 415
|
||||
3001 7410
|
||||
1424 5645
|
||||
152 4513
|
||||
3309 92
|
||||
2056 5013
|
||||
2867 5103
|
||||
2130 2112
|
||||
1175 6885
|
||||
5961 1334
|
||||
6698 1687
|
||||
1697 6506
|
||||
2314 413
|
||||
6748 3033
|
||||
2999 6466
|
||||
4108 1497
|
||||
7058 4673
|
||||
2722 2660
|
||||
5650 7834
|
||||
6133 6758
|
||||
3437 5836
|
||||
5105 6980
|
||||
4859 7847
|
||||
661 5558
|
||||
7217 4971
|
||||
3914 8121
|
||||
2335 7065
|
||||
7768 5448
|
||||
788 6284
|
||||
435 5097
|
||||
2081 6371
|
||||
7561 3193
|
||||
7162 5054
|
||||
7192 1834
|
||||
613 5359
|
||||
6277 6713
|
||||
5133 4829
|
||||
2662 6455
|
||||
3016 430
|
||||
2142 3057
|
||||
4580 8102
|
||||
4023 3026
|
||||
5238 889
|
||||
285 2713
|
||||
6821 4910
|
||||
4476 6977
|
||||
7789 4847
|
||||
7146 6828
|
||||
925 2001
|
||||
5976 743
|
||||
796 3028
|
||||
3013 2308
|
||||
3259 7382
|
||||
6164 6374
|
||||
194 4727
|
||||
1465 7214
|
||||
3907 2634
|
||||
6618 7097
|
||||
7321 6129
|
||||
1004 6739
|
||||
6022 974
|
||||
6673 3219
|
||||
7622 4192
|
||||
5190 538
|
||||
3362 5537
|
||||
7109 6405
|
||||
3804 3786
|
||||
6490 3234
|
||||
6537 1970
|
||||
3981 4339
|
||||
4068 2563
|
||||
5859 786
|
||||
1909 7558
|
||||
5583 7876
|
||||
7884 5617
|
||||
6019 3225
|
||||
3833 1376
|
||||
2944 5302
|
||||
5985 5130
|
||||
6577 1577
|
||||
4222 8106
|
||||
2508 1459
|
||||
1300 7061
|
||||
6999 4506
|
||||
3372 8095
|
||||
7729 4514
|
||||
2606 2035
|
||||
4955 3001
|
||||
493 2389
|
||||
6837 3086
|
||||
1445 2160
|
||||
4987 5290
|
||||
7734 3466
|
||||
7663 2721
|
||||
406 5869
|
||||
6155 4289
|
||||
5652 3638
|
||||
2799 7406
|
||||
6218 3448
|
||||
1205 1578
|
||||
910 6660
|
||||
3581 5926
|
||||
899 3226
|
||||
4711 8048
|
||||
7154 5459
|
||||
139 5011
|
||||
7924 4481
|
||||
2386 6534
|
||||
6551 6706
|
||||
3970 3804
|
||||
3322 1252
|
||||
221 5229
|
||||
6917 7037
|
||||
4904 4789
|
||||
6047 6939
|
||||
1408 1784
|
||||
7278 4252
|
||||
4978 6220
|
||||
3934 6489
|
||||
6418 4256
|
||||
7919 5067
|
||||
6686 6448
|
||||
7967 3366
|
||||
7201 6764
|
||||
5898 747
|
||||
1906 2521
|
||||
3554 1386
|
||||
3490 7235
|
||||
6420 3292
|
||||
3545 3232
|
||||
6992 6850
|
||||
2924 5246
|
||||
2925 5579
|
||||
5371 1375
|
||||
3114 7794
|
||||
7 3861
|
||||
756 6438
|
||||
1125 3570
|
||||
7914 2782
|
||||
156 5153
|
||||
124 3792
|
||||
8028 5212
|
||||
3243 7377
|
||||
4643 6666
|
||||
7624 2363
|
||||
39 3540
|
||||
7116 5850
|
||||
5492 7943
|
||||
1726 6801
|
||||
4614 8158
|
||||
3510 6369
|
||||
4942 7139
|
||||
8053 5151
|
||||
707 4269
|
||||
1337 4824
|
||||
1155 6936
|
||||
3706 527
|
||||
4092 6932
|
||||
3614 364
|
||||
1389 3831
|
||||
5281 5182
|
||||
4315 7519
|
||||
1556 6863
|
||||
3610 668
|
||||
8051 3906
|
||||
32 4395
|
||||
4139 6410
|
||||
3193 7994
|
||||
519 5682
|
||||
509 6045
|
||||
3852 405
|
||||
87 3630
|
||||
4239 4694
|
||||
172 5208
|
||||
7361 4978
|
||||
6645 6246
|
||||
2817 4623
|
||||
7028 3898
|
||||
5314 4602
|
||||
7665 5467
|
||||
5663 1090
|
||||
3144 5935
|
||||
3168 8052
|
||||
2937 5645
|
||||
1413 2424
|
||||
2050 7610
|
||||
1584 4625
|
||||
1157 5450
|
||||
1493 5679
|
||||
3957 2665
|
||||
7686 3408
|
||||
2113 7498
|
||||
1080 3224
|
||||
1280 1476
|
||||
416 2608
|
||||
1589 2904
|
||||
3181 1172
|
||||
5319 327
|
||||
1655 815
|
||||
2750 1856
|
||||
5194 227
|
||||
3690 88
|
||||
3158 110
|
||||
1939 1895
|
||||
1959 678
|
||||
4290 3233
|
||||
8174 4474
|
||||
7020 6558
|
||||
3487 58
|
||||
6739 1346
|
||||
5285 6976
|
||||
1864 868
|
||||
4549 7895
|
||||
6127 582
|
||||
7725 2371
|
||||
4724 260
|
||||
5313 7499
|
||||
2653 3268
|
||||
4859 261
|
||||
4940 7249
|
||||
37 3593
|
||||
5038 4715
|
||||
739 2328
|
||||
1931 7258
|
||||
4702 3719
|
||||
214 2814
|
||||
2343 7707
|
||||
2242 2768
|
||||
2617 3520
|
||||
1417 5126
|
||||
7126 4971
|
||||
7518 3994
|
||||
3750 811
|
||||
2348 659
|
||||
3655 8063
|
||||
5576 4351
|
||||
7712 5908
|
||||
7549 5586
|
||||
608 4468
|
||||
897 4757
|
||||
7289 6329
|
||||
3402 2683
|
||||
6318 5202
|
||||
6192 1653
|
||||
7181 1465
|
||||
4559 42
|
||||
5303 7744
|
||||
7742 3505
|
||||
1414 6945
|
||||
5829 2677
|
||||
2445 364
|
||||
5822 6436
|
||||
594 2235
|
||||
2704 1660
|
||||
756 3301
|
||||
2068 3952
|
||||
7622 2111
|
||||
1056 4184
|
||||
6878 1379
|
||||
2472 4005
|
||||
7637 2051
|
||||
7234 1587
|
||||
1304 7087
|
||||
8020 2942
|
||||
1320 2042
|
||||
903 1666
|
||||
4207 1633
|
||||
6504 7081
|
||||
3191 7117
|
||||
2083 5272
|
||||
5412 3493
|
||||
1262 3960
|
||||
1408 6935
|
||||
4113 8111
|
||||
1896 4070
|
||||
2951 4895
|
||||
3896 3293
|
||||
2327 2823
|
||||
1040 6593
|
||||
168 3957
|
||||
3153 7837
|
||||
4515 8130
|
||||
938 4262
|
||||
3569 6276
|
||||
1285 5931
|
||||
4958 7424
|
||||
1735 5690
|
||||
2510 4100
|
||||
2258 2174
|
||||
6693 4939
|
||||
2856 7251
|
||||
4800 1983
|
||||
4923 1181
|
||||
7262 1539
|
||||
7629 6167
|
||||
6026 4578
|
||||
2421 7824
|
||||
863 6315
|
||||
7298 2459
|
||||
6243 769
|
||||
7914 3218
|
||||
5075 947
|
||||
4031 3880
|
||||
7417 5501
|
||||
3740 7138
|
||||
499 3554
|
||||
7040 4680
|
||||
644 4803
|
||||
6879 2086
|
||||
7750 2400
|
||||
7090 5971
|
||||
2715 4008
|
||||
5157 993
|
||||
401 4780
|
||||
469 3191
|
||||
247 3081
|
||||
2626 5305
|
||||
7831 3323
|
||||
2439 3379
|
||||
2217 3054
|
||||
3477 158
|
||||
2619 7619
|
||||
2092 2313
|
||||
806 4004
|
||||
3859 7956
|
||||
1902 7258
|
||||
7075 1306
|
||||
1584 4628
|
||||
606 4183
|
||||
7604 2746
|
||||
7725 5980
|
||||
5352 6531
|
||||
925 4829
|
||||
519 3517
|
||||
4510 6815
|
||||
3939 1583
|
||||
5587 1879
|
||||
962 2440
|
||||
3374 8056
|
||||
384 3233
|
||||
16 3750
|
||||
4294 23
|
||||
806 5983
|
||||
810 2210
|
||||
7812 5808
|
||||
3600 7564
|
||||
1672 801
|
||||
4902 1100
|
||||
2166 864
|
||||
3947 386
|
||||
1744 2375
|
||||
809 3229
|
||||
2818 7959
|
||||
2458 370
|
||||
1132 2452
|
||||
6678 2040
|
||||
8026 4273
|
||||
1752 7320
|
||||
562 3332
|
||||
5823 3949
|
||||
6820 4267
|
||||
7783 5877
|
||||
4444 2849
|
||||
4525 738
|
||||
1629 5442
|
||||
6568 4432
|
||||
6496 1497
|
||||
5229 7991
|
||||
6846 5155
|
||||
1495 7247
|
||||
270 4290
|
||||
6504 4747
|
||||
4356 8170
|
||||
7655 5576
|
||||
629 2217
|
||||
5201 7777
|
||||
1472 4426
|
||||
6273 2818
|
||||
450 5821
|
||||
538 4480
|
||||
3235 118
|
||||
4710 7913
|
||||
5357 7992
|
||||
5885 7663
|
||||
228 4242
|
||||
7840 5496
|
||||
2711 7939
|
||||
4810 96
|
||||
5888 5734
|
||||
7788 2428
|
||||
7202 5711
|
||||
6928 1142
|
||||
2411 7824
|
||||
1406 7055
|
||||
1549 894
|
||||
2250 3013
|
||||
2449 1048
|
||||
1915 640
|
||||
3065 7903
|
||||
6362 7371
|
||||
2035 6607
|
||||
2465 3099
|
||||
193 3209
|
||||
5665 3774
|
||||
3614 831
|
||||
6038 495
|
||||
1916 7336
|
||||
3753 7265
|
||||
1394 1607
|
||||
2338 1205
|
||||
1004 1462
|
||||
6195 3779
|
||||
3420 8123
|
||||
7148 5301
|
||||
2529 4608
|
||||
3574 281
|
||||
1582 2050
|
||||
601 1962
|
||||
6667 2847
|
||||
4947 359
|
||||
3245 7872
|
||||
579 4940
|
||||
2642 269
|
||||
2703 853
|
||||
912 2854
|
||||
4765 972
|
||||
6048 499
|
||||
2933 1020
|
||||
8065 3113
|
||||
4376 7932
|
||||
4678 5484
|
||||
4769 7467
|
||||
7963 5276
|
||||
7280 1548
|
||||
455 2598
|
||||
3200 3714
|
||||
7063 4333
|
||||
7967 3726
|
||||
6918 1380
|
||||
541 2072
|
||||
839 6554
|
||||
3168 4672
|
||||
7050 6858
|
||||
366 5697
|
||||
6994 5928
|
||||
7759 5807
|
||||
3523 392
|
||||
4744 53
|
||||
6376 3289
|
||||
2111 5838
|
||||
7743 5008
|
||||
3704 8171
|
||||
3707 2431
|
||||
7656 4869
|
||||
591 2448
|
||||
5981 7731
|
||||
1312 2434
|
||||
2616 521
|
||||
2282 6225
|
||||
6557 1734
|
||||
3811 1702
|
||||
1471 6985
|
||||
3270 2142
|
||||
619 5511
|
||||
64 3965
|
||||
4097 2438
|
||||
2298 7773
|
||||
5160 8035
|
||||
7463 5250
|
||||
1530 5996
|
||||
3933 1260
|
||||
1976 3259
|
||||
290 4058
|
||||
1571 7216
|
||||
1077 1464
|
||||
1643 7366
|
||||
3461 7728
|
||||
7200 3490
|
||||
5862 7720
|
||||
3034 4119
|
||||
6112 566
|
||||
1954 7443
|
||||
3793 6048
|
||||
8014 3305
|
||||
2283 7576
|
||||
7210 4879
|
||||
847 6503
|
||||
562 2637
|
||||
4350 7957
|
||||
4795 974
|
||||
4095 1188
|
||||
1271 4802
|
||||
6696 4009
|
||||
2965 7334
|
||||
3261 5206
|
||||
2671 6041
|
||||
7562 2516
|
||||
2497 4139
|
||||
2737 806
|
||||
2378 5325
|
||||
|
|
@ -31,9 +31,195 @@
|
|||
#include <CGAL/algorithm.h>
|
||||
#include <CGAL/IO/Tee_for_output_iterator.h>
|
||||
#include <boost/bind.hpp>
|
||||
#include <CGAL/tuple.h>
|
||||
#include <CGAL/utility.h>
|
||||
#include <iterator>
|
||||
|
||||
namespace CGAL {
|
||||
|
||||
|
||||
namespace internal{
|
||||
|
||||
template <class ForwardIterator, class Traits>
|
||||
inline
|
||||
cpp0x::tuple<ForwardIterator,ForwardIterator,ForwardIterator,ForwardIterator>
|
||||
ch_nswe_point_with_order( ForwardIterator first, ForwardIterator last,
|
||||
ForwardIterator& n,
|
||||
ForwardIterator& s,
|
||||
ForwardIterator& w,
|
||||
ForwardIterator& e,
|
||||
const Traits& ch_traits,
|
||||
std::forward_iterator_tag )
|
||||
{
|
||||
typename Traits::Less_xy_2
|
||||
lexicographically_xy_smaller = ch_traits.less_xy_2_object();
|
||||
typename Traits::Less_yx_2
|
||||
lexicographically_yx_smaller = ch_traits.less_yx_2_object();
|
||||
n = s = w = e = first;
|
||||
unsigned i=0;
|
||||
//array use to track the position of w,e,n,s in the range. first is for the position, second to track
|
||||
//the original position after sorting
|
||||
std::pair<unsigned,unsigned> positions[4]={
|
||||
std::make_pair(0,0),
|
||||
std::make_pair(0,1),
|
||||
std::make_pair(0,2),
|
||||
std::make_pair(0,3) };
|
||||
|
||||
while ( first != last )
|
||||
{
|
||||
if ( lexicographically_xy_smaller( *first, *w )) { w = first; positions[0].first=i; }
|
||||
if ( lexicographically_xy_smaller( *e, *first )) { e = first; positions[1].first=i; }
|
||||
if ( lexicographically_yx_smaller( *n, *first )) { n = first; positions[2].first=i; }
|
||||
if ( lexicographically_yx_smaller( *first, *s )) { s = first; positions[3].first=i; }
|
||||
++first;
|
||||
++i;
|
||||
}
|
||||
ForwardIterator iterators[4]={w,e,n,s};
|
||||
std::sort(positions,positions+4);
|
||||
|
||||
return cpp0x::make_tuple(
|
||||
iterators[positions[0].second],
|
||||
iterators[positions[1].second],
|
||||
iterators[positions[2].second],
|
||||
iterators[positions[3].second]
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
template <class RandomAccessIterator, class Traits>
|
||||
inline
|
||||
cpp0x::tuple<RandomAccessIterator,RandomAccessIterator,RandomAccessIterator,RandomAccessIterator>
|
||||
ch_nswe_point_with_order( RandomAccessIterator first, RandomAccessIterator last,
|
||||
RandomAccessIterator& n,
|
||||
RandomAccessIterator& s,
|
||||
RandomAccessIterator& w,
|
||||
RandomAccessIterator& e,
|
||||
const Traits& ch_traits,
|
||||
std::random_access_iterator_tag)
|
||||
{
|
||||
ch_nswe_point(first,last,n,s,w,e,ch_traits);
|
||||
RandomAccessIterator iterators[4]={w,e,n,s};
|
||||
std::sort(iterators,iterators+4);
|
||||
|
||||
return cpp0x::make_tuple(
|
||||
iterators[0],
|
||||
iterators[1],
|
||||
iterators[2],
|
||||
iterators[3]
|
||||
);
|
||||
}
|
||||
|
||||
//this function does the same as ch_nswe_point but return the iterators n,s,w,e
|
||||
//sorted according to their positions in the range [first,last]
|
||||
template <class ForwardIterator, class Traits>
|
||||
inline
|
||||
cpp0x::tuple<ForwardIterator,ForwardIterator,ForwardIterator,ForwardIterator>
|
||||
ch_nswe_point_with_order( ForwardIterator first, ForwardIterator last,
|
||||
ForwardIterator& n,
|
||||
ForwardIterator& s,
|
||||
ForwardIterator& w,
|
||||
ForwardIterator& e,
|
||||
const Traits& ch_traits)
|
||||
{
|
||||
return ch_nswe_point_with_order(first,last,n,s,w,e,ch_traits,typename std::iterator_traits<ForwardIterator>::iterator_category());
|
||||
}
|
||||
|
||||
template <class ForwardIterator,class Traits>
|
||||
inline
|
||||
void ch_akl_toussaint_assign_points_to_regions(ForwardIterator first, ForwardIterator last,
|
||||
const typename Traits::Left_turn_2& left_turn,
|
||||
ForwardIterator e,
|
||||
ForwardIterator w,
|
||||
ForwardIterator n,
|
||||
ForwardIterator s,
|
||||
std::vector< typename Traits::Point_2 >& region1,
|
||||
std::vector< typename Traits::Point_2 >& region2,
|
||||
std::vector< typename Traits::Point_2 >& region3,
|
||||
std::vector< typename Traits::Point_2 >& region4,
|
||||
const Traits&)
|
||||
{
|
||||
for ( ; first != last; ++first )
|
||||
{
|
||||
if ( left_turn(*e, *w, *first ) )
|
||||
{
|
||||
if ( left_turn( *s, *w, *first ) ) region1.push_back( *first );
|
||||
else if ( left_turn( *e, *s, *first ) ) region2.push_back( *first );
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( left_turn( *n, *e, *first ) ) region3.push_back( *first );
|
||||
else if ( left_turn( *w, *n, *first ) ) region4.push_back( *first );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
template <class ForwardIterator,class Traits>
|
||||
inline
|
||||
void ch_akl_toussaint_assign_points_to_regions_deg(ForwardIterator first, ForwardIterator last,
|
||||
const typename Traits::Left_turn_2& left_turn,
|
||||
ForwardIterator e,
|
||||
ForwardIterator w,
|
||||
ForwardIterator n,
|
||||
ForwardIterator s,
|
||||
std::vector< typename Traits::Point_2 >& region1,
|
||||
std::vector< typename Traits::Point_2 >& region2,
|
||||
std::vector< typename Traits::Point_2 >& region3,
|
||||
std::vector< typename Traits::Point_2 >& region4,
|
||||
int duplicated_exteme_points,
|
||||
const Traits& traits)
|
||||
{
|
||||
std::vector< typename Traits::Point_2 >& r1 = (s==w?region2:region1);
|
||||
std::vector< typename Traits::Point_2 >& r3 = (n==e?region4:region3);
|
||||
switch(duplicated_exteme_points){
|
||||
case 2:
|
||||
{
|
||||
typename Traits::Orientation_2 orient = traits.orientation_2_object();
|
||||
for ( ; first != last; ++first )
|
||||
{
|
||||
switch( orient(*e,*w,*first) ){
|
||||
case LEFT_TURN:
|
||||
r1.push_back( *first );
|
||||
break;
|
||||
case RIGHT_TURN:
|
||||
r3.push_back( *first );
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
default: //this is case 1
|
||||
if (s==w || s==e){
|
||||
for ( ; first != last; ++first )
|
||||
{
|
||||
if ( left_turn(*e, *w, *first ) )
|
||||
r1.push_back( *first );
|
||||
else
|
||||
{
|
||||
if ( left_turn( *n, *e, *first ) ) region3.push_back( *first );
|
||||
else if ( left_turn( *w, *n, *first ) ) region4.push_back( *first );
|
||||
}
|
||||
}
|
||||
}
|
||||
else{
|
||||
for ( ; first != last; ++first )
|
||||
{
|
||||
//note that e!=w and s!=n except if the convex hull is a point (they are lexicographically sorted)
|
||||
if ( left_turn(*e, *w, *first ) )
|
||||
{
|
||||
if (s!=w && left_turn( *s, *w, *first ) ) region1.push_back( *first );
|
||||
else if (e!=s && left_turn( *e, *s, *first ) ) region2.push_back( *first );
|
||||
}
|
||||
else
|
||||
r3.push_back( *first );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}//namespace internal
|
||||
|
||||
template <class ForwardIterator, class OutputIterator, class Traits>
|
||||
OutputIterator
|
||||
ch_akl_toussaint(ForwardIterator first, ForwardIterator last,
|
||||
|
|
@ -52,7 +238,9 @@ ch_akl_toussaint(ForwardIterator first, ForwardIterator last,
|
|||
|
||||
if (first == last) return result;
|
||||
ForwardIterator n, s, e, w;
|
||||
ch_nswe_point( first, last, n, s, w, e, ch_traits);
|
||||
cpp0x::tuple<ForwardIterator,ForwardIterator,ForwardIterator,ForwardIterator> ranges=
|
||||
internal::ch_nswe_point_with_order( first, last, n, s, w, e, ch_traits);
|
||||
|
||||
if (equal_points(*n, *s) )
|
||||
{
|
||||
*result = *w; ++result;
|
||||
|
|
@ -73,21 +261,35 @@ ch_akl_toussaint(ForwardIterator first, ForwardIterator last,
|
|||
region4.push_back( *n);
|
||||
|
||||
CGAL_ch_postcondition_code( ForwardIterator save_first = first; )
|
||||
|
||||
for ( ; first != last; ++first )
|
||||
|
||||
int duplicated_exteme_points = (cpp0x::get<0>(ranges)==cpp0x::get<1>(ranges)?1:0) +
|
||||
(cpp0x::get<1>(ranges)==cpp0x::get<2>(ranges)?1:0) +
|
||||
(cpp0x::get<2>(ranges)==cpp0x::get<3>(ranges)?1:0);
|
||||
|
||||
//several calls to avoid filter failures when using n,s,e,w
|
||||
if (duplicated_exteme_points)
|
||||
{
|
||||
if ( left_turn(*e, *w, *first ) )
|
||||
{
|
||||
if ( left_turn( *s, *w, *first ) ) region1.push_back( *first );
|
||||
else if ( left_turn( *e, *s, *first ) ) region2.push_back( *first );
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( left_turn( *n, *e, *first ) ) region3.push_back( *first );
|
||||
else if ( left_turn( *w, *n, *first ) ) region4.push_back( *first );
|
||||
}
|
||||
internal::ch_akl_toussaint_assign_points_to_regions_deg(first,cpp0x::get<0>(ranges),left_turn,e,w,n,s,region1,region2,region3,region4,duplicated_exteme_points,ch_traits);
|
||||
|
||||
if ( cpp0x::get<0>(ranges)!=cpp0x::get<1>(ranges) )
|
||||
internal::ch_akl_toussaint_assign_points_to_regions_deg(cpp0x::next(cpp0x::get<0>(ranges)),cpp0x::get<1>(ranges),left_turn,e,w,n,s,region1,region2,region3,region4,duplicated_exteme_points,ch_traits);
|
||||
|
||||
if ( cpp0x::get<1>(ranges)!=cpp0x::get<2>(ranges) )
|
||||
internal::ch_akl_toussaint_assign_points_to_regions_deg(cpp0x::next(cpp0x::get<1>(ranges)),cpp0x::get<2>(ranges),left_turn,e,w,n,s,region1,region2,region3,region4,duplicated_exteme_points,ch_traits);
|
||||
|
||||
if ( cpp0x::get<2>(ranges)!=cpp0x::get<3>(ranges) )
|
||||
internal::ch_akl_toussaint_assign_points_to_regions_deg(cpp0x::next(cpp0x::get<2>(ranges)),cpp0x::get<3>(ranges),left_turn,e,w,n,s,region1,region2,region3,region4,duplicated_exteme_points,ch_traits);
|
||||
|
||||
internal::ch_akl_toussaint_assign_points_to_regions_deg(cpp0x::next(cpp0x::get<3>(ranges)),last,left_turn,e,w,n,s,region1,region2,region3,region4,duplicated_exteme_points,ch_traits);
|
||||
}
|
||||
|
||||
else{
|
||||
internal::ch_akl_toussaint_assign_points_to_regions(first,cpp0x::get<0>(ranges),left_turn,e,w,n,s,region1,region2,region3,region4,ch_traits);
|
||||
internal::ch_akl_toussaint_assign_points_to_regions(cpp0x::next(cpp0x::get<0>(ranges)),cpp0x::get<1>(ranges),left_turn,e,w,n,s,region1,region2,region3,region4,ch_traits);
|
||||
internal::ch_akl_toussaint_assign_points_to_regions(cpp0x::next(cpp0x::get<1>(ranges)),cpp0x::get<2>(ranges),left_turn,e,w,n,s,region1,region2,region3,region4,ch_traits);
|
||||
internal::ch_akl_toussaint_assign_points_to_regions(cpp0x::next(cpp0x::get<2>(ranges)),cpp0x::get<3>(ranges),left_turn,e,w,n,s,region1,region2,region3,region4,ch_traits);
|
||||
internal::ch_akl_toussaint_assign_points_to_regions(cpp0x::next(cpp0x::get<3>(ranges)),last,left_turn,e,w,n,s,region1,region2,region3,region4,ch_traits);
|
||||
}
|
||||
|
||||
#if defined(CGAL_CH_NO_POSTCONDITIONS) || defined(CGAL_NO_POSTCONDITIONS) \
|
||||
|| defined(NDEBUG)
|
||||
OutputIterator res(result);
|
||||
|
|
|
|||
|
|
@ -21,6 +21,11 @@
|
|||
#ifndef CGAL_CONVEX_HULL_PROJECTIVE_XY_TRAITS_2_H
|
||||
#define CGAL_CONVEX_HULL_PROJECTIVE_XY_TRAITS_2_H
|
||||
|
||||
|
||||
#define CGAL_DEPRECATED_HEADER "<CGAL/Convex_hull_projective_xy_traits_2.h>"
|
||||
#define CGAL_REPLACEMENT_HEADER "<CGAL/Projection_traits_xy_3.h>"
|
||||
#include <CGAL/internal/deprecation_warning.h>
|
||||
|
||||
#include <CGAL/predicates/kernel_ftC2.h>
|
||||
|
||||
namespace CGAL {
|
||||
|
|
|
|||
|
|
@ -21,6 +21,10 @@
|
|||
#ifndef CGAL_CONVEX_HULL_PROJECTIVE_XZ_TRAITS_2_H
|
||||
#define CGAL_CONVEX_HULL_PROJECTIVE_XZ_TRAITS_2_H
|
||||
|
||||
#define CGAL_DEPRECATED_HEADER "<CGAL/Convex_hull_projective_xz_traits_2.h>"
|
||||
#define CGAL_REPLACEMENT_HEADER "<CGAL/Projection_traits_xz_3.h>"
|
||||
#include <CGAL/internal/deprecation_warning.h>
|
||||
|
||||
#include <CGAL/predicates/kernel_ftC2.h>
|
||||
#include <CGAL/predicates_on_points_2.h>
|
||||
#include <CGAL/function_objects.h>
|
||||
|
|
|
|||
|
|
@ -21,6 +21,10 @@
|
|||
#ifndef CGAL_CONVEX_HULL_PROJECTIVE_YZ_TRAITS_2_H
|
||||
#define CGAL_CONVEX_HULL_PROJECTIVE_YZ_TRAITS_2_H
|
||||
|
||||
#define CGAL_DEPRECATED_HEADER "<CGAL/Convex_hull_projective_yz_traits_2.h>"
|
||||
#define CGAL_REPLACEMENT_HEADER "<CGAL/Projection_traits_yz_3.h>"
|
||||
#include <CGAL/internal/deprecation_warning.h>
|
||||
|
||||
#include <CGAL/predicates/kernel_ftC2.h>
|
||||
|
||||
namespace CGAL {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,25 @@
|
|||
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
|
||||
#include <CGAL/convex_hull_2.h>
|
||||
#include <CGAL/Projection_traits_xy_3.h>
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
|
||||
typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel;
|
||||
typedef CGAL::Projection_traits_xy_3<Kernel> Traits;
|
||||
typedef Traits::Point_2 Point_2;
|
||||
|
||||
int main(){
|
||||
std::vector<Point_2> points;
|
||||
std::ifstream input("data/CD500");
|
||||
|
||||
double x,y;
|
||||
while (input >> x >> y){
|
||||
points.push_back(Point_2(x,y,3.));
|
||||
}
|
||||
|
||||
std::vector<Point_2> ch2;
|
||||
|
||||
CGAL::convex_hull_2(points.begin(),points.end(),std::back_inserter(ch2),Traits());
|
||||
|
||||
std::cout << ch2.size() << std::endl;
|
||||
}
|
||||
|
|
@ -10,10 +10,6 @@
|
|||
\lcTex{\usepackage{color}}
|
||||
\usepackage{nonlinkedpath}
|
||||
|
||||
% This will be the public edition of the developers manual.
|
||||
\newcommand{\InternalOnly}[1]{}
|
||||
\newcommand{\ExternalOnly}[1]{#1}
|
||||
|
||||
\makeindex
|
||||
|
||||
\begin{document}
|
||||
|
|
|
|||
|
|
@ -1,70 +0,0 @@
|
|||
% =============================================================================
|
||||
% The CGAL Developers' Manual
|
||||
% Chapter: Mailing Lists and Addresses
|
||||
% -----------------------------------------------------------------------------
|
||||
% file : addresses.tex
|
||||
% authors: Susan Hert <hert@mpi-sb.mpg.de>
|
||||
% -----------------------------------------------------------------------------
|
||||
% $Id$
|
||||
% $Date$
|
||||
% =============================================================================
|
||||
|
||||
\chapter{Mailing Lists and Addresses\label{chap:addresses}}
|
||||
\ccChapterRelease{Chapter Version: 1.0}
|
||||
\ccChapterAuthor{Susan Hert ({\tt hert@mpi-sb.mpg.de})}
|
||||
\ccIndexMainItemBegin{email addresses}
|
||||
\ccIndexMainItemBegin{mailing lists}
|
||||
|
||||
There are a number of mailing lists and email addresses that have been set
|
||||
up to communicate with various subsets of the \cgal\ community. The
|
||||
addresses that should be of interest to \cgal\ developers are as follows.
|
||||
The up-to-date addresses and archives can be found on the web site.
|
||||
|
||||
\begin{description}
|
||||
\item[{\tt cgal-develop}]
|
||||
\index{cgal_develop mailing list@{\tt cgal-develop} mailing list}
|
||||
This list is intended for discussing detailed matters
|
||||
about implementation and development issues. All developers should
|
||||
subscribe to this list.
|
||||
|
||||
\item[\ccAnchor{mailto:cgal-commits@lists.gforge.inria.fr}{{\tt cgal-commits@lists.gforge.inria.fr}}]
|
||||
\index{cgal-commits mailing list@{\tt cgal-commits} mailing list}
|
||||
This list is read-only. It collects all automatic mails sent by
|
||||
the SVN server, one per commit, with the log messages and the URLS
|
||||
pointing to the corresponding diffs.
|
||||
Developers can subscribe to this list from
|
||||
\ccAnchor{https://gforge.inria.fr/mail/?group_id=52}{\cgal\ mailing lists page}.
|
||||
An \ccAnchor{http://lists.gforge.inria.fr/cgi-bin/mailman/private/cgal-commits}{archive}
|
||||
of this mailing list is maintained%
|
||||
\begin{ccTexOnly}
|
||||
at \nonlinkedpath|http://lists.gforge.inria.fr/cgi-bin/mailman/private/cgal-commits|
|
||||
\end{ccTexOnly}. To enter this archive, use your email address and InriaGForge
|
||||
password.
|
||||
|
||||
\item[{\tt cgal-discuss}]
|
||||
\index{cgal-discuss mailing list@{\tt cgal-discuss} mailing list}
|
||||
Users of \cgal\ post questions and discuss issues
|
||||
related to \cgal\ on this list. All developers should subscribe to this
|
||||
list so they can answer questions relevant to their packages and monitor
|
||||
the input from the users provided here.
|
||||
|
||||
\item[{\tt cgal-announce}]
|
||||
\index{cgal-announce mailing list@{\tt cgal-announce} mailing list}
|
||||
Announcements of new releases, bug fixes, special courses, etc. are posted
|
||||
to this list. The list is moderated (meaning every message posted needs
|
||||
to be approved) to keep the traffic low.
|
||||
|
||||
\item[{\tt cgal-editorial-board}]
|
||||
\index{cgal-editorial-board mailing list@{\tt cgal-editorial-board} mailing list}
|
||||
This is the email address to which you should
|
||||
send proposed design specifications (Chapter~\ref{chap:specification})
|
||||
for approval by the editorial
|
||||
board (Section~\ref{sec:editorial_board}). Anyone can do that
|
||||
at any time about any \cgal\ design issues.
|
||||
\end{description}
|
||||
|
||||
The mailing lists at \texttt{lists.gforge.inria.fr} and
|
||||
\texttt{lists-sop.inria.fr} are currently maintained by
|
||||
Sylvain Pion, Mariette Yvinec, Monique Teillaud.
|
||||
\ccIndexMainItemEnd{email addresses}
|
||||
\ccIndexMainItemEnd{mailing lists}
|
||||
|
|
@ -15,11 +15,6 @@
|
|||
\input{Developers_manual/index_see}
|
||||
|
||||
\include{Developers_manual/intro}
|
||||
\InternalOnly{
|
||||
\include{Developers_manual/specification}
|
||||
%\include{Developers_manual/directory_structure}
|
||||
\include{Developers_manual/tools}
|
||||
}
|
||||
\include{Developers_manual/code_format}
|
||||
\include{Developers_manual/kernels}
|
||||
\include{Developers_manual/traits_classes}
|
||||
|
|
@ -31,16 +26,6 @@
|
|||
\include{Developers_manual/iterators_and_circulators}
|
||||
\include{Developers_manual/robustness}
|
||||
\include{Developers_manual/portability}
|
||||
%\InternalOnly{
|
||||
%\include{Developers_manual/testing}
|
||||
%}
|
||||
\include{Developers_manual/debugging}
|
||||
%\InternalOnly{
|
||||
%\include{Developers_manual/examples_and_demos}
|
||||
%}
|
||||
\include{Developers_manual/submission_process}
|
||||
\InternalOnly{
|
||||
\include{Developers_manual/releases}
|
||||
\include{Developers_manual/addresses}
|
||||
}
|
||||
\include{Developers_manual/information_sources}
|
||||
|
|
|
|||
|
|
@ -338,6 +338,32 @@ The first list of items are meant as rules, \ie,~you should follow them.
|
|||
...
|
||||
#endif // CGAL_THIS_IS_AN_EXAMPLE_H
|
||||
\end{verbatim}
|
||||
\item Support the
|
||||
\ccAnchor{http://www.boost.org/doc/libs/release/libs/utility/utility.htm#result_of}{result\_of}
|
||||
protocol whenever your functors have more than one return type
|
||||
otherwise provide a \ccStyle{result_type} member typedef.
|
||||
|
||||
An example for this is a C++03 style \ccStyle{identity}
|
||||
functor:
|
||||
|
||||
\begin{cprog}
|
||||
struct Identity {
|
||||
template<typename T>
|
||||
T& operator()(T& t) { return t; }
|
||||
template<typename T>
|
||||
const T& operator()(const T& t) { return t; }
|
||||
template<typename>
|
||||
struct result;
|
||||
template<typename F, typename T>
|
||||
struct result<F(T&)> {
|
||||
typedef T& type;
|
||||
};
|
||||
template<typename F, typename T>
|
||||
struct result<F(const T&)> {
|
||||
typedef const T& type;
|
||||
};
|
||||
};
|
||||
\end{cprog}
|
||||
\end{itemize}
|
||||
|
||||
The following items can be seen as recommendations
|
||||
|
|
|
|||
|
|
@ -1,436 +0,0 @@
|
|||
% =============================================================================
|
||||
% The CGAL Developers' Manual
|
||||
% Chapter: Directory Structure for Packages
|
||||
% -----------------------------------------------------------------------------
|
||||
% file : directory_structure.tex
|
||||
% authors: Geert-Jan Giezeman <geert@cs.uu.nl> & Susan Hert <hert@mpi-sb.mpg.de>
|
||||
% -----------------------------------------------------------------------------
|
||||
% $Id$
|
||||
% $Date$
|
||||
% =============================================================================
|
||||
|
||||
\chapter{Directory Structure for Packages\label{chap:directory_structure}}
|
||||
\ccIndexMainItemBegin{directory structure}
|
||||
\ccIndexSubitemBegin{submitting}{directory structure for}
|
||||
\ccChapterRelease{Chapter Version: 1.1}
|
||||
\ccChapterAuthor{Geert-Jan Giezeman ({\tt geert@cs.uu.nl})\\
|
||||
Susan Hert ({\tt hert@mpi-sb.mpg.de})\\
|
||||
Sylvain Pion}
|
||||
|
||||
In order for code, demos, documentation, {\em etc.} developed for \cgal\ to
|
||||
be included in an automated way into the internal (and public) releases of the
|
||||
library, the files must be organized in a specific directory structure, which
|
||||
we describe here. We describe the entire directory structure for a package.
|
||||
Not every package will have all the parts described here. Only the files
|
||||
{\tt maintainer} and {\tt description.txt}
|
||||
are obligatory.
|
||||
\index{maintainer file@{\tt maintainer} file}
|
||||
\ccIndexMainItem{\tt description.txt}
|
||||
Submissions should not contain files in other places than described here.
|
||||
It is possible to have some under SVN, but they need to be listed in the
|
||||
\ccc{dont_submit} file to avoid being submitted.
|
||||
Make sure your package does not have any file clashing with any other packages
|
||||
(for example two files named {\tt simple\_example.cpp} in the example directories of
|
||||
two different packages will clash in the target names of cmake).
|
||||
|
||||
|
||||
The directory structure of a package named Package should be as follows:
|
||||
|
||||
\begin{verbatim}
|
||||
+--- dont_submit
|
||||
|
|
||||
+--- include/CGAL/
|
||||
|
|
||||
+--- src/{CGAL|CGALQt|...}/
|
||||
|
|
||||
+--- test/<testdir>/
|
||||
|
|
||||
+--- doc_tex/
|
||||
|
|
||||
+--- examples/<exampledir>/
|
||||
|
|
||||
+--- demo/<demodir>/
|
||||
|
|
||||
+--- benchmark/<benchmarkdir>/
|
||||
|
|
||||
+--- auxiliary/
|
||||
|
|
||||
+--- scripts/
|
||||
|
|
||||
+--- developer_scripts/
|
||||
|
|
||||
+--- package_info/Package/
|
||||
|
|
||||
+- description.txt
|
||||
|
|
||||
+- long_description.txt
|
||||
|
|
||||
+- maintainer
|
||||
\end{verbatim}
|
||||
|
||||
|
||||
\begin{description}
|
||||
\item[{\tt include/CGAL}]\index{include/CGAL directory@{\tt include/CGAL} directory}
|
||||
\index{source\ files!{\tt .h} files}
|
||||
contains the {\tt .h} files for the package.
|
||||
\item[{\tt src}]\index{src directory@{\tt src} directory}
|
||||
\index{source\ files!{\tt .cpp} files}
|
||||
contains the {\tt .cpp} files (if any) for the package.
|
||||
They are gathered in subdirectories corresponding to each
|
||||
library (be it static or shared).
|
||||
\item[{\tt test}]\index{test directory@{\tt test} directory!for
|
||||
packages} contains the test suite code for the package. See
|
||||
Section~\ref{sec:test_subdirectory} for a detailed description.
|
||||
\item[{\tt doc\_tex}]\index{doc_tex directory@{\tt doc\_tex} directory}
|
||||
\ccIndexSubitem{source files}{documentation}
|
||||
contains the documentation for the user and reference manuals.
|
||||
These are the files used to produce the manuals for public releases and
|
||||
to run the internal release reference manual test suite.
|
||||
See Section~\ref{sec:doc_tex_subdirectory} for a detailed description
|
||||
of this subdirectory.
|
||||
See Chapter~\ref{chap:specification} for guidelines for producing
|
||||
the documentation.
|
||||
\item[{\tt examples}]\index{examples directory@{\tt examples} directory}
|
||||
contains the example programs for the package.
|
||||
See Section~\ref{sec:examples_subdirectory} for a detailed
|
||||
description of this subdirectory.
|
||||
\item[{\tt demo}]\index{demo directory@{\tt demo} directory}
|
||||
contains the demo programs for the package.
|
||||
Contrary to example programs, demo programs are not expected to be
|
||||
usable on all platforms. Demo programs may depend on platform-specific
|
||||
software and may require user interaction. They are compiled but not
|
||||
run in the test suite. See Section~\ref{sec:demo_subdirectory} for a
|
||||
more detailed description of this subdirectory.
|
||||
\item[{\tt benchmark}]\index{benchmark directory@{\tt benchmark} directory}
|
||||
contains the benchmark programs for the package.
|
||||
See Section~\ref{sec:benchmark_subdirectory} for a detailed
|
||||
description of this subdirectory.
|
||||
\item[{\tt auxiliary}]\index{auxiliary directory@{\tt auxiliary}
|
||||
directory} contains auxiliary software for CGAL. For
|
||||
instance, GMP goes here when using the Windows installer.
|
||||
The average package won't have this directory.
|
||||
\item[{\tt scripts}]\index{scripts directory@{\tt scripts}
|
||||
directory} contains scripts that are of interest to \cgal\ users.
|
||||
\item[{\tt developer\_scripts}]\index{developers\_scripts
|
||||
directory@{\tt developers\_scripts} directory} contains
|
||||
scripts that are of interest to \cgal\ developers. This directory
|
||||
is included in internal releases only, not in public releases.
|
||||
\item[{\tt dont\_submit}]%
|
||||
\ccIndexMainItem{\tt dont\_submit} specifies files and directories
|
||||
that are to be excluded from the release, for example:
|
||||
\begin{verse}
|
||||
TODO\\
|
||||
include/CGAL/my\_internal\_file.h\\
|
||||
benchmark
|
||||
\end{verse}
|
||||
\item[{\tt package\_info/Package/description.txt}]%
|
||||
\ccIndexMainItem{\tt description.txt}
|
||||
should give a very short description of the contents of the package.
|
||||
\item[{\tt long\_description.txt}]%
|
||||
\ccIndexMainItem[c]{\tt package\_info/Package/long\_description.txt}
|
||||
may be added with more detailed information about the package.
|
||||
\item[\ccAnchor{maintainer}{{\tt package\_info/Package/maintainer}}]%
|
||||
\index{maintainer file@{\tt maintainer} file}
|
||||
should be used to name the maintainers of the package. The file should
|
||||
have for each maintainer a line with the following format:
|
||||
\begin{verse}
|
||||
{\it name} $<${\it email address}$>$\\
|
||||
\end{verse}
|
||||
For example:
|
||||
\begin{verse}
|
||||
{\it Susan Hert} $<$hert@mpi-sb.mpg.de$>$\\
|
||||
{\it Sylvain Pion} $<$Sylvain.Pion@sophia.inria.fr$>$\\
|
||||
\end{verse}
|
||||
\end{description}
|
||||
|
||||
|
||||
A package has a name, which identifies it. This name should obey the same
|
||||
rules as for C identifiers: it consists of letters, digits and underscores and
|
||||
it does not start with a digit. Choose a name that is descriptive, yet not
|
||||
too long (under 25 characters). If a package deals with objects of a
|
||||
particular dimension, then use the suffixes \_2, \_3, and \_d, especially if
|
||||
there exists (or may exist in the future) a package with similar
|
||||
functionality in different dimensions. Examples of good package names are
|
||||
\texttt{Triangulation\_2} for a package dealing with triangulations of points
|
||||
in the plane and \texttt{Min\_ellipse\_2}, which contains an algorithm that
|
||||
finds the minimal enclosing ellipse of a set of points in the plane. The
|
||||
package names \texttt{pm} and \texttt{arr} are a bit too terse.
|
||||
\texttt{Planar\_map} and \texttt{Arrangement} (or
|
||||
\texttt{Arrangement\_2}) are better.
|
||||
|
||||
\section{{\tt test} subdirectory}
|
||||
\label{sec:test_subdirectory}
|
||||
\index{test directory@{\tt test} directory|(}
|
||||
\ccIndexMainItemBegin{test suite}
|
||||
|
||||
This directory contains the test suite for the package. Here we just
|
||||
briefly list the files contained in such a directory. For more
|
||||
detailed information about testsuites for \cgal\ packages refer to
|
||||
Chapter~\ref{chap:testing}.
|
||||
|
||||
\begin{verbatim}
|
||||
test/<testdir>
|
||||
+--- data/
|
||||
|
|
||||
+--- include/
|
||||
|
|
||||
|- CMakeLists.txt
|
||||
|
|
||||
|- cgal_test
|
||||
|
|
||||
|- *.cpp
|
||||
|
|
||||
|- *.cin
|
||||
\end{verbatim}
|
||||
where the directory \verb|<testdir>| has a name that corresponds to the package
|
||||
name.
|
||||
|
||||
\begin{description}
|
||||
\item[{\tt data/}] is a subdirectory that contains local data files for the
|
||||
test suite\index{data directory@{\tt data} directory}.
|
||||
\item[{\tt include/}] is a subdirectory that contains local include files for
|
||||
the test suite.
|
||||
\item[{\tt cgal\_test}]\index{cgal_test script@{\tt cgal\_test}
|
||||
script|(} is the script that will be called when the entire
|
||||
test suite is run. As this file is created automatically
|
||||
during the release process, submitting it is error-prone and
|
||||
thus {\bf strongly discouraged}.
|
||||
|
||||
For testing purposes, such a script can be created using the
|
||||
{\tt create\_cgal\_test}%
|
||||
\index{create_cgal_test script@{\tt create\_cgal\_test} script}
|
||||
script (Section~\ref{sec:create_cgal_test}).
|
||||
\index{cgal_test script@{\tt cgal\_test} script|)}
|
||||
|
||||
\item[{\tt CMakeLists.txt}]\ccIndexSubitem{\tt CMakeLists.txt}{test suite}
|
||||
is the CMake configuration file for the test programs. It is created
|
||||
automatically, just like {\tt cgal\_test}. Submitting it is
|
||||
{\bf strongly discouraged}, and the only reason for submitting one is
|
||||
when the automatic generation script cannot produce a working CMake
|
||||
configuration file.
|
||||
|
||||
Such a {\tt CMakeLists.txt} can be created using the script
|
||||
{\tt cgal\_create\_cmake\_script}%
|
||||
\index{cgal_create_cmake_script script@{\tt cgal\_create\_cmake\_script} script}
|
||||
with the argument {\tt -t}
|
||||
(Section~\ref{sec:cgal_create_cmake_script}).
|
||||
\item[{\tt *.cpp}] source code for the test programs.
|
||||
\ccIndexSubitem{source files}{test suite}
|
||||
|
||||
When a test program runs correctly, it should return
|
||||
\ccIndexSubsubitem{test suite}{program}{return value} the
|
||||
value zero, or, more precisely, the value \verb|EXIT_SUCCESS|
|
||||
defined in \verb|<cstdlib>|.
|
||||
Test programs may not be graphical and they may not require any user
|
||||
interaction.\ccIndexSubitem{test suite}{program}
|
||||
\item[{\tt *.cin}] files containing command-line input for
|
||||
\index{test\ suite!input!from {\tt cin}}
|
||||
test programs. These files are necessary for only those programs
|
||||
that require command-line input (which can usually be avoided).
|
||||
If a file \texttt{program.cin} is
|
||||
present in the test directory, then, when the test suite is run,
|
||||
\texttt{program} will be executed using the command
|
||||
\begin{verbatim}
|
||||
./program < program.cin
|
||||
\end{verbatim}
|
||||
\end{description}
|
||||
|
||||
\section{{\tt doc\_tex} subdirectory}
|
||||
\label{sec:doc_tex_subdirectory}
|
||||
\index{doc_tex directory@{\tt doc\_tex} directory|(}
|
||||
\ccIndexSubitemBegin{manuals}{source files}
|
||||
\ccIndexSubitemBegin{source files}{documentation}
|
||||
|
||||
As described in Chapter~\ref{chap:specification}, the \cgal\ documentation is
|
||||
organized in subdirectories for each package and the different manuals
|
||||
are assembled from these packages. Contained in these
|
||||
subdirectories are the files required for producing a package's contributions
|
||||
to the different reference and users' manuals. The users' manual input
|
||||
files are located in the package's directory; the reference manual files are
|
||||
be located in a directory named $<Package>${\tt \_ref}
|
||||
\index{ref directory@{\tt \_ref} directory}.
|
||||
For both the users' manual and reference manual parts, the input can be
|
||||
split into more than one file (In fact, this is necessary for the reference
|
||||
manual in order to support conversion to HTML;
|
||||
see Section~\ref{sec:ref_manual}.), but there must be a file called
|
||||
{\tt main.tex} in both the user and reference manual directories that inputs
|
||||
all the other files for that manual part.
|
||||
({\bf Note}: You should use the \verb|\input| command and NOT the
|
||||
\verb|\include| command to input other source files in this file, and
|
||||
they have to include their files using relative paths starting in the
|
||||
\texttt{doc\_tex} directory.)
|
||||
|
||||
For example, the optimisation package of
|
||||
the basic library can have the following documentation.
|
||||
\begin{verbatim}
|
||||
doc_tex/Optimisation
|
||||
|--- main.tex
|
||||
|
|
||||
|--- *.tex
|
||||
|
|
||||
+--- *.((pdf)|(gif)|(jpg)|(png))
|
||||
|
||||
doc_tex/Optimisation_ref/
|
||||
|--- main.tex
|
||||
|
|
||||
|--- intro.tex
|
||||
|
|
||||
|--- *.tex
|
||||
|
|
||||
+--- *.((pdf)|(gif)|(jpg)|(png))
|
||||
|
||||
\end{verbatim}
|
||||
|
||||
\begin{description}
|
||||
\item[{\tt main.tex}]%
|
||||
\ccIndexMainItem{\tt main.tex}\ccIndexSubitem{users' manual}{\tt
|
||||
main.tex} must contain one chapter. It must NOT
|
||||
contain a preamble (so no {\tt documentclass}, {\tt usepackage},
|
||||
\verb|\begin{document}| or \verb|\end{document}| commands).
|
||||
If you want more than one chapter in the documentation of this
|
||||
package you have to put each chapter in its own \LaTeX\ file,
|
||||
and include those files in \texttt{main.tex} using the \verb|\input|
|
||||
macro.
|
||||
\item[{\tt intro.tex}]%
|
||||
\ccIndexMainItem{\tt intro.tex}%
|
||||
\ccIndexSubitem{reference manual}{\tt intro.tex}
|
||||
is not mandatory but common for reference manual chapter. It
|
||||
contains a brief introduction to the package (one paragraph) and
|
||||
lists the different concepts, classes, functions, etc. that are
|
||||
contained in this package in a systematic way.
|
||||
\item[{\tt *.tex}] -- the source files for the Users' and Reference
|
||||
Manual that are input by {\tt main.tex}
|
||||
\item[{\tt *.pdf}] -- the PDF pictures included in
|
||||
the PDF documentation.
|
||||
\item[{\tt *.((gif)|(jpg)|(png))}] -- the raster images included in
|
||||
the HTML documentation.
|
||||
\end{description}
|
||||
\ccIndexSubitemEnd{source files}{documentation}
|
||||
\ccIndexSubitemEnd{manuals}{source files}
|
||||
\index{doc_tex directory@{\tt doc\_tex} directory|)}
|
||||
|
||||
|
||||
\section{{\tt examples} subdirectory}
|
||||
\label{sec:examples_subdirectory}
|
||||
\index{examples directory@{\tt examples} directory|(}
|
||||
\ccIndexSubitemBegin{example programs}{submitting}
|
||||
|
||||
Example programs (Chapter~\ref{chap:examples_and_demos}) for a package should
|
||||
be placed in a subdirectory of the directory {\tt examples}.
|
||||
The subdirectory name, \verb|<exampledir>|, will usually correspond to the
|
||||
package name, but this is not a requirement.
|
||||
To make sure that the examples will be tested%
|
||||
\ccIndexSubitem{test suite}{examples in},
|
||||
a directory with examples
|
||||
should be submitted in exactly the same way as a test directory
|
||||
(Section~\ref{sec:test_subdirectory}).
|
||||
|
||||
The structure of an example directory should be as follows:
|
||||
\begin{verbatim}
|
||||
examples/<exampledir>
|
||||
+--- data/
|
||||
|
|
||||
+--- include/
|
||||
|
|
||||
|- README
|
||||
|
|
||||
|- cgal_test
|
||||
|
|
||||
|- CMakeLists.txt
|
||||
|
|
||||
|- *.cpp
|
||||
\end{verbatim}
|
||||
|
||||
\ccIndexSubitem{source files}{examples}
|
||||
The file {\tt README} should contain information about what the programs do
|
||||
and how to compile them.
|
||||
See the rules for a test directory for an explanation of the other files
|
||||
and subdirectories.
|
||||
\ccIndexSubitemEnd{example programs}{submitting}
|
||||
\index{examples directory@{\tt examples} directory|)}
|
||||
|
||||
|
||||
\section{{\tt demo} subdirectory}
|
||||
\label{sec:demo_subdirectory}
|
||||
\index{demo directory@{\tt demo} directory|(}
|
||||
\ccIndexMainItem{demo programs}
|
||||
\ccIndexSubitemBegin{demo programs}{submitting}
|
||||
|
||||
The {\tt demo} directory (Chapter~\ref{chap:examples_and_demos}) contains
|
||||
programs with graphical interfaces or programs requiring user input. These
|
||||
programs will be compiled but not run by the test suite.
|
||||
\ccIndexSubitem{test suite}{demos in}
|
||||
The structure of this directory should be as follows:
|
||||
\begin{verbatim}
|
||||
demo/<demodir>
|
||||
+--- data/
|
||||
|
|
||||
+--- include/
|
||||
|
|
||||
|- README
|
||||
|
|
||||
|- CMakeLists.txt
|
||||
|
|
||||
|- *.cpp
|
||||
\end{verbatim}
|
||||
where \verb|<demodir>| is a name that corresponds (at least in part) to
|
||||
the package for which it is a demo.
|
||||
\ccIndexSubitem{source files}{demos}
|
||||
|
||||
The file {\tt README} should contain information about what the program does,
|
||||
and how to compile it ({\it i.e.}, what graphical libraries are needed,
|
||||
{\it etc.}). Note that, in contrast to example and test programs,
|
||||
demo programs more often need to submit a {\tt CMakeLists.txt}
|
||||
\ccIndexSubitem{\tt CMakeLists.txt}{demo programs} since
|
||||
different demos will require different libraries and thus the {\tt CMakeLists.txt}
|
||||
for these programs will be somewhat dissimilar.
|
||||
\ccIndexMainItem{demo programs}
|
||||
\ccIndexSubitemEnd{demo programs}{submitting}
|
||||
\index{demo directory@{\tt demo} directory|)}
|
||||
|
||||
|
||||
\section{{\tt benchmark} subdirectory}
|
||||
\label{sec:benchmark_subdirectory}
|
||||
\index{benchmark directory@{\tt benchmark} directory|(}
|
||||
\ccIndexSubitemBegin{benchmark programs}{submitting}
|
||||
|
||||
Benchmark programs for a package should be placed in a subdirectory of the directory {\tt benchmark}.
|
||||
The subdirectory name, \verb|<benchmarkdir>|, will usually correspond to the
|
||||
package name, but this is not a requirement.
|
||||
|
||||
Benchmark programs are currently not subject to any automatic treatment in the
|
||||
test-suite, although they could evolve into an automatic benchmark-suite at
|
||||
some point. We suggest at directory organization similar to the one of
|
||||
\verb|<exampledir>|.
|
||||
|
||||
Some data sets can be placed under the {\tt data} subdirectory of \verb|<benchmarkdir>|,
|
||||
but we recommend that only a small number of small files go there. Extensive
|
||||
benchmarks data sets should probably be gathered elsewhere, so as not to bloat
|
||||
the SVN server.
|
||||
|
||||
\index{benchmark directory@{\tt benchmark} directory|)}
|
||||
|
||||
|
||||
\ccIndexSubitemEnd{submitting}{directory structure for}
|
||||
\ccIndexMainItemEnd{directory structure}
|
||||
|
||||
\InternalOnly{
|
||||
|
||||
\section{Requirements and recommendations\label{sec:directories_req_and_rec}}
|
||||
|
||||
\noindent
|
||||
Requirements:
|
||||
\begin{itemize}
|
||||
\item The directory structure outlined here must be followed exactly.
|
||||
\end{itemize}
|
||||
|
||||
\noindent
|
||||
Recommendations:
|
||||
\begin{itemize}
|
||||
\item Do not submit {\tt CMakeLists.txt}s for example programs and test suite
|
||||
programs.
|
||||
\item Do not submit the script {\tt cgal\_test} used to compile and test
|
||||
your test suite programs.
|
||||
\end{itemize}
|
||||
|
||||
}
|
||||
|
|
@ -1,196 +0,0 @@
|
|||
\chapter{Example and Demo Programs\label{chap:examples_and_demos}}
|
||||
\ccIndexMainItemBegin{example programs}
|
||||
\ccIndexMainItemBegin{demo programs}
|
||||
|
||||
{\HUGE This page is no longer maintained. The content has been moved to
|
||||
|
||||
https://cgal.geometryfactory.com/CGAL/Members/wiki/Examples_and_Demo_Programs}
|
||||
|
||||
The best way to illustrate the functionality provided by the library
|
||||
is through programs that users can compile, run, copy and modify to
|
||||
their hearts' content. Thus every package should contain some of
|
||||
these programs. In \cgal\ we distinguish between two types of
|
||||
programs: those that provided graphical output (demos) and those that
|
||||
do not (examples).
|
||||
|
||||
In this chapter we provide guidelines for the development
|
||||
of these programs and their inclusion in the documentation. See
|
||||
Sections~\ref{sec:examples_subdirectory} and~\ref{sec:demo_subdirectory}
|
||||
for a description of the directory structure required for example and
|
||||
demo programs, respectively. Note in particular that each directory
|
||||
should contain a \texttt{README} file that explains what the programs do and
|
||||
how one interacts with them.
|
||||
|
||||
\section{Coding conventions\label{sec:ex_and_demo_coding}}
|
||||
\ccIndexSubitem{example programs}{coding conventions}
|
||||
\ccIndexSubitem{demo programs}{coding conventions}
|
||||
|
||||
Remember that these programs are likely to be a user's first introduction
|
||||
to the library, so you should be careful to follow our coding conventions
|
||||
(Chapter~\ref{chap:code_format}) and good programming practice in these
|
||||
programs. In particular:
|
||||
|
||||
\begin{itemize}
|
||||
\item Do \textbf{not} use the statements
|
||||
\begin{verbatim}
|
||||
using namespace CGAL;
|
||||
using namespace std;
|
||||
\end{verbatim}
|
||||
\ccIndexSubitem{\tt using}{in examples and demos}
|
||||
We discourage the use of these as they introduce more names than
|
||||
are necessary and may lead to more conflicts than are necessary.
|
||||
\item As of release 2.3, you can include only the kernel include file
|
||||
(\eg, \texttt{Cartesian.h} or \texttt{Homogeneous.h}) to get all
|
||||
kernel classes as well as the \texttt{basic.h} file. All example
|
||||
and demo programs should do this. For example, you should have
|
||||
simply:
|
||||
\begin{verbatim}
|
||||
#include <CGAL/Cartesian.h>
|
||||
\end{verbatim}
|
||||
instead of:
|
||||
\begin{verbatim}
|
||||
#include <basic.h>
|
||||
#include <CGAL/Cartesian.h>
|
||||
#include <CGAL/Point_2.h>
|
||||
#include <CGAL/Triangle_2.h>
|
||||
#include <CGAL/Segment_3.h>
|
||||
// etc.
|
||||
\end{verbatim}
|
||||
\item Types should be declared using the following syntax:
|
||||
\begin{verbatim}
|
||||
typedef CGAL::Cartesian<double> Kernel;
|
||||
typedef Kernel::Point_2 Point_2;
|
||||
typedef Kernel::Triangle_3 Triangle_3;
|
||||
\end{verbatim}
|
||||
instead of this syntax:
|
||||
\begin{verbatim}
|
||||
typedef CGAL::Cartesian<double> Kernel;
|
||||
typedef Point_2<Kernel> Point_2;
|
||||
typedef Triangle_3<Kernel> Triangle_3;
|
||||
\end{verbatim}
|
||||
Although both will work, the former is to be preferred since
|
||||
it reflects that the types are actually part of the kernel and
|
||||
also reflects the new (as of release 2.3) kernel design that allows
|
||||
types to be easily exchanged and adapted.
|
||||
|
||||
Note also that the typedef used above is
|
||||
\begin{verbatim}
|
||||
typedef CGAL::Cartesian<double> Kernel;
|
||||
\end{verbatim}
|
||||
instead of
|
||||
\begin{verbatim}
|
||||
typedef CGAL::Cartesian<double> R; // for representation
|
||||
\end{verbatim}
|
||||
This also reflects the new design, where the kernel classes are
|
||||
kernels containing objects and predicates not just representation
|
||||
classes for the objects.
|
||||
\end{itemize}
|
||||
|
||||
\section{The Programs\label{sec:ex_and_demo_content}}
|
||||
\ccIndexSubitem{example programs}{content}
|
||||
\ccIndexSubitem{demo programs}{content}
|
||||
|
||||
The following guidelines should be followed to the greatest extent possible
|
||||
when writing the example and demo programs.
|
||||
\begin{itemize}
|
||||
\item Provide simple programs with which a beginner can get started.
|
||||
\item Provide more involved programs that illustrate the power of the
|
||||
software.
|
||||
\item Provide programs that truly exercise the data structure. Though you
|
||||
may have some canned programs that work on fixed data sets to
|
||||
illustrate specific things, you should also have one (or more)
|
||||
programs that work on
|
||||
\ccAnchor{http://www.cgal.org/Manual/doc_html/support_lib/Generator/Chapter_generators.html}{randomly generated} or user-generated data.
|
||||
This illustrates confidence in the software (and can also build
|
||||
confidence by highlighting bugs).
|
||||
\item Take some care to design a good interface to the program;
|
||||
the packaging of a product does make a difference.
|
||||
\end{itemize}
|
||||
|
||||
\section{Including programs in documentation\label{sec:programs_in_doc}}
|
||||
\ccIndexSubitem{example programs}{in manuals}
|
||||
|
||||
All programs included in the documentation should be included in either
|
||||
the \texttt{examples} or the \texttt{demo} directory to ensure that:
|
||||
\begin{itemize}
|
||||
\item[(a)] the programs will be included in the test suite and
|
||||
\item[(b)] the user can more easily use the example program
|
||||
\end{itemize}
|
||||
The macro to do this inclusion is \verb|\ccIncludeExampleCode|.
|
||||
See Chapter~\ref{chap:specification} and the documentation of the
|
||||
\ccAnchor{http://www.cgal.org/Members/Manual_tools}{Manual tools} for more
|
||||
details.
|
||||
|
||||
The reverse statement, that all programs in the \texttt{examples}
|
||||
and \texttt{demo} directory should be included in the documentation,
|
||||
is not necessarily true. Ideally the programs included in the documentation
|
||||
will be a proper (non-empty) subset of the programs included in the
|
||||
distribution.
|
||||
|
||||
Please make sure that your example programs do not have too lengthy lines
|
||||
as they are copied verbatim in the manual, which can trigger overflows
|
||||
in the PDF manual.
|
||||
|
||||
\section{Demo programs on the web\label{sec:demos_web_page}}
|
||||
\ccIndexSubitem{demo programs}{on the web}
|
||||
|
||||
Demo programs for some packages are accessible from the
|
||||
\ccAnchor{http://www.cgal.org/Manual/latest/doc_html/cgal_manual/packages.html}{package overview}
|
||||
web page \lcTex{ (\path|http://www.cgal.org/Manual/latest/doc\_html/cgal\_manual/packages.html|)}.
|
||||
For each demo on the page, we have a precompiled executable for the
|
||||
Windows platform.
|
||||
|
||||
If you have other demos you would like to add to the page (and the more
|
||||
here the better), you should do the following:
|
||||
\begin{enumerate}
|
||||
\item Compile the demo and create a screen shot (as a \texttt{.gif} or
|
||||
\texttt{.jpg} file) and then create a smaller version of this
|
||||
(approx $235 \times 280$) that can be used as a ``thumbnail''
|
||||
(admittedly for a rather large thumb) on the page. These names of
|
||||
the image files should be as follows:
|
||||
\centerline{\ccc{<program>_}\texttt{[big|small].[gif|jpg]}},
|
||||
where \textit{$<$prog\_name$>$} is the name of the program from which
|
||||
the screen shots were made (an nice mnemonic name like
|
||||
\ccc{alpha_shapes_2} or \ccc{hull_of_int_points_2}).
|
||||
|
||||
\item Create the \texttt{.exe} file for use under Windows (probably with the
|
||||
compiler optimization flags turned on)
|
||||
\item \texttt{gzip} the \texttt{.exe} file
|
||||
\item Package these together with the source code using the following structure:
|
||||
\begin{verbatim}
|
||||
images/demo/<program>_big.[gif|jpg]
|
||||
demo/<program>.exe
|
||||
demo/<subdir>/<program>.cpp
|
||||
\end{verbatim}
|
||||
where \ccc{<subdir>} is the name of the subdirectory in which the program
|
||||
is (or will be) found in the distribution. \ccc{<program>} should be a
|
||||
name that is self-explanatory (\eg, \texttt{demo.cpp} is a bad name here).
|
||||
|
||||
\item Send the package to \ccAnchor{mailto:ameyer@mpi-sb.mpg.de}{the web page
|
||||
maintainer} together with a one-paragraph description similar to the
|
||||
ones on the page already.
|
||||
\end{enumerate}
|
||||
|
||||
\InternalOnly{
|
||||
|
||||
\section{Requirements and recommendations\label{sec:ex_and_demos_req_and_rec}}
|
||||
|
||||
\noindent
|
||||
Requirements:
|
||||
\begin{itemize}
|
||||
\item Follow the coding conventions outlined in
|
||||
Section~\ref{sec:ex_and_demo_coding}.
|
||||
\item Include all example and demo programs from the documentation in
|
||||
the \texttt{examples} or \texttt{demo} directories.
|
||||
\end{itemize}
|
||||
|
||||
\noindent
|
||||
Recommendations:
|
||||
\begin{itemize}
|
||||
\item Place a demo of your package on the web site.
|
||||
\end{itemize}
|
||||
|
||||
}
|
||||
|
||||
\ccIndexMainItemEnd{example programs}
|
||||
\ccIndexMainItemEnd{demo programs}
|
||||
|
|
@ -52,10 +52,6 @@ Work on \cgal\ has been supported in the past by {\sc esprit iv}
|
|||
projects 21957 (CGAL) and 28155 (GALIA).
|
||||
|
||||
|
||||
\InternalOnly{
|
||||
\input{Developers_manual/manual_organization}
|
||||
}
|
||||
|
||||
\input{Developers_manual/philosophy}
|
||||
|
||||
\input{Developers_manual/overall_design}
|
||||
|
|
|
|||
|
|
@ -1,39 +0,0 @@
|
|||
\section{Manual organization\label{sec:manual_org}}
|
||||
|
||||
This manual is meant to be a resource for developers who wish to contribute
|
||||
to the \cgal\ library either by designing new packages or maintaining
|
||||
or enhancing existing ones. The manual is organized roughly in the order in
|
||||
which a developer will need the information in order to produce a package
|
||||
for the library. We begin in this chapter with a description
|
||||
of the design goals of \cgal\ and the overall design, which should be kept
|
||||
in mind during all stages of development. The remaining chapters describe
|
||||
in more concrete terms the requirements and recommendations for documentation,
|
||||
code writing, and testing that are derived from these goals. We also describe
|
||||
a number of tools that have been created to help in the development process
|
||||
and give pointers to other sources of information.
|
||||
|
||||
A description of how the specification
|
||||
for a package should be documented is provided along with information about
|
||||
the tools available to help produce the documentation
|
||||
in Chapter~\ref{chap:specification}.
|
||||
Chapter~\ref{chap:svn} discusses the SVN server on which all \cgal\ source
|
||||
code is kept.
|
||||
Chapter~\ref{chap:directory_structure} describes the directory structure
|
||||
required for a package and Chapter~\ref{chap:tools} describes a set of tools
|
||||
that may be used to create or modify various files required within this
|
||||
directory structure. Chapters~\ref{chap:code_format}
|
||||
through~\ref{chap:robustness}
|
||||
discuss issues related to the writing of code that is in keeping with
|
||||
the goals of \cgal. Chapter~\ref{chap:portability} describes issues
|
||||
related to the configuration of \cgal\ and
|
||||
discusses portability issues for various platforms.
|
||||
Chapter~\ref{chap:debugging} consists of various hints for debugging.
|
||||
Information
|
||||
about how to submit a package's specification to the editorial board
|
||||
for approval and the implementation (and documentation) for inclusion in
|
||||
internal releases is presented in Chapter~\ref{chap:submission}.
|
||||
Chapter~\ref{chap:releases} gives information about the creation of the
|
||||
internal, public, and bug-fix releases.
|
||||
Chapters~\ref{chap:addresses} and Chapter~\ref{chap:info}
|
||||
provide information about mailing lists and other information
|
||||
resources developers might find useful.
|
||||
|
|
@ -1,37 +0,0 @@
|
|||
\chapter{Making Releases\label{chap:releases}}
|
||||
|
||||
This chapter is going to be replaced by the technical feature of Eric et al.
|
||||
That is the branching stuff.
|
||||
|
||||
\section{Internal Releases\label{sec:internal_releases}}
|
||||
\ccIndexSubitem{releases}{internal}
|
||||
|
||||
Internal releases are currently created daily from a script run
|
||||
at GeometryFactory. This script packages together the current versions of all
|
||||
packages into a tar file and publish a tarball at
|
||||
\path'http://cgal.geometryfactory.com/CGAL/Members/Releases/'.
|
||||
People responsible for running the test suite can pick it up automatically
|
||||
using the {\tt autotest\_cgal} script (Section~\ref{sec:autotest_cgal}).
|
||||
|
||||
\section{Public Releases\label{sec:public_releases}}
|
||||
\ccIndexSubitem{releases}{public}
|
||||
|
||||
A public release can be created from an internal release by following the
|
||||
steps detailed in the
|
||||
\texttt{README} file in the package \texttt{Release} on the SVN server.
|
||||
\index{SVN server!Release package@\texttt{Release} package}
|
||||
This file describes how to create the code, the documentation and the
|
||||
updated web pages for a new release.
|
||||
|
||||
Each public release is tagged on the SVN server with a tag in the following
|
||||
format \texttt{CGAL\_N\_release}, where \texttt{N} is the release number
|
||||
with all `.'s replaced by `\_'s (\eg, for release 3.0, the tag is
|
||||
\texttt{CGAL\_3\_0\_release}. There is also a branch created for
|
||||
each release with the name \texttt{CGAL\_N\_branch}, where \texttt{N} is
|
||||
the release number as before. This facilitates the creation of bug fix
|
||||
releases.
|
||||
|
||||
%\section{Bug Fix Releases}
|
||||
%\label{sec:bug_fix_releases}
|
||||
%\ccIndexSubitem{releases}{bug fix}
|
||||
%\ccIndexMainItem{bug fixe}
|
||||
|
|
@ -39,8 +39,6 @@
|
|||
|
||||
\chapter{Specification Documentation\label{chap:specification}}
|
||||
|
||||
This chapter is going to be moved to the wiki by Luis and Laurent.
|
||||
|
||||
\ccChapterRelease{Chapter Version: 2.0}
|
||||
\ccChapterAuthor{Susan Hert ({\tt hert@mpi-sb.mpg.de})\\
|
||||
Lutz Kettner ({\tt kettner@mpi-sb.mpg.de}) }
|
||||
|
|
@ -57,7 +55,7 @@ is to make it so complicated that there are no obvious deficiencies.
|
|||
|
||||
\cgal\ is physically structured into
|
||||
packages\ccIndexMainItem{package}, which is reflected in the SVN
|
||||
repository structure, see Chapter~\ref{chap:svn}. Generally, each
|
||||
repository structure. Generally, each
|
||||
package in the library will contribute some chapters to the manuals,
|
||||
some might only contribute a section to some larger chapter.
|
||||
|
||||
|
|
@ -136,8 +134,7 @@ organization.
|
|||
|
||||
\ccIndexSubitem{directory structure}{for documentation}
|
||||
It is required that the documentation submitted with a package be organized
|
||||
according to a specific directory structure, which is described more
|
||||
completely in Section~\ref{sec:doc_tex_subdirectory}. In summary, all
|
||||
according to a specific directory structure. In summary, all
|
||||
{\tt .tex} source files and corresponding figures are kept in a
|
||||
\texttt{doc\_tex} subdirectory of the package. The following rules
|
||||
describe the details:
|
||||
|
|
@ -194,8 +191,7 @@ describe the details:
|
|||
contain a short introductory section, give an overview of the
|
||||
reference pages contained in this chapter, and mention
|
||||
optionally with a non-numbered section labeled \textbf{Assertions}
|
||||
the string used in the package-specific assertion macros
|
||||
(Section~\ref{sec:checks_controlling}).
|
||||
the string used in the package-specific assertion macros.
|
||||
\end{itemize}
|
||||
|
||||
This is all that is needed for a package manual and the
|
||||
|
|
@ -1498,8 +1494,7 @@ Requirements:
|
|||
\item There must be a {\tt main.tex} file for both the users' manual
|
||||
and reference manual parts of the documentation.
|
||||
\item Files must be organized according to the directory structure
|
||||
outlined in Section~\ref{sec:files_required} and further detailed
|
||||
in Section~~\ref{sec:doc_tex_subdirectory}.
|
||||
outlined in Section~\ref{sec:files_required}.
|
||||
\item Indexing commands must be placed in the text to achieve the
|
||||
goals listed in Section~\ref{sec:indexing}.
|
||||
\item Example programs included in the manual should also be distributed
|
||||
|
|
|
|||
|
|
@ -9,19 +9,7 @@
|
|||
% $Date$
|
||||
% =============================================================================
|
||||
|
||||
% \InternalOnly{
|
||||
% \chapter{Submitting Packages\label{chap:submission}}
|
||||
% \ccChapterRelease{Chapter Version: 1.0}
|
||||
% \ccChapterAuthor{Geert-Jan Giezeman\\ %({\tt geert@cs.uu.nl})\\
|
||||
% Susan Hert\\ %({\tt hert@mpi-sb.mpg.de})\\
|
||||
% Monique Teillaud ({\tt Monique.Teillaud@inria.fr})}
|
||||
|
||||
% \section{Editorial board\label{sec:editorial_board}}
|
||||
% }
|
||||
|
||||
%\ExternalOnly{
|
||||
\chapter{Editorial Board\label{chap:submission}\label{sec:editorial_board}}
|
||||
%}
|
||||
\ccIndexMainItemBegin{editorial board}
|
||||
|
||||
|
||||
|
|
@ -69,8 +57,7 @@ due to the recommendations of the board.
|
|||
% However, since it can take some time for the board to process
|
||||
% submissions, packages that are to become part of the library
|
||||
% can be submitted
|
||||
% \InternalOnly{as detailed in
|
||||
% Section~\ref{sec:electronic_submission}} before approval.
|
||||
% before approval.
|
||||
% Inclusion in an internal release does not ensure inclusion in a public
|
||||
% release.
|
||||
Only after approval by the board will packages be included in new
|
||||
|
|
@ -78,65 +65,3 @@ public releases and then only if they pass the test suite, of course.
|
|||
|
||||
The current list of members of the editorial board can be found on the
|
||||
\ccAnchor{http://www.cgal.org/people.html}{web site}.
|
||||
|
||||
% \InternalOnly{
|
||||
% \section{Electronic submission\label{sec:electronic_submission}}
|
||||
% \ccIndexMainItemBegin{submitting}
|
||||
|
||||
% Whether you produce library code, demos, documentation or something else,
|
||||
% if you want it to become part of \cgal, you'll have to submit it in
|
||||
% the form of a wiki page on the
|
||||
% \ccAnchor{https://cgal.geometryfactory.com/CGAL/Members/wiki/Features}{Feature page}
|
||||
% or on the
|
||||
% \ccAnchor{https://cgal.geometryfactory.com/CGAL/Members/wiki/Features/Small_Features}{Small Features page},
|
||||
% and announce it by email to the
|
||||
% \ccAnchor{mailto:cgal-editorial-board@lists-sop.inria.fr}{board}
|
||||
% \lcTex{(\texttt{cgal-editorial-board@lists-sop.inria.fr})}.
|
||||
|
||||
% The package itself has to be a folder under SVN experimental
|
||||
% packages.
|
||||
% The directory structure required for a package is described in
|
||||
% Chapter~\ref{chap:directory_structure}.
|
||||
|
||||
%Here we focus on how to submit a package.
|
||||
|
||||
% \ccIndexSubitem{naming scheme}{package}
|
||||
% A package has a name, which identifies it. This name should obey the same
|
||||
% rules as for C identifiers: it consists of letters, digits and underscores and
|
||||
% it does not start with a digit. Choose a name that is descriptive, yet not
|
||||
% too long (under 25 characters). If a package deals with objects of a
|
||||
% particular dimension, then use the suffixes \_2, \_3, and \_d, especially if
|
||||
% there exists (or may exist in the future) a package with similar
|
||||
% functionality in different dimensions. Examples of good package names are
|
||||
% \texttt{Triangulation\_2} for a package dealing with triangulations of points
|
||||
% in the plane and \texttt{Min\_ellipse\_2}, which contains an algorithm that
|
||||
% finds the minimal enclosing ellipse of a set of points in the plane. The
|
||||
% package names \texttt{pm} and \texttt{arr} are a bit too terse.
|
||||
% \texttt{Planar\_map} and \texttt{Arrangement} (or
|
||||
% \texttt{Arrangement\_2}) are better.
|
||||
|
||||
% Make sure your package does not have any file clashing with any other packages.
|
||||
% Please also make sure the information such as the maintainer email adress is
|
||||
% up to date under the \texttt{package\_info} directory.
|
||||
% \ccIndexSubitem{submitting}{file for}
|
||||
|
||||
% \ccIndexMainItemEnd{submitting}
|
||||
|
||||
|
||||
% Monique: I would just remove this section
|
||||
% \section{Requirements and recommendations\label{sec:submission_req_and_rec}}
|
||||
|
||||
% \noindent
|
||||
% Requirements:
|
||||
% \begin{itemize}
|
||||
% \item Submit specifications to the editorial board.
|
||||
% \item Obey the directory structure outlined in Chapter~\ref{chap:directory_structure}.
|
||||
% \end{itemize}
|
||||
|
||||
% \noindent
|
||||
% Recommendations:
|
||||
% \begin{itemize}
|
||||
% \item Wait for approval from the editorial board before submitting packages
|
||||
% for internal releases.
|
||||
% \end{itemize}
|
||||
%}
|
||||
|
|
|
|||
|
|
@ -1,403 +0,0 @@
|
|||
% =============================================================================
|
||||
% The CGAL Developers' Manual
|
||||
% Chapter: Testing
|
||||
% -----------------------------------------------------------------------------
|
||||
% file : testing.tex
|
||||
% authors: Mathair Baeskin <baeskin@infsn2.informatik.uni-halle.de>
|
||||
% -----------------------------------------------------------------------------
|
||||
% $Id$
|
||||
% $Date$
|
||||
% =============================================================================
|
||||
|
||||
\chapter{Testing\label{chap:testing}}
|
||||
\ccChapterRelease{Chapter Version: 1.2}
|
||||
\ccChapterAuthor{Matthias B\"asken}
|
||||
\ccChapterAuthor{Yves Brise ({\tt ybrise@inf.ethz.ch})}
|
||||
\ccIndexMainItemBegin{test suite}
|
||||
|
||||
%\section{Introduction}
|
||||
{\HUGE This page is no longer maintained. The content has been moved to
|
||||
|
||||
https://cgal.geometryfactory.com/CGAL/Members/wiki/Testing}
|
||||
|
||||
The \cgal\ test suite is a way to test the compilation and execution of \cgal\
|
||||
programs automatically (\ie, without user interaction) on a number of
|
||||
different platforms. Developers should, of course, thoroughly test their
|
||||
code on their own development platform(s) \textbf{before} submitting it.
|
||||
The test suite serves as a way to test on additional platforms not available
|
||||
to the developer.
|
||||
|
||||
\section{What a test suite for a package should contain\label{sec:whats_in_test_suite}}
|
||||
|
||||
The test suite helps the developer(s) of a package to
|
||||
\begin{itemize}
|
||||
\item detect compilation problems on the various platforms
|
||||
\item detect runtime problems
|
||||
\item check the correctness of the algorithms in the package
|
||||
\end{itemize}
|
||||
|
||||
That does not mean that the test suite is a platform for initial testing of
|
||||
code. New code should be tested on different platforms by the developer
|
||||
before submission.
|
||||
|
||||
It is strongly recommended for a test suite of a package to
|
||||
\begin {itemize}
|
||||
\item Cover the complete code of the package; every (member) function
|
||||
should be called at least once. (See Section~\ref{sec:gcov} for
|
||||
a description of a tool you can use to test for code coverage.)
|
||||
\item Use more than one instantiation of templated functions or classes.
|
||||
\item A lot of classes in \cgal\ can be parametrized by traits classes, so
|
||||
that they are usable with different kernels. In such cases more than one
|
||||
kernel should be used for testing.
|
||||
\item Use pre- and postcondition checkers wherever it is possible in the
|
||||
main code. In the test-suite code itself, the macro \ccc{assert}
|
||||
should be used in place of \ccc{CGAL_assertion} to check
|
||||
all conditions, since \ccc{assert} is not disabled by \ccc{CGAL_NDEBUG}.
|
||||
\end {itemize}
|
||||
|
||||
\section{Using the code coverage tool \texttt{gcov}}
|
||||
\label{sec:gcov}
|
||||
|
||||
The tool {\tt gcov} can be used together with the GNU C++ compiler to test
|
||||
for code coverage in your programs and may be helpful when you create your
|
||||
\cgal\ test suite programs. You can find a complete guide to this tool
|
||||
in the GNU on-line documentation at
|
||||
\path|http://gcc.gnu.org/onlinedocs/gcc-2.95.2/gcc_6.html|.
|
||||
If you want to use the code coverage tool {\tt gcov}, you have to compile
|
||||
your programs with the options \texttt{-fprofile-arcs} and
|
||||
\texttt{-ftest-coverage}. This generates a file called
|
||||
\texttt{your\_program.gcda}. Then you run the program, which generates a file
|
||||
\texttt{your\_program.gcno}. Finally, you can run \texttt{gcov your\_program.cpp}.
|
||||
This will generate a number of files with the ending \texttt{.gcov} which contain
|
||||
human readable information. View it in a text editor.
|
||||
Here is a simple example:\\
|
||||
\begin{verbatim}
|
||||
#include<iostream>
|
||||
|
||||
using namespace std;
|
||||
|
||||
void fu(int val)
|
||||
{
|
||||
int w,v=0;
|
||||
if (val==0) {
|
||||
cout << "val == 0!\n";
|
||||
for(w=0;w<100;w++) v=v+w;
|
||||
}
|
||||
else {
|
||||
cout << "val != 0!\n";
|
||||
for(w=0;w<10;w++) v=v+w;
|
||||
}
|
||||
|
||||
cout << "v:" << v << "\n";
|
||||
}
|
||||
|
||||
int main()
|
||||
{
|
||||
fu(0);
|
||||
return 0;
|
||||
}
|
||||
\end{verbatim}
|
||||
First you have to compile the example program \texttt{test.cpp} with the special
|
||||
options. Then you have to execute it, and, after this, \texttt{gcov} can be
|
||||
used.
|
||||
\begin{verbatim}
|
||||
g++ -fprofile-arcs -ftest-coverage -o test test.cpp
|
||||
test
|
||||
gcov test.cpp
|
||||
\end{verbatim}
|
||||
\texttt{gcov} will create a file \texttt{test.cpp.gcov} containing output
|
||||
from \texttt{gcov}:
|
||||
\begin{verbatim}
|
||||
#include<iostream>
|
||||
|
||||
using namespace std;
|
||||
|
||||
void fu(int val)
|
||||
1 {
|
||||
1 int w,v=0;
|
||||
1 if (val==0) {
|
||||
1 cout << "val == 0!\n";
|
||||
1 for(w=0;w<100;w++) v=v+w;
|
||||
}
|
||||
###### else {
|
||||
###### cout << "val != 0!\n";
|
||||
###### for(w=0;w<10;w++) v=v+w;
|
||||
}
|
||||
|
||||
1 cout << "v:" << v << "\n";
|
||||
}
|
||||
|
||||
int main()
|
||||
1 {
|
||||
1 fu(0);
|
||||
1 return 0;
|
||||
}
|
||||
\end{verbatim}
|
||||
The lines that were not executed will be marked with \verb|######|,
|
||||
so you will see what should be added in the (\cgal) test suite programs.
|
||||
|
||||
There are a few pitfalls when using CMake and \texttt{gcov} together.
|
||||
First note, that with CMake you can add compiler flags using the \texttt{CGAL\_CXX\_FLAGS} variable. See the
|
||||
\ccAnchor{http://www.cgal.org/Manual/latest/doc_html/installation_manual/Chapter_installation_manual.html#Subsection_8.2}{\cgal Installation Manual} to get more information on that. Typing \texttt{make your\_program} to compile your program is straightforward, as is running it. But then, the \texttt{.gcda}
|
||||
and \texttt{.gcno} are created within the directory \texttt{CMakeFiles/your\_program.dir/} relative to your project path. You first have to copy them to the same folder where \texttt{your\_program.cpp} resides.
|
||||
If you don't do that, running \texttt{gcov your\_program.cpp} will give an error
|
||||
message.
|
||||
|
||||
|
||||
\section{Test suite directory\label{sec:test_suite_directory}}
|
||||
|
||||
The test suite is located in the directory {\tt test} of the internal
|
||||
releases of \cgal. This directory is not part of external releases. The
|
||||
directory {\tt test}\index{test directory@{\tt test} directory!for test suite}
|
||||
contains:
|
||||
\begin{itemize}
|
||||
\item a script {\tt run\_testsuite}
|
||||
\index{run_testsuite script@{\tt run\_testsuite} script}
|
||||
that is (not surprisingly) used to run the test suite.
|
||||
\item a subdirectory for every package included in the internal release.
|
||||
These subdirectories are created from the {\tt test} directories
|
||||
of the packages by copying the source, include, and input files from
|
||||
these directories and adding makefiles and {\tt cgal\_test} scripts
|
||||
where needed. See Section~\ref{sec:test_subdirectory} for more
|
||||
information about the proper structure of the {\tt test} directory
|
||||
for a package.
|
||||
\index{test directory@{\tt test} directory!for packages}
|
||||
\item a subdirectory with a name that ends in {\tt \_Examples} for every
|
||||
package that was submitted with an {\tt examples} directory
|
||||
(Section~\ref{sec:examples_subdirectory})
|
||||
\index{examples directory@{\tt examples} directory}
|
||||
\ccIndexSubitem{test suite}{examples in}
|
||||
\ccIndexSubitem{example programs}{in test suite}
|
||||
\item a subdirectory with a name that ends in {\tt \_Demo} for every
|
||||
package that was submitted with a {\tt demo} directory
|
||||
(Section~\ref{sec:demo_subdirectory})
|
||||
\index{demo directory@{\tt demo} directory}
|
||||
\ccIndexSubitem{test suite}{demos in}
|
||||
\ccIndexSubitem{demo programs}{in test suite}
|
||||
\end{itemize}
|
||||
|
||||
The test suite will attempt to compile all the programs in the
|
||||
subdirectories of {\tt test} and to run all except
|
||||
the demo programs (which usually require user interaction) by using the
|
||||
{\tt cgal\_test} scripts
|
||||
(Sections~\ref{sec:test_subdirectory} and~\ref{sec:create_cgal_test})
|
||||
\index{cgal_test script@{\tt cgal\_test} script}
|
||||
and will save the results in files in the package subdirectories
|
||||
(Section~\ref{sec:test_suite_output}).
|
||||
Even if a program fails to compile or run, the test suite will continue.
|
||||
|
||||
|
||||
\section{Test suite input\label{sec:test_suite_input}}
|
||||
\ccIndexSubitemBegin{test suite}{input}
|
||||
|
||||
Input to programs in the test suite can be supplied in three different
|
||||
ways:
|
||||
\begin{description}
|
||||
\item[data files in the {\tt data} directory]
|
||||
\index{data directory@{\tt data} directory}
|
||||
\ccIndexSubsubitem{test suite}{input}{from files}
|
||||
As described in Section~\ref{sec:test_subdirectory}, a package's
|
||||
{\tt test} directory may contain a subdirectory {\tt data} that
|
||||
contains input files for the test programs.
|
||||
\item[{\tt *.cin} files]
|
||||
\index{test\ suite!input!from {\tt cin}}
|
||||
If a test program \texttt{program.cpp} requires input from standard
|
||||
input (\ie, {\tt cin}), you should put a file called
|
||||
\texttt{program.cin} in the test directory.
|
||||
The test suite will then execute the program using the command
|
||||
\begin{verbatim}
|
||||
./program < program.cin
|
||||
\end{verbatim}
|
||||
\item[command-line arguments supplied in the {\tt cgal\_test} script]
|
||||
\ccIndexSubsubitem{test suite}{input}{from command-line}
|
||||
{\em You are discouraged from using this option to give input values
|
||||
to your programs} since it requires you to edit and submit a
|
||||
{\tt cgal\_test} script; see Section~\ref{sec:create_cgal_test}.
|
||||
|
||||
\index{cgal_test script@{\tt cgal\_test} script}
|
||||
However, if a test program \texttt{program.cpp} absolutely requires
|
||||
command-line parameters, you should do the following. Use
|
||||
\texttt{create\_cgal\_test} to create the script \texttt{cgal\_test}.
|
||||
This file contains an entry of the form
|
||||
\begin{verbatim}
|
||||
compile_and_run program
|
||||
\end{verbatim}
|
||||
Just put the command-line
|
||||
parameters for \texttt{program} at the end of this line:
|
||||
\begin{verbatim}
|
||||
compile_and_run program arg1 arg2 ..
|
||||
\end{verbatim}
|
||||
The test suite will then execute the program using the command
|
||||
|
||||
\begin{verbatim}
|
||||
./program <arg1> <arg2> ...
|
||||
\end{verbatim}
|
||||
\end{description}
|
||||
\ccIndexSubitemEnd{test suite}{input}
|
||||
|
||||
|
||||
\section{Running the test suite\label{sec:running_test_suite}}
|
||||
\index{run_testsuite script@{\tt run\_testsuite} script|(}
|
||||
|
||||
The test suite is run using the {\tt run\_testsuite} script that is distributed
|
||||
with every internal release in the {\tt test} directory. There are several
|
||||
ways you can customize this script to meet you needs:
|
||||
|
||||
\begin{itemize}
|
||||
\item Add additional compiler and linker flags by setting the variables
|
||||
{\tt TESTSUITE\_CXXFLAGS}%
|
||||
\index{TESTSUITE_CXXFLAGS variable@{\tt TESTSUITE\_CXXFLAGS} variable}
|
||||
and {\tt TESTSUITE\_LDFLAGS}
|
||||
\index{TESTSUITE_LDFLAGS variable@{\tt TESTSUITE\_LDFLAGS} variable}
|
||||
\ccIndexSubitem{header files}{overriding}
|
||||
at the top of the
|
||||
script. These variables are prepended to {\tt CXX\_FLAGS} and
|
||||
{\tt LDFLAGS}, respectively, in the test suite makefiles. So, for
|
||||
example, if you have a directory \verb|experimental/include/CGAL|
|
||||
containing new or experimental \cgal\ files, you can do the following:
|
||||
\begin{center}
|
||||
\verb|TESTSUITE_CXXFLAGS="-Iexperimental/include"|
|
||||
\end{center}
|
||||
and in this way test with your new files without overwriting
|
||||
the originals.
|
||||
|
||||
\item Export additional environment variables by adding lines to the
|
||||
\ccIndexSubitem{environment variables}{test suite}
|
||||
\ccIndexSubitem{test suite}{environment variables}
|
||||
{\tt run\_testsuite} script. As an example, it will be demonstrated
|
||||
how to export the {\tt LD\_LIBRARY\_PATH} by editing \texttt{run\_testsuite}.%
|
||||
\index{LD_LIBRARY_PATH variable@{\tt LD\_LIBRARY\_PATH} variable}
|
||||
\begin{enumerate}
|
||||
\item Add the line
|
||||
\begin{center}
|
||||
\verb|LD_LIBRARY_PATH=<your library path>|
|
||||
\end{center}
|
||||
to the script.
|
||||
\item Append {\tt LD\_LIBRARY\_PATH} to the line
|
||||
\begin{center}
|
||||
\verb|export PLATFORM CGAL_MAKEFILE TESTSUITE_CXXFLAGS TESTSUITE_LDFLAGS|
|
||||
\end{center}
|
||||
in the script.
|
||||
\end{enumerate}
|
||||
|
||||
After this, the programs from the test suite will be run using the
|
||||
{\tt LD\_LIBRARY\_PATH} that was specified in step 1.
|
||||
|
||||
\item Run the test suite on more than one platform by adding a line at the
|
||||
bottom of the script of the form
|
||||
\begin{verbatim}
|
||||
run_testsuite <include makefile>
|
||||
\end{verbatim}
|
||||
for every platform that you wish to test. Just substitute for
|
||||
\verb|<include makefile>| the appropriate include makefiles that
|
||||
were generated during installation. (Don't forgot to use the
|
||||
full path name for the makefile!) By default, the last line in the
|
||||
file is
|
||||
\begin{verbatim}
|
||||
run_testsuite $CGAL_MAKEFILE
|
||||
\end{verbatim}
|
||||
so you need not make any changes if you run the testsuite on only one
|
||||
platform and have set the {\tt CGAL\_MAKEFILE} environment variable
|
||||
properly.%
|
||||
\index{CGAL_MAKEFILE variable@{\tt CGAL\_MAKEFILE} variable!and test suite}
|
||||
\end{itemize}
|
||||
|
||||
After these steps you are ready to run the test suite. It can be run in two
|
||||
different ways:
|
||||
\begin{verbatim}
|
||||
./run_testsuite
|
||||
\end{verbatim}
|
||||
|
||||
The test suite will run the tests from all test directories. This may take a
|
||||
considerable amount of time.
|
||||
|
||||
\begin{verbatim}
|
||||
./run_testsuite <dir1> <dir2> ...
|
||||
\end{verbatim}
|
||||
|
||||
The test suite will run only the test programs in the test directories
|
||||
\begin{verbatim}<dir1> <dir2> ... \end{verbatim}
|
||||
\index{run_testsuite script@{\tt run\_testsuite} script|)}
|
||||
|
||||
To run an entire \cgal\ test suite automatically, including downloading of
|
||||
an internal release, configuration, and installation of the library, you
|
||||
can use the {\tt autotest\_cgal} script described in
|
||||
Section~\ref{sec:autotest_cgal}.
|
||||
|
||||
|
||||
\section{Files generated by the test suite\label{sec:test_suite_output}}
|
||||
\ccIndexSubitemBegin{test suite}{output files}
|
||||
|
||||
The testsuite will generate the following output files:
|
||||
|
||||
\begin{itemize}
|
||||
\item \verb|<testdir>/ErrorOutput_<platform>|
|
||||
\index{ErrorOutput files@{\tt ErrorOutput} files}
|
||||
|
||||
This file contains two lines for every program that was tested on
|
||||
platform \texttt{<platform>} in the test directory \texttt{<testdir>}.
|
||||
The first line
|
||||
tells if the compilation was successful and the second line tells if
|
||||
the execution was successful (\ie, the program returned the value 0).
|
||||
(See Section~\ref{sec:test_subdirectory} for more details.)
|
||||
|
||||
\item \verb|<testdir>/ProgramOutput.<program>.<platform>|
|
||||
\index{ProgramOutput files@{\tt ProgramOutput} files}
|
||||
|
||||
This file contains the console output from the test program
|
||||
\texttt{<program.cpp>} run on platform \texttt{<platform>}.
|
||||
|
||||
\item \verb|<testdir>/CompilerOutput_<platform>|
|
||||
\index{CompilerOutput files@{\tt CompilerOutput} files}
|
||||
|
||||
This file contains the compiler output from platform
|
||||
\texttt{<platform>} for all programs.
|
||||
|
||||
\item \verb|error.txt|
|
||||
\index{error.txt@{\tt error.txt}}
|
||||
|
||||
This is just a concatenation of all the \texttt{ErrorOutput} files that were
|
||||
generated during the last run of the test suite.
|
||||
\end{itemize}
|
||||
\ccIndexSubitemEnd{test suite}{output files}
|
||||
|
||||
|
||||
\section{Test suite results\label{sec:test_suite_results}}
|
||||
\ccIndexSubitemBegin{test suite}{results}
|
||||
The results of test suites run on the various supported or soon-to-be-supported
|
||||
platforms are posted on the
|
||||
\ccAnchor{http://cgal.geometryfactory.com/CGAL/Members/testsuite/}%
|
||||
{test suite results}
|
||||
page
|
||||
\lcTex{(\path|http://cgal.geometryfactory.com/CGAL/Members/testsuite/|)}.
|
||||
\ccIndexSubitemEnd{test suite}{results}
|
||||
|
||||
\section{Requirements and recommendations\label{sec:testing_req_and_rec}}
|
||||
|
||||
\noindent
|
||||
Requirements:
|
||||
\begin{itemize}
|
||||
\item Test your code thoroughly \textbf{before} submitting it.
|
||||
\item Obey the directory structure detailed in Section~\ref{sec:test_subdirectory}
|
||||
\item Check the test suite results for your package regularly.
|
||||
\end{itemize}
|
||||
|
||||
\noindent
|
||||
Recommendations:
|
||||
\begin{itemize}
|
||||
\item Write test suite programs that use more than one instantiation of
|
||||
templated functions and classes, call every member function at least
|
||||
once, and use more than one kernel.
|
||||
\item Use pre- and postcondition checkers.
|
||||
\item Use \texttt{gcov} to test your code for coverage.
|
||||
\item Don't submit a makefile for your test suite unless you need to do
|
||||
something very special to compile or link your program. If you find
|
||||
you want to do something very special in your makefile, think long
|
||||
and hard about whether it's really necessary or not.
|
||||
\item Don't submit the script \texttt{cgal\_test} with your package.
|
||||
\end{itemize}
|
||||
|
||||
|
||||
\ccIndexMainItemEnd{test suite}
|
||||
|
||||
|
||||
|
|
@ -1,851 +0,0 @@
|
|||
% =============================================================================
|
||||
% The CGAL Developers' Manual
|
||||
% Chapter: Tools
|
||||
% -----------------------------------------------------------------------------
|
||||
% file : tools.tex
|
||||
% authors: Geert-Jan Giezeman <geert@cs.uu.nl>
|
||||
% -----------------------------------------------------------------------------
|
||||
% $Id$
|
||||
% $Date$
|
||||
% =============================================================================
|
||||
|
||||
\chapter{Scripts and Other Tools\label{chap:tools}}
|
||||
|
||||
\ccIndexMainItemBegin{tools}
|
||||
\ccChapterRelease{Chapter Version: 1.0}
|
||||
\ccChapterAuthor{Geert-Jan Giezeman ({\tt geert@cs.uu.nl})}
|
||||
|
||||
This chapter is going to be moved to the wiki by Eric Berberich.
|
||||
|
||||
Eric: Be aware that cgal\_create\_assertions.sh (commented out in the sources)
|
||||
is now public; there are a few words about it in Section~\ref{sec:checks_controlling}.
|
||||
|
||||
There are a number of tools that automate some of the tedious and
|
||||
error-prone tasks that are unavoidable when developing for \cgal.
|
||||
Most of these scripts can be in at least two places.
|
||||
\begin{itemize}
|
||||
\item in every internal release (directory {\tt developer\_scripts} or
|
||||
{\tt scripts})
|
||||
\item in the package
|
||||
\ccAnchor{https://gforge.inria.fr/plugins/scmsvn/viewcvs.php/trunk/Scripts/?root=cgal}
|
||||
{Scripts} on the SVN server%
|
||||
\index{SVN server!Scripts package@\texttt{Scripts} package}%
|
||||
\begin{ccTexOnly}
|
||||
(\path|https://gforge.inria.fr/plugins/scmsvn/viewcvs.php/trunk/Scripts/?root=cgal|)
|
||||
\end{ccTexOnly}.
|
||||
\end{itemize}
|
||||
|
||||
|
||||
\section{{\tt create\_new\_release}}
|
||||
\label{sec:create_new_release}
|
||||
\index{create_new_release script@{\tt create\_new\_release} script|(}
|
||||
\ccIndexMainItem{release building}
|
||||
|
||||
The script
|
||||
\ccAnchor{https://gforge.inria.fr/plugins/scmsvn/viewcvs.php/trunk/Scripts/developer_scripts/create_new_release?root=cgal&view=markup}
|
||||
{{\tt create\_new\_release}} builds a tarball of \cgal\ from an SVN working
|
||||
copy of the trunk (or a branch).
|
||||
The command
|
||||
\begin{verse}
|
||||
{\tt create\_new\_release}
|
||||
\end{verse}
|
||||
creates a directory {\tt tmp} which contains the tarball, as well as its
|
||||
public and SRPM versions.
|
||||
|
||||
This script takes as argument the name of an SVN working copy of a branch,
|
||||
and it default to {\tt trunk}. It also supports the following options:
|
||||
\begin{description}
|
||||
\item[--rpm] create SRPM files as well
|
||||
\item[--public] create a public version as well
|
||||
\item[--do-it] (reserved to the release manager) moves it on the web server,
|
||||
tags...
|
||||
\item[--do-not-tag] option that allows to create a new release with
|
||||
\texttt{--do-it} without creating the tag.
|
||||
\end{description}
|
||||
\index{create_new_release script@{\tt create\_new\_release} script|)}
|
||||
|
||||
%% \section{{\tt cgal\_create\_assertions.sh}}
|
||||
%% \label{sec:cgal_create_assertions}
|
||||
%% \index{cgal_create_assertions.sh script@{\tt cgal\_create\_assertions.sh} script|(}
|
||||
%% \ccIndexMainItem{assertions}
|
||||
|
||||
%% The shell script
|
||||
%% %\ccAnchor{https://gforge.inria.fr/plugins/scmsvn/viewcvs.php/trunk/Scripts/scripts/cgal_create_assertions.sh?root=cgal&view=markup}
|
||||
%% {{\tt cgal\_create\_assertions.sh}} generates assertion header files.
|
||||
%% The command
|
||||
%% \begin{verse}
|
||||
%% {\tt cgal\_create\_assertions.sh minkowski}
|
||||
%% \end{verse}
|
||||
%% creates a file {\tt minkowski\_assertions.h}.
|
||||
%% This file is usually placed in directory {\tt include/CGAL} and included in
|
||||
%% files that implement the minkowski package.
|
||||
%% The file contains several macros for adding checks (preconditions,
|
||||
%% postconditions, {\em etc.}) that can be switched on or off with compile
|
||||
%% flags.
|
||||
%% You can read more about the use of these package-level checks in
|
||||
%% Section~\ref{sec:checks_controlling}.
|
||||
%% \index{cgal_create_assertions.sh script@{\tt cgal\_create\_assertions.sh} script|)}
|
||||
|
||||
\section{{\tt cgal\_create\_makefile}}
|
||||
\label{sec:cgal_create_makefile}
|
||||
\index{cgal_create_makefile script@{\tt cgal\_create\_makefile} script|(}
|
||||
\ccIndexSubitemBegin{\tt makefile}{creating}
|
||||
|
||||
The shell script
|
||||
\ccAnchor{https://gforge.inria.fr/plugins/scmsvn/viewcvs.php/trunk/Scripts/scripts/cgal_create_makefile?root=cgal&view=markup}
|
||||
{{\tt cgal\_create\_makefile}} creates a \cgal\ makefile
|
||||
in the current working directory.
|
||||
The makefile will have rules to make an executable from every {\tt .C}
|
||||
and {\tt .cpp} file which contains the word {\tt main} in the directory.
|
||||
The following options are available to indicate the kind of makefile
|
||||
to create:
|
||||
\begin{description}
|
||||
\item[-d] create a default CGAL makefile
|
||||
\item[-t] create a CGAL makefile for the test suite
|
||||
\item[-q] create a CGAL makefile with Qt support
|
||||
\end{description}
|
||||
|
||||
You should use this script to create makefiles for testing before submitting
|
||||
your packages, but you should {\bf avoid} customizing the makefile for your
|
||||
package and then submitting the makefiles for your test suite and example
|
||||
programs.\ccIndexSubitem{\tt makefile}{submitting}
|
||||
Makefiles get created automatically when a release is made. This ensures
|
||||
that the most up-to-date makefiles are created. Experience has shown
|
||||
that makefiles need to be updated from time to time, especially if new
|
||||
compilers are supported. When makefiles are submitted as part of a package,
|
||||
they tend to get outdated.
|
||||
Moreover, creating a makefile that works for a diverse range of compilers
|
||||
is difficult.
|
||||
|
||||
The makefiles created by this script have two hooks for customization.
|
||||
If the directory
|
||||
where the makefile is created contains a directory named {\tt include},%
|
||||
\index{include directory@{\tt include} directory!local}
|
||||
that
|
||||
directory will be on the header search path before any other files. This
|
||||
provides a means to override header files%
|
||||
\ccIndexSubitem{header files}{overriding}.
|
||||
Furthermore, the makefiles in the
|
||||
test suite (created with the {\tt -t} option), contain the variable
|
||||
{\tt EXTRA\_FLAGS}.\ccIndexSubitem{\tt makefile}{test suite}%
|
||||
\index{extra_flags variable@{\tt EXTRA\_FLAGS} variable}
|
||||
This variable can be set, {\em e.g.}, as an environment variable in
|
||||
{\tt cgal\_test}, to add {\tt -I} or {\tt -D} options.
|
||||
\ccIndexSubitemEnd{\tt makefile}{creating}
|
||||
\index{cgal_create_makefile script@{\tt cgal\_create\_makefile} script|)}
|
||||
|
||||
\section{{\tt cgal\_create\_cmake\_script}}
|
||||
\label{sec:cgal_create_cmake_script}
|
||||
\index{cgal_create_cmake_script script@{\tt cgal\_create\_cmake\_script} script|(}
|
||||
\ccIndexSubitemBegin{\tt cmake script}{creating}
|
||||
|
||||
The shell script
|
||||
\ccAnchor{https://gforge.inria.fr/plugins/scmsvn/viewcvs.php/trunk/Scripts/scripts/cgal_create_cmake_script?root=cgal&view=markup}
|
||||
{{\tt cgal\_create\_cmake\_script}} creates a \cgal\ cmake script, that is, a {\tt CMakeLists.txt} file,
|
||||
in the current working directory for configuring a particular \cgal\ application (such as an example, demo or test).
|
||||
|
||||
The cmake script will have commands to make an executable from every {\tt .C}
|
||||
and {\tt .cpp} file which contains the word {\tt main} in the directory.
|
||||
The following options are available to indicate the kind of cmake script
|
||||
to create:
|
||||
\begin{description}
|
||||
\item[-q] create a CMake script with Qt support
|
||||
\end{description}
|
||||
|
||||
|
||||
You should use this script to create a {\tt 'CMakeLists.txt'} for testing before submitting
|
||||
your packages, but you should {\bf avoid} customizing the {\tt CMakeLists.txt} for your
|
||||
package and then submitting it. \ccIndexSubitem{\tt 'CMakeLists.txt'}{submitting}
|
||||
CMake scripts get created automatically when a release is made. This ensures
|
||||
that the most up-to-date {\tt 'CMakeLists.txt'} is created. Experience has shown
|
||||
that cmake scripts need to be updated from time to time.
|
||||
When cmake scripts are submitted as part of a package, they tend to get outdated.
|
||||
|
||||
|
||||
The {\tt 'CMakeLists.txt'} created by this script has the following properties:
|
||||
|
||||
If the directory where the cmake script is created contains a directory named {\tt include},%
|
||||
\index{include directory@{\tt include} directory!local}
|
||||
that directory will be on the header search path before any other files. This
|
||||
provides a means to override header files%
|
||||
\ccIndexSubitem{header files}{overriding}.
|
||||
|
||||
The \cgal\ library is required (must have been already configured) and
|
||||
cmake must be called with {\tt '-DCGAL\_DIR={\em <path>}'},
|
||||
where {\em <path>} corresponds to the binary directory of the \cgal\ installation
|
||||
(where the file 'CGALConfig.cmake' is).
|
||||
|
||||
While cmake itself takes care automatically of most compiler and linker flags based
|
||||
on the target compiler and debug/release configuration, additional flags
|
||||
might have been specified when building \cgal\ and will be used here
|
||||
(as defined in 'CGALConfig.cmake'). However, if you
|
||||
need {\em additional} compiler or linker flags specifically here,
|
||||
you can define any of the following cmake variables at the command line
|
||||
when running cmake (via the -D option):
|
||||
|
||||
\begin{verbatim}
|
||||
CGAL_CXX_FLAGS
|
||||
CGAL_CXX_FLAGS_RELEASE
|
||||
CGAL_CXX_FLAGS_DEBUG
|
||||
CGAL_EXE_LINKER_FLAGS
|
||||
CGAL_EXE_LINKER_FLAGS_RELEASE
|
||||
CGAL_EXE_LINKER_FLAGS_DEBUG
|
||||
\end{verbatim}
|
||||
|
||||
The \_RELEASE and \_DEBUG variables are {\em appended} to the general variable, so for each
|
||||
build type, two sets of flags are used. For example: CGAL\_CXX\_FLAGS {\em then} CGAL\_CXX\_FLAGS\_DEBUG
|
||||
|
||||
\ccIndexSubitemEnd{\tt cmake script}{creating}
|
||||
\index{cgal_create_cmake_script script@{\tt cgal\_create\_cmake\_script} script|)}
|
||||
|
||||
|
||||
\section{{\tt create\_cgal\_test}}
|
||||
\label{sec:create_cgal_test}
|
||||
\index{create_cgal_test script@{\tt create\_cgal\_test} script|(}
|
||||
\index{cgal_test script@{\tt cgal\_test} script|(}
|
||||
|
||||
In every subdirectory of {\tt test} there must be a shell script called
|
||||
{\tt cgal\_test}. This script is called from the {\tt run\_testsuite}%
|
||||
\index{run_testsuite script@{\tt run\_testsuite} script}
|
||||
script when the test suite is run. The script
|
||||
\ccAnchor{https://gforge.inria.fr/plugins/scmsvn/viewcvs.php/trunk/Scripts/developer_scripts/create_cgal_test?root=cgal&view=markup}
|
||||
{{\tt create\_cgal\_test}}
|
||||
will create the shell script {\tt cgal\_test} in the current directory.
|
||||
|
||||
As is the case with makefiles, this file will be generated automatically for
|
||||
each subdirectory of {\tt test} if
|
||||
it is not supplied by the package. This is also the preferred way.
|
||||
So you should use {\tt create\_cgal\_test} to test your package before
|
||||
submitting but generally should avoid submitting the file {\tt cgal\_test}.
|
||||
But sometimes you may want to do something extra in this script ({\em e.g.}, set
|
||||
the {\tt EXTRA\_FLAGS}\index{extra_flags variable@{\tt EXTRA\_FLAGS} variable}
|
||||
environment variable that is used in the makefile).
|
||||
In this case, you can run {\tt create\_cgal\_test} yourself and edit the result.
|
||||
The generated file contains a header that lists the requirements a
|
||||
{\tt cgal\_test} program should fulfill. These are also listed in
|
||||
Section~\ref{sec:test_subdirectory} with the description of the
|
||||
{\tt cgal\_test} script.
|
||||
|
||||
Files which are considered by {{\tt create\_cgal\_test}} are those with
|
||||
{\tt .C} or {\tt .cpp} extension, and which content match the word {\tt main}.
|
||||
This way, no attempt is made at linking programs which are made of several
|
||||
object files.
|
||||
|
||||
%\begin{itemize}
|
||||
%\item For every target two one-line messages are written to the file
|
||||
% {\tt error.txt}\in
|
||||
% The first one indicates if the compilation was successful,
|
||||
%the second one indicates if the execution was successful.
|
||||
%If one of the two was not successful, the line should start with 'ERROR:'
|
||||
%\item
|
||||
%Running the script should not require any user interaction
|
||||
%\item
|
||||
%The script should clean up object files and executables
|
||||
%\end{itemize}
|
||||
\index{cgal_test script@{\tt cgal\_test} script|)}
|
||||
\index{create_cgal_test script@{\tt create\_cgal\_test} script|)}
|
||||
|
||||
\section{{\tt create\_cgal\_test\_with\_cmake}}
|
||||
\label{sec:create_cgal_test_with_cmake}
|
||||
\index{create_cgal_test_with_cmake script@{\tt create\_cgal\_test\_with\_cmake} script|(}
|
||||
\index{cgal_test_with_cmake script@{\tt cgal\_test\_with\_cmake} script|(}
|
||||
|
||||
In every subdirectory of {\tt test} there must be a shell script called
|
||||
{\tt cgal\_test\_with\_cmake}. This script is called from the {\tt run\_testsuite\_with\_cmake}%
|
||||
\index{run_testsuite script@{\tt run\_testsuite\_with\_cmake} script}
|
||||
script when the test suite is run. The script
|
||||
\ccAnchor{https://gforge.inria.fr/plugins/scmsvn/viewcvs.php/trunk/Scripts/developer_scripts/create_cgal_test_with_cmake?root=cgal&view=markup}
|
||||
{{\tt create\_cgal\_test\_with\_cmake}}
|
||||
will create the shell script {\tt cgal\_test\_with\_cmake} in the current directory.
|
||||
|
||||
As is the case with cmake scripts, this file will be generated automatically
|
||||
for each subdirectory of {\tt test} if
|
||||
it is not supplied by the package. This is also the preferred way, so you should
|
||||
use {\tt create\_cgal\_test\_with\_cmake} to test your package before
|
||||
submitting but generally should avoid submitting the file {\tt cgal\_test\_with\_cmake}.
|
||||
The generated file contains a header that lists the requirements a
|
||||
{\tt cgal\_test\_with\_cmake} program should fulfill. These are also listed in
|
||||
Section~\ref{sec:test_subdirectory} with the description of the
|
||||
{\tt cgal\_test\_with\_cmake} script.
|
||||
|
||||
Files which are considered by {{\tt create\_cgal\_test\_with\_cmake}} are those with
|
||||
{\tt .c} or {\tt .cpp} extension, and which content match the word {\tt main}.
|
||||
This way, no attempt is made at linking programs which are made of several
|
||||
object files.
|
||||
|
||||
The generated script calls {\tt cmake} with the following definitions
|
||||
\begin{verbatim}
|
||||
-DCGAL_DIR=${CGAL_DIR}
|
||||
-DCGAL_CXX_FLAGS=${TESTSUITE_CXXFLAGS}
|
||||
-DCGAL_EXE_LINKER_FLAGS=${TESTSUITE_LDFLAGS}
|
||||
-DCMAKE_BUILD_TYPE=NOTFOUND
|
||||
\end{verbatim}
|
||||
|
||||
The environment variable {\tt CGAL\_DIR } is {\em required} and must contain the path
|
||||
to the binary directory of the \cgal\ installation to use (the testsuite defines
|
||||
this automatically), while the environment variables {\tt TESTSUITE\_CXXFLAGS and
|
||||
TESTSUITE\_LDFLAGS} are optional and are used to {\em add} flags which have not
|
||||
been used when building the library. These TESTSUITE variables are
|
||||
kept for backward compatibility with the non-cmake testsuite (the preferred way is to define all
|
||||
the flags when building \cgal\ rather than using these).
|
||||
|
||||
{\tt CMAKE\_BUILD\_TYPE} is set to {\tt NOTFOUND} in order to use the same
|
||||
build type specified when building \cgal\ (as defined in {\tt CGALConfig.cmake}).
|
||||
|
||||
\index{cgal_test_with_cmake script@{\tt cgal\_test\_with\_cmake} script|)}
|
||||
\index{create_cgal_test_with_cmake script@{\tt create\_cgal\_test\_with\_cmake} script|)}
|
||||
|
||||
\section{{\tt autotest\_cgal}}
|
||||
\label{sec:autotest_cgal}
|
||||
\index{autotest_cgal script@{\tt autotest\_cgal} script|(}
|
||||
\ccIndexSubitem{test suite}{internal release}
|
||||
|
||||
The shell script {\tt autotest\_cgal} is used to run automated test suites for
|
||||
the internal releases of the library. The script is configurable using a
|
||||
{\tt .autocgalrc} file stored in {\tt \$HOME}.
|
||||
It is meant to be run regularly by a cron job run by the testers.
|
||||
|
||||
This script allows you to run the testsuite on multiple hosts (remotely or
|
||||
locally) and multiple compiler-platforms. It is also possible to specify how
|
||||
many processors the host has and the script will use this information to run
|
||||
the testsuite process on several processors at the same time. By default, the
|
||||
number of processors assigned to every host is one.
|
||||
|
||||
In a couple of words, the script first downloads a file named {\tt LATEST}
|
||||
that contains the current release file name. It compares it with the file {\tt
|
||||
RELEASE\_NR} in the {\tt \$CGAL\_ROOT} directory and if it is different it
|
||||
starts the testsuite process : it downloads the internal release, unzips,
|
||||
untars, copies the configuration files, and starts the testsuite. When
|
||||
everything is done, it puts the results on some ftp server.
|
||||
|
||||
\subsection{How to set up your local testing} ~
|
||||
|
||||
The first step is to create a directory where you will store the releases.
|
||||
This directory is known in the script as {\tt \$CGAL\_ROOT}. By default
|
||||
{\tt \$CGAL\_ROOT} is the directory where you put the script {\tt
|
||||
autotest\_cgal}, but you may change it in {\tt .autocgalrc}.
|
||||
|
||||
The next step is to download an internal release of your choice, say {\tt
|
||||
CGAL-3.1-I-xx}, and install it on the various platforms you want it to be
|
||||
installed using the usual procedure with the {\tt install\_cgal} script.
|
||||
This will create the configuration files in the directory {\tt
|
||||
CGAL-3.1-I-xx/config/install/}.
|
||||
|
||||
Then, create a symbolic link to this release using {\tt ln -s CGAL-3.1-I-xx
|
||||
CGAL-I}. This link will be updated by {\tt autotest\_cgal} to point to the
|
||||
last installed release. You may remove older releases at some point.
|
||||
|
||||
The script uses {\tt wget} to download the release. The different options you
|
||||
may pass to {\tt wget} you should put in the {\tt WGET} variable in {\tt
|
||||
.autocgalrc}. By default, {\tt WGET=''wget''}. We noticed that you must use
|
||||
a recent version of {\tt wget} (1.9.1 is fine, but 1.8.2 is not). You must
|
||||
also create a file in your {\tt HOME} called {\tt .wgetrc} (alternatively,
|
||||
it is also possible to use another file by setting the {\tt WGETRC} variable),
|
||||
that contains the following lines:
|
||||
\begin{verbatim}
|
||||
--http-user=member1
|
||||
--http-passwd=xxxxxxx
|
||||
\end{verbatim}
|
||||
|
||||
Alternatively, you can use {\tt curl} instead of {\tt wget}. In order to
|
||||
do so, you need to add {\tt USE\_CURL=''y''} to your {\tt .autocgalrc} file.
|
||||
{\tt curl} is then also used as a replacement for {\tt ftp} for uploading the
|
||||
test results.
|
||||
You also have to add the following line in a file called {\tt HOME/.curlrc}:
|
||||
\begin{verbatim}
|
||||
--user member1:xxxxxxx
|
||||
\end{verbatim}
|
||||
|
||||
The next step is to specify the name of the hosts. To do that, you
|
||||
must define the variable \texttt{BUILD\_HOSTS} in the file {\tt
|
||||
.autocgalrc}. For every host $h$ listed in \texttt{BUILD\_HOSTS} you
|
||||
must also specify the variable \texttt{COMPILERS\_$h$} as a list of
|
||||
OS-compiler descriptors for which the testsuite is to be run on $h$.
|
||||
|
||||
Optionally, you can also specify a variable \texttt{BUILD\_ON\_$h$} as
|
||||
a list of OS-compiler descriptors for which the \cgal\ libraries are
|
||||
to be built on $h$. If \texttt{BUILD\_ON\_$h$} is not defined, it
|
||||
defaults to the value of \texttt{COMPILERS\_$h$}. For obvious reasons,
|
||||
it is a good idea to keep the compilers in \texttt{COMPILERS\_$h$} a
|
||||
subset of the compilers listed in \texttt{BUILD\_ON\_$h$}. Setting
|
||||
\texttt{BUILD\_ON\_$h$} to \texttt{all}, invokes the install script
|
||||
with \texttt{--rebuild-all} and, therefore, builds \cgal\ using all
|
||||
compilers for which a matching \texttt{config/install} file is found.
|
||||
|
||||
\noindent Here is an example:
|
||||
\begingroup\small
|
||||
\begin{verbatim}
|
||||
BUILD_HOSTS="papillon electra winmachine localhost"
|
||||
COMPILERS_papillon="mips_IRIX64-6.5_CC-n32-7.30 mips_IRIX-6.5_g++-fsquangle-2.95.2"
|
||||
COMPILERS_electra="sparc_SunOS-5.6_g++-2.95.2"
|
||||
BUILD_ON_electra="sparc_SunOS-5.6_g++-2.95.2 sparc_SunOS-5.6_CC-5.80"
|
||||
COMPILERS_winmachine="i686_CYGWINNT-5.0-1.3.22_CL.EXE-1300"
|
||||
COMPILERS_localhost="i686_Linux-2.4.17_g++-3.4.0"
|
||||
PROCESSORS_papillon="3"
|
||||
BUILD_ON_papillon="all"
|
||||
\end{verbatim}\endgroup
|
||||
You should take those names from the configuration files mentioned
|
||||
earlier. The {\tt PROCESSORS\_hostname} must be set if you have more
|
||||
than one processor on that host and of course if you want to give all
|
||||
of them to the testsuite. If you want to run the testsuite locally and
|
||||
not remotely, name the host as {\tt localhost} and the script will run
|
||||
the testsuite locally for that host.
|
||||
|
||||
\subsection{List of configurable variables} ~
|
||||
|
||||
{\tt MYSHELL} is a variable that must be defined in {\tt .autocgalrc},
|
||||
otherwise the script will not run. You can use it to pass environment
|
||||
variables along to remote hosts. Here is an example of {\tt MYSHELL}
|
||||
variable :
|
||||
\begin{verbatim}
|
||||
MYSHELL="TERM=vt100 PATH=$PATH:/bin:/usr/local/bin:/usr/ccs/bin:/opt/SUNWspro/bin \
|
||||
QTDIR=/usr/local/qt2 PARASOFT=/usr/local/parasoft /usr/local/bin/zsh -c\"
|
||||
\end{verbatim}
|
||||
|
||||
{\tt CGAL\_URL} is the URL where internal releases are available.
|
||||
The {\tt LATEST} file is comming from the same location. If this will change,
|
||||
you may change either {\tt CGAL\_URL}, or {\tt LATEST\_LOCATION}
|
||||
in {\tt .autocgalrc}.
|
||||
|
||||
{\tt TAR}, {\tt GZIP}, {\tt GUNZIP} are the variables for compression and
|
||||
decompression tools. They are defaulted to {\tt tar}, {\tt gzip}, {\tt
|
||||
gunzip} found in {\tt \$PATH}.
|
||||
|
||||
{\tt SENDMAIL} has the default value {\tt ''mail''}.
|
||||
|
||||
{\tt CGAL\_TESTER} has the default value {\tt `whoami`}. It is used to
|
||||
identify the tester. You should specify a kind of login name for this
|
||||
variable.
|
||||
|
||||
{\tt CGAL\_TESTER\_NAME} has the default value {\tt `whoami`}. It is used to
|
||||
identify the tester. You should specify your full name for this variable.
|
||||
|
||||
{\tt CGAL\_TESTER\_ADDRESS} has the default value {\tt `whoami`}. It is used
|
||||
to identify the tester. You should specify your email address for this
|
||||
variable.
|
||||
|
||||
{\tt MAIL\_ADDRESS} has no value by default. In case you want to
|
||||
set it in {\tt .autocgalrc}, the script will send an additional email to
|
||||
everyone mentioned in this variable.
|
||||
|
||||
{\tt LOGS\_DIR} has the default value {\tt \$CGAL\_ROOT/AUTOTEST\_LOGS}. This
|
||||
is used to keep local log files.
|
||||
|
||||
{\tt CONSOLE\_OUTPUT} has the default value ``y''. If you want that the script
|
||||
also shows messages to the console, the value is ``y'' otherwise the value
|
||||
should be ``''.
|
||||
|
||||
{\tt TEST\_DIR\_ROOT} specifies where the test-suite will be copied before
|
||||
being run. For example, this can be set to \ccc{/tmp}, instead of the default
|
||||
which is {\tt \$CGAL}. This directory can be local to the testing machine.
|
||||
|
||||
{\tt USE\_CURL} specifies if {\tt curl} should be used as a replacement for
|
||||
{\tt wget} and {\tt ftp}. Set it to {\tt ''y''} to use {\tt curl}.
|
||||
|
||||
{\tt FTP\_OPTS} specifies the options for {\tt ftp} On Linux systems
|
||||
it should be {\tt ''-p -v -n''} (the default), on cygwin it should be {\tt ''-v -n''}.
|
||||
|
||||
{\tt NICE\_OPTIONS} specifies the command line options to pass to the
|
||||
{\tt nice} command, which is used to prevent the test-suite from keeping
|
||||
all CPU time for itself. The default value is {\tt ''-19''}.
|
||||
|
||||
{\tt ULIMIT\_OPTIONS} specifies the command line options to pass to the
|
||||
{\tt ulimit} command, which is used to prevent the test-suite from using
|
||||
various system resources. It can be used to help killing looping programs.
|
||||
For example, specifying {\tt ''-c 0 -t 10800 -v 2000000''} will prevent
|
||||
the creation of dumped core files, will stop processes after 3 hours,
|
||||
and will kill them if they reach 2GB of memory.
|
||||
The default value is empty (no limit).
|
||||
|
||||
\index{.autocgalrc configuration file@{\tt .autocgalrc} configuration file|)}
|
||||
\index{autotest_cgal script@{\tt autotest\_cgal} script|)}
|
||||
|
||||
\section{{\tt autotest\_cgal\_with\_cmake}}
|
||||
\label{sec:autotest_cgal_with_cmake}
|
||||
\index{autotest_cgal_with_cmake script@{\tt autotest\_cgal\_with\_cmake} script|(}
|
||||
\ccIndexSubitem{test suite}{internal release}
|
||||
|
||||
The shell script {\tt autotest\_cgal\_with\_cmake} is used to run automated test suites for
|
||||
the internal releases of the library. The script need no command-line
|
||||
arguments, and it is configurable using a {\tt .autocgalrc} file stored
|
||||
in {\tt \$HOME}.
|
||||
It is meant to be run regularly by a cron job run by the testers.
|
||||
|
||||
This script allows you to run the testsuite on multiple hosts (remotely or
|
||||
locally) and multiple compilers/platforms. It is also possible to specify how
|
||||
many processors the host has and the script will use this information to run
|
||||
the testsuite process on several processors at the same time. By default, the
|
||||
number of processors assigned to every host is one.
|
||||
|
||||
In a couple of words, the script first downloads a file named {\tt LATEST}
|
||||
that contains the current release file name. It compares it with the file {\tt
|
||||
RELEASE\_NR} in the {\tt \$CGAL\_ROOT} directory and if it is different it
|
||||
starts the testsuite process : it downloads the internal release, unzips,
|
||||
untars, copies the configuration files, and starts the testsuite. When
|
||||
everything is done, it puts the results on some ftp server.
|
||||
|
||||
\subsection{How to set up your local testing} ~
|
||||
|
||||
The first step is to create a directory where you will store the releases.
|
||||
This directory is known in the script as {\tt \$CGAL\_ROOT}. By default
|
||||
{\tt \$CGAL\_ROOT} is the directory where you put the script {\tt
|
||||
autotest\_cgal\_with\_cmake}, but you may change it in {\tt .autocgalrc}.
|
||||
|
||||
The next step is to download an internal release of your choice, say {\tt
|
||||
CGAL-3.1-I-xx}, and unzip then untar it under {\tt \$CGAL\_ROOT}.
|
||||
This release will serve as a {\em fixed reference release} for configuring
|
||||
and building each current release to test from now on.
|
||||
|
||||
This internal release is used as a reference
|
||||
which defines the configurations to test (it is not itself tested),
|
||||
thus is better to rename it accordingly, say as {\tt CGAL-I-REF}.
|
||||
|
||||
The next step is to create a new directory for each wanted configuration
|
||||
(architecture+platform+compiler)
|
||||
to test under the directory {\tt \$CGAL\_ROOT/CGAL-I-REF/cmake/platforms}.
|
||||
Each directory in there, called {\em configuration folder}, will contain the testsuite
|
||||
for that configuration and its name will identify the configuration
|
||||
in the test results.
|
||||
|
||||
Now cd into each such configuration folder and configure \cgal\ using cmake
|
||||
(either the command line or the GUI). With the command-line cmake,
|
||||
use the -D option to define cmake variables and -G
|
||||
to define a generator if the default is not right for you.
|
||||
|
||||
|
||||
The cmake variables {\tt WITH\_CGALCORE, WITH\_CGALimageIO and WITH\_CGALQt}
|
||||
are used to enable or disable those \cgal\ components. These are all ON by default.
|
||||
You should you define them with OFF if any of those components do not work in your platform.
|
||||
For {\tt these and only these} cmake variables you can define them as environment variables
|
||||
rather than cmake variables.
|
||||
|
||||
The cmake variable {\tt CMAKE\_BUILD\_TYPE} is used to specify a {\tt 'Debug'} or {\tt 'Release'}
|
||||
configuration. For the testsuite, you should always define this variable
|
||||
since the default varies on different generators (and use only Debug or Release
|
||||
since other values are not currently supported)
|
||||
|
||||
CMake itself takes care automatically of most compiler and linker flags
|
||||
via the following cmake variables:
|
||||
|
||||
\begin{verbatim}
|
||||
CMAKE_CXX_FLAGS
|
||||
CMAKE_CXX_FLAGS_RELEASE
|
||||
CMAKE_CXX_FLAGS_DEBUG
|
||||
CMAKE_EXE_LINKER_FLAGS
|
||||
CMAKE_EXE_LINKER_FLAGS_RELEASE
|
||||
CMAKE_EXE_LINKER_FLAGS_DEBUG
|
||||
\end{verbatim}
|
||||
|
||||
The \_RELEASE and \_DEBUG variables are {\em appended} to the general variable, so for each
|
||||
build type, two sets of flags are used. For example: CMAKE\_CXX\_FLAGS {\em then} CMAKE\_CXX\_FLAGS\_DEBUG
|
||||
|
||||
You can define any of these variables on the command-line (with the -D switch) or the GUI (CMakeSetup|ccmake),
|
||||
but doing so {\em overrides} the values that cmake would automatically compute.
|
||||
|
||||
If you just want to {\em add} flags, you can define any of the following variables instead:
|
||||
|
||||
\begin{verbatim}
|
||||
CGAL_CXX_FLAGS
|
||||
CGAL_CXX_FLAGS_RELEASE
|
||||
CGAL_CXX_FLAGS_DEBUG
|
||||
CGAL_EXE_LINKER_FLAGS
|
||||
CGAL_EXE_LINKER_FLAGS_RELEASE
|
||||
CGAL_EXE_LINKER_FLAGS_DEBUG
|
||||
\end{verbatim}
|
||||
|
||||
which are named with CGAL rather than CMAKE.
|
||||
|
||||
CMake has trouble parsing in the command line variable definitions that contain the '=' sign in the value, thus,
|
||||
you cannot add a flag like: {\tt -DCGAL\_CXX\_FLAGS\_RELEASE='-std=c++0x'} . On the other hand, cmake uses
|
||||
the {\em environment} variable CXXFLAGS to initialize CMAKE\_CXX\_FLAGS, so you can use that in this case.
|
||||
|
||||
The cmake variable {\tt CMAKE\_CXX\_COMPILER} can be used to specify the full path of the C++ compiler to use.
|
||||
Unlike most cmake variables, this one is handled specially by cmake, thus, while manually defining it
|
||||
works fine when building the reference release for the testsuite, its value is not propagated
|
||||
to the releases being tested (recall that at this point we are manually building the reference release
|
||||
which the testsuite uses to automatically build and test the others). Therefore, if you need
|
||||
to specify the compiler (because cmake autodetects the wrong one), you need to define the
|
||||
{\em environment} variable CXX.
|
||||
|
||||
|
||||
The following example illustrates how to configure and build the reference release.
|
||||
Notice the ../../.. path to the \cgal\ sources from the platform directory (where cmake is invoked).
|
||||
|
||||
\begin{verbatim}
|
||||
export CXX=<some compiler not detected by cmake>
|
||||
export CXXFLAGS='-std=c++0x'
|
||||
export WITH_CGALimageIO=OFF
|
||||
|
||||
cmake -DWITH_CGALCORE=OFF -DCMAKE_BUILD_TYPE=Release ../../..
|
||||
|
||||
make
|
||||
\end{verbatim}
|
||||
|
||||
You can create here a shell script {\em specifically} named {\tt 'setup'} in case you need the test script
|
||||
to automatically do anything for this particular configuration, such as setting up
|
||||
environment variables as in the example above. The contents of such a file, if it exists, are copied verbatim
|
||||
into the start of the temporary build and test scripts created on each configuration folder. This allows
|
||||
you to bootstrap the process as needed.
|
||||
|
||||
Make sure to fix any problems configuring or building this reference release before starting the automated testsuite.
|
||||
|
||||
Once the reference release is ready, define a variable named
|
||||
{\tt REFERENCE\_PLATFORMS\_DIR} with the full path to the {\tt /cmake/platforms/}
|
||||
directory of the reference release, for example:
|
||||
{\tt \$CGAL\_ROOT/CGAL-I-REF/cmake/platforms}
|
||||
in the file {\tt .autocgalrc}.
|
||||
|
||||
The next step is to specify the name of the hosts. To do that, you
|
||||
must define the variable \texttt{BUILD\_HOSTS} in {\tt .autocgalrc}.
|
||||
|
||||
For every host $h$ listed in \texttt{BUILD\_HOSTS} you
|
||||
must also specify the variable \texttt{BUILD\_ON\_$h$} as a list of
|
||||
configuration names for which the \cgal\ libraries are
|
||||
to be built on $h$. For each name listed in here, the testsuite script
|
||||
will create a directory under the current platforms directory
|
||||
(i.e. {\tt \$CGAL\_ROOT/CGAL-3.1-I-abc/cmake/platforms} ), unless it already exists.
|
||||
|
||||
If any of the variables \texttt{BUILD\_ON\_$h$}
|
||||
has the value 'all' then the platforms directory structure of the reference
|
||||
release ({\tt \$REFERENCE\_PLATFORMS\_DIR}) is replicated
|
||||
under the current platforms directory. \footnote{This 'all' value should only be used when
|
||||
the testsuite is run on a single localhost, otherwise, the testsuite script won't be able to
|
||||
properly distribute each platform folder to its corresponding host.}
|
||||
|
||||
Similarly, for every host $h$ listed in \texttt{BUILD\_HOSTS} you
|
||||
must also specify the variable \texttt{COMPILERS\_$h$} as a list of
|
||||
configuration names for which the testsuite is to be run on $h$
|
||||
(this must be a subset of the names specified in \texttt{BUILD\_ON\_$h$}).
|
||||
You can specify only \texttt{COMPILERS\_$h$} instead of both \texttt{BUILD\_ON\_$h$}
|
||||
and \texttt{COMPILERS\_$h$} if they share the same value.
|
||||
|
||||
\noindent Here is an example setting in {\tt .autocgalrc}:
|
||||
|
||||
\begingroup\small
|
||||
\begin{verbatim}
|
||||
REFERENCE_PLATFORMS_DIR="~/CGAL_autotest/CGAL-I-REF/cmake/platforms"
|
||||
BUILD_HOSTS="papillon electra winmachine localhost"
|
||||
COMPILERS_papillon="mips_IRIX64-6.5_CC-n32-7.30 mips_IRIX-6.5_g++-fsquangle-2.95.2"
|
||||
COMPILERS_electra="sparc_SunOS-5.6_g++-2.95.2"
|
||||
BUILD_ON_electra="sparc_SunOS-5.6_g++-2.95.2 sparc_SunOS-5.6_CC-5.80"
|
||||
COMPILERS_winmachine="i686_CYGWINNT-5.0-1.3.22_CL.EXE-1300"
|
||||
COMPILERS_localhost="i686_Linux-2.4.17_g++-3.4.0"
|
||||
PROCESSORS_papillon="3"
|
||||
\end{verbatim}\endgroup
|
||||
|
||||
The {\tt PROCESSORS\_hostname} must be set if you have more
|
||||
than one processor on that host and of course if you want to give all
|
||||
of them to the testsuite. If you want to run the testsuite locally and
|
||||
not remotely, name the host as {\tt localhost} and the script will run
|
||||
the testsuite locally for that host.
|
||||
|
||||
The script copies the entire {\tt /test } subdirectory of the release being tested
|
||||
into each configuration folder to test at, thus, all executables, temporaries
|
||||
and results are local to that configuration. When the scripts finishes testing
|
||||
a configuration, the local {\tt /test } subdirectory is deleted.
|
||||
|
||||
The script uses {\tt wget} to download the release to test. The different options you
|
||||
may pass to {\tt wget} you should put in the {\tt WGET} variable in {\tt
|
||||
.autocgalrc}. By default, {\tt WGET=''wget''}. We noticed that you must use
|
||||
a recent version of {\tt wget} (1.9.1 is fine, but 1.8.2 is not). You must
|
||||
also create a file in your {\tt HOME} called {\tt .wgetrc} (alternatively,
|
||||
it is also possible to use another file by setting the {\tt WGETRC} variable),
|
||||
that contains the following lines:
|
||||
\begin{verbatim}
|
||||
--http-user=member1
|
||||
--http-passwd=xxxxxxx
|
||||
\end{verbatim}
|
||||
|
||||
Alternatively, you can use {\tt curl} instead of {\tt wget}. In order to
|
||||
do so, you need to add {\tt USE\_CURL=''y''} to your {\tt .autocgalrc} file.
|
||||
{\tt curl} is then also used as a replacement for {\tt ftp} for uploading the
|
||||
test results.
|
||||
You also have to add the following line in a file called {\tt HOME/.curlrc}:
|
||||
\begin{verbatim}
|
||||
--user member1:xxxxxxx
|
||||
\end{verbatim}
|
||||
|
||||
Once the latest release has been downloaded, unzipped and untared,
|
||||
say under {\tt \$CGAL\_ROOT/CGAL-3.4-I-abc}, the testsuites creates
|
||||
a symbolic link to it named {\tt \$CGAL\_ROOT/CGAL-I}. From now on,
|
||||
the release being tested is located under {\tt CGAL-I}.
|
||||
|
||||
For each directory under {\tt \$CGAL\_ROOT/CGAL-I/cmake/platforms},
|
||||
if a directory of the name name exist in the reference release
|
||||
(i.e. under {\tt \$CGAL\_ROOT/CGAL-I-REF/cmake/platforms}),
|
||||
the files {\tt CMakeCache.txt} and {\tt setup} are copied
|
||||
from the reference release (if they exist).
|
||||
|
||||
\subsection{Command line options for the initial set up} ~
|
||||
|
||||
{\tt autotest\_cgal\_with\_cmake} is meant to be run unattended by a cron job.
|
||||
However, in order to simplify the initial set up some command line options are available:
|
||||
|
||||
\begin{itemize}
|
||||
\item {\tt -c} Uses an already untared internal release under the
|
||||
symbolic link {\tt 'CGAL-I'} instead of
|
||||
downloading and untaring a new one. You can use this option
|
||||
to {\em resume} immediately the test suite process in case it
|
||||
failed before.
|
||||
|
||||
\item {\tt -n} Skips the testing phase, finishing after the libraries has been built.
|
||||
You can use this option to verify that the mechanism that uses the
|
||||
reference release to build the current release with the exact same
|
||||
settings works fine.
|
||||
|
||||
\item {\tt -l} Do not upload the results to the server.
|
||||
You can use this option to avoid uploading incomplete results until
|
||||
the testsuite process works correctly in your system.
|
||||
\end{itemize}
|
||||
|
||||
\subsection{Sending results}
|
||||
Unless you use the {\tt -l} option, the script will attempt to send result
|
||||
using {\tt scp} (secured-copy, a tool from the SSH suite) to the
|
||||
GeometryFactory server {\tt cgal.geometryfactory.com}. You must declare
|
||||
yourself as a tester to Laurent Rineau, and send him the public part of
|
||||
your ssh key. Usually, that is the file {\tt \$HOME/.ssh/id\_rsa.pub}, or
|
||||
{\tt \$HOME/.ssh/id\_dsa.pub}.
|
||||
|
||||
After that, you can test that the sending works, by typing:
|
||||
\begin{verbatim}
|
||||
ssh cgaltest@cgal.geometryfactory.com
|
||||
\end{verbatim}
|
||||
If the result is something like:
|
||||
\begin{verbatim}
|
||||
Last login: Thu July 14 12:03:18 1789 from 1.1.1.1
|
||||
CentOS release 5.3 (Final)
|
||||
Linux cgal.geometryfactory.com 2.6.28.4-xxxx-std-ipv6-32 #4 SMP Wed Sep 9 22:08:40 UTC 2009 i686 i686 i386 GNU/Linux
|
||||
|
||||
server : 39891
|
||||
ip : 91.121.110.28
|
||||
ip : 91.121.110.28
|
||||
hostname : cgal.geometryfactory.com
|
||||
\end{verbatim}
|
||||
then the test is successful (you will need to interrupt SSH with
|
||||
Ctrl+C). If instead you get something like:
|
||||
\begin{verbatim}
|
||||
Permission denied (publickey,gssapi-with-mic).
|
||||
\end{verbatim}
|
||||
then contact Laurent Rineau.
|
||||
|
||||
\subsection{List of miscellaneous configurable variables} ~
|
||||
|
||||
{\tt MYSHELL} is a variable that may be defined in {\tt .autocgalrc}
|
||||
to pass environment variables along to remote hosts. Here is an example of {\tt MYSHELL}
|
||||
variable :
|
||||
\begin{verbatim}
|
||||
MYSHELL="TERM=vt100 PATH=$PATH:/bin:/usr/local/bin:/usr/ccs/bin:/opt/SUNWspro/bin \
|
||||
QTDIR=/usr/local/qt2 PARASOFT=/usr/local/parasoft /usr/local/bin/zsh -c\"
|
||||
\end{verbatim}
|
||||
|
||||
{\tt CGAL\_URL} is the URL where internal releases are available.
|
||||
The {\tt LATEST} file is coming from the same location. If this will change,
|
||||
you may change either {\tt CGAL\_URL}, or {\tt LATEST\_LOCATION}
|
||||
in {\tt .autocgalrc}.
|
||||
|
||||
{\tt TAR}, {\tt GZIP}, {\tt GUNZIP} are the variables for compression and
|
||||
decompression tools. They are defaulted to {\tt tar}, {\tt gzip}, {\tt
|
||||
gunzip} found in {\tt \$PATH}.
|
||||
|
||||
{\tt SENDMAIL} has the default value {\tt ''mail''}.
|
||||
|
||||
{\tt CGAL\_TESTER} has the default value {\tt `whoami`}. It is used to
|
||||
identify the tester. You should specify a kind of login name for this
|
||||
variable.
|
||||
|
||||
{\tt CGAL\_TESTER\_NAME} has the default value {\tt `whoami`}. It is used to
|
||||
identify the tester. You should specify your full name for this variable.
|
||||
|
||||
{\tt CGAL\_TESTER\_ADDRESS} has the default value {\tt `whoami`}. It is used
|
||||
to identify the tester. You should specify your email address for this
|
||||
variable.
|
||||
|
||||
{\tt MAIL\_ADDRESS} has no value by default. In case you want to
|
||||
set it in {\tt .autocgalrc}, the script will send an additional email to
|
||||
everyone mentioned in this variable.
|
||||
|
||||
{\tt LOGS\_DIR} has the default value {\tt \$CGAL\_ROOT/AUTOTEST\_LOGS}. This
|
||||
is used to keep local log files.
|
||||
|
||||
{\tt CONSOLE\_OUTPUT} has the default value ``y''. If you want that the script
|
||||
also shows messages to the console, the value is ``y'' otherwise the value
|
||||
should be ``''.
|
||||
|
||||
{\tt USE\_CURL} specifies if {\tt curl} should be used as a replacement for
|
||||
{\tt wget} and {\tt ftp}. Set it to {\tt ''y''} to use {\tt curl}.
|
||||
|
||||
{\tt FTP\_OPTS} specifies the options for {\tt ftp} On Linux systems
|
||||
it should be {\tt ''-p -v -n''} (the default), on cygwin it should be {\tt ''-v -n''}.
|
||||
|
||||
{\tt NICE\_OPTIONS} specifies the command line options to pass to the
|
||||
{\tt nice} command, which is used to prevent the test-suite from keeping
|
||||
all CPU time for itself. The default value is {\tt ''-19''}.
|
||||
|
||||
{\tt ULIMIT\_OPTIONS} specifies the command line options to pass to the
|
||||
{\tt ulimit} command, which is used to prevent the test-suite from using
|
||||
various system ressources. It can be used to help killing looping programs.
|
||||
For example, specifying {\tt ''-c 0 -t 10800 -v 2000000''} will prevent
|
||||
the creation of dumped core files, will stop processes after 3 hours,
|
||||
and will kill them if they reach 2GB of memory.
|
||||
The default value is empty (no limit).
|
||||
|
||||
\subsection{Testing with Visual Studio on cygwin} ~
|
||||
|
||||
In order to test with Visual Studio you need to use cygwin and set up
|
||||
the environment for the command line compiler. This can be done
|
||||
by setting up the VC command line tools in the {\tt 'setup'} script
|
||||
that is used to bootstrap the build and test process, as explained before.
|
||||
Merely executing the {\tt 'vcvars32.bat'} that comes with VC does not work
|
||||
since the variables in there will be defined only in the environment for the batch
|
||||
file and not in the environment of the building/testing script (this is why
|
||||
the contents of the 'setup' script are copied into the build/test script
|
||||
instead of 'setup' being just executed from there)
|
||||
|
||||
Furthermore, within the {\tt 'setup'} script, the following must be
|
||||
considered:
|
||||
|
||||
The variables {\tt INCLUDE, LIB and LIBPATH} will be used by the Visual C++ compiler
|
||||
{\em directly}, that is, without the path translation that cygwin usually performs.
|
||||
Thus, the values for these variables must be a verbatim copy of the values defined in
|
||||
the {\tt 'vcvars32.bat'} of your Visual Studio installation.
|
||||
|
||||
On the other hand, the {\tt PATH} variable will be used by cygwin itself to locate the
|
||||
components of the command line tools (cl.exe, link.exe, etc.), thus, each Windows
|
||||
path specified in the PATH definition on {\tt 'vcvars32.bat'} must be converted to a
|
||||
POSIX path and properly appended to the cygwin PATH variable.
|
||||
|
||||
Below is a sample 'setup' script for Visual C++ 9.0:
|
||||
|
||||
\begin{verbatim}
|
||||
export INCLUDE='C:\Program Files\Microsoft Visual Studio 9.0\VC\ATLMFC\INCLUDE;C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE;C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include;C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\include;c:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\include\'
|
||||
|
||||
export LIB='C:\Program Files\Microsoft Visual Studio 9.0\VC\ATLMFC\LIB;C:\Program Files\Microsoft Visual Studio 9.0\VC\LIB;C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\lib;C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\lib;c:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\Lib\'
|
||||
|
||||
export LIBPATH='C:\Program Files\Microsoft Visual Studio 9.0\VC\ATLMFC\LIB;C:\Program Files\Microsoft Visual Studio 9.0\VC\LIB'
|
||||
|
||||
export PATH='/cygdrive/c/Program Files/Microsoft Visual Studio 9.0/Common7/IDE':'/cygdrive/c/Program Files/Microsoft Visual Studio 9.0/VC/BIN':'/cygdrive/c/Program Files/Microsoft Visual Studio 9.0/Common7/Tools':'/cygdrive/c
|
||||
/Program Files/Microsoft Visual Studio 9.0/Common7/Tools/bin':'/cygdrive/c/Program Files/Microsoft Visual Studio 9.0/VC/VCPackages':'/cygdrive/c/Program Files/Microsoft Visual Studio 8/VC/PlatformSDK/bin':'/cygdrive/c/Program Files/Microsoft Visual Studio 8/SDK/v2.0/bin':$PATH
|
||||
|
||||
\end{verbatim}
|
||||
|
||||
|
||||
\index{.autocgalrc configuration file@{\tt .autocgalrc} configuration file|)}
|
||||
\index{autotest_cgal_with_cmake script@{\tt autotest\_cgal\_with\_cmake} script|)}
|
||||
|
||||
\section{{\tt check\_licenses}}
|
||||
\label{sec:check_licenses}
|
||||
\index{check_licenses script@{\tt check\_licenses} script|(}
|
||||
|
||||
This script can be used to check all files in an internal or external release
|
||||
for proper license notices. It reports all files without a proper notice.
|
||||
Observe that the check is fairly simple, we just grep through the files
|
||||
looking for a fixed string. Additionally, there might be provisions in the
|
||||
top-level LICENSE file that are not taken into account by this script.
|
||||
|
||||
Note that there might be license errors that are not detected by this script.
|
||||
For example, we do not check that files under LGPL and GPL are not mixed in
|
||||
one library.
|
||||
|
||||
\index{check_licenses script@{\tt check\_licenses} script|)}
|
||||
|
||||
\ccIndexMainItemEnd{tools}
|
||||
|
|
@ -5,15 +5,11 @@
|
|||
|
||||
\documentclass{book}
|
||||
\usepackage{Manual/cgal_manual}
|
||||
\gdef\lciManualTitle{CGAL Developers Manual}
|
||||
\gdef\lciManualTitle{Writing your CGAL Manual}
|
||||
\lcHtml{\lcOneColumnToc}
|
||||
\lcTex{\usepackage{color}}
|
||||
\usepackage{nonlinkedpath}
|
||||
|
||||
% This will be the internal edition of the developers manual.
|
||||
\newcommand{\InternalOnly}[1]{#1}
|
||||
\newcommand{\ExternalOnly}[1]{}
|
||||
|
||||
\makeindex
|
||||
|
||||
\begin{document}
|
||||
|
|
@ -29,7 +25,7 @@
|
|||
\pagenumbering{arabic}
|
||||
\cgalColumnLayout
|
||||
|
||||
\input{Developers_manual/chapters}
|
||||
\input{Developers_manual/specification}
|
||||
|
||||
\bibliographystyle{alpha}
|
||||
\bibliography{Manual/cgal_manual,Manual/geom}
|
||||
|
|
@ -32,10 +32,6 @@
|
|||
|
||||
|
||||
#include <CGAL/kernel_assertions.h>
|
||||
#include <CGAL/Point_2.h>
|
||||
#include <CGAL/Segment_2.h>
|
||||
#include <CGAL/Line_2.h>
|
||||
#include <CGAL/Ray_2.h>
|
||||
#include <CGAL/enum.h>
|
||||
#include <CGAL/wmult.h>
|
||||
#include <CGAL/squared_distance_utils.h>
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
TODO_static_filters
|
||||
Makefile
|
||||
lazykernel.cpp
|
||||
|
||||
|
|
|
|||
|
|
@ -1,117 +0,0 @@
|
|||
#define CGAL_INTERSECT_WITH_ITERATORS_2 1
|
||||
#include <CGAL/Simple_cartesian.h>
|
||||
#include <CGAL/Gmpq.h>
|
||||
#include <CGAL/Lazy_kernel.h>
|
||||
#include <list>
|
||||
#include <cassert>
|
||||
#include "Cartesian_I.h"
|
||||
|
||||
|
||||
typedef CGAL::Cartesian_I<CGAL::Gmpq> SC;
|
||||
typedef CGAL::Lazy_kernel<SC, CGAL::Cartesian_I<CGAL::Interval_nt_advanced > > K;
|
||||
|
||||
typedef K::FT FT;
|
||||
typedef K::Point_2 Point_2;
|
||||
typedef K::Vector_2 Vector_2;
|
||||
typedef K::Segment_2 Segment_2;
|
||||
typedef K::Circle_2 Circle_2;
|
||||
|
||||
typedef CGAL::Bbox_2 Bbox_2;
|
||||
typedef CGAL::Object Object;
|
||||
|
||||
|
||||
int main()
|
||||
{
|
||||
CGAL::Lazy_exact_nt<CGAL::Gmpq> nt = 1;
|
||||
nt = nt + nt * nt;
|
||||
|
||||
K::Intersect_with_iterators_2 iwi;
|
||||
|
||||
CGAL::set_pretty_mode(std::cout);
|
||||
K::Intersect_with_iterators_2 intersect;
|
||||
|
||||
Segment_2 s1(Point_2(0,1), Point_2(2,1));
|
||||
Segment_2 s2(Point_2(1,0), Point_2(1,2));
|
||||
|
||||
std::list<Object> intersections;
|
||||
intersect(s1, s2, std::back_inserter(intersections));
|
||||
for(std::list<CGAL::Object>::iterator it = intersections.begin(); it != intersections.end(); it++){
|
||||
if(const Point_2 *ip = CGAL::object_cast<Point_2>(&*it)){
|
||||
std::cout << "intersection at " << *ip << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
FT ft = 3.1415;
|
||||
std::cout << "ft = " << ft << std::endl;
|
||||
|
||||
ft *= ft;
|
||||
std::cout << "ft^2 = " << ft << std::endl;
|
||||
std::cout << "ft^2.depth() = " << ft.depth() << std::endl;
|
||||
std::cout << "ft^2.exact() = " << ft.exact() << std::endl;
|
||||
Point_2 p(ft, 2.22);
|
||||
Point_2 q(9,9);
|
||||
|
||||
CGAL::Bbox_2 bb = p.bbox();
|
||||
|
||||
Segment_2 s(p,q);
|
||||
|
||||
Segment_2 s3(Point_2(0,1), Point_2(2,1));
|
||||
Segment_2 s4(Point_2(1,0), Point_2(1,2));
|
||||
|
||||
CGAL::Object o = intersection(s3,s4);
|
||||
|
||||
if(const Point_2 *rp = CGAL::object_cast<Point_2>(&o)){
|
||||
std::cout << "Intersection is a point:" << std::endl;
|
||||
std::cout << *rp;
|
||||
}
|
||||
|
||||
|
||||
Point_2 r = K::Construct_vertex_2()(s,0);
|
||||
assert(r == s.source());
|
||||
std::cout << r << std::endl;
|
||||
|
||||
|
||||
Point_2 mp = midpoint(p,q);
|
||||
|
||||
|
||||
FT rx = r.x();
|
||||
|
||||
std::cout << rx << std::endl;
|
||||
|
||||
|
||||
Vector_2 v1(1,1), v2(1,1);
|
||||
|
||||
v1 = p - q;
|
||||
|
||||
v1 = mp - CGAL::ORIGIN;
|
||||
|
||||
q = CGAL::ORIGIN + v1;
|
||||
|
||||
std::cout << q << std::endl;
|
||||
|
||||
if(v1 == v2){}
|
||||
|
||||
if(K::Compare_distance_2()(p,q,r)== CGAL::SMALLER)
|
||||
{
|
||||
std::cout << "smaller" << std::endl;
|
||||
}
|
||||
|
||||
Circle_2 circ(CGAL::ORIGIN, p, q);
|
||||
std::cout << "\nCircle:\n " << circ << std::endl;
|
||||
|
||||
Point_2 center = circ.center();
|
||||
FT sr = circ.squared_radius();
|
||||
std::cout << "\nCenter = " << center << "\nSquared radius = " << sr << std::endl;
|
||||
|
||||
sr += 7812;
|
||||
std::cout << "squared radius + 7812 = " << sr << std::endl;
|
||||
|
||||
|
||||
circ.exact();
|
||||
std::cout << "\nCircle after circ.exaxt():\n " << circ << std::endl;
|
||||
std::cout << "\nCenter = " << center << "\nSquared radius = " << sr << std::endl;
|
||||
|
||||
std::cout << "Done" << std::endl;
|
||||
|
||||
return 0;
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -31,10 +31,70 @@
|
|||
#include <CGAL/Filtered_kernel/Cartesian_coordinate_iterator_2.h>
|
||||
#include <CGAL/Filtered_kernel/Cartesian_coordinate_iterator_3.h>
|
||||
#include <CGAL/Lazy.h>
|
||||
|
||||
#include <boost/mpl/if.hpp>
|
||||
#include <boost/type_traits/remove_reference.hpp>
|
||||
#include <boost/type_traits/remove_cv.hpp>
|
||||
|
||||
|
||||
namespace CGAL {
|
||||
|
||||
namespace internal {
|
||||
|
||||
// SFINAE way to detect result_type typedefs.
|
||||
template<typename T>
|
||||
class Has_result_type_helper
|
||||
{
|
||||
typedef char one;
|
||||
typedef struct { char arr[2]; } two;
|
||||
|
||||
template<typename _Up>
|
||||
struct Wrapper {};
|
||||
|
||||
template<typename U>
|
||||
static one test(Wrapper<typename U::result_type>*);
|
||||
|
||||
template<typename U>
|
||||
static two test(...);
|
||||
|
||||
public:
|
||||
static const bool value = sizeof(test<T>(0)) == 1;
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
struct Has_result_type
|
||||
: boost::integral_constant< bool,
|
||||
Has_result_type_helper< typename boost::remove_cv<T>::type>::value>
|
||||
{};
|
||||
|
||||
template<bool has_result_type, typename F>
|
||||
struct Maybe_result_type {
|
||||
// This is incredibly evil. It relies on the fact that we always
|
||||
// have a type in the primary result template but it looks like the
|
||||
// only way out given the current design.
|
||||
typedef typename F::template result<void>::type type;
|
||||
};
|
||||
|
||||
template<typename F>
|
||||
struct Maybe_result_type<true, F> {
|
||||
typedef typename F::result_type type;
|
||||
};
|
||||
|
||||
// goes through the standard process of selecting the right
|
||||
// Lazy_something after the kind of the return type has been
|
||||
// determined
|
||||
template<typename T, typename AK, typename EK, typename Kernel, typename AKC, typename EKC>
|
||||
struct Standard_pick {
|
||||
typedef typename boost::remove_cv< typename boost::remove_reference< typename T::type >::type >::type T_;
|
||||
typedef typename boost::mpl::if_< boost::is_same< T_, typename AK::FT >,
|
||||
Lazy_construction_nt<Kernel, AKC, EKC>,
|
||||
typename boost::mpl::if_< boost::is_same< T_, Object >,
|
||||
Lazy_construction_object<Kernel, AKC, EKC>,
|
||||
Lazy_construction<Kernel, AKC, EKC> >::type
|
||||
>::type type;
|
||||
};
|
||||
} // internal
|
||||
|
||||
// Exact_kernel = exact kernel that will be made lazy
|
||||
// Kernel = lazy kernel
|
||||
|
||||
|
|
@ -46,6 +106,7 @@ class Lazy_kernel_generic_base
|
|||
// TODO : Static_filters_base too ? Check performance
|
||||
{
|
||||
public:
|
||||
|
||||
typedef AK_ Approximate_kernel;
|
||||
typedef EK_ Exact_kernel;
|
||||
typedef E2A_ E2A;
|
||||
|
|
@ -128,7 +189,6 @@ public:
|
|||
typedef Filtered_predicate<typename Exact_kernel::P, typename Approximate_kernel::P, C2E, C2F> P; \
|
||||
P Pf() const { return P(); }
|
||||
|
||||
|
||||
// We change the constructions.
|
||||
#ifdef CGAL_INTERSECT_WITH_ITERATORS_2
|
||||
#define CGAL_Kernel_cons(C, Cf) \
|
||||
|
|
@ -147,18 +207,15 @@ public:
|
|||
intersect_with_iterators_2_object)
|
||||
#else
|
||||
#define CGAL_Kernel_cons(C, Cf) \
|
||||
typedef typename boost::mpl::if_< boost::is_same<typename Approximate_kernel::C::result_type, typename Approximate_kernel::FT>,\
|
||||
Lazy_construction_nt<Kernel,typename Approximate_kernel::C, typename Exact_kernel::C>,\
|
||||
typename boost::mpl::if_<boost::is_same<typename Approximate_kernel::C::result_type, Object >,\
|
||||
Lazy_construction_object<Kernel,typename Approximate_kernel::C, typename Exact_kernel::C>,\
|
||||
Lazy_construction<Kernel,typename Approximate_kernel::C, typename Exact_kernel::C> >::type >::type C; \
|
||||
C Cf() const { return C(); }
|
||||
typedef typename internal::Standard_pick< internal::Maybe_result_type< internal::Has_result_type< typename Approximate_kernel::C >::value, \
|
||||
typename Approximate_kernel::C >, \
|
||||
Approximate_kernel, Exact_kernel, Kernel, typename Approximate_kernel::C, typename Exact_kernel::C \
|
||||
>::type C; \
|
||||
C Cf() const { return C(); }
|
||||
|
||||
#endif //CGAL_INTERSECT_WITH_ITERATORS_2
|
||||
|
||||
|
||||
#include <CGAL/Kernel/interface_macros.h>
|
||||
|
||||
};
|
||||
|
||||
template < typename EK_, typename AK_, typename E2A_, typename Kernel_ >
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ int main()
|
|||
#include <fstream>
|
||||
#include <unistd.h> // for sleep()
|
||||
|
||||
#include <CGAL/Triangulation_euclidean_traits_xy_3.h>
|
||||
#include <CGAL/Projection_traits_xy_3.h>
|
||||
|
||||
#include <CGAL/Delaunay_triangulation_2.h>
|
||||
#include <CGAL/Delaunay_triangulation_3.h>
|
||||
|
|
@ -50,7 +50,7 @@ int main()
|
|||
typedef CGAL::Cartesian<double> K;
|
||||
|
||||
typedef K::Point_2 Point2;
|
||||
typedef CGAL::Triangulation_euclidean_traits_xy_3<K> Gt3;
|
||||
typedef CGAL::Projection_traits_xy_3<K> Gt3;
|
||||
typedef Gt3::Point Point3;
|
||||
|
||||
typedef CGAL::Delaunay_triangulation_2<K> Delaunay;
|
||||
|
|
|
|||
|
|
@ -145,7 +145,8 @@ void Geomview_stream::setup_geomview(const char *machine, const char *login)
|
|||
*this << "(echo \"CGAL-3D\")";
|
||||
|
||||
char inbuf[10];
|
||||
(void)::read(in, inbuf, 7);
|
||||
std::size_t retread=::read(in, inbuf, 7);
|
||||
(void)retread;
|
||||
|
||||
if (std::strncmp(inbuf, "started", 7) == 0)
|
||||
{
|
||||
|
|
@ -154,7 +155,8 @@ void Geomview_stream::setup_geomview(const char *machine, const char *login)
|
|||
// << "compulsory anymore, since CGAL 2.3" << std::endl;
|
||||
|
||||
// Then the next one is supposed to be CGAL-3D.
|
||||
(void)::read(in, inbuf, 7);
|
||||
retread=::read(in, inbuf, 7);
|
||||
(void)retread;
|
||||
if (std::strncmp(inbuf, "CGAL-3D", 7) != 0)
|
||||
std::cerr << "Unexpected string from Geomview !" << std::endl;
|
||||
}
|
||||
|
|
@ -172,7 +174,8 @@ void Geomview_stream::setup_geomview(const char *machine, const char *login)
|
|||
// Old original version
|
||||
char inbuf[10];
|
||||
// Waits for "started" from the .geomview file.
|
||||
(void)::read(in, inbuf, 7);
|
||||
retread=::read(in, inbuf, 7);
|
||||
(void)retread;
|
||||
#endif
|
||||
|
||||
std::cout << "done." << std::endl;
|
||||
|
|
@ -230,7 +233,8 @@ Geomview_stream::operator<<(int i)
|
|||
// we write raw binary data to the stream.
|
||||
int num = i;
|
||||
I_swap_to_big_endian(num);
|
||||
(void)::write(out, (char*)&num, sizeof(num));
|
||||
std::size_t retwrite=::write(out, (char*)&num, sizeof(num));
|
||||
(void)retwrite;
|
||||
trace(i);
|
||||
} else {
|
||||
// transform the int in a character sequence and put whitespace around
|
||||
|
|
@ -250,7 +254,8 @@ Geomview_stream::operator<<(unsigned int i)
|
|||
// we write raw binary data to the stream.
|
||||
unsigned int num = i;
|
||||
I_swap_to_big_endian(num);
|
||||
(void)::write(out, (char*)&num, sizeof(num));
|
||||
std::size_t retwrite=::write(out, (char*)&num, sizeof(num));
|
||||
(void)retwrite;
|
||||
trace(i);
|
||||
} else {
|
||||
// transform the int in a character sequence and put whitespace around
|
||||
|
|
@ -281,7 +286,8 @@ Geomview_stream::operator<<(double d)
|
|||
if (get_binary_mode()) {
|
||||
float num = d;
|
||||
I_swap_to_big_endian(num);
|
||||
(void)::write(out, (char*)&num, sizeof(num));
|
||||
std::size_t retwrite= ::write(out, (char*)&num, sizeof(num));
|
||||
(void)retwrite;
|
||||
trace(f);
|
||||
} else {
|
||||
// 'copy' the float in a string and append a blank
|
||||
|
|
@ -468,13 +474,15 @@ Geomview_stream::operator>>(char *expr)
|
|||
{
|
||||
// Skip whitespaces
|
||||
do {
|
||||
(void)::read(in, expr, 1);
|
||||
std::size_t retread=::read(in, expr, 1);
|
||||
(void)retread;
|
||||
} while (expr[0] != '(');
|
||||
|
||||
int pcount = 1;
|
||||
int i = 1;
|
||||
while (1) {
|
||||
(void)::read(in, &expr[i], 1);
|
||||
std::size_t retread=::read(in, &expr[i], 1);
|
||||
(void)retread;
|
||||
if (expr[i] == ')'){
|
||||
pcount--;
|
||||
} else if (expr[i] == '('){
|
||||
|
|
|
|||
|
|
@ -254,12 +254,6 @@ One can later resize the data structure with further calls to the
|
|||
\ccc{reserve()} member function, but only if the data structure is
|
||||
in a consistent, i.e., {\em valid}, state.
|
||||
|
||||
Unfortunately this example has also to expose the workaround necessary
|
||||
for compilers that do not support templates as template parameters.
|
||||
The workaround is necessary if the symbolic constant
|
||||
\verb|CGAL_CFG_NO_TMPL_IN_TMPL_PARAM| is set. It uses a member
|
||||
template instead of the class template.
|
||||
|
||||
\ccIncludeExampleCode{HalfedgeDS/hds_prog_vector.cpp}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -21,16 +21,6 @@
|
|||
\ccCreationVariable{hds}
|
||||
\ccTagFullDeclarations
|
||||
|
||||
% +-----------------------------------+
|
||||
\ccHeading{Release Note}
|
||||
|
||||
Beginning with \cgal\ R2.3, this package has a new design. The old
|
||||
design is still available for backwards compatibility and to support
|
||||
older compiler, such as MSVC++6.0. However its use is deprecated and
|
||||
the manual pages are not converted into this new manual
|
||||
format. Instead, see its old documentation in the manual of
|
||||
deprecated packages. The two designs are not interchangeable.
|
||||
|
||||
% +-----------------------------------+
|
||||
\ccDefinition
|
||||
|
||||
|
|
@ -500,40 +490,6 @@ a halfedge. There is no automatic update required.
|
|||
\ccRefIdfierPage{CGAL::HalfedgeDS_decorator<HDS>}\\
|
||||
\ccRefIdfierPage{CGAL::HalfedgeDS_const_decorator<HDS>}
|
||||
|
||||
% +-----------------------------------+
|
||||
\ccImplementation
|
||||
|
||||
Classes parameterized with a halfedge data structure, such as
|
||||
\ccc{CGAL::Polyhedron_3}, need to declare a class template as one of its
|
||||
template parameters for the \ccRefName. For compilers not supporting
|
||||
this (i.e.~the flag \ccc{CGAL_CFG_NO_TMPL_IN_TMPL_PARAM} is set), the
|
||||
following workaround is required, which defines a \ccRefName\ as a
|
||||
normal class that contains a member class template named \ccc{HDS},
|
||||
which is the actual halfedge data structure as defined here. The
|
||||
following program fragment illustrates this workaround:
|
||||
|
||||
\begin{ccExampleCode}
|
||||
#ifndef CGAL_CFG_NO_TMPL_IN_TMPL_PARAM
|
||||
template <class Traits, class Items, class Alloc>
|
||||
class HalfedgeDS {
|
||||
public:
|
||||
typedef HalfedgeDS<Traits,Items,Alloc> Self;
|
||||
HalfedgeDS_vector(); // constructors
|
||||
#else
|
||||
struct HalfedgeDS {
|
||||
template <class Traits, class Items, class Alloc>
|
||||
class HDS {
|
||||
public:
|
||||
typedef HDS<Traits,Items,Alloc> Self;
|
||||
HDS(); // constructors
|
||||
#endif
|
||||
// ... further member functions. Self denotes the HalfedgeDS.
|
||||
};
|
||||
#ifdef CGAL_CFG_NO_TMPL_IN_TMPL_PARAM
|
||||
};
|
||||
#endif
|
||||
\end{ccExampleCode}
|
||||
|
||||
\ccTagDefaults
|
||||
|
||||
\end{ccRefConcept}
|
||||
|
|
|
|||
|
|
@ -61,7 +61,6 @@ removal.
|
|||
\ccRefIdfierPage{CGAL::HalfedgeDS_decorator<HDS>}\\
|
||||
\ccRefIdfierPage{CGAL::HalfedgeDS_const_decorator<HDS>}
|
||||
|
||||
|
||||
\ccImplementation
|
||||
|
||||
Currently, \ccRefName\ is derived from \ccc{CGAL::HalfedgeDS_list<Traits>}.
|
||||
|
|
@ -70,25 +69,6 @@ $n$ the total number of vertices, halfedges, and faces. The former
|
|||
suboptimal implementation with an $O(n \log n)$ runtime has been replaced
|
||||
with a faster implementation based on hashing for the pointer lookup.
|
||||
|
||||
Due to a workaround for the flag \ccc{CGAL_CFG_NO_TMPL_IN_TMPL_PARAM},
|
||||
a halfedge data structure cannot be instantiated directly. For the
|
||||
\ccRefName\ a macro simplifies its direct use. However, when using a
|
||||
halfedge data structure as an argument for another class template,
|
||||
the class template name \ccc{HalfedgeDS_default} must be used, not
|
||||
the macro.
|
||||
|
||||
\begin{ccExampleCode}
|
||||
// The macro definition.
|
||||
#ifndef CGAL_CFG_NO_TMPL_IN_TMPL_PARAM
|
||||
#define CGAL_HALFEDGEDS_DEFAULT ::CGAL::HalfedgeDS_default
|
||||
#else
|
||||
#define CGAL_HALFEDGEDS_DEFAULT ::CGAL::HalfedgeDS_default::HDS
|
||||
#endif
|
||||
|
||||
// The direct instantiation of the default HalfedgeDS given a Traits class.
|
||||
typedef CGAL_HALFEDGEDS_DEFAULT<Traits> HDS;
|
||||
\end{ccExampleCode}
|
||||
|
||||
\end{ccRefClass}
|
||||
|
||||
% +------------------------------------------------------------------------+
|
||||
|
|
|
|||
|
|
@ -31,8 +31,6 @@
|
|||
|
||||
namespace CGAL {
|
||||
|
||||
#ifndef CGAL_CFG_NO_TMPL_IN_TMPL_PARAM
|
||||
|
||||
template <class Traits_, class HalfedgeDSItems = HalfedgeDS_items_2,
|
||||
class Alloc = CGAL_ALLOCATOR(int)>
|
||||
class HalfedgeDS_default
|
||||
|
|
@ -47,26 +45,6 @@ public:
|
|||
};
|
||||
#define CGAL_HALFEDGEDS_DEFAULT ::CGAL::HalfedgeDS_default
|
||||
|
||||
#else // CGAL_CFG_NO_TMPL_IN_TMPL_PARAM //
|
||||
|
||||
struct HalfedgeDS_default {
|
||||
template <class Traits_, class HalfedgeDSItems = HalfedgeDS_items_2,
|
||||
class Alloc = CGAL_ALLOCATOR(int)>
|
||||
class HDS : public HalfedgeDS_list::HDS<Traits_, HalfedgeDSItems, Alloc> {
|
||||
public:
|
||||
typedef Traits_ Traits;
|
||||
typedef HalfedgeDS_list::HDS<Traits_, HalfedgeDSItems, Alloc> D_S;
|
||||
typedef typename D_S::size_type size_type;
|
||||
HDS() {}
|
||||
HDS( size_type v, size_type h, size_type f)
|
||||
: HalfedgeDS_list::HDS<Traits_, HalfedgeDSItems, Alloc>(v,h,f) {}
|
||||
};
|
||||
};
|
||||
|
||||
#define CGAL_HALFEDGEDS_DEFAULT ::CGAL::HalfedgeDS_default::HDS
|
||||
|
||||
#endif // CGAL_CFG_NO_TMPL_IN_TMPL_PARAM //
|
||||
|
||||
} //namespace CGAL
|
||||
#endif // CGAL_HALFEDGEDS_DEFAULT_H //
|
||||
// EOF //
|
||||
|
|
|
|||
|
|
@ -181,21 +181,12 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
#ifndef CGAL_CFG_NO_TMPL_IN_TMPL_PARAM
|
||||
template < class Traits_, class HalfedgeDSItems,
|
||||
class Alloc = CGAL_ALLOCATOR(int)>
|
||||
class HalfedgeDS_list
|
||||
: public HalfedgeDS_list_types<Traits_, HalfedgeDSItems, Alloc> {
|
||||
public:
|
||||
typedef HalfedgeDS_list<Traits_, HalfedgeDSItems, Alloc> Self;
|
||||
#else
|
||||
struct HalfedgeDS_list {
|
||||
template < class Traits_, class HalfedgeDSItems,
|
||||
class Alloc = CGAL_ALLOCATOR(int)>
|
||||
class HDS : public HalfedgeDS_list_types<Traits_, HalfedgeDSItems, Alloc> {
|
||||
public:
|
||||
typedef HDS<Traits_, HalfedgeDSItems, Alloc> Self;
|
||||
#endif
|
||||
public:
|
||||
typedef HalfedgeDS_list_types<Traits_, HalfedgeDSItems, Alloc> Types;
|
||||
typedef typename Types::Traits Traits;
|
||||
|
|
@ -374,7 +365,6 @@ private:
|
|||
}
|
||||
|
||||
public:
|
||||
#ifndef CGAL_CFG_NO_TMPL_IN_TMPL_PARAM
|
||||
HalfedgeDS_list()
|
||||
: nb_border_halfedges(0), nb_border_edges(0) {}
|
||||
// the empty polyhedron `P'.
|
||||
|
|
@ -389,13 +379,6 @@ public:
|
|||
~HalfedgeDS_list() { clear(); }
|
||||
|
||||
HalfedgeDS_list( const Self& hds)
|
||||
#else
|
||||
HDS() : nb_border_halfedges(0), nb_border_edges(0) {}
|
||||
HDS( size_type, size_type, size_type)
|
||||
: nb_border_halfedges(0), nb_border_edges(0) {}
|
||||
~HDS() { clear(); }
|
||||
HDS( const Self& hds)
|
||||
#endif // CGAL_CFG_NO_TMPL_IN_TMPL_PARAM //
|
||||
: vertices( hds.vertices),
|
||||
//halfedges( hds.halfedges),
|
||||
faces( hds.faces),
|
||||
|
|
@ -688,9 +671,6 @@ public:
|
|||
border_halfedges = i;
|
||||
}
|
||||
};
|
||||
#ifdef CGAL_CFG_NO_TMPL_IN_TMPL_PARAM
|
||||
};
|
||||
#endif
|
||||
|
||||
|
||||
// #ifndef CGAL_CFG_NO_TMPL_IN_TMPL_PARAM
|
||||
|
|
|
|||
|
|
@ -143,21 +143,12 @@ public:
|
|||
};
|
||||
|
||||
|
||||
#ifndef CGAL_CFG_NO_TMPL_IN_TMPL_PARAM
|
||||
template < class Traits_, class HalfedgeDSItems,
|
||||
class Alloc = CGAL_ALLOCATOR(int)>
|
||||
class HalfedgeDS_vector
|
||||
: public HalfedgeDS_vector_types<Traits_, HalfedgeDSItems, Alloc> {
|
||||
public:
|
||||
typedef HalfedgeDS_vector<Traits_,HalfedgeDSItems,Alloc> Self;
|
||||
#else
|
||||
struct HalfedgeDS_vector {
|
||||
template < class Traits_, class HalfedgeDSItems,
|
||||
class Alloc = CGAL_ALLOCATOR(int)>
|
||||
class HDS : public HalfedgeDS_vector_types<Traits_, HalfedgeDSItems, Alloc> {
|
||||
public:
|
||||
typedef HDS<Traits_,HalfedgeDSItems,Alloc> Self;
|
||||
#endif
|
||||
typedef HalfedgeDS_vector_types<Traits_, HalfedgeDSItems, Alloc> Types;
|
||||
typedef typename Types::Traits Traits;
|
||||
typedef typename Types::Items Items;
|
||||
|
|
@ -292,7 +283,6 @@ private:
|
|||
|
||||
public:
|
||||
|
||||
#ifndef CGAL_CFG_NO_TMPL_IN_TMPL_PARAM
|
||||
HalfedgeDS_vector()
|
||||
: nb_border_halfedges(0), nb_border_edges(0) {}
|
||||
// empty halfedge data structure.
|
||||
|
|
@ -308,16 +298,6 @@ public:
|
|||
}
|
||||
|
||||
HalfedgeDS_vector( const Self& hds)
|
||||
#else
|
||||
HDS() : nb_border_halfedges(0), nb_border_edges(0) {}
|
||||
HDS( size_type v, size_type h, size_type f)
|
||||
: nb_border_halfedges(0), nb_border_edges(0) {
|
||||
vertices.reserve(v);
|
||||
halfedges.reserve(h);
|
||||
faces.reserve(f);
|
||||
}
|
||||
HDS( const Self& hds)
|
||||
#endif // CGAL_CFG_NO_TMPL_IN_TMPL_PARAM //
|
||||
: vertices( hds.vertices),
|
||||
halfedges( hds.halfedges),
|
||||
faces( hds.faces),
|
||||
|
|
@ -669,9 +649,6 @@ public:
|
|||
}
|
||||
}
|
||||
};
|
||||
#ifdef CGAL_CFG_NO_TMPL_IN_TMPL_PARAM
|
||||
};
|
||||
#endif
|
||||
|
||||
|
||||
} //namespace CGAL
|
||||
|
|
|
|||
|
|
@ -108,13 +108,8 @@ void test_HalfedgeDS_default() {
|
|||
void test_HalfedgeDS_vector() {
|
||||
// Instantiation of the halfedge data structure using vector
|
||||
// and maximal bases for polyhedral surfaces.
|
||||
#ifndef CGAL_CFG_NO_TMPL_IN_TMPL_PARAM
|
||||
typedef CGAL::HalfedgeDS_vector< Dummy_traits_3,
|
||||
CGAL::Polyhedron_items_3> HDS;
|
||||
#else
|
||||
typedef CGAL::HalfedgeDS_vector::HDS< Dummy_traits_3,
|
||||
CGAL::Polyhedron_items_3> HDS;
|
||||
#endif
|
||||
typedef HDS::Halfedge Halfedge;
|
||||
typedef Halfedge::Base HBase;
|
||||
typedef HDS::Face_handle Face_handle;
|
||||
|
|
@ -152,13 +147,8 @@ void test_HalfedgeDS_vector() {
|
|||
void test_HalfedgeDS_vector_min() {
|
||||
// Instantiation of the halfedge data structure using vector
|
||||
// and minimal bases as for an undirected graph.
|
||||
#ifndef CGAL_CFG_NO_TMPL_IN_TMPL_PARAM
|
||||
typedef CGAL::HalfedgeDS_vector< Empty_traits,
|
||||
CGAL::HalfedgeDS_min_items> HDS;
|
||||
#else
|
||||
typedef CGAL::HalfedgeDS_vector::HDS< Empty_traits,
|
||||
CGAL::HalfedgeDS_min_items> HDS;
|
||||
#endif
|
||||
typedef HDS::Halfedge Halfedge;
|
||||
typedef Halfedge::Base HBase;
|
||||
|
||||
|
|
|
|||
|
|
@ -150,13 +150,8 @@ struct Dummy_traits_3 {
|
|||
void test_HalfedgeDS_decorator2() {
|
||||
// Instantiation of the halfedge data structure using vector
|
||||
// with max-bases for a polyhedral surface.
|
||||
#ifndef CGAL_CFG_NO_TMPL_IN_TMPL_PARAM
|
||||
typedef CGAL::HalfedgeDS_vector< Dummy_traits_3,
|
||||
CGAL::Polyhedron_items_3> HDS;
|
||||
#else
|
||||
typedef CGAL::HalfedgeDS_vector::HDS< Dummy_traits_3,
|
||||
CGAL::Polyhedron_items_3> HDS;
|
||||
#endif
|
||||
typedef CGAL::HalfedgeDS_decorator<HDS> Decorator;
|
||||
typedef HDS::Halfedge_handle Halfedge_handle;
|
||||
typedef HDS::Face_handle Face_handle;
|
||||
|
|
|
|||
|
|
@ -1560,15 +1560,15 @@ namespace HomogeneousKernelFunctors {
|
|||
};
|
||||
|
||||
template <typename K>
|
||||
class Compute_dx_2 : public Has_qrt
|
||||
class Compute_dx_2
|
||||
{
|
||||
typedef typename K::RT RT;
|
||||
typedef typename K::Direction_2 Direction_2;
|
||||
|
||||
public:
|
||||
typedef RT result_type;
|
||||
typedef const RT& result_type;
|
||||
|
||||
const result_type &
|
||||
result_type
|
||||
operator()(const Direction_2& d) const
|
||||
{
|
||||
return d.rep().dx();
|
||||
|
|
@ -1576,15 +1576,15 @@ namespace HomogeneousKernelFunctors {
|
|||
};
|
||||
|
||||
template <typename K>
|
||||
class Compute_dx_3 : public Has_qrt
|
||||
class Compute_dx_3
|
||||
{
|
||||
typedef typename K::RT RT;
|
||||
typedef typename K::Direction_3 Direction_3;
|
||||
|
||||
public:
|
||||
typedef RT result_type;
|
||||
typedef const RT& result_type;
|
||||
|
||||
const result_type &
|
||||
result_type
|
||||
operator()(const Direction_3& d) const
|
||||
{
|
||||
return d.rep().dx();
|
||||
|
|
@ -1592,15 +1592,15 @@ namespace HomogeneousKernelFunctors {
|
|||
};
|
||||
|
||||
template <typename K>
|
||||
class Compute_dy_2 : public Has_qrt
|
||||
class Compute_dy_2
|
||||
{
|
||||
typedef typename K::RT RT;
|
||||
typedef typename K::Direction_2 Direction_2;
|
||||
|
||||
public:
|
||||
typedef RT result_type;
|
||||
typedef const RT& result_type;
|
||||
|
||||
const result_type &
|
||||
result_type
|
||||
operator()(const Direction_2& d) const
|
||||
{
|
||||
return d.rep().dy();
|
||||
|
|
@ -1608,15 +1608,15 @@ namespace HomogeneousKernelFunctors {
|
|||
};
|
||||
|
||||
template <typename K>
|
||||
class Compute_dy_3 : public Has_qrt
|
||||
class Compute_dy_3
|
||||
{
|
||||
typedef typename K::RT RT;
|
||||
typedef typename K::Direction_3 Direction_3;
|
||||
|
||||
public:
|
||||
typedef RT result_type;
|
||||
typedef const RT& result_type;
|
||||
|
||||
const result_type &
|
||||
result_type
|
||||
operator()(const Direction_3& d) const
|
||||
{
|
||||
return d.rep().dy();
|
||||
|
|
@ -1624,15 +1624,15 @@ namespace HomogeneousKernelFunctors {
|
|||
};
|
||||
|
||||
template <typename K>
|
||||
class Compute_dz_3 : public Has_qrt
|
||||
class Compute_dz_3
|
||||
{
|
||||
typedef typename K::RT RT;
|
||||
typedef typename K::Direction_3 Direction_3;
|
||||
|
||||
public:
|
||||
typedef RT result_type;
|
||||
typedef const RT& result_type;
|
||||
|
||||
const result_type &
|
||||
result_type
|
||||
operator()(const Direction_3& d) const
|
||||
{
|
||||
return d.rep().dz();
|
||||
|
|
@ -1640,7 +1640,7 @@ namespace HomogeneousKernelFunctors {
|
|||
};
|
||||
|
||||
template <typename K>
|
||||
class Compute_hx_2 : public Has_qrt
|
||||
class Compute_hx_2
|
||||
{
|
||||
typedef typename K::FT FT;
|
||||
typedef typename K::RT RT;
|
||||
|
|
@ -1648,15 +1648,15 @@ namespace HomogeneousKernelFunctors {
|
|||
typedef typename K::Vector_2 Vector_2;
|
||||
|
||||
public:
|
||||
typedef RT result_type;
|
||||
typedef const RT& result_type;
|
||||
|
||||
const result_type &
|
||||
result_type
|
||||
operator()(const Point_2& p) const
|
||||
{
|
||||
return p.rep().hx();
|
||||
}
|
||||
|
||||
const result_type &
|
||||
result_type
|
||||
operator()(const Vector_2& v) const
|
||||
{
|
||||
return v.rep().hx();
|
||||
|
|
@ -1664,7 +1664,7 @@ namespace HomogeneousKernelFunctors {
|
|||
};
|
||||
|
||||
template <typename K>
|
||||
class Compute_hx_3 : public Has_qrt
|
||||
class Compute_hx_3
|
||||
{
|
||||
typedef typename K::FT FT;
|
||||
typedef typename K::RT RT;
|
||||
|
|
@ -1672,15 +1672,15 @@ namespace HomogeneousKernelFunctors {
|
|||
typedef typename K::Vector_3 Vector_3;
|
||||
|
||||
public:
|
||||
typedef RT result_type;
|
||||
typedef const RT& result_type;
|
||||
|
||||
const result_type &
|
||||
result_type
|
||||
operator()(const Point_3& p) const
|
||||
{
|
||||
return p.rep().hx();
|
||||
}
|
||||
|
||||
const result_type &
|
||||
result_type
|
||||
operator()(const Vector_3& v) const
|
||||
{
|
||||
return v.rep().hx();
|
||||
|
|
@ -1688,7 +1688,7 @@ namespace HomogeneousKernelFunctors {
|
|||
};
|
||||
|
||||
template <typename K>
|
||||
class Compute_hy_2 : public Has_qrt
|
||||
class Compute_hy_2
|
||||
{
|
||||
typedef typename K::FT FT;
|
||||
typedef typename K::RT RT;
|
||||
|
|
@ -1696,15 +1696,15 @@ namespace HomogeneousKernelFunctors {
|
|||
typedef typename K::Vector_2 Vector_2;
|
||||
|
||||
public:
|
||||
typedef RT result_type;
|
||||
typedef const RT& result_type;
|
||||
|
||||
const result_type &
|
||||
result_type
|
||||
operator()(const Point_2& p) const
|
||||
{
|
||||
return p.rep().hy();
|
||||
}
|
||||
|
||||
const result_type &
|
||||
result_type
|
||||
operator()(const Vector_2& v) const
|
||||
{
|
||||
return v.rep().hy();
|
||||
|
|
@ -1712,7 +1712,7 @@ namespace HomogeneousKernelFunctors {
|
|||
};
|
||||
|
||||
template <typename K>
|
||||
class Compute_hy_3 : public Has_qrt
|
||||
class Compute_hy_3
|
||||
{
|
||||
typedef typename K::FT FT;
|
||||
typedef typename K::RT RT;
|
||||
|
|
@ -1720,15 +1720,15 @@ namespace HomogeneousKernelFunctors {
|
|||
typedef typename K::Vector_3 Vector_3;
|
||||
|
||||
public:
|
||||
typedef RT result_type;
|
||||
typedef const RT & result_type;
|
||||
|
||||
const result_type &
|
||||
result_type
|
||||
operator()(const Point_3& p) const
|
||||
{
|
||||
return p.rep().hy();
|
||||
}
|
||||
|
||||
const result_type &
|
||||
result_type
|
||||
operator()(const Vector_3& v) const
|
||||
{
|
||||
return v.rep().hy();
|
||||
|
|
@ -1736,7 +1736,7 @@ namespace HomogeneousKernelFunctors {
|
|||
};
|
||||
|
||||
template <typename K>
|
||||
class Compute_hz_3 : public Has_qrt
|
||||
class Compute_hz_3
|
||||
{
|
||||
typedef typename K::FT FT;
|
||||
typedef typename K::RT RT;
|
||||
|
|
@ -1744,15 +1744,15 @@ namespace HomogeneousKernelFunctors {
|
|||
typedef typename K::Vector_3 Vector_3;
|
||||
|
||||
public:
|
||||
typedef RT result_type;
|
||||
typedef const RT& result_type;
|
||||
|
||||
const result_type &
|
||||
result_type
|
||||
operator()(const Point_3& p) const
|
||||
{
|
||||
return p.rep().hz();
|
||||
}
|
||||
|
||||
const result_type &
|
||||
result_type
|
||||
operator()(const Vector_3& v) const
|
||||
{
|
||||
return v.rep().hz();
|
||||
|
|
@ -1760,7 +1760,7 @@ namespace HomogeneousKernelFunctors {
|
|||
};
|
||||
|
||||
template <typename K>
|
||||
class Compute_hw_2 : public Has_qrt
|
||||
class Compute_hw_2
|
||||
{
|
||||
typedef typename K::FT FT;
|
||||
typedef typename K::RT RT;
|
||||
|
|
@ -1768,15 +1768,15 @@ namespace HomogeneousKernelFunctors {
|
|||
typedef typename K::Vector_2 Vector_2;
|
||||
|
||||
public:
|
||||
typedef RT result_type;
|
||||
typedef const RT& result_type;
|
||||
|
||||
const result_type &
|
||||
result_type
|
||||
operator()(const Point_2& p) const
|
||||
{
|
||||
return p.rep().hw();
|
||||
}
|
||||
|
||||
const result_type &
|
||||
result_type
|
||||
operator()(const Vector_2& v) const
|
||||
{
|
||||
return v.rep().hw();
|
||||
|
|
@ -1784,7 +1784,7 @@ namespace HomogeneousKernelFunctors {
|
|||
};
|
||||
|
||||
template <typename K>
|
||||
class Compute_hw_3 : public Has_qrt
|
||||
class Compute_hw_3
|
||||
{
|
||||
typedef typename K::FT FT;
|
||||
typedef typename K::RT RT;
|
||||
|
|
@ -1792,15 +1792,15 @@ namespace HomogeneousKernelFunctors {
|
|||
typedef typename K::Vector_3 Vector_3;
|
||||
|
||||
public:
|
||||
typedef RT result_type;
|
||||
typedef const RT& result_type;
|
||||
|
||||
const result_type &
|
||||
result_type
|
||||
operator()(const Point_3& p) const
|
||||
{
|
||||
return p.rep().hw();
|
||||
}
|
||||
|
||||
const result_type &
|
||||
result_type
|
||||
operator()(const Vector_3& v) const
|
||||
{
|
||||
return v.rep().hw();
|
||||
|
|
@ -3517,7 +3517,15 @@ namespace HomogeneousKernelFunctors {
|
|||
typedef typename K::Iso_rectangle_2 Iso_rectangle_2;
|
||||
typedef typename K::Triangle_2 Triangle_2;
|
||||
public:
|
||||
typedef Point_2 result_type;
|
||||
template<typename>
|
||||
struct result {
|
||||
typedef const Point_2& type;
|
||||
};
|
||||
|
||||
template<typename F>
|
||||
struct result<F(Iso_rectangle_2, int)> {
|
||||
typedef Point_2 type;
|
||||
};
|
||||
|
||||
const Point_2 &
|
||||
operator()( const Segment_2& s, int i) const
|
||||
|
|
@ -3527,7 +3535,7 @@ namespace HomogeneousKernelFunctors {
|
|||
operator()( const Triangle_2& t, int i) const
|
||||
{ return t.rep().vertex(i); }
|
||||
|
||||
const Point_2
|
||||
Point_2
|
||||
operator()( const Iso_rectangle_2& r, int i) const
|
||||
{
|
||||
switch (i%4) {
|
||||
|
|
@ -3547,22 +3555,6 @@ namespace HomogeneousKernelFunctors {
|
|||
} //namespace HomogeneousKernelFunctors
|
||||
|
||||
|
||||
#ifndef CGAL_CFG_DONT_OVERLOAD_TOO_MUCH
|
||||
template < typename K>
|
||||
struct Qualified_result_of<HomogeneousKernelFunctors::Construct_vertex_2<K>, typename K::Segment_2, int >
|
||||
{
|
||||
typedef typename K::Point_2 const & type;
|
||||
};
|
||||
|
||||
template < typename K>
|
||||
struct Qualified_result_of<HomogeneousKernelFunctors::Construct_vertex_2<K>, typename K::Triangle_2, int >
|
||||
{
|
||||
typedef typename K::Point_2 const & type;
|
||||
};
|
||||
#endif
|
||||
|
||||
// For Iso_rectangle the non specialized template will do the right thing, namely return a copy of a point
|
||||
|
||||
namespace HomogeneousKernelFunctors {
|
||||
|
||||
template <typename K>
|
||||
|
|
|
|||
|
|
@ -339,7 +339,26 @@ if ( RUNNING_CGAL_AUTO_TEST )
|
|||
CGAL_PDB_BINARY_DIR
|
||||
CGAL_PDB_SOURCE_DIR
|
||||
CGAL_Qt3_SOURCE_DIR
|
||||
CGAL_BINARY_DIR
|
||||
CGAL_SOURCE_DIR)
|
||||
# message("List of cache variables:")
|
||||
|
||||
## The following lines removes nasty loaded cache values. We do not
|
||||
## want that the current build tree depends on binaries that were
|
||||
## build in the reference build tree.
|
||||
get_property(cache_variables DIRECTORY PROPERTY CACHE_VARIABLES)
|
||||
foreach(var ${cache_variables})
|
||||
# get_property(var_value CACHE ${var} PROPERTY VALUE)
|
||||
# get_property(type CACHE ${var} PROPERTY TYPE)
|
||||
string(REGEX MATCH "^CGAL(_.*_(DEPENDS|BINARY_DIR)|_.*LIBRARY)$" var_name_matches ${var})
|
||||
if(var_name_matches)
|
||||
unset(${var} CACHE)
|
||||
# else()
|
||||
# message("${var}:${var_type}=${var_value}")
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ are for the most common use cases, and cover the command line tools.
|
|||
For further information, or in case of problems, please see the
|
||||
detailed installation instructions, which can be found in this
|
||||
distribution in the file ./doc_html/index.html or on the CGAL website
|
||||
http://www.cgal.org/Manual/beta/doc_html/cgal_manual/Installation/Chapter_main.html
|
||||
http://www.cgal.org/Manual/latest/doc_html/cgal_manual/Installation/Chapter_main.html
|
||||
|
||||
The documentation of CGAL is available in PDF and HTML formats.
|
||||
It is not bundled with the software but can be downloaded separately
|
||||
|
|
|
|||
|
|
@ -100,6 +100,85 @@ David A. Wheeler's 'SLOCCount'</a>, restricted to the <code>include/CGAL/</code>
|
|||
|
||||
<HR>
|
||||
|
||||
<h2 id="release4.1">Release 4.1 </h2>
|
||||
<DIV>
|
||||
<p> Release date: </p>
|
||||
|
||||
<h3>2D Convex Hulls and Extreme Points </h3>
|
||||
<ul>
|
||||
<li>Speed up the preprocessing stage of the Akl-Toussaint implementation (used by the free function <code>convex_hull_2</code> when forward iterators are provided as input).</li>
|
||||
</ul>
|
||||
|
||||
<h3>Combinatorial Maps</h3>
|
||||
<ul>
|
||||
<li>Minor bugfix; replace some functors by methods.</li>
|
||||
</ul>
|
||||
|
||||
<h3>Linear Cell Complex</h3>
|
||||
<ul>
|
||||
<li>Improve the demo: add a widget showing all the volumes and an operation to create a Menger sponge.</li>
|
||||
</ul>
|
||||
|
||||
<h3>Kernels</h3>
|
||||
<ul>
|
||||
<li>All Kernel functors now support the result_of protocol.</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h2 id="release4.0.1">Release 4.0.1</h2>
|
||||
|
||||
<DIV>
|
||||
<p>Release date: April 2012</p>
|
||||
|
||||
<p>
|
||||
This is a bug fix release. The following has been changed
|
||||
since CGAL-4.0:</p>
|
||||
|
||||
<h3> 2D Voronoi Diagram Adaptor (re-added)</h3>
|
||||
<ul>
|
||||
<li>The package <em>2D Voronoi Diagram Adaptor</em> was temporarily
|
||||
removed from the CGAL distribution because of license issues. That
|
||||
package is now back into CGAL.
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>2D and 3D Geometry Kernel </h3>
|
||||
<ul>
|
||||
<li>Fix a bug in the <code>Segment_3-Triangle_3</code> intersection function in the case the segment is collinear with a triangle edge..</li>
|
||||
</ul>
|
||||
|
||||
<h3>Algebraic Kernel</h3>
|
||||
<ul>
|
||||
<li>Avoids linking error "duplicate symbols" when two compilation units
|
||||
using the algebraic kernel are linked.</li>
|
||||
</ul>
|
||||
|
||||
<h3>Surface Mesh Generation and 3D Mesh Generation</h3>
|
||||
<ul>
|
||||
<li>Fix an important bug in the <code>CGAL_ImageIO</code> library, that
|
||||
could lead to wrong result when meshing from a 3D image.</li>
|
||||
</ul>
|
||||
|
||||
<h3>3D Boolean Operations on Nef Polygons Embedded on the Sphere</h3>
|
||||
<ul>
|
||||
<li>Fix a memory leak due to the usage of an internal mechanism that has been replaced by boost::any. This also influences the packages
|
||||
2D Boolean Operations on Nef Polygons, 3D Boolean Operations on Nef Polyhedra, Convex Decomposition of Polyhedra, and
|
||||
3D Minkowski Sum of Polyhedra.
|
||||
</ul>
|
||||
|
||||
<h3>Surface Mesh Parameterization</h3>
|
||||
<ul>
|
||||
<li>Fixed a memory leak.</li>
|
||||
</ul>
|
||||
|
||||
<h3>2D Arrangement</h3>
|
||||
<ul>
|
||||
<li>Fixed several memory leaks.</li>
|
||||
</ul>
|
||||
</DIV>
|
||||
|
||||
</DIV>
|
||||
|
||||
<h2 id="release4.0">Release 4.0 </h2>
|
||||
<DIV>
|
||||
<p> Release date: March 2012</p>
|
||||
|
|
|
|||
|
|
@ -1,55 +0,0 @@
|
|||
# FIND_PACKAGE_HANDLE_STANDARD_ARGS(NAME (DEFAULT_MSG|"Custom failure message") VAR1 ... )
|
||||
# This macro is intended to be used in FindXXX.cmake modules files.
|
||||
# It handles the REQUIRED and QUIET argument to FIND_PACKAGE() and
|
||||
# it also sets the <UPPERCASED_NAME>_FOUND variable.
|
||||
# The package is found if all variables listed are TRUE.
|
||||
# Example:
|
||||
#
|
||||
# FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibXml2 DEFAULT_MSG LIBXML2_LIBRARIES LIBXML2_INCLUDE_DIR)
|
||||
#
|
||||
# LibXml2 is considered to be found, if both LIBXML2_LIBRARIES and
|
||||
# LIBXML2_INCLUDE_DIR are valid. Then also LIBXML2_FOUND is set to TRUE.
|
||||
# If it is not found and REQUIRED was used, it fails with FATAL_ERROR,
|
||||
# independent whether QUIET was used or not.
|
||||
# If it is found, the location is reported using the VAR1 argument, so
|
||||
# here a message "Found LibXml2: /usr/lib/libxml2.so" will be printed out.
|
||||
# If the second argument is DEFAULT_MSG, the message in the failure case will
|
||||
# be "Could NOT find LibXml2", if you don't like this message you can specify
|
||||
# your own custom failure message there.
|
||||
|
||||
macro(FIND_PACKAGE_HANDLE_STANDARD_ARGS _NAME _FAIL_MSG _VAR1 )
|
||||
|
||||
if("${_FAIL_MSG}" STREQUAL "DEFAULT_MSG")
|
||||
set(_FAIL_MESSAGE "Could NOT find ${_NAME}")
|
||||
else()
|
||||
set(_FAIL_MESSAGE "${_FAIL_MSG}")
|
||||
endif()
|
||||
|
||||
string(TOUPPER ${_NAME} _NAME_UPPER)
|
||||
|
||||
set(${_NAME_UPPER}_FOUND TRUE)
|
||||
if(NOT ${_VAR1})
|
||||
set(${_NAME_UPPER}_FOUND FALSE)
|
||||
endif()
|
||||
|
||||
foreach(_CURRENT_VAR ${ARGN})
|
||||
if(NOT ${_CURRENT_VAR})
|
||||
set(${_NAME_UPPER}_FOUND FALSE)
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
if (${_NAME_UPPER}_FOUND)
|
||||
if (NOT ${_NAME}_FIND_QUIETLY)
|
||||
message(STATUS "Found ${_NAME}: ${${_VAR1}}")
|
||||
endif()
|
||||
else()
|
||||
if (${_NAME}_FIND_REQUIRED)
|
||||
message(FATAL_ERROR "${_FAIL_MESSAGE}")
|
||||
else()
|
||||
if (NOT ${_NAME}_FIND_QUIETLY)
|
||||
message(STATUS "${_FAIL_MESSAGE}")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
endmacro()
|
||||
|
|
@ -8,7 +8,10 @@ if ( NOT CGAL_GENERATOR_SPECIFIC_SETTINGS_FILE_INCLUDED )
|
|||
set(CGAL_AUTO_LINK_ENABLED TRUE)
|
||||
endif()
|
||||
|
||||
if ( MSVC10 )
|
||||
if ( MSVC11 )
|
||||
set(CGAL_TOOLSET "vc110")
|
||||
message( STATUS "Using VC11 compiler." )
|
||||
elseif ( MSVC10 )
|
||||
set(CGAL_TOOLSET "vc100")
|
||||
message( STATUS "Using VC10 compiler." )
|
||||
elseif ( MSVC90 )
|
||||
|
|
|
|||
|
|
@ -482,7 +482,7 @@ function(process_CGAL_subdirectory entry subdir type_name)
|
|||
if(dont_submit_grep)
|
||||
set(ADD_SUBDIR FALSE)
|
||||
endif()
|
||||
file(STRINGS ${entry}/../../dont_submit dont_submit_grep REGEX "^${subdir}")
|
||||
file(STRINGS ${entry}/../../dont_submit dont_submit_grep REGEX "^${subdir}/?\$")
|
||||
if(dont_submit_grep)
|
||||
set(ADD_SUBDIR FALSE)
|
||||
endif()
|
||||
|
|
|
|||
|
|
@ -1,927 +0,0 @@
|
|||
# - Try to find Boost include dirs and libraries
|
||||
# Usage of this module as follows:
|
||||
#
|
||||
# == Using Header-Only libraries from within Boost: ==
|
||||
#
|
||||
# find_package( Boost 1.38.0 )
|
||||
# if(Boost_FOUND)
|
||||
# include_directories(${Boost_INCLUDE_DIRS})
|
||||
# add_executable(foo foo.cc)
|
||||
# endif()
|
||||
#
|
||||
#
|
||||
# == Using actual libraries from within Boost: ==
|
||||
#
|
||||
# set(Boost_USE_STATIC_LIBS ON)
|
||||
# set(Boost_USE_MULTITHREADED ON)
|
||||
# find_package( Boost 1.38.0 COMPONENTS date_time filesystem system ... )
|
||||
#
|
||||
# if(Boost_FOUND)
|
||||
# include_directories(${Boost_INCLUDE_DIRS})
|
||||
# add_executable(foo foo.cc)
|
||||
# target_link_libraries(foo ${Boost_LIBRARIES})
|
||||
# endif()
|
||||
#
|
||||
#
|
||||
# The components list needs to contain actual names of boost libraries only,
|
||||
# such as "date_time" for "libboost_date_time". If you're using parts of
|
||||
# Boost that contain header files only (e.g. foreach) you do not need to
|
||||
# specify COMPONENTS.
|
||||
#
|
||||
# You should provide a minimum version number that should be used. If you provide this
|
||||
# version number and specify the REQUIRED attribute, this module will fail if it
|
||||
# can't find the specified or a later version. If you specify a version number this is
|
||||
# automatically put into the considered list of version numbers and thus doesn't need
|
||||
# to be specified in the Boost_ADDITIONAL_VERSIONS variable (see below).
|
||||
#
|
||||
# NOTE for Visual Studio Users:
|
||||
# Automatic linking is used on MSVC & Borland compilers by default when
|
||||
# #including things in Boost. It's important to note that setting
|
||||
# Boost_USE_STATIC_LIBS to OFF is NOT enough to get you dynamic linking,
|
||||
# should you need this feature. Automatic linking typically uses static
|
||||
# libraries with a few exceptions (Boost.Python is one).
|
||||
#
|
||||
# Please see the section below near Boost_LIB_DIAGNOSTIC_DEFINITIONS for
|
||||
# more details. Adding a TARGET_LINK_LIBRARIES() as shown in the example
|
||||
# above appears to cause VS to link dynamically if Boost_USE_STATIC_LIBS
|
||||
# gets set to OFF. It is suggested you avoid automatic linking since it
|
||||
# will make your application less portable.
|
||||
#
|
||||
# =========== The mess that is Boost_ADDITIONAL_VERSIONS (sorry?) ============
|
||||
#
|
||||
# OK, so the Boost_ADDITIONAL_VERSIONS variable can be used to specify a list of
|
||||
# boost version numbers that should be taken into account when searching
|
||||
# for Boost. Unfortunately boost puts the version number into the
|
||||
# actual filename for the libraries, so this variable will certainly be needed
|
||||
# in the future when new Boost versions are released.
|
||||
#
|
||||
# Currently this module searches for the following version numbers:
|
||||
# 1.33, 1.33.0, 1.33.1, 1.34, 1.34.0, 1.34.1, 1.35, 1.35.0, 1.35.1,
|
||||
# 1.36, 1.36.0, 1.36.1, 1.37, 1.37.0, 1.38, 1.38.0, 1.38.1
|
||||
# 1.39, 1.39.0, 1.39.1 1.40, 1.40.0, 1.40.1 1.41, 1.41.0, 1.41.1
|
||||
# 1.42, 1.42.0, 1.42.1
|
||||
#
|
||||
# NOTE: If you add a new major 1.x version in Boost_ADDITIONAL_VERSIONS you should
|
||||
# add both 1.x and 1.x.0 as shown above. Official Boost include directories
|
||||
# omit the 3rd version number from include paths if it is 0 although not all
|
||||
# binary Boost releases do so.
|
||||
#
|
||||
# SET(Boost_ADDITIONAL_VERSIONS "0.99" "0.99.0" "1.78" "1.78.0")
|
||||
#
|
||||
# ============================================================================
|
||||
#
|
||||
# Variables used by this module, they can change the default behaviour and
|
||||
# need to be set before calling find_package:
|
||||
#
|
||||
# Boost_USE_MULTITHREADED Can be set to OFF to use the non-multithreaded
|
||||
# boost libraries. If not specified, defaults
|
||||
# to ON.
|
||||
#
|
||||
# Boost_USE_STATIC_LIBS Can be set to ON to force the use of the static
|
||||
# boost libraries. Defaults to OFF.
|
||||
#
|
||||
# Other Variables used by this module which you may want to set.
|
||||
#
|
||||
# Boost_ADDITIONAL_VERSIONS A list of version numbers to use for searching
|
||||
# the boost include directory. Please see
|
||||
# the documentation above regarding this
|
||||
# annoying, but necessary variable :(
|
||||
#
|
||||
# Boost_DEBUG Set this to TRUE to enable debugging output
|
||||
# of FindBoost.cmake if you are having problems.
|
||||
# Please enable this before filing any bug
|
||||
# reports.
|
||||
#
|
||||
# Boost_COMPILER Set this to the compiler suffix used by Boost
|
||||
# (e.g. "-gcc43") if FindBoost has problems finding
|
||||
# the proper Boost installation
|
||||
#
|
||||
# These last three variables are available also as environment variables:
|
||||
#
|
||||
# BOOST_ROOT or BOOSTROOT The preferred installation prefix for searching for
|
||||
# Boost. Set this if the module has problems finding
|
||||
# the proper Boost installation.
|
||||
#
|
||||
# BOOST_INCLUDEDIR Set this to the include directory of Boost, if the
|
||||
# module has problems finding the proper Boost installation
|
||||
#
|
||||
# BOOST_LIBRARYDIR Set this to the lib directory of Boost, if the
|
||||
# module has problems finding the proper Boost installation
|
||||
#
|
||||
# Variables defined by this module:
|
||||
#
|
||||
# Boost_FOUND System has Boost, this means the include dir was
|
||||
# found, as well as all the libraries specified in
|
||||
# the COMPONENTS list.
|
||||
#
|
||||
# Boost_INCLUDE_DIRS Boost include directories: not cached
|
||||
#
|
||||
# Boost_INCLUDE_DIR This is almost the same as above, but this one is
|
||||
# cached and may be modified by advanced users
|
||||
#
|
||||
# Boost_LIBRARIES Link to these to use the Boost libraries that you
|
||||
# specified: not cached
|
||||
#
|
||||
# Boost_LIBRARY_DIRS The path to where the Boost library files are.
|
||||
#
|
||||
# Boost_VERSION The version number of the boost libraries that
|
||||
# have been found, same as in version.hpp from Boost
|
||||
#
|
||||
# Boost_LIB_VERSION The version number in filename form as
|
||||
# it's appended to the library filenames
|
||||
#
|
||||
# Boost_MAJOR_VERSION major version number of boost
|
||||
# Boost_MINOR_VERSION minor version number of boost
|
||||
# Boost_SUBMINOR_VERSION subminor version number of boost
|
||||
#
|
||||
# Boost_LIB_DIAGNOSTIC_DEFINITIONS [WIN32 Only] You can call
|
||||
# add_definitions(${Boost_LIB_DIAGNOSTIC_DEFINTIIONS})
|
||||
# to have diagnostic information about Boost's
|
||||
# automatic linking outputted during compilation time.
|
||||
#
|
||||
# For each component you specify in find_package(), the following (UPPER-CASE)
|
||||
# variables are set. You can use these variables if you would like to pick and
|
||||
# choose components for your targets instead of just using Boost_LIBRARIES.
|
||||
#
|
||||
# Boost_${COMPONENT}_FOUND True IF the Boost library "component" was found.
|
||||
#
|
||||
# Boost_${COMPONENT}_LIBRARY Contains the libraries for the specified Boost
|
||||
# "component" (includes debug and optimized keywords
|
||||
# when needed).
|
||||
#
|
||||
# =====================================================================
|
||||
#
|
||||
#
|
||||
# Copyright (c) 2006-2008 Andreas Schneider <mail@cynapses.org>
|
||||
# Copyright (c) 2007 Wengo
|
||||
# Copyright (c) 2007 Mike Jackson
|
||||
# Copyright (c) 2008 Andreas Pakulat <apaku@gmx.de>
|
||||
#
|
||||
# Redistribution AND use is allowed according to the terms of the New
|
||||
# BSD license.
|
||||
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
|
||||
#
|
||||
|
||||
#
|
||||
# Adapted for CGAL (wwww.cgal.org) by fernando.cacciola@geometryfactory.com, 2009
|
||||
#
|
||||
|
||||
include( CGAL_VersionUtils )
|
||||
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# FindBoost functions & macros
|
||||
#
|
||||
############################################
|
||||
#
|
||||
# Check the existence of the libraries.
|
||||
#
|
||||
############################################
|
||||
# This macro was taken directly from the FindQt4.cmake file that is included
|
||||
# with the CMake distribution. This is NOT my work. All work was done by the
|
||||
# original authors of the FindQt4.cmake file. Only minor modifications were
|
||||
# made to remove references to Qt and make this file more generally applicable
|
||||
# And ELSE/ENDIF pairs were removed for readability.
|
||||
#########################################################################
|
||||
|
||||
MACRO (_Boost_ADJUST_LIB_VARS basename)
|
||||
IF (Boost_INCLUDE_DIR )
|
||||
IF (Boost_${basename}_LIBRARY_DEBUG AND Boost_${basename}_LIBRARY_RELEASE)
|
||||
# if the generator supports configuration types then set
|
||||
# optimized and debug libraries, or if the CMAKE_BUILD_TYPE has a value
|
||||
IF (CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)
|
||||
SET(Boost_${basename}_LIBRARY optimized ${Boost_${basename}_LIBRARY_RELEASE} debug ${Boost_${basename}_LIBRARY_DEBUG})
|
||||
ELSE()
|
||||
# if there are no configuration types and CMAKE_BUILD_TYPE has no value
|
||||
# then just use the release libraries
|
||||
SET(Boost_${basename}_LIBRARY ${Boost_${basename}_LIBRARY_RELEASE} )
|
||||
ENDIF()
|
||||
# FIXME: This probably should be set for both cases
|
||||
SET(Boost_${basename}_LIBRARIES optimized ${Boost_${basename}_LIBRARY_RELEASE} debug ${Boost_${basename}_LIBRARY_DEBUG})
|
||||
ENDIF()
|
||||
|
||||
# if only the release version was found, set the debug variable also to the release version
|
||||
IF (Boost_${basename}_LIBRARY_RELEASE AND NOT Boost_${basename}_LIBRARY_DEBUG)
|
||||
SET(Boost_${basename}_LIBRARY_DEBUG ${Boost_${basename}_LIBRARY_RELEASE})
|
||||
SET(Boost_${basename}_LIBRARY ${Boost_${basename}_LIBRARY_RELEASE})
|
||||
SET(Boost_${basename}_LIBRARIES ${Boost_${basename}_LIBRARY_RELEASE})
|
||||
ENDIF()
|
||||
|
||||
# if only the debug version was found, set the release variable also to the debug version
|
||||
IF (Boost_${basename}_LIBRARY_DEBUG AND NOT Boost_${basename}_LIBRARY_RELEASE)
|
||||
SET(Boost_${basename}_LIBRARY_RELEASE ${Boost_${basename}_LIBRARY_DEBUG})
|
||||
SET(Boost_${basename}_LIBRARY ${Boost_${basename}_LIBRARY_DEBUG})
|
||||
SET(Boost_${basename}_LIBRARIES ${Boost_${basename}_LIBRARY_DEBUG})
|
||||
ENDIF()
|
||||
|
||||
IF (Boost_${basename}_LIBRARY)
|
||||
set(Boost_${basename}_LIBRARY ${Boost_${basename}_LIBRARY} CACHE FILEPATH "The Boost ${basename} library")
|
||||
|
||||
# Remove superfluous "debug" / "optimized" keywords from
|
||||
# Boost_LIBRARY_DIRS
|
||||
FOREACH(_boost_my_lib ${Boost_${basename}_LIBRARY})
|
||||
GET_FILENAME_COMPONENT(_boost_my_lib_path "${_boost_my_lib}" PATH)
|
||||
if ( NOT "${_boost_my_lib_path}" STREQUAL "" )
|
||||
LIST(APPEND Boost_LIBRARY_DIRS ${_boost_my_lib_path})
|
||||
endif()
|
||||
ENDFOREACH()
|
||||
|
||||
set(Boost_LIBRARY_DIRS ${Boost_LIBRARY_DIRS} CACHE FILEPATH "Boost library directory")
|
||||
SET(Boost_${basename}_FOUND ON CACHE INTERNAL "Whether the Boost ${basename} library found")
|
||||
ENDIF(Boost_${basename}_LIBRARY)
|
||||
|
||||
ENDIF (Boost_INCLUDE_DIR )
|
||||
# Make variables changeble to the advanced user
|
||||
MARK_AS_ADVANCED(
|
||||
Boost_${basename}_LIBRARY
|
||||
Boost_${basename}_LIBRARY_RELEASE
|
||||
Boost_${basename}_LIBRARY_DEBUG
|
||||
)
|
||||
ENDMACRO (_Boost_ADJUST_LIB_VARS)
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
#
|
||||
# Runs compiler with "-dumpversion" and parses major/minor
|
||||
# version with a regex.
|
||||
#
|
||||
MACRO(_Boost_COMPILER_DUMPVERSION _OUTPUT_VERSION)
|
||||
|
||||
EXEC_PROGRAM(${CMAKE_CXX_COMPILER}
|
||||
ARGS ${CMAKE_CXX_COMPILER_ARG1} -dumpversion
|
||||
OUTPUT_VARIABLE _boost_COMPILER_VERSION
|
||||
)
|
||||
STRING(REGEX REPLACE "([0-9])\\.([0-9])(\\.[0-9])?" "\\1\\2"
|
||||
_boost_COMPILER_VERSION ${_boost_COMPILER_VERSION})
|
||||
|
||||
SET(${_OUTPUT_VERSION} ${_boost_COMPILER_VERSION})
|
||||
ENDMACRO()
|
||||
|
||||
#
|
||||
# End functions/macros
|
||||
#
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
|
||||
IF(NOT DEFINED Boost_USE_MULTITHREADED)
|
||||
SET(Boost_USE_MULTITHREADED TRUE)
|
||||
ENDIF()
|
||||
|
||||
if(Boost_FIND_VERSION_EXACT)
|
||||
# The version may appear in a directory with or without the patch
|
||||
# level, even when the patch level is non-zero.
|
||||
set(_boost_TEST_VERSIONS
|
||||
"${Boost_FIND_VERSION_MAJOR}.${Boost_FIND_VERSION_MINOR}.${Boost_FIND_VERSION_PATCH}"
|
||||
"${Boost_FIND_VERSION_MAJOR}.${Boost_FIND_VERSION_MINOR}")
|
||||
else(Boost_FIND_VERSION_EXACT)
|
||||
# The user has not requested an exact version. Among known
|
||||
# versions, find those that are acceptable to the user request.
|
||||
set(_Boost_KNOWN_VERSIONS ${Boost_ADDITIONAL_VERSIONS}
|
||||
"1.45.1" "1.45.0" "1.45"
|
||||
"1.44.1" "1.44.0" "1.44"
|
||||
"1.43.1" "1.43.0" "1.43"
|
||||
"1.42.1" "1.42.0" "1.42"
|
||||
"1.41.1" "1.41.0" "1.41"
|
||||
"1.40.1" "1.40.0" "1.40"
|
||||
"1.39.1" "1.39.0" "1.39"
|
||||
"1.38.1" "1.38.0" "1.38"
|
||||
"1.37.0" "1.37"
|
||||
"1.36.1" "1.36.0" "1.36" "1.35.1" "1.35.0" "1.35" "1.34.1" "1.34.0"
|
||||
"1.34" "1.33.1" "1.33.0" "1.33")
|
||||
set(_boost_TEST_VERSIONS)
|
||||
if(Boost_FIND_VERSION)
|
||||
set(_Boost_FIND_VERSION_SHORT "${Boost_FIND_VERSION_MAJOR}.${Boost_FIND_VERSION_MINOR}")
|
||||
# Select acceptable versions.
|
||||
foreach(version ${_Boost_KNOWN_VERSIONS})
|
||||
IS_VERSION_LESS( "${version}" "${Boost_FIND_VERSION}" _Boost_IS_VERSION_LESS )
|
||||
if(NOT _Boost_IS_VERSION_LESS )
|
||||
# This version is high enough.
|
||||
list(APPEND _boost_TEST_VERSIONS "${version}")
|
||||
else()
|
||||
IS_VERSION_EQUAL( "${version}" "${_Boost_FIND_VERSION_SHORT}" _Boost_IS_VERSION_EQUAL )
|
||||
if( _Boost_IS_VERSION_EQUAL )
|
||||
# This version is a short-form for the requested version with
|
||||
# the patch level dropped.
|
||||
list(APPEND _boost_TEST_VERSIONS "${version}")
|
||||
endif()
|
||||
endif()
|
||||
endforeach(version)
|
||||
else(Boost_FIND_VERSION)
|
||||
# Any version is acceptable.
|
||||
set(_boost_TEST_VERSIONS "${_Boost_KNOWN_VERSIONS}")
|
||||
endif(Boost_FIND_VERSION)
|
||||
endif(Boost_FIND_VERSION_EXACT)
|
||||
|
||||
# The reason that we failed to find Boost. This will be set to a
|
||||
# user-friendly message when we fail to find some necessary piece of
|
||||
# Boost.
|
||||
set(Boost_ERROR_REASON)
|
||||
|
||||
|
||||
SET( _boost_IN_CACHE TRUE)
|
||||
IF(Boost_INCLUDE_DIR)
|
||||
FOREACH(COMPONENT ${Boost_FIND_COMPONENTS})
|
||||
STRING(TOUPPER ${COMPONENT} COMPONENT)
|
||||
IF(NOT Boost_${COMPONENT}_FOUND)
|
||||
SET( _boost_IN_CACHE FALSE)
|
||||
ENDIF(NOT Boost_${COMPONENT}_FOUND)
|
||||
ENDFOREACH(COMPONENT)
|
||||
ELSE(Boost_INCLUDE_DIR)
|
||||
SET( _boost_IN_CACHE FALSE)
|
||||
ENDIF(Boost_INCLUDE_DIR)
|
||||
|
||||
IF (_boost_IN_CACHE)
|
||||
# in cache already
|
||||
SET(Boost_FOUND TRUE)
|
||||
FOREACH(COMPONENT ${Boost_FIND_COMPONENTS})
|
||||
STRING(TOUPPER ${COMPONENT} COMPONENT)
|
||||
_Boost_ADJUST_LIB_VARS( ${COMPONENT} )
|
||||
SET(Boost_LIBRARIES ${Boost_LIBRARIES} ${Boost_${COMPONENT}_LIBRARY})
|
||||
ENDFOREACH(COMPONENT)
|
||||
SET(Boost_INCLUDE_DIRS ${Boost_INCLUDE_DIR})
|
||||
IF(Boost_VERSION AND NOT "${Boost_VERSION}" STREQUAL "0")
|
||||
MATH(EXPR Boost_MAJOR_VERSION "${Boost_VERSION} / 100000")
|
||||
MATH(EXPR Boost_MINOR_VERSION "${Boost_VERSION} / 100 % 1000")
|
||||
MATH(EXPR Boost_SUBMINOR_VERSION "${Boost_VERSION} % 100")
|
||||
ENDIF(Boost_VERSION AND NOT "${Boost_VERSION}" STREQUAL "0")
|
||||
if(Boost_DEBUG)
|
||||
message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
|
||||
"boost ${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}.${Boost_SUBMINOR_VERSION} "
|
||||
"is already in the cache. For debugging messages, please clear the cache.")
|
||||
endif()
|
||||
ELSE (_boost_IN_CACHE)
|
||||
# Need to search for boost
|
||||
if(Boost_DEBUG)
|
||||
message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
|
||||
"Boost not in cache")
|
||||
# Output some of their choices
|
||||
message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
|
||||
"_boost_TEST_VERSIONS = ${_boost_TEST_VERSIONS}")
|
||||
message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
|
||||
"Boost_USE_MULTITHREADED = ${Boost_USE_MULTITHREADED}")
|
||||
message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
|
||||
"Boost_USE_STATIC_LIBS = ${Boost_USE_STATIC_LIBS}")
|
||||
endif()
|
||||
|
||||
IF(WIN32)
|
||||
# In windows, automatic linking is performed, so you do not have
|
||||
# to specify the libraries. If you are linking to a dynamic
|
||||
# runtime, then you can choose to link to either a static or a
|
||||
# dynamic Boost library, the default is to do a static link. You
|
||||
# can alter this for a specific library "whatever" by defining
|
||||
# BOOST_WHATEVER_DYN_LINK to force Boost library "whatever" to be
|
||||
# linked dynamically. Alternatively you can force all Boost
|
||||
# libraries to dynamic link by defining BOOST_ALL_DYN_LINK.
|
||||
|
||||
# This feature can be disabled for Boost library "whatever" by
|
||||
# defining BOOST_WHATEVER_NO_LIB, or for all of Boost by defining
|
||||
# BOOST_ALL_NO_LIB.
|
||||
|
||||
# If you want to observe which libraries are being linked against
|
||||
# then defining BOOST_LIB_DIAGNOSTIC will cause the auto-linking
|
||||
# code to emit a #pragma message each time a library is selected
|
||||
# for linking.
|
||||
SET(Boost_LIB_DIAGNOSTIC_DEFINITIONS
|
||||
"-DBOOST_LIB_DIAGNOSTIC" CACHE STRING "Boost diagnostic define")
|
||||
ENDIF(WIN32)
|
||||
|
||||
set( boost_ENV_PROGRAM_FILES_DIR $ENV{ProgramFiles} )
|
||||
file(TO_CMAKE_PATH "${boost_ENV_PROGRAM_FILES_DIR}" boost_ENV_PROGRAM_FILES_DIR)
|
||||
|
||||
SET(_boost_INCLUDE_SEARCH_DIRS
|
||||
C:/boost/include
|
||||
C:/boost
|
||||
"${boost_ENV_PROGRAM_FILES_DIR}/boost"
|
||||
/sw/local/include
|
||||
)
|
||||
|
||||
# If BOOST_ROOT was defined in the environment, use it.
|
||||
if (NOT BOOST_ROOT AND NOT $ENV{BOOST_ROOT} STREQUAL "")
|
||||
set(BOOST_ROOT $ENV{BOOST_ROOT})
|
||||
endif(NOT BOOST_ROOT AND NOT $ENV{BOOST_ROOT} STREQUAL "")
|
||||
|
||||
# If BOOSTROOT was defined in the environment, use it.
|
||||
if (NOT BOOST_ROOT AND NOT $ENV{BOOSTROOT} STREQUAL "")
|
||||
set(BOOST_ROOT $ENV{BOOSTROOT})
|
||||
endif(NOT BOOST_ROOT AND NOT $ENV{BOOSTROOT} STREQUAL "")
|
||||
|
||||
# If BOOST_INCLUDEDIR was defined in the environment, use it.
|
||||
IF( NOT $ENV{BOOST_INCLUDEDIR} STREQUAL "" )
|
||||
set(BOOST_INCLUDEDIR $ENV{BOOST_INCLUDEDIR})
|
||||
ENDIF( NOT $ENV{BOOST_INCLUDEDIR} STREQUAL "" )
|
||||
|
||||
# If BOOST_LIBRARYDIR was defined in the environment, use it.
|
||||
IF( NOT $ENV{BOOST_LIBRARYDIR} STREQUAL "" )
|
||||
set(BOOST_LIBRARYDIR $ENV{BOOST_LIBRARYDIR})
|
||||
ENDIF( NOT $ENV{BOOST_LIBRARYDIR} STREQUAL "" )
|
||||
|
||||
IF( BOOST_ROOT )
|
||||
file(TO_CMAKE_PATH ${BOOST_ROOT} BOOST_ROOT)
|
||||
ENDIF( BOOST_ROOT )
|
||||
|
||||
if(Boost_DEBUG)
|
||||
message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
|
||||
"Declared as CMake or Environmental Variables:")
|
||||
message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
|
||||
" BOOST_ROOT = ${BOOST_ROOT}")
|
||||
message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
|
||||
" BOOST_INCLUDEDIR = ${BOOST_INCLUDEDIR}")
|
||||
message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
|
||||
" BOOST_LIBRARYDIR = ${BOOST_LIBRARYDIR}")
|
||||
message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
|
||||
"_boost_TEST_VERSIONS = ${_boost_TEST_VERSIONS}")
|
||||
endif()
|
||||
|
||||
IF( BOOST_ROOT )
|
||||
SET(_boost_INCLUDE_SEARCH_DIRS
|
||||
${BOOST_ROOT}/include
|
||||
${BOOST_ROOT}
|
||||
${_boost_INCLUDE_SEARCH_DIRS})
|
||||
ENDIF( BOOST_ROOT )
|
||||
|
||||
IF( BOOST_INCLUDEDIR )
|
||||
file(TO_CMAKE_PATH ${BOOST_INCLUDEDIR} BOOST_INCLUDEDIR)
|
||||
SET(_boost_INCLUDE_SEARCH_DIRS
|
||||
${BOOST_INCLUDEDIR} ${_boost_INCLUDE_SEARCH_DIRS})
|
||||
ENDIF( BOOST_INCLUDEDIR )
|
||||
|
||||
# ------------------------------------------------------------------------
|
||||
# Search for Boost include DIR
|
||||
# ------------------------------------------------------------------------
|
||||
# Try to find Boost by stepping backwards through the Boost versions
|
||||
# we know about.
|
||||
IF( NOT Boost_INCLUDE_DIR )
|
||||
# Build a list of path suffixes for each version.
|
||||
SET(_boost_PATH_SUFFIXES)
|
||||
FOREACH(_boost_VER ${_boost_TEST_VERSIONS})
|
||||
# Add in a path suffix, based on the required version, ideally
|
||||
# we could read this from version.hpp, but for that to work we'd
|
||||
# need to know the include dir already
|
||||
set(_boost_BOOSTIFIED_VERSION)
|
||||
|
||||
# Transform 1.35 => 1_35 and 1.36.0 => 1_36_0
|
||||
IF(_boost_VER MATCHES "[0-9]+\\.[0-9]+\\.[0-9]+")
|
||||
STRING(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\1_\\2_\\3"
|
||||
_boost_BOOSTIFIED_VERSION ${_boost_VER})
|
||||
ELSEIF(_boost_VER MATCHES "[0-9]+\\.[0-9]+")
|
||||
STRING(REGEX REPLACE "([0-9]+)\\.([0-9]+)" "\\1_\\2"
|
||||
_boost_BOOSTIFIED_VERSION ${_boost_VER})
|
||||
ENDIF()
|
||||
|
||||
list(APPEND _boost_PATH_SUFFIXES "boost-${_boost_BOOSTIFIED_VERSION}")
|
||||
if(WIN32)
|
||||
# For BoostPro's underscores (and others?)
|
||||
list(APPEND _boost_PATH_SUFFIXES "boost_${_boost_BOOSTIFIED_VERSION}")
|
||||
endif()
|
||||
|
||||
ENDFOREACH(_boost_VER)
|
||||
|
||||
if(Boost_DEBUG)
|
||||
message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
|
||||
"Include debugging info:")
|
||||
message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
|
||||
" _boost_INCLUDE_SEARCH_DIRS = ${_boost_INCLUDE_SEARCH_DIRS}")
|
||||
message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
|
||||
" _boost_PATH_SUFFIXES = ${_boost_PATH_SUFFIXES}")
|
||||
endif()
|
||||
|
||||
# Look for a standard boost header file (search in user defined directories first)
|
||||
FIND_PATH(Boost_INCLUDE_DIR
|
||||
NAMES boost/config.hpp
|
||||
PATHS ${_boost_INCLUDE_SEARCH_DIRS}
|
||||
PATH_SUFFIXES ${_boost_PATH_SUFFIXES}
|
||||
NO_DEFAULT_PATH
|
||||
)
|
||||
|
||||
FIND_PATH(Boost_INCLUDE_DIR
|
||||
NAMES boost/config.hpp
|
||||
PATH_SUFFIXES ${_boost_PATH_SUFFIXES}
|
||||
)
|
||||
|
||||
ENDIF( NOT Boost_INCLUDE_DIR )
|
||||
|
||||
# ------------------------------------------------------------------------
|
||||
# Extract version information from version.hpp
|
||||
# ------------------------------------------------------------------------
|
||||
|
||||
IF(Boost_INCLUDE_DIR)
|
||||
# Extract Boost_VERSION and Boost_LIB_VERSION from version.hpp
|
||||
# Read the whole file:
|
||||
#
|
||||
SET(BOOST_VERSION 0)
|
||||
SET(BOOST_LIB_VERSION "")
|
||||
FILE(READ "${Boost_INCLUDE_DIR}/boost/version.hpp" _boost_VERSION_HPP_CONTENTS)
|
||||
if(Boost_DEBUG)
|
||||
message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
|
||||
"location of version.hpp: ${Boost_INCLUDE_DIR}/boost/version.hpp")
|
||||
endif()
|
||||
|
||||
STRING(REGEX REPLACE ".*#define BOOST_VERSION ([0-9]+).*" "\\1" Boost_VERSION "${_boost_VERSION_HPP_CONTENTS}")
|
||||
STRING(REGEX REPLACE ".*#define BOOST_LIB_VERSION \"([0-9_]+)\".*" "\\1" Boost_LIB_VERSION "${_boost_VERSION_HPP_CONTENTS}")
|
||||
|
||||
SET(Boost_LIB_VERSION ${Boost_LIB_VERSION} CACHE INTERNAL "The library version string for boost libraries")
|
||||
SET(Boost_VERSION ${Boost_VERSION} CACHE INTERNAL "The version number for boost libraries")
|
||||
|
||||
IF(NOT "${Boost_VERSION}" STREQUAL "0")
|
||||
MATH(EXPR Boost_MAJOR_VERSION "${Boost_VERSION} / 100000")
|
||||
MATH(EXPR Boost_MINOR_VERSION "${Boost_VERSION} / 100 % 1000")
|
||||
MATH(EXPR Boost_SUBMINOR_VERSION "${Boost_VERSION} % 100")
|
||||
|
||||
set(Boost_ERROR_REASON
|
||||
"${Boost_ERROR_REASON}Boost version: ${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}.${Boost_SUBMINOR_VERSION}\nBoost include path: ${Boost_INCLUDE_DIR}")
|
||||
ENDIF(NOT "${Boost_VERSION}" STREQUAL "0")
|
||||
if(Boost_DEBUG)
|
||||
message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
|
||||
"version.hpp reveals boost "
|
||||
"${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}.${Boost_SUBMINOR_VERSION}")
|
||||
endif()
|
||||
ELSE(Boost_INCLUDE_DIR)
|
||||
set(Boost_ERROR_REASON
|
||||
"${Boost_ERROR_REASON}Unable to find the Boost header files. Please set BOOST_ROOT to the root directory containing Boost or BOOST_INCLUDEDIR to the directory containing Boost's headers.")
|
||||
ENDIF(Boost_INCLUDE_DIR)
|
||||
|
||||
# ------------------------------------------------------------------------
|
||||
# Suffix initialization and compiler suffix detection.
|
||||
# ------------------------------------------------------------------------
|
||||
|
||||
# Setting some more suffixes for the library
|
||||
SET (Boost_LIB_PREFIX "")
|
||||
if ( WIN32 AND Boost_USE_STATIC_LIBS )
|
||||
SET (Boost_LIB_PREFIX "lib")
|
||||
endif()
|
||||
|
||||
if (Boost_COMPILER)
|
||||
set(_boost_COMPILER ${Boost_COMPILER})
|
||||
if(Boost_DEBUG)
|
||||
message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
|
||||
"using user-specified Boost_COMPILER = ${_boost_COMPILER}")
|
||||
endif()
|
||||
else(Boost_COMPILER)
|
||||
|
||||
SET(_boost_COMPILER "-gcc") # Fall back to GCC for cygwin
|
||||
|
||||
# Attempt to guess the compiler suffix
|
||||
# NOTE: this is not perfect yet, if you experience any issues
|
||||
# please report them and use the Boost_COMPILER variable
|
||||
# to work around the problems.
|
||||
if (MSVC10)
|
||||
SET (_boost_COMPILER "-vc100")
|
||||
elseif (MSVC90)
|
||||
SET (_boost_COMPILER "-vc90")
|
||||
elseif (MSVC80)
|
||||
SET (_boost_COMPILER "-vc80")
|
||||
elseif (MSVC71)
|
||||
SET (_boost_COMPILER "-vc71")
|
||||
elseif (MSVC70) # Good luck!
|
||||
SET (_boost_COMPILER "-vc7") # yes, this is correct
|
||||
elseif (MSVC60) # Good luck!
|
||||
SET (_boost_COMPILER "-vc6") # yes, this is correct
|
||||
elseif (BORLAND)
|
||||
SET (_boost_COMPILER "-bcb")
|
||||
elseif("${CMAKE_CXX_COMPILER}" MATCHES "icl"
|
||||
OR "${CMAKE_CXX_COMPILER}" MATCHES "icpc")
|
||||
if(WIN32)
|
||||
set (_boost_COMPILER "-iw")
|
||||
else()
|
||||
set (_boost_COMPILER "-il")
|
||||
endif()
|
||||
elseif (MINGW)
|
||||
|
||||
IS_VERSION_LESS( "${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}" "1.34" _Boost_IS_VERSION_LESS )
|
||||
if( _Boost_IS_VERSION_LESS )
|
||||
SET(_boost_COMPILER "-mgw") # no GCC version encoding prior to 1.34
|
||||
else()
|
||||
_Boost_COMPILER_DUMPVERSION(_boost_COMPILER_VERSION)
|
||||
SET (_boost_COMPILER "-mgw${_boost_COMPILER_VERSION}")
|
||||
endif()
|
||||
elseif (UNIX)
|
||||
if (CMAKE_COMPILER_IS_GNUCXX)
|
||||
IS_VERSION_LESS( "${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}" "1.34" _Boost_IS_VERSION_LESS )
|
||||
if( _Boost_IS_VERSION_LESS )
|
||||
SET(_boost_COMPILER "-gcc") # no GCC version encoding prior to 1.34
|
||||
else()
|
||||
_Boost_COMPILER_DUMPVERSION(_boost_COMPILER_VERSION)
|
||||
# Determine which version of GCC we have.
|
||||
IF(APPLE)
|
||||
IF(Boost_MINOR_VERSION)
|
||||
IF(${Boost_MINOR_VERSION} GREATER 35)
|
||||
# In Boost 1.36.0 and newer, the mangled compiler name used
|
||||
# on Mac OS X/Darwin is "xgcc".
|
||||
SET(_boost_COMPILER "-xgcc${_boost_COMPILER_VERSION}")
|
||||
ELSE(${Boost_MINOR_VERSION} GREATER 35)
|
||||
# In Boost <= 1.35.0, there is no mangled compiler name for
|
||||
# the Mac OS X/Darwin version of GCC.
|
||||
SET(_boost_COMPILER "")
|
||||
ENDIF(${Boost_MINOR_VERSION} GREATER 35)
|
||||
ELSE(Boost_MINOR_VERSION)
|
||||
# We don't know the Boost version, so assume it's
|
||||
# pre-1.36.0.
|
||||
SET(_boost_COMPILER "")
|
||||
ENDIF(Boost_MINOR_VERSION)
|
||||
ELSE()
|
||||
SET (_boost_COMPILER "-gcc${_boost_COMPILER_VERSION}")
|
||||
ENDIF()
|
||||
endif()
|
||||
endif (CMAKE_COMPILER_IS_GNUCXX)
|
||||
endif()
|
||||
if(Boost_DEBUG)
|
||||
message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
|
||||
"guessed _boost_COMPILER = ${_boost_COMPILER}")
|
||||
endif()
|
||||
endif(Boost_COMPILER)
|
||||
|
||||
SET (_boost_MULTITHREADED "-mt")
|
||||
if( NOT Boost_USE_MULTITHREADED )
|
||||
set (_boost_MULTITHREADED "")
|
||||
endif()
|
||||
if(Boost_DEBUG)
|
||||
message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
|
||||
"_boost_MULTITHREADED = ${_boost_MULTITHREADED}")
|
||||
endif()
|
||||
|
||||
SET( _boost_STATIC_TAG "")
|
||||
set( _boost_ABI_TAG "")
|
||||
IF (WIN32)
|
||||
IF(MSVC)
|
||||
SET (_boost_ABI_TAG "g")
|
||||
ENDIF(MSVC)
|
||||
IF( Boost_USE_STATIC_LIBS )
|
||||
SET( _boost_STATIC_TAG "-s")
|
||||
ENDIF( Boost_USE_STATIC_LIBS )
|
||||
ENDIF(WIN32)
|
||||
SET (_boost_ABI_TAG "${_boost_ABI_TAG}d")
|
||||
if(Boost_DEBUG)
|
||||
message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
|
||||
"_boost_STATIC_TAG = ${_boost_STATIC_TAG}")
|
||||
message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
|
||||
"_boost_ABI_TAG = ${_boost_ABI_TAG}")
|
||||
endif()
|
||||
|
||||
# ------------------------------------------------------------------------
|
||||
# Begin finding boost libraries
|
||||
# ------------------------------------------------------------------------
|
||||
|
||||
SET(_boost_LIBRARIES_SEARCH_DIRS
|
||||
C:/boost/lib
|
||||
C:/boost
|
||||
"${boost_ENV_PROGRAM_FILES_DIR}/boost/boost_${Boost_MAJOR_VERSION}_${Boost_MINOR_VERSION}_${Boost_SUBMINOR_VERSION}/lib"
|
||||
"${boost_ENV_PROGRAM_FILES_DIR}/boost/boost_${Boost_MAJOR_VERSION}_${Boost_MINOR_VERSION}/lib"
|
||||
"${boost_ENV_PROGRAM_FILES_DIR}/boost"
|
||||
/sw/local/lib
|
||||
)
|
||||
IF( BOOST_ROOT )
|
||||
SET(_boost_LIBRARIES_SEARCH_DIRS
|
||||
${BOOST_ROOT}/lib
|
||||
${BOOST_ROOT}/stage/lib
|
||||
${_boost_LIBRARIES_SEARCH_DIRS})
|
||||
ENDIF( BOOST_ROOT )
|
||||
|
||||
IF( BOOST_LIBRARYDIR )
|
||||
file(TO_CMAKE_PATH ${BOOST_LIBRARYDIR} BOOST_LIBRARYDIR)
|
||||
SET(_boost_LIBRARIES_SEARCH_DIRS
|
||||
${BOOST_LIBRARYDIR} ${_boost_LIBRARIES_SEARCH_DIRS})
|
||||
ENDIF( BOOST_LIBRARYDIR )
|
||||
|
||||
if(Boost_DEBUG)
|
||||
message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
|
||||
"_boost_LIBRARIES_SEARCH_DIRS = ${_boost_LIBRARIES_SEARCH_DIRS}")
|
||||
endif()
|
||||
|
||||
FOREACH(COMPONENT ${Boost_FIND_COMPONENTS})
|
||||
STRING(TOUPPER ${COMPONENT} UPPERCOMPONENT)
|
||||
SET( Boost_${UPPERCOMPONENT}_LIBRARY "Boost_${UPPERCOMPONENT}_LIBRARY-NOTFOUND" )
|
||||
SET( Boost_${UPPERCOMPONENT}_LIBRARY_RELEASE "Boost_${UPPERCOMPONENT}_LIBRARY_RELEASE-NOTFOUND" )
|
||||
SET( Boost_${UPPERCOMPONENT}_LIBRARY_DEBUG "Boost_${UPPERCOMPONENT}_LIBRARY_DEBUG-NOTFOUND")
|
||||
|
||||
# Support preference of static libs by adjusting CMAKE_FIND_LIBRARY_SUFFIXES
|
||||
IF( Boost_USE_STATIC_LIBS )
|
||||
SET( _boost_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES})
|
||||
IF(WIN32)
|
||||
SET(CMAKE_FIND_LIBRARY_SUFFIXES .lib .a ${CMAKE_FIND_LIBRARY_SUFFIXES})
|
||||
ELSE(WIN32)
|
||||
SET(CMAKE_FIND_LIBRARY_SUFFIXES .a ${CMAKE_FIND_LIBRARY_SUFFIXES})
|
||||
ENDIF(WIN32)
|
||||
ENDIF( Boost_USE_STATIC_LIBS )
|
||||
|
||||
# Find libraries (search in user defined directories first)
|
||||
SET ( _boost_${UPPERCOMPONENT}_LIBRARY_RELEASE_NAMES
|
||||
${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}-${Boost_LIB_VERSION}
|
||||
${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_STATIC_TAG}-${Boost_LIB_VERSION}
|
||||
${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}-${Boost_LIB_VERSION}
|
||||
${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_STATIC_TAG}-${Boost_LIB_VERSION}
|
||||
${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}
|
||||
${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_STATIC_TAG}
|
||||
${Boost_LIB_PREFIX}boost_${COMPONENT}
|
||||
)
|
||||
|
||||
FIND_LIBRARY(Boost_${UPPERCOMPONENT}_LIBRARY_RELEASE
|
||||
NAMES ${_boost_${UPPERCOMPONENT}_LIBRARY_RELEASE_NAMES}
|
||||
PATHS ${_boost_LIBRARIES_SEARCH_DIRS}
|
||||
NO_DEFAULT_PATH
|
||||
)
|
||||
|
||||
FIND_LIBRARY(Boost_${UPPERCOMPONENT}_LIBRARY_RELEASE
|
||||
NAMES ${_boost_${UPPERCOMPONENT}_LIBRARY_RELEASE_NAMES}
|
||||
)
|
||||
|
||||
|
||||
SET ( _boost_${UPPERCOMPONENT}_LIBRARY_DEBUG_NAMES
|
||||
${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}-${_boost_ABI_TAG}-${Boost_LIB_VERSION}
|
||||
${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_STATIC_TAG}${_boost_ABI_TAG}-${Boost_LIB_VERSION}
|
||||
${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}-${_boost_ABI_TAG}-${Boost_LIB_VERSION}
|
||||
${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_STATIC_TAG}${_boost_ABI_TAG}-${Boost_LIB_VERSION}
|
||||
${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}-${_boost_ABI_TAG}
|
||||
${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_STATIC_TAG}${_boost_ABI_TAG}
|
||||
${Boost_LIB_PREFIX}boost_${COMPONENT}-${_boost_ABI_TAG}
|
||||
)
|
||||
|
||||
FIND_LIBRARY(Boost_${UPPERCOMPONENT}_LIBRARY_DEBUG
|
||||
NAMES ${_boost_${UPPERCOMPONENT}_LIBRARY_DEBUG_NAMES}
|
||||
PATHS ${_boost_LIBRARIES_SEARCH_DIRS}
|
||||
NO_DEFAULT_PATH
|
||||
)
|
||||
|
||||
FIND_LIBRARY(Boost_${UPPERCOMPONENT}_LIBRARY_DEBUG
|
||||
NAMES ${_boost_${UPPERCOMPONENT}_LIBRARY_DEBUG_NAMES}
|
||||
)
|
||||
|
||||
_Boost_ADJUST_LIB_VARS(${UPPERCOMPONENT})
|
||||
IF( Boost_USE_STATIC_LIBS )
|
||||
SET(CMAKE_FIND_LIBRARY_SUFFIXES ${_boost_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES})
|
||||
ENDIF( Boost_USE_STATIC_LIBS )
|
||||
ENDFOREACH(COMPONENT)
|
||||
# ------------------------------------------------------------------------
|
||||
# End finding boost libraries
|
||||
# ------------------------------------------------------------------------
|
||||
|
||||
SET(Boost_INCLUDE_DIRS
|
||||
${Boost_INCLUDE_DIR}
|
||||
)
|
||||
|
||||
SET(Boost_FOUND FALSE)
|
||||
IF(Boost_INCLUDE_DIR)
|
||||
SET( Boost_FOUND TRUE )
|
||||
|
||||
# Check the version of Boost against the requested version.
|
||||
if (Boost_FIND_VERSION AND NOT Boost_FIND_VERSION_MINOR)
|
||||
message(SEND_ERROR "When requesting a specific version of Boost, you must provide at least the major and minor version numbers, e.g., 1.34")
|
||||
endif (Boost_FIND_VERSION AND NOT Boost_FIND_VERSION_MINOR)
|
||||
if(Boost_MAJOR_VERSION LESS "${Boost_FIND_VERSION_MAJOR}" )
|
||||
set( Boost_FOUND FALSE )
|
||||
set(_Boost_VERSION_AGE "old")
|
||||
elseif(Boost_MAJOR_VERSION EQUAL "${Boost_FIND_VERSION_MAJOR}" )
|
||||
if(Boost_MINOR_VERSION LESS "${Boost_FIND_VERSION_MINOR}" )
|
||||
set( Boost_FOUND FALSE )
|
||||
set(_Boost_VERSION_AGE "old")
|
||||
elseif(Boost_MINOR_VERSION EQUAL "${Boost_FIND_VERSION_MINOR}" )
|
||||
if( Boost_FIND_VERSION_PATCH AND Boost_SUBMINOR_VERSION LESS "${Boost_FIND_VERSION_PATCH}" )
|
||||
set( Boost_FOUND FALSE )
|
||||
set(_Boost_VERSION_AGE "old")
|
||||
endif( Boost_FIND_VERSION_PATCH AND Boost_SUBMINOR_VERSION LESS "${Boost_FIND_VERSION_PATCH}" )
|
||||
endif( Boost_MINOR_VERSION LESS "${Boost_FIND_VERSION_MINOR}" )
|
||||
endif( Boost_MAJOR_VERSION LESS "${Boost_FIND_VERSION_MAJOR}" )
|
||||
|
||||
if (Boost_FOUND AND Boost_FIND_VERSION_EXACT)
|
||||
# If the user requested an exact version of Boost, check
|
||||
# that. We already know that the Boost version we have is >= the
|
||||
# requested version.
|
||||
set(_Boost_VERSION_AGE "new")
|
||||
|
||||
# If the user didn't specify a patchlevel, it's 0.
|
||||
if (NOT Boost_FIND_VERSION_PATCH)
|
||||
set(Boost_FIND_VERSION_PATCH 0)
|
||||
endif (NOT Boost_FIND_VERSION_PATCH)
|
||||
|
||||
# We'll set Boost_FOUND true again if we have an exact version match.
|
||||
set(Boost_FOUND FALSE)
|
||||
if(Boost_MAJOR_VERSION EQUAL "${Boost_FIND_VERSION_MAJOR}" )
|
||||
if(Boost_MINOR_VERSION EQUAL "${Boost_FIND_VERSION_MINOR}" )
|
||||
if(Boost_SUBMINOR_VERSION EQUAL "${Boost_FIND_VERSION_PATCH}" )
|
||||
set( Boost_FOUND TRUE )
|
||||
endif(Boost_SUBMINOR_VERSION EQUAL "${Boost_FIND_VERSION_PATCH}" )
|
||||
endif( Boost_MINOR_VERSION EQUAL "${Boost_FIND_VERSION_MINOR}" )
|
||||
endif( Boost_MAJOR_VERSION EQUAL "${Boost_FIND_VERSION_MAJOR}" )
|
||||
endif (Boost_FOUND AND Boost_FIND_VERSION_EXACT)
|
||||
|
||||
if(NOT Boost_FOUND)
|
||||
# State that we found a version of Boost that is too new or too old.
|
||||
set(Boost_ERROR_REASON
|
||||
"${Boost_ERROR_REASON}\nDetected version of Boost is too ${_Boost_VERSION_AGE}. Requested version was ${Boost_FIND_VERSION_MAJOR}.${Boost_FIND_VERSION_MINOR}")
|
||||
if (Boost_FIND_VERSION_PATCH)
|
||||
set(Boost_ERROR_REASON
|
||||
"${Boost_ERROR_REASON}.${Boost_FIND_VERSION_PATCH}")
|
||||
endif (Boost_FIND_VERSION_PATCH)
|
||||
if (NOT Boost_FIND_VERSION_EXACT)
|
||||
set(Boost_ERROR_REASON "${Boost_ERROR_REASON} (or newer)")
|
||||
endif (NOT Boost_FIND_VERSION_EXACT)
|
||||
set(Boost_ERROR_REASON "${Boost_ERROR_REASON}.")
|
||||
endif (NOT Boost_FOUND)
|
||||
|
||||
if (Boost_FOUND)
|
||||
set(_boost_CHECKED_COMPONENT FALSE)
|
||||
set(_Boost_MISSING_COMPONENTS)
|
||||
foreach(COMPONENT ${Boost_FIND_COMPONENTS})
|
||||
string(TOUPPER ${COMPONENT} COMPONENT)
|
||||
set(_boost_CHECKED_COMPONENT TRUE)
|
||||
if(NOT Boost_${COMPONENT}_FOUND)
|
||||
string(TOLOWER ${COMPONENT} COMPONENT)
|
||||
list(APPEND _Boost_MISSING_COMPONENTS ${COMPONENT})
|
||||
set( Boost_FOUND FALSE)
|
||||
endif(NOT Boost_${COMPONENT}_FOUND)
|
||||
endforeach(COMPONENT)
|
||||
endif (Boost_FOUND)
|
||||
|
||||
if(Boost_DEBUG)
|
||||
message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] Boost_FOUND = ${Boost_FOUND}")
|
||||
endif()
|
||||
|
||||
if (_Boost_MISSING_COMPONENTS)
|
||||
# We were unable to find some libraries, so generate a sensible
|
||||
# error message that lists the libraries we were unable to find.
|
||||
set(Boost_ERROR_REASON
|
||||
"${Boost_ERROR_REASON}\nThe following Boost libraries could not be found:\n")
|
||||
foreach(COMPONENT ${_Boost_MISSING_COMPONENTS})
|
||||
set(Boost_ERROR_REASON
|
||||
"${Boost_ERROR_REASON} boost_${COMPONENT}\n")
|
||||
endforeach(COMPONENT)
|
||||
|
||||
list(LENGTH Boost_FIND_COMPONENTS Boost_NUM_COMPONENTS_WANTED)
|
||||
list(LENGTH _Boost_MISSING_COMPONENTS Boost_NUM_MISSING_COMPONENTS)
|
||||
if (${Boost_NUM_COMPONENTS_WANTED} EQUAL ${Boost_NUM_MISSING_COMPONENTS})
|
||||
set(Boost_ERROR_REASON
|
||||
"${Boost_ERROR_REASON}No Boost libraries were found. You may need to set Boost_LIBRARYDIR to the directory containing Boost libraries or BOOST_ROOT to the location of Boost.")
|
||||
else (${Boost_NUM_COMPONENTS_WANTED} EQUAL ${Boost_NUM_MISSING_COMPONENTS})
|
||||
set(Boost_ERROR_REASON
|
||||
"${Boost_ERROR_REASON}Some (but not all) of the required Boost libraries were found. You may need to install these additional Boost libraries. Alternatively, set Boost_LIBRARYDIR to the directory containing Boost libraries or BOOST_ROOT to the location of Boost.")
|
||||
endif (${Boost_NUM_COMPONENTS_WANTED} EQUAL ${Boost_NUM_MISSING_COMPONENTS})
|
||||
endif (_Boost_MISSING_COMPONENTS)
|
||||
|
||||
IF( NOT Boost_LIBRARY_DIRS AND NOT _boost_CHECKED_COMPONENT )
|
||||
# Compatibility Code for backwards compatibility with CMake
|
||||
# 2.4's FindBoost module.
|
||||
|
||||
# Look for the boost library path.
|
||||
# Note that the user may not have installed any libraries
|
||||
# so it is quite possible the Boost_LIBRARY_PATH may not exist.
|
||||
SET(_boost_LIB_DIR ${Boost_INCLUDE_DIR})
|
||||
|
||||
IF("${_boost_LIB_DIR}" MATCHES "boost-[0-9]+")
|
||||
GET_FILENAME_COMPONENT(_boost_LIB_DIR ${_boost_LIB_DIR} PATH)
|
||||
ENDIF ("${_boost_LIB_DIR}" MATCHES "boost-[0-9]+")
|
||||
|
||||
IF("${_boost_LIB_DIR}" MATCHES "/include$")
|
||||
# Strip off the trailing "/include" in the path.
|
||||
GET_FILENAME_COMPONENT(_boost_LIB_DIR ${_boost_LIB_DIR} PATH)
|
||||
ENDIF("${_boost_LIB_DIR}" MATCHES "/include$")
|
||||
|
||||
IF(EXISTS "${_boost_LIB_DIR}/lib")
|
||||
SET (_boost_LIB_DIR ${_boost_LIB_DIR}/lib)
|
||||
ELSE(EXISTS "${_boost_LIB_DIR}/lib")
|
||||
IF(EXISTS "${_boost_LIB_DIR}/stage/lib")
|
||||
SET(_boost_LIB_DIR ${_boost_LIB_DIR}/stage/lib)
|
||||
ELSE(EXISTS "${_boost_LIB_DIR}/stage/lib")
|
||||
SET(_boost_LIB_DIR "")
|
||||
ENDIF(EXISTS "${_boost_LIB_DIR}/stage/lib")
|
||||
ENDIF(EXISTS "${_boost_LIB_DIR}/lib")
|
||||
|
||||
IF(_boost_LIB_DIR AND EXISTS "${_boost_LIB_DIR}")
|
||||
SET(Boost_LIBRARY_DIRS ${_boost_LIB_DIR} CACHE FILEPATH "Boost library directory")
|
||||
ENDIF(_boost_LIB_DIR AND EXISTS "${_boost_LIB_DIR}")
|
||||
|
||||
ENDIF( NOT Boost_LIBRARY_DIRS AND NOT _boost_CHECKED_COMPONENT )
|
||||
|
||||
ELSE(Boost_INCLUDE_DIR)
|
||||
SET( Boost_FOUND FALSE)
|
||||
ENDIF(Boost_INCLUDE_DIR)
|
||||
|
||||
IF (Boost_FOUND)
|
||||
IF (NOT Boost_FIND_QUIETLY)
|
||||
MESSAGE(STATUS "Boost version: ${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}.${Boost_SUBMINOR_VERSION}")
|
||||
ENDIF(NOT Boost_FIND_QUIETLY)
|
||||
IF (NOT Boost_FIND_QUIETLY)
|
||||
MESSAGE(STATUS "Found the following Boost libraries:")
|
||||
ENDIF(NOT Boost_FIND_QUIETLY)
|
||||
FOREACH ( COMPONENT ${Boost_FIND_COMPONENTS} )
|
||||
STRING( TOUPPER ${COMPONENT} UPPERCOMPONENT )
|
||||
IF ( Boost_${UPPERCOMPONENT}_FOUND )
|
||||
IF (NOT Boost_FIND_QUIETLY)
|
||||
MESSAGE (STATUS " ${COMPONENT}")
|
||||
ENDIF(NOT Boost_FIND_QUIETLY)
|
||||
SET(Boost_LIBRARIES ${Boost_LIBRARIES} ${Boost_${UPPERCOMPONENT}_LIBRARY})
|
||||
ENDIF ( Boost_${UPPERCOMPONENT}_FOUND )
|
||||
ENDFOREACH(COMPONENT)
|
||||
ELSE (Boost_FOUND)
|
||||
IF (Boost_FIND_REQUIRED)
|
||||
message(SEND_ERROR "Unable to find the requested Boost libraries.\n${Boost_ERROR_REASON}")
|
||||
ENDIF(Boost_FIND_REQUIRED)
|
||||
ENDIF(Boost_FOUND)
|
||||
|
||||
# show the Boost_INCLUDE_DIRS AND Boost_LIBRARIES variables only in the advanced view
|
||||
MARK_AS_ADVANCED(Boost_INCLUDE_DIR
|
||||
Boost_INCLUDE_DIRS
|
||||
Boost_LIBRARY_DIRS
|
||||
)
|
||||
ENDIF(_boost_IN_CACHE)
|
||||
|
||||
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
# CORE needs GMP
|
||||
|
||||
include(CGAL_FindPackageHandleStandardArgs)
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
|
||||
if(GMP_FOUND)
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
# TODO: support Windows and MacOSX
|
||||
|
||||
# CORE needs GMP
|
||||
include(CGAL_FindPackageHandleStandardArgs)
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
if(GMP_FOUND)
|
||||
if (CORE_INCLUDE_DIR AND CORE_LIBRARIES)
|
||||
|
|
|
|||
|
|
@ -57,9 +57,17 @@ set(EIGEN3_USE_FILE "UseEigen3")
|
|||
|
||||
if (EIGEN3_INCLUDE_DIR)
|
||||
|
||||
# in cache already
|
||||
_eigen3_check_version()
|
||||
set(EIGEN3_FOUND ${EIGEN3_VERSION_OK})
|
||||
if (EXISTS ${EIGEN3_INCLUDE_DIR}/signature_of_eigen3_matrix_library)
|
||||
# in cache already and valid
|
||||
_eigen3_check_version()
|
||||
set(EIGEN3_FOUND ${EIGEN3_VERSION_OK})
|
||||
else()
|
||||
message(STATUS "Eigen3 path specified in cmake variable EIGEN3_INCLUDE_DIR is "
|
||||
"set to ${EIGEN3_INCLUDE_DIR}, but that path does not contains the file "
|
||||
"signature_of_eigen3_matrix_library and is considered as invalid.")
|
||||
endif()
|
||||
|
||||
|
||||
|
||||
else (EIGEN3_INCLUDE_DIR)
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
# TODO: support MacOSX
|
||||
|
||||
include(CGAL_FindPackageHandleStandardArgs)
|
||||
include(FindPackageHandleStandardArgs)
|
||||
include(CGAL_GeneratorSpecificSettings)
|
||||
|
||||
if(GMP_INCLUDE_DIR)
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ if(GMP_FOUND)
|
|||
DOC "Path to the GMPXX library"
|
||||
)
|
||||
|
||||
include(CGAL_FindPackageHandleStandardArgs)
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
find_package_handle_standard_args(GMPXX "DEFAULT_MSG" GMPXX_LIBRARIES GMPXX_INCLUDE_DIR )
|
||||
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ if( GMP_FOUND )
|
|||
include( MPFIConfig OPTIONAL )
|
||||
endif( NOT MPFI_INCLUDE_DIR OR NOT MPFI_LIBRARIES_DIR )
|
||||
|
||||
include(CGAL_FindPackageHandleStandardArgs)
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
find_package_handle_standard_args(MPFI "DEFAULT_MSG" MPFI_LIBRARIES MPFI_INCLUDE_DIR )
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
# TODO: support MacOSX
|
||||
|
||||
include(CGAL_FindPackageHandleStandardArgs)
|
||||
include(FindPackageHandleStandardArgs)
|
||||
include(CGAL_GeneratorSpecificSettings)
|
||||
|
||||
if(MPFR_INCLUDE_DIR)
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ else( NOT GMP_FOUND )
|
|||
|
||||
get_filename_component(NTL_LIBRARIES_DIR ${NTL_LIBRARIES} PATH CACHE )
|
||||
|
||||
include(CGAL_FindPackageHandleStandardArgs)
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
find_package_handle_standard_args( NTL
|
||||
DEFAULT_MSG
|
||||
|
|
|
|||
|
|
@ -28,4 +28,4 @@ if ( NOT FIND_OPENGL_WRAPPER )
|
|||
|
||||
set(CMAKE_MODULE_PATH ${SAVED_CMAKE_MODULE_PATH} )
|
||||
|
||||
endif()
|
||||
endif()
|
||||
|
|
|
|||
|
|
@ -1,35 +0,0 @@
|
|||
# FIND_PACKAGE_MESSAGE(<name> "message for user" "find result details")
|
||||
#
|
||||
# This macro is intended to be used in FindXXX.cmake modules files.
|
||||
# It will print a message once for each unique find result.
|
||||
# This is useful for telling the user where a package was found.
|
||||
# The first argument specifies the name (XXX) of the package.
|
||||
# The second argument specifies the message to display.
|
||||
# The third argument lists details about the find result so that
|
||||
# if they change the message will be displayed again.
|
||||
# The macro also obeys the QUIET argument to the find_package command.
|
||||
#
|
||||
# Example:
|
||||
#
|
||||
# IF(X11_FOUND)
|
||||
# FIND_PACKAGE_MESSAGE(X11 "Found X11: ${X11_X11_LIB}"
|
||||
# "[${X11_X11_LIB}][${X11_INCLUDE_DIR}]")
|
||||
# ELSE(X11_FOUND)
|
||||
# ...
|
||||
# ENDIF(X11_FOUND)
|
||||
|
||||
macro(FIND_PACKAGE_MESSAGE pkg msg details)
|
||||
# Avoid printing a message repeatedly for the same find result.
|
||||
IF(NOT ${pkg}_FIND_QUIETLY)
|
||||
SET(DETAILS_VAR FIND_PACKAGE_MESSAGE_DETAILS_${pkg})
|
||||
IF(NOT "${details}" STREQUAL "${${DETAILS_VAR}}")
|
||||
# The message has not yet been printed.
|
||||
MESSAGE(STATUS "${msg}")
|
||||
|
||||
# Save the find details in the cache to avoid printing the same
|
||||
# message again.
|
||||
SET("${DETAILS_VAR}" "${details}"
|
||||
CACHE INTERNAL "Details about finding ${pkg}")
|
||||
ENDIF(NOT "${details}" STREQUAL "${${DETAILS_VAR}}")
|
||||
ENDIF(NOT ${pkg}_FIND_QUIETLY)
|
||||
endmacro(FIND_PACKAGE_MESSAGE)
|
||||
|
|
@ -62,7 +62,7 @@ if( MPFI_FOUND )
|
|||
include( RSConfig OPTIONAL )
|
||||
endif( NOT RS_INCLUDE_DIR OR NOT RS_LIBRARIES_DIR )
|
||||
|
||||
include(CGAL_FindPackageHandleStandardArgs)
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
find_package_handle_standard_args( RS
|
||||
"DEFAULT_MSG"
|
||||
|
|
|
|||
|
|
@ -1,60 +0,0 @@
|
|||
// Copyright (c) 1998
|
||||
// Utrecht University (The Netherlands),
|
||||
// ETH Zurich (Switzerland),
|
||||
// INRIA Sophia-Antipolis (France),
|
||||
// Max-Planck-Institute Saarbruecken (Germany),
|
||||
// and Tel-Aviv University (Israel). All rights reserved.
|
||||
//
|
||||
// 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; either version 3 of the License,
|
||||
// or (at your option) any later version.
|
||||
//
|
||||
// Licensees holding a valid commercial license may use this file in
|
||||
// accordance with the commercial license agreement provided with the software.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
//
|
||||
// $URL$
|
||||
// $Id$
|
||||
//
|
||||
//
|
||||
// Author(s) : Lutz Kettner
|
||||
|
||||
//| Nested templates in template parameter, such as 'template <
|
||||
//| template <class T> class A>' are not supported by any compiler.
|
||||
//| The following definition is set if they are not supported.
|
||||
|
||||
template< class X>
|
||||
struct A {
|
||||
X i;
|
||||
A( X j) : i(j) {}
|
||||
};
|
||||
|
||||
template< template < class T> class B>
|
||||
struct C {
|
||||
B<int> b;
|
||||
C( int i) : b(i) {}
|
||||
};
|
||||
|
||||
template< class N, template < class T> class B>
|
||||
struct D {
|
||||
B<N> b;
|
||||
D( N i) : b(i) {}
|
||||
};
|
||||
|
||||
template < template < class T > class HDS>
|
||||
void fct(HDS<int> h1 ) {} // here it does not compile
|
||||
|
||||
template < template < class T > class HDS>
|
||||
void fct2(D<double,HDS> h1 ) {}
|
||||
|
||||
|
||||
int main() {
|
||||
C<A> c(1);
|
||||
D< double, A> d( 3.8);
|
||||
(void) c;
|
||||
fct2(d);
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -336,7 +336,7 @@ If it is not already on your system,
|
|||
e.g., on Windows, you can download it from \zlibpage.
|
||||
|
||||
|
||||
\subsection{ESTBL \label{thirdparty:ESTBL}}
|
||||
\subsection{ESBTL \label{thirdparty:ESBTL}}
|
||||
|
||||
The \textsc{Esbtl} (Easy Structural Biology Template Library) is a library that allows
|
||||
the handling of \textsc{Pdb} data.
|
||||
|
|
|
|||
|
|
@ -155,11 +155,16 @@ CGAL_VERSION: Defined in <CGAL/version.h>
|
|||
// vc90:
|
||||
# define CGAL_LIB_TOOLSET "vc90"
|
||||
|
||||
#elif defined(BOOST_MSVC) && (BOOST_MSVC >= 1600)
|
||||
#elif defined(BOOST_MSVC) && (BOOST_MSVC == 1600)
|
||||
|
||||
// vc10:
|
||||
# define CGAL_LIB_TOOLSET "vc100"
|
||||
|
||||
#elif defined(BOOST_MSVC) && (BOOST_MSVC >= 1700)
|
||||
|
||||
// vc11:
|
||||
# define CGAL_LIB_TOOLSET "vc110"
|
||||
|
||||
#elif defined(__BORLANDC__)
|
||||
|
||||
// CBuilder 6:
|
||||
|
|
|
|||
|
|
@ -173,11 +173,6 @@
|
|||
# ifdef _RWSTD_NO_CLASS_PARTIAL_SPEC
|
||||
# error "CGAL does not support SunPRO with the old Rogue Wave STL: use STLPort."
|
||||
# endif
|
||||
|
||||
// Sun CC has an issue with templates that means overloading
|
||||
// Qualified_result_of does not work so well.
|
||||
# define CGAL_CFG_DONT_OVERLOAD_TOO_MUCH 1
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef __SUNPRO_CC
|
||||
|
|
|
|||
|
|
@ -156,26 +156,36 @@ t3s3_intersection_collinear_aux(const typename K::Point_3& a,
|
|||
|
||||
typename K::Equal_3 equals = k.equal_3_object();
|
||||
|
||||
// possible orders: [p,a,b,q], [p,a,q,b], [a,p,b,q], [a,p,q,b]
|
||||
if ( collinear_ordered(p,a,q) )
|
||||
// possible orders: [p,a,b,q], [p,a,q,b], [p,q,a,b], [a,p,b,q], [a,p,q,b], [a,b,p,q]
|
||||
if ( collinear_ordered(p,a,b) )
|
||||
{
|
||||
// p is before a
|
||||
if ( collinear_ordered(p,b,q) )
|
||||
return make_object(segment(a,b));
|
||||
else
|
||||
return equals(a,q)?
|
||||
make_object(a):
|
||||
make_object(segment(a,q));
|
||||
//possible orders: [p,a,b,q], [p,a,q,b], [p,q,a,b]
|
||||
if ( collinear_ordered(a,b,q) )
|
||||
return make_object(segment(a,b)); //[p,a,b,q]
|
||||
else{
|
||||
if ( collinear_ordered(q,a,b) )
|
||||
return equals(a,q)? //[p,q,a,b]
|
||||
make_object(a):
|
||||
Object();
|
||||
return make_object(segment(a,q)); //[p,a,q,b]
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// p is after a
|
||||
//possible orders: [a,p,b,q], [a,p,q,b], [a,b,p,q]
|
||||
if ( collinear_ordered(p,b,q) )
|
||||
return equals(p,b)?
|
||||
return equals(p,b)? // [a,p,b,q]
|
||||
make_object(p):
|
||||
make_object(segment(p,b));
|
||||
else
|
||||
return make_object(segment(p,q));
|
||||
else{
|
||||
if ( collinear_ordered(a,b,p) )
|
||||
return equals(p,b)? // [a,b,p,q]
|
||||
make_object(p):
|
||||
Object();
|
||||
return make_object(segment(p,q)); // [a,p,q,b]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -681,10 +681,12 @@ int main()
|
|||
// b &= test_kernel<CGAL::Simple_cartesian<double> >(true);
|
||||
|
||||
// std::cout << std::endl << "Testing with Simple_cartesian<Gmpq>..." << std::endl ;
|
||||
// b &= test_kernel<CGAL::Simple_cartesian<CGAL::Gmpq> >(true);
|
||||
// b &= test<CGAL::Simple_cartesian<CGAL::Gmpq> >(true);
|
||||
// test_speed<CGAL::Simple_cartesian<CGAL::Gmpq> >();
|
||||
|
||||
// std::cout << std::endl << "Testing with Cartesian<float>..." << std::endl ;
|
||||
// b &= test_kernel<CGAL::Cartesian<float> >(false);
|
||||
// b &= test<CGAL::Cartesian<float> >(false);
|
||||
// test_speed<CGAL::Cartesian<float> >();
|
||||
|
||||
// std::cout << std::endl << "Testing with Cartesian<double>..." << std::endl ;
|
||||
// b &= test_kernel<CGAL::Cartesian<double> >(true);
|
||||
|
|
@ -692,7 +694,8 @@ int main()
|
|||
// std::cout << std::endl << "Testing with Filtered_kernel<Simple_cartesian<double> > without static filters..." << std::endl ;
|
||||
// typedef CGAL::Filtered_kernel<CGAL::Simple_cartesian<double>, false> Fk_no_static;
|
||||
// b &= test_kernel<Fk_no_static>();
|
||||
|
||||
// test_speed<Fk_no_static>();
|
||||
|
||||
std::cout << std::endl << "Testing with Exact_predicates_inexact_constructions_kernel..." << std::endl ;
|
||||
b &= test_kernel<CGAL::Exact_predicates_inexact_constructions_kernel>();
|
||||
|
||||
|
|
|
|||
|
|
@ -216,15 +216,20 @@ void random_test()
|
|||
// Precomputed results test
|
||||
// -----------------------------------
|
||||
template <class Triangle, class Query, class Result>
|
||||
bool test_aux(const Triangle t,
|
||||
bool test_aux(bool is_kernel_exact,
|
||||
const Triangle t,
|
||||
const Query& q,
|
||||
const std::string& name,
|
||||
const Result& expected)
|
||||
const Result& expected,
|
||||
double sq_espilon = 1e-20)
|
||||
{
|
||||
CGAL::Object object = CGAL::intersection(t,q);
|
||||
const Result* pr = CGAL::object_cast<Result>(&object);
|
||||
|
||||
if ( (NULL != pr) && (expected == *pr) )
|
||||
if ( (NULL != pr) &&
|
||||
(is_kernel_exact ?
|
||||
(expected == *pr) :
|
||||
CGAL::to_double(CGAL::squared_distance(expected, *pr)) < sq_espilon ) )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
|
@ -243,7 +248,7 @@ bool test_aux(const Triangle t,
|
|||
}
|
||||
|
||||
template <class K>
|
||||
bool test()
|
||||
bool test(bool is_kernel_exact = true)
|
||||
{
|
||||
// types
|
||||
typedef typename K::FT FT;
|
||||
|
|
@ -281,10 +286,10 @@ bool test()
|
|||
Segment s32(p3,p2);
|
||||
Segment s31(p3,p1);
|
||||
|
||||
bool b = test_aux(t,s12,"t-s12",s12);
|
||||
b &= test_aux(t,s21,"t-s21",s21);
|
||||
b &= test_aux(t,s13,"t-s13",s13);
|
||||
b &= test_aux(t,s23,"t-s23",s23);
|
||||
bool b = test_aux(is_kernel_exact,t,s12,"t-s12",s12);
|
||||
b &= test_aux(is_kernel_exact,t,s21,"t-s21",s21);
|
||||
b &= test_aux(is_kernel_exact,t,s13,"t-s13",s13);
|
||||
b &= test_aux(is_kernel_exact,t,s23,"t-s23",s23);
|
||||
|
||||
// Inside points
|
||||
Point p4(FT(0.5), FT(0.5), FT(0.));
|
||||
|
|
@ -318,30 +323,30 @@ bool test()
|
|||
Segment s78(p7,p8);
|
||||
Segment s87(p8,p7);
|
||||
|
||||
b &= test_aux(t,s14,"t-s14",s14);
|
||||
b &= test_aux(t,s41,"t-s41",s41);
|
||||
b &= test_aux(t,s24,"t-s24",s24);
|
||||
b &= test_aux(t,s42,"t-s42",s42);
|
||||
b &= test_aux(t,s15,"t-s15",s15);
|
||||
b &= test_aux(t,s25,"t-s25",s25);
|
||||
b &= test_aux(t,s34,"t-s34",s34);
|
||||
b &= test_aux(t,s35,"t-s35",s35);
|
||||
b &= test_aux(t,s36,"t-s36",s36);
|
||||
b &= test_aux(t,s45,"t-s45",s45);
|
||||
b &= test_aux(t,s16,"t-s16",s16);
|
||||
b &= test_aux(t,s26,"t-s26",s26);
|
||||
b &= test_aux(t,s62,"t-s62",s62);
|
||||
b &= test_aux(t,s46,"t-s46",s46);
|
||||
b &= test_aux(t,s65,"t-s65",s65);
|
||||
b &= test_aux(t,s64,"t-s64",s64);
|
||||
b &= test_aux(t,s48,"t-s48",s48);
|
||||
b &= test_aux(t,s56,"t-s56",s56);
|
||||
b &= test_aux(t,s17,"t-t17",s17);
|
||||
b &= test_aux(t,s67,"t-t67",s67);
|
||||
b &= test_aux(t,s68,"t-s68",s68);
|
||||
b &= test_aux(t,s86,"t-s86",s86);
|
||||
b &= test_aux(t,s78,"t-t78",s78);
|
||||
b &= test_aux(t,s87,"t-t87",s87);
|
||||
b &= test_aux(is_kernel_exact,t,s14,"t-s14",s14);
|
||||
b &= test_aux(is_kernel_exact,t,s41,"t-s41",s41);
|
||||
b &= test_aux(is_kernel_exact,t,s24,"t-s24",s24);
|
||||
b &= test_aux(is_kernel_exact,t,s42,"t-s42",s42);
|
||||
b &= test_aux(is_kernel_exact,t,s15,"t-s15",s15);
|
||||
b &= test_aux(is_kernel_exact,t,s25,"t-s25",s25);
|
||||
b &= test_aux(is_kernel_exact,t,s34,"t-s34",s34);
|
||||
b &= test_aux(is_kernel_exact,t,s35,"t-s35",s35);
|
||||
b &= test_aux(is_kernel_exact,t,s36,"t-s36",s36);
|
||||
b &= test_aux(is_kernel_exact,t,s45,"t-s45",s45);
|
||||
b &= test_aux(is_kernel_exact,t,s16,"t-s16",s16);
|
||||
b &= test_aux(is_kernel_exact,t,s26,"t-s26",s26);
|
||||
b &= test_aux(is_kernel_exact,t,s62,"t-s62",s62);
|
||||
b &= test_aux(is_kernel_exact,t,s46,"t-s46",s46);
|
||||
b &= test_aux(is_kernel_exact,t,s65,"t-s65",s65);
|
||||
b &= test_aux(is_kernel_exact,t,s64,"t-s64",s64);
|
||||
b &= test_aux(is_kernel_exact,t,s48,"t-s48",s48);
|
||||
b &= test_aux(is_kernel_exact,t,s56,"t-s56",s56);
|
||||
b &= test_aux(is_kernel_exact,t,s17,"t-t17",s17);
|
||||
b &= test_aux(is_kernel_exact,t,s67,"t-t67",s67);
|
||||
b &= test_aux(is_kernel_exact,t,s68,"t-s68",s68);
|
||||
b &= test_aux(is_kernel_exact,t,s86,"t-s86",s86);
|
||||
b &= test_aux(is_kernel_exact,t,s78,"t-t78",s78);
|
||||
b &= test_aux(is_kernel_exact,t,s87,"t-t87",s87);
|
||||
|
||||
// Outside points (in triangle plane)
|
||||
Point pA(FT(-0.5), FT(1.), FT(0.5));
|
||||
|
|
@ -362,17 +367,17 @@ bool test()
|
|||
Segment s1F(p1,pF);
|
||||
Segment sF6(pF,p6);
|
||||
|
||||
b &= test_aux(t,sAB,"t-sAB",p2);
|
||||
b &= test_aux(t,sBC,"t-sBC",s46);
|
||||
b &= test_aux(t,s2E,"t-s2E",s26);
|
||||
b &= test_aux(t,sE2,"t-sE2",s62);
|
||||
b &= test_aux(t,s2A,"t-s2A",p2);
|
||||
b &= test_aux(t,s6E,"t-s6E",p6);
|
||||
b &= test_aux(t,sB8,"t-sB8",s48);
|
||||
b &= test_aux(t,sC8,"t-sC8",s68);
|
||||
b &= test_aux(t,s8C,"t-s8C",s86);
|
||||
b &= test_aux(t,s1F,"t-s1F",s13);
|
||||
b &= test_aux(t,sF6,"t-sF6",s36);
|
||||
b &= test_aux(is_kernel_exact,t,sAB,"t-sAB",p2);
|
||||
b &= test_aux(is_kernel_exact,t,sBC,"t-sBC",s46);
|
||||
b &= test_aux(is_kernel_exact,t,s2E,"t-s2E",s26);
|
||||
b &= test_aux(is_kernel_exact,t,sE2,"t-sE2",s62);
|
||||
b &= test_aux(is_kernel_exact,t,s2A,"t-s2A",p2);
|
||||
b &= test_aux(is_kernel_exact,t,s6E,"t-s6E",p6);
|
||||
b &= test_aux(is_kernel_exact,t,sB8,"t-sB8",s48);
|
||||
b &= test_aux(is_kernel_exact,t,sC8,"t-sC8",s68);
|
||||
b &= test_aux(is_kernel_exact,t,s8C,"t-s8C",s86);
|
||||
b &= test_aux(is_kernel_exact,t,s1F,"t-s1F",s13);
|
||||
b &= test_aux(is_kernel_exact,t,sF6,"t-sF6",s36);
|
||||
|
||||
// Outside triangle plane
|
||||
Point pa(FT(0.), FT(0.), FT(0.));
|
||||
|
|
@ -386,11 +391,11 @@ bool test()
|
|||
Segment sa8(pa,p8);
|
||||
Segment sb2(pb,p2);
|
||||
|
||||
b &= test_aux(t,sab,"t-sab",p1);
|
||||
b &= test_aux(t,sac,"t-sac",p6);
|
||||
b &= test_aux(t,sae,"t-sae",p8);
|
||||
b &= test_aux(t,sa8,"t-sa8",p8);
|
||||
b &= test_aux(t,sb2,"t-sb2",p2);
|
||||
b &= test_aux(is_kernel_exact,t,sab,"t-sab",p1);
|
||||
b &= test_aux(is_kernel_exact,t,sac,"t-sac",p6);
|
||||
b &= test_aux(is_kernel_exact,t,sae,"t-sae",p8);
|
||||
b &= test_aux(is_kernel_exact,t,sa8,"t-sa8",p8);
|
||||
b &= test_aux(is_kernel_exact,t,sb2,"t-sb2",p2);
|
||||
|
||||
// -----------------------------------
|
||||
// ray queries
|
||||
|
|
@ -401,10 +406,10 @@ bool test()
|
|||
Ray r13(p1,p3);
|
||||
Ray r23(p2,p3);
|
||||
|
||||
b &= test_aux(t,r12,"t-r12",s12);
|
||||
b &= test_aux(t,r21,"t-r21",s21);
|
||||
b &= test_aux(t,r13,"t-r13",s13);
|
||||
b &= test_aux(t,r23,"t-r23",s23);
|
||||
b &= test_aux(is_kernel_exact,t,r12,"t-r12",s12);
|
||||
b &= test_aux(is_kernel_exact,t,r21,"t-r21",s21);
|
||||
b &= test_aux(is_kernel_exact,t,r13,"t-r13",s13);
|
||||
b &= test_aux(is_kernel_exact,t,r23,"t-r23",s23);
|
||||
|
||||
// In triangle
|
||||
Point p9_(FT(0.), FT(0.5), FT(0.5));
|
||||
|
|
@ -432,26 +437,26 @@ bool test()
|
|||
Ray r68(p6,p8);
|
||||
Segment r89_res(p8,p9_);
|
||||
|
||||
b &= test_aux(t,r14,"t-r14",s12);
|
||||
b &= test_aux(t,r41,"t-r41",s41);
|
||||
b &= test_aux(t,r24,"t-r24",s21);
|
||||
b &= test_aux(t,r42,"t-r42",s42);
|
||||
b &= test_aux(t,r15,"t-r15",s15);
|
||||
b &= test_aux(t,r25,"t-r25",s23);
|
||||
b &= test_aux(t,r34,"t-r34",s34);
|
||||
b &= test_aux(t,r35,"t-r35",s32);
|
||||
b &= test_aux(t,r36,"t-r36",s31);
|
||||
b &= test_aux(t,r45,"t-r45",s45);
|
||||
b &= test_aux(t,r16,"t-r16",s13);
|
||||
b &= test_aux(t,r26,"t-r26",s26);
|
||||
b &= test_aux(t,r62,"t-r62",s62);
|
||||
b &= test_aux(t,r46,"t-r46",s46);
|
||||
b &= test_aux(t,r48,"t-r48",s46);
|
||||
b &= test_aux(t,r56,"t-r56",s56);
|
||||
b &= test_aux(t,r47,"t-r47",s45);
|
||||
b &= test_aux(t,r89,"t-t89",r89_res);
|
||||
b &= test_aux(t,r68,"t-r68",s64);
|
||||
b &= test_aux(t,r86,"t-r86",s86);
|
||||
b &= test_aux(is_kernel_exact,t,r14,"t-r14",s12);
|
||||
b &= test_aux(is_kernel_exact,t,r41,"t-r41",s41);
|
||||
b &= test_aux(is_kernel_exact,t,r24,"t-r24",s21);
|
||||
b &= test_aux(is_kernel_exact,t,r42,"t-r42",s42);
|
||||
b &= test_aux(is_kernel_exact,t,r15,"t-r15",s15);
|
||||
b &= test_aux(is_kernel_exact,t,r25,"t-r25",s23);
|
||||
b &= test_aux(is_kernel_exact,t,r34,"t-r34",s34);
|
||||
b &= test_aux(is_kernel_exact,t,r35,"t-r35",s32);
|
||||
b &= test_aux(is_kernel_exact,t,r36,"t-r36",s31);
|
||||
b &= test_aux(is_kernel_exact,t,r45,"t-r45",s45);
|
||||
b &= test_aux(is_kernel_exact,t,r16,"t-r16",s13);
|
||||
b &= test_aux(is_kernel_exact,t,r26,"t-r26",s26);
|
||||
b &= test_aux(is_kernel_exact,t,r62,"t-r62",s62);
|
||||
b &= test_aux(is_kernel_exact,t,r46,"t-r46",s46);
|
||||
b &= test_aux(is_kernel_exact,t,r48,"t-r48",s46);
|
||||
b &= test_aux(is_kernel_exact,t,r56,"t-r56",s56);
|
||||
b &= test_aux(is_kernel_exact,t,r47,"t-r47",s45);
|
||||
b &= test_aux(is_kernel_exact,t,r89,"t-t89",r89_res);
|
||||
b &= test_aux(is_kernel_exact,t,r68,"t-r68",s64);
|
||||
b &= test_aux(is_kernel_exact,t,r86,"t-r86",s86);
|
||||
|
||||
|
||||
// Outside points (in triangre prane)
|
||||
|
|
@ -467,17 +472,17 @@ bool test()
|
|||
Ray r1F(p1,pF);
|
||||
Ray rF6(pF,p6);
|
||||
|
||||
b &= test_aux(t,rAB,"t-rAB",p2);
|
||||
b &= test_aux(t,rBC,"t-rBC",s46);
|
||||
b &= test_aux(t,r2E,"t-r2E",s26);
|
||||
b &= test_aux(t,rE2,"t-rE2",s62);
|
||||
b &= test_aux(t,r2A,"t-r2A",p2);
|
||||
b &= test_aux(t,r6E,"t-r6E",p6);
|
||||
b &= test_aux(t,rB8,"t-rB8",s46);
|
||||
b &= test_aux(t,rC8,"t-rC8",s64);
|
||||
b &= test_aux(t,r8C,"t-r8C",s86);
|
||||
b &= test_aux(t,r1F,"t-r1F",s13);
|
||||
b &= test_aux(t,rF6,"t-rF6",s31);
|
||||
b &= test_aux(is_kernel_exact,t,rAB,"t-rAB",p2);
|
||||
b &= test_aux(is_kernel_exact,t,rBC,"t-rBC",s46);
|
||||
b &= test_aux(is_kernel_exact,t,r2E,"t-r2E",s26);
|
||||
b &= test_aux(is_kernel_exact,t,rE2,"t-rE2",s62);
|
||||
b &= test_aux(is_kernel_exact,t,r2A,"t-r2A",p2);
|
||||
b &= test_aux(is_kernel_exact,t,r6E,"t-r6E",p6);
|
||||
b &= test_aux(is_kernel_exact,t,rB8,"t-rB8",s46);
|
||||
b &= test_aux(is_kernel_exact,t,rC8,"t-rC8",s64);
|
||||
b &= test_aux(is_kernel_exact,t,r8C,"t-r8C",s86);
|
||||
b &= test_aux(is_kernel_exact,t,r1F,"t-r1F",s13);
|
||||
b &= test_aux(is_kernel_exact,t,rF6,"t-rF6",s31);
|
||||
|
||||
// Outside triangle plane
|
||||
Ray rab(pa,pb);
|
||||
|
|
@ -486,11 +491,11 @@ bool test()
|
|||
Ray ra8(pa,p8);
|
||||
Ray rb2(pb,p2);
|
||||
|
||||
b &= test_aux(t,rab,"t-rab",p1);
|
||||
b &= test_aux(t,rac,"t-rac",p6);
|
||||
b &= test_aux(t,rae,"t-rae",p8);
|
||||
b &= test_aux(t,ra8,"t-ra8",p8);
|
||||
b &= test_aux(t,rb2,"t-rb2",p2);
|
||||
b &= test_aux(is_kernel_exact,t,rab,"t-rab",p1);
|
||||
b &= test_aux(is_kernel_exact,t,rac,"t-rac",p6);
|
||||
b &= test_aux(is_kernel_exact,t,rae,"t-rae",p8);
|
||||
b &= test_aux(is_kernel_exact,t,ra8,"t-ra8",p8);
|
||||
b &= test_aux(is_kernel_exact,t,rb2,"t-rb2",p2);
|
||||
|
||||
// -----------------------------------
|
||||
// Line queries
|
||||
|
|
@ -501,10 +506,10 @@ bool test()
|
|||
Line l13(p1,p3);
|
||||
Line l23(p2,p3);
|
||||
|
||||
b &= test_aux(t,l12,"t-l12",s12);
|
||||
b &= test_aux(t,l21,"t-l21",s21);
|
||||
b &= test_aux(t,l13,"t-l13",s13);
|
||||
b &= test_aux(t,l23,"t-l23",s23);
|
||||
b &= test_aux(is_kernel_exact,t,l12,"t-l12",s12);
|
||||
b &= test_aux(is_kernel_exact,t,l21,"t-l21",s21);
|
||||
b &= test_aux(is_kernel_exact,t,l13,"t-l13",s13);
|
||||
b &= test_aux(is_kernel_exact,t,l23,"t-l23",s23);
|
||||
|
||||
// In triangle
|
||||
Line l14(p1,p4);
|
||||
|
|
@ -530,26 +535,26 @@ bool test()
|
|||
Segment l89_res(p1,p9_);
|
||||
|
||||
|
||||
b &= test_aux(t,l14,"t-l14",s12);
|
||||
b &= test_aux(t,l41,"t-l41",s21);
|
||||
b &= test_aux(t,l24,"t-l24",s21);
|
||||
b &= test_aux(t,l42,"t-l42",s12);
|
||||
b &= test_aux(t,l15,"t-l15",s15);
|
||||
b &= test_aux(t,l25,"t-l25",s23);
|
||||
b &= test_aux(t,l34,"t-l34",s34);
|
||||
b &= test_aux(t,l35,"t-l35",s32);
|
||||
b &= test_aux(t,l36,"t-l36",s31);
|
||||
b &= test_aux(t,l45,"t-l45",s45);
|
||||
b &= test_aux(t,l16,"t-l16",s13);
|
||||
b &= test_aux(t,l26,"t-l26",s26);
|
||||
b &= test_aux(t,l62,"t-l62",s62);
|
||||
b &= test_aux(t,l46,"t-l46",s46);
|
||||
b &= test_aux(t,l48,"t-l48",s46);
|
||||
b &= test_aux(t,l56,"t-l56",s56);
|
||||
b &= test_aux(t,l47,"t-l47",s45);
|
||||
b &= test_aux(t,l89,"t-t89",l89_res);
|
||||
b &= test_aux(t,l68,"t-l68",s64);
|
||||
b &= test_aux(t,l86,"t-l86",s46);
|
||||
b &= test_aux(is_kernel_exact,t,l14,"t-l14",s12);
|
||||
b &= test_aux(is_kernel_exact,t,l41,"t-l41",s21);
|
||||
b &= test_aux(is_kernel_exact,t,l24,"t-l24",s21);
|
||||
b &= test_aux(is_kernel_exact,t,l42,"t-l42",s12);
|
||||
b &= test_aux(is_kernel_exact,t,l15,"t-l15",s15);
|
||||
b &= test_aux(is_kernel_exact,t,l25,"t-l25",s23);
|
||||
b &= test_aux(is_kernel_exact,t,l34,"t-l34",s34);
|
||||
b &= test_aux(is_kernel_exact,t,l35,"t-l35",s32);
|
||||
b &= test_aux(is_kernel_exact,t,l36,"t-l36",s31);
|
||||
b &= test_aux(is_kernel_exact,t,l45,"t-l45",s45);
|
||||
b &= test_aux(is_kernel_exact,t,l16,"t-l16",s13);
|
||||
b &= test_aux(is_kernel_exact,t,l26,"t-l26",s26);
|
||||
b &= test_aux(is_kernel_exact,t,l62,"t-l62",s62);
|
||||
b &= test_aux(is_kernel_exact,t,l46,"t-l46",s46);
|
||||
b &= test_aux(is_kernel_exact,t,l48,"t-l48",s46);
|
||||
b &= test_aux(is_kernel_exact,t,l56,"t-l56",s56);
|
||||
b &= test_aux(is_kernel_exact,t,l47,"t-l47",s45);
|
||||
b &= test_aux(is_kernel_exact,t,l89,"t-t89",l89_res);
|
||||
b &= test_aux(is_kernel_exact,t,l68,"t-l68",s64);
|
||||
b &= test_aux(is_kernel_exact,t,l86,"t-l86",s46);
|
||||
|
||||
|
||||
// Outside points (in triangle plane)
|
||||
|
|
@ -565,17 +570,17 @@ bool test()
|
|||
Line l1F(p1,pF);
|
||||
Line lF6(pF,p6);
|
||||
|
||||
b &= test_aux(t,lAB,"t-lAB",p2);
|
||||
b &= test_aux(t,lBC,"t-lBC",s46);
|
||||
b &= test_aux(t,l2E,"t-l2E",s26);
|
||||
b &= test_aux(t,lE2,"t-lE2",s62);
|
||||
b &= test_aux(t,l2A,"t-l2A",p2);
|
||||
b &= test_aux(t,l6E,"t-l6E",s26);
|
||||
b &= test_aux(t,lB8,"t-lB8",s46);
|
||||
b &= test_aux(t,lC8,"t-lC8",s64);
|
||||
b &= test_aux(t,l8C,"t-l8C",s46);
|
||||
b &= test_aux(t,l1F,"t-l1F",s13);
|
||||
b &= test_aux(t,lF6,"t-lF6",s31);
|
||||
b &= test_aux(is_kernel_exact,t,lAB,"t-lAB",p2);
|
||||
b &= test_aux(is_kernel_exact,t,lBC,"t-lBC",s46);
|
||||
b &= test_aux(is_kernel_exact,t,l2E,"t-l2E",s26);
|
||||
b &= test_aux(is_kernel_exact,t,lE2,"t-lE2",s62);
|
||||
b &= test_aux(is_kernel_exact,t,l2A,"t-l2A",p2);
|
||||
b &= test_aux(is_kernel_exact,t,l6E,"t-l6E",s26);
|
||||
b &= test_aux(is_kernel_exact,t,lB8,"t-lB8",s46);
|
||||
b &= test_aux(is_kernel_exact,t,lC8,"t-lC8",s64);
|
||||
b &= test_aux(is_kernel_exact,t,l8C,"t-l8C",s46);
|
||||
b &= test_aux(is_kernel_exact,t,l1F,"t-l1F",s13);
|
||||
b &= test_aux(is_kernel_exact,t,lF6,"t-lF6",s31);
|
||||
|
||||
// Outside triangle plane
|
||||
Line lab(pa,pb);
|
||||
|
|
@ -584,11 +589,11 @@ bool test()
|
|||
Line la8(pa,p8);
|
||||
Line lb2(pb,p2);
|
||||
|
||||
b &= test_aux(t,lab,"t-lab",p1);
|
||||
b &= test_aux(t,lac,"t-lac",p6);
|
||||
b &= test_aux(t,lae,"t-lae",p8);
|
||||
b &= test_aux(t,la8,"t-la8",p8);
|
||||
b &= test_aux(t,lb2,"t-lb2",p2);
|
||||
b &= test_aux(is_kernel_exact,t,lab,"t-lab",p1);
|
||||
b &= test_aux(is_kernel_exact,t,lac,"t-lac",p6);
|
||||
b &= test_aux(is_kernel_exact,t,lae,"t-lae",p8);
|
||||
b &= test_aux(is_kernel_exact,t,la8,"t-la8",p8);
|
||||
b &= test_aux(is_kernel_exact,t,lb2,"t-lb2",p2);
|
||||
|
||||
|
||||
return b;
|
||||
|
|
@ -606,23 +611,28 @@ int main()
|
|||
// -----------------------------------
|
||||
std::cout << "Test precomputed intersection results" << std::endl;
|
||||
std::cout << "\tTesting with Simple_cartesian<float>..." << std::endl ;
|
||||
bool b = test<Sc_f>();
|
||||
bool b = test<Sc_f>(false);
|
||||
|
||||
std::cout << "\tTesting with Simple_cartesian<double>..." << std::endl ;
|
||||
b &= test<Sc_d>();
|
||||
b &= test<Sc_d>(false);
|
||||
|
||||
std::cout << "\tTesting with Cartesian<float>..." << std::endl ;
|
||||
b &= test<C_f>();
|
||||
b &= test<C_f>(false);
|
||||
|
||||
std::cout << "\tTesting with Cartesian<double>..." << std::endl ;
|
||||
b &= test<C_d>();
|
||||
b &= test<C_d>(false);
|
||||
|
||||
std::cout << "\tTesting with Exact_predicates_inexact_constructions_kernel..." << std::endl ;
|
||||
b &= test<Epic>();
|
||||
b &= test<Epic>(false);
|
||||
|
||||
std::cout << "\tTesting with Exact_predicates_exact_constructions_kernel..." << std::endl ;
|
||||
b &= test<Epec>();
|
||||
|
||||
b &= test<Epec>(true);
|
||||
//test with a coplanar segment
|
||||
b &= CGAL::intersection(
|
||||
Epec::Segment_3(Epec::Point_3(0.125, 0, -0.125),Epec::Point_3(0.25, 0, -0.125) ),
|
||||
Epec::Triangle_3( Epec::Point_3(0.2500001, 0, -0.125),
|
||||
Epec::Point_3(1.0278171, 0, -0.125) /* vertex 10*/,
|
||||
Epec::Point_3(1.0278171, 0, -0.250001) /* vertex 9*/ ) ).empty();
|
||||
// -----------------------------------
|
||||
// Test random intersection
|
||||
// -----------------------------------
|
||||
|
|
|
|||
|
|
@ -1,14 +1,14 @@
|
|||
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
|
||||
#include <CGAL/Delaunay_triangulation_2.h>
|
||||
#include <CGAL/Triangulation_euclidean_traits_xy_3.h>
|
||||
#include <CGAL/Projection_traits_xy_3.h>
|
||||
#include <CGAL/Interval_skip_list.h>
|
||||
#include <CGAL/Level_interval.h>
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
|
||||
typedef CGAL::Exact_predicates_inexact_constructions_kernel EIK;
|
||||
typedef CGAL::Exact_predicates_inexact_constructions_kernel EIK;
|
||||
typedef EIK::Point_3 Point_3;
|
||||
typedef CGAL::Triangulation_euclidean_traits_xy_3<EIK> K;
|
||||
typedef CGAL::Projection_traits_xy_3<EIK> K;
|
||||
typedef CGAL::Delaunay_triangulation_2<K> Delaunay;
|
||||
typedef Delaunay::Face_handle Face_handle;
|
||||
typedef Delaunay::Finite_faces_iterator Finite_faces_iterator;
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue