mirror of https://github.com/CGAL/cgal
Merge remote-tracking branch 'cgal/master' into liangliang_master
This commit is contained in:
commit
7155df2743
|
|
@ -64,7 +64,7 @@ before_script:
|
|||
- sudo chmod +x /usr/bin/doxygen
|
||||
- mkdir -p build
|
||||
- cd build
|
||||
- /usr/bin/time -f 'Spend time of %C -- %E (real)' cmake -DCMAKE_CXX_FLAGS="-std=c++11" -DCGAL_HEADER_ONLY=ON -DCMAKE_CXX_FLAGS_RELEASE=-DCGAL_NDEBUG -DWITH_examples=ON -DWITH_demos=ON -DWITH_tests=ON ..
|
||||
- /usr/bin/time -f 'Spend time of %C -- %E (real)' cmake -DCMAKE_CXX_FLAGS="-std=c++1y" -DCGAL_HEADER_ONLY=ON -DCMAKE_CXX_FLAGS_RELEASE=-DCGAL_NDEBUG -DWITH_examples=ON -DWITH_demos=ON -DWITH_tests=ON ..
|
||||
- /usr/bin/time -f 'Spend time of %C -- %E (real)' make
|
||||
- /usr/bin/time -f 'Spend time of %C -- %E (real)' sudo make install &>/dev/null
|
||||
- cd ..
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ before_script:
|
|||
- sudo chmod +x /usr/bin/doxygen
|
||||
- mkdir -p build
|
||||
- cd build
|
||||
- /usr/bin/time -f 'Spend time of %C -- %E (real)' cmake -DCMAKE_CXX_FLAGS="-std=c++11" -DCGAL_HEADER_ONLY=ON -DCMAKE_CXX_FLAGS_RELEASE=-DCGAL_NDEBUG -DWITH_examples=ON -DWITH_demos=ON -DWITH_tests=ON ..
|
||||
- /usr/bin/time -f 'Spend time of %C -- %E (real)' cmake -DCMAKE_CXX_FLAGS="-std=c++1y" -DCGAL_HEADER_ONLY=ON -DCMAKE_CXX_FLAGS_RELEASE=-DCGAL_NDEBUG -DWITH_examples=ON -DWITH_demos=ON -DWITH_tests=ON ..
|
||||
- /usr/bin/time -f 'Spend time of %C -- %E (real)' make
|
||||
- /usr/bin/time -f 'Spend time of %C -- %E (real)' sudo make install &>/dev/null
|
||||
- cd ..
|
||||
|
|
|
|||
|
|
@ -1,19 +1,9 @@
|
|||
# Created by the script cgal_create_CMakeLists
|
||||
# This is the CMake script for compiling a set of CGAL applications.
|
||||
|
||||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
project( AABB_traits_benchmark)
|
||||
|
||||
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
cmake_policy(VERSION 3.1)
|
||||
|
||||
|
||||
if ( COMMAND cmake_policy )
|
||||
|
||||
cmake_policy( SET CMP0003 NEW )
|
||||
|
||||
endif()
|
||||
|
||||
# CGAL and its components
|
||||
find_package( CGAL QUIET)
|
||||
if ( CGAL_FOUND )
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
# This is the CMake script for compiling the AABB tree demo.
|
||||
|
||||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
project( AABB_tree_Demo )
|
||||
|
||||
# Find includes in corresponding build directories
|
||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||
# Instruct CMake to run moc automatically when needed.
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
if(NOT POLICY CMP0070 AND POLICY CMP0053)
|
||||
# Only set CMP0053 to OLD with CMake<3.10, otherwise there is a warning.
|
||||
cmake_policy(SET CMP0053 OLD)
|
||||
|
|
|
|||
|
|
@ -2,9 +2,9 @@
|
|||
# This is the CMake script for compiling a CGAL application.
|
||||
|
||||
|
||||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
project( AABB_tree_Examples )
|
||||
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
|
||||
find_package(CGAL QUIET)
|
||||
|
||||
|
|
|
|||
|
|
@ -2,9 +2,9 @@
|
|||
# This is the CMake script for compiling a CGAL application.
|
||||
|
||||
|
||||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
project( AABB_tree_Tests )
|
||||
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
|
||||
find_package(CGAL QUIET)
|
||||
|
||||
|
|
|
|||
|
|
@ -2,9 +2,9 @@
|
|||
# This is the CMake script for compiling a CGAL application.
|
||||
|
||||
|
||||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
project( Advancing_front_surface_reconstruction_Examples )
|
||||
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
|
||||
find_package(CGAL QUIET)
|
||||
|
||||
|
|
|
|||
|
|
@ -2,9 +2,9 @@
|
|||
# This is the CMake script for compiling a CGAL application.
|
||||
|
||||
|
||||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
project( Advancing_front_surface_reconstruction_Tests )
|
||||
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
|
||||
find_package(CGAL QUIET)
|
||||
|
||||
|
|
|
|||
|
|
@ -2,9 +2,9 @@
|
|||
# This is the CMake script for compiling a CGAL application.
|
||||
|
||||
|
||||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
project( Algebraic_foundations_Examples )
|
||||
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
|
||||
find_package(CGAL QUIET)
|
||||
|
||||
|
|
|
|||
|
|
@ -2,9 +2,9 @@
|
|||
# This is the CMake script for compiling a CGAL application.
|
||||
|
||||
|
||||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
project( Algebraic_foundations_Tests )
|
||||
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
|
||||
find_package(CGAL QUIET COMPONENTS Core)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
project( Algebraic_kernel_d_Examples )
|
||||
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
|
||||
|
||||
find_package(CGAL QUIET COMPONENTS Core)
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
project( Algebraic_kernel_d_Tests )
|
||||
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
|
||||
|
||||
# CGAL and its components
|
||||
|
|
|
|||
|
|
@ -2,9 +2,9 @@
|
|||
# This is the CMake script for compiling a CGAL application.
|
||||
|
||||
|
||||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
project( Algebraic_kernel_for_circles_Tests )
|
||||
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
|
||||
find_package(CGAL QUIET)
|
||||
|
||||
|
|
|
|||
|
|
@ -2,9 +2,9 @@
|
|||
# This is the CMake script for compiling a CGAL application.
|
||||
|
||||
|
||||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
project( Algebraic_kernel_for_spheres_Tests )
|
||||
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
|
||||
find_package(CGAL QUIET)
|
||||
|
||||
|
|
|
|||
|
|
@ -2,9 +2,9 @@
|
|||
# This is the CMake script for compiling a CGAL application.
|
||||
|
||||
|
||||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
project( Alpha_shapes_2_Examples )
|
||||
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
|
||||
find_package(CGAL QUIET)
|
||||
|
||||
|
|
|
|||
|
|
@ -2,9 +2,9 @@
|
|||
# This is the CMake script for compiling a CGAL application.
|
||||
|
||||
|
||||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
project( Alpha_shapes_2_Tests )
|
||||
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
|
||||
find_package(CGAL QUIET)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,13 +1,13 @@
|
|||
# Created by the script cgal_create_cmake_script
|
||||
# This is the CMake script for compiling a CGAL application.
|
||||
|
||||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
project (Alpha_shapes_3_Demo)
|
||||
|
||||
# Find includes in corresponding build directories
|
||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||
# Instruct CMake to run moc automatically when needed.
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
if(NOT POLICY CMP0070 AND POLICY CMP0053)
|
||||
# Only set CMP0053 to OLD with CMake<3.10, otherwise there is a warning.
|
||||
cmake_policy(SET CMP0053 OLD)
|
||||
|
|
|
|||
|
|
@ -2,9 +2,9 @@
|
|||
# This is the CMake script for compiling a CGAL application.
|
||||
|
||||
|
||||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
project( Alpha_shapes_3_Examples )
|
||||
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
|
||||
find_package(CGAL QUIET)
|
||||
|
||||
|
|
|
|||
|
|
@ -2,9 +2,9 @@
|
|||
# This is the CMake script for compiling a CGAL application.
|
||||
|
||||
|
||||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
project( Alpha_shapes_3_Tests )
|
||||
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
|
||||
find_package(CGAL QUIET)
|
||||
|
||||
|
|
|
|||
|
|
@ -2,9 +2,9 @@
|
|||
# This is the CMake script for compiling a CGAL application.
|
||||
|
||||
|
||||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
project( Apollonius_graph_2_Examples )
|
||||
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
|
||||
find_package(CGAL QUIET COMPONENTS Core )
|
||||
|
||||
|
|
|
|||
|
|
@ -2,9 +2,9 @@
|
|||
# This is the CMake script for compiling a CGAL application.
|
||||
|
||||
|
||||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
project( Apollonius_graph_2_Tests )
|
||||
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
|
||||
find_package(CGAL QUIET)
|
||||
|
||||
|
|
|
|||
|
|
@ -2,9 +2,9 @@
|
|||
# This is the CMake script for compiling a CGAL application.
|
||||
|
||||
|
||||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
project( Arithmetic_kernel_Tests )
|
||||
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
# This is the CMake script for compiling a CGAL application.
|
||||
|
||||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
project( Arrangement_on_surface_2_Demo )
|
||||
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
if(NOT POLICY CMP0070 AND POLICY CMP0053)
|
||||
# Only set CMP0053 to OLD with CMake<3.10, otherwise there is a warning.
|
||||
cmake_policy(SET CMP0053 OLD)
|
||||
|
|
|
|||
|
|
@ -2,9 +2,9 @@
|
|||
# This is the CMake script for compiling a CGAL application.
|
||||
|
||||
|
||||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
project( Arrangement_on_surface_2_Examples )
|
||||
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
|
||||
find_package(CGAL QUIET COMPONENTS Core)
|
||||
|
||||
|
|
|
|||
|
|
@ -2,11 +2,11 @@
|
|||
# This is the CMake script for compiling a CGAL application.
|
||||
|
||||
|
||||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
project( Arrangement_on_surface_2_Tests )
|
||||
|
||||
enable_testing()
|
||||
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
|
||||
find_package(CGAL QUIET COMPONENTS Core)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
# Created by the script cgal_create_CMakeLists
|
||||
# This is the CMake script for compiling a set of CGAL applications.
|
||||
|
||||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
project( BGL_LCC_Examples )
|
||||
|
||||
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
|
||||
# CGAL and its components
|
||||
find_package( CGAL QUIET COMPONENTS )
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
# Created by the script cgal_create_CMakeLists
|
||||
# This is the CMake script for compiling a set of CGAL applications.
|
||||
|
||||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
project( BGL_OpenMesh_Examples )
|
||||
|
||||
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
|
||||
# CGAL and its components
|
||||
find_package( CGAL QUIET COMPONENTS )
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
project( BGL_arrangement_2_Examples )
|
||||
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
|
||||
find_package(CGAL QUIET)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
# Created by the script cgal_create_CMakeLists
|
||||
# This is the CMake script for compiling a set of CGAL applications.
|
||||
|
||||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
project( BGL_polyhedron_3_Examples )
|
||||
|
||||
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
|
||||
# CGAL and its components
|
||||
find_package( CGAL QUIET COMPONENTS )
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
project( BGL_surface_mesh_Examples )
|
||||
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
|
||||
find_package( CGAL QUIET )
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
project( BGL_triangulation_2_Examples )
|
||||
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
|
||||
find_package(CGAL QUIET)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
# Created by the script cgal_create_cmake_script_with_options
|
||||
# This is the CMake script for compiling a set of CGAL applications.
|
||||
|
||||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
project( BGL_Tests )
|
||||
|
||||
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -2,9 +2,9 @@
|
|||
# This is the CMake script for compiling a CGAL application.
|
||||
|
||||
|
||||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
project( Barycentric_coordinates_2_Examples )
|
||||
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
|
||||
find_package(CGAL QUIET)
|
||||
|
||||
|
|
|
|||
|
|
@ -2,9 +2,9 @@
|
|||
# This is the CMake script for compiling a CGAL application.
|
||||
|
||||
|
||||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
project( Barycentric_coordinates_2_Tests )
|
||||
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
|
||||
find_package(CGAL QUIET)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
# Created by the script cgal_create_cmake_script
|
||||
# This is the CMake script for compiling a CGAL application.
|
||||
|
||||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
project( Boolean_set_operations_2_GraphicsView_Demo )
|
||||
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
if(NOT POLICY CMP0070 AND POLICY CMP0053)
|
||||
# Only set CMP0053 to OLD with CMake<3.10, otherwise there is a warning.
|
||||
cmake_policy(SET CMP0053 OLD)
|
||||
|
|
|
|||
|
|
@ -2,9 +2,9 @@
|
|||
# This is the CMake script for compiling a CGAL application.
|
||||
|
||||
|
||||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
project( Boolean_set_operations_2_Examples )
|
||||
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
|
||||
find_package(CGAL QUIET COMPONENTS Core)
|
||||
|
||||
|
|
|
|||
|
|
@ -2,9 +2,9 @@
|
|||
# This is the CMake script for compiling a CGAL application.
|
||||
|
||||
|
||||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
project( Boolean_set_operations_2_Tests )
|
||||
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
|
||||
find_package(CGAL QUIET)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
project( Approximate_min_ellipsoid_d_Examples )
|
||||
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
|
||||
find_package(CGAL QUIET)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
project( Min_annulus_d_Examples )
|
||||
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
|
||||
find_package(CGAL QUIET)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
project( Min_circle_2_Examples )
|
||||
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
|
||||
find_package(CGAL QUIET)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
project( Min_ellipse_2_Examples )
|
||||
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
|
||||
find_package(CGAL QUIET)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
project( Min_quadrilateral_2_Examples )
|
||||
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
|
||||
find_package(CGAL QUIET)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
project( Min_sphere_d_Examples )
|
||||
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
|
||||
find_package(CGAL QUIET)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
project( Min_sphere_of_spheres_d_Examples )
|
||||
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
|
||||
find_package(CGAL QUIET)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
project( Rectangular_p_center_2_Examples )
|
||||
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
|
||||
find_package(CGAL QUIET)
|
||||
|
||||
|
|
|
|||
|
|
@ -2,9 +2,9 @@
|
|||
# This is the CMake script for compiling a CGAL application.
|
||||
|
||||
|
||||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
project( Bounding_volumes_Tests )
|
||||
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
|
||||
find_package(CGAL QUIET COMPONENTS Core )
|
||||
|
||||
|
|
|
|||
|
|
@ -2,9 +2,9 @@
|
|||
# This is the CMake script for compiling a CGAL application.
|
||||
|
||||
|
||||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
project( Box_intersection_d_Examples )
|
||||
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
|
||||
find_package(CGAL QUIET)
|
||||
|
||||
|
|
|
|||
|
|
@ -2,9 +2,9 @@
|
|||
# This is the CMake script for compiling a CGAL application.
|
||||
|
||||
|
||||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
project( Box_intersection_d_Tests )
|
||||
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
|
||||
find_package(CGAL QUIET)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
project( Core_Examples )
|
||||
|
||||
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
project(CGALimageIO_Demo)
|
||||
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
if(NOT POLICY CMP0070 AND POLICY CMP0053)
|
||||
# Only set CMP0053 to OLD with CMake<3.10, otherwise there is a warning.
|
||||
cmake_policy(SET CMP0053 OLD)
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
# Created by the script cgal_create_cmake_script
|
||||
# This is the CMake script for compiling a CGAL application.
|
||||
|
||||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
project( CGALimageIO_Examples )
|
||||
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
|
||||
if(POLICY CMP0074)
|
||||
cmake_policy(SET CMP0074 NEW)
|
||||
|
|
|
|||
|
|
@ -2,9 +2,9 @@
|
|||
# This is the CMake script for compiling a CGAL application.
|
||||
|
||||
|
||||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
project( CGAL_ImageIO_Tests )
|
||||
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
|
||||
if(POLICY CMP0074)
|
||||
cmake_policy(SET CMP0074 NEW)
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
project(CGAL_ipelets_Demo)
|
||||
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
if(NOT POLICY CMP0070 AND POLICY CMP0053)
|
||||
# Only set CMP0053 to OLD with CMake<3.10, otherwise there is a warning.
|
||||
cmake_policy(SET CMP0053 OLD)
|
||||
|
|
|
|||
|
|
@ -2,9 +2,9 @@
|
|||
# This is the CMake script for compiling a CGAL application.
|
||||
|
||||
|
||||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
project( CGAL_ipelets_Examples )
|
||||
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
|
||||
find_package(CGAL QUIET)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
# Top level CMakeLists.txt for CGAL-branchbuild
|
||||
message( "== CMake setup ==" )
|
||||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
project(CGAL CXX C)
|
||||
export(PACKAGE CGAL)
|
||||
# Minimal version of CMake:
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
|
||||
set( CGAL_BRANCH_BUILD ON CACHE INTERNAL "Create CGAL from a Git branch" FORCE)
|
||||
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@ template < class R > class Aff_transformation_repC2;
|
|||
template < class R > class Translation_repC2;
|
||||
template < class R > class Rotation_repC2;
|
||||
template < class R > class Scaling_repC2;
|
||||
template < class R > class Reflection_repC2;
|
||||
|
||||
} //namespace CGAL
|
||||
|
||||
|
|
@ -44,6 +45,7 @@ template < class R > class Scaling_repC2;
|
|||
#include <CGAL/Cartesian/Translation_rep_2.h>
|
||||
#include <CGAL/Cartesian/Rotation_rep_2.h>
|
||||
#include <CGAL/Cartesian/Scaling_rep_2.h>
|
||||
#include <CGAL/Cartesian/Reflection_rep_2.h>
|
||||
|
||||
namespace CGAL {
|
||||
|
||||
|
|
@ -107,6 +109,11 @@ public:
|
|||
else
|
||||
initialize_with(Scaling_repC2<R>(s));
|
||||
}
|
||||
|
||||
Aff_transformationC2(const Reflection, const Line_2& l)
|
||||
{
|
||||
initialize_with(Reflection_repC2<R>(l));
|
||||
}
|
||||
|
||||
// The general case:
|
||||
// a 3x2 matrix for the operations combining rotation, scaling, translation
|
||||
|
|
@ -128,6 +135,7 @@ public:
|
|||
{
|
||||
initialize_with(Aff_transformation_repC2<R>(m11/w, m12/w, m21/w, m22/w));
|
||||
}
|
||||
|
||||
|
||||
Point_2
|
||||
transform(const Point_2 &p) const
|
||||
|
|
|
|||
|
|
@ -63,6 +63,9 @@ public:
|
|||
|
||||
virtual Aff_transformation_2 compose(
|
||||
const Scaling_repC2<R> &t) const = 0;
|
||||
|
||||
virtual Aff_transformation_2 compose(
|
||||
const Reflection_repC2<R> &t) const = 0;
|
||||
|
||||
virtual Aff_transformation_2 inverse() const = 0;
|
||||
virtual bool is_even() const = 0;
|
||||
|
|
@ -86,6 +89,7 @@ public:
|
|||
friend class Translation_repC2<R>;
|
||||
friend class Rotation_repC2<R>;
|
||||
friend class Scaling_repC2<R>;
|
||||
friend class Reflection_repC2<R>;
|
||||
|
||||
Aff_transformation_repC2()
|
||||
{}
|
||||
|
|
@ -131,6 +135,7 @@ friend class Scaling_repC2<R>;
|
|||
Aff_transformation_2 compose(const Translation_repC2<R> &t) const;
|
||||
Aff_transformation_2 compose(const Rotation_repC2<R> &t) const;
|
||||
Aff_transformation_2 compose(const Scaling_repC2<R> &t) const;
|
||||
Aff_transformation_2 compose(const Reflection_repC2<R> &t) const;
|
||||
|
||||
bool is_even() const
|
||||
{
|
||||
|
|
@ -252,6 +257,17 @@ compose(const Scaling_repC2<R> &t) const
|
|||
t.scalefactor_ * t23);
|
||||
}
|
||||
|
||||
template < class R >
|
||||
CGAL_KERNEL_LARGE_INLINE
|
||||
typename Aff_transformation_repC2<R>::Aff_transformation_2
|
||||
Aff_transformation_repC2<R>::
|
||||
compose(const Reflection_repC2<R> &r) const
|
||||
{
|
||||
return Aff_transformation_2(
|
||||
r.cosinus_*t11+r.sinus_*t21, r.cosinus_*t12+r.sinus_*t22, r.cosinus_*(t13-r.t.x())+r.sinus_*(t23-r.t.y())+r.t.x(),
|
||||
r.sinus_*(t11)-r.cosinus_*(t21), r.sinus_*(t12)-r.cosinus_*(t22), r.sinus_*(t13-r.t.x())-r.cosinus_*(t23-r.t.y())+r.t.y());
|
||||
}
|
||||
|
||||
} //namespace CGAL
|
||||
|
||||
#endif // CGAL_CARTESIAN_AFF_TRANSFORMATION_REP_2_H
|
||||
|
|
|
|||
|
|
@ -0,0 +1,208 @@
|
|||
// Copyright (c) 2018
|
||||
// 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$
|
||||
// SPDX-License-Identifier: LGPL-3.0+
|
||||
//
|
||||
//
|
||||
// Author(s) : Maxime Gimeno
|
||||
|
||||
#ifndef CGAL_CARTESIAN_REFLECTION_REP_2_H
|
||||
#define CGAL_CARTESIAN_REFLECTION_REP_2_H
|
||||
#include <cmath>
|
||||
namespace CGAL {
|
||||
|
||||
template < class R >
|
||||
class Reflection_repC2: public Aff_transformation_rep_baseC2<R>
|
||||
{
|
||||
friend class Translation_repC2<R>;
|
||||
friend class Rotation_repC2<R>;
|
||||
friend class Scaling_repC2<R>;
|
||||
friend class Aff_transformation_repC2<R>;
|
||||
|
||||
public:
|
||||
typedef Aff_transformation_rep_baseC2<R> Aff_t_base;
|
||||
typedef typename Aff_t_base::FT FT;
|
||||
typedef typename Aff_t_base::Point_2 Point_2;
|
||||
typedef typename Aff_t_base::Vector_2 Vector_2;
|
||||
typedef typename Aff_t_base::Direction_2 Direction_2;
|
||||
typedef typename CGAL::Line_2<R> Line_2;
|
||||
typedef typename Aff_t_base::Aff_transformation_2 Aff_transformation_2;
|
||||
typedef Aff_transformation_repC2<R> Transformation;
|
||||
typedef Reflection_repC2<R> Reflection;
|
||||
typedef Scaling_repC2<R> Scaling;
|
||||
typedef Rotation_repC2<R> Rotation;
|
||||
typedef Translation_repC2<R> Translation;
|
||||
|
||||
Reflection_repC2(const Line_2 &l)
|
||||
{
|
||||
if(l.a() == 0)
|
||||
t = -Vector_2(0, l.c()/l.b());
|
||||
else
|
||||
t = -Vector_2(l.c()/l.a(),0);
|
||||
|
||||
Vector_2 l_to_v = l.to_vector();
|
||||
FT scal = l_to_v.x(); //Projection of l_to_v on Ox. = |L|*cos(a)
|
||||
FT det = l_to_v.y();// = |L|*sin(a)
|
||||
sinus_ = 2*det*scal/l_to_v.squared_length(); //sin(2a) = 2*sin(a)*cos(a)
|
||||
FT sq_cos = scal*scal/l_to_v.squared_length(); //cos(a)*cos(a)
|
||||
cosinus_ = 2*sq_cos-1;
|
||||
}
|
||||
|
||||
~Reflection_repC2()
|
||||
{}
|
||||
|
||||
Point_2 transform(const Point_2 &p) const
|
||||
{
|
||||
return Point_2(
|
||||
cosinus_*p.x()+sinus_*p.y()-cosinus_*t.x()-sinus_*t.y()+t.x(),
|
||||
sinus_*p.x()-cosinus_*p.y()-sinus_*t.x()+cosinus_*t.y()+t.y());
|
||||
}
|
||||
|
||||
Vector_2 transform(const Vector_2 &p) const
|
||||
{
|
||||
return Vector_2(
|
||||
cosinus_*p.x()+sinus_*p.y()-cosinus_*t.x()-sinus_*t.y()+t.x(),
|
||||
sinus_*p.x()-cosinus_*p.y()-sinus_*t.x()+cosinus_*t.y()+t.y());
|
||||
}
|
||||
|
||||
Direction_2 transform(const Direction_2 &d) const
|
||||
{
|
||||
|
||||
return transform(d.vector()).direction();
|
||||
}
|
||||
|
||||
Aff_transformation_2 operator*(const Aff_t_base &t) const
|
||||
{
|
||||
return t.compose(*this);
|
||||
}
|
||||
|
||||
Aff_transformation_2 compose(const Translation &tr) const
|
||||
{
|
||||
return Aff_transformation_2(cosinus_, sinus_, t13()+tr.translationvector_.x(),
|
||||
sinus_, -cosinus_, t23()+tr.translationvector_.y());
|
||||
}
|
||||
|
||||
Aff_transformation_2 compose(const Scaling &s) const
|
||||
{
|
||||
return Aff_transformation_2(s.scalefactor_ * cosinus_,
|
||||
s.scalefactor_ * sinus_,
|
||||
s.scalefactor_ * t13(),
|
||||
s.scalefactor_ * sinus_,
|
||||
-s.scalefactor_ * cosinus_,
|
||||
s.scalefactor_ * t23());
|
||||
}
|
||||
|
||||
Aff_transformation_2 compose(const Transformation &tr) const
|
||||
{
|
||||
return Aff_transformation_2(
|
||||
tr.t11*cosinus_+tr.t12*sinus_,
|
||||
tr.t11*sinus_-tr.t12*cosinus_,
|
||||
tr.t11*t13()+tr.t12*t23()+tr.t13,
|
||||
tr.t21*cosinus_+tr.t22*sinus_,
|
||||
tr.t21*sinus_-tr.t22*cosinus_,
|
||||
tr.t21*t13()+tr.t22*t23()+tr.t23);
|
||||
}
|
||||
|
||||
Aff_transformation_2 compose(const Rotation &r) const
|
||||
{
|
||||
return Aff_transformation_2(
|
||||
r.cosinus_*cosinus_-r.sinus_*sinus_,
|
||||
r.cosinus_*sinus_+r.sinus_*cosinus_,
|
||||
r.cosinus_*t13()
|
||||
-r.sinus_*t23(),
|
||||
r.sinus_*cosinus_+r.cosinus_*sinus_,
|
||||
r.sinus_*sinus_-r.cosinus_*cosinus_,
|
||||
r.sinus_*t13()
|
||||
+r.cosinus_*t23());
|
||||
}
|
||||
|
||||
Aff_transformation_2 compose(const Reflection &r) const
|
||||
{
|
||||
return Aff_transformation_2(
|
||||
cosinus_*r.cosinus_+sinus_*r.sinus_,
|
||||
r.cosinus_*sinus_-r.sinus_*cosinus_,
|
||||
r.cosinus_*(t13()-r.t.x()) + r.sinus_*(t23()-r.t.y())+r.t.x(),
|
||||
|
||||
r.sinus_*cosinus_ - r.cosinus_*sinus_,
|
||||
r.sinus_*sinus_+r.cosinus_*cosinus_,
|
||||
r.sinus_*(t13()-r.t.x()) -r.cosinus_*(t23()-r.t.y())+r.t.y());
|
||||
}
|
||||
|
||||
Aff_transformation_2 inverse() const
|
||||
{
|
||||
return Aff_transformation_2(cartesian(0,0), cartesian(0,1), cartesian(0,2),
|
||||
cartesian(1,0), cartesian(1,1), cartesian(1,2));
|
||||
}
|
||||
|
||||
bool is_even() const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
FT cartesian(int i, int j) const
|
||||
{
|
||||
switch (i)
|
||||
{
|
||||
case 0: switch (j)
|
||||
{
|
||||
case 0: return cosinus_;
|
||||
case 1: return sinus_;
|
||||
default: return FT(0);
|
||||
}
|
||||
case 1: switch (j)
|
||||
{
|
||||
case 0: return sinus_;
|
||||
case 1: return -cosinus_;
|
||||
default: return FT(0);
|
||||
}
|
||||
case 2: switch (j)
|
||||
{
|
||||
case 0: return FT(0);
|
||||
case 1: return FT(0);
|
||||
default: return FT(1);
|
||||
}
|
||||
}
|
||||
return FT(0);
|
||||
}
|
||||
|
||||
std::ostream &print(std::ostream &os) const
|
||||
{
|
||||
os << "Aff_transformationC2(" << sinus_ << ", " << cosinus_ << "; "<< t <<")";
|
||||
return os;
|
||||
}
|
||||
|
||||
//convevience functions for composition
|
||||
FT t13()const
|
||||
{
|
||||
return FT(-cosinus_*t.x()-sinus_*t.y()+t.x());
|
||||
}
|
||||
FT t23()const
|
||||
{
|
||||
return FT(-sinus_*t.x()+cosinus_*t.y()+t.y());
|
||||
}
|
||||
|
||||
private:
|
||||
Vector_2 t;
|
||||
FT sinus_, cosinus_;
|
||||
};
|
||||
|
||||
} //namespace CGAL
|
||||
|
||||
#endif // CGAL_CARTESIAN_REFLECTION_REP_2_H
|
||||
|
|
@ -36,6 +36,7 @@ class Rotation_repC2: public Aff_transformation_rep_baseC2<R>
|
|||
friend class Aff_transformation_repC2<R>;
|
||||
friend class Translation_repC2<R>;
|
||||
friend class Scaling_repC2<R>;
|
||||
friend class Reflection_repC2<R>;
|
||||
|
||||
public:
|
||||
typedef Aff_transformation_rep_baseC2<R> Aff_t_base;
|
||||
|
|
@ -48,6 +49,7 @@ public:
|
|||
typedef Translation_repC2<R> Translation;
|
||||
typedef Rotation_repC2<R> Rotation;
|
||||
typedef Scaling_repC2<R> Scaling;
|
||||
typedef Reflection_repC2<R> Reflection;
|
||||
|
||||
Rotation_repC2() {}
|
||||
|
||||
|
|
@ -126,6 +128,17 @@ public:
|
|||
t.scalefactor_*cosinus_);
|
||||
}
|
||||
|
||||
Aff_transformation_2 compose(const Reflection &r) const
|
||||
{
|
||||
return Aff_transformation_2(
|
||||
r.cosinus_*cosinus_+r.sinus_*sinus_,
|
||||
-r.cosinus_*sinus_+r.sinus_*cosinus_,
|
||||
r.t13(),
|
||||
r.sinus_*cosinus_-r.cosinus_*sinus_,
|
||||
-r.sinus_*sinus_-r.cosinus_*cosinus_
|
||||
, r.t23());
|
||||
}
|
||||
|
||||
Aff_transformation_2 compose(const Transformation &t) const
|
||||
{
|
||||
return Aff_transformation_2(cosinus_*t.t11 + sinus_*t.t12,
|
||||
|
|
@ -135,7 +148,6 @@ public:
|
|||
-sinus_*t.t21 + cosinus_*t.t22,
|
||||
t.t23);
|
||||
}
|
||||
|
||||
bool is_even() const
|
||||
{
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@ class Scaling_repC2: public Aff_transformation_rep_baseC2<R>
|
|||
friend class Aff_transformation_repC2<R>;
|
||||
friend class Translation_repC2<R>;
|
||||
friend class Rotation_repC2<R>;
|
||||
friend class Reflection_repC2<R>;
|
||||
|
||||
public:
|
||||
typedef Aff_transformation_rep_baseC2<R> Aff_t_base;
|
||||
|
|
@ -45,6 +46,7 @@ public:
|
|||
typedef Aff_transformation_repC2<R> Transformation;
|
||||
typedef Translation_repC2<R> Translation;
|
||||
typedef Rotation_repC2<R> Rotation;
|
||||
typedef Reflection_repC2<R> Reflection;
|
||||
typedef Scaling_repC2<R> Scaling;
|
||||
|
||||
Scaling_repC2()
|
||||
|
|
@ -96,6 +98,12 @@ public:
|
|||
scalefactor_ * t.cosinus_);
|
||||
}
|
||||
|
||||
Aff_transformation_2 compose(const Reflection &r) const
|
||||
{
|
||||
return Aff_transformation_2(scalefactor_*r.cosinus_, scalefactor_*r.sinus_,-r.cosinus_*r.t.x()-r.sinus_*r.t.y()+r.t.x(),
|
||||
scalefactor_*r.sinus_, -scalefactor_*r.cosinus_, -r.sinus_*r.t.x()+r.cosinus_*r.t.y()-r.t.y());
|
||||
}
|
||||
|
||||
Aff_transformation_2 compose(const Scaling &t) const
|
||||
{
|
||||
return Aff_transformation_2(SCALING, scalefactor_*t.scalefactor_);
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@ class Translation_repC2 : public Aff_transformation_rep_baseC2<R>
|
|||
friend class Aff_transformation_repC2<R>;
|
||||
friend class Rotation_repC2<R>;
|
||||
friend class Scaling_repC2<R>;
|
||||
friend class Reflection_repC2<R>;
|
||||
|
||||
public:
|
||||
typedef typename R::FT FT;
|
||||
|
|
@ -43,6 +44,7 @@ public:
|
|||
typedef Aff_transformation_repC2<R> Transformation;
|
||||
typedef Translation_repC2<R> Translation;
|
||||
typedef Rotation_repC2<R> Rotation;
|
||||
typedef Reflection_repC2<R> Reflection;
|
||||
typedef Scaling_repC2<R> Scaling;
|
||||
typedef typename Aff_t_base::Point_2 Point_2;
|
||||
typedef typename Aff_t_base::Vector_2 Vector_2;
|
||||
|
|
@ -114,6 +116,14 @@ public:
|
|||
+ t.t22*translationvector_.y()
|
||||
+ t.t23);
|
||||
}
|
||||
|
||||
Aff_transformation_2 compose(const Reflection &r) const
|
||||
{
|
||||
return Aff_transformation_2(r.cosinus_, r.sinus_,
|
||||
r.cosinus_*(translationvector_.x()-r.t.x())+r.sinus_*(translationvector_.y() - r.t.y()) +r.t.x(),
|
||||
r.sinus_, -r.cosinus_,
|
||||
r.sinus_*(translationvector_.x()-r.t.x())-r.cosinus_*(translationvector_.y() - r.t.y())+r.t.y());
|
||||
}
|
||||
|
||||
Aff_transformation_2 inverse() const
|
||||
{
|
||||
|
|
|
|||
|
|
@ -2,9 +2,9 @@
|
|||
# This is the CMake script for compiling a CGAL application.
|
||||
|
||||
|
||||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
project( Circular_kernel_2_Examples )
|
||||
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
|
||||
find_package(CGAL QUIET)
|
||||
|
||||
|
|
|
|||
|
|
@ -2,10 +2,9 @@
|
|||
# This is the CMake script for compiling a CGAL application.
|
||||
|
||||
|
||||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
project( Circular_kernel_2_Tests )
|
||||
|
||||
CMAKE_MINIMUM_REQUIRED(VERSION 3.1)
|
||||
|
||||
find_package(CGAL QUIET)
|
||||
|
||||
if ( CGAL_FOUND )
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
project (Circular_kernel_3_Demo)
|
||||
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
if(NOT POLICY CMP0070 AND POLICY CMP0053)
|
||||
# Only set CMP0053 to OLD with CMake<3.10, otherwise there is a warning.
|
||||
cmake_policy(SET CMP0053 OLD)
|
||||
|
|
|
|||
|
|
@ -2,9 +2,9 @@
|
|||
# This is the CMake script for compiling a CGAL application.
|
||||
|
||||
|
||||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
project( Circular_kernel_3_Examples )
|
||||
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
|
||||
find_package(CGAL QUIET)
|
||||
|
||||
|
|
|
|||
|
|
@ -2,10 +2,9 @@
|
|||
# This is the CMake script for compiling a CGAL application.
|
||||
|
||||
|
||||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
project( Circular_kernel_3_Tests )
|
||||
|
||||
CMAKE_MINIMUM_REQUIRED(VERSION 3.1)
|
||||
|
||||
find_package(CGAL QUIET COMPONENTS Core )
|
||||
|
||||
if ( CGAL_FOUND )
|
||||
|
|
|
|||
|
|
@ -2,9 +2,9 @@
|
|||
# This is the CMake script for compiling a CGAL application.
|
||||
|
||||
|
||||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
project( Circulator_Examples )
|
||||
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
|
||||
find_package(CGAL QUIET)
|
||||
|
||||
|
|
|
|||
|
|
@ -2,9 +2,9 @@
|
|||
# This is the CMake script for compiling a CGAL application.
|
||||
|
||||
|
||||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
project( Circulator_Tests )
|
||||
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
|
||||
find_package(CGAL QUIET)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
# Created by the script cgal_create_CMakeLists
|
||||
# This is the CMake script for compiling a set of CGAL applications.
|
||||
|
||||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
project( Classification_Examples )
|
||||
|
||||
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
|
||||
# CGAL and its components
|
||||
find_package( CGAL QUIET COMPONENTS )
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
# Created by the script cgal_create_CMakeLists
|
||||
# This is the CMake script for compiling a set of CGAL applications.
|
||||
|
||||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
project( Classification_Tests )
|
||||
|
||||
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
|
||||
# CGAL and its components
|
||||
find_package( CGAL QUIET COMPONENTS )
|
||||
|
|
|
|||
|
|
@ -2,9 +2,9 @@
|
|||
# This is the CMake script for compiling a CGAL application.
|
||||
|
||||
|
||||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
project( Combinatorial_map_Examples )
|
||||
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
|
||||
find_package(CGAL QUIET)
|
||||
|
||||
|
|
|
|||
|
|
@ -2,9 +2,9 @@
|
|||
# This is the CMake script for compiling a CGAL application.
|
||||
|
||||
|
||||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
project( Combinatorial_map_Tests )
|
||||
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
|
||||
find_package(CGAL QUIET)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
cmake_minimum_required(VERSION 3.1...3.13)
|
||||
|
||||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
project( Cone_spanners_2_Examples )
|
||||
|
||||
find_package(CGAL REQUIRED QUIET OPTIONAL_COMPONENTS Core)
|
||||
|
|
|
|||
|
|
@ -2,9 +2,9 @@
|
|||
# This is the CMake script for compiling a CGAL application.
|
||||
|
||||
|
||||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
project( Cone_spanners_2_Tests )
|
||||
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
|
||||
find_package(CGAL QUIET COMPONENTS Core)
|
||||
|
||||
|
|
|
|||
|
|
@ -2,9 +2,9 @@
|
|||
# This is the CMake script for compiling a CGAL application.
|
||||
|
||||
|
||||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
project( Convex_decomposition_3_Examples )
|
||||
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
|
||||
find_package(CGAL QUIET)
|
||||
|
||||
|
|
|
|||
|
|
@ -2,9 +2,9 @@
|
|||
# This is the CMake script for compiling a CGAL application.
|
||||
|
||||
|
||||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
project( Convex_decomposition_3_Tests )
|
||||
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
|
||||
find_package(CGAL QUIET)
|
||||
|
||||
|
|
|
|||
|
|
@ -2,9 +2,9 @@
|
|||
# This is the CMake script for compiling a CGAL application.
|
||||
|
||||
|
||||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
project( Convex_hull_2_Examples )
|
||||
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
|
||||
find_package(CGAL QUIET)
|
||||
|
||||
|
|
|
|||
|
|
@ -2,9 +2,9 @@
|
|||
# This is the CMake script for compiling a CGAL application.
|
||||
|
||||
|
||||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
project( Convex_hull_2_Tests )
|
||||
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
|
||||
find_package(CGAL QUIET)
|
||||
|
||||
|
|
|
|||
|
|
@ -2,9 +2,9 @@
|
|||
# This is the CMake script for compiling a CGAL application.
|
||||
|
||||
|
||||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
project( Convex_hull_3_Demo )
|
||||
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
if(NOT POLICY CMP0070 AND POLICY CMP0053)
|
||||
# Only set CMP0053 to OLD with CMake<3.10, otherwise there is a warning.
|
||||
cmake_policy(SET CMP0053 OLD)
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
# Created by the script cgal_create_CMakeLists
|
||||
# This is the CMake script for compiling a set of CGAL applications.
|
||||
|
||||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
project( Convex_hull_3_Examples )
|
||||
|
||||
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
|
||||
# CGAL and its components
|
||||
find_package( CGAL QUIET COMPONENTS )
|
||||
|
|
|
|||
|
|
@ -2,9 +2,9 @@
|
|||
# This is the CMake script for compiling a CGAL application.
|
||||
|
||||
|
||||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
project( Convex_hull_3_Tests )
|
||||
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
|
||||
find_package(CGAL QUIET)
|
||||
|
||||
|
|
|
|||
|
|
@ -2,9 +2,9 @@
|
|||
# This is the CMake script for compiling a CGAL application.
|
||||
|
||||
|
||||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
project( Convex_hull_d_Tests )
|
||||
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
|
||||
find_package(CGAL QUIET)
|
||||
|
||||
|
|
|
|||
|
|
@ -2,9 +2,9 @@
|
|||
# This is the CMake script for compiling a CGAL application.
|
||||
|
||||
|
||||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
project( Distance_2_Tests )
|
||||
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
|
||||
find_package(CGAL QUIET)
|
||||
|
||||
|
|
|
|||
|
|
@ -2,9 +2,9 @@
|
|||
# This is the CMake script for compiling a CGAL application.
|
||||
|
||||
|
||||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
project( Distance_3_Tests )
|
||||
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
|
||||
find_package(CGAL QUIET)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
project(Documentation NONE)
|
||||
|
||||
# Minimal version of CMake:
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
|
||||
# Check whether this cmake script is the top level one
|
||||
if ( ${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
|
|
|||
|
|
@ -2,9 +2,9 @@
|
|||
# This is the CMake script for compiling a CGAL application.
|
||||
|
||||
|
||||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
project( Envelope_2_Examples )
|
||||
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
|
||||
find_package(CGAL QUIET)
|
||||
|
||||
|
|
|
|||
|
|
@ -2,9 +2,9 @@
|
|||
# This is the CMake script for compiling a CGAL application.
|
||||
|
||||
|
||||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
project( Envelope_2_Tests )
|
||||
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
|
||||
find_package(CGAL QUIET)
|
||||
|
||||
|
|
|
|||
|
|
@ -2,9 +2,9 @@
|
|||
# This is the CMake script for compiling a CGAL application.
|
||||
|
||||
|
||||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
project( Envelope_3_Examples )
|
||||
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
|
||||
find_package(CGAL QUIET COMPONENTS Core )
|
||||
|
||||
|
|
|
|||
|
|
@ -2,9 +2,9 @@
|
|||
# This is the CMake script for compiling a CGAL application.
|
||||
|
||||
|
||||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
project( Envelope_3_Tests )
|
||||
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
|
||||
find_package(CGAL QUIET COMPONENTS Core )
|
||||
|
||||
|
|
|
|||
|
|
@ -2,9 +2,9 @@
|
|||
# This is the CMake script for compiling a CGAL application.
|
||||
|
||||
|
||||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
project( Filtered_kernel_test )
|
||||
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
|
||||
|
||||
add_executable(bench_simple_comparisons bench_simple_comparisons.cpp)
|
||||
|
|
|
|||
|
|
@ -2,9 +2,9 @@
|
|||
# This is the CMake script for compiling a CGAL application.
|
||||
|
||||
|
||||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
project( Filtered_kernel_Examples )
|
||||
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
|
||||
find_package(CGAL QUIET)
|
||||
|
||||
|
|
|
|||
|
|
@ -35,8 +35,11 @@
|
|||
#include <CGAL/Bbox_2.h>
|
||||
#include <CGAL/Bbox_3.h>
|
||||
#include <vector>
|
||||
#include <type_traits>
|
||||
#include <CGAL/Default.h>
|
||||
#include<CGAL/tss.h>
|
||||
#include <CGAL/is_iterator.h>
|
||||
#include <CGAL/transforming_iterator.h>
|
||||
|
||||
#include <boost/optional.hpp>
|
||||
#include <boost/variant.hpp>
|
||||
|
|
@ -61,42 +64,42 @@ template <class E,
|
|||
class K>
|
||||
class Lazy_kernel_base;
|
||||
|
||||
template <typename AT, typename ET, typename EFT, typename E2A> class Lazy;
|
||||
template <typename AT, typename ET, typename E2A> class Lazy;
|
||||
|
||||
template <typename ET_>
|
||||
class Lazy_exact_nt;
|
||||
|
||||
template <typename AT, typename ET, typename EFT, typename E2A>
|
||||
template <typename AT, typename ET, typename E2A>
|
||||
inline
|
||||
const AT&
|
||||
approx(const Lazy<AT,ET, EFT, E2A>& l)
|
||||
approx(const Lazy<AT,ET,E2A>& l)
|
||||
{
|
||||
return l.approx();
|
||||
}
|
||||
|
||||
// Where is this one (non-const) needed ? Is it ?
|
||||
template <typename AT, typename ET, typename EFT, typename E2A>
|
||||
template <typename AT, typename ET, typename E2A>
|
||||
inline
|
||||
AT&
|
||||
approx(Lazy<AT,ET, EFT, E2A>& l)
|
||||
approx(Lazy<AT,ET,E2A>& l)
|
||||
{
|
||||
return l.approx();
|
||||
}
|
||||
|
||||
|
||||
template <typename AT, typename ET, typename EFT, typename E2A>
|
||||
template <typename AT, typename ET, typename E2A>
|
||||
inline
|
||||
const ET&
|
||||
exact(const Lazy<AT,ET,EFT,E2A>& l)
|
||||
exact(const Lazy<AT,ET,E2A>& l)
|
||||
{
|
||||
return l.exact();
|
||||
}
|
||||
|
||||
|
||||
template <typename AT, typename ET, typename EFT, typename E2A>
|
||||
template <typename AT, typename ET, typename E2A>
|
||||
inline
|
||||
unsigned
|
||||
depth(const Lazy<AT,ET,EFT,E2A>& l)
|
||||
depth(const Lazy<AT,ET,E2A>& l)
|
||||
{
|
||||
return l.depth();
|
||||
}
|
||||
|
|
@ -107,27 +110,27 @@ depth(const Lazy<AT,ET,EFT,E2A>& l)
|
|||
inline const T & exact (const T& d) { return d; } \
|
||||
inline unsigned depth (const T& ) { return 0; }
|
||||
|
||||
|
||||
CGAL_LAZY_FORWARD(long double)
|
||||
CGAL_LAZY_FORWARD(double)
|
||||
CGAL_LAZY_FORWARD(float)
|
||||
CGAL_LAZY_FORWARD(int)
|
||||
CGAL_LAZY_FORWARD(unsigned int)
|
||||
CGAL_LAZY_FORWARD(long)
|
||||
CGAL_LAZY_FORWARD(unsigned long)
|
||||
#ifdef CGAL_USE_LONG_LONG
|
||||
CGAL_LAZY_FORWARD(long long)
|
||||
CGAL_LAZY_FORWARD(unsigned long long)
|
||||
#endif
|
||||
CGAL_LAZY_FORWARD(Return_base_tag)
|
||||
CGAL_LAZY_FORWARD(Null_vector)
|
||||
CGAL_LAZY_FORWARD(Origin)
|
||||
CGAL_LAZY_FORWARD(Orientation)
|
||||
CGAL_LAZY_FORWARD(Bbox_2)
|
||||
CGAL_LAZY_FORWARD(Bbox_3)
|
||||
|
||||
#undef CGAL_LAZY_FORWARD
|
||||
|
||||
template<class T>inline std::enable_if_t<std::is_arithmetic<T>::value||std::is_enum<T>::value, T> approx(T d){return d;}
|
||||
template<class T>inline std::enable_if_t<std::is_arithmetic<T>::value||std::is_enum<T>::value, T> exact (T d){return d;}
|
||||
template<class T>inline std::enable_if_t<std::is_arithmetic<T>::value||std::is_enum<T>::value, unsigned> depth(T){return 0;}
|
||||
|
||||
// For tag classes: Return_base_tag, Homogeneous_tag, Null_vector, Origin
|
||||
template<class T>inline std::enable_if_t<std::is_empty<T>::value, T> exact(T){return {};}
|
||||
template<class T>inline std::enable_if_t<std::is_empty<T>::value, T> approx(T){return {};}
|
||||
template<class T>inline std::enable_if_t<std::is_empty<T>::value, unsigned> depth(T){return 0;}
|
||||
|
||||
// For an iterator, exact/approx applies to the objects it points to
|
||||
template <class T, class=std::enable_if_t<is_iterator_type<T,std::input_iterator_tag>::value>>
|
||||
auto exact(T const& t) {return make_transforming_iterator(t,[](auto const&u){return CGAL::exact(u);});}
|
||||
template <class T, class=std::enable_if_t<is_iterator_type<T,std::input_iterator_tag>::value>>
|
||||
auto approx(T const& t) {return make_transforming_iterator(t,[](auto const&u){return CGAL::approx(u);});}
|
||||
template <class T, class=std::enable_if_t<is_iterator_type<T,std::input_iterator_tag>::value>>
|
||||
unsigned depth(T const&) {return 1;} // FIXME: depth(*t) would be better when t is valid, but not for end iterators, and the true answer would iterate on the range, but we can't do that with only one iterator... We need to replace iterators with ranges to solve that.
|
||||
|
||||
#ifdef CGAL_LAZY_KERNEL_DEBUG
|
||||
template <class T>
|
||||
void
|
||||
|
|
@ -158,10 +161,10 @@ print_at(std::ostream& os, const std::pair<T1,T2> & at)
|
|||
}
|
||||
|
||||
|
||||
template <typename AT, typename ET, typename EFT, typename E2A>
|
||||
template <typename AT, typename ET, typename E2A>
|
||||
inline
|
||||
void
|
||||
print_dag(const Lazy<AT,ET,EFT,E2A>& l, std::ostream& os, int level = 0)
|
||||
print_dag(const Lazy<AT,ET,E2A>& l, std::ostream& os, int level = 0)
|
||||
{
|
||||
l.print_dag(os, level);
|
||||
}
|
||||
|
|
@ -235,7 +238,7 @@ struct Depth_base {
|
|||
template <typename AT_, typename ET, typename E2A>
|
||||
class Lazy_rep : public Rep, public Depth_base
|
||||
{
|
||||
Lazy_rep (const Lazy_rep&); // cannot be copied.
|
||||
Lazy_rep (const Lazy_rep&) = delete; // cannot be copied.
|
||||
|
||||
public:
|
||||
|
||||
|
|
@ -247,11 +250,13 @@ public:
|
|||
Lazy_rep ()
|
||||
: at(), et(nullptr){}
|
||||
|
||||
Lazy_rep (const AT& a)
|
||||
: at(a), et(nullptr){}
|
||||
template<class A>
|
||||
Lazy_rep (A&& a)
|
||||
: at(std::forward<A>(a)), et(nullptr){}
|
||||
|
||||
Lazy_rep (const AT& a, const ET& e)
|
||||
: at(a), et(new ET(e)) {}
|
||||
template<class A, class E>
|
||||
Lazy_rep (A&& a, E&& e)
|
||||
: at(std::forward<A>(a)), et(new ET(std::forward<E>(e))) {}
|
||||
|
||||
const AT& approx() const
|
||||
{
|
||||
|
|
@ -311,6 +316,52 @@ public:
|
|||
};
|
||||
|
||||
|
||||
template<typename AT, typename ET, typename AC, typename EC, typename E2A, typename...L>
|
||||
class Lazy_rep_n :
|
||||
public Lazy_rep< AT, ET, E2A >, private EC
|
||||
{
|
||||
// Lazy_rep_0 does not inherit from EC or take a parameter AC. It has different constructors.
|
||||
static_assert(sizeof...(L)>0, "Use Lazy_rep_0 instead");
|
||||
template <class Ei, class Ai, class E2Ai, class Ki> friend class Lazy_kernel_base;
|
||||
mutable std::tuple<L...> l; // L...l; is not yet allowed.
|
||||
const EC& ec() const { return *this; }
|
||||
template<std::size_t...I>
|
||||
void update_exact_helper(std::index_sequence<I...>) const {
|
||||
this->et = new ET(ec()( CGAL::exact( std::get<I>(l) ) ... ) );
|
||||
this->at = E2A()(*(this->et));
|
||||
l = std::tuple<L...>{};
|
||||
}
|
||||
public:
|
||||
void update_exact() const {
|
||||
update_exact_helper(std::make_index_sequence<sizeof...(L)>{});
|
||||
}
|
||||
template<class...LL>
|
||||
Lazy_rep_n(const AC& ac, const EC& ec, LL&&...ll) :
|
||||
Lazy_rep<AT, ET, E2A>(ac(CGAL::approx(ll)...)), EC(ec), l(std::forward<LL>(ll)...)
|
||||
{
|
||||
this->set_depth((std::max)({ -1, (int)CGAL::depth(ll)...}) + 1);
|
||||
}
|
||||
#ifdef CGAL_LAZY_KERNEL_DEBUG
|
||||
private:
|
||||
template<std::size_t...I>
|
||||
void print_dag_helper(std::ostream& os, int level, std::index_sequence<I...>) const {
|
||||
this->print_at_et(os, level);
|
||||
if(this->is_lazy()){
|
||||
# ifdef CGAL_LAZY_KERNEL_DEBUG_SHOW_TYPEID
|
||||
CGAL::msg(os, level, typeid(AC).name());
|
||||
# endif
|
||||
CGAL::msg(os, level, "DAG with " "3" " child nodes:");
|
||||
using expander = int[];
|
||||
expander{0,(CGAL::print_dag(std::get<I>(l), os, level+1),0)...};
|
||||
}
|
||||
}
|
||||
public:
|
||||
void print_dag(std::ostream& os, int level) const {
|
||||
print_dag_helper(os, level, std::make_index_sequence<sizeof...L>{});
|
||||
}
|
||||
#endif
|
||||
};
|
||||
|
||||
//____________________________________________________________
|
||||
// The rep for the leaf node
|
||||
|
||||
|
|
@ -330,14 +381,23 @@ public:
|
|||
Lazy_rep_0()
|
||||
: Lazy_rep<AT,ET, E2A>() {}
|
||||
|
||||
Lazy_rep_0(const AT& a, const ET& e)
|
||||
: Lazy_rep<AT,ET,E2A>(a, e) {}
|
||||
template<class A, class E>
|
||||
Lazy_rep_0(A&& a, E&& e)
|
||||
: Lazy_rep<AT,ET,E2A>(std::forward<A>(a), std::forward<E>(e)) {}
|
||||
|
||||
#if 0
|
||||
// unused. Find a less ambiguous placeholder if necessary
|
||||
Lazy_rep_0(const AT& a, void*)
|
||||
: Lazy_rep<AT,ET,E2A>(a) {}
|
||||
#endif
|
||||
|
||||
Lazy_rep_0(const ET& e)
|
||||
: Lazy_rep<AT,ET,E2A>(E2A()(e), e) {}
|
||||
// E2A()(e) and std::forward<E>(e) could be evaluated in any order, but
|
||||
// that's ok, "forward" itself does not modify e, it may only mark it as
|
||||
// modifyable by the outer call, which is obviously sequenced after the inner
|
||||
// call E2A()(e).
|
||||
template<class E>
|
||||
Lazy_rep_0(E&& e)
|
||||
: Lazy_rep<AT,ET,E2A>(E2A()(e), std::forward<E>(e)) {}
|
||||
|
||||
void
|
||||
print_dag(std::ostream& os, int level) const
|
||||
|
|
@ -352,116 +412,6 @@ public:
|
|||
#define CGAL_LEXACT(z,n,t) CGAL::exact( l##n )
|
||||
#define CGAL_LARGS(z, n, t) L##n const& l##n
|
||||
|
||||
#define CGAL_TMAP(z, n, d) typename Type_mapper< L##n, d##K, LK >::type
|
||||
#define CGAL_PRUNE_TREE(z, n, d) l##n = L##n ();
|
||||
#define CGAL_LINIT(z, n, d) l##n(l##n)
|
||||
#define CGAL_LN(z, n, d) d(l##n)
|
||||
#define CGAL_MLIST(z, n, d) mutable L##n l##n;
|
||||
|
||||
//____________________________________________________________
|
||||
|
||||
template <typename AT, typename ET, typename AC, typename EC, typename E2A, typename L1>
|
||||
class Lazy_rep_1
|
||||
: public Lazy_rep<AT, ET, E2A>
|
||||
, private EC
|
||||
{
|
||||
typedef Lazy_rep<AT, ET, E2A> Base;
|
||||
|
||||
mutable L1 l1_;
|
||||
|
||||
const EC& ec() const { return *this; }
|
||||
|
||||
public:
|
||||
|
||||
void
|
||||
update_exact() const
|
||||
{
|
||||
this->et = new ET(ec()(CGAL::exact(l1_)));
|
||||
this->at = E2A()(*(this->et));
|
||||
// Prune lazy tree
|
||||
l1_ = L1();
|
||||
}
|
||||
|
||||
Lazy_rep_1(const AC& ac, const EC& ec, const L1& l1)
|
||||
: Lazy_rep<AT,ET, E2A>(ac(CGAL::approx(l1))), EC(ec), l1_(l1)
|
||||
{
|
||||
this->set_depth(CGAL::depth(l1_) + 1);
|
||||
}
|
||||
|
||||
#ifdef CGAL_LAZY_KERNEL_DEBUG_SHOW_TYPEID
|
||||
# define CGAL_LAZY_PRINT_TYPEID CGAL::msg(os, level, typeid(AC).name());
|
||||
#else // not CGAL_LAZY_KERNEL_DEBUG_SHOW_TYPEID
|
||||
# define CGAL_LAZY_PRINT_TYPEID
|
||||
#endif // not CGAL_LAZY_KERNEL_DEBUG_SHOW_TYPEID
|
||||
|
||||
#ifdef CGAL_LAZY_KERNEL_DEBUG
|
||||
void
|
||||
print_dag(std::ostream& os, int level) const
|
||||
{
|
||||
this->print_at_et(os, level);
|
||||
if(this->is_lazy()){
|
||||
CGAL_LAZY_PRINT_TYPEID
|
||||
CGAL::msg(os, level, "DAG with one child node:");
|
||||
CGAL::print_dag(l1_, os, level+1);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
};
|
||||
|
||||
#ifdef CGAL_LAZY_KERNEL_DEBUG
|
||||
# define CGAL_PRINT_DAG_LN(z, n, d) \
|
||||
CGAL::print_dag(l##n, os, level+1);
|
||||
# define CGAL_LAZY_REP_PRINT_DAG(n) \
|
||||
void print_dag(std::ostream& os, int level) const { \
|
||||
this->print_at_et(os, level); \
|
||||
if(this->is_lazy()){ \
|
||||
CGAL_LAZY_PRINT_TYPEID \
|
||||
CGAL::msg(os, level, "DAG with " #n " child nodes:"); \
|
||||
BOOST_PP_REPEAT(n, CGAL_PRINT_DAG_LN, _) \
|
||||
} \
|
||||
}
|
||||
#else // not CGAL_LAZY_KERNEL_DEBUG
|
||||
# define CGAL_LAZY_REP_PRINT_DAG(n)
|
||||
#endif // not CGAL_LAZY_KERNEL_DEBUG
|
||||
|
||||
#define CGAL_LAZY_REP(z, n, d) \
|
||||
template< typename AT, typename ET, typename AC, typename EC, typename E2A, BOOST_PP_ENUM_PARAMS(n, typename L)> \
|
||||
class Lazy_rep_##n :public Lazy_rep< AT, \
|
||||
ET, \
|
||||
E2A >, \
|
||||
private EC \
|
||||
{ \
|
||||
\
|
||||
template <class Ei, \
|
||||
class Ai, \
|
||||
class E2Ai,\
|
||||
class Ki> \
|
||||
friend class Lazy_kernel_base; \
|
||||
BOOST_PP_REPEAT(n, CGAL_MLIST, _) \
|
||||
const EC& ec() const { return *this; } \
|
||||
public: \
|
||||
void update_exact() const { \
|
||||
this->et = new ET(ec()( BOOST_PP_ENUM(n, CGAL_LEXACT, _) ) ); \
|
||||
this->at = E2A()(*(this->et)); \
|
||||
BOOST_PP_REPEAT(n, CGAL_PRUNE_TREE, _) \
|
||||
} \
|
||||
Lazy_rep_##n(const AC& ac, const EC&, BOOST_PP_ENUM(n, CGAL_LARGS, _)) \
|
||||
: Lazy_rep<AT, ET, E2A>(ac( BOOST_PP_ENUM(n, CGAL_LN, CGAL::approx) )), BOOST_PP_ENUM(n, CGAL_LINIT, _) \
|
||||
{ this->set_depth(max_n( BOOST_PP_ENUM(n, CGAL_LN, CGAL::depth) ) + 1); } \
|
||||
\
|
||||
CGAL_LAZY_REP_PRINT_DAG(n) \
|
||||
};
|
||||
|
||||
BOOST_PP_REPEAT_FROM_TO(2, 9, CGAL_LAZY_REP, _)
|
||||
|
||||
#undef CGAL_TMAP
|
||||
#undef CGAL_PRUNE_TREE
|
||||
#undef CGAL_LINIT
|
||||
#undef CGAL_LAZY_REP
|
||||
#undef CGAL_LN
|
||||
#undef CGAL_MLIST
|
||||
#undef CGAL_PRINT_DAG_LN
|
||||
#undef CGAL_LAZY_REP_PRINT_DAG
|
||||
#undef CGAL_LAZY_PRINT_TYPEID
|
||||
|
||||
template < typename K1, typename K2 >
|
||||
|
|
@ -723,7 +673,7 @@ public:
|
|||
|
||||
//____________________________________________________________
|
||||
// The handle class
|
||||
template <typename AT_, typename ET_, typename EFT, typename E2A>
|
||||
template <typename AT_, typename ET_, typename E2A>
|
||||
class Lazy : public Handle
|
||||
{
|
||||
template <class Exact_kernel_,
|
||||
|
|
@ -739,7 +689,7 @@ class Lazy : public Handle
|
|||
|
||||
public :
|
||||
|
||||
typedef Lazy<AT_, ET_, EFT, E2A> Self;
|
||||
typedef Lazy<AT_, ET_, E2A> Self;
|
||||
typedef Lazy_rep<AT_, ET_, E2A> Self_rep;
|
||||
|
||||
typedef AT_ AT; // undocumented
|
||||
|
|
@ -785,6 +735,11 @@ public :
|
|||
PTR = new Lazy_rep_0<AT,ET,E2A>(e);
|
||||
}
|
||||
|
||||
Lazy(ET&& e)
|
||||
{
|
||||
PTR = new Lazy_rep_0<AT,ET,E2A>(std::move(e));
|
||||
}
|
||||
|
||||
const AT& approx() const
|
||||
{ return ptr()->approx(); }
|
||||
|
||||
|
|
@ -832,8 +787,8 @@ struct Lazy_construction_bbox
|
|||
typedef typename LK::Exact_kernel EK;
|
||||
typedef typename AC::result_type result_type;
|
||||
|
||||
AC ac;
|
||||
EC ec;
|
||||
CGAL_NO_UNIQUE_ADDRESS AC ac;
|
||||
CGAL_NO_UNIQUE_ADDRESS EC ec;
|
||||
|
||||
template <typename L1>
|
||||
result_type operator()(const L1& l1) const
|
||||
|
|
@ -854,6 +809,8 @@ struct Lazy_construction_bbox
|
|||
|
||||
template <typename LK, typename AC, typename EC>
|
||||
struct Lazy_construction_nt {
|
||||
Lazy_construction_nt(){}
|
||||
Lazy_construction_nt(LK const&){}
|
||||
|
||||
static const bool Protection = true;
|
||||
|
||||
|
|
@ -861,8 +818,8 @@ struct Lazy_construction_nt {
|
|||
typedef typename LK::Exact_kernel EK;
|
||||
typedef typename LK::E2A E2A;
|
||||
|
||||
AC ac;
|
||||
EC ec;
|
||||
CGAL_NO_UNIQUE_ADDRESS AC ac;
|
||||
CGAL_NO_UNIQUE_ADDRESS EC ec;
|
||||
|
||||
template<typename>
|
||||
struct result { };
|
||||
|
|
@ -878,30 +835,23 @@ struct Lazy_construction_nt {
|
|||
|
||||
BOOST_PP_REPEAT_FROM_TO(1, 6, CGAL_RESULT_NT, _)
|
||||
|
||||
#define CGAL_NT_OPERATOR(z, n, d) \
|
||||
template<BOOST_PP_ENUM_PARAMS(n, class L)> \
|
||||
typename cpp11::result_of<Lazy_construction_nt(BOOST_PP_ENUM_PARAMS(n, L))>::type \
|
||||
operator()( BOOST_PP_ENUM(n, CGAL_LARGS, _) ) const { \
|
||||
BOOST_PP_REPEAT(n, CGAL_TYPEMAP_EC, L) \
|
||||
BOOST_PP_REPEAT(n, CGAL_TYPEMAP_AC, L) \
|
||||
typedef typename boost::remove_cv< typename boost::remove_reference < \
|
||||
typename cpp11::result_of< EC(BOOST_PP_ENUM_PARAMS(n, E)) >::type >::type >::type ET; \
|
||||
typedef typename boost::remove_cv< typename boost::remove_reference < \
|
||||
typename cpp11::result_of< AC(BOOST_PP_ENUM_PARAMS(n, A)) >::type >::type >::type AT; \
|
||||
CGAL_BRANCH_PROFILER(std::string(" failures/calls to : ") + std::string(CGAL_PRETTY_FUNCTION), tmp); \
|
||||
Protect_FPU_rounding<Protection> P; \
|
||||
try { \
|
||||
return new Lazy_rep_##n<AT, ET, AC, EC, To_interval<ET>, BOOST_PP_ENUM_PARAMS(n, L) >(ac, ec, BOOST_PP_ENUM_PARAMS(n, l)); \
|
||||
} catch (Uncertain_conversion_exception&) { \
|
||||
CGAL_BRANCH_PROFILER_BRANCH(tmp); \
|
||||
Protect_FPU_rounding<!Protection> P2(CGAL_FE_TONEAREST); \
|
||||
return new Lazy_rep_0<AT,ET,To_interval<ET> >(ec( BOOST_PP_ENUM(n, CGAL_LEXACT, _) )); \
|
||||
} \
|
||||
} \
|
||||
template<class...L>
|
||||
auto operator()(L const&...l) const ->
|
||||
Lazy_exact_nt<std::remove_cv_t<std::remove_reference_t<decltype(ec(CGAL::exact(l)...))>>>
|
||||
{
|
||||
typedef std::remove_cv_t<std::remove_reference_t<decltype(ec(CGAL::exact(l)...))>> ET;
|
||||
typedef std::remove_cv_t<std::remove_reference_t<decltype(ac(CGAL::approx(l)...))>> AT;
|
||||
CGAL_BRANCH_PROFILER(std::string(" failures/calls to : ") + std::string(CGAL_PRETTY_FUNCTION), tmp);
|
||||
Protect_FPU_rounding<Protection> P;
|
||||
try {
|
||||
return new Lazy_rep_n<AT, ET, AC, EC, To_interval<ET>, L... >(ac, ec, l...);
|
||||
} catch (Uncertain_conversion_exception&) {
|
||||
CGAL_BRANCH_PROFILER_BRANCH(tmp);
|
||||
Protect_FPU_rounding<!Protection> P2(CGAL_FE_TONEAREST);
|
||||
return new Lazy_rep_0<AT,ET,To_interval<ET> >(ec( CGAL::exact(l)... ));
|
||||
}
|
||||
}
|
||||
|
||||
BOOST_PP_REPEAT_FROM_TO(1, 6, CGAL_NT_OPERATOR, _)
|
||||
|
||||
#undef INTERVAL_OPERATOR
|
||||
#undef CGAL_RESULT_NT
|
||||
};
|
||||
|
||||
|
|
@ -1043,8 +993,8 @@ struct Lazy_cartesian_const_iterator_2
|
|||
typedef typename LK::Exact_kernel EK;
|
||||
typedef typename LK::Cartesian_const_iterator_2 result_type;
|
||||
|
||||
AC ac;
|
||||
EC ec;
|
||||
CGAL_NO_UNIQUE_ADDRESS AC ac;
|
||||
CGAL_NO_UNIQUE_ADDRESS EC ec;
|
||||
|
||||
public:
|
||||
|
||||
|
|
@ -1072,8 +1022,8 @@ struct Lazy_cartesian_const_iterator_3
|
|||
typedef typename LK::Exact_kernel EK;
|
||||
typedef typename LK::Cartesian_const_iterator_3 result_type;
|
||||
|
||||
AC ac;
|
||||
EC ec;
|
||||
CGAL_NO_UNIQUE_ADDRESS AC ac;
|
||||
CGAL_NO_UNIQUE_ADDRESS EC ec;
|
||||
|
||||
public:
|
||||
|
||||
|
|
@ -1098,14 +1048,14 @@ public:
|
|||
// In a first version we assume that the references are of type Lazy<Something>,
|
||||
// and that the result type is void
|
||||
|
||||
template <typename LK, typename AK, typename EK, typename AC, typename EC, typename EFT, typename E2A>
|
||||
template <typename AC, typename EC, typename E2A>
|
||||
struct Lazy_functor_2_1
|
||||
{
|
||||
static const bool Protection = true;
|
||||
typedef void result_type;
|
||||
|
||||
AC ac;
|
||||
EC ec;
|
||||
CGAL_NO_UNIQUE_ADDRESS AC ac;
|
||||
CGAL_NO_UNIQUE_ADDRESS EC ec;
|
||||
|
||||
public:
|
||||
|
||||
|
|
@ -1166,11 +1116,10 @@ struct Lazy_functor_2_2
|
|||
typedef void result_type;
|
||||
typedef typename LK::Approximate_kernel AK;
|
||||
typedef typename LK::Exact_kernel EK;
|
||||
typedef typename EK::FT EFT;
|
||||
typedef typename LK::E2A E2A;
|
||||
|
||||
AC ac;
|
||||
EC ec;
|
||||
CGAL_NO_UNIQUE_ADDRESS AC ac;
|
||||
CGAL_NO_UNIQUE_ADDRESS EC ec;
|
||||
|
||||
public:
|
||||
|
||||
|
|
@ -1178,16 +1127,16 @@ public:
|
|||
void
|
||||
operator()(const L1& l1, const L2& l2, R1& r1, R2& r2) const
|
||||
{
|
||||
typedef Lazy<typename R1::AT, typename R1::ET, EFT, E2A> Handle_1;
|
||||
typedef Lazy<typename R2::AT, typename R2::ET, EFT, E2A> Handle_2;
|
||||
typedef Lazy<typename R1::AT, typename R1::ET, E2A> Handle_1;
|
||||
typedef Lazy<typename R2::AT, typename R2::ET, E2A> Handle_2;
|
||||
CGAL_BRANCH_PROFILER(std::string(" failures/calls to : ") + std::string(CGAL_PRETTY_FUNCTION), tmp);
|
||||
Protect_FPU_rounding<Protection> P;
|
||||
try {
|
||||
typedef Lazy<std::pair<typename R1::AT, typename R2::AT>, std::pair<typename R1::ET, typename R2::ET>, EFT, E2A> Lazy_pair;
|
||||
typedef Lazy<std::pair<typename R1::AT, typename R2::AT>, std::pair<typename R1::ET, typename R2::ET>, E2A> Lazy_pair;
|
||||
Lazy_pair lv(new Lazy_rep_2_2<AC, EC, E2A, L1, L2, R1, R2>(ac, ec, l1, l2));
|
||||
// lv->approx() is a std::pair<R1::AT, R2::AT>;
|
||||
r1 = R1(Handle_1(new Lazy_rep_1<void, void, First<std::pair<typename R1::AT, typename R2::AT> >, First<std::pair<typename R1::ET, typename R2::ET> >, E2A, Lazy_pair>(First<std::pair<typename R1::AT, typename R2::AT> >(), First<std::pair<typename R1::ET, typename R2::ET> >(), lv)));
|
||||
r2 = R2(Handle_2(new Lazy_rep_1<void, void, Second<std::pair<typename R1::AT, typename R2::AT> >, Second<std::pair<typename R1::ET, typename R2::ET> >, E2A, Lazy_pair>(Second<std::pair<typename R1::AT, typename R2::AT> >(), Second<std::pair<typename R1::ET, typename R2::ET> >(), lv)));
|
||||
r1 = R1(Handle_1(new Lazy_rep_n<void, void, First<std::pair<typename R1::AT, typename R2::AT> >, First<std::pair<typename R1::ET, typename R2::ET> >, E2A, Lazy_pair>(First<std::pair<typename R1::AT, typename R2::AT> >(), First<std::pair<typename R1::ET, typename R2::ET> >(), lv)));
|
||||
r2 = R2(Handle_2(new Lazy_rep_n<void, void, Second<std::pair<typename R1::AT, typename R2::AT> >, Second<std::pair<typename R1::ET, typename R2::ET> >, E2A, Lazy_pair>(Second<std::pair<typename R1::AT, typename R2::AT> >(), Second<std::pair<typename R1::ET, typename R2::ET> >(), lv)));
|
||||
} catch (Uncertain_conversion_exception&) {
|
||||
CGAL_BRANCH_PROFILER_BRANCH(tmp);
|
||||
Protect_FPU_rounding<!Protection> P2(CGAL_FE_TONEAREST);
|
||||
|
|
@ -1208,14 +1157,13 @@ struct Lazy_intersect_with_iterators
|
|||
static const bool Protection = true;
|
||||
typedef typename LK::Approximate_kernel AK;
|
||||
typedef typename LK::Exact_kernel EK;
|
||||
typedef typename EK::FT EFT;
|
||||
typedef typename LK::E2A E2A;
|
||||
typedef void result_type;
|
||||
typedef Lazy<Object, Object, EFT, E2A> Lazy_object;
|
||||
typedef Lazy<std::vector<Object>, std::vector<Object>, EFT, E2A> Lazy_vector;
|
||||
typedef Lazy<Object, Object, E2A> Lazy_object;
|
||||
typedef Lazy<std::vector<Object>, std::vector<Object>, E2A> Lazy_vector;
|
||||
|
||||
AC ac;
|
||||
EC ec;
|
||||
CGAL_NO_UNIQUE_ADDRESS AC ac;
|
||||
CGAL_NO_UNIQUE_ADDRESS EC ec;
|
||||
|
||||
public:
|
||||
|
||||
|
|
@ -1234,7 +1182,7 @@ public:
|
|||
for (unsigned int i = 0; i < lv.approx().size(); i++) {
|
||||
// FIXME : I'm not sure how this work...
|
||||
#define CGAL_Kernel_obj(X) if (object_cast<typename AK::X>(& (lv.approx()[i]))) { \
|
||||
*it++ = make_object(typename LK::X(new Lazy_rep_1<typename AK::X, typename EK::X, Ith<typename AK::X>, \
|
||||
*it++ = make_object(typename LK::X(new Lazy_rep_n<typename AK::X, typename EK::X, Ith<typename AK::X>, \
|
||||
Ith<typename EK::X>, E2A, Lazy_vector> \
|
||||
(Ith<typename AK::X>(i), Ith<typename EK::X>(i), lv))); \
|
||||
continue; \
|
||||
|
|
@ -1287,16 +1235,15 @@ struct Lazy_construction_object
|
|||
|
||||
typedef typename LK::Approximate_kernel AK;
|
||||
typedef typename LK::Exact_kernel EK;
|
||||
typedef typename EK::FT EFT;
|
||||
typedef typename LK::E2A E2A;
|
||||
typedef typename AC::result_type AT;
|
||||
typedef typename EC::result_type ET;
|
||||
typedef Object result_type;
|
||||
|
||||
typedef Lazy<Object, Object, EFT, E2A> Lazy_object;
|
||||
typedef Lazy<Object, Object, E2A> Lazy_object;
|
||||
|
||||
AC ac;
|
||||
EC ec;
|
||||
CGAL_NO_UNIQUE_ADDRESS AC ac;
|
||||
CGAL_NO_UNIQUE_ADDRESS EC ec;
|
||||
|
||||
public:
|
||||
|
||||
|
|
@ -1307,14 +1254,14 @@ public:
|
|||
CGAL_BRANCH_PROFILER(std::string(" failures/calls to : ") + std::string(CGAL_PRETTY_FUNCTION), tmp);
|
||||
Protect_FPU_rounding<Protection> P;
|
||||
try {
|
||||
Lazy_object lo(new Lazy_rep_1<result_type, result_type, AC, EC, E2A, L1>(ac, ec, l1));
|
||||
Lazy_object lo(new Lazy_rep_n<result_type, result_type, AC, EC, E2A, L1>(ac, ec, l1));
|
||||
|
||||
if(lo.approx().is_empty())
|
||||
return Object();
|
||||
|
||||
#define CGAL_Kernel_obj(X) \
|
||||
if (object_cast<typename AK::X>(& (lo.approx()))) { \
|
||||
typedef Lazy_rep_1< typename AK::X, typename EK::X, Object_cast<typename AK::X>, Object_cast<typename EK::X>, E2A, Lazy_object> Lcr; \
|
||||
typedef Lazy_rep_n< typename AK::X, typename EK::X, Object_cast<typename AK::X>, Object_cast<typename EK::X>, E2A, Lazy_object> Lcr; \
|
||||
Lcr * lcr = new Lcr(Object_cast<typename AK::X>(), Object_cast<typename EK::X>(), lo); \
|
||||
return make_object(typename LK::X(lcr)); \
|
||||
}
|
||||
|
|
@ -1340,14 +1287,14 @@ public:
|
|||
CGAL_BRANCH_PROFILER(std::string(" failures/calls to : ") + std::string(CGAL_PRETTY_FUNCTION), tmp);
|
||||
Protect_FPU_rounding<Protection> P;
|
||||
try {
|
||||
Lazy_object lo(new Lazy_rep_2<result_type, result_type, AC, EC, E2A, L1, L2>(ac, ec, l1, l2));
|
||||
Lazy_object lo(new Lazy_rep_n<result_type, result_type, AC, EC, E2A, L1, L2>(ac, ec, l1, l2));
|
||||
|
||||
if(lo.approx().is_empty())
|
||||
return Object();
|
||||
|
||||
#define CGAL_Kernel_obj(X) \
|
||||
if (object_cast<typename AK::X>(& (lo.approx()))) { \
|
||||
typedef Lazy_rep_1<typename AK::X, typename EK::X, Object_cast<typename AK::X>, Object_cast<typename EK::X>, E2A, Lazy_object> Lcr; \
|
||||
typedef Lazy_rep_n<typename AK::X, typename EK::X, Object_cast<typename AK::X>, Object_cast<typename EK::X>, E2A, Lazy_object> Lcr; \
|
||||
Lcr * lcr = new Lcr(Object_cast<typename AK::X>(), Object_cast<typename EK::X>(), lo); \
|
||||
return make_object(typename LK::X(lcr)); \
|
||||
}
|
||||
|
|
@ -1363,7 +1310,7 @@ public:
|
|||
std::vector<typename LK::X> V;\
|
||||
V.resize(v_ptr->size()); \
|
||||
for (unsigned int i = 0; i < v_ptr->size(); i++) { \
|
||||
V[i] = typename LK::X(new Lazy_rep_1<typename AK::X, typename EK::X, Ith_for_intersection<typename AK::X>, \
|
||||
V[i] = typename LK::X(new Lazy_rep_n<typename AK::X, typename EK::X, Ith_for_intersection<typename AK::X>, \
|
||||
Ith_for_intersection<typename EK::X>, E2A, Lazy_object> \
|
||||
(Ith_for_intersection<typename AK::X>(i), Ith_for_intersection<typename EK::X>(i), lo)); \
|
||||
} \
|
||||
|
|
@ -1394,14 +1341,14 @@ CGAL_Kernel_obj(Point_3)
|
|||
CGAL_BRANCH_PROFILER(std::string(" failures/calls to : ") + std::string(CGAL_PRETTY_FUNCTION), tmp);
|
||||
Protect_FPU_rounding<Protection> P;
|
||||
try {
|
||||
Lazy_object lo(new Lazy_rep_3<result_type, result_type, AC, EC, E2A, L1, L2, L3>(ac, ec, l1, l2, l3));
|
||||
Lazy_object lo(new Lazy_rep_n<result_type, result_type, AC, EC, E2A, L1, L2, L3>(ac, ec, l1, l2, l3));
|
||||
|
||||
if(lo.approx().is_empty())
|
||||
return Object();
|
||||
|
||||
#define CGAL_Kernel_obj(X) \
|
||||
if (object_cast<typename AK::X>(& (lo.approx()))) { \
|
||||
typedef Lazy_rep_1<typename AK::X, typename EK::X, Object_cast<typename AK::X>, Object_cast<typename EK::X>, E2A, Lazy_object> Lcr; \
|
||||
typedef Lazy_rep_n<typename AK::X, typename EK::X, Object_cast<typename AK::X>, Object_cast<typename EK::X>, E2A, Lazy_object> Lcr; \
|
||||
Lcr * lcr = new Lcr(Object_cast<typename AK::X>(), Object_cast<typename EK::X>(), lo); \
|
||||
return make_object(typename LK::X(lcr)); \
|
||||
}
|
||||
|
|
@ -1472,7 +1419,7 @@ struct Fill_lazy_variant_visitor_2 : boost::static_visitor<> {
|
|||
typedef typename Type_mapper<AKT, AK, EK>::type EKT;
|
||||
typedef typename Type_mapper<AKT, AK, LK>::type LKT;
|
||||
|
||||
typedef Lazy_rep_1<AKT, EKT, Variant_cast<AKT>, Variant_cast<EKT>, typename LK::E2A, Origin> Lcr;
|
||||
typedef Lazy_rep_n<AKT, EKT, Variant_cast<AKT>, Variant_cast<EKT>, typename LK::E2A, Origin> Lcr;
|
||||
Lcr * lcr = new Lcr(Variant_cast<AKT>(), Variant_cast<EKT>(), *o);
|
||||
|
||||
*r = LKT(lcr);
|
||||
|
|
@ -1487,7 +1434,7 @@ struct Fill_lazy_variant_visitor_2 : boost::static_visitor<> {
|
|||
std::vector<LKT> V;
|
||||
V.resize(t.size());
|
||||
for (unsigned int i = 0; i < t.size(); i++) {
|
||||
V[i] = LKT(new Lazy_rep_1<AKT, EKT, Ith_for_intersection<AKT>,
|
||||
V[i] = LKT(new Lazy_rep_n<AKT, EKT, Ith_for_intersection<AKT>,
|
||||
Ith_for_intersection<EKT>, typename LK::E2A, Origin>
|
||||
(Ith_for_intersection<AKT>(i), Ith_for_intersection<EKT>(i), *o));
|
||||
}
|
||||
|
|
@ -1535,7 +1482,6 @@ struct Lazy_construction_variant {
|
|||
|
||||
typedef typename LK::Approximate_kernel AK;
|
||||
typedef typename LK::Exact_kernel EK;
|
||||
typedef typename EK::FT EFT;
|
||||
typedef typename LK::E2A E2A;
|
||||
|
||||
|
||||
|
|
@ -1569,7 +1515,7 @@ struct Lazy_construction_variant {
|
|||
Protect_FPU_rounding<Protection> P;
|
||||
|
||||
try {
|
||||
Lazy<AT, ET, EFT, E2A> lazy(new Lazy_rep_2<AT, ET, AC, EC, E2A, L1, L2>(AC(), EC(), l1, l2));
|
||||
Lazy<AT, ET, E2A> lazy(new Lazy_rep_n<AT, ET, AC, EC, E2A, L1, L2>(AC(), EC(), l1, l2));
|
||||
|
||||
// the approximate result requires the trait with types from the AK
|
||||
AT approx_v = lazy.approx();
|
||||
|
|
@ -1582,7 +1528,7 @@ struct Lazy_construction_variant {
|
|||
}
|
||||
|
||||
// the static visitor fills the result_type with the correct unwrapped type
|
||||
internal::Fill_lazy_variant_visitor_2< result_type, AK, LK, EK, Lazy<AT, ET, EFT, E2A> > visitor(res, lazy);
|
||||
internal::Fill_lazy_variant_visitor_2< result_type, AK, LK, EK, Lazy<AT, ET, E2A> > visitor(res, lazy);
|
||||
boost::apply_visitor(visitor, *approx_v);
|
||||
|
||||
return res;
|
||||
|
|
@ -1618,7 +1564,7 @@ struct Lazy_construction_variant {
|
|||
CGAL_BRANCH_PROFILER(std::string(" failures/calls to : ") + std::string(CGAL_PRETTY_FUNCTION), tmp);
|
||||
Protect_FPU_rounding<Protection> P;
|
||||
try {
|
||||
Lazy<AT, ET, EFT, E2A> lazy(new Lazy_rep_3<AT, ET, AC, EC, E2A, L1, L2, L3>(AC(), EC(), l1, l2, l3));
|
||||
Lazy<AT, ET, E2A> lazy(new Lazy_rep_n<AT, ET, AC, EC, E2A, L1, L2, L3>(AC(), EC(), l1, l2, l3));
|
||||
|
||||
// the approximate result requires the trait with types from the AK
|
||||
AT approx_v = lazy.approx();
|
||||
|
|
@ -1631,7 +1577,7 @@ struct Lazy_construction_variant {
|
|||
}
|
||||
|
||||
// the static visitor fills the result_type with the correct unwrapped type
|
||||
internal::Fill_lazy_variant_visitor_2< result_type, AK, LK, EK, Lazy<AT, ET, EFT, E2A> > visitor(res, lazy);
|
||||
internal::Fill_lazy_variant_visitor_2< result_type, AK, LK, EK, Lazy<AT, ET, E2A> > visitor(res, lazy);
|
||||
boost::apply_visitor(visitor, *approx_v);
|
||||
|
||||
return res;
|
||||
|
|
@ -1670,23 +1616,22 @@ struct Lazy_construction<LK, AC, EC, E2A_, true> {
|
|||
typedef typename boost::remove_cv<
|
||||
typename boost::remove_reference < typename EC::result_type >::type >::type ET;
|
||||
|
||||
typedef typename EK::FT EFT;
|
||||
typedef typename Default::Get<E2A_, typename LK::E2A>::type E2A;
|
||||
|
||||
typedef typename Type_mapper<AT, AK, LK>::type result_type;
|
||||
|
||||
AC ac;
|
||||
EC ec;
|
||||
CGAL_NO_UNIQUE_ADDRESS AC ac;
|
||||
CGAL_NO_UNIQUE_ADDRESS EC ec;
|
||||
|
||||
#define CGAL_CONSTRUCTION_OPERATOR(z, n, d ) \
|
||||
template<BOOST_PP_ENUM_PARAMS(n, class L)> \
|
||||
result_type \
|
||||
operator()( BOOST_PP_ENUM(n, CGAL_LARGS, _) ) const { \
|
||||
typedef Lazy< AT, ET, EFT, E2A> Handle; \
|
||||
typedef Lazy< AT, ET, E2A> Handle; \
|
||||
CGAL_BRANCH_PROFILER(std::string(" failures/calls to : ") + std::string(CGAL_PRETTY_FUNCTION), tmp); \
|
||||
Protect_FPU_rounding<Protection> P; \
|
||||
try { \
|
||||
return result_type( Handle(new Lazy_rep_##n<AT, ET, AC, EC, E2A, BOOST_PP_ENUM_PARAMS(n, L)>(ac, ec, BOOST_PP_ENUM_PARAMS(n, l)))); \
|
||||
return result_type( Handle(new Lazy_rep_n<AT, ET, AC, EC, E2A, BOOST_PP_ENUM_PARAMS(n, L)>(ac, ec, BOOST_PP_ENUM_PARAMS(n, l)))); \
|
||||
} catch (Uncertain_conversion_exception&) { \
|
||||
CGAL_BRANCH_PROFILER_BRANCH(tmp); \
|
||||
Protect_FPU_rounding<!Protection> P2(CGAL_FE_TONEAREST); \
|
||||
|
|
@ -1701,7 +1646,7 @@ struct Lazy_construction<LK, AC, EC, E2A_, true> {
|
|||
result_type
|
||||
operator()() const
|
||||
{
|
||||
typedef Lazy<AT, ET, EFT, E2A> Handle;
|
||||
typedef Lazy<AT, ET, E2A> Handle;
|
||||
return result_type( Handle(new Lazy_rep_0<AT,ET,E2A>()) );
|
||||
}
|
||||
|
||||
|
|
@ -1717,7 +1662,6 @@ struct Lazy_construction<LK, AC, EC, E2A_, false>
|
|||
|
||||
typedef typename LK::Approximate_kernel AK;
|
||||
typedef typename LK::Exact_kernel EK;
|
||||
typedef typename EK::FT EFT;
|
||||
typedef typename Default::Get<E2A_, typename LK::E2A>::type E2A;
|
||||
|
||||
template<typename>
|
||||
|
|
@ -1726,8 +1670,8 @@ struct Lazy_construction<LK, AC, EC, E2A_, false>
|
|||
// you are on your own
|
||||
};
|
||||
|
||||
AC ac;
|
||||
EC ec;
|
||||
CGAL_NO_UNIQUE_ADDRESS AC ac;
|
||||
CGAL_NO_UNIQUE_ADDRESS EC ec;
|
||||
|
||||
// acquire the result_type of the approximate kernel, map it back to the lazy kernel object
|
||||
#define CGAL_RESULT(z, n, d) \
|
||||
|
|
@ -1749,12 +1693,12 @@ struct result<F( BOOST_PP_ENUM_PARAMS(n, T) )> { \
|
|||
typename cpp11::result_of< EC(BOOST_PP_ENUM_PARAMS(n, E)) >::type >::type >::type ET; \
|
||||
typedef typename boost::remove_cv< typename boost::remove_reference < \
|
||||
typename cpp11::result_of< AC(BOOST_PP_ENUM_PARAMS(n, A)) >::type >::type >::type AT; \
|
||||
typedef Lazy< AT, ET, EFT, E2A> Handle; \
|
||||
typedef Lazy< AT, ET, E2A> Handle; \
|
||||
typedef typename cpp11::result_of<Lazy_construction(BOOST_PP_ENUM_PARAMS(n, L))>::type result_type; \
|
||||
CGAL_BRANCH_PROFILER(std::string(" failures/calls to : ") + std::string(CGAL_PRETTY_FUNCTION), tmp); \
|
||||
Protect_FPU_rounding<Protection> P; \
|
||||
try { \
|
||||
return result_type( Handle(new Lazy_rep_##n<AT, ET, AC, EC, E2A, BOOST_PP_ENUM_PARAMS(n, L)>(ac, ec, BOOST_PP_ENUM_PARAMS(n, l)))); \
|
||||
return result_type( Handle(new Lazy_rep_n<AT, ET, AC, EC, E2A, BOOST_PP_ENUM_PARAMS(n, L)>(ac, ec, BOOST_PP_ENUM_PARAMS(n, l)))); \
|
||||
} catch (Uncertain_conversion_exception&) { \
|
||||
CGAL_BRANCH_PROFILER_BRANCH(tmp); \
|
||||
Protect_FPU_rounding<!Protection> P2(CGAL_FE_TONEAREST); \
|
||||
|
|
@ -1771,7 +1715,7 @@ struct result<F( BOOST_PP_ENUM_PARAMS(n, T) )> { \
|
|||
{
|
||||
typedef typename cpp11::result_of<AC()>::type AT;
|
||||
typedef typename cpp11::result_of<EC()>::type ET;
|
||||
typedef Lazy<AT, ET, EFT, E2A> Handle;
|
||||
typedef Lazy<AT, ET, E2A> Handle;
|
||||
typedef typename Type_mapper< typename cpp11::result_of<AC()>::type ,AK, LK>::type result_type;
|
||||
|
||||
return result_type( Handle(new Lazy_rep_0<AT,ET,E2A>()) );
|
||||
|
|
|
|||
|
|
@ -164,7 +164,7 @@ public:
|
|||
typedef CGAL::Object Object_3;
|
||||
|
||||
#define CGAL_Kernel_obj(X) \
|
||||
typedef Lazy<typename Approximate_kernel::X, typename Exact_kernel::X, typename Exact_kernel::FT, E2A> X;
|
||||
typedef Lazy<typename Approximate_kernel::X, typename Exact_kernel::X, E2A> X;
|
||||
|
||||
CGAL_Kernel_obj(Data_accessor_2)
|
||||
CGAL_Kernel_obj(Conic_2)
|
||||
|
|
@ -325,7 +325,7 @@ public:
|
|||
FT operator()(const Weighted_point_2& p) const
|
||||
{
|
||||
|
||||
typedef Lazy_rep_3<typename Approximate_kernel::Weighted_point_2,
|
||||
typedef Lazy_rep_n<typename Approximate_kernel::Weighted_point_2,
|
||||
typename Exact_kernel::Weighted_point_2,
|
||||
typename Approximate_kernel::Construct_weighted_point_2,
|
||||
typename Exact_kernel::Construct_weighted_point_2,
|
||||
|
|
@ -338,7 +338,7 @@ public:
|
|||
|
||||
LR * lr = dynamic_cast<LR*>(p.ptr());
|
||||
if(lr && (! lr->et)){
|
||||
return lr->l2;
|
||||
return std::get<2>(lr->l);
|
||||
}
|
||||
return BaseClass().compute_weight_2_object()(p);
|
||||
}
|
||||
|
|
@ -355,7 +355,7 @@ public:
|
|||
FT operator()(const Weighted_point_3& p) const
|
||||
{
|
||||
|
||||
typedef Lazy_rep_3<typename Approximate_kernel::Weighted_point_3,
|
||||
typedef Lazy_rep_n<typename Approximate_kernel::Weighted_point_3,
|
||||
typename Exact_kernel::Weighted_point_3,
|
||||
typename Approximate_kernel::Construct_weighted_point_3,
|
||||
typename Exact_kernel::Construct_weighted_point_3,
|
||||
|
|
@ -368,7 +368,7 @@ public:
|
|||
|
||||
LR * lr = dynamic_cast<LR*>(p.ptr());
|
||||
if(lr && (! lr->et)){
|
||||
return lr->l2;
|
||||
return std::get<2>(lr->l);
|
||||
}
|
||||
return BaseClass().compute_weight_3_object()(p);
|
||||
}
|
||||
|
|
@ -403,7 +403,7 @@ public:
|
|||
|
||||
Point_2 operator()(const Weighted_point_2& p) const
|
||||
{
|
||||
typedef Lazy_rep_3<typename Approximate_kernel::Weighted_point_2,
|
||||
typedef Lazy_rep_n<typename Approximate_kernel::Weighted_point_2,
|
||||
typename Exact_kernel::Weighted_point_2,
|
||||
typename Approximate_kernel::Construct_weighted_point_2,
|
||||
typename Exact_kernel::Construct_weighted_point_2,
|
||||
|
|
@ -413,7 +413,7 @@ public:
|
|||
FT
|
||||
> LR;
|
||||
|
||||
typedef Lazy_rep_3<typename Approximate_kernel::Weighted_point_2,
|
||||
typedef Lazy_rep_n<typename Approximate_kernel::Weighted_point_2,
|
||||
typename Exact_kernel::Weighted_point_2,
|
||||
typename Approximate_kernel::Construct_weighted_point_2,
|
||||
typename Exact_kernel::Construct_weighted_point_2,
|
||||
|
|
@ -425,11 +425,11 @@ public:
|
|||
|
||||
LR * lr = dynamic_cast<LR*>(p.ptr());
|
||||
if(lr && (! lr->et)){
|
||||
return lr->l1;
|
||||
return std::get<1>(lr->l);
|
||||
} else {
|
||||
LRint* lrint = dynamic_cast<LRint*>(p.ptr());
|
||||
if(lrint && (! lrint->et)){
|
||||
return lrint->l1;
|
||||
return std::get<1>(lrint->l);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -465,7 +465,7 @@ public:
|
|||
|
||||
Point_3 operator()(const Weighted_point_3& p) const
|
||||
{
|
||||
typedef Lazy_rep_3<typename Approximate_kernel::Weighted_point_3,
|
||||
typedef Lazy_rep_n<typename Approximate_kernel::Weighted_point_3,
|
||||
typename Exact_kernel::Weighted_point_3,
|
||||
typename Approximate_kernel::Construct_weighted_point_3,
|
||||
typename Exact_kernel::Construct_weighted_point_3,
|
||||
|
|
@ -475,7 +475,7 @@ public:
|
|||
FT
|
||||
> LR;
|
||||
|
||||
typedef Lazy_rep_3<typename Approximate_kernel::Weighted_point_3,
|
||||
typedef Lazy_rep_n<typename Approximate_kernel::Weighted_point_3,
|
||||
typename Exact_kernel::Weighted_point_3,
|
||||
typename Approximate_kernel::Construct_weighted_point_3,
|
||||
typename Exact_kernel::Construct_weighted_point_3,
|
||||
|
|
@ -488,11 +488,11 @@ public:
|
|||
|
||||
LR * lr = dynamic_cast<LR*>(p.ptr());
|
||||
if(lr && (! lr->et)){
|
||||
return lr->l1;
|
||||
return std::get<1>(lr->l);
|
||||
}else{
|
||||
LRint* lrint = dynamic_cast<LRint*>(p.ptr());
|
||||
if(lrint && (! lrint->et)){
|
||||
return lrint->l1;
|
||||
return std::get<1>(lrint->l);
|
||||
}
|
||||
}
|
||||
return BaseClass().construct_point_3_object()(p);
|
||||
|
|
|
|||
|
|
@ -2,9 +2,9 @@
|
|||
# This is the CMake script for compiling a CGAL application.
|
||||
|
||||
|
||||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
project( Filtered_kernel_Tests )
|
||||
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
|
||||
find_package(CGAL QUIET)
|
||||
|
||||
|
|
|
|||
|
|
@ -2,9 +2,9 @@
|
|||
# This is the CMake script for compiling a CGAL application.
|
||||
|
||||
|
||||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
project( Generalized_map_Examples )
|
||||
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
|
||||
find_package(CGAL QUIET)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
# Created by the script cgal_create_CMakeLists
|
||||
# This is the CMake script for compiling a set of CGAL applications.
|
||||
|
||||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
project( Generalized_map_Tests )
|
||||
|
||||
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
|
||||
# CGAL and its components
|
||||
find_package( CGAL QUIET COMPONENTS )
|
||||
|
|
|
|||
|
|
@ -2,9 +2,9 @@
|
|||
# This is the CMake script for compiling a CGAL application.
|
||||
|
||||
|
||||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
project( Generator_example )
|
||||
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
|
||||
|
||||
find_package(CGAL QUIET COMPONENTS Core )
|
||||
|
|
|
|||
|
|
@ -2,9 +2,9 @@
|
|||
# This is the CMake script for compiling a CGAL application.
|
||||
|
||||
|
||||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
project( Generator_Examples )
|
||||
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
|
||||
find_package(CGAL QUIET)
|
||||
|
||||
|
|
|
|||
|
|
@ -2,9 +2,9 @@
|
|||
# This is the CMake script for compiling a CGAL application.
|
||||
|
||||
|
||||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
project( Generator_Tests )
|
||||
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
|
||||
find_package(CGAL QUIET)
|
||||
|
||||
|
|
|
|||
|
|
@ -2,9 +2,9 @@
|
|||
# This is the CMake script for compiling a CGAL application.
|
||||
|
||||
|
||||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
project( Geomview_Demo )
|
||||
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
if(NOT POLICY CMP0070 AND POLICY CMP0053)
|
||||
# Only set CMP0053 to OLD with CMake<3.10, otherwise there is a warning.
|
||||
cmake_policy(SET CMP0053 OLD)
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue