mirror of https://github.com/CGAL/cgal
Merge remote-tracking branch 'cgal/master' into pr/janetournois/7116
# Conflicts: # Mesh_3/test/Mesh_3/CMakeLists.txt
This commit is contained in:
commit
0d550a5938
|
|
@ -2,6 +2,7 @@ name: remove_labels
|
||||||
on:
|
on:
|
||||||
pull_request_target:
|
pull_request_target:
|
||||||
types: [synchronize]
|
types: [synchronize]
|
||||||
|
workflow_dispatch:
|
||||||
jobs:
|
jobs:
|
||||||
remove_label:
|
remove_label:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ jobs:
|
||||||
//get pullrequest url
|
//get pullrequest url
|
||||||
const pr_number = context.payload.issue.number
|
const pr_number = context.payload.issue.number
|
||||||
return pr_number
|
return pr_number
|
||||||
|
|
||||||
- name: Emoji-comment
|
- name: Emoji-comment
|
||||||
uses: actions/github-script@v6
|
uses: actions/github-script@v6
|
||||||
if: steps.get_round.outputs.result != 'stop'
|
if: steps.get_round.outputs.result != 'stop'
|
||||||
|
|
@ -59,14 +59,13 @@ jobs:
|
||||||
repo: context.repo.repo,
|
repo: context.repo.repo,
|
||||||
content: 'rocket'
|
content: 'rocket'
|
||||||
})
|
})
|
||||||
|
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
name: "checkout branch"
|
name: "checkout branch"
|
||||||
if: steps.get_round.outputs.result != 'stop'
|
if: steps.get_round.outputs.result != 'stop'
|
||||||
with:
|
with:
|
||||||
repository: ${{ github.repository }}
|
repository: ${{ github.repository }}
|
||||||
ref: refs/pull/${{ steps.get_pr_number.outputs.result }}/merge
|
ref: refs/pull/${{ steps.get_pr_number.outputs.result }}/merge
|
||||||
token: ${{ secrets.PUSH_TO_CGAL_GITHUB_IO_TOKEN }}
|
|
||||||
fetch-depth: 2
|
fetch-depth: 2
|
||||||
|
|
||||||
- name: install dependencies
|
- name: install dependencies
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
name: CMake Test Merge Branch
|
name: CMake Test Merge Branch
|
||||||
|
|
||||||
on: [push, pull_request]
|
on: [push, pull_request, workflow_dispatch]
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
name: CMake Testsuite
|
name: CMake Testsuite
|
||||||
|
|
||||||
on: [push, pull_request]
|
on: [push, pull_request, workflow_dispatch]
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ name: Documentation Removal
|
||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request_target:
|
pull_request_target:
|
||||||
types: [closed, removed]
|
types: [closed, removed, workflow_dispatch]
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
name: Test Polyhedron Demo
|
name: Test Polyhedron Demo
|
||||||
|
|
||||||
on: [push, pull_request]
|
on: [push, pull_request,workflow_dispatch]
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@ name: Filter Testsuite
|
||||||
on:
|
on:
|
||||||
issue_comment:
|
issue_comment:
|
||||||
types: [created]
|
types: [created]
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
permissions: {}
|
permissions: {}
|
||||||
jobs:
|
jobs:
|
||||||
|
|
|
||||||
|
|
@ -1212,3 +1212,4 @@ gmon.*
|
||||||
Polygonal_surface_reconstruction/examples/build*
|
Polygonal_surface_reconstruction/examples/build*
|
||||||
Polygonal_surface_reconstruction/test/build*
|
Polygonal_surface_reconstruction/test/build*
|
||||||
Solver_interface/examples/build*
|
Solver_interface/examples/build*
|
||||||
|
/Mesh_3/examples/Mesh_3/indicator_0.inr.gz
|
||||||
|
|
|
||||||
|
|
@ -6,12 +6,14 @@ project(AABB_traits_benchmark)
|
||||||
|
|
||||||
find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Core)
|
find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Core)
|
||||||
|
|
||||||
# google benchmark
|
|
||||||
find_package(benchmark)
|
|
||||||
|
|
||||||
if (benchmark_FOUND)
|
|
||||||
create_single_source_cgal_program("tree_creation.cpp")
|
|
||||||
target_link_libraries(tree_creation benchmark::benchmark)
|
|
||||||
endif()
|
|
||||||
create_single_source_cgal_program("test.cpp")
|
create_single_source_cgal_program("test.cpp")
|
||||||
create_single_source_cgal_program("tree_construction.cpp")
|
create_single_source_cgal_program("tree_construction.cpp")
|
||||||
|
|
||||||
|
# google benchmark
|
||||||
|
find_package(benchmark QUIET)
|
||||||
|
if(benchmark_FOUND)
|
||||||
|
create_single_source_cgal_program("tree_creation.cpp")
|
||||||
|
target_link_libraries(tree_creation benchmark::benchmark)
|
||||||
|
else()
|
||||||
|
message(STATUS "NOTICE: The benchmark 'tree_creation.cpp' requires the Google benchmark library, and will not be compiled.")
|
||||||
|
endif()
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@ project(AABB_tree_Demo)
|
||||||
|
|
||||||
# Find includes in corresponding build directories
|
# Find includes in corresponding build directories
|
||||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||||
|
|
||||||
# Instruct CMake to run moc automatically when needed.
|
# Instruct CMake to run moc automatically when needed.
|
||||||
set(CMAKE_AUTOMOC ON)
|
set(CMAKE_AUTOMOC ON)
|
||||||
if(NOT POLICY CMP0070 AND POLICY CMP0053)
|
if(NOT POLICY CMP0070 AND POLICY CMP0053)
|
||||||
|
|
@ -31,10 +32,8 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND)
|
||||||
|
|
||||||
include(AddFileDependencies)
|
include(AddFileDependencies)
|
||||||
|
|
||||||
qt5_generate_moc("MainWindow.h"
|
qt5_generate_moc("MainWindow.h" "${CMAKE_CURRENT_BINARY_DIR}/MainWindow_moc.cpp")
|
||||||
"${CMAKE_CURRENT_BINARY_DIR}/MainWindow_moc.cpp")
|
add_file_dependencies(MainWindow_moc.cpp "${CMAKE_CURRENT_SOURCE_DIR}/MainWindow.h")
|
||||||
add_file_dependencies(MainWindow_moc.cpp
|
|
||||||
"${CMAKE_CURRENT_SOURCE_DIR}/MainWindow.h")
|
|
||||||
|
|
||||||
qt5_generate_moc("Viewer.h" "${CMAKE_CURRENT_BINARY_DIR}/Viewer_moc.cpp")
|
qt5_generate_moc("Viewer.h" "${CMAKE_CURRENT_BINARY_DIR}/Viewer_moc.cpp")
|
||||||
add_file_dependencies(Viewer_moc.cpp "${CMAKE_CURRENT_SOURCE_DIR}/Viewer.h")
|
add_file_dependencies(Viewer_moc.cpp "${CMAKE_CURRENT_SOURCE_DIR}/Viewer.h")
|
||||||
|
|
@ -62,8 +61,7 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND)
|
||||||
include(${CGAL_MODULES_DIR}/CGAL_add_test.cmake)
|
include(${CGAL_MODULES_DIR}/CGAL_add_test.cmake)
|
||||||
cgal_add_compilation_test(AABB_demo)
|
cgal_add_compilation_test(AABB_demo)
|
||||||
|
|
||||||
else(CGAL_Qt5_FOUND
|
else(CGAL_Qt5_FOUND AND Qt5_FOUND)
|
||||||
AND Qt5_FOUND)
|
|
||||||
|
|
||||||
set(AABB_MISSING_DEPS "")
|
set(AABB_MISSING_DEPS "")
|
||||||
|
|
||||||
|
|
@ -75,11 +73,6 @@ else(CGAL_Qt5_FOUND
|
||||||
set(AABB_MISSING_DEPS "Qt5, ${AABB_MISSING_DEPS}")
|
set(AABB_MISSING_DEPS "Qt5, ${AABB_MISSING_DEPS}")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
message(
|
message("NOTICE: This demo requires ${AABB_MISSING_DEPS}, and will not be compiled.")
|
||||||
STATUS
|
|
||||||
"NOTICE: This demo requires ${AABB_MISSING_DEPS}and will not be compiled."
|
|
||||||
)
|
|
||||||
|
|
||||||
endif(
|
endif(CGAL_Qt5_FOUND AND Qt5_FOUND)
|
||||||
CGAL_Qt5_FOUND
|
|
||||||
AND Qt5_FOUND)
|
|
||||||
|
|
|
||||||
|
|
@ -334,7 +334,7 @@ void Scene::compute_elements(int mode)
|
||||||
pos_points.push_back(p.z());
|
pos_points.push_back(p.z());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//The Segements
|
//The segments
|
||||||
{
|
{
|
||||||
std::list<Segment>::iterator sit;
|
std::list<Segment>::iterator sit;
|
||||||
for(sit = m_segments.begin(); sit != m_segments.end(); sit++)
|
for(sit = m_segments.begin(); sit != m_segments.end(); sit++)
|
||||||
|
|
|
||||||
|
|
@ -74,7 +74,7 @@ typedef unspecified_type Construct_projected_point_3;
|
||||||
/*!
|
/*!
|
||||||
A functor object to compare the distance of two points wrt a third one. Provides the operator:
|
A functor object to compare the distance of two points wrt a third one. Provides the operator:
|
||||||
|
|
||||||
`CGAL::Comparision_result operator()(const Point_3& p1, const Point_3& p2, const Point_3& p3)`,
|
`CGAL::Comparison_result operator()(const Point_3& p1, const Point_3& p2, const Point_3& p3)`,
|
||||||
|
|
||||||
which compares the distance between `p1 and `p2`, and between `p2` and `p3`.
|
which compares the distance between `p1 and `p2`, and between `p2` and `p3`.
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -390,7 +390,7 @@ query and location of query in space.
|
||||||
number of primitive data (greater than 2M faces in our experiments)
|
number of primitive data (greater than 2M faces in our experiments)
|
||||||
however we noticed that it is not necessary (and sometimes even
|
however we noticed that it is not necessary (and sometimes even
|
||||||
slower) to use all reference points when constructing the
|
slower) to use all reference points when constructing the
|
||||||
KD-tree. In these cases we recommend to specify trough the function
|
KD-tree. In these cases we recommend to specify through the function
|
||||||
` AABB_tree::accelerate_distance_queries()` fewer reference
|
` AABB_tree::accelerate_distance_queries()` fewer reference
|
||||||
points (typically not more than 100K) evenly distributed over the
|
points (typically not more than 100K) evenly distributed over the
|
||||||
input primitives.
|
input primitives.
|
||||||
|
|
|
||||||
|
|
@ -213,7 +213,7 @@ public:
|
||||||
/// Point query type.
|
/// Point query type.
|
||||||
typedef typename GeomTraits::Point_3 Point_3;
|
typedef typename GeomTraits::Point_3 Point_3;
|
||||||
|
|
||||||
/// additionnal types for the search tree, required by the RangeSearchTraits concept
|
/// additional types for the search tree, required by the RangeSearchTraits concept
|
||||||
/// \bug This is not documented for now in the AABBTraits concept.
|
/// \bug This is not documented for now in the AABBTraits concept.
|
||||||
typedef typename GeomTraits::Iso_cuboid_3 Iso_cuboid_3;
|
typedef typename GeomTraits::Iso_cuboid_3 Iso_cuboid_3;
|
||||||
|
|
||||||
|
|
@ -254,7 +254,7 @@ public:
|
||||||
* @param beyond iterator on beyond element
|
* @param beyond iterator on beyond element
|
||||||
* @param bbox the bounding box of [first,beyond[
|
* @param bbox the bounding box of [first,beyond[
|
||||||
*
|
*
|
||||||
* Sorts the range defined by [first,beyond[. Sort is achieved on bbox longuest
|
* Sorts the range defined by [first,beyond[. Sort is achieved on bbox longest
|
||||||
* axis, using the comparison function `<dim>_less_than` (dim in {x,y,z})
|
* axis, using the comparison function `<dim>_less_than` (dim in {x,y,z})
|
||||||
*/
|
*/
|
||||||
class Split_primitives
|
class Split_primitives
|
||||||
|
|
|
||||||
|
|
@ -131,7 +131,7 @@ std::tuple<std::size_t, std::size_t, std::size_t, long> test(const char* name) {
|
||||||
tu = std::make_tuple(intersect(lines.begin(), lines.end(), tree, counter),
|
tu = std::make_tuple(intersect(lines.begin(), lines.end(), tree, counter),
|
||||||
intersect(rays.begin(), rays.end(), tree, counter),
|
intersect(rays.begin(), rays.end(), tree, counter),
|
||||||
intersect(segments.begin(), segments.end(), tree, counter),
|
intersect(segments.begin(), segments.end(), tree, counter),
|
||||||
// cant use counter here
|
// can't use counter here
|
||||||
0);
|
0);
|
||||||
std::get<3>(tu) = counter;
|
std::get<3>(tu) = counter;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@
|
||||||
|
|
||||||
#include <CGAL/tags.h>
|
#include <CGAL/tags.h>
|
||||||
|
|
||||||
// Makro to define an additional operator for binary functors which takes
|
// Macro to define an additional operator for binary functors which takes
|
||||||
// two number types as parameters that are interoperable with the
|
// two number types as parameters that are interoperable with the
|
||||||
// number type
|
// number type
|
||||||
#define CGAL_IMPLICIT_INTEROPERABLE_BINARY_OPERATOR_WITH_RT( NT, Result_type ) \
|
#define CGAL_IMPLICIT_INTEROPERABLE_BINARY_OPERATOR_WITH_RT( NT, Result_type ) \
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@ class Parens_as_product_tag {};
|
||||||
|
|
||||||
/*! \ingroup NiX_io_parens
|
/*! \ingroup NiX_io_parens
|
||||||
* \brief decides whether this number requires parentheses
|
* \brief decides whether this number requires parentheses
|
||||||
* in case it appears within a produkt.
|
* in case it appears within a product.
|
||||||
*/
|
*/
|
||||||
template <class NT>
|
template <class NT>
|
||||||
struct Needs_parens_as_product{
|
struct Needs_parens_as_product{
|
||||||
|
|
@ -37,7 +37,7 @@ struct Needs_parens_as_product{
|
||||||
|
|
||||||
/*! \ingroup NiX_io_parens
|
/*! \ingroup NiX_io_parens
|
||||||
* \brief decides whether this number requires parentheses
|
* \brief decides whether this number requires parentheses
|
||||||
* in case it appears within a produkt.
|
* in case it appears within a product.
|
||||||
*/
|
*/
|
||||||
template <class NT>
|
template <class NT>
|
||||||
inline bool needs_parens_as_product(const NT& x){
|
inline bool needs_parens_as_product(const NT& x){
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,7 @@ void test_rational_traits(){
|
||||||
assert( Rational_traits().make_rational(std::make_pair(x,x)) == Rational(1));
|
assert( Rational_traits().make_rational(std::make_pair(x,x)) == Rational(1));
|
||||||
assert( Rational_traits().make_rational(std::make_pair(7,RT(2))) == x);
|
assert( Rational_traits().make_rational(std::make_pair(7,RT(2))) == x);
|
||||||
|
|
||||||
// gloabal function to_rational
|
// global function to_rational
|
||||||
x = CGAL::to_rational<Rational>(3.5);
|
x = CGAL::to_rational<Rational>(3.5);
|
||||||
assert( x == Rational(7)/Rational(2));
|
assert( x == Rational(7)/Rational(2));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -84,7 +84,7 @@ namespace CGAL {
|
||||||
assert(to_interval(Type(42)).first > 41.99);
|
assert(to_interval(Type(42)).first > 41.99);
|
||||||
assert(to_interval(Type(42)).second < 42.01);
|
assert(to_interval(Type(42)).second < 42.01);
|
||||||
|
|
||||||
// test neagtive numbers as well to catch obvious sign
|
// test negative numbers as well to catch obvious sign
|
||||||
// errors
|
// errors
|
||||||
assert( -42.0 >= to_interval( -Type(42) ).first );
|
assert( -42.0 >= to_interval( -Type(42) ).first );
|
||||||
assert( -42.0 <= to_interval( -Type(42) ).second );
|
assert( -42.0 <= to_interval( -Type(42) ).second );
|
||||||
|
|
|
||||||
|
|
@ -4,15 +4,13 @@ project(Algebraic_kernel_d_Examples)
|
||||||
find_package(CGAL REQUIRED COMPONENTS Core)
|
find_package(CGAL REQUIRED COMPONENTS Core)
|
||||||
|
|
||||||
find_package(MPFI QUIET)
|
find_package(MPFI QUIET)
|
||||||
|
|
||||||
if(MPFI_FOUND AND NOT CGAL_DISABLE_GMP)
|
if(MPFI_FOUND AND NOT CGAL_DISABLE_GMP)
|
||||||
include(${MPFI_USE_FILE})
|
include(${MPFI_USE_FILE})
|
||||||
include(CGAL_VersionUtils)
|
|
||||||
create_single_source_cgal_program("Compare_1.cpp")
|
create_single_source_cgal_program("Compare_1.cpp")
|
||||||
create_single_source_cgal_program("Construct_algebraic_real_1.cpp")
|
create_single_source_cgal_program("Construct_algebraic_real_1.cpp")
|
||||||
create_single_source_cgal_program("Isolate_1.cpp")
|
create_single_source_cgal_program("Isolate_1.cpp")
|
||||||
create_single_source_cgal_program("Sign_at_1.cpp")
|
create_single_source_cgal_program("Sign_at_1.cpp")
|
||||||
create_single_source_cgal_program("Solve_1.cpp")
|
create_single_source_cgal_program("Solve_1.cpp")
|
||||||
else()
|
else()
|
||||||
message(STATUS "This program requires the CGAL, CGAL_Core and MPFI libraries, and will not be compiled.")
|
message("NOTICE: This project requires the MPFI library and GMP support, and will not be compiled.")
|
||||||
endif()
|
endif()
|
||||||
|
|
|
||||||
|
|
@ -840,7 +840,7 @@ public:
|
||||||
} else {
|
} else {
|
||||||
// more work! We should not assume that each
|
// more work! We should not assume that each
|
||||||
// roots[i].first has f or g as defining polynomial, because
|
// roots[i].first has f or g as defining polynomial, because
|
||||||
// the representation might have been simplifed
|
// the representation might have been simplified
|
||||||
|
|
||||||
// Here's the safe way: Take the simpler of the curves
|
// Here's the safe way: Take the simpler of the curves
|
||||||
// (but the one without vertical component!)
|
// (but the one without vertical component!)
|
||||||
|
|
@ -922,7 +922,7 @@ public:
|
||||||
*
|
*
|
||||||
* \attention{This method returns the y-coordinate in isolating interval
|
* \attention{This method returns the y-coordinate in isolating interval
|
||||||
* representation. Calculating such a representation is usually a time-
|
* representation. Calculating such a representation is usually a time-
|
||||||
* consuming taks, since it is against the "y-per-x"-view that we take
|
* consuming task, since it is against the "y-per-x"-view that we take
|
||||||
* in our kernel. Therefore, it is recommended, if possible,
|
* in our kernel. Therefore, it is recommended, if possible,
|
||||||
* to use the functors
|
* to use the functors
|
||||||
* \c Approximate_absolute_y_2 and \c Approximate_relative_y_2 that
|
* \c Approximate_absolute_y_2 and \c Approximate_relative_y_2 that
|
||||||
|
|
|
||||||
|
|
@ -494,7 +494,7 @@ public:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
} // namepace internal
|
} // namespace internal
|
||||||
|
|
||||||
} //namespace CGAL
|
} //namespace CGAL
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@ namespace internal {
|
||||||
// sign_at_low_ = polynomial_.evaluate(low_)
|
// sign_at_low_ = polynomial_.evaluate(low_)
|
||||||
// x is the only root of polynomial_ in the open interval ]low_,high_[
|
// x is the only root of polynomial_ in the open interval ]low_,high_[
|
||||||
// low_ != x != high
|
// low_ != x != high
|
||||||
// ******************* EXEPTION *******************
|
// ******************* EXCEPTION *******************
|
||||||
// x is rational: in this case low=high=x
|
// x is rational: in this case low=high=x
|
||||||
|
|
||||||
template< class Coefficient_, class Rational_>
|
template< class Coefficient_, class Rational_>
|
||||||
|
|
@ -135,7 +135,7 @@ protected:
|
||||||
|
|
||||||
// interval_option left out
|
// interval_option left out
|
||||||
|
|
||||||
// trys to set rational if degree is 1
|
// tries to set rational if degree is 1
|
||||||
typedef typename CGAL::Coercion_traits< Coefficient, Rational >::Type RET;
|
typedef typename CGAL::Coercion_traits< Coefficient, Rational >::Type RET;
|
||||||
set_rational(RET());
|
set_rational(RET());
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -52,7 +52,7 @@ namespace internal {
|
||||||
// sign_at_low_ = polynomial_.evaluate(low_)
|
// sign_at_low_ = polynomial_.evaluate(low_)
|
||||||
// x is the only root of polynomial_ in the open interval ]low_,high_[
|
// x is the only root of polynomial_ in the open interval ]low_,high_[
|
||||||
// low_ != x != high
|
// low_ != x != high
|
||||||
// ******************* EXEPTION *******************
|
// ******************* EXCEPTION *******************
|
||||||
// x is rational: in this case low=high=x
|
// x is rational: in this case low=high=x
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1217,7 +1217,7 @@ public:
|
||||||
*
|
*
|
||||||
* The polynomial \c f must have exactly \c m real roots, counted without
|
* The polynomial \c f must have exactly \c m real roots, counted without
|
||||||
* multiplicity, and the degree of <tt>gcd(f,f')</tt> must be \c k. In this
|
* multiplicity, and the degree of <tt>gcd(f,f')</tt> must be \c k. In this
|
||||||
* case, the constructor either isolates the real roots of \c f sucessfully
|
* case, the constructor either isolates the real roots of \c f successfully
|
||||||
* or a Non_generic_position_exception is thrown. Such an exception
|
* or a Non_generic_position_exception is thrown. Such an exception
|
||||||
* certainly occurs if \c f has more than one multiple real root. If \c f
|
* certainly occurs if \c f has more than one multiple real root. If \c f
|
||||||
* has at most one multiple root over the complex numbers, the roots are
|
* has at most one multiple root over the complex numbers, the roots are
|
||||||
|
|
|
||||||
|
|
@ -446,7 +446,7 @@ private:
|
||||||
Integer_vector coeff_; // wrt [lower_, upper_], approximate
|
Integer_vector coeff_; // wrt [lower_, upper_], approximate
|
||||||
int min_var_, max_var_;
|
int min_var_, max_var_;
|
||||||
bool coeff_update_delayed_;
|
bool coeff_update_delayed_;
|
||||||
// "state data" (copied en bloc by .copy_state_from())
|
// "state data" (copied en block by .copy_state_from())
|
||||||
long subdepth_bound_, subdepth_current_;
|
long subdepth_bound_, subdepth_current_;
|
||||||
long log_eps_; // $q - p$
|
long log_eps_; // $q - p$
|
||||||
long log_C_eps_; // $q - p + 4n$
|
long log_C_eps_; // $q - p + 4n$
|
||||||
|
|
|
||||||
|
|
@ -534,7 +534,7 @@ private:
|
||||||
long log_bdry_den_;
|
long log_bdry_den_;
|
||||||
Integer_vector coeff_; // wrt [lower_, upper_], approximate
|
Integer_vector coeff_; // wrt [lower_, upper_], approximate
|
||||||
int min_var_, max_var_;
|
int min_var_, max_var_;
|
||||||
// "state data" (copied en bloc by .copy_state_from())
|
// "state data" (copied en block by .copy_state_from())
|
||||||
long subdiv_tries_, subdiv_fails_;
|
long subdiv_tries_, subdiv_fails_;
|
||||||
long recdepth_;
|
long recdepth_;
|
||||||
long log_sep_, delta_log_sep_, log_eps_, log_C_eps_;
|
long log_sep_, delta_log_sep_, log_eps_, log_C_eps_;
|
||||||
|
|
@ -737,7 +737,7 @@ public:
|
||||||
<b>Supplying a traits class</b>
|
<b>Supplying a traits class</b>
|
||||||
|
|
||||||
This class is actually a class template.
|
This class is actually a class template.
|
||||||
To use it, you need to instanciate it with a traits class
|
To use it, you need to instantiate it with a traits class
|
||||||
that defines the following three types and the various
|
that defines the following three types and the various
|
||||||
functors on them listed below.
|
functors on them listed below.
|
||||||
- \c Coefficient: The type of coefficients supplied
|
- \c Coefficient: The type of coefficients supplied
|
||||||
|
|
@ -750,7 +750,7 @@ public:
|
||||||
- \c Bound: \c lower() and \c upper() return
|
- \c Bound: \c lower() and \c upper() return
|
||||||
interval boundaries in this type. Must be \c Assignable.
|
interval boundaries in this type. Must be \c Assignable.
|
||||||
The canonical choice is \c NiX::Exact_float_number<Integer>.
|
The canonical choice is \c NiX::Exact_float_number<Integer>.
|
||||||
If you never instanciate \c lower() and \c upper()
|
If you never instantiate \c lower() and \c upper()
|
||||||
(maybe use \c boundaries() instead), you might be lucky
|
(maybe use \c boundaries() instead), you might be lucky
|
||||||
and get away with typedef'ing this to \c void.
|
and get away with typedef'ing this to \c void.
|
||||||
|
|
||||||
|
|
@ -773,7 +773,7 @@ public:
|
||||||
- \c Lower_bound_log2_abs: A \c UnaryFunction with signature
|
- \c Lower_bound_log2_abs: A \c UnaryFunction with signature
|
||||||
<tt>long l = Lower_bound_log2_abs()(Coefficient x)</tt>.
|
<tt>long l = Lower_bound_log2_abs()(Coefficient x)</tt>.
|
||||||
The result \c l must be a lower bound to log<sub>2</sub>(|<i>x</i>|).
|
The result \c l must be a lower bound to log<sub>2</sub>(|<i>x</i>|).
|
||||||
If \c Coefficient posesses \c NiX::NT_traits::Floor_log2_abs,
|
If \c Coefficient possesses \c NiX::NT_traits::Floor_log2_abs,
|
||||||
you can simply use that.
|
you can simply use that.
|
||||||
- \c lower_bound_log2_abs_object(): A \c const member function
|
- \c lower_bound_log2_abs_object(): A \c const member function
|
||||||
taking no arguments and returning a function object
|
taking no arguments and returning a function object
|
||||||
|
|
|
||||||
|
|
@ -481,7 +481,7 @@ public:
|
||||||
* \c internal::Zero_resultant_exception<Polynomial_2>,
|
* \c internal::Zero_resultant_exception<Polynomial_2>,
|
||||||
* instead of performing a shear.
|
* instead of performing a shear.
|
||||||
*
|
*
|
||||||
* \Todo Currently the defualt strategy has been changed to SHEAR_STRATEGY
|
* \Todo Currently the default strategy has been changed to SHEAR_STRATEGY
|
||||||
* because there exist a problem if vertical asymtotes are present at
|
* because there exist a problem if vertical asymtotes are present at
|
||||||
* the rational x-coordinate.
|
* the rational x-coordinate.
|
||||||
*/
|
*/
|
||||||
|
|
@ -1167,7 +1167,7 @@ public:
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief returns the status line for the interval
|
* \brief returns the status line for the interval
|
||||||
* preceeding the <tt>i</tt>th event
|
* preceding the <tt>i</tt>th event
|
||||||
*
|
*
|
||||||
* Returns a status line for a reference x-coordinate of the <tt>i</tt>th
|
* Returns a status line for a reference x-coordinate of the <tt>i</tt>th
|
||||||
* interval of the curve. If called multiple times for the same <tt>i</tt>,
|
* interval of the curve. If called multiple times for the same <tt>i</tt>,
|
||||||
|
|
@ -1827,7 +1827,7 @@ private:
|
||||||
static_cast<size_type>(lcoeff_roots.size()) &&
|
static_cast<size_type>(lcoeff_roots.size()) &&
|
||||||
event_values[i]==lcoeff_roots[curr_lcoeff_index]) {
|
event_values[i]==lcoeff_roots[curr_lcoeff_index]) {
|
||||||
// We have a root of the leading coefficient
|
// We have a root of the leading coefficient
|
||||||
// of the primitve polynomial
|
// of the primitive polynomial
|
||||||
curr_event.index_of_prim_lcoeff_root = curr_lcoeff_index;
|
curr_event.index_of_prim_lcoeff_root = curr_lcoeff_index;
|
||||||
curr_event.mult_of_prim_lcoeff_root
|
curr_event.mult_of_prim_lcoeff_root
|
||||||
= lcoeff_mults[curr_lcoeff_index];
|
= lcoeff_mults[curr_lcoeff_index];
|
||||||
|
|
@ -1867,7 +1867,7 @@ private:
|
||||||
static_cast<size_type>(lcoeff_roots.size()) &&
|
static_cast<size_type>(lcoeff_roots.size()) &&
|
||||||
event_values[i]==lcoeff_roots[curr_lcoeff_index]) {
|
event_values[i]==lcoeff_roots[curr_lcoeff_index]) {
|
||||||
// We have a root of the leading coefficient
|
// We have a root of the leading coefficient
|
||||||
// of the primitve polynomial
|
// of the primitive polynomial
|
||||||
curr_event.index_of_prim_lcoeff_root = curr_lcoeff_index;
|
curr_event.index_of_prim_lcoeff_root = curr_lcoeff_index;
|
||||||
curr_event.mult_of_prim_lcoeff_root
|
curr_event.mult_of_prim_lcoeff_root
|
||||||
= lcoeff_mults[curr_lcoeff_index];
|
= lcoeff_mults[curr_lcoeff_index];
|
||||||
|
|
|
||||||
|
|
@ -328,7 +328,7 @@ private:
|
||||||
return false;
|
return false;
|
||||||
return (P[0] != Coeff__(0) && P.evaluate(Coeff__(1)) != Coeff__(0));
|
return (P[0] != Coeff__(0) && P.evaluate(Coeff__(1)) != Coeff__(0));
|
||||||
}
|
}
|
||||||
//! Descartes algoritm to determine isolating intervals for the roots
|
//! Descartes algorithm to determine isolating intervals for the roots
|
||||||
//! lying in the interval (0,1).
|
//! lying in the interval (0,1).
|
||||||
// The parameters $(i,D)$ describe the interval $(i/2^D, (i+1)/2^D)$.
|
// The parameters $(i,D)$ describe the interval $(i/2^D, (i+1)/2^D)$.
|
||||||
// Here $0\leq i < 2^D$.
|
// Here $0\leq i < 2^D$.
|
||||||
|
|
@ -389,7 +389,7 @@ private:
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//! Strong Descartes algoritm to determine isolating intervals for the
|
//! Strong Descartes algorithm to determine isolating intervals for the
|
||||||
//! roots lying in the interval (0,1), where the first
|
//! roots lying in the interval (0,1), where the first
|
||||||
//! derivative have no sign change. \pre $P$ has only one root in the
|
//! derivative have no sign change. \pre $P$ has only one root in the
|
||||||
//! interval given by $(i,D)$.
|
//! interval given by $(i,D)$.
|
||||||
|
|
|
||||||
|
|
@ -118,7 +118,7 @@ public:
|
||||||
* curve.
|
* curve.
|
||||||
*
|
*
|
||||||
* Additionally, the \c id of the event line to be created has to be
|
* Additionally, the \c id of the event line to be created has to be
|
||||||
* specfied, and
|
* specified, and
|
||||||
* the number of arcs that are entering from the left and leaving to the
|
* the number of arcs that are entering from the left and leaving to the
|
||||||
* right are needed. Furthermore, the flag \c root_of_resultant tells
|
* right are needed. Furthermore, the flag \c root_of_resultant tells
|
||||||
* whether \c alpha is a root of the resultant of the specified curve, and
|
* whether \c alpha is a root of the resultant of the specified curve, and
|
||||||
|
|
@ -314,7 +314,7 @@ protected:
|
||||||
*
|
*
|
||||||
* If the first elements in the sequence are known to be zero,
|
* If the first elements in the sequence are known to be zero,
|
||||||
* \c first_elements_zero can be set accordingly. The zero test is then
|
* \c first_elements_zero can be set accordingly. The zero test is then
|
||||||
* ommitted for that leading elements.
|
* omitted for that leading elements.
|
||||||
*/
|
*/
|
||||||
template<typename InputIterator>
|
template<typename InputIterator>
|
||||||
std::pair<int,int> compute_mk(Algebraic_real_1 alpha,
|
std::pair<int,int> compute_mk(Algebraic_real_1 alpha,
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,7 @@ namespace CGAL {
|
||||||
|
|
||||||
namespace internal {
|
namespace internal {
|
||||||
|
|
||||||
// Don't define default, results in more convinient compiler messages
|
// Don't define default, results in more convenient compiler messages
|
||||||
template< class Type > class Float_traits;
|
template< class Type > class Float_traits;
|
||||||
// {
|
// {
|
||||||
// public:
|
// public:
|
||||||
|
|
|
||||||
|
|
@ -54,7 +54,7 @@ namespace internal {
|
||||||
// TODO: Implement array in source code file
|
// TODO: Implement array in source code file
|
||||||
// extern const signed char floor_log2_4bit[16]; // see src/floor_log2_4bit.C
|
// extern const signed char floor_log2_4bit[16]; // see src/floor_log2_4bit.C
|
||||||
|
|
||||||
// Don't define default, results in more convinient compiler messages
|
// Don't define default, results in more convenient compiler messages
|
||||||
template< class Type > class Real_embeddable_extension;
|
template< class Type > class Real_embeddable_extension;
|
||||||
// {
|
// {
|
||||||
// public:
|
// public:
|
||||||
|
|
|
||||||
|
|
@ -323,7 +323,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!\brief
|
/*!\brief
|
||||||
* constructs from a given represenation
|
* constructs from a given representation
|
||||||
*/
|
*/
|
||||||
Status_line_CA_1(Rep rep) :
|
Status_line_CA_1(Rep rep) :
|
||||||
Base(rep) {
|
Base(rep) {
|
||||||
|
|
|
||||||
|
|
@ -208,7 +208,7 @@ public:
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
/*!\brief
|
/*!\brief
|
||||||
* constructs from a given represenation
|
* constructs from a given representation
|
||||||
*/
|
*/
|
||||||
Status_line_CPA_1(Rep rep) :
|
Status_line_CPA_1(Rep rep) :
|
||||||
Base(rep) {
|
Base(rep) {
|
||||||
|
|
|
||||||
|
|
@ -233,7 +233,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!\brief
|
/*!\brief
|
||||||
* constructs a point from a given represenation
|
* constructs a point from a given representation
|
||||||
*/
|
*/
|
||||||
Xy_coordinate_2(Rep rep) :
|
Xy_coordinate_2(Rep rep) :
|
||||||
Base(rep) {
|
Base(rep) {
|
||||||
|
|
@ -254,7 +254,7 @@ public:
|
||||||
/*!
|
/*!
|
||||||
* \brief y-coordinate of this point
|
* \brief y-coordinate of this point
|
||||||
*
|
*
|
||||||
* Note: In general, this method results in a extremly large polynomial
|
* Note: In general, this method results in a extremely large polynomial
|
||||||
* for the y-coordinate. It is recommended to use it carefully,
|
* for the y-coordinate. It is recommended to use it carefully,
|
||||||
* and using get_approximation_y() instead whenever approximations suffice.
|
* and using get_approximation_y() instead whenever approximations suffice.
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -157,7 +157,7 @@ template<typename AlgebraicKernel_1> typename AlgebraicKernel_1::Bound
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief finds a Rational value rightt of an Algebraic real alpha
|
* \brief finds a Rational value right of an Algebraic real alpha
|
||||||
*/
|
*/
|
||||||
template<typename AlgebraicKernel_1> typename AlgebraicKernel_1::Bound
|
template<typename AlgebraicKernel_1> typename AlgebraicKernel_1::Bound
|
||||||
bound_right_of(const AlgebraicKernel_1* kernel,
|
bound_right_of(const AlgebraicKernel_1* kernel,
|
||||||
|
|
|
||||||
|
|
@ -87,10 +87,10 @@
|
||||||
* (i.e., vertical cusps, isolated points on arcs), and usual regular points.
|
* (i.e., vertical cusps, isolated points on arcs), and usual regular points.
|
||||||
* The candidate point on each status line can be checked for being singular
|
* The candidate point on each status line can be checked for being singular
|
||||||
* using this flag. This gives additional information but increases
|
* using this flag. This gives additional information but increases
|
||||||
* compuation time
|
* computation time
|
||||||
*
|
*
|
||||||
* WARNING: Currently, the status line does not store the additional
|
* WARNING: Currently, the status line does not store the additional
|
||||||
* information whether a point is singluar or not.
|
* information whether a point is singular or not.
|
||||||
* Therefore, there is currently no reasons to set this flag. It is still
|
* Therefore, there is currently no reasons to set this flag. It is still
|
||||||
* contained for possible further extension of the status line.
|
* contained for possible further extension of the status line.
|
||||||
*/
|
*/
|
||||||
|
|
@ -171,7 +171,7 @@
|
||||||
/**
|
/**
|
||||||
* The algorithm can also handle non-y-regular curves without shearing,
|
* The algorithm can also handle non-y-regular curves without shearing,
|
||||||
* in case that the resultant multiplicity at vertical asymptotes is one.
|
* in case that the resultant multiplicity at vertical asymptotes is one.
|
||||||
* This special treatement can be switched off by setting this flag.
|
* This special treatment can be switched off by setting this flag.
|
||||||
* It is not recommended to do this because of efficiency
|
* It is not recommended to do this because of efficiency
|
||||||
*/
|
*/
|
||||||
#ifndef CGAL_ACK_SHEAR_ALL_NOT_Y_REGULAR_CURVES
|
#ifndef CGAL_ACK_SHEAR_ALL_NOT_Y_REGULAR_CURVES
|
||||||
|
|
|
||||||
|
|
@ -111,7 +111,7 @@ public:
|
||||||
|
|
||||||
void operator()( Type& t, int rel_prec ) const {
|
void operator()( Type& t, int rel_prec ) const {
|
||||||
// If t is zero, we can refine the interval to
|
// If t is zero, we can refine the interval to
|
||||||
// infinite precission
|
// infinite precision
|
||||||
if( CGAL::is_zero( t ) ) {
|
if( CGAL::is_zero( t ) ) {
|
||||||
t = Type(0);
|
t = Type(0);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,7 @@ namespace RS_AK1{
|
||||||
// Refiner_()(const Polynomial_&,Bound_&,Bound_&,int p);
|
// Refiner_()(const Polynomial_&,Bound_&,Bound_&,int p);
|
||||||
//
|
//
|
||||||
// The fourth template argument is a comparator, a function object that
|
// The fourth template argument is a comparator, a function object that
|
||||||
// receives the polynomials and bounds defining two algebraic numbres and
|
// receives the polynomials and bounds defining two algebraic numbers and
|
||||||
// just compares them, returning a CGAL::Comparison_result. The signature
|
// just compares them, returning a CGAL::Comparison_result. The signature
|
||||||
// of a comparator must be:
|
// of a comparator must be:
|
||||||
// CGAL::Comparison_result
|
// CGAL::Comparison_result
|
||||||
|
|
|
||||||
|
|
@ -4,48 +4,33 @@ project(Algebraic_kernel_d_Tests)
|
||||||
# CGAL and its components
|
# CGAL and its components
|
||||||
find_package(CGAL REQUIRED COMPONENTS Core)
|
find_package(CGAL REQUIRED COMPONENTS Core)
|
||||||
|
|
||||||
find_package(RS3 QUIET)
|
find_package(MPFI QUIET)
|
||||||
|
|
||||||
if(MPFI_FOUND)
|
if(MPFI_FOUND)
|
||||||
|
message(STATUS "Found MPFI")
|
||||||
include(${MPFI_USE_FILE})
|
include(${MPFI_USE_FILE})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
find_package(RS3 QUIET)
|
||||||
if(RS3_FOUND)
|
if(RS3_FOUND)
|
||||||
|
message(STATUS "Found RS3")
|
||||||
include(${RS3_USE_FILE})
|
include(${RS3_USE_FILE})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Boost and its components
|
|
||||||
find_package(Boost)
|
|
||||||
|
|
||||||
if(NOT Boost_FOUND)
|
|
||||||
|
|
||||||
message(
|
|
||||||
STATUS "This project requires the Boost library, and will not be compiled.")
|
|
||||||
|
|
||||||
return()
|
|
||||||
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# include for local directory
|
# include for local directory
|
||||||
include_directories(BEFORE include)
|
include_directories(BEFORE include)
|
||||||
|
|
||||||
# Creating entries for all .cpp/.C files with "main" routine
|
|
||||||
# ##########################################################
|
|
||||||
|
|
||||||
create_single_source_cgal_program("cyclic.cpp")
|
create_single_source_cgal_program("cyclic.cpp")
|
||||||
create_single_source_cgal_program("Descartes.cpp")
|
create_single_source_cgal_program("Descartes.cpp")
|
||||||
|
|
||||||
if(NOT CGAL_DISABLE_GMP)
|
if(NOT CGAL_DISABLE_GMP)
|
||||||
create_single_source_cgal_program("Algebraic_curve_kernel_2.cpp")
|
create_single_source_cgal_program("Algebraic_curve_kernel_2.cpp")
|
||||||
create_single_source_cgal_program("algebraic_curve_kernel_2_tools.cpp")
|
create_single_source_cgal_program("algebraic_curve_kernel_2_tools.cpp")
|
||||||
create_single_source_cgal_program("Algebraic_kernel_d_1_LEDA.cpp")
|
create_single_source_cgal_program("Algebraic_kernel_d_1_LEDA.cpp")
|
||||||
|
|
||||||
create_single_source_cgal_program(
|
create_single_source_cgal_program("Algebraic_kernel_d_1_CORE_Integer_rational.cpp")
|
||||||
"Algebraic_kernel_d_1_CORE_Integer_rational.cpp")
|
create_single_source_cgal_program("Algebraic_kernel_d_1_CORE_SqrtII_rational.cpp")
|
||||||
create_single_source_cgal_program(
|
create_single_source_cgal_program("Algebraic_kernel_d_1_CORE_SqrtRI_rational.cpp")
|
||||||
"Algebraic_kernel_d_1_CORE_SqrtII_rational.cpp")
|
create_single_source_cgal_program("Algebraic_kernel_d_1_CORE_SqrtRR_rational.cpp")
|
||||||
create_single_source_cgal_program(
|
|
||||||
"Algebraic_kernel_d_1_CORE_SqrtRI_rational.cpp")
|
|
||||||
create_single_source_cgal_program(
|
|
||||||
"Algebraic_kernel_d_1_CORE_SqrtRR_rational.cpp")
|
|
||||||
|
|
||||||
create_single_source_cgal_program("Algebraic_kernel_d_1_GMP.cpp")
|
create_single_source_cgal_program("Algebraic_kernel_d_1_GMP.cpp")
|
||||||
create_single_source_cgal_program("Algebraic_kernel_d_2.cpp")
|
create_single_source_cgal_program("Algebraic_kernel_d_2.cpp")
|
||||||
|
|
@ -54,14 +39,13 @@ if(NOT CGAL_DISABLE_GMP)
|
||||||
create_single_source_cgal_program("Curve_analysis_2.cpp")
|
create_single_source_cgal_program("Curve_analysis_2.cpp")
|
||||||
create_single_source_cgal_program("Curve_pair_analysis_2.cpp")
|
create_single_source_cgal_program("Curve_pair_analysis_2.cpp")
|
||||||
create_single_source_cgal_program("Real_embeddable_traits_extension.cpp")
|
create_single_source_cgal_program("Real_embeddable_traits_extension.cpp")
|
||||||
|
|
||||||
if(RS_FOUND)
|
if(RS_FOUND)
|
||||||
create_single_source_cgal_program("Algebraic_kernel_rs_gmpq_d_1.cpp")
|
create_single_source_cgal_program("Algebraic_kernel_rs_gmpq_d_1.cpp")
|
||||||
create_single_source_cgal_program("Algebraic_kernel_rs_gmpz_d_1.cpp")
|
create_single_source_cgal_program("Algebraic_kernel_rs_gmpz_d_1.cpp")
|
||||||
else()
|
else()
|
||||||
message(
|
message(STATUS "NOTICE: Some tests require the RS library, and will not be compiled.")
|
||||||
STATUS
|
|
||||||
"NOTICE: Some tests require the RS library, and will not be compiled.")
|
|
||||||
endif()
|
endif()
|
||||||
else()
|
else()
|
||||||
message(STATUS "NOTICE: Some tests require the CGAL_Core library, and will not be compiled.")
|
message(STATUS "NOTICE: Some tests require GMP support, and will not be compiled.")
|
||||||
endif()
|
endif()
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,7 @@ namespace CGAL {
|
||||||
typedef typename AK::Polynomial_1_3 Polynomial_1_3;
|
typedef typename AK::Polynomial_1_3 Polynomial_1_3;
|
||||||
// The degenerated cases are 2 tangent spheres
|
// The degenerated cases are 2 tangent spheres
|
||||||
// os 2 non-intersecting spheres
|
// os 2 non-intersecting spheres
|
||||||
// beacause we cannot have infinitely many solutions
|
// because we cannot have infinitely many solutions
|
||||||
if(e1 == e2) {
|
if(e1 == e2) {
|
||||||
if(tangent<AK>(e1,e3)) {
|
if(tangent<AK>(e1,e3)) {
|
||||||
Polynomial_1_3 p = plane_from_2_spheres<AK>(e1,e3);
|
Polynomial_1_3 p = plane_from_2_spheres<AK>(e1,e3);
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ how to convert from the camouflaged `CGAL::Point_3` to the two-dimensional point
|
||||||
of `CGAL::Simple_cartesian<NT>`. In this case, a partial specialization of `Cartesian_converter`
|
of `CGAL::Simple_cartesian<NT>`. In this case, a partial specialization of `Cartesian_converter`
|
||||||
must be provided by the user. An example of such specialization is given in the example
|
must be provided by the user. An example of such specialization is given in the example
|
||||||
\ref Alpha_shapes_2/ex_alpha_projection_traits.cpp "ex_alpha_projection_traits.cpp".
|
\ref Alpha_shapes_2/ex_alpha_projection_traits.cpp "ex_alpha_projection_traits.cpp".
|
||||||
<li>The tag `ExactAlphaComparisonTag` cannot be used in conjonction with periodic triangulations.
|
<li>The tag `ExactAlphaComparisonTag` cannot be used in conjunction with periodic triangulations.
|
||||||
When the tag `ExactAlphaComparisonTag` is set to \link Tag_true `Tag_true`\endlink,
|
When the tag `ExactAlphaComparisonTag` is set to \link Tag_true `Tag_true`\endlink,
|
||||||
the evaluations of predicates such as `Side_of_oriented_circle_2` are done lazily.
|
the evaluations of predicates such as `Side_of_oriented_circle_2` are done lazily.
|
||||||
Consequently, the predicates store pointers to the geometrical positions of the
|
Consequently, the predicates store pointers to the geometrical positions of the
|
||||||
|
|
|
||||||
|
|
@ -57,7 +57,7 @@ public:
|
||||||
typedef typename Dt::Geom_traits Gt;
|
typedef typename Dt::Geom_traits Gt;
|
||||||
typedef typename Dt::Triangulation_data_structure Tds;
|
typedef typename Dt::Triangulation_data_structure Tds;
|
||||||
|
|
||||||
// The Exact Comparison Tag cannot be used in conjonction with periodic triangulations
|
// The Exact Comparison Tag cannot be used in conjunction with periodic triangulations
|
||||||
// because the periodic triangulations' point() function returns a temporary
|
// because the periodic triangulations' point() function returns a temporary
|
||||||
// value while the lazy predicate evaluations that are used when the Exact tag
|
// value while the lazy predicate evaluations that are used when the Exact tag
|
||||||
// is set to true rely on a permanent and safe access to the points.
|
// is set to true rely on a permanent and safe access to the points.
|
||||||
|
|
@ -432,7 +432,7 @@ public:
|
||||||
private:
|
private:
|
||||||
|
|
||||||
// the dynamic version is not yet implemented
|
// the dynamic version is not yet implemented
|
||||||
// desactivate the triangulation member functions
|
// deactivate the triangulation member functions
|
||||||
Vertex_handle insert(const Point& p);
|
Vertex_handle insert(const Point& p);
|
||||||
// Inserts point `p' in the alpha shape and returns the
|
// Inserts point `p' in the alpha shape and returns the
|
||||||
// corresponding vertex of the underlying Delaunay triangulation.
|
// corresponding vertex of the underlying Delaunay triangulation.
|
||||||
|
|
@ -744,7 +744,7 @@ private:
|
||||||
//---------------------------------------------------------------------
|
//---------------------------------------------------------------------
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// prevent default copy constructor and default assigment
|
// prevent default copy constructor and default assignment
|
||||||
|
|
||||||
Alpha_shape_2(const Alpha_shape_2& A);
|
Alpha_shape_2(const Alpha_shape_2& A);
|
||||||
|
|
||||||
|
|
@ -1435,7 +1435,7 @@ template < class Dt, class EACT >
|
||||||
typename Alpha_shape_2<Dt,EACT>::Type_of_alpha
|
typename Alpha_shape_2<Dt,EACT>::Type_of_alpha
|
||||||
Alpha_shape_2<Dt,EACT>::find_alpha_solid() const
|
Alpha_shape_2<Dt,EACT>::find_alpha_solid() const
|
||||||
{
|
{
|
||||||
// compute the minumum alpha such that all data points
|
// compute the minimum alpha such that all data points
|
||||||
// are either on the boundary or in the interior
|
// are either on the boundary or in the interior
|
||||||
// not necessarily connected
|
// not necessarily connected
|
||||||
// starting point for searching
|
// starting point for searching
|
||||||
|
|
|
||||||
|
|
@ -144,7 +144,7 @@ class Lazy_alpha_nt_2
|
||||||
typedef typename Types::Exact_point Exact_point;
|
typedef typename Types::Exact_point Exact_point;
|
||||||
typedef typename Types::Input_point Input_point;
|
typedef typename Types::Input_point Input_point;
|
||||||
|
|
||||||
//Convertion functions
|
//Conversion functions
|
||||||
Approx_point to_approx(const Input_point& wp) const
|
Approx_point to_approx(const Input_point& wp) const
|
||||||
{
|
{
|
||||||
// The traits class' Point_2 must be convertible using the Cartesian converter
|
// The traits class' Point_2 must be convertible using the Cartesian converter
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
- deprectate the following function
|
- deprecate the following function
|
||||||
Classification_type A.classify ( Cell_handle f, int i, FT alpha = get_alpha())
|
Classification_type A.classify ( Cell_handle f, int i, FT alpha = get_alpha())
|
||||||
because it is ambiguous with
|
because it is ambiguous with
|
||||||
Classification_type A.classify ( Cell_handle f, FT alpha = get_alpha())
|
Classification_type A.classify ( Cell_handle f, FT alpha = get_alpha())
|
||||||
|
|
@ -12,7 +12,7 @@ when alpha is given as an int.
|
||||||
Alpha_shape_3(Dt& dt, bool swap=true, NT alpha = 0, Mode m = REGULARIZED)
|
Alpha_shape_3(Dt& dt, bool swap=true, NT alpha = 0, Mode m = REGULARIZED)
|
||||||
The triangulation is swapped if swap=true and copied otherwise.
|
The triangulation is swapped if swap=true and copied otherwise.
|
||||||
|
|
||||||
- test the taking into account of paramater alpha in functions
|
- test the taking into account of parameter alpha in functions
|
||||||
get_alpha_shape_edges
|
get_alpha_shape_edges
|
||||||
get_alpha_shape_facets
|
get_alpha_shape_facets
|
||||||
get_alpha_shape_vertices
|
get_alpha_shape_vertices
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@ project(Alpha_shapes_3_Demo)
|
||||||
|
|
||||||
# Find includes in corresponding build directories
|
# Find includes in corresponding build directories
|
||||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||||
|
|
||||||
# Instruct CMake to run moc automatically when needed.
|
# Instruct CMake to run moc automatically when needed.
|
||||||
set(CMAKE_AUTOMOC ON)
|
set(CMAKE_AUTOMOC ON)
|
||||||
if(NOT POLICY CMP0070 AND POLICY CMP0053)
|
if(NOT POLICY CMP0070 AND POLICY CMP0053)
|
||||||
|
|
@ -27,7 +28,7 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND)
|
||||||
# include(${QT_USE_FILE})
|
# include(${QT_USE_FILE})
|
||||||
include_directories(BEFORE ./)
|
include_directories(BEFORE ./)
|
||||||
|
|
||||||
# ui file, created wih Qt Designer
|
# ui file, created with Qt Designer
|
||||||
qt5_wrap_ui(uis MainWindow.ui)
|
qt5_wrap_ui(uis MainWindow.ui)
|
||||||
|
|
||||||
# qrc files (resources files, that contain icons, at least)
|
# qrc files (resources files, that contain icons, at least)
|
||||||
|
|
@ -46,8 +47,6 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND)
|
||||||
|
|
||||||
else()
|
else()
|
||||||
|
|
||||||
message(
|
message("NOTICE: This demo requires CGAL and Qt5, and will not be compiled.")
|
||||||
STATUS "NOTICE: This demo requires CGAL, and Qt5, and will not be compiled."
|
|
||||||
)
|
|
||||||
|
|
||||||
endif()
|
endif()
|
||||||
|
|
|
||||||
|
|
@ -44,7 +44,7 @@ the basic `Cartesian_converter`, for example when a custom point is used.
|
||||||
In this case, a partial specialization of `Cartesian_converter`
|
In this case, a partial specialization of `Cartesian_converter`
|
||||||
must be provided by the user. An example of such specialization is given in the
|
must be provided by the user. An example of such specialization is given in the
|
||||||
two-dimensional Alpha Shapes example \ref Alpha_shapes_2/ex_alpha_projection_traits.cpp "ex_alpha_projection_traits.cpp".
|
two-dimensional Alpha Shapes example \ref Alpha_shapes_2/ex_alpha_projection_traits.cpp "ex_alpha_projection_traits.cpp".
|
||||||
<li>The tag `ExactAlphaComparisonTag` cannot be used in conjonction with periodic triangulations.
|
<li>The tag `ExactAlphaComparisonTag` cannot be used in conjunction with periodic triangulations.
|
||||||
When the tag `ExactAlphaComparisonTag` is set to \link Tag_true `Tag_true`\endlink,
|
When the tag `ExactAlphaComparisonTag` is set to \link Tag_true `Tag_true`\endlink,
|
||||||
the evaluations of predicates such as `Side_of_oriented_sphere_3` are done lazily.
|
the evaluations of predicates such as `Side_of_oriented_sphere_3` are done lazily.
|
||||||
Consequently, the predicates store pointers to the geometrical positions of the
|
Consequently, the predicates store pointers to the geometrical positions of the
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@ int main()
|
||||||
|
|
||||||
// compute alpha shape
|
// compute alpha shape
|
||||||
Alpha_shape_3 as(dt);
|
Alpha_shape_3 as(dt);
|
||||||
std::cout << "Alpha shape computed in REGULARIZED mode by defaut."
|
std::cout << "Alpha shape computed in REGULARIZED mode by default."
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
|
|
||||||
// find optimal alpha values
|
// find optimal alpha values
|
||||||
|
|
|
||||||
|
|
@ -69,7 +69,7 @@ class Alpha_shape_3 : public Dt
|
||||||
// or INTERIOR with respect to the alpha shape.
|
// or INTERIOR with respect to the alpha shape.
|
||||||
// In GENERAL mode a $k$ simplex is REGULAR if it is on the boundary
|
// In GENERAL mode a $k$ simplex is REGULAR if it is on the boundary
|
||||||
// of the alpha_complex and belongs to a $k+1$ simplex in the complex
|
// of the alpha_complex and belongs to a $k+1$ simplex in the complex
|
||||||
// and it is SINGULAR simplex if it is a boundary simplex tht is not
|
// and it is SINGULAR simplex if it is a boundary simplex that is not
|
||||||
// included in a $k+1$ simplex of the complex.
|
// included in a $k+1$ simplex of the complex.
|
||||||
|
|
||||||
// In REGULARIZED mode each k-dimensional simplex of the triangulation
|
// In REGULARIZED mode each k-dimensional simplex of the triangulation
|
||||||
|
|
@ -93,7 +93,7 @@ public:
|
||||||
typedef typename Dt::Geom_traits Gt;
|
typedef typename Dt::Geom_traits Gt;
|
||||||
typedef typename Dt::Triangulation_data_structure Tds;
|
typedef typename Dt::Triangulation_data_structure Tds;
|
||||||
|
|
||||||
// The Exact Comparison Tag cannot be used in conjonction with periodic triangulations
|
// The Exact Comparison Tag cannot be used in conjunction with periodic triangulations
|
||||||
// because the periodic triangulations' point() function returns a temporary
|
// because the periodic triangulations' point() function returns a temporary
|
||||||
// value while the lazy predicate evaluations that are used when the Exact tag
|
// value while the lazy predicate evaluations that are used when the Exact tag
|
||||||
// is set to true rely on a permanent and safe access to the points.
|
// is set to true rely on a permanent and safe access to the points.
|
||||||
|
|
@ -422,7 +422,7 @@ public:
|
||||||
private:
|
private:
|
||||||
|
|
||||||
// the dynamic version is not yet implemented
|
// the dynamic version is not yet implemented
|
||||||
// desactivate the tetrahedralization member functions
|
// deactivate the tetrahedralization member functions
|
||||||
void insert(const Point& /*p*/) {}
|
void insert(const Point& /*p*/) {}
|
||||||
// Inserts point `p' in the alpha shape and returns the
|
// Inserts point `p' in the alpha shape and returns the
|
||||||
// corresponding vertex of the underlying Delaunay tetrahedralization.
|
// corresponding vertex of the underlying Delaunay tetrahedralization.
|
||||||
|
|
@ -735,7 +735,7 @@ public:
|
||||||
// (2) the nb of solid components is equal or less than nb_component
|
// (2) the nb of solid components is equal or less than nb_component
|
||||||
|
|
||||||
NT find_alpha_solid() const;
|
NT find_alpha_solid() const;
|
||||||
// compute the minumum alpha such that all data points
|
// compute the minimum alpha such that all data points
|
||||||
// are either on the boundary or in the interior
|
// are either on the boundary or in the interior
|
||||||
// not necessarily connected
|
// not necessarily connected
|
||||||
// starting point for searching
|
// starting point for searching
|
||||||
|
|
@ -776,7 +776,7 @@ private:
|
||||||
//---------------------------------------------------------------------
|
//---------------------------------------------------------------------
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// prevent default copy constructor and default assigment
|
// prevent default copy constructor and default assignment
|
||||||
Alpha_shape_3(const Alpha_shape_3&);
|
Alpha_shape_3(const Alpha_shape_3&);
|
||||||
void operator=(const Alpha_shape_3&);
|
void operator=(const Alpha_shape_3&);
|
||||||
|
|
||||||
|
|
@ -1292,7 +1292,7 @@ Alpha_shape_3<Dt,EACT>::initialize_alpha_vertex_maps(bool reinitialize)
|
||||||
back_inserter(incidents));
|
back_inserter(incidents));
|
||||||
typename std::list<Cell_handle>::iterator chit=incidents.begin();
|
typename std::list<Cell_handle>::iterator chit=incidents.begin();
|
||||||
if (is_infinite(*chit)) as->set_is_on_chull(true);
|
if (is_infinite(*chit)) as->set_is_on_chull(true);
|
||||||
while (is_infinite(*chit)) ++chit; //skip infinte cells
|
while (is_infinite(*chit)) ++chit; //skip infinite cells
|
||||||
alpha = (*chit)->get_alpha();
|
alpha = (*chit)->get_alpha();
|
||||||
as->set_alpha_mid(alpha);
|
as->set_alpha_mid(alpha);
|
||||||
as->set_alpha_max(alpha);
|
as->set_alpha_max(alpha);
|
||||||
|
|
@ -1330,7 +1330,7 @@ Alpha_shape_3<Dt,EACT>::initialize_alpha_vertex_maps(bool reinitialize)
|
||||||
incident_cells(static_cast<Vertex_handle>(vit),
|
incident_cells(static_cast<Vertex_handle>(vit),
|
||||||
back_inserter(incidents));
|
back_inserter(incidents));
|
||||||
typename std::list<Cell_handle>::iterator chit=incidents.begin();
|
typename std::list<Cell_handle>::iterator chit=incidents.begin();
|
||||||
while (is_infinite(*chit)) ++chit; //skip infinte cells
|
while (is_infinite(*chit)) ++chit; //skip infinite cells
|
||||||
alpha = (*chit)->get_alpha();
|
alpha = (*chit)->get_alpha();
|
||||||
as->set_alpha_mid(alpha);
|
as->set_alpha_mid(alpha);
|
||||||
for( ; chit != incidents.end(); ++chit) {
|
for( ; chit != incidents.end(); ++chit) {
|
||||||
|
|
@ -1835,7 +1835,7 @@ Alpha_shape_3<Dt,EACT>::find_optimal_alpha(size_type nb_components) const
|
||||||
template <class Dt,class EACT>
|
template <class Dt,class EACT>
|
||||||
typename Alpha_shape_3<Dt,EACT>::NT
|
typename Alpha_shape_3<Dt,EACT>::NT
|
||||||
Alpha_shape_3<Dt,EACT>::find_alpha_solid() const
|
Alpha_shape_3<Dt,EACT>::find_alpha_solid() const
|
||||||
// compute the minumum alpha such that all data points
|
// compute the minimum alpha such that all data points
|
||||||
// are either on the boundary or in the interior
|
// are either on the boundary or in the interior
|
||||||
// not necessarily connected
|
// not necessarily connected
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -135,7 +135,7 @@ class Lazy_alpha_nt_3{
|
||||||
typedef typename Types::Approx_point Approx_point;
|
typedef typename Types::Approx_point Approx_point;
|
||||||
typedef typename Types::Exact_point Exact_point;
|
typedef typename Types::Exact_point Exact_point;
|
||||||
typedef typename Types::Input_point Input_point;
|
typedef typename Types::Input_point Input_point;
|
||||||
//Convertion functions
|
//Conversion functions
|
||||||
Approx_point to_approx(const Input_point& wp) const
|
Approx_point to_approx(const Input_point& wp) const
|
||||||
{
|
{
|
||||||
// The traits class' Point_3 must be convertible using the Cartesian converter
|
// The traits class' Point_3 must be convertible using the Cartesian converter
|
||||||
|
|
|
||||||
|
|
@ -116,7 +116,7 @@ class Fixed_alpha_shape_3 : public Dt
|
||||||
// or INTERIOR with respect to the alpha shape.
|
// or INTERIOR with respect to the alpha shape.
|
||||||
// A $k$ simplex is REGULAR if it is on the boundary
|
// A $k$ simplex is REGULAR if it is on the boundary
|
||||||
// of the alpha_complex and belongs to a $k+1$ simplex in the complex
|
// of the alpha_complex and belongs to a $k+1$ simplex in the complex
|
||||||
// and it is SINGULAR simplex if it is a boundary simplex tht is not
|
// and it is SINGULAR simplex if it is a boundary simplex that is not
|
||||||
// included in a $k+1$ simplex of the complex.
|
// included in a $k+1$ simplex of the complex.
|
||||||
|
|
||||||
// Roughly, the Fixed_alpha_shape data structure computes and stores,
|
// Roughly, the Fixed_alpha_shape data structure computes and stores,
|
||||||
|
|
@ -280,7 +280,7 @@ public:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Erase from edge_status_map, edges that will disappear:
|
// Erase from edge_status_map, edges that will disappear:
|
||||||
// they are not on the boudary of the hole
|
// they are not on the boundary of the hole
|
||||||
std::set<Edge,Compare_edge> hole_edges;
|
std::set<Edge,Compare_edge> hole_edges;
|
||||||
std::pair<typename std::set<Edge,Compare_edge>::iterator,bool> it_hedge_and_not_already_seen;
|
std::pair<typename std::set<Edge,Compare_edge>::iterator,bool> it_hedge_and_not_already_seen;
|
||||||
for (typename std::vector<Cell_handle>::iterator it=cells.begin();it!=cells.end();++it){
|
for (typename std::vector<Cell_handle>::iterator it=cells.begin();it!=cells.end();++it){
|
||||||
|
|
@ -598,7 +598,7 @@ private :
|
||||||
}
|
}
|
||||||
|
|
||||||
private :
|
private :
|
||||||
// prevent default copy constructor and default assigment
|
// prevent default copy constructor and default assignment
|
||||||
Fixed_alpha_shape_3(const Fixed_alpha_shape_3&);
|
Fixed_alpha_shape_3(const Fixed_alpha_shape_3&);
|
||||||
void operator=(const Fixed_alpha_shape_3&);
|
void operator=(const Fixed_alpha_shape_3&);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -152,7 +152,7 @@ _test_cls_alpha_shape_3()
|
||||||
test_filtration(a1,verbose);
|
test_filtration(a1,verbose);
|
||||||
|
|
||||||
std::cout << std::endl;
|
std::cout << std::endl;
|
||||||
std::cout << "test additionnal creators and set mode" << std::endl;
|
std::cout << "test additional creators and set mode" << std::endl;
|
||||||
Triangulation dt2( L.begin(), L.end());
|
Triangulation dt2( L.begin(), L.end());
|
||||||
Alpha_shape_3 a2(dt2, 0, Alpha_shape_3::REGULARIZED);
|
Alpha_shape_3 a2(dt2, 0, Alpha_shape_3::REGULARIZED);
|
||||||
if(verbose) show_alpha_values(a2);
|
if(verbose) show_alpha_values(a2);
|
||||||
|
|
@ -193,10 +193,10 @@ _test_cls_alpha_shape_3()
|
||||||
Alpha_iterator previous = opt; --previous;
|
Alpha_iterator previous = opt; --previous;
|
||||||
if(verbose) {
|
if(verbose) {
|
||||||
std::cerr << " optimal de 1 " << *opt
|
std::cerr << " optimal de 1 " << *opt
|
||||||
<< "nb of componants " << a1.number_of_solid_components(*opt)
|
<< "nb of components " << a1.number_of_solid_components(*opt)
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
std::cerr << " previous " << *previous
|
std::cerr << " previous " << *previous
|
||||||
<< "nb of componants "
|
<< "nb of components "
|
||||||
<< a1.number_of_solid_components(*previous) << std::endl;
|
<< a1.number_of_solid_components(*previous) << std::endl;
|
||||||
}
|
}
|
||||||
assert (a1.number_of_solid_components(*opt) == 1);
|
assert (a1.number_of_solid_components(*opt) == 1);
|
||||||
|
|
|
||||||
|
|
@ -332,7 +332,7 @@ and values of alpha smaller than the size of the holes.
|
||||||
Two-sided wrap.
|
Two-sided wrap.
|
||||||
(Left) Wrapping a Bunny in 2D, with decreasing values for alpha.
|
(Left) Wrapping a Bunny in 2D, with decreasing values for alpha.
|
||||||
(Right) Wrapping a defect-laden Bunny in 3D. The rightmost column depicts a clipped visualization
|
(Right) Wrapping a defect-laden Bunny in 3D. The rightmost column depicts a clipped visualization
|
||||||
of the inside. When alpha is small enough with respect the diamater of the holes, the algorithm generates a two-sided wrap.
|
of the inside. When alpha is small enough with respect the diameter of the holes, the algorithm generates a two-sided wrap.
|
||||||
\cgalFigureCaptionEnd
|
\cgalFigureCaptionEnd
|
||||||
|
|
||||||
\section aw3_performance Performance
|
\section aw3_performance Performance
|
||||||
|
|
|
||||||
|
|
@ -192,7 +192,7 @@ public:
|
||||||
m_queue(4096)
|
m_queue(4096)
|
||||||
{
|
{
|
||||||
// Due to the Steiner point computation being a dichotomy, the algorithm is inherently inexact
|
// Due to the Steiner point computation being a dichotomy, the algorithm is inherently inexact
|
||||||
// and passing exact kernels is explicitely disabled to ensure no misunderstanding.
|
// and passing exact kernels is explicitly disabled to ensure no misunderstanding.
|
||||||
CGAL_static_assertion((std::is_floating_point<FT>::value));
|
CGAL_static_assertion((std::is_floating_point<FT>::value));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -944,7 +944,7 @@ private:
|
||||||
return IRRELEVANT;
|
return IRRELEVANT;
|
||||||
}
|
}
|
||||||
|
|
||||||
// push if facet is connected to artifical vertices
|
// push if facet is connected to artificial vertices
|
||||||
for(int i=0; i<3; ++i)
|
for(int i=0; i<3; ++i)
|
||||||
{
|
{
|
||||||
const Vertex_handle vh = ch->vertex(Dt::vertex_triple_index(id, i));
|
const Vertex_handle vh = ch->vertex(Dt::vertex_triple_index(id, i));
|
||||||
|
|
@ -1049,7 +1049,7 @@ private:
|
||||||
check_queue_sanity();
|
check_queue_sanity();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// const& to something that will be poped, but safe as `ch` && `id` are extracted before the pop
|
// const& to something that will be popped, but safe as `ch` && `id` are extracted before the pop
|
||||||
const Gate& gate = m_queue.top();
|
const Gate& gate = m_queue.top();
|
||||||
const Facet& f = gate.facet();
|
const Facet& f = gate.facet();
|
||||||
CGAL_precondition(!m_dt.is_infinite(f));
|
CGAL_precondition(!m_dt.is_infinite(f));
|
||||||
|
|
|
||||||
|
|
@ -167,7 +167,7 @@ struct AABB_tree_splitter_traits
|
||||||
// The input face ID serves when traversing the tree, to avoid doing the same intersection()
|
// The input face ID serves when traversing the tree, to avoid doing the same intersection()
|
||||||
// on the same datum seen from different primitives.
|
// on the same datum seen from different primitives.
|
||||||
//
|
//
|
||||||
// Technically, FPM could type-erase the mesh and the VPM, as it currently forces all independant
|
// Technically, FPM could type-erase the mesh and the VPM, as it currently forces all independent
|
||||||
// inputs to have the same types. This is not such much of an issue for the mesh type,
|
// inputs to have the same types. This is not such much of an issue for the mesh type,
|
||||||
// but it can be annoying for the VPM type.
|
// but it can be annoying for the VPM type.
|
||||||
using ID = std::pair<std::size_t /*primitive ID*/, std::size_t /*input face ID*/>;
|
using ID = std::pair<std::size_t /*primitive ID*/, std::size_t /*input face ID*/>;
|
||||||
|
|
|
||||||
|
|
@ -1960,7 +1960,7 @@ template<class Gt, class Agds, class LTag>
|
||||||
void
|
void
|
||||||
Apollonius_graph_2<Gt,Agds,LTag>::file_output(std::ostream& os) const
|
Apollonius_graph_2<Gt,Agds,LTag>::file_output(std::ostream& os) const
|
||||||
{
|
{
|
||||||
// ouput to a file
|
// output to a file
|
||||||
size_type n = this->_tds.number_of_vertices();
|
size_type n = this->_tds.number_of_vertices();
|
||||||
size_type m = this->_tds.number_of_full_dim_faces();
|
size_type m = this->_tds.number_of_full_dim_faces();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -54,7 +54,7 @@ Apollonius_graph_hierarchy_2
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//Assignement
|
//Assignment
|
||||||
template<class Gt, class Agds, class LTag>
|
template<class Gt, class Agds, class LTag>
|
||||||
Apollonius_graph_hierarchy_2<Gt,Agds,LTag> &
|
Apollonius_graph_hierarchy_2<Gt,Agds,LTag> &
|
||||||
Apollonius_graph_hierarchy_2<Gt,Agds,LTag>::
|
Apollonius_graph_hierarchy_2<Gt,Agds,LTag>::
|
||||||
|
|
|
||||||
|
|
@ -268,7 +268,7 @@ private:
|
||||||
{
|
{
|
||||||
// NOTE:***************************************
|
// NOTE:***************************************
|
||||||
// * the perturb boolean variable is not used
|
// * the perturb boolean variable is not used
|
||||||
// * for consistancy with Menelaos
|
// * for consistency with Menelaos
|
||||||
// NOTE:***************************************
|
// NOTE:***************************************
|
||||||
RT x2 = p2.x() - p1.x();
|
RT x2 = p2.x() - p1.x();
|
||||||
RT y2 = p2.y() - p1.y();
|
RT y2 = p2.y() - p1.y();
|
||||||
|
|
@ -298,10 +298,10 @@ private:
|
||||||
if ( is_indeterminate(s_xw2q) ) { return s_xw2q; }
|
if ( is_indeterminate(s_xw2q) ) { return s_xw2q; }
|
||||||
power_test = o12 * s_xw2q;
|
power_test = o12 * s_xw2q;
|
||||||
|
|
||||||
// this results is consistant with Menelaos
|
// this results is consistent with Menelaos
|
||||||
if (power_test != ZERO) { return -power_test; }
|
if (power_test != ZERO) { return -power_test; }
|
||||||
|
|
||||||
// this result is consistant with the perturb on off idea
|
// this result is consistent with the perturb on off idea
|
||||||
//if (power_test != ZERO || ! perturb) return -power_test;
|
//if (power_test != ZERO || ! perturb) return -power_test;
|
||||||
|
|
||||||
o1q = CGAL::sign(xq);
|
o1q = CGAL::sign(xq);
|
||||||
|
|
@ -313,10 +313,10 @@ private:
|
||||||
if ( is_indeterminate(s_yw2q) ) { return s_yw2q; }
|
if ( is_indeterminate(s_yw2q) ) { return s_yw2q; }
|
||||||
power_test = o12 * s_yw2q;
|
power_test = o12 * s_yw2q;
|
||||||
|
|
||||||
// this results is consistant with Menelaos
|
// this results is consistent with Menelaos
|
||||||
if (power_test != ZERO) { return -power_test; }
|
if (power_test != ZERO) { return -power_test; }
|
||||||
|
|
||||||
// this result is consistant with the perturb on off idea
|
// this result is consistent with the perturb on off idea
|
||||||
//if (power_test != ZERO || ! perturb) return -power_test;
|
//if (power_test != ZERO || ! perturb) return -power_test;
|
||||||
|
|
||||||
o1q = CGAL::sign(yq);
|
o1q = CGAL::sign(yq);
|
||||||
|
|
@ -348,11 +348,11 @@ private:
|
||||||
- CGAL::square(xy2q));
|
- CGAL::square(xy2q));
|
||||||
if ( is_indeterminate(radInt) ) { return radInt; }
|
if ( is_indeterminate(radInt) ) { return radInt; }
|
||||||
|
|
||||||
// radical intersection degerate
|
// radical intersection degenerate
|
||||||
if (radInt == ZERO) {
|
if (radInt == ZERO) {
|
||||||
CGAL_assertion (radSide != ZERO);
|
CGAL_assertion (radSide != ZERO);
|
||||||
|
|
||||||
// this result is consistant with the perturb on off idea
|
// this result is consistent with the perturb on off idea
|
||||||
//if (! perturb) return (radSide == orient) ? ZERO : orient;
|
//if (! perturb) return (radSide == orient) ? ZERO : orient;
|
||||||
|
|
||||||
RT rs2q1 = (p2.x() - q.x()) * xw2q + (p2.y() - q.y()) * yw2q;
|
RT rs2q1 = (p2.x() - q.x()) * xw2q + (p2.y() - q.y()) * yw2q;
|
||||||
|
|
|
||||||
|
|
@ -879,7 +879,7 @@ bool test_algo(InputStream& is)
|
||||||
// Patch for the Microsoft compiler so that it does not produce the
|
// Patch for the Microsoft compiler so that it does not produce the
|
||||||
// nasty warning about decorated name length
|
// nasty warning about decorated name length
|
||||||
// Basically what I do here is create typedefs for the default
|
// Basically what I do here is create typedefs for the default
|
||||||
// template paramaters so as to give them shorter names
|
// template parameters so as to give them shorter names
|
||||||
typedef Apollonius_graph_vertex_base_2<Traits,true> Vb;
|
typedef Apollonius_graph_vertex_base_2<Traits,true> Vb;
|
||||||
typedef Triangulation_face_base_2<Traits> Fb;
|
typedef Triangulation_face_base_2<Traits> Fb;
|
||||||
typedef Triangulation_data_structure_2<Vb,Fb> Agds;
|
typedef Triangulation_data_structure_2<Vb,Fb> Agds;
|
||||||
|
|
@ -904,7 +904,7 @@ bool test_hierarchy_algo(InputStream& is)
|
||||||
// Patch for the Microsoft compiler so that it does not produce the
|
// Patch for the Microsoft compiler so that it does not produce the
|
||||||
// nasty warning about decorated name length
|
// nasty warning about decorated name length
|
||||||
// Basically what I do here is create typedefs for the default
|
// Basically what I do here is create typedefs for the default
|
||||||
// template paramaters so as to give them shorter names
|
// template parameters so as to give them shorter names
|
||||||
typedef Apollonius_graph_vertex_base_2<Traits,true> Vb;
|
typedef Apollonius_graph_vertex_base_2<Traits,true> Vb;
|
||||||
typedef Apollonius_graph_hierarchy_vertex_base_2<Vb> HVb;
|
typedef Apollonius_graph_hierarchy_vertex_base_2<Vb> HVb;
|
||||||
typedef Triangulation_face_base_2<Traits> Fb;
|
typedef Triangulation_face_base_2<Traits> Fb;
|
||||||
|
|
@ -934,7 +934,7 @@ bool test_filtered_traits_algo(InputStream& is)
|
||||||
// Patch for the Microsoft compiler so that it does not produce the
|
// Patch for the Microsoft compiler so that it does not produce the
|
||||||
// nasty warning about decorated name length
|
// nasty warning about decorated name length
|
||||||
// Basically what I do here is create typedefs for the default
|
// Basically what I do here is create typedefs for the default
|
||||||
// template paramaters so as to give them shorter names
|
// template parameters so as to give them shorter names
|
||||||
typedef Apollonius_graph_vertex_base_2<Traits,true> Vb;
|
typedef Apollonius_graph_vertex_base_2<Traits,true> Vb;
|
||||||
typedef Triangulation_face_base_2<Traits> Fb;
|
typedef Triangulation_face_base_2<Traits> Fb;
|
||||||
typedef Triangulation_data_structure_2<Vb,Fb> Agds;
|
typedef Triangulation_data_structure_2<Vb,Fb> Agds;
|
||||||
|
|
@ -961,7 +961,7 @@ bool test_filtered_traits_hierarchy_algo(InputStream& is)
|
||||||
// Patch for the Microsoft compiler so that it does not produce the
|
// Patch for the Microsoft compiler so that it does not produce the
|
||||||
// nasty warning about decorated name length
|
// nasty warning about decorated name length
|
||||||
// Basically what I do here is create typedefs for the default
|
// Basically what I do here is create typedefs for the default
|
||||||
// template paramaters so as to give them shorter names
|
// template parameters so as to give them shorter names
|
||||||
typedef Apollonius_graph_vertex_base_2<Traits,true> Vb;
|
typedef Apollonius_graph_vertex_base_2<Traits,true> Vb;
|
||||||
typedef Apollonius_graph_hierarchy_vertex_base_2<Vb> HVb;
|
typedef Apollonius_graph_hierarchy_vertex_base_2<Vb> HVb;
|
||||||
typedef Triangulation_face_base_2<Traits> Fb;
|
typedef Triangulation_face_base_2<Traits> Fb;
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,7 @@ class CORE_arithmetic_kernel : public internal::Arithmetic_kernel_base {
|
||||||
public:
|
public:
|
||||||
//! exact integers
|
//! exact integers
|
||||||
typedef CORE::BigInt Integer;
|
typedef CORE::BigInt Integer;
|
||||||
//! exact float nummber
|
//! exact float number
|
||||||
typedef CORE::BigRat Exact_float_number;
|
typedef CORE::BigRat Exact_float_number;
|
||||||
//! exact rationals, constructible from integers
|
//! exact rationals, constructible from integers
|
||||||
typedef CORE::BigRat Rational;
|
typedef CORE::BigRat Rational;
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
An Arithmetic_kernel is required to provide at least the following public types:
|
An Arithmetic_kernel is required to provide at least the following public types:
|
||||||
Integer, Rational, Bigfloat_interval. It is guranteed that these types are interoperable. Currently there are:
|
Integer, Rational, Bigfloat_interval. It is guaranteed that these types are interoperable. Currently there are:
|
||||||
Gmp_arithmetic_kernel
|
Gmp_arithmetic_kernel
|
||||||
CORE_arithmetic_kernel
|
CORE_arithmetic_kernel
|
||||||
LEDA_arithmetic_kernel
|
LEDA_arithmetic_kernel
|
||||||
|
|
||||||
Moreover, the package provides a class template Get_arithmetic_kernel<T>. This cclass provides the corresponding Arithmetic_kernel for T. Note that T may also be a non trivial type such as Sqrt_extension, Polynomial etc.
|
Moreover, the package provides a class template Get_arithmetic_kernel<T>. This class provides the corresponding Arithmetic_kernel for T. Note that T may also be a non trivial type such as Sqrt_extension, Polynomial etc.
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ project(Arithmetic_kernel_Tests)
|
||||||
|
|
||||||
find_package(CGAL REQUIRED COMPONENTS Core)
|
find_package(CGAL REQUIRED COMPONENTS Core)
|
||||||
|
|
||||||
find_package(GMP QUIET)
|
find_package(GMP)
|
||||||
|
|
||||||
if(GMP_FOUND)
|
if(GMP_FOUND)
|
||||||
|
|
||||||
|
|
@ -18,7 +18,7 @@ if(GMP_FOUND)
|
||||||
|
|
||||||
include_directories(include)
|
include_directories(include)
|
||||||
|
|
||||||
find_package(MPFI)
|
find_package(MPFI QUIET)
|
||||||
|
|
||||||
if(MPFI_FOUND)
|
if(MPFI_FOUND)
|
||||||
include(${MPFI_USE_FILE})
|
include(${MPFI_USE_FILE})
|
||||||
|
|
@ -27,16 +27,13 @@ if(GMP_FOUND)
|
||||||
# version needs GMP>=4.2, so we require this dependency only here and
|
# version needs GMP>=4.2, so we require this dependency only here and
|
||||||
# not in FindMPFI.cmake
|
# not in FindMPFI.cmake
|
||||||
if(_IS_GMP_VERSION_TO_LOW)
|
if(_IS_GMP_VERSION_TO_LOW)
|
||||||
message(
|
message(STATUS "NOTICE: MPFI tests need GMP>=4.2, some of the tests will not be compiled")
|
||||||
STATUS
|
|
||||||
"MPFI tests need GMP>=4.2, some of the tests will not be compiled")
|
|
||||||
else(_IS_GMP_VERSION_TO_LOW)
|
else(_IS_GMP_VERSION_TO_LOW)
|
||||||
include(${MPFI_USE_FILE})
|
include(${MPFI_USE_FILE})
|
||||||
create_single_source_cgal_program("GMP_arithmetic_kernel.cpp")
|
create_single_source_cgal_program("GMP_arithmetic_kernel.cpp")
|
||||||
endif(_IS_GMP_VERSION_TO_LOW)
|
endif(_IS_GMP_VERSION_TO_LOW)
|
||||||
else(MPFI_FOUND)
|
else(MPFI_FOUND)
|
||||||
message(
|
message(STATUS "NOTICE: MPFI is not present, some of the tests will not be compiled.")
|
||||||
STATUS "MPFI is not present, some of the tests will not be compiled.")
|
|
||||||
endif(MPFI_FOUND)
|
endif(MPFI_FOUND)
|
||||||
|
|
||||||
create_single_source_cgal_program("Arithmetic_kernel.cpp")
|
create_single_source_cgal_program("Arithmetic_kernel.cpp")
|
||||||
|
|
@ -46,7 +43,6 @@ if(GMP_FOUND)
|
||||||
|
|
||||||
else()
|
else()
|
||||||
|
|
||||||
message(
|
message("NOTICE: This project requires GMP support, and will not be compiled.")
|
||||||
STATUS "This program requires the CGAL library, and will not be compiled.")
|
|
||||||
|
|
||||||
endif()
|
endif()
|
||||||
|
|
|
||||||
|
|
@ -69,7 +69,7 @@ public:
|
||||||
/*! Is a conivs arc currently being processed? */
|
/*! Is a conivs arc currently being processed? */
|
||||||
bool m_processing_arc;
|
bool m_processing_arc;
|
||||||
|
|
||||||
/*! A place holder to store the undelying conic of a conic arc */
|
/*! A place holder to store the underlying conic of a conic arc */
|
||||||
Curve_2 m_conic;
|
Curve_2 m_conic;
|
||||||
|
|
||||||
/*! Last orientation */
|
/*! Last orientation */
|
||||||
|
|
@ -263,7 +263,7 @@ public:
|
||||||
/*! Read the conic curves or arcs of conic curves from the input file
|
/*! Read the conic curves or arcs of conic curves from the input file
|
||||||
* \param filename the name of the input file
|
* \param filename the name of the input file
|
||||||
* \param curves_out the iterator of the container of the read curves
|
* \param curves_out the iterator of the container of the read curves
|
||||||
* \param bbox the counding box of the read curves
|
* \param bbox the bounding box of the read curves
|
||||||
*/
|
*/
|
||||||
template<class OutputIterator>
|
template<class OutputIterator>
|
||||||
int read_data(const char * filename, OutputIterator curves_out,
|
int read_data(const char * filename, OutputIterator curves_out,
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@ public:
|
||||||
return(*this);
|
return(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Arithmetic opertors.
|
// Arithmetic operators.
|
||||||
Double operator+(const Double & x) const { return Double(val + x.val); }
|
Double operator+(const Double & x) const { return Double(val + x.val); }
|
||||||
|
|
||||||
Double operator-(const Double & x) const { return Double(val - x.val); }
|
Double operator-(const Double & x) const { return Double(val - x.val); }
|
||||||
|
|
@ -48,7 +48,7 @@ public:
|
||||||
// Unary minus.
|
// Unary minus.
|
||||||
Double operator-() const { return Double(-val); }
|
Double operator-() const { return Double(-val); }
|
||||||
|
|
||||||
// Arithmetic opertors and assignment.
|
// Arithmetic operators and assignment.
|
||||||
void operator+=(const Double & x) { val += x.val; }
|
void operator+=(const Double & x) { val += x.val; }
|
||||||
|
|
||||||
void operator-=(const Double & x) { val -= x.val; }
|
void operator-=(const Double & x) { val -= x.val; }
|
||||||
|
|
|
||||||
|
|
@ -86,7 +86,7 @@ public:
|
||||||
std::cout << "Duplicate point: " << point << std::endl;
|
std::cout << "Duplicate point: " << point << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Parse a generic Homogenuous point */
|
/*! Parse a generic Homogeneous point */
|
||||||
virtual void accept_point_2( std::string x, std::string y, std::string w)
|
virtual void accept_point_2( std::string x, std::string y, std::string w)
|
||||||
{
|
{
|
||||||
typedef typename Number_type_traits<Rat_number_type>::FT FT;
|
typedef typename Number_type_traits<Rat_number_type>::FT FT;
|
||||||
|
|
|
||||||
|
|
@ -92,7 +92,7 @@ public:
|
||||||
/*! Read the segments from the input file
|
/*! Read the segments from the input file
|
||||||
* \param filename the name of the input file
|
* \param filename the name of the input file
|
||||||
* \param curves_out the iterator of the container of the read curves
|
* \param curves_out the iterator of the container of the read curves
|
||||||
* \param bbox the counding box of the read curves
|
* \param bbox the bounding box of the read curves
|
||||||
*/
|
*/
|
||||||
template<class OutputIterator>
|
template<class OutputIterator>
|
||||||
int read_data(const char * filename, OutputIterator curves_out,
|
int read_data(const char * filename, OutputIterator curves_out,
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ public:
|
||||||
typedef typename Traits::Point_2 Point_2;
|
typedef typename Traits::Point_2 Point_2;
|
||||||
typedef typename Traits::Curve_2 Curve_2;
|
typedef typename Traits::Curve_2 Curve_2;
|
||||||
|
|
||||||
/*! A visitor of the parser that reads segements */
|
/*! A visitor of the parser that reads segments */
|
||||||
template <class OutputIterator>
|
template <class OutputIterator>
|
||||||
class Segment_parser_visitor :
|
class Segment_parser_visitor :
|
||||||
public Point_parser_visitor<Kernel, Point_2, Number_type> {
|
public Point_parser_visitor<Kernel, Point_2, Number_type> {
|
||||||
|
|
@ -71,7 +71,7 @@ public:
|
||||||
/*! Read the segments from the input file
|
/*! Read the segments from the input file
|
||||||
* \param filename the name of the input file
|
* \param filename the name of the input file
|
||||||
* \param curves_out the iterator of the container of the read curves
|
* \param curves_out the iterator of the container of the read curves
|
||||||
* \param bbox the counding box of the read curves
|
* \param bbox the bounding box of the read curves
|
||||||
*/
|
*/
|
||||||
template<class OutputIterator>
|
template<class OutputIterator>
|
||||||
int read_data(const char * filename, OutputIterator curves_out,
|
int read_data(const char * filename, OutputIterator curves_out,
|
||||||
|
|
|
||||||
|
|
@ -590,7 +590,7 @@ void run_bench(Bench_inst & bench_inst, Benchable & benchable,
|
||||||
if (samples > 0) bench_inst.set_samples(samples);
|
if (samples > 0) bench_inst.set_samples(samples);
|
||||||
else if (iterations > 0) bench_inst.set_iterations(iterations);
|
else if (iterations > 0) bench_inst.set_iterations(iterations);
|
||||||
|
|
||||||
//opertor () in the Bench - does all the work !
|
//operator () in the Bench - does all the work !
|
||||||
bench_inst();
|
bench_inst();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -648,7 +648,7 @@ int main(int argc, char * argv[])
|
||||||
std::cout << "strategy_mask = " << strategy_mask << std::endl;
|
std::cout << "strategy_mask = " << strategy_mask << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Construct Incrementaly (only if type_code == incremental)
|
// Construct Incrementally (only if type_code == incremental)
|
||||||
type_code = Option_parser::TYPE_INCREMENT;
|
type_code = Option_parser::TYPE_INCREMENT;
|
||||||
if (type_mask & (0x1 << type_code)) {
|
if (type_mask & (0x1 << type_code)) {
|
||||||
if (verbose_level > 0) std::cout << "TYPE_INCREMENT " << std::endl;
|
if (verbose_level > 0) std::cout << "TYPE_INCREMENT " << std::endl;
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
#ifndef LEXICAL_CAST_HPP
|
#ifndef LEXICAL_CAST_HPP
|
||||||
#define LEXICAL_CAST_HPP
|
#define LEXICAL_CAST_HPP
|
||||||
|
|
||||||
/*! This files provides lexical casts from std::string to any one of the number
|
/*! This file provides lexical casts from std::string to any one of the number
|
||||||
* types we intend to use in the benchmark, and a lexical cast does not exist.
|
* types we intend to use in the benchmark, and a lexical cast does not exist.
|
||||||
* It is inspired by boost::lexical_cast
|
* It is inspired by boost::lexical_cast
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -191,7 +191,7 @@ void ArrangementGraphicsItem<Arr_>::paintWithFloodFill(
|
||||||
|
|
||||||
// paint bounded faces normally?
|
// paint bounded faces normally?
|
||||||
// by experimenting it's faster to just paint all using the flood algo
|
// by experimenting it's faster to just paint all using the flood algo
|
||||||
// specially with algebraic faces since currenlty all edges have to
|
// specially with algebraic faces since currently all edges have to
|
||||||
// be recalculated/rendered again for faces
|
// be recalculated/rendered again for faces
|
||||||
// this->paintFaces(&painter2);
|
// this->paintFaces(&painter2);
|
||||||
this->paintEdges(&painter2, traits);
|
this->paintEdges(&painter2, traits);
|
||||||
|
|
@ -588,7 +588,7 @@ void ArrangementGraphicsItem<Arr_>::paintFace(
|
||||||
|
|
||||||
Halfedge_handle he = cc;
|
Halfedge_handle he = cc;
|
||||||
X_monotone_curve_2 c = he->curve();
|
X_monotone_curve_2 c = he->curve();
|
||||||
// Get the co-ordinates of the curve's source and target.
|
// Get the coordinates of the curve's source and target.
|
||||||
double sx = CGAL::to_double(he->source()->point().x()),
|
double sx = CGAL::to_double(he->source()->point().x()),
|
||||||
sy = CGAL::to_double(he->source()->point().y()),
|
sy = CGAL::to_double(he->source()->point().y()),
|
||||||
tx = CGAL::to_double(he->target()->point().x()),
|
tx = CGAL::to_double(he->target()->point().x()),
|
||||||
|
|
@ -606,7 +606,7 @@ void ArrangementGraphicsItem<Arr_>::paintFace(
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// If the curve is monotone, than its source and its target has the
|
// If the curve is monotone, than its source and its target has the
|
||||||
// extreme x co-ordinates on this curve.
|
// extreme x coordinates on this curve.
|
||||||
bool is_source_left = (sx < tx);
|
bool is_source_left = (sx < tx);
|
||||||
int x_min = is_source_left ? coord_source_viewport.x()
|
int x_min = is_source_left ? coord_source_viewport.x()
|
||||||
: coord_target_viewport.x();
|
: coord_target_viewport.x();
|
||||||
|
|
|
||||||
|
|
@ -186,7 +186,7 @@ ArrangementPainterOstream<CGAL::Arr_conic_traits_2<
|
||||||
QGraphicsView* view = this->scene->views().first();
|
QGraphicsView* view = this->scene->views().first();
|
||||||
int xmin = view->mapFromScene(bb.xmin(), bb.ymin()).x();
|
int xmin = view->mapFromScene(bb.xmin(), bb.ymin()).x();
|
||||||
int xmax = view->mapFromScene(bb.xmax(), bb.ymin()).x();
|
int xmax = view->mapFromScene(bb.xmax(), bb.ymin()).x();
|
||||||
// can be negitive due to rotation trasnformation
|
// can be negative due to rotation transformation
|
||||||
size_t n = static_cast<size_t>(std::abs(xmax - xmin));
|
size_t n = static_cast<size_t>(std::abs(xmax - xmin));
|
||||||
if (n == 0) { return *this; }
|
if (n == 0) { return *this; }
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -12,10 +12,10 @@ if(POLICY CMP0071)
|
||||||
cmake_policy(SET CMP0071 NEW)
|
cmake_policy(SET CMP0071 NEW)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
find_package(CGAL QUIET COMPONENTS Qt5 OPTIONAL_COMPONENTS Core)
|
find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Core Qt5)
|
||||||
find_package(Qt5 QUIET COMPONENTS Gui Widgets)
|
find_package(Qt5 QUIET COMPONENTS Gui Widgets)
|
||||||
|
|
||||||
if (CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND)
|
if (CGAL_Qt5_FOUND AND Qt5_FOUND)
|
||||||
include(${CGAL_USE_FILE})
|
include(${CGAL_USE_FILE})
|
||||||
add_compile_definitions(QT_NO_KEYWORDS)
|
add_compile_definitions(QT_NO_KEYWORDS)
|
||||||
include_directories( BEFORE ./ )
|
include_directories( BEFORE ./ )
|
||||||
|
|
@ -110,10 +110,10 @@ if (CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND)
|
||||||
${CGAL_Qt5_RESOURCE_FILES}
|
${CGAL_Qt5_RESOURCE_FILES}
|
||||||
${CGAL_Qt5_MOC_FILES})
|
${CGAL_Qt5_MOC_FILES})
|
||||||
|
|
||||||
target_link_libraries(arrangement_2 Qt5::Core Qt5::Gui Qt5::Widgets)
|
target_link_libraries(arrangement_2 PRIVATE Qt5::Core Qt5::Gui Qt5::Widgets)
|
||||||
target_link_libraries(arrangement_2 CGAL::CGAL CGAL::CGAL_Qt5)
|
target_link_libraries(arrangement_2 PRIVATE CGAL::CGAL CGAL::CGAL_Qt5)
|
||||||
if(CGAL_Core_FOUND)
|
if(CGAL_Core_FOUND)
|
||||||
target_link_libraries(arrangement_2 CGAL::CGAL_Core)
|
target_link_libraries(arrangement_2 PRIVATE CGAL::CGAL_Core)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_to_cached_list(CGAL_EXECUTABLE_TARGETS arrangement_2)
|
add_to_cached_list(CGAL_EXECUTABLE_TARGETS arrangement_2)
|
||||||
|
|
@ -124,15 +124,11 @@ if (CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND)
|
||||||
else()
|
else()
|
||||||
set(MISSING_DEPS "")
|
set(MISSING_DEPS "")
|
||||||
|
|
||||||
if(NOT CGAL_FOUND)
|
|
||||||
set(MISSING_DEPS "CGAL, ${MISSING_DEPS}")
|
|
||||||
endif()
|
|
||||||
if(NOT CGAL_Qt5_FOUND)
|
if(NOT CGAL_Qt5_FOUND)
|
||||||
set(MISSING_DEPS "the CGAL Qt5 library, ${MISSING_DEPS}")
|
set(MISSING_DEPS "the CGAL Qt5 library, ${MISSING_DEPS}")
|
||||||
endif()
|
endif()
|
||||||
if(NOT Qt5_FOUND)
|
if(NOT Qt5_FOUND)
|
||||||
set(MISSING_DEPS "Qt5, ${MISSING_DEPS}")
|
set(MISSING_DEPS "Qt5, ${MISSING_DEPS}")
|
||||||
endif()
|
endif()
|
||||||
message(STATUS
|
message("NOTICE: This demo requires ${MISSING_DEPS} and will not be compiled.")
|
||||||
"NOTICE: This demo requires ${MISSING_DEPS} and will not be compiled.")
|
|
||||||
endif()
|
endif()
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@ class FloodFill
|
||||||
public:
|
public:
|
||||||
// this currently assumes that there is a "border" in the boundaries that
|
// this currently assumes that there is a "border" in the boundaries that
|
||||||
// will prevent the flood fill from going there
|
// will prevent the flood fill from going there
|
||||||
// this way we don't check bounadry conditions!
|
// this way we don't check boundary conditions!
|
||||||
void
|
void
|
||||||
operator()(QRgb* raw_img, uint16_t width, uint16_t x, uint16_t y, QRgb color);
|
operator()(QRgb* raw_img, uint16_t width, uint16_t x, uint16_t y, QRgb color);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ class QGraphicsView;
|
||||||
class GraphicsSceneMixin
|
class GraphicsSceneMixin
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
/*! Costructor */
|
/*! Constructor */
|
||||||
GraphicsSceneMixin(QGraphicsScene* scene_ = nullptr);
|
GraphicsSceneMixin(QGraphicsScene* scene_ = nullptr);
|
||||||
|
|
||||||
/*! Destructor (virtual) */
|
/*! Destructor (virtual) */
|
||||||
|
|
|
||||||
|
|
@ -93,7 +93,7 @@ double Compute_squared_distance_2<
|
||||||
CGAL::Arr_conic_traits_2<RatKernel, AlgKernel, NtTraits>>::
|
CGAL::Arr_conic_traits_2<RatKernel, AlgKernel, NtTraits>>::
|
||||||
operator()(const Point_2& p, const X_monotone_curve_2& c) const
|
operator()(const Point_2& p, const X_monotone_curve_2& c) const
|
||||||
{
|
{
|
||||||
// Get the co-ordinates of the curve's source and target.
|
// Get the coordinates of the curve's source and target.
|
||||||
// double sx = CGAL::to_double( c.source( ).x( ) );
|
// double sx = CGAL::to_double( c.source( ).x( ) );
|
||||||
// double sy = CGAL::to_double( c.source( ).y( ) );
|
// double sy = CGAL::to_double( c.source( ).y( ) );
|
||||||
// double tx = CGAL::to_double( c.target( ).x( ) );
|
// double tx = CGAL::to_double( c.target( ).x( ) );
|
||||||
|
|
@ -111,7 +111,7 @@ operator()(const Point_2& p, const X_monotone_curve_2& c) const
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// If the curve is monotone, than its source and its target has the
|
// If the curve is monotone, than its source and its target has the
|
||||||
// extreme x co-ordinates on this curve.
|
// extreme x coordinates on this curve.
|
||||||
// bool is_source_left = (sx < tx);
|
// bool is_source_left = (sx < tx);
|
||||||
// int x_min = is_source_left ? (*w).x_pixel(sx) : (*w).x_pixel(tx);
|
// int x_min = is_source_left ? (*w).x_pixel(sx) : (*w).x_pixel(tx);
|
||||||
// int x_max = is_source_left ? (*w).x_pixel(tx) : (*w).x_pixel(sx);
|
// int x_max = is_source_left ? (*w).x_pixel(tx) : (*w).x_pixel(sx);
|
||||||
|
|
|
||||||
|
|
@ -281,7 +281,7 @@ public:
|
||||||
double operator()(const Point_2& p, const X_monotone_curve_2& c) const;
|
double operator()(const Point_2& p, const X_monotone_curve_2& c) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
// chcek if arrangement is a model of the concept ArrangementOpenBoundaryTraits_2
|
// check if arrangement is a model of the concept ArrangementOpenBoundaryTraits_2
|
||||||
template <typename ArrTraits>
|
template <typename ArrTraits>
|
||||||
struct IsOpenBoundaryArrangement :
|
struct IsOpenBoundaryArrangement :
|
||||||
public CGAL::Boolean_tag<
|
public CGAL::Boolean_tag<
|
||||||
|
|
|
||||||
|
|
@ -203,7 +203,7 @@ bool move_isolated_vertex(Face_handle f1, Face_handle f2, Vertex_handle v);
|
||||||
/*! relocates all inner ccbs and isolated vertices to their proper position
|
/*! relocates all inner ccbs and isolated vertices to their proper position
|
||||||
* immediately after a face has split due to the insertion of a new halfedge,
|
* immediately after a face has split due to the insertion of a new halfedge,
|
||||||
* namely after `insert_at_vertices_ex()` was invoked and indicated that a new
|
* namely after `insert_at_vertices_ex()` was invoked and indicated that a new
|
||||||
* face has been created. `he` is the halfegde returned by
|
* face has been created. `he` is the halfedge returned by
|
||||||
* `insert_at_vertices_ex()`, such that `he->twin()->face` is the face that has
|
* `insert_at_vertices_ex()`, such that `he->twin()->face` is the face that has
|
||||||
* just been split and `he->face()` is the newly created face.
|
* just been split and `he->face()` is the newly created face.
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -376,7 +376,7 @@ public:
|
||||||
*/
|
*/
|
||||||
Point_2(const typename Alg_kernel::Point_2& p);
|
Point_2(const typename Alg_kernel::Point_2& p);
|
||||||
|
|
||||||
/*! constructs from homegeneous coordinates.
|
/*! constructs from homogeneous coordinates.
|
||||||
*/
|
*/
|
||||||
Point_2(const Algebraic& hx, const Algebraic& hy, const Algebraic& hz);
|
Point_2(const Algebraic& hx, const Algebraic& hy, const Algebraic& hz);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ namespace CGAL {
|
||||||
* We use the following parameterization of the unit sphere \f$S =
|
* We use the following parameterization of the unit sphere \f$S =
|
||||||
* \phi_S(\Phi)\f$: \f$\Phi = [\alpha, 2\pi + \alpha] \times [-\frac{\pi}{2},
|
* \phi_S(\Phi)\f$: \f$\Phi = [\alpha, 2\pi + \alpha] \times [-\frac{\pi}{2},
|
||||||
* \frac{\pi}{2}]\f$, \f$\phi_S(x, y) = (\cos y \cos x, \sin y \cos x, \sin
|
* \frac{\pi}{2}]\f$, \f$\phi_S(x, y) = (\cos y \cos x, \sin y \cos x, \sin
|
||||||
* x)\f$, where \f$\alpha = \arctan(X, Y)\f$. By deafult, \f$X = -1, Y = 0\f$,
|
* x)\f$, where \f$\alpha = \arctan(X, Y)\f$. By default, \f$X = -1, Y = 0\f$,
|
||||||
* which implies \f$\alpha = \pi\f$, and a default parameterization \f$\Phi =
|
* which implies \f$\alpha = \pi\f$, and a default parameterization \f$\Phi =
|
||||||
* [-\pi, \pi] \times [-\frac{\pi}{2}, \frac{\pi}{2}]\f$. The equator curve,
|
* [-\pi, \pi] \times [-\frac{\pi}{2}, \frac{\pi}{2}]\f$. The equator curve,
|
||||||
* for example, is given by \f$\gamma(t) = (\pi(2t - 1) + \alpha, 0)\f$, for
|
* for example, is given by \f$\gamma(t) = (\pi(2t - 1) + \alpha, 0)\f$, for
|
||||||
|
|
@ -365,7 +365,7 @@ namespace CGAL {
|
||||||
X_monotone_curve_2 operator()(const Point_2& p, const Point_2& q);
|
X_monotone_curve_2 operator()(const Point_2& p, const Point_2& q);
|
||||||
|
|
||||||
/*! Construct a full great circle from a normal to a plane.
|
/*! Construct a full great circle from a normal to a plane.
|
||||||
* Observe that the constrcted arc has one endpoint that lies on
|
* Observe that the constructed arc has one endpoint that lies on
|
||||||
* the identification curve. This point is considered both the source and
|
* the identification curve. This point is considered both the source and
|
||||||
* target (and also the left and right) point of the arc.
|
* target (and also the left and right) point of the arc.
|
||||||
* \param normal the normal to the plane containing the great circle.
|
* \param normal the normal to the plane containing the great circle.
|
||||||
|
|
|
||||||
|
|
@ -72,4 +72,4 @@ void overlay (const Arrangement_with_history_2<Traits,Dcel1>& arr1,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
} /* end namesapce CGAL */
|
} /* end namespace CGAL */
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ namespace CGAL {
|
||||||
* or line segments. We call such a compound curve a polycurve. A polycurve
|
* or line segments. We call such a compound curve a polycurve. A polycurve
|
||||||
* is a chain of subcurves, where each two neighboring subcurves in the chain
|
* is a chain of subcurves, where each two neighboring subcurves in the chain
|
||||||
* share a common endpoint; that is, the polycurve is continuous. Furthermore,
|
* share a common endpoint; that is, the polycurve is continuous. Furthermore,
|
||||||
* the target of the \f$i\f$th segement of a polycurve has to coincide with
|
* the target of the \f$i\f$th segment of a polycurve has to coincide with
|
||||||
* the source of the \f$i+1\f$st segment; that is, the polycurve has to be
|
* the source of the \f$i+1\f$st segment; that is, the polycurve has to be
|
||||||
* \a well-oriented. Note that it is possible to construct general polycurves
|
* \a well-oriented. Note that it is possible to construct general polycurves
|
||||||
* that are neither continuous nor well-oriented, as it is impossible to
|
* that are neither continuous nor well-oriented, as it is impossible to
|
||||||
|
|
@ -231,7 +231,7 @@ namespace CGAL {
|
||||||
public:
|
public:
|
||||||
/*! Obtain a trimmed version of the polycurve with src and tgt as end
|
/*! Obtain a trimmed version of the polycurve with src and tgt as end
|
||||||
* vertices.
|
* vertices.
|
||||||
* Src and tgt will be swaped if they do not conform to the direction of
|
* Src and tgt will be swapped if they do not conform to the direction of
|
||||||
* the polycurve.
|
* the polycurve.
|
||||||
*/
|
*/
|
||||||
X_monotone_curve_2 operator()(const X_monotone_curve_2& xcv,
|
X_monotone_curve_2 operator()(const X_monotone_curve_2& xcv,
|
||||||
|
|
@ -424,7 +424,7 @@ namespace CGAL {
|
||||||
/// @{
|
/// @{
|
||||||
|
|
||||||
/*! Append a subcurve to the polycurve at the back.
|
/*! Append a subcurve to the polycurve at the back.
|
||||||
* \a Warning: This function does not preform the precondition test
|
* \a Warning: This function does not perform the precondition test
|
||||||
* that the `Push_back_2` functor does. Thus, it is
|
* that the `Push_back_2` functor does. Thus, it is
|
||||||
* recommended to use the latter.
|
* recommended to use the latter.
|
||||||
* \param subcurve The new subcurve to be appended to the polycurve.
|
* \param subcurve The new subcurve to be appended to the polycurve.
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ namespace CGAL {
|
||||||
* curves, commonly referred to as polylines. Each polyline is a
|
* curves, commonly referred to as polylines. Each polyline is a
|
||||||
* chain of segments, where each two neighboring segments in the
|
* chain of segments, where each two neighboring segments in the
|
||||||
* chain share a common endpoint; that is, the polyline is
|
* chain share a common endpoint; that is, the polyline is
|
||||||
* continuous. Furthermore, the target of the \f$i\f$th segement of
|
* continuous. Furthermore, the target of the \f$i\f$th segment of
|
||||||
* a polyline has to coincide with the source of the \f$i+1\f$st
|
* a polyline has to coincide with the source of the \f$i+1\f$st
|
||||||
* segment; that is, the polyline has to be \a well-oriented. Note
|
* segment; that is, the polyline has to be \a well-oriented. Note
|
||||||
* that it is possible to construct general polylines that are
|
* that it is possible to construct general polylines that are
|
||||||
|
|
|
||||||
|
|
@ -8,9 +8,9 @@ namespace CGAL {
|
||||||
* The `Arr_triangulation_point_location` class template implements a
|
* The `Arr_triangulation_point_location` class template implements a
|
||||||
* point-location (and vertical ray-shooting) strategy that is based on
|
* point-location (and vertical ray-shooting) strategy that is based on
|
||||||
* triangulation. In particular, the algorithm uses a constrained triangulation,
|
* triangulation. In particular, the algorithm uses a constrained triangulation,
|
||||||
* provided by the 2D Triangulations package, as a search strcture. Every time
|
* provided by the 2D Triangulations package, as a search structure. Every time
|
||||||
* the arrangement is modified the constrained triangulation search-structure is
|
* the arrangement is modified the constrained triangulation search-structure is
|
||||||
* reconstructed from scrach, where the edges of the arrangement are set to be
|
* reconstructed from scratch, where the edges of the arrangement are set to be
|
||||||
* the constrained edges of the triangulation. This strategy is inefficient
|
* the constrained edges of the triangulation. This strategy is inefficient
|
||||||
* (especially when the number of modifications applied to the arrangement is
|
* (especially when the number of modifications applied to the arrangement is
|
||||||
* high) and provided only for educational purposes.
|
* high) and provided only for educational purposes.
|
||||||
|
|
|
||||||
|
|
@ -282,7 +282,7 @@ void insert_non_intersecting_curves(Arrangement_2<Traits,Dcel>& arr,
|
||||||
*
|
*
|
||||||
* Inserts a given point into a given arrangement. It uses a given
|
* Inserts a given point into a given arrangement. It uses a given
|
||||||
* point-location object to locate the given point in the given arrangement. If
|
* point-location object to locate the given point in the given arrangement. If
|
||||||
* the point conincides with an existing vertex, there is nothing left to do; if
|
* the point coincides with an existing vertex, there is nothing left to do; if
|
||||||
* it lies on an edge, the edge is split at the point. Otherwise, the point is
|
* it lies on an edge, the edge is split at the point. Otherwise, the point is
|
||||||
* contained inside a face, and is inserted as an isolated vertex inside this
|
* contained inside a face, and is inserted as an isolated vertex inside this
|
||||||
* face. By default, the function uses the "walk along line" point-location
|
* face. By default, the function uses the "walk along line" point-location
|
||||||
|
|
|
||||||
|
|
@ -1185,7 +1185,7 @@ void insert_non_intersecting_curves
|
||||||
*
|
*
|
||||||
* Inserts a given point into a given arrangement. It uses a given
|
* Inserts a given point into a given arrangement. It uses a given
|
||||||
* point-location object to locate the given point in the given arrangement. If
|
* point-location object to locate the given point in the given arrangement. If
|
||||||
* the point conincides with an existing vertex, there is nothing left to do; if
|
* the point coincides with an existing vertex, there is nothing left to do; if
|
||||||
* it lies on an edge, the edge is split at the point. Otherwise, the point is
|
* it lies on an edge, the edge is split at the point. Otherwise, the point is
|
||||||
* contained inside a face, and is inserted as an isolated vertex inside this
|
* contained inside a face, and is inserted as an isolated vertex inside this
|
||||||
* face. By default, the function uses the "walk along line" point-location
|
* face. By default, the function uses the "walk along line" point-location
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ public:
|
||||||
* enumeration `ce` that specifies either the minimum or the maximum end of
|
* enumeration `ce` that specifies either the minimum or the maximum end of
|
||||||
* the curve where the curve has a vertical asymptote, compares the \f$
|
* the curve where the curve has a vertical asymptote, compares the \f$
|
||||||
* x\f$-coordinate of `p` and the \f$x\f$-coordinate of the limit of the
|
* x\f$-coordinate of `p` and the \f$x\f$-coordinate of the limit of the
|
||||||
* curve at its specificed end. The variable `xcv` identifies the parametric
|
* curve at its specified end. The variable `xcv` identifies the parametric
|
||||||
* curve \f$c(t) = (x(t), y(t))\f$ defined over an open or half-open interval
|
* curve \f$c(t) = (x(t), y(t))\f$ defined over an open or half-open interval
|
||||||
* with endpoints \f$ 0\f$ and \f$ 1\f$. The enumeration `ce` identifies an
|
* with endpoints \f$ 0\f$ and \f$ 1\f$. The enumeration `ce` identifies an
|
||||||
* open end \f$d \in\{0,1\}\f$ of \f$c\f$. Formally, compares the \f$
|
* open end \f$d \in\{0,1\}\f$ of \f$c\f$. Formally, compares the \f$
|
||||||
|
|
@ -40,7 +40,7 @@ public:
|
||||||
/*! Given two \f$ x\f$-monotone curves `xcv1` and `xcv2` and two indices `ce1`
|
/*! Given two \f$ x\f$-monotone curves `xcv1` and `xcv2` and two indices `ce1`
|
||||||
* and `ce2` that specify either the minimum or the maximum ends of `xcv1` and
|
* and `ce2` that specify either the minimum or the maximum ends of `xcv1` and
|
||||||
* `xcv2`, respectively, where the curves have vertical asymptotes, compares the
|
* `xcv2`, respectively, where the curves have vertical asymptotes, compares the
|
||||||
* \f$ x\f$-coordinates of the limits of the curves at their specificed
|
* \f$ x\f$-coordinates of the limits of the curves at their specified
|
||||||
* ends. The variables `xcv1` and `xcv2` identify the parametric curves \f$
|
* ends. The variables `xcv1` and `xcv2` identify the parametric curves \f$
|
||||||
* c_1(t) = (x_1(t),y_1(t))\f$ and \f$ c_2(t) = (x_2(t),y_2(t))\f$,
|
* c_1(t) = (x_1(t),y_1(t))\f$ and \f$ c_2(t) = (x_2(t),y_2(t))\f$,
|
||||||
* respectively, defined over open or half-open intervals with endpoints \f$
|
* respectively, defined over open or half-open intervals with endpoints \f$
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ public:
|
||||||
/// @{
|
/// @{
|
||||||
|
|
||||||
/*! accepts two <I>mergeable</I> \f$ x\f$-monotone curves `xc1` and `xc2`
|
/*! accepts two <I>mergeable</I> \f$ x\f$-monotone curves `xc1` and `xc2`
|
||||||
* and asigns `xc` with the merged curve.
|
* and assigns `xc` with the merged curve.
|
||||||
*
|
*
|
||||||
* \pre `are_mergeable_2`(`xc1`, `xc2`) is true.
|
* \pre `are_mergeable_2`(`xc1`, `xc2`) is true.
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@
|
||||||
* (CCB). A face may be unbounded. Otherwise, it has one or more outer CCBs. A
|
* (CCB). A face may be unbounded. Otherwise, it has one or more outer CCBs. A
|
||||||
* face may also be bounded by inner CCBs, and it may contain isolated vertices
|
* face may also be bounded by inner CCBs, and it may contain isolated vertices
|
||||||
* in its interior. A planar face may have only one outer CCBs and its inner
|
* in its interior. A planar face may have only one outer CCBs and its inner
|
||||||
* CCBs are refered to as holes.
|
* CCBs are referred to as holes.
|
||||||
*
|
*
|
||||||
* \sa `ArrangementDcel`
|
* \sa `ArrangementDcel`
|
||||||
* \sa `ArrangementDcelVertex`
|
* \sa `ArrangementDcelVertex`
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,7 @@ typedef unspecified_type template <class T> rebind;
|
||||||
/// @{
|
/// @{
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
constructs an empty \dcel with one unbouned face.
|
constructs an empty \dcel with one unbounded face.
|
||||||
*/
|
*/
|
||||||
Arr_dcel();
|
Arr_dcel();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -131,7 +131,7 @@ void read_x_monotone_curve(X_monotone_curve_2& c);
|
||||||
/*! reads an auxiliary halfedge-data object and associates it with the halfedge
|
/*! reads an auxiliary halfedge-data object and associates it with the halfedge
|
||||||
* `he`.
|
* `he`.
|
||||||
*/
|
*/
|
||||||
void read_halfegde_data(Halfedge_handle he);
|
void read_halfedge_data(Halfedge_handle he);
|
||||||
|
|
||||||
/*! reads a message indicating the beginning of a single face record. */
|
/*! reads a message indicating the beginning of a single face record. */
|
||||||
void read_face_begin();
|
void read_face_begin();
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@
|
||||||
* `ArrangementBasicTraits_2`. The arrangement template instantiated with a
|
* `ArrangementBasicTraits_2`. The arrangement template instantiated with a
|
||||||
* traits class that models this concept can handle \f$ x\f$-monotone curves
|
* traits class that models this concept can handle \f$ x\f$-monotone curves
|
||||||
* that are unbounded in any direction. The concept
|
* that are unbounded in any direction. The concept
|
||||||
* `ArrangementOpenBoundaryTraits_2`, nontheless, also supports planar \f$
|
* `ArrangementOpenBoundaryTraits_2`, nonetheless, also supports planar \f$
|
||||||
* x\f$-monotone curves that reach the boundary of an open yet bounded parameter
|
* x\f$-monotone curves that reach the boundary of an open yet bounded parameter
|
||||||
* space.
|
* space.
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -124,7 +124,7 @@ void write_halfedge_index (std::size_t idx);
|
||||||
void write_x_monotone_curve (const X_monotone_curve_2& c);
|
void write_x_monotone_curve (const X_monotone_curve_2& c);
|
||||||
|
|
||||||
/*! writes the auxiliary data associated with the halfedge. */
|
/*! writes the auxiliary data associated with the halfedge. */
|
||||||
void write_halfegde_data (Halfedge_const_handle he);
|
void write_halfedge_data (Halfedge_const_handle he);
|
||||||
|
|
||||||
/*! writes a message indicating the beginning of a single face record. */
|
/*! writes a message indicating the beginning of a single face record. */
|
||||||
void write_face_begin();
|
void write_face_begin();
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@
|
||||||
* <li> `CGAL::Arr_bounded_planar_topology_traits_2`—can serve as a topology traits
|
* <li> `CGAL::Arr_bounded_planar_topology_traits_2`—can serve as a topology traits
|
||||||
* for an arrangement of planar unbounded curves.
|
* for an arrangement of planar unbounded curves.
|
||||||
* <li> `CGAL::Arr_unb_planar_topology_traits_2`—can serve as a topology traits
|
* <li> `CGAL::Arr_unb_planar_topology_traits_2`—can serve as a topology traits
|
||||||
* for an arrangement of arcs of great circles embeded on a sphere.
|
* for an arrangement of arcs of great circles embedded on a sphere.
|
||||||
* </ul>
|
* </ul>
|
||||||
*
|
*
|
||||||
* At this point we do not expose all the requirements of this concept.
|
* At this point we do not expose all the requirements of this concept.
|
||||||
|
|
@ -46,7 +46,7 @@ public:
|
||||||
/*! constructs default. */
|
/*! constructs default. */
|
||||||
Arr_topology_traits();
|
Arr_topology_traits();
|
||||||
|
|
||||||
/*! construcs from a geometry-traits object. */
|
/*! constructs from a geometry-traits object. */
|
||||||
Arr_topology_traits(const Geometry_traits_2* geometry_traits);
|
Arr_topology_traits(const Geometry_traits_2* geometry_traits);
|
||||||
|
|
||||||
/// @}
|
/// @}
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@ int main() {
|
||||||
|
|
||||||
// Insert a parabolic arc (C6) supported by the parabola y = -x^2 with
|
// Insert a parabolic arc (C6) supported by the parabola y = -x^2 with
|
||||||
// endpoints (-sqrt(3),-3) (~(-1.73,-3)) and (sqrt(2),-2) (~(1.41,-2)).
|
// endpoints (-sqrt(3),-3) (~(-1.73,-3)) and (sqrt(2),-2) (~(1.41,-2)).
|
||||||
// Since the x-coordinates of the endpoints cannot be acccurately represented,
|
// Since the x-coordinates of the endpoints cannot be accurately represented,
|
||||||
// we specify them as the intersections of the parabola with the lines
|
// we specify them as the intersections of the parabola with the lines
|
||||||
// y = -3 and y = -2, respectively. The arc is clockwise-oriented.
|
// y = -3 and y = -2, respectively. The arc is clockwise-oriented.
|
||||||
Conic_arc c6 =
|
Conic_arc c6 =
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@ int main() {
|
||||||
|
|
||||||
auto equal = traits.equal_2_object();
|
auto equal = traits.equal_2_object();
|
||||||
for (auto eit = arr.edges_begin(); eit != arr.edges_end(); ++eit) {
|
for (auto eit = arr.edges_begin(); eit != arr.edges_end(); ++eit) {
|
||||||
// Check whether the halfegde has the same direction as its segment.
|
// Check whether the halfedge has the same direction as its segment.
|
||||||
bool flag = equal(eit->source()->point(),eit->curve().source());
|
bool flag = equal(eit->source()->point(),eit->curve().source());
|
||||||
eit->set_data(flag);
|
eit->set_data(flag);
|
||||||
eit->twin()->set_data(!flag);
|
eit->twin()->set_data(!flag);
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,6 @@
|
||||||
// A face overlay of two arrangements with unbounded faces.
|
// A face overlay of two arrangements with unbounded faces.
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <boost/lexical_cast.hpp>
|
|
||||||
|
|
||||||
#include <CGAL/basic.h>
|
#include <CGAL/basic.h>
|
||||||
#include <CGAL/Arr_extended_dcel.h>
|
#include <CGAL/Arr_extended_dcel.h>
|
||||||
|
|
@ -11,10 +10,10 @@
|
||||||
|
|
||||||
#include "arr_linear.h"
|
#include "arr_linear.h"
|
||||||
|
|
||||||
// Define a functor for creating a label from a characer and an integer.
|
// Define a functor for creating a label from a character and an integer.
|
||||||
struct Overlay_label {
|
struct Overlay_label {
|
||||||
std::string operator()(char c, unsigned int i) const
|
std::string operator()(char c, unsigned int i) const
|
||||||
{ return c + boost::lexical_cast<std::string>(i); }
|
{ return c + std::to_string(i); }
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef CGAL::Arr_face_extended_dcel<Traits, char> Dcel_dlue;
|
typedef CGAL::Arr_face_extended_dcel<Traits, char> Dcel_dlue;
|
||||||
|
|
|
||||||
|
|
@ -103,12 +103,12 @@ int main() {
|
||||||
X_monotone_polycurve x_polycurve_1 =
|
X_monotone_polycurve x_polycurve_1 =
|
||||||
ctr_xcurve(x_curves.begin(), x_curves.end());
|
ctr_xcurve(x_curves.begin(), x_curves.end());
|
||||||
|
|
||||||
// Insert polycurves to Arangment and print.
|
// Insert polycurves to Arrangement and print.
|
||||||
Polycurve_circ_arc_arrangment polycurve_arrangment(&traits);
|
Polycurve_circ_arc_arrangment polycurve_arrangment(&traits);
|
||||||
insert(polycurve_arrangment, polycurve_1);
|
insert(polycurve_arrangment, polycurve_1);
|
||||||
insert(polycurve_arrangment, polycurve_2);
|
insert(polycurve_arrangment, polycurve_2);
|
||||||
insert(polycurve_arrangment, x_polycurve_1);
|
insert(polycurve_arrangment, x_polycurve_1);
|
||||||
std::cout << "Arrangment Statistics:\n";
|
std::cout << "Arrangement Statistics:\n";
|
||||||
print_arrangement(polycurve_arrangment);
|
print_arrangement(polycurve_arrangment);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
||||||
|
|
@ -108,7 +108,7 @@ int main() {
|
||||||
X_monotone_polycurve conic_x_mono_polycurve_2 =
|
X_monotone_polycurve conic_x_mono_polycurve_2 =
|
||||||
ctr_xpolycurve(xmono_conic_curves_2.begin(), xmono_conic_curves_2.end());
|
ctr_xpolycurve(xmono_conic_curves_2.begin(), xmono_conic_curves_2.end());
|
||||||
|
|
||||||
// Insert the Polycurves into arrangment and print.
|
// Insert the Polycurves into arrangement and print.
|
||||||
Polycurve_conic_arrangment x_pc_arrangment(&traits);
|
Polycurve_conic_arrangment x_pc_arrangment(&traits);
|
||||||
insert(x_pc_arrangment, conic_x_mono_polycurve_1);
|
insert(x_pc_arrangment, conic_x_mono_polycurve_1);
|
||||||
insert(x_pc_arrangment, conic_x_mono_polycurve_2);
|
insert(x_pc_arrangment, conic_x_mono_polycurve_2);
|
||||||
|
|
|
||||||
|
|
@ -138,7 +138,7 @@ public:
|
||||||
m_owner (false)
|
m_owner (false)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
/*! Assignmnet operator. */
|
/*! Assignment operator. */
|
||||||
Self& operator= (const Self& tr)
|
Self& operator= (const Self& tr)
|
||||||
{
|
{
|
||||||
if (this == &tr)
|
if (this == &tr)
|
||||||
|
|
@ -809,7 +809,7 @@ public:
|
||||||
m_traits.compare_y_at_x_2_object());
|
m_traits.compare_y_at_x_2_object());
|
||||||
CGAL_precondition_code(Equal_2 equal_2 = m_traits.equal_2_object());
|
CGAL_precondition_code(Equal_2 equal_2 = m_traits.equal_2_object());
|
||||||
Compare_x_2 compare_x_2 = m_traits.compare_x_2_object();
|
Compare_x_2 compare_x_2 = m_traits.compare_x_2_object();
|
||||||
// Check whether source and taget are two distinct points and they lie
|
// Check whether source and taeget are two distinct points and they lie
|
||||||
// on the line.
|
// on the line.
|
||||||
CGAL_precondition(compare_y_at_x_2(src, xcv) == EQUAL);
|
CGAL_precondition(compare_y_at_x_2(src, xcv) == EQUAL);
|
||||||
CGAL_precondition(compare_y_at_x_2(tgt, xcv) == EQUAL);
|
CGAL_precondition(compare_y_at_x_2(tgt, xcv) == EQUAL);
|
||||||
|
|
|
||||||
|
|
@ -430,7 +430,7 @@ public:
|
||||||
* Insert an x-monotone curve into the arrangement, such that one of its
|
* Insert an x-monotone curve into the arrangement, such that one of its
|
||||||
* endpoints corresponds to a given arrangement vertex, given the exact
|
* endpoints corresponds to a given arrangement vertex, given the exact
|
||||||
* place for the curve in the circular list around this vertex. The other
|
* place for the curve in the circular list around this vertex. The other
|
||||||
* endpoint corrsponds to a free vertex (a newly created vertex or an
|
* endpoint corresponds to a free vertex (a newly created vertex or an
|
||||||
* isolated vertex).
|
* isolated vertex).
|
||||||
* \param he_to The reference halfedge. We should represent cv as a pair
|
* \param he_to The reference halfedge. We should represent cv as a pair
|
||||||
* of edges, one of them should become he_to's successor.
|
* of edges, one of them should become he_to's successor.
|
||||||
|
|
@ -619,7 +619,7 @@ public:
|
||||||
/*!
|
/*!
|
||||||
* Split a given edge into two at a given point, and associate the given
|
* Split a given edge into two at a given point, and associate the given
|
||||||
* x-monotone curves with the split edges.
|
* x-monotone curves with the split edges.
|
||||||
* \param e The edge to split (one of the pair of twin halfegdes).
|
* \param e The edge to split (one of the pair of twin halfedges).
|
||||||
* \param p The split point.
|
* \param p The split point.
|
||||||
* \param cv1 The curve that should be associated with the first split edge,
|
* \param cv1 The curve that should be associated with the first split edge,
|
||||||
* whose source equals e's source and its target is p.
|
* whose source equals e's source and its target is p.
|
||||||
|
|
@ -641,7 +641,7 @@ public:
|
||||||
/*!
|
/*!
|
||||||
* Split a given edge into two at the given vertex, and associate the given
|
* Split a given edge into two at the given vertex, and associate the given
|
||||||
* x-monotone curves with the split edges.
|
* x-monotone curves with the split edges.
|
||||||
* \param e The edge to split (one of the pair of twin halfegdes).
|
* \param e The edge to split (one of the pair of twin halfedges).
|
||||||
* \param v The split vertex.
|
* \param v The split vertex.
|
||||||
* \param cv1 The curve that should be associated with the first split edge,
|
* \param cv1 The curve that should be associated with the first split edge,
|
||||||
* whose source equals e's source and its target is v's point.
|
* whose source equals e's source and its target is v's point.
|
||||||
|
|
@ -663,7 +663,7 @@ public:
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* Split a fictitious edge at the given vertex.
|
* Split a fictitious edge at the given vertex.
|
||||||
* \param e The edge to split (one of the pair of twin halfegdes).
|
* \param e The edge to split (one of the pair of twin halfedges).
|
||||||
* \param v The split vertex.
|
* \param v The split vertex.
|
||||||
* \return A handle for the first split halfedge, whose source equals the
|
* \return A handle for the first split halfedge, whose source equals the
|
||||||
* source of e, and whose target is the split vertex v.
|
* source of e, and whose target is the split vertex v.
|
||||||
|
|
@ -792,7 +792,7 @@ public:
|
||||||
const Dcel& dcel() const { return (p_arr->_dcel()); }
|
const Dcel& dcel() const { return (p_arr->_dcel()); }
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* Clear the entire arrangment.
|
* Clear the entire arrangement.
|
||||||
*/
|
*/
|
||||||
void clear_all()
|
void clear_all()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue