Merge branch 'master' into gsoc2019-PMPHDist-martinskrodzki

This commit is contained in:
Dmitry Anisimov 2021-04-27 18:37:32 +02:00 committed by GitHub
commit a2f460c9d6
980 changed files with 102482 additions and 8123 deletions

5
.clang-tidy Normal file
View File

@ -0,0 +1,5 @@
---
Checks: '-clang-diagnostic*,-clang-analyzer*,modernize-use-nullptr'
HeaderFilterRegex: 'CGAL/*'
...

View File

@ -73,7 +73,7 @@ jobs:
wget --no-verbose cgal.github.io -O tmp.html
if ! egrep -q "\/$PR_NUMBER\/$ROUND" tmp.html; then
#list impacted packages
LIST_OF_PKGS=$(git diff --name-only HEAD^1 HEAD |cut -s -d/ -f1 |sort -u | xargs -I {} ls -d {}/package_info 2>/dev/null |cut -d/ -f1 |egrep -v Installation||true)
LIST_OF_PKGS=$(git diff --name-only HEAD^1 HEAD |cut -s -d/ -f1 |sort -u | xargs -I {} echo {} && ls -d {}/package_info 2>/dev/null |cut -d/ -f1 |egrep -v Installation||true)
if [ "$LIST_OF_PKGS" = "" ]; then
exit 1
fi

View File

@ -1,7 +1,7 @@
# 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.14)
cmake_minimum_required(VERSION 3.1...3.20)
project(AABB_traits_benchmark)
find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Core)

View File

@ -1,6 +1,6 @@
# This is the CMake script for compiling the AABB tree demo.
cmake_minimum_required(VERSION 3.1...3.15)
cmake_minimum_required(VERSION 3.1...3.20)
project(AABB_tree_Demo)
# Find includes in corresponding build directories

View File

@ -154,7 +154,7 @@ void MainWindow::on_actionInside_points_triggered()
bool ok;
const unsigned int nb_points = (unsigned)
QInputDialog::getInt(NULL, "#Points",
QInputDialog::getInt(nullptr, "#Points",
"#Points:",10000,1,100000000,9,&ok);
if(!ok)
@ -171,19 +171,19 @@ void MainWindow::on_actionPoints_in_interval_triggered()
bool ok;
const unsigned int nb_points = (unsigned)
QInputDialog::getInt(NULL, "#Points",
QInputDialog::getInt(nullptr, "#Points",
"#Points:",10000,1,100000000,9,&ok);
if(!ok)
return;
const double min =
QInputDialog::getDouble(NULL, "min",
QInputDialog::getDouble(nullptr, "min",
"Min:",-0.1,-1000.0,1000.0,9,&ok);
if(!ok)
return;
const double max =
QInputDialog::getDouble(NULL, "max",
QInputDialog::getDouble(nullptr, "max",
"Max:",0.1,-1000.0,1000.0,9,&ok);
if(!ok)
return;
@ -199,7 +199,7 @@ void MainWindow::on_actionBoundary_segments_triggered()
bool ok;
const unsigned int nb_slices = (unsigned)
QInputDialog::getInt(NULL, "#Slices",
QInputDialog::getInt(nullptr, "#Slices",
"Slices:",100,1,1000000,8,&ok);
if(!ok)
@ -216,7 +216,7 @@ void MainWindow::on_actionBoundary_points_triggered()
bool ok;
const unsigned int nb_points = (unsigned)
QInputDialog::getInt(NULL, "#Points",
QInputDialog::getInt(nullptr, "#Points",
"Points:",1000,1,10000000,8,&ok);
if(!ok)
@ -233,7 +233,7 @@ void MainWindow::on_actionEdge_points_triggered()
bool ok;
const unsigned int nb_points = (unsigned)
QInputDialog::getInt(NULL, "#Points",
QInputDialog::getInt(nullptr, "#Points",
"Points:",1000,1,10000000,8,&ok);
if(!ok)
@ -248,7 +248,7 @@ void MainWindow::on_actionEdge_points_triggered()
void MainWindow::on_actionBench_distances_triggered()
{
bool ok;
const double duration = QInputDialog::getDouble(NULL, "Duration",
const double duration = QInputDialog::getDouble(nullptr, "Duration",
"Duration (s):",1.0,0.01,1000,8,&ok);
if(!ok)
return;
@ -262,7 +262,7 @@ void MainWindow::on_actionBench_distances_triggered()
void MainWindow::on_actionBench_intersections_triggered()
{
bool ok;
const double duration = QInputDialog::getDouble(NULL, "Duration",
const double duration = QInputDialog::getDouble(nullptr, "Duration",
"Duration (s):",1.0,0.01,1000.0,8,&ok);
if(!ok)
return;
@ -361,7 +361,7 @@ void MainWindow::on_actionRefine_bisection_triggered()
{
bool ok;
const double max_len =
QInputDialog::getDouble(NULL, "Max edge len",
QInputDialog::getDouble(nullptr, "Max edge len",
"Max edge len:",0.1,0.001,100.0,9,&ok);
if(!ok)
return;

View File

@ -18,7 +18,7 @@ class MainWindow :
{
Q_OBJECT
public:
MainWindow(QWidget* parent = 0);
MainWindow(QWidget* parent = nullptr);
~MainWindow();
public slots:

View File

@ -33,7 +33,7 @@ Scene::Scene()
, m_grid_size(slow_distance_grid_size)
, m_cut_plane(NONE)
{
m_pPolyhedron = NULL;
m_pPolyhedron = nullptr;
// view options
m_view_points = true;
@ -541,7 +541,7 @@ int Scene::open(QString filename)
return -1;
}
if(m_pPolyhedron != NULL)
if(m_pPolyhedron != nullptr)
delete m_pPolyhedron;
// allocate new polyhedron
@ -553,7 +553,7 @@ int Scene::open(QString filename)
QApplication::restoreOverrideCursor();
delete m_pPolyhedron;
m_pPolyhedron = NULL;
m_pPolyhedron = nullptr;
return -1;
}
@ -571,7 +571,7 @@ void Scene::update_bbox()
std::cout << "Compute bbox...";
m_bbox = Bbox();
if(m_pPolyhedron == NULL)
if(m_pPolyhedron == nullptr)
{
std::cout << "failed (no polyhedron)." << std::endl;
return;
@ -794,7 +794,7 @@ FT Scene::bbox_diag() const
void Scene::build_facet_tree()
{
if ( NULL == m_pPolyhedron )
if ( nullptr == m_pPolyhedron )
{
std::cerr << "Build facet tree failed: load polyhedron first." << std::endl;
return;
@ -813,7 +813,7 @@ void Scene::build_facet_tree()
void Scene::build_edge_tree()
{
if ( NULL == m_pPolyhedron )
if ( nullptr == m_pPolyhedron )
{
std::cerr << "Build edge tree failed: load polyhedron first." << std::endl;
return;
@ -860,7 +860,7 @@ void Scene::generate_points_in(const unsigned int nb_points,
const double vmin,
const double vmax)
{
if(m_pPolyhedron == NULL)
if(m_pPolyhedron == nullptr)
{
std::cout << "Load polyhedron first." << std::endl;
return;
@ -913,7 +913,7 @@ void Scene::generate_points_in(const unsigned int nb_points,
void Scene::generate_inside_points(const unsigned int nb_points)
{
if(m_pPolyhedron == NULL)
if(m_pPolyhedron == nullptr)
{
std::cout << "Load polyhedron first." << std::endl;
return;
@ -955,7 +955,7 @@ void Scene::generate_inside_points(const unsigned int nb_points)
void Scene::generate_boundary_segments(const unsigned int nb_slices)
{
if(m_pPolyhedron == NULL)
if(m_pPolyhedron == nullptr)
{
std::cout << "Load polyhedron first." << std::endl;
return;
@ -1005,7 +1005,7 @@ void Scene::generate_boundary_segments(const unsigned int nb_slices)
void Scene::generate_boundary_points(const unsigned int nb_points)
{
if(m_pPolyhedron == NULL)
if(m_pPolyhedron == nullptr)
{
std::cout << "Load polyhedron first." << std::endl;
return;
@ -1055,7 +1055,7 @@ void Scene::generate_boundary_points(const unsigned int nb_points)
void Scene::generate_edge_points(const unsigned int nb_points)
{
if(m_pPolyhedron == NULL)
if(m_pPolyhedron == nullptr)
{
std::cout << "Load polyhedron first." << std::endl;
return;
@ -1219,7 +1219,7 @@ void Scene::cut_segment_plane()
{
const Segment* inter_seg = CGAL::object_cast<Segment>(&(it->first));
if ( NULL != inter_seg )
if ( nullptr != inter_seg )
{
m_cut_segments.push_back(*inter_seg);
}
@ -1280,7 +1280,7 @@ void Scene::toggle_view_plane()
void Scene::refine_bisection(const FT max_sqlen)
{
if(m_pPolyhedron == NULL)
if(m_pPolyhedron == nullptr)
{
std::cout << "Load polyhedron first." << std::endl;
return;
@ -1295,7 +1295,7 @@ void Scene::refine_bisection(const FT max_sqlen)
void Scene::refine_loop()
{
if(m_pPolyhedron == NULL)
if(m_pPolyhedron == nullptr)
{
std::cout << "Load polyhedron first." << std::endl;
return;

View File

@ -6,7 +6,7 @@
Viewer::Viewer(QWidget* parent)
: CGAL::QGLViewer(parent),
m_pScene(NULL),
m_pScene(nullptr),
m_custom_mouse(false)
{
}
@ -19,7 +19,7 @@ void Viewer::setScene(Scene* pScene)
void Viewer::draw()
{
CGAL::QGLViewer::draw();
if(m_pScene != NULL)
if(m_pScene != nullptr)
{
m_pScene->draw(this);
}

View File

@ -6,7 +6,7 @@
void Scene::benchmark_intersections(const double duration)
{
if(m_pPolyhedron == NULL)
if(m_pPolyhedron == nullptr)
{
std::cout << "Load polyhedron first." << std::endl;
return;
@ -67,7 +67,7 @@ void Scene::bench_intersections(Facet_tree& tree,
void Scene::benchmark_distances(const double duration)
{
if(m_pPolyhedron == NULL)
if(m_pPolyhedron == nullptr)
{
std::cout << "Load polyhedron first." << std::endl;
return;
@ -101,7 +101,7 @@ std::size_t Scene::nb_digits(std::size_t value)
// refinement loop
void Scene::bench_memory()
{
if(m_pPolyhedron == NULL)
if(m_pPolyhedron == nullptr)
{
std::cout << "Load polyhedron first." << std::endl;
return;
@ -137,7 +137,7 @@ void Scene::bench_memory()
void Scene::bench_construction()
{
if(m_pPolyhedron == NULL)
if(m_pPolyhedron == nullptr)
{
std::cout << "Load polyhedron first." << std::endl;
return;
@ -174,7 +174,7 @@ void Scene::bench_construction()
void Scene::bench_intersections_vs_nbt()
{
if(m_pPolyhedron == NULL)
if(m_pPolyhedron == nullptr)
{
std::cout << "Load polyhedron first." << std::endl;
return;
@ -218,7 +218,7 @@ void Scene::bench_intersections_vs_nbt()
void Scene::bench_distances_vs_nbt()
{
if(m_pPolyhedron == NULL)
if(m_pPolyhedron == nullptr)
{
std::cout << "Load polyhedron first." << std::endl;
return;

View File

@ -45,11 +45,9 @@ typedef unspecified_type Do_intersect_3;
/*!
A functor object to construct the intersection between two geometric objects.
This functor must support the result_of protocol, that is the return
type of the `operator()(A, B)` is `CGAL::cpp11::result<Intersect_3(A,B)>`.
Provides the operators:
`CGAL::cpp11::result<Intersect_3(A,B)> operator()(const A& a, const B& b);`
`decltype(auto) operator()(const A& a, const B& b);`
where `A` and `B` are any relevant types among `Ray_3`, `Segment_3`, `Line_3`,
`Triangle_3`, `Plane_3` and `Bbox_3`.
Relevant herein means that a line primitive (ray, segment, line) is tested

View File

@ -99,7 +99,7 @@ public:
// types
typedef CGAL::AABB_traits<K, My_triangle_primitive> My_AABB_traits;
typedef CGAL::AABB_tree<My_AABB_traits> Tree;
const double* My_triangle_primitive::point_container = 0;
const double* My_triangle_primitive::point_container = nullptr;
int main()
{

View File

@ -106,7 +106,7 @@ public:
// types
typedef CGAL::AABB_traits<K, My_triangle_primitive> My_AABB_traits;
typedef CGAL::AABB_tree<My_AABB_traits> Tree;
const std::vector<My_point>* My_triangle_primitive::point_container = 0;
const std::vector<My_point>* My_triangle_primitive::point_container = nullptr;
int main()
{

View File

@ -1,7 +1,7 @@
# 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)
cmake_minimum_required(VERSION 3.1...3.20)
project(AABB_tree_Examples)
find_package(CGAL REQUIRED)

View File

@ -20,7 +20,6 @@
#include <CGAL/disable_warnings.h>
#include <CGAL/AABB_primitive.h>
#include <CGAL/result_of.h>
#include <iterator>
namespace CGAL {
@ -31,14 +30,17 @@ namespace internal {
//classical typedefs
typedef Iterator key_type;
typedef typename GeomTraits::Point_3 value_type;
typedef typename cpp11::result_of<
typename GeomTraits::Construct_source_3(typename GeomTraits::Segment_3)
>::type reference;
// typedef decltype(
// std::declval<typename GeomTraits::Construct_source_3>()(
// std::declval<typename GeomTraits::Segment_3>())) reference;
typedef decltype(
typename GeomTraits::Construct_source_3()(
*std::declval<key_type&>())) reference;
typedef boost::readable_property_map_tag category;
typedef Source_of_segment_3_iterator_property_map<GeomTraits, Iterator> Self;
inline friend
typename Source_of_segment_3_iterator_property_map<GeomTraits,Iterator>::reference
get(Source_of_segment_3_iterator_property_map<GeomTraits,Iterator>, Iterator it)
inline friend reference
get(Self, key_type it)
{
return typename GeomTraits::Construct_source_3()( *it );
}
@ -57,7 +59,6 @@ namespace internal {
* \tparam GeomTraits is a traits class providing the nested type `Point_3` and `Segment_3`.
* It also provides the functor `Construct_source_3` that has an operator taking a `Segment_3`
* and returning its source as a type convertible to `Point_3`.
* In addition `Construct_source_3` must support the result_of protocol.
* \tparam Iterator is a model of `ForwardIterator` with its value type convertible to `GeomTraits::Segment_3`
* \tparam CacheDatum is either `CGAL::Tag_true` or `CGAL::Tag_false`. In the former case,
* the datum is stored in the primitive, while in the latter it is

View File

@ -24,6 +24,8 @@
#include <CGAL/internal/AABB_tree/Has_nested_type_Shared_data.h>
#include <CGAL/internal/AABB_tree/Is_ray_intersection_geomtraits.h>
#include <CGAL/internal/AABB_tree/Primitive_helper.h>
#include <CGAL/internal/Has_boolean_tags.h>
#include <boost/optional.hpp>
@ -190,14 +192,14 @@ public:
typedef typename std::pair<typename GeomTraits::Point_3, typename Primitive::Id> Point_and_primitive_id;
/// `Intersection_and_primitive_id<Query>::%Type::first_type` is found according to
/// the result type of `GeomTraits::Intersect_3::operator()`,
/// (that is cpp11::result_of<GeomTraits::Intersect_3(Query, Primitive::Datum)>::type). If it is
/// the result type of `GeomTraits::Intersect_3::operator()`. If it is
/// `boost::optional<T>` then it is `T`, and the result type otherwise.
template<typename Query>
struct Intersection_and_primitive_id {
typedef typename cpp11::result_of<
typename GeomTraits::Intersect_3(Query, typename Primitive::Datum)
>::type Intersection_type;
typedef decltype(
std::declval<typename GeomTraits::Intersect_3>()(
std::declval<Query>(),
std::declval<typename Primitive::Datum>())) Intersection_type;
typedef std::pair<
typename internal::AABB_tree::Remove_optional<Intersection_type>::type,
@ -364,8 +366,7 @@ public:
template<typename Query>
boost::optional< typename Intersection_and_primitive_id<Query>::Type >
operator()(const Query& query, const typename AT::Primitive& primitive) const {
typename cpp11::result_of<typename GeomTraits::Intersect_3(Query, typename Primitive::Datum) >::type
inter_res = GeomTraits().intersect_3_object()(internal::Primitive_helper<AT>::get_datum(primitive,m_traits),query);
auto inter_res = GeomTraits().intersect_3_object()(internal::Primitive_helper<AT>::get_datum(primitive,m_traits),query);
if (!inter_res)
return boost::none;
return boost::make_optional( std::make_pair(*inter_res, primitive.id()) );
@ -414,6 +415,27 @@ public:
CGAL::SMALLER : CGAL::LARGER;
}
CGAL::Comparison_result operator()(const Point& p, const Bounding_box& bb, const Point& bound, Tag_true) const
{
return GeomTraits().do_intersect_3_object()
(GeomTraits().construct_sphere_3_object()
(p, GeomTraits().compute_squared_distance_3_object()(p, bound)), bb,true)?
CGAL::SMALLER : CGAL::LARGER;
}
CGAL::Comparison_result operator()(const Point& p, const Bounding_box& bb, const Point& bound, Tag_false) const
{
return GeomTraits().do_intersect_3_object()
(GeomTraits().construct_sphere_3_object()
(p, GeomTraits().compute_squared_distance_3_object()(p, bound)), bb)?
CGAL::SMALLER : CGAL::LARGER;
}
CGAL::Comparison_result operator()(const Point& p, const Bounding_box& bb, const Point& bound) const
{
return (*this)(p, bb, bound, Boolean_tag<internal::Has_static_filters<GeomTraits>::value>());
}
template <class Solid>
CGAL::Comparison_result operator()(const Point& p, const Solid& pr, const FT& sq_distance) const
{
@ -423,6 +445,7 @@ public:
CGAL::SMALLER :
CGAL::LARGER;
}
};
Closest_point closest_point_object() const {return Closest_point(*this);}

View File

@ -20,7 +20,6 @@
#include <CGAL/disable_warnings.h>
#include <CGAL/AABB_primitive.h>
#include <CGAL/result_of.h>
#include <iterator>
namespace CGAL {
@ -31,14 +30,18 @@ namespace internal {
//classical typedefs
typedef Iterator key_type;
typedef typename GeomTraits::Point_3 value_type;
typedef typename cpp11::result_of<
typename GeomTraits::Construct_vertex_3(typename GeomTraits::Triangle_3,int)
>::type reference;
// typedef decltype(
// std::declval<typename GeomTraits::Construct_vertex_3>()(
// std::declval<typename GeomTraits::Triangle_3>(),
// std::declval<int>())) reference;
typedef decltype(
typename GeomTraits::Construct_vertex_3()(
*std::declval<key_type&>(), 0)) reference;
typedef boost::readable_property_map_tag category;
typedef Point_from_triangle_3_iterator_property_map<GeomTraits, Iterator> Self;
inline friend
typename Point_from_triangle_3_iterator_property_map<GeomTraits,Iterator>::reference
get(Point_from_triangle_3_iterator_property_map<GeomTraits,Iterator>, Iterator it)
inline friend reference
get(Self, key_type it)
{
return typename GeomTraits::Construct_vertex_3()( *it, 0 );
}
@ -57,7 +60,6 @@ namespace internal {
* \tparam GeomTraits is a traits class providing the nested type `Point_3` and `Triangle_3`.
* It also provides the functor `Construct_vertex_3` that has an operator taking a `Triangle_3`
* and an integer as parameters and returning a triangle point as a type convertible to `Point_3`.
* In addition `Construct_vertex_3` must support the result_of protocol.
* \tparam Iterator is a model of `ForwardIterator` with its value type convertible to `GeomTraits::Triangle_3`
* \tparam CacheDatum is either `CGAL::Tag_true` or `CGAL::Tag_false`. In the former case,
* the datum is stored in the primitive, while in the latter it is

View File

@ -18,7 +18,6 @@
#include <CGAL/AABB_primitive.h>
#include <CGAL/result_of.h>
#include <iterator>
namespace CGAL
@ -31,14 +30,18 @@ namespace CGAL
//classical typedefs
typedef Iterator key_type;
typedef typename GeomTraits::Point_3 value_type;
typedef typename cpp11::result_of<
typename GeomTraits::Construct_vertex_3(typename GeomTraits::Tetrahedron_3, int)
>::type reference;
typedef decltype(
std::declval<typename GeomTraits::Construct_vertex_3>()(
std::declval<typename GeomTraits::Tetrahedron_3>(),
std::declval<int>())) reference;
// typedef decltype(
// typename GeomTraits::Construct_vertex_3()(
// *std::declval<key_type&>(), 0)) reference; // fails polyhedron demo!
typedef boost::readable_property_map_tag category;
typedef Point_from_cell_iterator_proprety_map<GeomTraits, Iterator> Self;
inline friend
typename Point_from_cell_iterator_proprety_map<GeomTraits, Iterator>::reference
get(Point_from_cell_iterator_proprety_map<GeomTraits, Iterator>, Iterator it)
inline friend reference
get(Self, key_type it)
{
typename GeomTraits::Construct_point_3 point;
return point(it->vertex(1)->point());

View File

@ -1,7 +1,7 @@
# 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)
cmake_minimum_required(VERSION 3.1...3.20)
project(AABB_tree_Tests)
find_package(CGAL REQUIRED)

View File

@ -1,7 +1,7 @@
# 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)
cmake_minimum_required(VERSION 3.1...3.20)
project(Advancing_front_surface_reconstruction_Examples)
find_package(CGAL REQUIRED)

View File

@ -1,7 +1,7 @@
# 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)
cmake_minimum_required(VERSION 3.1...3.20)
project(Advancing_front_surface_reconstruction_Tests)
find_package(CGAL REQUIRED)

View File

@ -1,7 +1,7 @@
# 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)
cmake_minimum_required(VERSION 3.1...3.20)
project(Algebraic_foundations_Examples)
find_package(CGAL REQUIRED)

View File

@ -1,7 +1,7 @@
# 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)
cmake_minimum_required(VERSION 3.1...3.20)
project(Algebraic_foundations_Tests)
find_package(CGAL REQUIRED COMPONENTS Core)

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.1...3.15)
cmake_minimum_required(VERSION 3.1...3.20)
project(Algebraic_kernel_d_Examples)
find_package(CGAL REQUIRED COMPONENTS Core)

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.1...3.15)
cmake_minimum_required(VERSION 3.1...3.20)
project(Algebraic_kernel_d_Tests)
# CGAL and its components

View File

@ -1,7 +1,7 @@
# 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)
cmake_minimum_required(VERSION 3.1...3.20)
project(Algebraic_kernel_for_circles_Tests)
find_package(CGAL REQUIRED)

View File

@ -1,7 +1,7 @@
# 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)
cmake_minimum_required(VERSION 3.1...3.20)
project(Algebraic_kernel_for_spheres_Tests)
find_package(CGAL REQUIRED)

View File

@ -37,7 +37,7 @@ does not make sense if the traits class already provides exact constructions.
<ul>
<li>When the tag `ExactAlphaComparisonTag` is set to \link Tag_true `Tag_true`\endlink,
the class `Cartesian_converter` is used internally to switch between the traits class
and the %CGAL kernel `CGAL::Simple_cartesian<NT>`, where `NT` can be either `CGAL::Interval_nt` or
and the \cgal kernel `CGAL::Simple_cartesian<NT>`, where `NT` can be either `CGAL::Interval_nt` or
`CGAL::Exact_rational`. `Cartesian_converter` must thus offer the necessary functors
to convert a two-dimensional point of the traits class to a two-dimensional point
of `CGAL::Simple_cartesian<NT>`. However, these functors are not necessarily provided by
@ -106,7 +106,7 @@ allowing filtered exact comparisons (that is, interval arithmetic is first used
resorting to exact arithmetic). Access to the interval containing the exact value is provided through the function
`FT::Approximate_nt approx() const` where `FT::Approximate_nt` is `CGAL::Interval_nt<Protected>`
with `Protected=true`. Access to the exact value is provided through the function
`FT::Exact_nt exact() const` where `FT::Exact_nt` depends on the configuration of %CGAL
`FT::Exact_nt exact() const` where `FT::Exact_nt` depends on the configuration of \cgal
(it is `Gmpq` if `gmp` is available and `Quotient<CGAL::MP_Float>` otherwise).
An overload for the function `double to_double(FT)` is also available. Its
precision is controlled through `FT::set_relative_precision_of_to_double()` in

View File

@ -1,7 +1,7 @@
# 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)
cmake_minimum_required(VERSION 3.1...3.20)
project(Alpha_shapes_2_Examples)
find_package(CGAL REQUIRED)

View File

@ -1,7 +1,7 @@
# 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)
cmake_minimum_required(VERSION 3.1...3.20)
project(Alpha_shapes_2_Tests)
find_package(CGAL REQUIRED)

View File

@ -1,7 +1,7 @@
# 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)
cmake_minimum_required(VERSION 3.1...3.20)
project(Alpha_shapes_3_Demo)
# Find includes in corresponding build directories

View File

@ -16,7 +16,7 @@ class MainWindow : public CGAL::Qt::DemosMainWindow, private Ui::MainWindow
Q_OBJECT
public:
MainWindow(QWidget* parent = 0);
MainWindow(QWidget* parent = nullptr);
void connectActions();

View File

@ -71,7 +71,7 @@ meaning in particular that the alpha complex may have
singular faces. For \f$ 0 \leq k \leq d-1\f$,
a \f$ k\f$-simplex of the alpha complex is said to be
singular if it is not a facet of a \f$ (k+1)\f$-simplex of the complex.
%CGAL provides two versions of alpha shapes. In the general mode,
\cgal provides two versions of alpha shapes. In the general mode,
the alpha shapes correspond strictly to the above definition.
The regularized mode provides a regularized version of the alpha shapes.
It corresponds to the domain covered by a regularized version

View File

@ -36,7 +36,7 @@ does not make sense if the traits class already provides exact constructions.
<ul>
<li>When the tag `ExactAlphaComparisonTag` is set to \link Tag_true `Tag_true`\endlink,
the class `Cartesian_converter` is used internally to switch between the traits class
and the %CGAL kernel `CGAL::Simple_cartesian<NT>`, where `NT` can be either `CGAL::Interval_nt` or
and the \cgal kernel `CGAL::Simple_cartesian<NT>`, where `NT` can be either `CGAL::Interval_nt` or
`CGAL::Exact_rational`. `Cartesian_converter` must thus offer the necessary functors
to convert a three-dimensional point of the traits class to a three-dimensional point
of `CGAL::Simple_cartesian<NT>`. However, these functors are not necessarily provided by
@ -103,7 +103,7 @@ allowing filtered exact comparisons (that is, interval arithmetic is first used
resorting to exact arithmetic). Access to the interval containing the exact value is provided through the function
`FT::Approximate_nt approx() const` where `FT::Approximate_nt` is `Interval_nt<Protected>`
with `Protected=true`. Access to the exact value is provided through the function
`FT::Exact_nt exact() const` where `FT::Exact_nt` depends on the configuration of %CGAL
`FT::Exact_nt exact() const` where `FT::Exact_nt` depends on the configuration of \cgal
(it may be `mpq_class`, `Gmpq`, `Quotient<CGAL::MP_Float>`, etc).
An overload for the function `double to_double(FT)` is also available. Its
precision is controlled through `FT::set_relative_precision_of_to_double()` in

View File

@ -1,7 +1,7 @@
# 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)
cmake_minimum_required(VERSION 3.1...3.20)
project(Alpha_shapes_3_Examples)
find_package(CGAL REQUIRED)

View File

@ -1,7 +1,7 @@
# 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)
cmake_minimum_required(VERSION 3.1...3.20)
project(Alpha_shapes_3_Tests)
find_package(CGAL REQUIRED)

View File

@ -1,7 +1,7 @@
# 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)
cmake_minimum_required(VERSION 3.1...3.20)
project(Apollonius_graph_2_Examples)
find_package(CGAL REQUIRED COMPONENTS Core)

View File

@ -1,7 +1,7 @@
# 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)
cmake_minimum_required(VERSION 3.1...3.20)
project(Apollonius_graph_2_Tests)
find_package(CGAL REQUIRED)

View File

@ -1,7 +1,7 @@
# 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)
cmake_minimum_required(VERSION 3.1...3.20)
project(Arithmetic_kernel_Tests)
find_package(CGAL REQUIRED COMPONENTS Core)

View File

@ -22,7 +22,7 @@ class AlgebraicCurveInputDialog : public QDialog
Q_OBJECT
public:
explicit AlgebraicCurveInputDialog(QWidget *parent = 0);
explicit AlgebraicCurveInputDialog(QWidget *parent = nullptr);
~AlgebraicCurveInputDialog();
std::string getLineEditText();
Ui::AlgebraicCurveInputDialog* getUi(){return this->ui;}

View File

@ -21,7 +21,7 @@ class QPaintEvent;
class ArrangementDemoGraphicsView : public QGraphicsView
{
public:
ArrangementDemoGraphicsView( QWidget* parent = 0 );
ArrangementDemoGraphicsView( QWidget* parent = nullptr );
void setBackgroundColor( QColor color );
QColor getBackgroundColor( ) const;

View File

@ -41,7 +41,7 @@ QVariant ArrangementDemoPropertiesDialog::property( int index )
}
QTableWidgetItem* item = this->ui->tableWidget->item( index, 0 );
if ( item == 0 )
if ( item == nullptr )
{
return res;
}
@ -102,17 +102,17 @@ void ArrangementDemoPropertiesDialog::setupUi( )
*/
void ArrangementDemoPropertiesDialog::updateUi( )
{
if ( this->parent == NULL )
if ( this->parent == nullptr )
{
return;
}
ArrangementDemoTab* currentTab = this->parent->getCurrentTab();
if ( currentTab == NULL )
if ( currentTab == nullptr )
{
return;
}
CGAL::Qt::ArrangementGraphicsItemBase* agi = currentTab->getArrangementGraphicsItem( );
if ( agi == NULL )
if ( agi == nullptr )
{
return;
}

View File

@ -41,7 +41,7 @@ class ArrangementDemoPropertiesDialog : public QDialog
GRID_COLOR_KEY /*!< color of the grid */
};
ArrangementDemoPropertiesDialog( ArrangementDemoWindow* parent_ = 0 );
ArrangementDemoPropertiesDialog( ArrangementDemoWindow* parent_ = nullptr );
QVariant property( int index );
protected:

View File

@ -1,6 +1,6 @@
# This is the CMake script for compiling a CGAL application.
cmake_minimum_required(VERSION 3.1...3.15)
cmake_minimum_required(VERSION 3.1...3.20)
project(Arrangement_on_surface_2_Demo)
if(NOT POLICY CMP0070 AND POLICY CMP0053)

View File

@ -56,7 +56,7 @@ class ColorItemEditor : public QPushButton
Q_PROPERTY(QColor color READ color WRITE setColor USER true)
public:
ColorItemEditor(QWidget *widget = 0);
ColorItemEditor(QWidget *widget = nullptr);
public:
QColor color( ) const;

View File

@ -23,7 +23,7 @@ namespace Ui
class NewTabDialog : public QDialog
{
public:
NewTabDialog( QWidget* parent = 0 );
NewTabDialog( QWidget* parent = nullptr );
int checkedId( ) const;
protected:

View File

@ -22,7 +22,7 @@ class PropertyValueDelegate : public QItemDelegate
Q_OBJECT
public:
PropertyValueDelegate( QObject* parent = 0 );
PropertyValueDelegate( QObject* parent = nullptr );
public:
QWidget* createEditor( QWidget* parent, const QStyleOptionViewItem& option,

View File

@ -24,7 +24,7 @@ class RationalCurveInputDialog : public QDialog
Q_OBJECT
public:
explicit RationalCurveInputDialog(QWidget *parent = 0);
explicit RationalCurveInputDialog(QWidget *parent = nullptr);
~RationalCurveInputDialog();
std::string getNumeratorText();
std::string getDenominatorText();

View File

@ -126,7 +126,7 @@ operator()(const Point_2& p, const X_monotone_curve_2& c) const
// AlgKernel ker;
int n = 100;
if (this->scene != NULL && this->scene->views().size() != 0)
if (this->scene != nullptr && this->scene->views().size() != 0)
{ // use the scene to approximate the resolution of the curve
QGraphicsView* view = this->scene->views().first();
CGAL::Bbox_2 bb = c.bbox(); // assumes bounded curve

View File

@ -185,7 +185,7 @@ void VerticalRayGraphicsItem::modelChanged( )
QRectF VerticalRayGraphicsItem::viewportRect( ) const
{
QRectF res;
if ( this->scene( ) == NULL )
if ( this->scene( ) == nullptr )
{
return res;
}
@ -207,7 +207,7 @@ QRectF VerticalRayGraphicsItem::viewportRect( ) const
void VerticalRayGraphicsItem::drawArrowhead( QPainter* painter,
double targetY, bool isShootingUp )
{
if ( this->scene( ) == 0 || this->scene( )->views( ).size( ) == 0 )
if ( this->scene( ) == nullptr || this->scene( )->views( ).size( ) == 0 )
{
return;
}

View File

@ -1,7 +1,7 @@
# 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)
cmake_minimum_required(VERSION 3.1...3.20)
project(Arrangement_on_surface_2_Examples)
find_package(CGAL REQUIRED COMPONENTS Core)

View File

@ -37,6 +37,8 @@
#include <CGAL/Curved_kernel_via_analysis_2/Sweep_curves_adapter_2.h>
#include <CGAL/kernel_assertions.h>
namespace CGAL {
namespace internal {
@ -1818,8 +1820,7 @@ protected:
*/
void _check_arc_interior() const {
#if !(defined(CGAL_KERNEL_NO_PRECONDITIONS) || defined(CGAL_NO_PRECONDITIONS) \
|| defined(NDEBUG))
#if !(defined(CGAL_KERNEL_NO_PRECONDITIONS) || defined(CGAL_NO_PRECONDITIONS))
if(is_vertical()) {
Coordinate_1 x0 = _minpoint().x();

View File

@ -1,7 +1,7 @@
# 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)
cmake_minimum_required(VERSION 3.1...3.20)
project(Arrangement_on_surface_2_Tests)
enable_testing()

View File

@ -172,7 +172,7 @@ Construction_test<T_Geom_traits, T_Topol_traits>::
Construction_test(const Geom_traits& geom_traits) :
Base(geom_traits),
m_geom_traits(geom_traits),
m_arr(NULL),
m_arr(nullptr),
m_verbose_level(0)
{}
@ -188,7 +188,7 @@ void Construction_test<T_Geom_traits, T_Topol_traits>::deallocate_arrangement()
{
if (m_arr) {
delete m_arr;
m_arr = NULL;
m_arr = nullptr;
}
}

View File

@ -1680,7 +1680,7 @@ bool IO_base_test<Base_geom_traits>::read_xcurve(InputStream_& is,
read_point(is, p2);
assert(p1 != p2);
unsigned int flag;
unsigned int flag = static_cast<unsigned int>(-1);
is >> flag;
if (flag == 1) {
X_monotone_curve_2::Direction_3 normal;

View File

@ -252,7 +252,7 @@ private:
template <typename Strategy, Pl_strategy id>
void init_pl(const std::string& name)
{
m_locators[id].m_variant = static_cast<Strategy*>(NULL);
m_locators[id].m_variant = static_cast<Strategy*>(nullptr);
m_locators[id].m_name = name;
m_locators[id].m_active = true;
}
@ -293,7 +293,7 @@ private:
Strategy* strategy = boost::get<Strategy*>(m_locators[id].m_variant);
if (strategy) {
delete strategy;
m_locators[id].m_variant = static_cast<Strategy*>(NULL);
m_locators[id].m_variant = static_cast<Strategy*>(nullptr);
}
}
@ -667,12 +667,12 @@ Point_location_test<GeomTraits, TopolTraits>::
Point_location_test(const Geom_traits& geom_traits) :
Base(geom_traits),
m_geom_traits(geom_traits),
m_arr(NULL),
m_random_g(NULL),
m_grid_g(NULL),
m_halton_g(NULL),
m_middle_edges_g(NULL),
m_specified_points_g(NULL)
m_arr(nullptr),
m_random_g(nullptr),
m_grid_g(nullptr),
m_halton_g(nullptr),
m_middle_edges_g(nullptr),
m_specified_points_g(nullptr)
{
m_locators.resize(NUM_PL_STRATEGIES);
@ -773,7 +773,7 @@ deallocate_arrangement()
{
if (m_arr) {
delete m_arr;
m_arr = NULL;
m_arr = nullptr;
}
}

View File

@ -1,7 +1,7 @@
# 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)
cmake_minimum_required(VERSION 3.1...3.20)
project(BGL_LCC_Examples)
# CGAL and its components

View File

@ -24,7 +24,7 @@ struct Source {
const G* g;
Source()
: g(NULL)
: g(nullptr)
{}
Source(const G& g)

View File

@ -1,7 +1,7 @@
# 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)
cmake_minimum_required(VERSION 3.1...3.20)
project(BGL_OpenMesh_Examples)
# CGAL and its components

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.1...3.15)
cmake_minimum_required(VERSION 3.1...3.20)
project(BGL_arrangement_2_Examples)
find_package(CGAL REQUIRED)

View File

@ -1,7 +1,7 @@
# 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)
cmake_minimum_required(VERSION 3.1...3.20)
project(BGL_graphcut_Examples)

View File

@ -1,7 +1,7 @@
# 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)
cmake_minimum_required(VERSION 3.1...3.20)
project(BGL_polyhedron_3_Examples)
# CGAL and its components
@ -51,12 +51,10 @@ else()
endif()
find_package( METIS )
if( METIS_FOUND )
include(CGAL_METIS_support)
if( TARGET CGAL::METIS_support )
create_single_source_cgal_program( "polyhedron_partition.cpp" )
if( METIS_FOUND )
target_include_directories( polyhedron_partition PRIVATE ${METIS_INCLUDE_DIRS} )
target_link_libraries( polyhedron_partition PRIVATE ${METIS_LIBRARIES} )
else()
message( STATUS "Examples that use the METIS library will not be compiled." )
endif()
target_link_libraries( polyhedron_partition PUBLIC CGAL::METIS_support)
else()
message( STATUS "Examples that use the METIS library will not be compiled." )
endif()

View File

@ -21,7 +21,7 @@ struct Source {
const G* g;
Source()
: g(NULL)
: g(nullptr)
{}
Source(const G& g)

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.1...3.15)
cmake_minimum_required(VERSION 3.1...3.20)
project(BGL_surface_mesh_Examples)
find_package(CGAL REQUIRED)
@ -13,10 +13,10 @@ create_single_source_cgal_program("surface_mesh_dual.cpp")
create_single_source_cgal_program("connected_components.cpp")
find_package(METIS)
if( METIS_FOUND )
include(CGAL_METIS_support)
if( TARGET CGAL::METIS_support )
create_single_source_cgal_program( "surface_mesh_partition.cpp" )
target_include_directories( surface_mesh_partition PRIVATE ${METIS_INCLUDE_DIRS} )
target_link_libraries( surface_mesh_partition PRIVATE ${METIS_LIBRARIES} )
target_link_libraries( surface_mesh_partition PUBLIC CGAL::METIS_support )
else()
message(STATUS "Examples that use the METIS library will not be compiled.")
endif()

View File

@ -17,7 +17,7 @@ typedef boost::graph_traits<Dual>::edge_descriptor edge_descriptor;
template <typename G>
struct noborder {
noborder() : g(NULL) {} // default-constructor required by filtered_graph
noborder() : g(nullptr) {} // default-constructor required by filtered_graph
noborder(G& g) : g(&g) {}
bool operator()(const edge_descriptor& e) const

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.1...3.15)
cmake_minimum_required(VERSION 3.1...3.20)
project(BGL_triangulation_2_Examples)
find_package(CGAL REQUIRED)

View File

@ -737,7 +737,7 @@ add_face(const VertexRange& vr, Graph& g)
patch_start, patch_end;
// cache for set_next and vertex' set_halfedge
typedef std::pair<halfedge_descriptor, halfedge_descriptor> NextCacheEntry;
typedef std::vector<NextCacheEntry> NextCache;
typedef boost::container::small_vector<NextCacheEntry,9> NextCache;
NextCache next_cache;
next_cache.reserve(3 * n);

View File

@ -39,7 +39,6 @@ CGAL_add_named_parameter(face_to_face_map_t, face_to_face_map, face_to_face_map)
CGAL_add_named_parameter(implementation_tag_t, implementation_tag, implementation_tag)
CGAL_add_named_parameter(prevent_unselection_t, prevent_unselection, prevent_unselection)
CGAL_add_named_parameter(stream_precision_t, stream_precision, stream_precision)
CGAL_add_named_parameter(verbose_t, verbose, verbose)
// List of named parameters used for IO
@ -52,6 +51,8 @@ CGAL_add_named_parameter(vertex_color_map_t, vertex_color_map, vertex_color_map)
CGAL_add_named_parameter(vertex_texture_map_t, vertex_texture_map, vertex_texture_map)
CGAL_add_named_parameter(face_color_map_t, face_color_map, face_color_map)
CGAL_add_named_parameter(repair_polygon_soup_t, repair_polygon_soup, repair_polygon_soup)
CGAL_add_named_parameter(output_color_t, output_color, output_color)
CGAL_add_named_parameter(stream_precision_t, stream_precision, stream_precision)
// List of named parameters that we use in the package 'Mesh_3'
CGAL_add_named_parameter(vertex_feature_degree_t, vertex_feature_degree, vertex_feature_degree_map)
@ -121,6 +122,7 @@ CGAL_add_named_parameter(allow_self_intersections_t, allow_self_intersections, a
CGAL_add_named_parameter(non_manifold_feature_map_t, non_manifold_feature_map, non_manifold_feature_map)
CGAL_add_named_parameter(polyhedral_envelope_epsilon_t, polyhedral_envelope_epsilon, polyhedral_envelope_epsilon)
CGAL_add_named_parameter(match_faces_t, match_faces, match_faces)
CGAL_add_named_parameter(face_epsilon_map_t, face_epsilon_map, face_epsilon_map)
// List of named parameters that we use in the package 'Surface Mesh Simplification'
CGAL_add_named_parameter(get_cost_policy_t, get_cost_policy, get_cost)

View File

@ -1,7 +1,7 @@
# 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)
cmake_minimum_required(VERSION 3.1...3.20)
project(BGL_Tests)
# CGAL and its components

View File

@ -109,6 +109,7 @@ void test(const NamedParameters& np)
assert(get_parameter(np, CGAL::internal_np::maximum_number_of_faces).v == 78910);
assert(get_parameter(np, CGAL::internal_np::non_manifold_feature_map).v == 60);
assert(get_parameter(np, CGAL::internal_np::filter).v == 61);
assert(get_parameter(np, CGAL::internal_np::face_epsilon_map).v == 62);
// Named parameters that we use in the package 'Surface Mesh Simplification'
assert(get_parameter(np, CGAL::internal_np::get_cost_policy).v == 34);
@ -225,6 +226,7 @@ void test(const NamedParameters& np)
check_same_type<78910>(get_parameter(np, CGAL::internal_np::maximum_number_of_faces));
check_same_type<60>(get_parameter(np, CGAL::internal_np::non_manifold_feature_map));
check_same_type<61>(get_parameter(np, CGAL::internal_np::filter));
check_same_type<62>(get_parameter(np, CGAL::internal_np::face_epsilon_map));
// Named parameters that we use in the package 'Surface Mesh Simplification'
check_same_type<34>(get_parameter(np, CGAL::internal_np::get_cost_policy));
@ -353,6 +355,7 @@ int main()
.use_compact_clipper(A<45>(45))
.non_manifold_feature_map(A<60>(60))
.filter(A<61>(61))
.face_epsilon_map(A<62>(62))
.apply_per_connected_component(A<46>(46))
.output_iterator(A<47>(47))
.erase_all_duplicates(A<48>(48))

View File

@ -1,7 +1,7 @@
# 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)
cmake_minimum_required(VERSION 3.1...3.20)
project(Barycentric_coordinates_2_Examples)
find_package(CGAL REQUIRED)

View File

@ -1,7 +1,7 @@
# 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)
cmake_minimum_required(VERSION 3.1...3.20)
project(Barycentric_coordinates_2_Tests)
find_package(CGAL REQUIRED)

View File

@ -1,7 +1,7 @@
# 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)
cmake_minimum_required(VERSION 3.1...3.20)
project(Boolean_set_operations_2_GraphicsView_Demo)
if(NOT POLICY CMP0070 AND POLICY CMP0053)

View File

@ -1,7 +1,7 @@
# 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)
cmake_minimum_required(VERSION 3.1...3.20)
project(Boolean_set_operations_2_Examples)
find_package(CGAL REQUIRED COMPONENTS Core)

View File

@ -1,7 +1,7 @@
# 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)
cmake_minimum_required(VERSION 3.1...3.20)
project(Boolean_set_operations_2_Tests)
find_package(CGAL REQUIRED)

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.1...3.15)
cmake_minimum_required(VERSION 3.1...3.20)
project(Approximate_min_ellipsoid_d_Examples)
find_package(CGAL REQUIRED)

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.1...3.15)
cmake_minimum_required(VERSION 3.1...3.20)
project(Min_annulus_d_Examples)
find_package(CGAL REQUIRED)

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.1...3.15)
cmake_minimum_required(VERSION 3.1...3.20)
project(Min_circle_2_Examples)
find_package(CGAL REQUIRED)

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.1...3.15)
cmake_minimum_required(VERSION 3.1...3.20)
project(Min_ellipse_2_Examples)
find_package(CGAL REQUIRED)

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.1...3.15)
cmake_minimum_required(VERSION 3.1...3.20)
project(Min_quadrilateral_2_Examples)
find_package(CGAL REQUIRED)

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.1...3.15)
cmake_minimum_required(VERSION 3.1...3.20)
project(Min_sphere_d_Examples)
find_package(CGAL REQUIRED)

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.1...3.15)
cmake_minimum_required(VERSION 3.1...3.20)
project(Min_sphere_of_spheres_d_Examples)
find_package(CGAL REQUIRED)

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.1...3.15)
cmake_minimum_required(VERSION 3.1...3.20)
project(Rectangular_p_center_2_Examples)
find_package(CGAL REQUIRED)

View File

@ -20,7 +20,7 @@
#include <iostream>
#include <iomanip>
#if (defined(CGAL_NO_ASSERTIONS) || defined(NDEBUG))
#if defined(CGAL_NO_ASSERTIONS)
#undef CGAL_APPEL_ASSERTION_MODE
#undef CGAL_APPEL_EXP_ASSERTION_MODE
#undef CGAL_APPEL_LOG_MODE

View File

@ -1,7 +1,7 @@
# 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)
cmake_minimum_required(VERSION 3.1...3.20)
project(Bounding_volumes_Tests)
find_package(CGAL REQUIRED COMPONENTS Core)

View File

@ -246,7 +246,7 @@ void box_intersection_all_pairs_d(
The first template parameter of the function enables to choose whether
the algorithm is to be run in parallel, if `CGAL::Parallel_tag` is specified
and %CGAL has been linked with the Intel TBB library, or sequentially,
and \cgal has been linked with the Intel TBB library, or sequentially,
if `CGAL::Sequential_tag` - the default value - is specified.
The parallelization of the algorithm is based on a divide-and-conquer
approach: the two ranges are split in a number of smaller ranges, and

View File

@ -1,7 +1,7 @@
# 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)
cmake_minimum_required(VERSION 3.1...3.20)
project(Box_intersection_d_Examples)
find_package(CGAL REQUIRED)

View File

@ -1,7 +1,7 @@
# 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)
cmake_minimum_required(VERSION 3.1...3.20)
project(Box_intersection_d_Tests)
find_package(CGAL REQUIRED)

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.1...3.15)
cmake_minimum_required(VERSION 3.1...3.20)
project(Core_Examples)
# CGAL and its components

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.1...3.15)
cmake_minimum_required(VERSION 3.1...3.20)
project(CGALimageIO_Demo)
if(NOT POLICY CMP0070 AND POLICY CMP0053)
@ -30,8 +30,8 @@ if(VTK_FOUND)
if(TARGET vtkRenderingQt AND TARGET vtkFiltersModeling)
find_package(VTK COMPONENTS vtkRenderingQt vtkFiltersModeling NO_MODULE)
include(${VTK_USE_FILE})
find_package(Qt${VTK_QT_VERSION} COMPONENTS QtGui)
if(NOT TARGET Qt${VTK_QT_VERSION}::QtGui)
find_package(Qt${VTK_QT_VERSION} COMPONENTS Gui)
if(NOT TARGET Qt${VTK_QT_VERSION}::Gui)
message(
STATUS
"NOTICE: vtkRenderingQt needs Qt${VTK_QT_VERSION}, and will not be compiled."
@ -44,7 +44,7 @@ if(VTK_FOUND)
target_link_libraries(
image_to_vtk_viewer ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES}
${VTK_LIBRARIES} Qt${VTK_QT_VERSION}::QtGui)
${VTK_LIBRARIES} Qt${VTK_QT_VERSION}::Gui)
else()
message(
STATUS

View File

@ -1,7 +1,7 @@
# 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)
cmake_minimum_required(VERSION 3.1...3.20)
project(CGALimageIO_Examples)
if(POLICY CMP0074)
@ -16,6 +16,7 @@ if(CGAL_ImageIO_FOUND)
create_single_source_cgal_program("convert_raw_image_to_inr.cpp")
create_single_source_cgal_program("test_imageio.cpp")
create_single_source_cgal_program("extract_a_sub_image.cpp")
create_single_source_cgal_program("slice_image.cpp")
else()
message(
STATUS

View File

@ -33,7 +33,7 @@ int main(int argc, char **argv) {
for (auto k = zmin; k < zmax; ++k)
for (auto j = ymin; j <= ymax; ++j)
for (auto i = xmin; i <= xmax; ++i) {
auto pos = data + image->wdim * (i + image->xdim * (j + image->zdim * k));
auto pos = data + image->wdim * (i + image->xdim * (j + image->ydim * k));
std::copy(pos, pos + image->wdim, new_data);
new_data += image->wdim;
}

View File

@ -0,0 +1,27 @@
#include <CGAL/ImageIO.h>
#include <iostream>
#include <string>
int main(int argc, char **argv) {
if (argc != 3) {
std::cerr << "Usage: slice_size <input> <output>\n";
return argc != 1;
}
_image *image = ::_readImage(argv[1]);
if (!image)
return 2;
auto *new_image = ::_createImage(image->xdim, image->ydim, image->zdim / 2 + 1, 1,
image->vx, image->vy, image->vz*2, image->wdim,
image->wordKind, image->sign);
const auto* const data = static_cast<char*>(image->data);
auto* new_data = static_cast<char*>(new_image->data);
const auto slice_size = image->wdim * image->xdim * image->ydim;
for (auto k = 0ul; k < image->zdim; k+=2) {
auto pos = data + slice_size * k;
new_data = std::copy(pos, pos + slice_size, new_data);
}
auto r = ::_writeImage(new_image, argv[2]);
if(r != ImageIO_NO_ERROR) return 3;
::_freeImage(image);
::_freeImage(new_image);
}

View File

@ -110,6 +110,9 @@ struct VTK_type_generator<boost::uint32_t> {
vtk_image->SetSpacing(image.vx(),
image.vy(),
image.vz());
vtk_image->SetOrigin(image.tx(),
image.ty(),
image.tz());
vtk_image->AllocateScalars(type, 1);
vtk_image->GetPointData()->SetScalars(data_array);
return vtk_image;

View File

@ -1,7 +1,7 @@
# 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)
cmake_minimum_required(VERSION 3.1...3.20)
project(CGAL_ImageIO_Tests)
if(POLICY CMP0074)

View File

@ -188,7 +188,7 @@ int main() {
<< "timer new implementation: " << timer_new_implementation.time()
<< "\ntimer old implementation: " << timer_old_implementation.time()
<< "\n";
image.set_data(0); // trick to avoid ~Image_3 segfault.
image.set_data(nullptr); // trick to avoid ~Image_3 segfault.
const char* filenames[] = {

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.1...3.15)
cmake_minimum_required(VERSION 3.1...3.20)
project(CGAL_ipelets_Demo)
if(NOT POLICY CMP0070 AND POLICY CMP0053)

View File

@ -37,7 +37,7 @@ template <typename T>
struct Is_finite {
const T* t_;
Is_finite()
: t_(NULL)
: t_(nullptr)
{}
Is_finite(const T& t)
: t_(&t)

View File

@ -1,7 +1,7 @@
# 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)
cmake_minimum_required(VERSION 3.1...3.20)
project(CGAL_ipelets_Examples)
find_package(CGAL REQUIRED)

View File

@ -1,10 +1,9 @@
# Top level CMakeLists.txt for CGAL-branchbuild
# Minimal version of CMake:
cmake_minimum_required(VERSION 3.1)
cmake_minimum_required(VERSION 3.1...3.20)
message("== CMake setup ==")
cmake_minimum_required(VERSION 3.1...3.15)
project(CGAL CXX C)
export(PACKAGE CGAL)
@ -12,14 +11,14 @@ set(CGAL_BRANCH_BUILD
ON
CACHE INTERNAL "Create CGAL from a Git branch" FORCE)
include(${CMAKE_SOURCE_DIR}/CGALConfigVersion.cmake)
include(${CMAKE_SOURCE_DIR}/Installation/cmake/modules/CGAL_SCM.cmake)
cgal_detect_git(${CMAKE_SOURCE_DIR})
include(${CMAKE_CURRENT_SOURCE_DIR}/CGALConfigVersion.cmake)
include(${CMAKE_CURRENT_SOURCE_DIR}/Installation/cmake/modules/CGAL_SCM.cmake)
cgal_detect_git(${CMAKE_CURRENT_SOURCE_DIR})
function(CGAL_error_if_detect_in_source_build)
# If in a Git repository, forbid in-source builds
get_filename_component(srcdir "${CMAKE_SOURCE_DIR}" REALPATH)
get_filename_component(bindir "${CMAKE_BINARY_DIR}" REALPATH)
get_filename_component(srcdir "${CMAKE_CURRENT_SOURCE_DIR}" REALPATH)
get_filename_component(bindir "${CMAKE_CURRENT_BINARY_DIR}" REALPATH)
if("${srcdir}" STREQUAL "${bindir}")
message(
FATAL_ERROR

View File

@ -17,6 +17,7 @@
#define CGAL_CARTESIAN_CIRCLEC3_H
#include <CGAL/Interval_nt.h>
#include "boost/tuple/tuple.hpp"
namespace CGAL {
@ -29,13 +30,9 @@ class CircleC3 {
typedef typename R_::Direction_3 Direction_3;
typedef typename R_::FT FT;
struct Rep
{
Sphere_3 first;
Plane_3 second;
Rep () : first(), second() { }
Rep (const Sphere_3& s, const Plane_3& p) : first(s), second(p) { }
};
//using a boost::tuple because std::pair and tuple cannot work with incomplete types.
typedef boost::tuple<Sphere_3, Plane_3> Rep;
typedef typename R_::template Handle<Rep>::type Base;
Base base;
@ -125,7 +122,7 @@ public:
const Plane_3& supporting_plane() const
{
return get_pointee_or_identity(base).second;
return boost::get<1>(get_pointee_or_identity(base));
}
const Sphere_3& supporting_sphere() const
@ -145,7 +142,7 @@ public:
const Sphere_3& diametral_sphere() const
{
return get_pointee_or_identity(base).first;
return boost::get<0>(get_pointee_or_identity(base));
}
double approximate_area() const

Some files were not shown because too many files have changed in this diff Show More