mirror of https://github.com/CGAL/cgal
Merge branch 'master' into gsoc2022-EBVs-Mostafa-ashraf19
This commit is contained in:
commit
24a8004ee0
|
|
@ -0,0 +1,6 @@
|
||||||
|
version: 2
|
||||||
|
updates:
|
||||||
|
- package-ecosystem: "github-actions"
|
||||||
|
directory: "/"
|
||||||
|
schedule:
|
||||||
|
interval: "weekly"
|
||||||
|
|
@ -4,12 +4,19 @@ on:
|
||||||
issue_comment:
|
issue_comment:
|
||||||
types: [created]
|
types: [created]
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read # to fetch code (actions/checkout)
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read # to fetch code (actions/checkout)
|
||||||
|
pull-requests: write # to create comment
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/github-script@v3
|
- uses: actions/github-script@v6
|
||||||
id: get_round
|
id: get_round
|
||||||
with:
|
with:
|
||||||
result-encoding: string
|
result-encoding: string
|
||||||
|
|
@ -31,7 +38,7 @@ jobs:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return 'stop'
|
return 'stop'
|
||||||
- uses: actions/github-script@v3
|
- uses: actions/github-script@v6
|
||||||
if: steps.get_round.outputs.result != 'stop'
|
if: steps.get_round.outputs.result != 'stop'
|
||||||
id: get_pr_number
|
id: get_pr_number
|
||||||
with:
|
with:
|
||||||
|
|
@ -40,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
|
||||||
- uses: actions/checkout@v2
|
- 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:
|
||||||
|
|
@ -56,7 +63,7 @@ jobs:
|
||||||
set -x
|
set -x
|
||||||
sudo apt-get update && sudo apt-get install -y graphviz ssh bibtex2html
|
sudo apt-get update && sudo apt-get install -y graphviz ssh bibtex2html
|
||||||
sudo pip install lxml
|
sudo pip install lxml
|
||||||
sudo pip install 'pyquery==1.4.1' # it seems to be the last py2 compatible version
|
sudo pip install pyquery
|
||||||
wget --no-verbose -O doxygen_exe https://cgal.geometryfactory.com/~cgaltest/doxygen_1_8_13_patched/doxygen
|
wget --no-verbose -O doxygen_exe https://cgal.geometryfactory.com/~cgaltest/doxygen_1_8_13_patched/doxygen
|
||||||
sudo mv doxygen_exe /usr/bin/doxygen
|
sudo mv doxygen_exe /usr/bin/doxygen
|
||||||
sudo chmod +x /usr/bin/doxygen
|
sudo chmod +x /usr/bin/doxygen
|
||||||
|
|
@ -115,7 +122,7 @@ jobs:
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Post address
|
- name: Post address
|
||||||
uses: actions/github-script@v3
|
uses: actions/github-script@v6
|
||||||
if: ${{ success() && steps.get_round.outputs.result != 'stop' }}
|
if: ${{ success() && steps.get_round.outputs.result != 'stop' }}
|
||||||
with:
|
with:
|
||||||
script: |
|
script: |
|
||||||
|
|
@ -123,7 +130,7 @@ jobs:
|
||||||
const id = tmp_round.indexOf(":");
|
const id = tmp_round.indexOf(":");
|
||||||
const round = tmp_round.substring(0,id);
|
const round = tmp_round.substring(0,id);
|
||||||
const address = "The documentation is built. It will be available, after a few minutes, here: https://cgal.github.io/${{ steps.get_pr_number.outputs.result }}/"+round+"/Manual/index.html"
|
const address = "The documentation is built. It will be available, after a few minutes, here: https://cgal.github.io/${{ steps.get_pr_number.outputs.result }}/"+round+"/Manual/index.html"
|
||||||
github.issues.createComment({
|
github.rest.issues.createComment({
|
||||||
owner: "CGAL",
|
owner: "CGAL",
|
||||||
repo: "cgal",
|
repo: "cgal",
|
||||||
issue_number: ${{ github.event.issue.number }},
|
issue_number: ${{ github.event.issue.number }},
|
||||||
|
|
@ -131,13 +138,13 @@ jobs:
|
||||||
});
|
});
|
||||||
|
|
||||||
- name: Post error
|
- name: Post error
|
||||||
uses: actions/github-script@v3
|
uses: actions/github-script@v6
|
||||||
if: ${{ failure() && steps.get_round.outputs.result != 'stop' }}
|
if: ${{ failure() && steps.get_round.outputs.result != 'stop' }}
|
||||||
with:
|
with:
|
||||||
script: |
|
script: |
|
||||||
const error = "${{steps.build_and_run.outputs.DoxygenError}}"
|
const error = "${{steps.build_and_run.outputs.DoxygenError}}"
|
||||||
const msg = "There was an error while building the doc: \n"+error
|
const msg = "There was an error while building the doc: \n"+error
|
||||||
github.issues.createComment({
|
github.rest.issues.createComment({
|
||||||
owner: "CGAL",
|
owner: "CGAL",
|
||||||
repo: "cgal",
|
repo: "cgal",
|
||||||
issue_number: ${{ github.event.issue.number }},
|
issue_number: ${{ github.event.issue.number }},
|
||||||
|
|
|
||||||
|
|
@ -2,13 +2,16 @@ name: CMake Test Merge Branch
|
||||||
|
|
||||||
on: [push, pull_request]
|
on: [push, pull_request]
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2.0.0
|
- uses: actions/checkout@v3
|
||||||
- name: install dependencies
|
- name: install dependencies
|
||||||
run: |
|
run: |
|
||||||
.github/install.sh
|
.github/install.sh
|
||||||
|
|
|
||||||
|
|
@ -2,13 +2,16 @@ name: CMake Testsuite
|
||||||
|
|
||||||
on: [push, pull_request]
|
on: [push, pull_request]
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
cmake-testsuite:
|
cmake-testsuite:
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2.0.0
|
- uses: actions/checkout@v3
|
||||||
- name: install dependencies
|
- name: install dependencies
|
||||||
run: sudo apt-get install -y libboost-dev libboost-program-options-dev libmpfr-dev libeigen3-dev
|
run: sudo apt-get install -y libboost-dev libboost-program-options-dev libmpfr-dev libeigen3-dev
|
||||||
- name: configure all
|
- name: configure all
|
||||||
|
|
@ -22,7 +25,7 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2.0.0
|
- uses: actions/checkout@v3
|
||||||
- name: install dependencies
|
- name: install dependencies
|
||||||
run: sudo bash -e .github/install.sh
|
run: sudo bash -e .github/install.sh
|
||||||
- name: configure all
|
- name: configure all
|
||||||
|
|
|
||||||
|
|
@ -3,19 +3,24 @@ name: Documentation Removal
|
||||||
on:
|
on:
|
||||||
pull_request_target:
|
pull_request_target:
|
||||||
types: [closed, removed]
|
types: [closed, removed]
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write # for Git to git push
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2.0.0
|
- uses: actions/checkout@v3
|
||||||
- name: delete directory
|
- name: delete directory
|
||||||
run: |
|
run: |
|
||||||
set -x
|
set -x
|
||||||
git config --global user.email "cgal@geometryfactory.com"
|
git config --global user.email "cgal@geometryfactory.com"
|
||||||
git config --global user.name "cgaltest"
|
git config --global user.name "cgaltest"
|
||||||
git clone https://maxGimeno:${{ secrets.PUSH_TO_CGAL_GITHUB_IO_TOKEN }}@github.com/CGAL/cgal.github.io.git --depth=5
|
git clone https://CGAL:${{ secrets.PUSH_TO_CGAL_GITHUB_IO_TOKEN }}@github.com/CGAL/cgal.github.io.git
|
||||||
PR_NUMBER=$(python -c "import json; import os; y = json.load(open(os.environ['GITHUB_EVENT_PATH'])); print(y[\"number\"])")
|
PR_NUMBER=$(python -c "import json; import os; y = json.load(open(os.environ['GITHUB_EVENT_PATH'])); print(y[\"number\"])")
|
||||||
cd cgal.github.io/
|
cd cgal.github.io/
|
||||||
egrep -v " ${PR_NUMBER}\." index.html > tmp.html || true
|
egrep -v " ${PR_NUMBER}\." index.html > tmp.html || true
|
||||||
|
|
|
||||||
|
|
@ -2,11 +2,14 @@ name: Test Polyhedron Demo
|
||||||
|
|
||||||
on: [push, pull_request]
|
on: [push, pull_request]
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
batch_1:
|
batch_1:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2.0.0
|
- uses: actions/checkout@v3
|
||||||
- name: install dependencies
|
- name: install dependencies
|
||||||
run: .github/install.sh
|
run: .github/install.sh
|
||||||
- name: run1
|
- name: run1
|
||||||
|
|
@ -14,7 +17,7 @@ jobs:
|
||||||
batch_2:
|
batch_2:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2.0.0
|
- uses: actions/checkout@v3
|
||||||
- name: install dependencies
|
- name: install dependencies
|
||||||
run: .github/install.sh
|
run: .github/install.sh
|
||||||
- name: run2
|
- name: run2
|
||||||
|
|
@ -22,7 +25,7 @@ jobs:
|
||||||
batch_3:
|
batch_3:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2.0.0
|
- uses: actions/checkout@v3
|
||||||
- name: install dependencies
|
- name: install dependencies
|
||||||
run: .github/install.sh
|
run: .github/install.sh
|
||||||
- name: run3
|
- name: run3
|
||||||
|
|
@ -30,7 +33,7 @@ jobs:
|
||||||
batch_4:
|
batch_4:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2.0.0
|
- uses: actions/checkout@v3
|
||||||
- name: install dependencies
|
- name: install dependencies
|
||||||
run: .github/install.sh
|
run: .github/install.sh
|
||||||
- name: run4
|
- name: run4
|
||||||
|
|
|
||||||
|
|
@ -4,12 +4,16 @@ on:
|
||||||
issue_comment:
|
issue_comment:
|
||||||
types: [created]
|
types: [created]
|
||||||
|
|
||||||
|
permissions: {}
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
permissions:
|
||||||
|
pull-requests: write # to create comment
|
||||||
|
|
||||||
if: (github.event.comment.user.login == 'sloriot' || github.event.comment.user.login == 'lrineau') && contains(github.event.comment.body, '/testme')
|
if: (github.event.comment.user.login == 'sloriot' || github.event.comment.user.login == 'lrineau') && contains(github.event.comment.body, '/testme')
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/github-script@v3
|
- uses: actions/github-script@v6
|
||||||
id: get_label
|
id: get_label
|
||||||
with:
|
with:
|
||||||
result-encoding: string
|
result-encoding: string
|
||||||
|
|
@ -58,7 +62,7 @@ jobs:
|
||||||
ssh ${HOST} "${PATH_TO_SCRIPT}/run_testsuite_from_branch_name.sh $USER_NAME $BRANCH_NAME $BASE $PR_NUMBER"
|
ssh ${HOST} "${PATH_TO_SCRIPT}/run_testsuite_from_branch_name.sh $USER_NAME $BRANCH_NAME $BASE $PR_NUMBER"
|
||||||
done
|
done
|
||||||
- name: Post address
|
- name: Post address
|
||||||
uses: actions/github-script@v3
|
uses: actions/github-script@v6
|
||||||
with:
|
with:
|
||||||
script: |
|
script: |
|
||||||
const address = "Testsuite launched. Results will appear on the following page: https://cgal.geometryfactory.com/~cgaltest/test_suite/TESTRESULTS/index.shtml "
|
const address = "Testsuite launched. Results will appear on the following page: https://cgal.geometryfactory.com/~cgaltest/test_suite/TESTRESULTS/index.shtml "
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@
|
||||||
/*/*/*/build
|
/*/*/*/build
|
||||||
/*/*/*/VC*
|
/*/*/*/VC*
|
||||||
/*/*/*/GCC
|
/*/*/*/GCC
|
||||||
|
.vscode
|
||||||
AABB_tree/demo/AABB_tree/AABB_demo
|
AABB_tree/demo/AABB_tree/AABB_demo
|
||||||
AABB_tree/demo/AABB_tree/Makefile
|
AABB_tree/demo/AABB_tree/Makefile
|
||||||
AABB_tree/examples/AABB_tree/*.kdev*
|
AABB_tree/examples/AABB_tree/*.kdev*
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@ public:
|
||||||
operator()(const Ray_3& r, const Primitive& primitive)`.
|
operator()(const Ray_3& r, const Primitive& primitive)`.
|
||||||
|
|
||||||
A common algorithm to compute the intersection between a bounding box and a ray is <A
|
A common algorithm to compute the intersection between a bounding box and a ray is <A
|
||||||
HREF="http://www.siggraph.org/education/materials/HyperGraph/raytrace/rtinter3.htm">the
|
HREF="https://education.siggraph.org/static/HyperGraph/raytrace/rtinter3.htm">the
|
||||||
slab method</A>.
|
slab method</A>.
|
||||||
*/
|
*/
|
||||||
typedef unspecified_type Intersection_distance;
|
typedef unspecified_type Intersection_distance;
|
||||||
|
|
|
||||||
|
|
@ -23,9 +23,8 @@
|
||||||
|
|
||||||
#include <iterator>
|
#include <iterator>
|
||||||
#include <boost/mpl/and.hpp>
|
#include <boost/mpl/and.hpp>
|
||||||
#include <CGAL/is_iterator.h>
|
#include <CGAL/type_traits/is_iterator.h>
|
||||||
#include <boost/type_traits/is_convertible.hpp>
|
#include <boost/type_traits/is_convertible.hpp>
|
||||||
#include <boost/utility/enable_if.hpp>
|
|
||||||
#include <boost/mpl/if.hpp>
|
#include <boost/mpl/if.hpp>
|
||||||
|
|
||||||
#include <CGAL/Default.h>
|
#include <CGAL/Default.h>
|
||||||
|
|
|
||||||
|
|
@ -26,8 +26,7 @@
|
||||||
#define CGAL_REPLACEMENT_HEADER "<CGAL/AABB_halfedge_graph_segment_primitive.h>"
|
#define CGAL_REPLACEMENT_HEADER "<CGAL/AABB_halfedge_graph_segment_primitive.h>"
|
||||||
#include <CGAL/Installation/internal/deprecation_warning.h>
|
#include <CGAL/Installation/internal/deprecation_warning.h>
|
||||||
|
|
||||||
#include <boost/utility/enable_if.hpp>
|
#include <type_traits>
|
||||||
#include <boost/type_traits/is_same.hpp>
|
|
||||||
|
|
||||||
namespace CGAL {
|
namespace CGAL {
|
||||||
|
|
||||||
|
|
@ -80,9 +79,9 @@ namespace CGAL {
|
||||||
: m_halfedge_handle(*ptr) { };
|
: m_halfedge_handle(*ptr) { };
|
||||||
template <class Iterator>
|
template <class Iterator>
|
||||||
AABB_polyhedron_segment_primitive( Iterator it,
|
AABB_polyhedron_segment_primitive( Iterator it,
|
||||||
typename boost::enable_if<
|
std::enable_if_t<
|
||||||
boost::is_same<Id,typename Iterator::value_type>
|
std::is_same<Id,typename Iterator::value_type>::value
|
||||||
>::type* =0
|
>* =0
|
||||||
) : m_halfedge_handle(*it) { }
|
) : m_halfedge_handle(*it) { }
|
||||||
|
|
||||||
AABB_polyhedron_segment_primitive(const Self& primitive)
|
AABB_polyhedron_segment_primitive(const Self& primitive)
|
||||||
|
|
|
||||||
|
|
@ -22,8 +22,7 @@
|
||||||
#define CGAL_REPLACEMENT_HEADER "<CGAL/AABB_face_graph_triangle_primitive.h>"
|
#define CGAL_REPLACEMENT_HEADER "<CGAL/AABB_face_graph_triangle_primitive.h>"
|
||||||
#include <CGAL/Installation/internal/deprecation_warning.h>
|
#include <CGAL/Installation/internal/deprecation_warning.h>
|
||||||
|
|
||||||
#include <boost/utility/enable_if.hpp>
|
#include <type_traits>
|
||||||
#include <boost/type_traits/is_same.hpp>
|
|
||||||
|
|
||||||
namespace CGAL {
|
namespace CGAL {
|
||||||
/// \ingroup PkgAABBTreeRef
|
/// \ingroup PkgAABBTreeRef
|
||||||
|
|
@ -76,9 +75,9 @@ namespace CGAL {
|
||||||
: m_facet_handle(*ptr) { };
|
: m_facet_handle(*ptr) { };
|
||||||
template <class Iterator>
|
template <class Iterator>
|
||||||
AABB_polyhedron_triangle_primitive( Iterator it,
|
AABB_polyhedron_triangle_primitive( Iterator it,
|
||||||
typename boost::enable_if<
|
std::enable_if_t<
|
||||||
boost::is_same<Id,typename Iterator::value_type>
|
std::is_same<Id,typename Iterator::value_type>::value
|
||||||
>::type* =0
|
>* =0
|
||||||
) : m_facet_handle(*it) { }
|
) : m_facet_handle(*it) { }
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -562,9 +562,12 @@ public:
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Builds the tree by recursive expansion.
|
* @brief Builds the tree by recursive expansion.
|
||||||
|
* @param node the root node of the subtree to generate
|
||||||
* @param first the first primitive to insert
|
* @param first the first primitive to insert
|
||||||
* @param beyond the last primitive to insert
|
* @param beyond the last primitive to insert
|
||||||
* @param range the number of primitive of the range
|
* @param range the number of primitive of the range
|
||||||
|
* @param compute_bbox a functor
|
||||||
|
* @param split_primitives a functor
|
||||||
*
|
*
|
||||||
* [first,beyond[ is the range of primitives to be added to the tree.
|
* [first,beyond[ is the range of primitives to be added to the tree.
|
||||||
*/
|
*/
|
||||||
|
|
@ -574,8 +577,7 @@ public:
|
||||||
ConstPrimitiveIterator beyond,
|
ConstPrimitiveIterator beyond,
|
||||||
const std::size_t range,
|
const std::size_t range,
|
||||||
const ComputeBbox& compute_bbox,
|
const ComputeBbox& compute_bbox,
|
||||||
const SplitPrimitives& split_primitives,
|
const SplitPrimitives& split_primitives);
|
||||||
const AABBTraits&);
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// returns a point which must be on one primitive
|
// returns a point which must be on one primitive
|
||||||
|
|
@ -791,8 +793,7 @@ public:
|
||||||
ConstPrimitiveIterator beyond,
|
ConstPrimitiveIterator beyond,
|
||||||
const std::size_t range,
|
const std::size_t range,
|
||||||
const ComputeBbox& compute_bbox,
|
const ComputeBbox& compute_bbox,
|
||||||
const SplitPrimitives& split_primitives,
|
const SplitPrimitives& split_primitives)
|
||||||
const Tr& traits)
|
|
||||||
{
|
{
|
||||||
node.set_bbox(compute_bbox(first, beyond));
|
node.set_bbox(compute_bbox(first, beyond));
|
||||||
|
|
||||||
|
|
@ -806,13 +807,13 @@ public:
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
node.set_children(*first, new_node());
|
node.set_children(*first, new_node());
|
||||||
expand(node.right_child(), first+1, beyond, 2, compute_bbox, split_primitives, traits);
|
expand(node.right_child(), first+1, beyond, 2, compute_bbox, split_primitives);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
const std::size_t new_range = range/2;
|
const std::size_t new_range = range/2;
|
||||||
node.set_children(new_node(), new_node());
|
node.set_children(new_node(), new_node());
|
||||||
expand(node.left_child(), first, first + new_range, new_range, compute_bbox, split_primitives, traits);
|
expand(node.left_child(), first, first + new_range, new_range, compute_bbox, split_primitives);
|
||||||
expand(node.right_child(), first + new_range, beyond, range - new_range, compute_bbox, split_primitives, traits);
|
expand(node.right_child(), first + new_range, beyond, range - new_range, compute_bbox, split_primitives);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -844,8 +845,7 @@ public:
|
||||||
m_primitives.begin(), m_primitives.end(),
|
m_primitives.begin(), m_primitives.end(),
|
||||||
m_primitives.size(),
|
m_primitives.size(),
|
||||||
compute_bbox,
|
compute_bbox,
|
||||||
split_primitives,
|
split_primitives);
|
||||||
m_traits);
|
|
||||||
}
|
}
|
||||||
#ifdef CGAL_HAS_THREADS
|
#ifdef CGAL_HAS_THREADS
|
||||||
m_atomic_need_build.store(false, std::memory_order_release); // in case build() is triggered by a call to root_node()
|
m_atomic_need_build.store(false, std::memory_order_release); // in case build() is triggered by a call to root_node()
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@ struct AABB_drawing_traits
|
||||||
double offset[3];
|
double offset[3];
|
||||||
|
|
||||||
typedef CGAL::Bbox_3 Bbox;
|
typedef CGAL::Bbox_3 Bbox;
|
||||||
bool go_further() { return true; }
|
constexpr bool go_further() const { return true; }
|
||||||
|
|
||||||
bool intersection(const int&, const Primitive&)
|
bool intersection(const int&, const Primitive&)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -18,8 +18,8 @@
|
||||||
|
|
||||||
|
|
||||||
#include <functional>
|
#include <functional>
|
||||||
|
#include <type_traits>
|
||||||
#include <boost/optional.hpp>
|
#include <boost/optional.hpp>
|
||||||
#include <boost/type_traits/is_same.hpp>
|
|
||||||
#include <boost/variant/apply_visitor.hpp>
|
#include <boost/variant/apply_visitor.hpp>
|
||||||
# if defined(BOOST_MSVC)
|
# if defined(BOOST_MSVC)
|
||||||
# pragma warning(push)
|
# pragma warning(push)
|
||||||
|
|
@ -201,7 +201,7 @@ template<typename Ray, typename SkipFunctor>
|
||||||
boost::optional< typename AABB_tree<AABBTraits>::template Intersection_and_primitive_id<Ray>::Type >
|
boost::optional< typename AABB_tree<AABBTraits>::template Intersection_and_primitive_id<Ray>::Type >
|
||||||
AABB_tree<AABBTraits>::first_intersection(const Ray& query,
|
AABB_tree<AABBTraits>::first_intersection(const Ray& query,
|
||||||
const SkipFunctor& skip) const {
|
const SkipFunctor& skip) const {
|
||||||
CGAL_static_assertion_msg((boost::is_same<Ray, typename AABBTraits::Ray_3>::value),
|
CGAL_static_assertion_msg((std::is_same<Ray, typename AABBTraits::Ray_3>::value),
|
||||||
"Ray and Ray_3 must be the same type");
|
"Ray and Ray_3 must be the same type");
|
||||||
|
|
||||||
switch(size()) // copy-paste from AABB_tree::traversal
|
switch(size()) // copy-paste from AABB_tree::traversal
|
||||||
|
|
|
||||||
|
|
@ -120,7 +120,7 @@ public:
|
||||||
Listing_intersection_traits(Output_iterator out_it, const AABBTraits& traits)
|
Listing_intersection_traits(Output_iterator out_it, const AABBTraits& traits)
|
||||||
: m_out_it(out_it), m_traits(traits) {}
|
: m_out_it(out_it), m_traits(traits) {}
|
||||||
|
|
||||||
bool go_further() const { return true; }
|
constexpr bool go_further() const { return true; }
|
||||||
|
|
||||||
void intersection(const Query& query, const Primitive& primitive)
|
void intersection(const Query& query, const Primitive& primitive)
|
||||||
{
|
{
|
||||||
|
|
@ -163,7 +163,7 @@ public:
|
||||||
Listing_primitive_traits(Output_iterator out_it, const AABBTraits& traits)
|
Listing_primitive_traits(Output_iterator out_it, const AABBTraits& traits)
|
||||||
: m_out_it(out_it), m_traits(traits) {}
|
: m_out_it(out_it), m_traits(traits) {}
|
||||||
|
|
||||||
bool go_further() const { return true; }
|
constexpr bool go_further() const { return true; }
|
||||||
|
|
||||||
void intersection(const Query& query, const Primitive& primitive)
|
void intersection(const Query& query, const Primitive& primitive)
|
||||||
{
|
{
|
||||||
|
|
@ -295,7 +295,7 @@ public:
|
||||||
m_traits(traits)
|
m_traits(traits)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
bool go_further() const { return true; }
|
constexpr bool go_further() const { return true; }
|
||||||
|
|
||||||
void intersection(const Point& query, const Primitive& primitive)
|
void intersection(const Point& query, const Primitive& primitive)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -18,8 +18,7 @@
|
||||||
|
|
||||||
#include <CGAL/disable_warnings.h>
|
#include <CGAL/disable_warnings.h>
|
||||||
|
|
||||||
#include <boost/utility/enable_if.hpp>
|
#include <type_traits>
|
||||||
#include <boost/type_traits/is_same.hpp>
|
|
||||||
|
|
||||||
namespace CGAL {
|
namespace CGAL {
|
||||||
// \ingroup PkgAABBTreeRef
|
// \ingroup PkgAABBTreeRef
|
||||||
|
|
@ -68,9 +67,9 @@ namespace CGAL {
|
||||||
: m_facet(*ptr) { }
|
: m_facet(*ptr) { }
|
||||||
template <class Iterator>
|
template <class Iterator>
|
||||||
AABB_triangulation_3_triangle_primitive( Iterator it,
|
AABB_triangulation_3_triangle_primitive( Iterator it,
|
||||||
typename boost::enable_if<
|
std::enable_if_t<
|
||||||
boost::is_same<Id,typename Iterator::value_type>
|
std::is_same<Id,typename Iterator::value_type>::value
|
||||||
>::type* =0
|
>* =0
|
||||||
) : m_facet(*it) { }
|
) : m_facet(*it) { }
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@ typedef unspecified_type Type;
|
||||||
/*!
|
/*!
|
||||||
Tag indicating whether the associated type is real embeddable.
|
Tag indicating whether the associated type is real embeddable.
|
||||||
|
|
||||||
This is either \link Tag_true `Tag_true`\endlink or \link Tag_false `Tag_false`\endlink.
|
This is either \link CGAL::Tag_true `Tag_true`\endlink or \link CGAL::Tag_false `Tag_false`\endlink.
|
||||||
*/
|
*/
|
||||||
typedef unspecified_type Is_real_embeddable;
|
typedef unspecified_type Is_real_embeddable;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,8 +9,8 @@ int main(){
|
||||||
typedef FT::Numerator_type Numerator_type;
|
typedef FT::Numerator_type Numerator_type;
|
||||||
typedef FT::Denominator_type Denominator_type;
|
typedef FT::Denominator_type Denominator_type;
|
||||||
|
|
||||||
CGAL_static_assertion((boost::is_same<Numerator_type,CGAL::Gmpz>::value));
|
CGAL_static_assertion((std::is_same<Numerator_type,CGAL::Gmpz>::value));
|
||||||
CGAL_static_assertion((boost::is_same<Denominator_type,CGAL::Gmpz>::value));
|
CGAL_static_assertion((std::is_same<Denominator_type,CGAL::Gmpz>::value));
|
||||||
|
|
||||||
Numerator_type numerator;
|
Numerator_type numerator;
|
||||||
Denominator_type denominator;
|
Denominator_type denominator;
|
||||||
|
|
|
||||||
|
|
@ -354,7 +354,7 @@ class Algebraic_structure_traits_base< Type_,
|
||||||
typedef typename CT::Type Coercion_type_NT1_NT2;
|
typedef typename CT::Type Coercion_type_NT1_NT2;
|
||||||
CGAL_USE_TYPE(Coercion_type_NT1_NT2);
|
CGAL_USE_TYPE(Coercion_type_NT1_NT2);
|
||||||
CGAL_static_assertion((
|
CGAL_static_assertion((
|
||||||
::boost::is_same<Coercion_type_NT1_NT2 , Type >::value));
|
::std::is_same<Coercion_type_NT1_NT2 , Type >::value));
|
||||||
|
|
||||||
typename Coercion_traits< NT1, NT2 >::Cast cast;
|
typename Coercion_traits< NT1, NT2 >::Cast cast;
|
||||||
operator()( cast(x), cast(y), q, r );
|
operator()( cast(x), cast(y), q, r );
|
||||||
|
|
|
||||||
|
|
@ -23,9 +23,9 @@
|
||||||
#define CGAL_COERCION_TRAITS_H 1
|
#define CGAL_COERCION_TRAITS_H 1
|
||||||
|
|
||||||
#include <iterator>
|
#include <iterator>
|
||||||
|
#include <type_traits>
|
||||||
|
|
||||||
#include <CGAL/boost/iterator/transform_iterator.hpp>
|
#include <CGAL/boost/iterator/transform_iterator.hpp>
|
||||||
#include <boost/type_traits/is_same.hpp>
|
|
||||||
|
|
||||||
#include <CGAL/tags.h>
|
#include <CGAL/tags.h>
|
||||||
|
|
||||||
|
|
@ -35,7 +35,7 @@
|
||||||
#define CGAL_IMPLICIT_INTEROPERABLE_BINARY_OPERATOR_WITH_RT( NT, Result_type ) \
|
#define CGAL_IMPLICIT_INTEROPERABLE_BINARY_OPERATOR_WITH_RT( NT, Result_type ) \
|
||||||
template < class CT_Type_1, class CT_Type_2 > \
|
template < class CT_Type_1, class CT_Type_2 > \
|
||||||
Result_type operator()( const CT_Type_1& x, const CT_Type_2& y ) const { \
|
Result_type operator()( const CT_Type_1& x, const CT_Type_2& y ) const { \
|
||||||
CGAL_static_assertion((::boost::is_same< \
|
CGAL_static_assertion((::std::is_same< \
|
||||||
typename Coercion_traits< CT_Type_1, CT_Type_2 >::Type, NT \
|
typename Coercion_traits< CT_Type_1, CT_Type_2 >::Type, NT \
|
||||||
>::value)); \
|
>::value)); \
|
||||||
\
|
\
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,8 @@
|
||||||
#include <CGAL/number_type_basic.h>
|
#include <CGAL/number_type_basic.h>
|
||||||
#include <CGAL/Fraction_traits.h>
|
#include <CGAL/Fraction_traits.h>
|
||||||
#include <CGAL/is_convertible.h>
|
#include <CGAL/is_convertible.h>
|
||||||
#include <boost/utility/enable_if.hpp>
|
|
||||||
|
#include <type_traits>
|
||||||
|
|
||||||
namespace CGAL {
|
namespace CGAL {
|
||||||
|
|
||||||
|
|
@ -79,11 +80,11 @@ public:
|
||||||
{ return make_rational(x.first, x.second); }
|
{ return make_rational(x.first, x.second); }
|
||||||
|
|
||||||
template<class N,class D>
|
template<class N,class D>
|
||||||
Rational make_rational(const N& n, const D& d,typename boost::enable_if_c<is_implicit_convertible<N,RT>::value&&is_implicit_convertible<D,RT>::value,int>::type=0) const
|
Rational make_rational(const N& n, const D& d,std::enable_if_t<is_implicit_convertible<N,RT>::value&&is_implicit_convertible<D,RT>::value,int> = 0) const
|
||||||
{ return Compose()(n,d); }
|
{ return Compose()(n,d); }
|
||||||
|
|
||||||
template<class N,class D>
|
template<class N,class D>
|
||||||
Rational make_rational(const N& n, const D& d,typename boost::enable_if_c<!is_implicit_convertible<N,RT>::value||!is_implicit_convertible<D,RT>::value,int>::type=0) const
|
Rational make_rational(const N& n, const D& d,std::enable_if_t<!is_implicit_convertible<N,RT>::value||!is_implicit_convertible<D,RT>::value,int> = 0) const
|
||||||
{ return n/d; } // Assume that n or d is already a fraction
|
{ return n/d; } // Assume that n or d is already a fraction
|
||||||
};
|
};
|
||||||
}// namespace internal
|
}// namespace internal
|
||||||
|
|
@ -92,9 +93,9 @@ public:
|
||||||
template <class T>
|
template <class T>
|
||||||
class Rational_traits
|
class Rational_traits
|
||||||
: public internal::Rational_traits_base<T,
|
: public internal::Rational_traits_base<T,
|
||||||
::boost::is_same<typename Fraction_traits<T>::Is_fraction,Tag_true>::value
|
::std::is_same<typename Fraction_traits<T>::Is_fraction,Tag_true>::value
|
||||||
&&
|
&&
|
||||||
::boost::is_same<
|
::std::is_same<
|
||||||
typename Fraction_traits<T>::Numerator_type,
|
typename Fraction_traits<T>::Numerator_type,
|
||||||
typename Fraction_traits<T>::Denominator_type
|
typename Fraction_traits<T>::Denominator_type
|
||||||
>::value >
|
>::value >
|
||||||
|
|
|
||||||
|
|
@ -85,13 +85,13 @@ public:
|
||||||
|
|
||||||
// determine extractable scalar factor
|
// determine extractable scalar factor
|
||||||
Scalar operator () (const NT& a) {
|
Scalar operator () (const NT& a) {
|
||||||
CGAL_static_assertion(( ::boost::is_same< NT,Scalar >::value));
|
CGAL_static_assertion(( ::std::is_same< NT,Scalar >::value));
|
||||||
typedef typename Algebraic_structure_traits<NT>::Algebraic_category SAT;
|
typedef typename Algebraic_structure_traits<NT>::Algebraic_category SAT;
|
||||||
return scalar_factor(a, SAT());
|
return scalar_factor(a, SAT());
|
||||||
}
|
}
|
||||||
// determine extractable scalar factor
|
// determine extractable scalar factor
|
||||||
Scalar operator () (const NT& a, const Scalar& d) {
|
Scalar operator () (const NT& a, const Scalar& d) {
|
||||||
CGAL_static_assertion(( ::boost::is_same< NT,Scalar >::value));
|
CGAL_static_assertion(( ::std::is_same< NT,Scalar >::value));
|
||||||
typedef typename Algebraic_structure_traits<NT>::Algebraic_category SAT;
|
typedef typename Algebraic_structure_traits<NT>::Algebraic_category SAT;
|
||||||
return scalar_factor(a,d,SAT());
|
return scalar_factor(a,d,SAT());
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -44,7 +44,7 @@
|
||||||
template <typename AdaptableFunctor, typename ResultType>
|
template <typename AdaptableFunctor, typename ResultType>
|
||||||
void check_result_type(AdaptableFunctor, ResultType){
|
void check_result_type(AdaptableFunctor, ResultType){
|
||||||
typedef typename AdaptableFunctor::result_type result_type;
|
typedef typename AdaptableFunctor::result_type result_type;
|
||||||
CGAL_static_assertion((::boost::is_same<result_type,ResultType>::value));
|
CGAL_static_assertion((::std::is_same<result_type,ResultType>::value));
|
||||||
CGAL_USE_TYPE(result_type);
|
CGAL_USE_TYPE(result_type);
|
||||||
}
|
}
|
||||||
// check nothing for CGAL::Null_functor
|
// check nothing for CGAL::Null_functor
|
||||||
|
|
@ -123,11 +123,11 @@ void test_algebraic_structure_intern( const CGAL::Integral_domain_tag& ) {
|
||||||
|
|
||||||
using CGAL::Null_functor;
|
using CGAL::Null_functor;
|
||||||
CGAL_static_assertion(
|
CGAL_static_assertion(
|
||||||
(!::boost::is_same< Integral_division, Null_functor >::value));
|
(!::std::is_same< Integral_division, Null_functor >::value));
|
||||||
CGAL_static_assertion((!::boost::is_same< Divides, Null_functor >::value));
|
CGAL_static_assertion((!::std::is_same< Divides, Null_functor >::value));
|
||||||
CGAL_static_assertion((!::boost::is_same< Is_zero, Null_functor >::value));
|
CGAL_static_assertion((!::std::is_same< Is_zero, Null_functor >::value));
|
||||||
CGAL_static_assertion((!::boost::is_same< Is_one, Null_functor >::value));
|
CGAL_static_assertion((!::std::is_same< Is_one, Null_functor >::value));
|
||||||
CGAL_static_assertion((!::boost::is_same< Square, Null_functor >::value));
|
CGAL_static_assertion((!::std::is_same< Square, Null_functor >::value));
|
||||||
|
|
||||||
// functor
|
// functor
|
||||||
const Is_zero is_zero = Is_zero();
|
const Is_zero is_zero = Is_zero();
|
||||||
|
|
@ -206,7 +206,7 @@ void test_algebraic_structure_intern(
|
||||||
CGAL_SNAP_AST_FUNCTORS(AST);
|
CGAL_SNAP_AST_FUNCTORS(AST);
|
||||||
|
|
||||||
using CGAL::Null_functor;
|
using CGAL::Null_functor;
|
||||||
CGAL_static_assertion((!::boost::is_same< Gcd, Null_functor>::value));
|
CGAL_static_assertion((!::std::is_same< Gcd, Null_functor>::value));
|
||||||
|
|
||||||
const Gcd gcd = Gcd();
|
const Gcd gcd = Gcd();
|
||||||
assert( gcd( AS ( 0), AS ( 0)) == unit_normal( AS (0) ) );
|
assert( gcd( AS ( 0), AS ( 0)) == unit_normal( AS (0) ) );
|
||||||
|
|
@ -268,9 +268,9 @@ void test_algebraic_structure_intern( const CGAL::Euclidean_ring_tag&) {
|
||||||
CGAL_SNAP_AST_FUNCTORS(AST);
|
CGAL_SNAP_AST_FUNCTORS(AST);
|
||||||
|
|
||||||
using CGAL::Null_functor;
|
using CGAL::Null_functor;
|
||||||
CGAL_static_assertion((!::boost::is_same< Div, Null_functor>::value));
|
CGAL_static_assertion((!::std::is_same< Div, Null_functor>::value));
|
||||||
CGAL_static_assertion((!::boost::is_same< Mod, Null_functor>::value));
|
CGAL_static_assertion((!::std::is_same< Mod, Null_functor>::value));
|
||||||
CGAL_static_assertion((!::boost::is_same< Div_mod, Null_functor>::value));
|
CGAL_static_assertion((!::std::is_same< Div_mod, Null_functor>::value));
|
||||||
|
|
||||||
const Div div=Div();
|
const Div div=Div();
|
||||||
const Mod mod=Mod();
|
const Mod mod=Mod();
|
||||||
|
|
@ -387,7 +387,7 @@ void test_algebraic_structure_intern( const CGAL::Field_with_sqrt_tag& ) {
|
||||||
|
|
||||||
CGAL_SNAP_AST_FUNCTORS(AST);
|
CGAL_SNAP_AST_FUNCTORS(AST);
|
||||||
|
|
||||||
CGAL_static_assertion((!::boost::is_same< Sqrt, Null_functor>::value));
|
CGAL_static_assertion((!::std::is_same< Sqrt, Null_functor>::value));
|
||||||
const Sqrt sqrt =Sqrt();
|
const Sqrt sqrt =Sqrt();
|
||||||
AS a(4);
|
AS a(4);
|
||||||
|
|
||||||
|
|
@ -614,10 +614,10 @@ class Test_is_square {
|
||||||
CGAL_USE_TYPE(Second_argument_type);
|
CGAL_USE_TYPE(Second_argument_type);
|
||||||
|
|
||||||
CGAL_static_assertion(
|
CGAL_static_assertion(
|
||||||
( ::boost::is_same< AS , First_argument_type>::value));
|
( ::std::is_same< AS , First_argument_type>::value));
|
||||||
CGAL_static_assertion(
|
CGAL_static_assertion(
|
||||||
( ::boost::is_same< AS& , Second_argument_type>::value));
|
( ::std::is_same< AS& , Second_argument_type>::value));
|
||||||
//CGAL_static_assertion(( ::boost::is_same< bool , Result_type>::value));
|
//CGAL_static_assertion(( ::std::is_same< bool , Result_type>::value));
|
||||||
bool b = Result_type(true); CGAL_USE(b);
|
bool b = Result_type(true); CGAL_USE(b);
|
||||||
|
|
||||||
AS test_number = AS(3)*AS(3);
|
AS test_number = AS(3)*AS(3);
|
||||||
|
|
@ -649,8 +649,8 @@ public:
|
||||||
typedef typename Sqrt::result_type Result_type;
|
typedef typename Sqrt::result_type Result_type;
|
||||||
CGAL_USE_TYPE(Argument_type);
|
CGAL_USE_TYPE(Argument_type);
|
||||||
CGAL_USE_TYPE(Result_type);
|
CGAL_USE_TYPE(Result_type);
|
||||||
CGAL_static_assertion(( ::boost::is_same< AS , Argument_type>::value));
|
CGAL_static_assertion(( ::std::is_same< AS , Argument_type>::value));
|
||||||
CGAL_static_assertion(( ::boost::is_same< AS , Result_type>::value));
|
CGAL_static_assertion(( ::std::is_same< AS , Result_type>::value));
|
||||||
typedef Algebraic_structure_traits<AS> AST;
|
typedef Algebraic_structure_traits<AS> AST;
|
||||||
typedef typename AST::Is_exact Is_exact;
|
typedef typename AST::Is_exact Is_exact;
|
||||||
assert( !Is_exact::value || AS (3) == sqrt( AS (9)));
|
assert( !Is_exact::value || AS (3) == sqrt( AS (9)));
|
||||||
|
|
@ -676,11 +676,11 @@ public:
|
||||||
CGAL_USE_TYPE(Second_argument_type);
|
CGAL_USE_TYPE(Second_argument_type);
|
||||||
CGAL_USE_TYPE(Result_type);
|
CGAL_USE_TYPE(Result_type);
|
||||||
CGAL_static_assertion(
|
CGAL_static_assertion(
|
||||||
( ::boost::is_same<int, First_argument_type>::value));
|
( ::std::is_same<int, First_argument_type>::value));
|
||||||
CGAL_static_assertion(
|
CGAL_static_assertion(
|
||||||
( ::boost::is_same< AS , Second_argument_type>::value));
|
( ::std::is_same< AS , Second_argument_type>::value));
|
||||||
CGAL_static_assertion(
|
CGAL_static_assertion(
|
||||||
( ::boost::is_same< AS , Result_type>::value));
|
( ::std::is_same< AS , Result_type>::value));
|
||||||
AS epsilon(1);
|
AS epsilon(1);
|
||||||
assert( test_equality_epsilon( AS (2),
|
assert( test_equality_epsilon( AS (2),
|
||||||
root( 4, AS (16) ), epsilon ) );
|
root( 4, AS (16) ), epsilon ) );
|
||||||
|
|
@ -803,7 +803,7 @@ void test_algebraic_structure(){
|
||||||
typedef CGAL::Algebraic_structure_traits< AS > AST;
|
typedef CGAL::Algebraic_structure_traits< AS > AST;
|
||||||
CGAL_SNAP_AST_FUNCTORS(AST);
|
CGAL_SNAP_AST_FUNCTORS(AST);
|
||||||
|
|
||||||
CGAL_static_assertion((::boost::is_same<AS,typename AST::Type>::value));
|
CGAL_static_assertion((::std::is_same<AS,typename AST::Type>::value));
|
||||||
|
|
||||||
typedef typename AST::Boolean Boolean;
|
typedef typename AST::Boolean Boolean;
|
||||||
assert(!Boolean());
|
assert(!Boolean());
|
||||||
|
|
@ -817,13 +817,13 @@ void test_algebraic_structure(){
|
||||||
using CGAL::Null_functor;
|
using CGAL::Null_functor;
|
||||||
// Test for desired exactness
|
// Test for desired exactness
|
||||||
CGAL_static_assertion(
|
CGAL_static_assertion(
|
||||||
( ::boost::is_same< typename AST::Is_exact, Is_exact >::value));
|
( ::std::is_same< typename AST::Is_exact, Is_exact >::value));
|
||||||
|
|
||||||
CGAL_static_assertion(( ::boost::is_convertible< Tag,
|
CGAL_static_assertion(( ::boost::is_convertible< Tag,
|
||||||
Integral_domain_without_division_tag >::value ));
|
Integral_domain_without_division_tag >::value ));
|
||||||
CGAL_static_assertion(( ::boost::is_same< Tag, Algebraic_category>::value));
|
CGAL_static_assertion(( ::std::is_same< Tag, Algebraic_category>::value));
|
||||||
CGAL_static_assertion((!::boost::is_same< Simplify, Null_functor>::value));
|
CGAL_static_assertion((!::std::is_same< Simplify, Null_functor>::value));
|
||||||
CGAL_static_assertion((!::boost::is_same< Unit_part, Null_functor>::value));
|
CGAL_static_assertion((!::std::is_same< Unit_part, Null_functor>::value));
|
||||||
const Simplify simplify=Simplify();;
|
const Simplify simplify=Simplify();;
|
||||||
const Unit_part unit_part= Unit_part();
|
const Unit_part unit_part= Unit_part();
|
||||||
|
|
||||||
|
|
@ -944,7 +944,7 @@ void test_algebraic_structure( const AS & a, const AS & b, const AS & c) {
|
||||||
typedef CGAL::Algebraic_structure_traits<AS> AST;
|
typedef CGAL::Algebraic_structure_traits<AS> AST;
|
||||||
typedef typename AST::Is_numerical_sensitive Is_numerical_sensitive;
|
typedef typename AST::Is_numerical_sensitive Is_numerical_sensitive;
|
||||||
CGAL_static_assertion(
|
CGAL_static_assertion(
|
||||||
!(::boost::is_same<Is_numerical_sensitive, CGAL::Null_tag>::value));
|
!(::std::is_same<Is_numerical_sensitive, CGAL::Null_tag>::value));
|
||||||
CGAL_USE_TYPE(Is_numerical_sensitive);
|
CGAL_USE_TYPE(Is_numerical_sensitive);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -327,8 +327,8 @@ void test_implicit_interoperable_one_way() {
|
||||||
typedef typename CT::Are_implicit_interoperable Are_implicit_interoperable;
|
typedef typename CT::Are_implicit_interoperable Are_implicit_interoperable;
|
||||||
|
|
||||||
CGAL_static_assertion(
|
CGAL_static_assertion(
|
||||||
(::boost::is_same<Are_implicit_interoperable, CGAL::Tag_true>::value));
|
(::std::is_same<Are_implicit_interoperable, CGAL::Tag_true>::value));
|
||||||
assert((::boost::is_same<Are_implicit_interoperable, CGAL::Tag_true>::value));
|
assert((::std::is_same<Are_implicit_interoperable, CGAL::Tag_true>::value));
|
||||||
|
|
||||||
typename CGAL::Real_embeddable_traits<C>::Is_real_embeddable is_real_embeddable;
|
typename CGAL::Real_embeddable_traits<C>::Is_real_embeddable is_real_embeddable;
|
||||||
test_implicit_interoperable_for_real_embeddable<A,B>(is_real_embeddable);
|
test_implicit_interoperable_for_real_embeddable<A,B>(is_real_embeddable);
|
||||||
|
|
@ -346,9 +346,9 @@ void test_explicit_interoperable_one_way(){
|
||||||
typedef typename CT::Cast Cast;
|
typedef typename CT::Cast Cast;
|
||||||
typedef typename Cast::result_type result_type;
|
typedef typename Cast::result_type result_type;
|
||||||
CGAL_USE_TYPE(result_type);
|
CGAL_USE_TYPE(result_type);
|
||||||
CGAL_static_assertion((::boost::is_same<result_type,Type>::value));
|
CGAL_static_assertion((::std::is_same<result_type,Type>::value));
|
||||||
CGAL_static_assertion((::boost::is_same< typename CT::Are_explicit_interoperable,CGAL::Tag_true>::value));
|
CGAL_static_assertion((::std::is_same< typename CT::Are_explicit_interoperable,CGAL::Tag_true>::value));
|
||||||
CGAL_static_assertion((::boost::is_same<Type,RT>::value));
|
CGAL_static_assertion((::std::is_same<Type,RT>::value));
|
||||||
typename CT::Cast cast;
|
typename CT::Cast cast;
|
||||||
|
|
||||||
A a(3);
|
A a(3);
|
||||||
|
|
|
||||||
|
|
@ -37,11 +37,11 @@ void test_fraction_traits(){
|
||||||
typedef typename FT::Compose Compose;
|
typedef typename FT::Compose Compose;
|
||||||
|
|
||||||
CGAL_USE_TYPE(Is_fraction);
|
CGAL_USE_TYPE(Is_fraction);
|
||||||
CGAL_static_assertion( (::boost::is_same<Type,T>::value));
|
CGAL_static_assertion( (::std::is_same<Type,T>::value));
|
||||||
CGAL_static_assertion( (::boost::is_same<Is_fraction,Tag_true>::value));
|
CGAL_static_assertion( (::std::is_same<Is_fraction,Tag_true>::value));
|
||||||
CGAL_static_assertion(!(::boost::is_same<Common_factor,Null_functor>::value));
|
CGAL_static_assertion(!(::std::is_same<Common_factor,Null_functor>::value));
|
||||||
CGAL_static_assertion(!(::boost::is_same<Decompose,Null_functor>::value));
|
CGAL_static_assertion(!(::std::is_same<Decompose,Null_functor>::value));
|
||||||
CGAL_static_assertion(!(::boost::is_same<Compose,Null_functor>::value));
|
CGAL_static_assertion(!(::std::is_same<Compose,Null_functor>::value));
|
||||||
|
|
||||||
|
|
||||||
// Decompose
|
// Decompose
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@ void test_rational_traits(){
|
||||||
|
|
||||||
typedef Rational_traits<Rational> Rational_traits;
|
typedef Rational_traits<Rational> Rational_traits;
|
||||||
typedef typename Rational_traits::RT RT;
|
typedef typename Rational_traits::RT RT;
|
||||||
CGAL_static_assertion((::boost::is_same<RT,RT>::value));
|
CGAL_static_assertion((::std::is_same<RT,RT>::value));
|
||||||
|
|
||||||
assert( Rational_traits().numerator(x) == RT(7));
|
assert( Rational_traits().numerator(x) == RT(7));
|
||||||
assert( Rational_traits().denominator(x) == RT(2));
|
assert( Rational_traits().denominator(x) == RT(2));
|
||||||
|
|
|
||||||
|
|
@ -48,9 +48,9 @@ namespace CGAL {
|
||||||
void operator() (const ToDouble& to_double) {
|
void operator() (const ToDouble& to_double) {
|
||||||
typedef typename ToDouble::argument_type Argument_type;
|
typedef typename ToDouble::argument_type Argument_type;
|
||||||
typedef typename ToDouble::result_type Result_type;
|
typedef typename ToDouble::result_type Result_type;
|
||||||
CGAL_static_assertion(( ::boost::is_same<Type, Argument_type>::value));
|
CGAL_static_assertion(( ::std::is_same<Type, Argument_type>::value));
|
||||||
CGAL_USE_TYPE(Argument_type);
|
CGAL_USE_TYPE(Argument_type);
|
||||||
CGAL_static_assertion(( ::boost::is_same<double, Result_type>::value));
|
CGAL_static_assertion(( ::std::is_same<double, Result_type>::value));
|
||||||
CGAL_USE_TYPE(Result_type);
|
CGAL_USE_TYPE(Result_type);
|
||||||
assert(42.0 == to_double(Type(42)));
|
assert(42.0 == to_double(Type(42)));
|
||||||
}
|
}
|
||||||
|
|
@ -71,9 +71,9 @@ namespace CGAL {
|
||||||
typedef typename To_interval::argument_type Argument_type;
|
typedef typename To_interval::argument_type Argument_type;
|
||||||
typedef typename To_interval::result_type Result_type;
|
typedef typename To_interval::result_type Result_type;
|
||||||
typedef std::pair<double,double> Interval_type;
|
typedef std::pair<double,double> Interval_type;
|
||||||
CGAL_static_assertion(( ::boost::is_same<Type, Argument_type>::value));
|
CGAL_static_assertion(( ::std::is_same<Type, Argument_type>::value));
|
||||||
CGAL_USE_TYPE(Argument_type);
|
CGAL_USE_TYPE(Argument_type);
|
||||||
CGAL_static_assertion(( ::boost::is_same<Interval_type, Result_type>::value));
|
CGAL_static_assertion(( ::std::is_same<Interval_type, Result_type>::value));
|
||||||
CGAL_USE_TYPE(Result_type); CGAL_USE_TYPE(Interval_type);
|
CGAL_USE_TYPE(Result_type); CGAL_USE_TYPE(Interval_type);
|
||||||
|
|
||||||
// assert(NiX::in(42.0,to_Interval(Type(42))));
|
// assert(NiX::in(42.0,to_Interval(Type(42))));
|
||||||
|
|
@ -139,7 +139,7 @@ void test_real_embeddable() {
|
||||||
CGAL_SNAP_RET_FUNCTORS(RET);
|
CGAL_SNAP_RET_FUNCTORS(RET);
|
||||||
typedef typename RET::Is_real_embeddable Is_real_embeddable;
|
typedef typename RET::Is_real_embeddable Is_real_embeddable;
|
||||||
using CGAL::Tag_true;
|
using CGAL::Tag_true;
|
||||||
CGAL_static_assertion(( ::boost::is_same< Is_real_embeddable, Tag_true>::value));
|
CGAL_static_assertion(( ::std::is_same< Is_real_embeddable, Tag_true>::value));
|
||||||
CGAL_USE_TYPE(Is_real_embeddable);
|
CGAL_USE_TYPE(Is_real_embeddable);
|
||||||
|
|
||||||
typedef typename RET::Boolean Boolean;
|
typedef typename RET::Boolean Boolean;
|
||||||
|
|
@ -246,7 +246,7 @@ void test_not_real_embeddable() {
|
||||||
typedef CGAL::Real_embeddable_traits<Type> RET;
|
typedef CGAL::Real_embeddable_traits<Type> RET;
|
||||||
typedef typename RET::Is_real_embeddable Is_real_embeddable;
|
typedef typename RET::Is_real_embeddable Is_real_embeddable;
|
||||||
using CGAL::Tag_false;
|
using CGAL::Tag_false;
|
||||||
CGAL_static_assertion(( ::boost::is_same< Is_real_embeddable, Tag_false>::value));
|
CGAL_static_assertion(( ::std::is_same< Is_real_embeddable, Tag_false>::value));
|
||||||
CGAL_USE_TYPE(Is_real_embeddable);
|
CGAL_USE_TYPE(Is_real_embeddable);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -254,13 +254,13 @@ void test_not_real_embeddable() {
|
||||||
//template <class Type, class CeilLog2Abs>
|
//template <class Type, class CeilLog2Abs>
|
||||||
//void test_rounded_log2_abs(Type zero, CGAL::Null_functor, CeilLog2Abs) {
|
//void test_rounded_log2_abs(Type zero, CGAL::Null_functor, CeilLog2Abs) {
|
||||||
// typedef CGAL::Null_functor Null_functor;
|
// typedef CGAL::Null_functor Null_functor;
|
||||||
// CGAL_static_assertion(( ::boost::is_same< CeilLog2Abs, Null_functor>::value));
|
// CGAL_static_assertion(( ::std::is_same< CeilLog2Abs, Null_functor>::value));
|
||||||
//}
|
//}
|
||||||
//
|
//
|
||||||
//template <class Type, class FloorLog2Abs, class CeilLog2Abs>
|
//template <class Type, class FloorLog2Abs, class CeilLog2Abs>
|
||||||
//void test_rounded_log2_abs(Type zero, FloorLog2Abs fl_log, CeilLog2Abs cl_log) {
|
//void test_rounded_log2_abs(Type zero, FloorLog2Abs fl_log, CeilLog2Abs cl_log) {
|
||||||
// typedef CGAL::Null_functor Null_functor;
|
// typedef CGAL::Null_functor Null_functor;
|
||||||
// CGAL_static_assertion((!::boost::is_same< CeilLog2Abs, Null_functor>::value));
|
// CGAL_static_assertion((!::std::is_same< CeilLog2Abs, Null_functor>::value));
|
||||||
//
|
//
|
||||||
// assert( fl_log(Type( 7)) == 2 );
|
// assert( fl_log(Type( 7)) == 2 );
|
||||||
// assert( cl_log(Type( 7)) == 3 );
|
// assert( cl_log(Type( 7)) == 3 );
|
||||||
|
|
|
||||||
|
|
@ -195,7 +195,7 @@ template< class Number_type >
|
||||||
inline
|
inline
|
||||||
// select a Is_zero functor
|
// select a Is_zero functor
|
||||||
typename boost::mpl::if_c<
|
typename boost::mpl::if_c<
|
||||||
::boost::is_same< typename Algebraic_structure_traits< Number_type >::Is_zero,
|
::std::is_same< typename Algebraic_structure_traits< Number_type >::Is_zero,
|
||||||
Null_functor >::value ,
|
Null_functor >::value ,
|
||||||
typename Real_embeddable_traits< Number_type >::Is_zero,
|
typename Real_embeddable_traits< Number_type >::Is_zero,
|
||||||
typename Algebraic_structure_traits< Number_type >::Is_zero
|
typename Algebraic_structure_traits< Number_type >::Is_zero
|
||||||
|
|
@ -204,7 +204,7 @@ is_zero( const Number_type& x ) {
|
||||||
// We take the Algebraic_structure_traits<>::Is_zero functor by default. If it
|
// We take the Algebraic_structure_traits<>::Is_zero functor by default. If it
|
||||||
// is not available, we take the Real_embeddable_traits functor
|
// is not available, we take the Real_embeddable_traits functor
|
||||||
typename ::boost::mpl::if_c<
|
typename ::boost::mpl::if_c<
|
||||||
::boost::is_same<
|
::std::is_same<
|
||||||
typename Algebraic_structure_traits< Number_type >::Is_zero,
|
typename Algebraic_structure_traits< Number_type >::Is_zero,
|
||||||
Null_functor >::value ,
|
Null_functor >::value ,
|
||||||
typename Real_embeddable_traits< Number_type >::Is_zero,
|
typename Real_embeddable_traits< Number_type >::Is_zero,
|
||||||
|
|
|
||||||
|
|
@ -9,21 +9,21 @@ int main(){
|
||||||
|
|
||||||
typedef AET::Type Type;
|
typedef AET::Type Type;
|
||||||
CGAL_USE_TYPE(Type);
|
CGAL_USE_TYPE(Type);
|
||||||
CGAL_static_assertion((::boost::is_same<int,Type>::value));
|
CGAL_static_assertion((::std::is_same<int,Type>::value));
|
||||||
|
|
||||||
typedef AET::Is_extended Is_extended;
|
typedef AET::Is_extended Is_extended;
|
||||||
CGAL_USE_TYPE(Is_extended);
|
CGAL_USE_TYPE(Is_extended);
|
||||||
CGAL_static_assertion(
|
CGAL_static_assertion(
|
||||||
(::boost::is_same<CGAL::Tag_false,Is_extended>::value));
|
(::std::is_same<CGAL::Tag_false,Is_extended>::value));
|
||||||
|
|
||||||
typedef AET::Normalization_factor Normalization_factor;
|
typedef AET::Normalization_factor Normalization_factor;
|
||||||
{
|
{
|
||||||
typedef Normalization_factor::argument_type argument_type;
|
typedef Normalization_factor::argument_type argument_type;
|
||||||
CGAL_USE_TYPE(argument_type);
|
CGAL_USE_TYPE(argument_type);
|
||||||
CGAL_static_assertion((::boost::is_same<argument_type,int>::value));
|
CGAL_static_assertion((::std::is_same<argument_type,int>::value));
|
||||||
typedef Normalization_factor::result_type result_type;
|
typedef Normalization_factor::result_type result_type;
|
||||||
CGAL_USE_TYPE(result_type);
|
CGAL_USE_TYPE(result_type);
|
||||||
CGAL_static_assertion((::boost::is_same<result_type,int>::value));
|
CGAL_static_assertion((::std::is_same<result_type,int>::value));
|
||||||
Normalization_factor nfac;
|
Normalization_factor nfac;
|
||||||
assert(nfac(3)==1);
|
assert(nfac(3)==1);
|
||||||
}
|
}
|
||||||
|
|
@ -31,10 +31,10 @@ int main(){
|
||||||
{
|
{
|
||||||
typedef DFAI::argument_type argument_type;
|
typedef DFAI::argument_type argument_type;
|
||||||
CGAL_USE_TYPE(argument_type);
|
CGAL_USE_TYPE(argument_type);
|
||||||
CGAL_static_assertion((::boost::is_same<argument_type,int>::value));
|
CGAL_static_assertion((::std::is_same<argument_type,int>::value));
|
||||||
typedef DFAI::result_type result_type;
|
typedef DFAI::result_type result_type;
|
||||||
CGAL_USE_TYPE(result_type);
|
CGAL_USE_TYPE(result_type);
|
||||||
CGAL_static_assertion((::boost::is_same<result_type,int>::value));
|
CGAL_static_assertion((::std::is_same<result_type,int>::value));
|
||||||
DFAI dfai;
|
DFAI dfai;
|
||||||
assert(dfai(3)==1);
|
assert(dfai(3)==1);
|
||||||
}
|
}
|
||||||
|
|
@ -45,21 +45,21 @@ int main(){
|
||||||
|
|
||||||
typedef AET::Type Type;
|
typedef AET::Type Type;
|
||||||
CGAL_USE_TYPE(Type);
|
CGAL_USE_TYPE(Type);
|
||||||
CGAL_static_assertion((::boost::is_same<EXT,Type>::value));
|
CGAL_static_assertion((::std::is_same<EXT,Type>::value));
|
||||||
|
|
||||||
typedef AET::Is_extended Is_extended;
|
typedef AET::Is_extended Is_extended;
|
||||||
CGAL_USE_TYPE(Is_extended);
|
CGAL_USE_TYPE(Is_extended);
|
||||||
CGAL_static_assertion(
|
CGAL_static_assertion(
|
||||||
(::boost::is_same<CGAL::Tag_true,Is_extended>::value));
|
(::std::is_same<CGAL::Tag_true,Is_extended>::value));
|
||||||
|
|
||||||
typedef AET::Normalization_factor Normalization_factor;
|
typedef AET::Normalization_factor Normalization_factor;
|
||||||
{
|
{
|
||||||
typedef Normalization_factor::argument_type argument_type;
|
typedef Normalization_factor::argument_type argument_type;
|
||||||
CGAL_USE_TYPE(argument_type);
|
CGAL_USE_TYPE(argument_type);
|
||||||
CGAL_static_assertion((::boost::is_same<argument_type,EXT>::value));
|
CGAL_static_assertion((::std::is_same<argument_type,EXT>::value));
|
||||||
typedef Normalization_factor::result_type result_type;
|
typedef Normalization_factor::result_type result_type;
|
||||||
CGAL_USE_TYPE(result_type);
|
CGAL_USE_TYPE(result_type);
|
||||||
CGAL_static_assertion((::boost::is_same<result_type,EXT>::value));
|
CGAL_static_assertion((::std::is_same<result_type,EXT>::value));
|
||||||
Normalization_factor nfac;
|
Normalization_factor nfac;
|
||||||
assert(nfac(EXT(3))==1);
|
assert(nfac(EXT(3))==1);
|
||||||
assert(nfac(EXT(3,0,5))==1);
|
assert(nfac(EXT(3,0,5))==1);
|
||||||
|
|
@ -69,10 +69,10 @@ int main(){
|
||||||
{
|
{
|
||||||
typedef DFAI::argument_type argument_type;
|
typedef DFAI::argument_type argument_type;
|
||||||
CGAL_USE_TYPE(argument_type);
|
CGAL_USE_TYPE(argument_type);
|
||||||
CGAL_static_assertion((::boost::is_same<argument_type,EXT>::value));
|
CGAL_static_assertion((::std::is_same<argument_type,EXT>::value));
|
||||||
typedef DFAI::result_type result_type;
|
typedef DFAI::result_type result_type;
|
||||||
CGAL_USE_TYPE(result_type);
|
CGAL_USE_TYPE(result_type);
|
||||||
CGAL_static_assertion((::boost::is_same<result_type,EXT>::value));
|
CGAL_static_assertion((::std::is_same<result_type,EXT>::value));
|
||||||
DFAI dfai;
|
DFAI dfai;
|
||||||
assert(dfai(EXT(3))==1);
|
assert(dfai(EXT(3))==1);
|
||||||
assert(dfai(EXT(3,0,5))==1);
|
assert(dfai(EXT(3,0,5))==1);
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@
|
||||||
typedef AST::NAME NAME; \
|
typedef AST::NAME NAME; \
|
||||||
CGAL_USE_TYPE(NAME); \
|
CGAL_USE_TYPE(NAME); \
|
||||||
CGAL_static_assertion( \
|
CGAL_static_assertion( \
|
||||||
(::boost::is_same<CGAL::Null_functor,NAME>::value)); \
|
(::std::is_same<CGAL::Null_functor,NAME>::value)); \
|
||||||
}
|
}
|
||||||
|
|
||||||
int main(){
|
int main(){
|
||||||
|
|
@ -16,19 +16,19 @@ int main(){
|
||||||
|
|
||||||
typedef AST::Type Type;
|
typedef AST::Type Type;
|
||||||
CGAL_USE_TYPE(Type);
|
CGAL_USE_TYPE(Type);
|
||||||
CGAL_static_assertion((::boost::is_same<void,Type>::value));
|
CGAL_static_assertion((::std::is_same<void,Type>::value));
|
||||||
|
|
||||||
typedef AST::Algebraic_category Algebraic_category;
|
typedef AST::Algebraic_category Algebraic_category;
|
||||||
CGAL_USE_TYPE(Algebraic_category);
|
CGAL_USE_TYPE(Algebraic_category);
|
||||||
CGAL_static_assertion(
|
CGAL_static_assertion(
|
||||||
(::boost::is_same<CGAL::Null_tag,Algebraic_category>::value));
|
(::std::is_same<CGAL::Null_tag,Algebraic_category>::value));
|
||||||
|
|
||||||
typedef AST::Is_exact Is_exact;
|
typedef AST::Is_exact Is_exact;
|
||||||
CGAL_USE_TYPE(Is_exact);
|
CGAL_USE_TYPE(Is_exact);
|
||||||
CGAL_static_assertion((::boost::is_same<CGAL::Null_tag,Is_exact>::value));
|
CGAL_static_assertion((::std::is_same<CGAL::Null_tag,Is_exact>::value));
|
||||||
typedef AST::Is_numerical_sensitive Is_sensitive;
|
typedef AST::Is_numerical_sensitive Is_sensitive;
|
||||||
CGAL_USE_TYPE(Is_sensitive);
|
CGAL_USE_TYPE(Is_sensitive);
|
||||||
CGAL_static_assertion((::boost::is_same<CGAL::Null_tag,Is_sensitive>::value));
|
CGAL_static_assertion((::std::is_same<CGAL::Null_tag,Is_sensitive>::value));
|
||||||
|
|
||||||
CGAL_IS_AST_NULL_FUNCTOR ( Simplify);
|
CGAL_IS_AST_NULL_FUNCTOR ( Simplify);
|
||||||
CGAL_IS_AST_NULL_FUNCTOR ( Unit_part);
|
CGAL_IS_AST_NULL_FUNCTOR ( Unit_part);
|
||||||
|
|
|
||||||
|
|
@ -6,22 +6,22 @@ int main(){
|
||||||
{
|
{
|
||||||
typedef CGAL::Coercion_traits<int,int> CT;
|
typedef CGAL::Coercion_traits<int,int> CT;
|
||||||
CGAL_USE_TYPE(CT);
|
CGAL_USE_TYPE(CT);
|
||||||
CGAL_static_assertion(( boost::is_same<CT::Type,int>::value));
|
CGAL_static_assertion(( std::is_same<CT::Type,int>::value));
|
||||||
CGAL_static_assertion(
|
CGAL_static_assertion(
|
||||||
( boost::is_same<CT::Are_implicit_interoperable,CGAL::Tag_true>::value));
|
( std::is_same<CT::Are_implicit_interoperable,CGAL::Tag_true>::value));
|
||||||
CGAL_static_assertion(
|
CGAL_static_assertion(
|
||||||
( boost::is_same<CT::Are_explicit_interoperable,CGAL::Tag_true>::value));
|
( std::is_same<CT::Are_explicit_interoperable,CGAL::Tag_true>::value));
|
||||||
assert( 5 == CT::Cast()(5));
|
assert( 5 == CT::Cast()(5));
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
typedef CGAL::Coercion_traits<CGAL::Tag_true,CGAL::Tag_false> CT;
|
typedef CGAL::Coercion_traits<CGAL::Tag_true,CGAL::Tag_false> CT;
|
||||||
CGAL_USE_TYPE(CT);
|
CGAL_USE_TYPE(CT);
|
||||||
// CGAL_static_assertion(( boost::is_same<CT::Type,CGAL::Null_type>::value));
|
// CGAL_static_assertion(( std::is_same<CT::Type,CGAL::Null_type>::value));
|
||||||
CGAL_static_assertion(
|
CGAL_static_assertion(
|
||||||
( boost::is_same<CT::Are_implicit_interoperable,CGAL::Tag_false>::value));
|
( std::is_same<CT::Are_implicit_interoperable,CGAL::Tag_false>::value));
|
||||||
CGAL_static_assertion(
|
CGAL_static_assertion(
|
||||||
( boost::is_same<CT::Are_explicit_interoperable,CGAL::Tag_false>::value));
|
( std::is_same<CT::Are_explicit_interoperable,CGAL::Tag_false>::value));
|
||||||
CGAL_static_assertion(
|
CGAL_static_assertion(
|
||||||
( boost::is_same<CT::Cast,CGAL::Null_functor>::value));
|
( std::is_same<CT::Cast,CGAL::Null_functor>::value));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@
|
||||||
typedef RET::NAME NAME; \
|
typedef RET::NAME NAME; \
|
||||||
CGAL_USE_TYPE(NAME); \
|
CGAL_USE_TYPE(NAME); \
|
||||||
CGAL_static_assertion( \
|
CGAL_static_assertion( \
|
||||||
(::boost::is_same<CGAL::Null_functor,NAME>::value)); \
|
(::std::is_same<CGAL::Null_functor,NAME>::value)); \
|
||||||
}
|
}
|
||||||
|
|
||||||
int main(){
|
int main(){
|
||||||
|
|
@ -16,11 +16,11 @@ int main(){
|
||||||
|
|
||||||
typedef RET::Type Type;
|
typedef RET::Type Type;
|
||||||
CGAL_USE_TYPE(Type);
|
CGAL_USE_TYPE(Type);
|
||||||
CGAL_static_assertion((::boost::is_same<void,Type>::value));
|
CGAL_static_assertion((::std::is_same<void,Type>::value));
|
||||||
|
|
||||||
typedef RET::Is_real_embeddable Is_real_embeddable;
|
typedef RET::Is_real_embeddable Is_real_embeddable;
|
||||||
CGAL_USE_TYPE(Is_real_embeddable);
|
CGAL_USE_TYPE(Is_real_embeddable);
|
||||||
CGAL_static_assertion((::boost::is_same<CGAL::Tag_false,Is_real_embeddable>::value));
|
CGAL_static_assertion((::std::is_same<CGAL::Tag_false,Is_real_embeddable>::value));
|
||||||
|
|
||||||
CGAL_IS_RET_NULL_FUNCTOR(Abs);
|
CGAL_IS_RET_NULL_FUNCTOR(Abs);
|
||||||
CGAL_IS_RET_NULL_FUNCTOR(Sgn);
|
CGAL_IS_RET_NULL_FUNCTOR(Sgn);
|
||||||
|
|
|
||||||
|
|
@ -7,33 +7,33 @@
|
||||||
int main(){
|
int main(){
|
||||||
typedef CGAL::Scalar_factor_traits<int> SFT;
|
typedef CGAL::Scalar_factor_traits<int> SFT;
|
||||||
CGAL_USE_TYPE(SFT);
|
CGAL_USE_TYPE(SFT);
|
||||||
CGAL_static_assertion((::boost::is_same<int, SFT::Type>::value));
|
CGAL_static_assertion((::std::is_same<int, SFT::Type>::value));
|
||||||
CGAL_static_assertion((::boost::is_same<int, SFT::Scalar>::value));
|
CGAL_static_assertion((::std::is_same<int, SFT::Scalar>::value));
|
||||||
|
|
||||||
typedef SFT::Scalar_factor Scalar_factor;
|
typedef SFT::Scalar_factor Scalar_factor;
|
||||||
{
|
{
|
||||||
typedef Scalar_factor::result_type result_type;
|
typedef Scalar_factor::result_type result_type;
|
||||||
CGAL_USE_TYPE(result_type);
|
CGAL_USE_TYPE(result_type);
|
||||||
CGAL_static_assertion((::boost::is_same<int, result_type>::value));
|
CGAL_static_assertion((::std::is_same<int, result_type>::value));
|
||||||
|
|
||||||
typedef Scalar_factor::argument_type argument_type;
|
typedef Scalar_factor::argument_type argument_type;
|
||||||
CGAL_USE_TYPE(argument_type);
|
CGAL_USE_TYPE(argument_type);
|
||||||
CGAL_static_assertion((::boost::is_same<int, argument_type>::value));
|
CGAL_static_assertion((::std::is_same<int, argument_type>::value));
|
||||||
}
|
}
|
||||||
typedef SFT::Scalar_div Scalar_div;
|
typedef SFT::Scalar_div Scalar_div;
|
||||||
{
|
{
|
||||||
typedef Scalar_div::result_type result_type;
|
typedef Scalar_div::result_type result_type;
|
||||||
CGAL_USE_TYPE(result_type);
|
CGAL_USE_TYPE(result_type);
|
||||||
CGAL_static_assertion((::boost::is_same<void, result_type>::value));
|
CGAL_static_assertion((::std::is_same<void, result_type>::value));
|
||||||
|
|
||||||
typedef Scalar_div::first_argument_type first_argument_type;
|
typedef Scalar_div::first_argument_type first_argument_type;
|
||||||
CGAL_USE_TYPE(first_argument_type);
|
CGAL_USE_TYPE(first_argument_type);
|
||||||
CGAL_static_assertion(
|
CGAL_static_assertion(
|
||||||
(::boost::is_same<int&, first_argument_type>::value));
|
(::std::is_same<int&, first_argument_type>::value));
|
||||||
typedef Scalar_div::second_argument_type second_argument_type;
|
typedef Scalar_div::second_argument_type second_argument_type;
|
||||||
CGAL_USE_TYPE(second_argument_type);
|
CGAL_USE_TYPE(second_argument_type);
|
||||||
CGAL_static_assertion(
|
CGAL_static_assertion(
|
||||||
(::boost::is_same<int, second_argument_type>::value));
|
(::std::is_same<int, second_argument_type>::value));
|
||||||
}
|
}
|
||||||
|
|
||||||
int i;
|
int i;
|
||||||
|
|
|
||||||
|
|
@ -24,9 +24,9 @@
|
||||||
#define CGAL_ALGEBRAIC_CURVE_KERNEL_D_2_H
|
#define CGAL_ALGEBRAIC_CURVE_KERNEL_D_2_H
|
||||||
|
|
||||||
#include <limits>
|
#include <limits>
|
||||||
|
#include <type_traits>
|
||||||
#include <CGAL/iterator.h>
|
#include <CGAL/iterator.h>
|
||||||
#include <CGAL/assertions.h>
|
#include <CGAL/assertions.h>
|
||||||
#include <boost/type_traits/is_same.hpp>
|
|
||||||
#include <boost/optional.hpp>
|
#include <boost/optional.hpp>
|
||||||
|
|
||||||
#include <CGAL/basic.h>
|
#include <CGAL/basic.h>
|
||||||
|
|
@ -73,7 +73,7 @@ namespace CGAL {
|
||||||
* in turn required by the \c CurvedKernelViaAnalysis_2 concept
|
* in turn required by the \c CurvedKernelViaAnalysis_2 concept
|
||||||
* (see the documentation of the corresponding package). Therefore,
|
* (see the documentation of the corresponding package). Therefore,
|
||||||
* some types and methods of the class have both an "algebraic" name
|
* some types and methods of the class have both an "algebraic" name
|
||||||
* (demanded by \c CurveKernelWithAnalysis_d_2) and an "non-algebraic name
|
* (demanded by \c CurveKernelWithAnalysis_d_2) and a "non-algebraic" name
|
||||||
* (demanded by \c CurveKernel_2).
|
* (demanded by \c CurveKernel_2).
|
||||||
*
|
*
|
||||||
* \b Algebraic_curve_kernel_2 is a template class, and needs a model
|
* \b Algebraic_curve_kernel_2 is a template class, and needs a model
|
||||||
|
|
@ -481,16 +481,16 @@ public:
|
||||||
Curve_analysis_2 _construct_defining_polynomial_from(Bound b) const {
|
Curve_analysis_2 _construct_defining_polynomial_from(Bound b) const {
|
||||||
typedef CGAL::Fraction_traits<Bound> FT;
|
typedef CGAL::Fraction_traits<Bound> FT;
|
||||||
// We rely on the fact that the Bound is a fraction
|
// We rely on the fact that the Bound is a fraction
|
||||||
CGAL_static_assertion((::boost::is_same<typename FT::Is_fraction,
|
CGAL_static_assertion((::std::is_same<typename FT::Is_fraction,
|
||||||
CGAL::Tag_true>::value));
|
CGAL::Tag_true>::value));
|
||||||
typedef typename FT::Numerator_type Numerator;
|
typedef typename FT::Numerator_type Numerator;
|
||||||
typedef typename FT::Denominator_type Denominator;
|
typedef typename FT::Denominator_type Denominator;
|
||||||
typedef CGAL::Coercion_traits<Numerator,Coefficient> Num_coercion;
|
typedef CGAL::Coercion_traits<Numerator,Coefficient> Num_coercion;
|
||||||
CGAL_static_assertion((::boost::is_same
|
CGAL_static_assertion((::std::is_same
|
||||||
<Coefficient,
|
<Coefficient,
|
||||||
typename Num_coercion::Type>::value));
|
typename Num_coercion::Type>::value));
|
||||||
typedef CGAL::Coercion_traits<Denominator,Coefficient> Denom_coercion;
|
typedef CGAL::Coercion_traits<Denominator,Coefficient> Denom_coercion;
|
||||||
CGAL_static_assertion((::boost::is_same
|
CGAL_static_assertion((::std::is_same
|
||||||
<Coefficient,
|
<Coefficient,
|
||||||
typename Denom_coercion::Type>::value));
|
typename Denom_coercion::Type>::value));
|
||||||
typename Num_coercion::Cast num_cast;
|
typename Num_coercion::Cast num_cast;
|
||||||
|
|
@ -2541,16 +2541,16 @@ public:
|
||||||
Polynomial_1 operator() (const Polynomial_2& f, Bound b) const {
|
Polynomial_1 operator() (const Polynomial_2& f, Bound b) const {
|
||||||
typedef CGAL::Fraction_traits<Bound> FT;
|
typedef CGAL::Fraction_traits<Bound> FT;
|
||||||
// We rely on the fact that the Bound is a fraction
|
// We rely on the fact that the Bound is a fraction
|
||||||
CGAL_static_assertion((::boost::is_same<typename FT::Is_fraction,
|
CGAL_static_assertion((::std::is_same<typename FT::Is_fraction,
|
||||||
CGAL::Tag_true>::value));
|
CGAL::Tag_true>::value));
|
||||||
typedef typename FT::Numerator_type Numerator;
|
typedef typename FT::Numerator_type Numerator;
|
||||||
typedef typename FT::Denominator_type Denominator;
|
typedef typename FT::Denominator_type Denominator;
|
||||||
typedef CGAL::Coercion_traits<Numerator,Coefficient> Num_coercion;
|
typedef CGAL::Coercion_traits<Numerator,Coefficient> Num_coercion;
|
||||||
CGAL_static_assertion((::boost::is_same
|
CGAL_static_assertion((::std::is_same
|
||||||
<Coefficient,
|
<Coefficient,
|
||||||
typename Num_coercion::Type>::value));
|
typename Num_coercion::Type>::value));
|
||||||
typedef CGAL::Coercion_traits<Denominator,Coefficient> Denom_coercion;
|
typedef CGAL::Coercion_traits<Denominator,Coefficient> Denom_coercion;
|
||||||
CGAL_static_assertion((::boost::is_same
|
CGAL_static_assertion((::std::is_same
|
||||||
<Coefficient,
|
<Coefficient,
|
||||||
typename Denom_coercion::Type>::value));
|
typename Denom_coercion::Type>::value));
|
||||||
typename Num_coercion::Cast num_cast;
|
typename Num_coercion::Cast num_cast;
|
||||||
|
|
|
||||||
|
|
@ -72,7 +72,7 @@ class Algebraic_real_d_1 :
|
||||||
|
|
||||||
// currently Rational is the only supported Bound type.
|
// currently Rational is the only supported Bound type.
|
||||||
CGAL_static_assertion(
|
CGAL_static_assertion(
|
||||||
( ::boost::is_same <Rational_,
|
( ::std::is_same <Rational_,
|
||||||
typename Get_arithmetic_kernel<Coefficient_>::Arithmetic_kernel::Rational>::value));
|
typename Get_arithmetic_kernel<Coefficient_>::Arithmetic_kernel::Rational>::value));
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -579,7 +579,7 @@ struct Coercion_traits<
|
||||||
typedef Type result_type;
|
typedef Type result_type;
|
||||||
Type operator()(const Type& a) const { return a; }
|
Type operator()(const Type& a) const { return a; }
|
||||||
Type operator()(const Coefficient& a) const {
|
Type operator()(const Coefficient& a) const {
|
||||||
static const bool b = boost::is_same<Rational,typename CTCR::Type>::value;
|
static const bool b = std::is_same<Rational,typename CTCR::Type>::value;
|
||||||
return (*this)(a,Boolean_tag<b>());
|
return (*this)(a,Boolean_tag<b>());
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -20,13 +20,12 @@
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <set>
|
#include <set>
|
||||||
#include <map>
|
#include <map>
|
||||||
|
#include <type_traits>
|
||||||
|
|
||||||
#include <boost/mpl/has_xxx.hpp>
|
#include <boost/mpl/has_xxx.hpp>
|
||||||
#include <boost/type_traits/is_base_of.hpp>
|
#include <boost/type_traits/is_base_of.hpp>
|
||||||
#include <boost/mpl/and.hpp>
|
#include <boost/mpl/and.hpp>
|
||||||
#include <boost/mpl/logical.hpp>
|
#include <boost/mpl/logical.hpp>
|
||||||
#include <boost/type_traits/is_same.hpp>
|
|
||||||
|
|
||||||
|
|
||||||
#include <CGAL/basic.h>
|
#include <CGAL/basic.h>
|
||||||
#include <CGAL/assertions.h>
|
#include <CGAL/assertions.h>
|
||||||
|
|
|
||||||
|
|
@ -762,7 +762,7 @@ std::istream& operator >> (
|
||||||
|
|
||||||
is >> arcno;
|
is >> arcno;
|
||||||
|
|
||||||
// read the ")
|
// read the ")"
|
||||||
swallow(is, ')');
|
swallow(is, ')');
|
||||||
|
|
||||||
pt = Xy_coordinate_2(x, curve, arcno);
|
pt = Xy_coordinate_2(x, curve, arcno);
|
||||||
|
|
|
||||||
|
|
@ -187,7 +187,7 @@ template<typename AlgebraicKernel_1,
|
||||||
InputIterator end,
|
InputIterator end,
|
||||||
OutputIterator output) {
|
OutputIterator output) {
|
||||||
CGAL_static_assertion
|
CGAL_static_assertion
|
||||||
((::boost::is_same
|
((::std::is_same
|
||||||
<typename AlgebraicKernel_1::Algebraic_real_1,
|
<typename AlgebraicKernel_1::Algebraic_real_1,
|
||||||
typename std::iterator_traits<InputIterator>::value_type >::value));
|
typename std::iterator_traits<InputIterator>::value_type >::value));
|
||||||
|
|
||||||
|
|
@ -224,12 +224,12 @@ template<typename Poly_coer_1,typename Polynomial_1>
|
||||||
void cast_back_utcf(const Poly_coer_1& p,Polynomial_1& q) {
|
void cast_back_utcf(const Poly_coer_1& p,Polynomial_1& q) {
|
||||||
// We can assume that both template arguments are polynomial types
|
// We can assume that both template arguments are polynomial types
|
||||||
typedef CGAL::Fraction_traits<Poly_coer_1> FT;
|
typedef CGAL::Fraction_traits<Poly_coer_1> FT;
|
||||||
CGAL_static_assertion((::boost::is_same<typename FT::Is_fraction,
|
CGAL_static_assertion((::std::is_same<typename FT::Is_fraction,
|
||||||
CGAL::Tag_true>::value));
|
CGAL::Tag_true>::value));
|
||||||
typedef typename FT::Numerator_type Numerator;
|
typedef typename FT::Numerator_type Numerator;
|
||||||
typedef typename FT::Denominator_type Denominator;
|
typedef typename FT::Denominator_type Denominator;
|
||||||
typedef CGAL::Coercion_traits<Numerator,Polynomial_1> Num_coercion;
|
typedef CGAL::Coercion_traits<Numerator,Polynomial_1> Num_coercion;
|
||||||
CGAL_static_assertion((::boost::is_same
|
CGAL_static_assertion((::std::is_same
|
||||||
<Polynomial_1,
|
<Polynomial_1,
|
||||||
typename Num_coercion::Type>::value));
|
typename Num_coercion::Type>::value));
|
||||||
Numerator p_num;
|
Numerator p_num;
|
||||||
|
|
|
||||||
|
|
@ -29,8 +29,7 @@
|
||||||
// the version of MPFR is one of those buggy versions, abort the compilation
|
// the version of MPFR is one of those buggy versions, abort the compilation
|
||||||
// and instruct the user to update MPFR or don't use RS3.
|
// and instruct the user to update MPFR or don't use RS3.
|
||||||
#ifdef CGAL_USE_RS3
|
#ifdef CGAL_USE_RS3
|
||||||
#include <boost/static_assert.hpp>
|
static_assert(
|
||||||
BOOST_STATIC_ASSERT_MSG(
|
|
||||||
MPFR_VERSION_MAJOR!=3 ||
|
MPFR_VERSION_MAJOR!=3 ||
|
||||||
MPFR_VERSION_MINOR!=1 ||
|
MPFR_VERSION_MINOR!=1 ||
|
||||||
MPFR_VERSION_PATCHLEVEL<3 || MPFR_VERSION_PATCHLEVEL>6,
|
MPFR_VERSION_PATCHLEVEL<3 || MPFR_VERSION_PATCHLEVEL>6,
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,6 @@
|
||||||
#include <CGAL/Gmpfi.h>
|
#include <CGAL/Gmpfi.h>
|
||||||
#include <CGAL/Polynomial_traits_d.h>
|
#include <CGAL/Polynomial_traits_d.h>
|
||||||
#include "exact_signat_1.h"
|
#include "exact_signat_1.h"
|
||||||
//#include <boost/mpl/assert.hpp>
|
|
||||||
#include <gmp.h>
|
#include <gmp.h>
|
||||||
|
|
||||||
namespace CGAL{
|
namespace CGAL{
|
||||||
|
|
@ -40,7 +39,7 @@ Signat_1<Polynomial_,Bound_>::operator()(const Bound_ &x)const{
|
||||||
//typedef Algebraic_structure_traits<Bound> AStraits;
|
//typedef Algebraic_structure_traits<Bound> AStraits;
|
||||||
// This generic signat works only when Bound_ is an exact type. For
|
// This generic signat works only when Bound_ is an exact type. For
|
||||||
// non-exact types, an implementation must be provided.
|
// non-exact types, an implementation must be provided.
|
||||||
//BOOST_MPL_ASSERT((boost::is_same<AStraits::Is_exact,Tag_true>));
|
//static_assert(std::is_same<AStraits::Is_exact,Tag_true>::value);
|
||||||
int d=Degree()(pol);
|
int d=Degree()(pol);
|
||||||
Bound h(pol[d]);
|
Bound h(pol[d]);
|
||||||
for(int i=1;i<=d;++i)
|
for(int i=1;i<=d;++i)
|
||||||
|
|
|
||||||
|
|
@ -1,16 +1,3 @@
|
||||||
// TODO: Add licence
|
|
||||||
//
|
|
||||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
|
||||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
|
||||||
//
|
|
||||||
// $URL:$
|
|
||||||
// $Id: $
|
|
||||||
//
|
|
||||||
//
|
|
||||||
// Author(s) : Pavel Emeliyanenko <asm@mpi-sb.mpg.de>
|
|
||||||
//
|
|
||||||
// ============================================================================
|
|
||||||
|
|
||||||
// code coverage test for Algebraic_curve_kernel_2
|
// code coverage test for Algebraic_curve_kernel_2
|
||||||
|
|
||||||
#define CGAL_ACK_DEBUG_FLAG 0
|
#define CGAL_ACK_DEBUG_FLAG 0
|
||||||
|
|
|
||||||
|
|
@ -1,17 +1,3 @@
|
||||||
// TODO: Add licence
|
|
||||||
//
|
|
||||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
|
||||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
|
||||||
//
|
|
||||||
// $URL:$
|
|
||||||
// $Id: $
|
|
||||||
//
|
|
||||||
//
|
|
||||||
// Author(s) : Sebastian Limbach <slimbach@mpi-inf.mpg.de>
|
|
||||||
// Michael Hemmer <hemmer@mpi-inf.mpg.de>
|
|
||||||
//
|
|
||||||
// ============================================================================
|
|
||||||
|
|
||||||
// Test of Algebraic_kernel
|
// Test of Algebraic_kernel
|
||||||
|
|
||||||
#define CGAL_TEST_ALL_AK_VARIANTS 1
|
#define CGAL_TEST_ALL_AK_VARIANTS 1
|
||||||
|
|
|
||||||
|
|
@ -1,17 +1,3 @@
|
||||||
// TODO: Add licence
|
|
||||||
//
|
|
||||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
|
||||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
|
||||||
//
|
|
||||||
// $URL:$
|
|
||||||
// $Id: $
|
|
||||||
//
|
|
||||||
//
|
|
||||||
// Author(s) : Sebastian Limbach <slimbach@mpi-inf.mpg.de>
|
|
||||||
// Michael Hemmer <hemmer@mpi-inf.mpg.de>
|
|
||||||
//
|
|
||||||
// ============================================================================
|
|
||||||
|
|
||||||
// Test of Algebraic_kernel
|
// Test of Algebraic_kernel
|
||||||
|
|
||||||
#define CGAL_TEST_ALL_AK_VARIANTS 1
|
#define CGAL_TEST_ALL_AK_VARIANTS 1
|
||||||
|
|
|
||||||
|
|
@ -1,17 +1,3 @@
|
||||||
// TODO: Add licence
|
|
||||||
//
|
|
||||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
|
||||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
|
||||||
//
|
|
||||||
// $URL:$
|
|
||||||
// $Id: $
|
|
||||||
//
|
|
||||||
//
|
|
||||||
// Author(s) : Sebastian Limbach <slimbach@mpi-inf.mpg.de>
|
|
||||||
// Michael Hemmer <hemmer@mpi-inf.mpg.de>
|
|
||||||
//
|
|
||||||
// ============================================================================
|
|
||||||
|
|
||||||
// Test of Algebraic_kernel
|
// Test of Algebraic_kernel
|
||||||
|
|
||||||
#define CGAL_TEST_ALL_AK_VARIANTS 1
|
#define CGAL_TEST_ALL_AK_VARIANTS 1
|
||||||
|
|
|
||||||
|
|
@ -1,17 +1,3 @@
|
||||||
// TODO: Add licence
|
|
||||||
//
|
|
||||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
|
||||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
|
||||||
//
|
|
||||||
// $URL:$
|
|
||||||
// $Id: $
|
|
||||||
//
|
|
||||||
//
|
|
||||||
// Author(s) : Sebastian Limbach <slimbach@mpi-inf.mpg.de>
|
|
||||||
// Michael Hemmer <hemmer@mpi-inf.mpg.de>
|
|
||||||
//
|
|
||||||
// ============================================================================
|
|
||||||
|
|
||||||
// Test of Algebraic_kernel
|
// Test of Algebraic_kernel
|
||||||
|
|
||||||
#define CGAL_TEST_ALL_AK_VARIANTS 1
|
#define CGAL_TEST_ALL_AK_VARIANTS 1
|
||||||
|
|
|
||||||
|
|
@ -1,17 +1,3 @@
|
||||||
// TODO: Add licence
|
|
||||||
//
|
|
||||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
|
||||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
|
||||||
//
|
|
||||||
// $URL:$
|
|
||||||
// $Id: $
|
|
||||||
//
|
|
||||||
//
|
|
||||||
// Author(s) : Sebastian Limbach <slimbach@mpi-inf.mpg.de>
|
|
||||||
// Michael Hemmer <hemmer@mpi-inf.mpg.de>
|
|
||||||
//
|
|
||||||
// ============================================================================
|
|
||||||
|
|
||||||
// Test of Algebraic_kernel
|
// Test of Algebraic_kernel
|
||||||
|
|
||||||
#define CGAL_TEST_ALL_AK_VARIANTS 1
|
#define CGAL_TEST_ALL_AK_VARIANTS 1
|
||||||
|
|
|
||||||
|
|
@ -1,17 +1,3 @@
|
||||||
// TODO: Add licence
|
|
||||||
//
|
|
||||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
|
||||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
|
||||||
//
|
|
||||||
// $URL:$
|
|
||||||
// $Id: $
|
|
||||||
//
|
|
||||||
//
|
|
||||||
// Author(s) : Sebastian Limbach <slimbach@mpi-inf.mpg.de>
|
|
||||||
// Michael Hemmer <hemmer@mpi-inf.mpg.de>
|
|
||||||
//
|
|
||||||
// ============================================================================
|
|
||||||
|
|
||||||
// Test of Algebraic_kernel
|
// Test of Algebraic_kernel
|
||||||
|
|
||||||
#define CGAL_TEST_ALL_AK_VARIANTS 1
|
#define CGAL_TEST_ALL_AK_VARIANTS 1
|
||||||
|
|
|
||||||
|
|
@ -1,17 +1,3 @@
|
||||||
// TODO: Add licence
|
|
||||||
//
|
|
||||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
|
||||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
|
||||||
//
|
|
||||||
// $URL:$
|
|
||||||
// $Id: $
|
|
||||||
//
|
|
||||||
//
|
|
||||||
// Author(s) : Sebastian Limbach <slimbach@mpi-inf.mpg.de>
|
|
||||||
// Michael Hemmer <hemmer@mpi-inf.mpg.de>
|
|
||||||
//
|
|
||||||
// ============================================================================
|
|
||||||
|
|
||||||
// Test of Algebraic_kernel
|
// Test of Algebraic_kernel
|
||||||
|
|
||||||
#define CGAL_TEST_ALL_AK_VARIANTS 1
|
#define CGAL_TEST_ALL_AK_VARIANTS 1
|
||||||
|
|
|
||||||
|
|
@ -1,16 +1,3 @@
|
||||||
// TODO: Add licence
|
|
||||||
//
|
|
||||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
|
||||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
|
||||||
//
|
|
||||||
// $URL:$
|
|
||||||
// $Id: $
|
|
||||||
//
|
|
||||||
//
|
|
||||||
// Author(s) : Michael Kerber <mkerber@mpi-inf.mpg.de>
|
|
||||||
//
|
|
||||||
// ============================================================================
|
|
||||||
|
|
||||||
// code coverage test for Algebraic_curve_kernel_2
|
// code coverage test for Algebraic_curve_kernel_2
|
||||||
|
|
||||||
// #define CGAL_ACK_DEBUG_FLAG 1
|
// #define CGAL_ACK_DEBUG_FLAG 1
|
||||||
|
|
|
||||||
|
|
@ -1,16 +1,3 @@
|
||||||
// TODO: Add licence
|
|
||||||
//
|
|
||||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
|
||||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
|
||||||
//
|
|
||||||
// $URL:$
|
|
||||||
// $Id: $
|
|
||||||
//
|
|
||||||
//
|
|
||||||
// Author(s) :
|
|
||||||
//
|
|
||||||
// ============================================================================
|
|
||||||
|
|
||||||
// TODO: The comments are all original EXACUS comments and aren't adapted. So
|
// TODO: The comments are all original EXACUS comments and aren't adapted. So
|
||||||
// they may be wrong now.
|
// they may be wrong now.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,16 +1,3 @@
|
||||||
// TODO: Add licence
|
|
||||||
//
|
|
||||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
|
||||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
|
||||||
//
|
|
||||||
// $URL:$
|
|
||||||
// $Id: $
|
|
||||||
//
|
|
||||||
//
|
|
||||||
// Author(s) :
|
|
||||||
//
|
|
||||||
// ============================================================================
|
|
||||||
|
|
||||||
// TODO: The comments are all original EXACUS comments and aren't adapted. So
|
// TODO: The comments are all original EXACUS comments and aren't adapted. So
|
||||||
// they may be wrong now.
|
// they may be wrong now.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,16 +1,3 @@
|
||||||
// TODO: Add licence
|
|
||||||
//
|
|
||||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
|
||||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
|
||||||
//
|
|
||||||
// $URL:$
|
|
||||||
// $Id: $
|
|
||||||
//
|
|
||||||
//
|
|
||||||
// Author(s) : Michael Kerber <mkerber@mpi-inf.mpg.de>
|
|
||||||
//
|
|
||||||
// ============================================================================
|
|
||||||
|
|
||||||
#include <CGAL/config.h>
|
#include <CGAL/config.h>
|
||||||
#include <CGAL/Algebraic_kernel_d/flags.h>
|
#include <CGAL/Algebraic_kernel_d/flags.h>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,16 +1,3 @@
|
||||||
// TODO: Add licence
|
|
||||||
//
|
|
||||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
|
||||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
|
||||||
//
|
|
||||||
// $URL:$
|
|
||||||
// $Id: $
|
|
||||||
//
|
|
||||||
//
|
|
||||||
// Author(s) : Michael Kerber <mkerber@mpi-inf.mpg.de>
|
|
||||||
//
|
|
||||||
// ============================================================================
|
|
||||||
|
|
||||||
#include <CGAL/config.h>
|
#include <CGAL/config.h>
|
||||||
#include <CGAL/Algebraic_kernel_d/flags.h>
|
#include <CGAL/Algebraic_kernel_d/flags.h>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,16 +1,3 @@
|
||||||
// TODO: Add licence
|
|
||||||
//
|
|
||||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
|
||||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
|
||||||
//
|
|
||||||
// $URL:$
|
|
||||||
// $Id: $
|
|
||||||
//
|
|
||||||
//
|
|
||||||
// Author(s) :
|
|
||||||
//
|
|
||||||
// ============================================================================
|
|
||||||
|
|
||||||
// TODO: The comments are all original EXACUS comments and aren't adapted. So
|
// TODO: The comments are all original EXACUS comments and aren't adapted. So
|
||||||
// they may be wrong now.
|
// they may be wrong now.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -47,8 +47,8 @@ void test_real_embeddable_extension(const NT_&){
|
||||||
typedef typename Floor::result_type Result_type;
|
typedef typename Floor::result_type Result_type;
|
||||||
CGAL_USE_TYPE(Argument_type);
|
CGAL_USE_TYPE(Argument_type);
|
||||||
CGAL_USE_TYPE(Result_type);
|
CGAL_USE_TYPE(Result_type);
|
||||||
CGAL_static_assertion(( ::boost::is_same<NT, Argument_type>::value));
|
CGAL_static_assertion(( ::std::is_same<NT, Argument_type>::value));
|
||||||
CGAL_static_assertion(( ::boost::is_same<Integer, Result_type>::value));
|
CGAL_static_assertion(( ::std::is_same<Integer, Result_type>::value));
|
||||||
assert(Integer(42) == floor(NT(42)));
|
assert(Integer(42) == floor(NT(42)));
|
||||||
assert(Integer(-42) == floor(NT(-42)));
|
assert(Integer(-42) == floor(NT(-42)));
|
||||||
}
|
}
|
||||||
|
|
@ -59,8 +59,8 @@ void test_real_embeddable_extension(const NT_&){
|
||||||
typedef typename Floor_log2_abs::result_type Result_type;
|
typedef typename Floor_log2_abs::result_type Result_type;
|
||||||
CGAL_USE_TYPE(Argument_type);
|
CGAL_USE_TYPE(Argument_type);
|
||||||
CGAL_USE_TYPE(Result_type);
|
CGAL_USE_TYPE(Result_type);
|
||||||
CGAL_static_assertion(( ::boost::is_same<NT, Argument_type>::value));
|
CGAL_static_assertion(( ::std::is_same<NT, Argument_type>::value));
|
||||||
CGAL_static_assertion(( ::boost::is_same<long, Result_type>::value));
|
CGAL_static_assertion(( ::std::is_same<long, Result_type>::value));
|
||||||
|
|
||||||
assert(long(0) == floor_log2_abs(NT(1)));
|
assert(long(0) == floor_log2_abs(NT(1)));
|
||||||
assert(long(0) == floor_log2_abs(NT(-1)));
|
assert(long(0) == floor_log2_abs(NT(-1)));
|
||||||
|
|
@ -86,8 +86,8 @@ void test_real_embeddable_extension(const NT_&){
|
||||||
typedef typename Ceil::result_type Result_type;
|
typedef typename Ceil::result_type Result_type;
|
||||||
CGAL_USE_TYPE(Argument_type);
|
CGAL_USE_TYPE(Argument_type);
|
||||||
CGAL_USE_TYPE(Result_type);
|
CGAL_USE_TYPE(Result_type);
|
||||||
CGAL_static_assertion(( ::boost::is_same<NT, Argument_type>::value));
|
CGAL_static_assertion(( ::std::is_same<NT, Argument_type>::value));
|
||||||
CGAL_static_assertion(( ::boost::is_same<Integer, Result_type>::value));
|
CGAL_static_assertion(( ::std::is_same<Integer, Result_type>::value));
|
||||||
assert(Integer(42) == ceil(NT(42)));
|
assert(Integer(42) == ceil(NT(42)));
|
||||||
assert(Integer(-42) == ceil(NT(-42)));
|
assert(Integer(-42) == ceil(NT(-42)));
|
||||||
}
|
}
|
||||||
|
|
@ -98,8 +98,8 @@ void test_real_embeddable_extension(const NT_&){
|
||||||
typedef typename Ceil_log2_abs::result_type Result_type;
|
typedef typename Ceil_log2_abs::result_type Result_type;
|
||||||
CGAL_USE_TYPE(Argument_type);
|
CGAL_USE_TYPE(Argument_type);
|
||||||
CGAL_USE_TYPE(Result_type);
|
CGAL_USE_TYPE(Result_type);
|
||||||
CGAL_static_assertion(( ::boost::is_same<NT, Argument_type>::value));
|
CGAL_static_assertion(( ::std::is_same<NT, Argument_type>::value));
|
||||||
CGAL_static_assertion(( ::boost::is_same<long, Result_type>::value));
|
CGAL_static_assertion(( ::std::is_same<long, Result_type>::value));
|
||||||
|
|
||||||
assert(long(0) == ceil_log2_abs(NT(1)));
|
assert(long(0) == ceil_log2_abs(NT(1)));
|
||||||
assert(long(0) == ceil_log2_abs(NT(-1)));
|
assert(long(0) == ceil_log2_abs(NT(-1)));
|
||||||
|
|
|
||||||
|
|
@ -1,16 +1,3 @@
|
||||||
// TODO: Add licence
|
|
||||||
//
|
|
||||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
|
||||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
|
||||||
//
|
|
||||||
// $URL:$
|
|
||||||
// $Id: $
|
|
||||||
//
|
|
||||||
//
|
|
||||||
// Author(s) : Michael Kerber <mkerber@mpi-inf.mpg.de>
|
|
||||||
//
|
|
||||||
// ============================================================================
|
|
||||||
|
|
||||||
#include <CGAL/Algebraic_kernel_d/flags.h>
|
#include <CGAL/Algebraic_kernel_d/flags.h>
|
||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
|
||||||
|
|
@ -62,18 +62,18 @@ void test_algebraic_curve_kernel_2() {
|
||||||
|
|
||||||
typedef AlgebraicCurveKernel_2 AK_2;
|
typedef AlgebraicCurveKernel_2 AK_2;
|
||||||
|
|
||||||
/* CGAL_static_assertion( (::boost::is_same<
|
/* CGAL_static_assertion( (::std::is_same<
|
||||||
Algebraic_real_1, typename AK::Algebraic_real_1 >::value) );
|
Algebraic_real_1, typename AK::Algebraic_real_1 >::value) );
|
||||||
|
|
||||||
CGAL_static_assertion((::boost::is_same<
|
CGAL_static_assertion((::std::is_same<
|
||||||
Isolator,
|
Isolator,
|
||||||
typename AK::Isolator >::value) );
|
typename AK::Isolator >::value) );
|
||||||
|
|
||||||
CGAL_static_assertion((::boost::is_same<
|
CGAL_static_assertion((::std::is_same<
|
||||||
Coefficient,
|
Coefficient,
|
||||||
typename AK::Coefficient >::value));
|
typename AK::Coefficient >::value));
|
||||||
|
|
||||||
CGAL_static_assertion((::boost::is_same<
|
CGAL_static_assertion((::std::is_same<
|
||||||
Polynomial_1,
|
Polynomial_1,
|
||||||
typename AK::Polynomial_1 >::value));*/
|
typename AK::Polynomial_1 >::value));*/
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -109,8 +109,8 @@ void test_algebraic_kernel_1(const AlgebraicKernel_d_1& ak_1){
|
||||||
typedef typename Name::result_type RT_; \
|
typedef typename Name::result_type RT_; \
|
||||||
CGAL_USE_TYPE(AT_); \
|
CGAL_USE_TYPE(AT_); \
|
||||||
CGAL_USE_TYPE(RT_); \
|
CGAL_USE_TYPE(RT_); \
|
||||||
{CGAL_static_assertion(( ::boost::is_same<AT,AT_>::value));} \
|
{CGAL_static_assertion(( ::std::is_same<AT,AT_>::value));} \
|
||||||
{CGAL_static_assertion(( ::boost::is_same<RT,RT_>::value));} \
|
{CGAL_static_assertion(( ::std::is_same<RT,RT_>::value));} \
|
||||||
}
|
}
|
||||||
#define CGAL_CHECK_BFUNCTION(Name,AT1,AT2,RT) \
|
#define CGAL_CHECK_BFUNCTION(Name,AT1,AT2,RT) \
|
||||||
{ \
|
{ \
|
||||||
|
|
@ -120,9 +120,9 @@ void test_algebraic_kernel_1(const AlgebraicKernel_d_1& ak_1){
|
||||||
CGAL_USE_TYPE(AT1_); \
|
CGAL_USE_TYPE(AT1_); \
|
||||||
CGAL_USE_TYPE(AT2_); \
|
CGAL_USE_TYPE(AT2_); \
|
||||||
CGAL_USE_TYPE(RT_); \
|
CGAL_USE_TYPE(RT_); \
|
||||||
{CGAL_static_assertion(( ::boost::is_same<AT1,AT1_>::value));} \
|
{CGAL_static_assertion(( ::std::is_same<AT1,AT1_>::value));} \
|
||||||
{CGAL_static_assertion(( ::boost::is_same<AT2,AT2_>::value));} \
|
{CGAL_static_assertion(( ::std::is_same<AT2,AT2_>::value));} \
|
||||||
{CGAL_static_assertion(( ::boost::is_same<RT,RT_>::value));} \
|
{CGAL_static_assertion(( ::std::is_same<RT,RT_>::value));} \
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: missing check for Construct_algebraic_real_1
|
// TODO: missing check for Construct_algebraic_real_1
|
||||||
|
|
|
||||||
|
|
@ -93,8 +93,8 @@ void test_algebraic_kernel_2(const AlgebraicKernel_2& ak_2) {
|
||||||
typedef typename Name::result_type RT_; \
|
typedef typename Name::result_type RT_; \
|
||||||
CGAL_USE_TYPE(AT_); \
|
CGAL_USE_TYPE(AT_); \
|
||||||
CGAL_USE_TYPE(RT_); \
|
CGAL_USE_TYPE(RT_); \
|
||||||
{CGAL_static_assertion(( ::boost::is_same<AT,AT_>::value));} \
|
{CGAL_static_assertion(( ::std::is_same<AT,AT_>::value));} \
|
||||||
{CGAL_static_assertion(( ::boost::is_same<RT,RT_>::value));} \
|
{CGAL_static_assertion(( ::std::is_same<RT,RT_>::value));} \
|
||||||
}
|
}
|
||||||
#define CGAL_CHECK_BFUNCTION(Name,AT1,AT2,RT) \
|
#define CGAL_CHECK_BFUNCTION(Name,AT1,AT2,RT) \
|
||||||
{ \
|
{ \
|
||||||
|
|
@ -104,13 +104,13 @@ void test_algebraic_kernel_2(const AlgebraicKernel_2& ak_2) {
|
||||||
CGAL_USE_TYPE(AT1_); \
|
CGAL_USE_TYPE(AT1_); \
|
||||||
CGAL_USE_TYPE(AT2_); \
|
CGAL_USE_TYPE(AT2_); \
|
||||||
CGAL_USE_TYPE(RT_); \
|
CGAL_USE_TYPE(RT_); \
|
||||||
{CGAL_static_assertion(( ::boost::is_same<AT1,AT1_>::value));} \
|
{CGAL_static_assertion(( ::std::is_same<AT1,AT1_>::value));} \
|
||||||
{CGAL_static_assertion(( ::boost::is_same<AT2,AT2_>::value));} \
|
{CGAL_static_assertion(( ::std::is_same<AT2,AT2_>::value));} \
|
||||||
{CGAL_static_assertion(( ::boost::is_same<RT,RT_>::value));} \
|
{CGAL_static_assertion(( ::std::is_same<RT,RT_>::value));} \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
CGAL_static_assertion(( ::boost::is_same
|
CGAL_static_assertion(( ::std::is_same
|
||||||
<Algebraic_real_2,
|
<Algebraic_real_2,
|
||||||
typename Construct_algebraic_real_2::result_type>
|
typename Construct_algebraic_real_2::result_type>
|
||||||
::value));
|
::value));
|
||||||
|
|
@ -118,7 +118,7 @@ void test_algebraic_kernel_2(const AlgebraicKernel_2& ak_2) {
|
||||||
CGAL_CHECK_UFUNCTION(Make_square_free_2,Polynomial_2,Polynomial_2);
|
CGAL_CHECK_UFUNCTION(Make_square_free_2,Polynomial_2,Polynomial_2);
|
||||||
// TODO: missing check for Square_free_factorize_2
|
// TODO: missing check for Square_free_factorize_2
|
||||||
CGAL_CHECK_BFUNCTION(Is_coprime_2,Polynomial_2,Polynomial_2,bool);
|
CGAL_CHECK_BFUNCTION(Is_coprime_2,Polynomial_2,Polynomial_2,bool);
|
||||||
CGAL_static_assertion(( ::boost::is_same
|
CGAL_static_assertion(( ::std::is_same
|
||||||
<bool,typename Make_coprime_2::result_type>::value));
|
<bool,typename Make_coprime_2::result_type>::value));
|
||||||
CGAL_CHECK_BFUNCTION(Number_of_solutions_2,Polynomial_2,Polynomial_2,
|
CGAL_CHECK_BFUNCTION(Number_of_solutions_2,Polynomial_2,Polynomial_2,
|
||||||
size_type);
|
size_type);
|
||||||
|
|
@ -128,7 +128,7 @@ void test_algebraic_kernel_2(const AlgebraicKernel_2& ak_2) {
|
||||||
CGAL_CHECK_UFUNCTION(Compute_polynomial_y_2,Algebraic_real_2,Polynomial_1);
|
CGAL_CHECK_UFUNCTION(Compute_polynomial_y_2,Algebraic_real_2,Polynomial_1);
|
||||||
CGAL_CHECK_BFUNCTION(Isolate_x_2,Algebraic_real_2,Polynomial_1,BInterval);
|
CGAL_CHECK_BFUNCTION(Isolate_x_2,Algebraic_real_2,Polynomial_1,BInterval);
|
||||||
CGAL_CHECK_BFUNCTION(Isolate_y_2,Algebraic_real_2,Polynomial_1,BInterval);
|
CGAL_CHECK_BFUNCTION(Isolate_y_2,Algebraic_real_2,Polynomial_1,BInterval);
|
||||||
CGAL_static_assertion(( ::boost::is_same
|
CGAL_static_assertion(( ::std::is_same
|
||||||
< BArray,typename Isolate_2::result_type>::value));
|
< BArray,typename Isolate_2::result_type>::value));
|
||||||
CGAL_CHECK_BFUNCTION(Sign_at_2,Polynomial_2,Algebraic_real_2,Sign);
|
CGAL_CHECK_BFUNCTION(Sign_at_2,Polynomial_2,Algebraic_real_2,Sign);
|
||||||
CGAL_CHECK_BFUNCTION(Is_zero_at_2,Polynomial_2,Algebraic_real_2,bool);
|
CGAL_CHECK_BFUNCTION(Is_zero_at_2,Polynomial_2,Algebraic_real_2,bool);
|
||||||
|
|
|
||||||
|
|
@ -39,8 +39,8 @@ namespace internal {
|
||||||
void operator() (ToDouble to_double) {
|
void operator() (ToDouble to_double) {
|
||||||
typedef typename ToDouble::argument_type Argument_type;
|
typedef typename ToDouble::argument_type Argument_type;
|
||||||
typedef typename ToDouble::result_type Result_type;
|
typedef typename ToDouble::result_type Result_type;
|
||||||
CGAL_static_assertion((::boost::is_same<NT, Argument_type>::value));
|
CGAL_static_assertion((::std::is_same<NT, Argument_type>::value));
|
||||||
CGAL_static_assertion((::boost::is_same<double, Result_type>::value));
|
CGAL_static_assertion((::std::is_same<double, Result_type>::value));
|
||||||
assert(42.0 == to_double(NT(42)));
|
assert(42.0 == to_double(NT(42)));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
@ -59,8 +59,8 @@ namespace internal {
|
||||||
void operator() (ToInterval to_Interval) {
|
void operator() (ToInterval to_Interval) {
|
||||||
typedef typename ToInterval::argument_type Argument_type;
|
typedef typename ToInterval::argument_type Argument_type;
|
||||||
typedef typename ToInterval::result_type Result_type;
|
typedef typename ToInterval::result_type Result_type;
|
||||||
CGAL_static_assertion((::boost::is_same<NT, Argument_type>::value));
|
CGAL_static_assertion((::std::is_same<NT, Argument_type>::value));
|
||||||
CGAL_static_assertion((::boost::is_same< typename Argument_type::Interval, Result_type>::value));
|
CGAL_static_assertion((::std::is_same< typename Argument_type::Interval, Result_type>::value));
|
||||||
|
|
||||||
// TODO: NiX::in not available!?
|
// TODO: NiX::in not available!?
|
||||||
//assert(NiX::in(42.0,to_Interval(NT(42))));
|
//assert(NiX::in(42.0,to_Interval(NT(42))));
|
||||||
|
|
@ -99,7 +99,7 @@ void test_real_comparable() {
|
||||||
typedef CGAL::Real_embeddable_traits<NT> Traits;
|
typedef CGAL::Real_embeddable_traits<NT> Traits;
|
||||||
typedef typename Traits::Is_real_embeddable Is_real_comparable;
|
typedef typename Traits::Is_real_embeddable Is_real_comparable;
|
||||||
using ::CGAL::Tag_true;
|
using ::CGAL::Tag_true;
|
||||||
CGAL_static_assertion((::boost::is_same< Is_real_comparable, Tag_true>::value));
|
CGAL_static_assertion((::std::is_same< Is_real_comparable, Tag_true>::value));
|
||||||
typename Traits::Compare compare;
|
typename Traits::Compare compare;
|
||||||
typename Traits::Sign sign;
|
typename Traits::Sign sign;
|
||||||
typename Traits::Abs abs;
|
typename Traits::Abs abs;
|
||||||
|
|
@ -168,20 +168,20 @@ void test_not_real_comparable() {
|
||||||
typedef CGAL::Real_embeddable_traits<NT> Traits;
|
typedef CGAL::Real_embeddable_traits<NT> Traits;
|
||||||
typedef typename Traits::Is_real_embeddable Is_real_comparable;
|
typedef typename Traits::Is_real_embeddable Is_real_comparable;
|
||||||
using ::CGAL::Tag_false;
|
using ::CGAL::Tag_false;
|
||||||
CGAL_static_assertion((::boost::is_same< Is_real_comparable, Tag_false>::value));
|
CGAL_static_assertion((::std::is_same< Is_real_comparable, Tag_false>::value));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template <class NT, class CeilLog2Abs>
|
template <class NT, class CeilLog2Abs>
|
||||||
void test_rounded_log2_abs(NT zero, ::CGAL::Null_functor, CeilLog2Abs) {
|
void test_rounded_log2_abs(NT zero, ::CGAL::Null_functor, CeilLog2Abs) {
|
||||||
typedef ::CGAL::Null_functor Nulltype;
|
typedef ::CGAL::Null_functor Nulltype;
|
||||||
CGAL_static_assertion((::boost::is_same< CeilLog2Abs, Nulltype>::value));
|
CGAL_static_assertion((::std::is_same< CeilLog2Abs, Nulltype>::value));
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class NT, class FloorLog2Abs, class CeilLog2Abs>
|
template <class NT, class FloorLog2Abs, class CeilLog2Abs>
|
||||||
void test_rounded_log2_abs(NT zero, FloorLog2Abs fl_log, CeilLog2Abs cl_log) {
|
void test_rounded_log2_abs(NT zero, FloorLog2Abs fl_log, CeilLog2Abs cl_log) {
|
||||||
typedef ::CGAL::Null_functor Null_functor;
|
typedef ::CGAL::Null_functor Null_functor;
|
||||||
CGAL_static_assertion((!::boost::is_same< CeilLog2Abs, Null_functor>::value));
|
CGAL_static_assertion((!::std::is_same< CeilLog2Abs, Null_functor>::value));
|
||||||
|
|
||||||
assert( fl_log(NT( 7)) == 2 );
|
assert( fl_log(NT( 7)) == 2 );
|
||||||
assert( cl_log(NT( 7)) == 3 );
|
assert( cl_log(NT( 7)) == 3 );
|
||||||
|
|
|
||||||
|
|
@ -22,10 +22,10 @@
|
||||||
|
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
#include <type_traits>
|
||||||
#include <CGAL/Bbox_2.h>
|
#include <CGAL/Bbox_2.h>
|
||||||
#include <CGAL/Root_of_traits.h>
|
#include <CGAL/Root_of_traits.h>
|
||||||
#include <CGAL/Handle_for.h>
|
#include <CGAL/Handle_for.h>
|
||||||
#include <boost/type_traits/is_same.hpp>
|
|
||||||
|
|
||||||
namespace CGAL {
|
namespace CGAL {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -63,8 +63,8 @@ public:
|
||||||
// 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.
|
||||||
CGAL_static_assertion(
|
CGAL_static_assertion(
|
||||||
(boost::is_same<ExactAlphaComparisonTag, Tag_false>::value) ||
|
(std::is_same<ExactAlphaComparisonTag, Tag_false>::value) ||
|
||||||
(boost::is_same<typename Dt::Periodic_tag, Tag_false>::value));
|
(std::is_same<typename Dt::Periodic_tag, Tag_false>::value));
|
||||||
|
|
||||||
typedef typename internal::Alpha_nt_selector_2<
|
typedef typename internal::Alpha_nt_selector_2<
|
||||||
Gt, ExactAlphaComparisonTag, typename Dt::Weighted_tag>::Type_of_alpha Type_of_alpha;
|
Gt, ExactAlphaComparisonTag, typename Dt::Weighted_tag>::Type_of_alpha Type_of_alpha;
|
||||||
|
|
@ -77,8 +77,8 @@ public:
|
||||||
typedef Type_of_alpha FT;
|
typedef Type_of_alpha FT;
|
||||||
|
|
||||||
// check that simplices are correctly instantiated
|
// check that simplices are correctly instantiated
|
||||||
CGAL_static_assertion( (boost::is_same<NT, typename Dt::Face::NT>::value) );
|
CGAL_static_assertion( (std::is_same<NT, typename Dt::Face::NT>::value) );
|
||||||
CGAL_static_assertion( (boost::is_same<NT, typename Dt::Vertex::NT>::value) );
|
CGAL_static_assertion( (std::is_same<NT, typename Dt::Vertex::NT>::value) );
|
||||||
|
|
||||||
typedef typename Dt::Point Point;
|
typedef typename Dt::Point Point;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -26,8 +26,6 @@
|
||||||
#include <CGAL/Unique_hash_map.h>
|
#include <CGAL/Unique_hash_map.h>
|
||||||
#include <CGAL/Triangulation_utils_3.h>
|
#include <CGAL/Triangulation_utils_3.h>
|
||||||
|
|
||||||
#include <boost/type_traits/is_same.hpp>
|
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <map>
|
#include <map>
|
||||||
|
|
@ -35,6 +33,7 @@
|
||||||
#include <set>
|
#include <set>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
#include <type_traits>
|
||||||
|
|
||||||
//-------------------------------------------------------------------
|
//-------------------------------------------------------------------
|
||||||
namespace CGAL {
|
namespace CGAL {
|
||||||
|
|
@ -99,8 +98,8 @@ public:
|
||||||
// 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.
|
||||||
CGAL_static_assertion(
|
CGAL_static_assertion(
|
||||||
(boost::is_same<ExactAlphaComparisonTag, Tag_false>::value) ||
|
(std::is_same<ExactAlphaComparisonTag, Tag_false>::value) ||
|
||||||
(boost::is_same<typename Dt::Periodic_tag, Tag_false>::value));
|
(std::is_same<typename Dt::Periodic_tag, Tag_false>::value));
|
||||||
|
|
||||||
//extra the type used for representing alpha according to ExactAlphaComparisonTag
|
//extra the type used for representing alpha according to ExactAlphaComparisonTag
|
||||||
typedef typename internal::Alpha_nt_selector_3<Gt,ExactAlphaComparisonTag,typename Dt::Weighted_tag>::Type_of_alpha NT;
|
typedef typename internal::Alpha_nt_selector_3<Gt,ExactAlphaComparisonTag,typename Dt::Weighted_tag>::Type_of_alpha NT;
|
||||||
|
|
@ -109,8 +108,8 @@ public:
|
||||||
typedef typename Gt::FT Coord_type;
|
typedef typename Gt::FT Coord_type;
|
||||||
|
|
||||||
//checks whether tags are correctly set in Vertex and Cell classes
|
//checks whether tags are correctly set in Vertex and Cell classes
|
||||||
CGAL_static_assertion( (boost::is_same<NT,typename Dt::Cell::NT>::value) );
|
CGAL_static_assertion( (std::is_same<NT,typename Dt::Cell::NT>::value) );
|
||||||
CGAL_static_assertion( (boost::is_same<NT,typename Dt::Vertex::Alpha_status::NT>::value) );
|
CGAL_static_assertion( (std::is_same<NT,typename Dt::Vertex::Alpha_status::NT>::value) );
|
||||||
|
|
||||||
typedef typename Dt::Point Point;
|
typedef typename Dt::Point Point;
|
||||||
|
|
||||||
|
|
@ -320,7 +319,7 @@ private :
|
||||||
}
|
}
|
||||||
|
|
||||||
// the version to be used with Tag_true is templated to avoid
|
// the version to be used with Tag_true is templated to avoid
|
||||||
// instanciation through explicit instantiation of the whole class
|
// instantiation through explicit instantiation of the whole class
|
||||||
void set_alpha_min_of_vertices(Tag_false)
|
void set_alpha_min_of_vertices(Tag_false)
|
||||||
{
|
{
|
||||||
for( Finite_vertices_iterator vit = finite_vertices_begin();
|
for( Finite_vertices_iterator vit = finite_vertices_begin();
|
||||||
|
|
|
||||||
|
|
@ -359,6 +359,12 @@ and offset set to 1/30 of alpha (i.e., 1/600 of the bounding box diagonal edge l
|
||||||
|
|
||||||
\cgalExample{Alpha_wrap_3/triangle_mesh_wrap.cpp}
|
\cgalExample{Alpha_wrap_3/triangle_mesh_wrap.cpp}
|
||||||
|
|
||||||
|
Some triangle soups might not be representable as a mesh due to non-manifoldness or incompatible orientations.
|
||||||
|
Such triangle soup is nevertheless a valid input for the wrapping algorithm, as illustrated
|
||||||
|
in the following example.
|
||||||
|
|
||||||
|
\cgalExample{Alpha_wrap_3/triangle_soup_wrap.cpp}
|
||||||
|
|
||||||
Here is an example with a point cloud.
|
Here is an example with a point cloud.
|
||||||
|
|
||||||
\cgalExample{Alpha_wrap_3/point_set_wrap.cpp}
|
\cgalExample{Alpha_wrap_3/point_set_wrap.cpp}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
/*!
|
/*!
|
||||||
\example Alpha_wrap_3/triangle_mesh_wrap.cpp
|
\example Alpha_wrap_3/triangle_mesh_wrap.cpp
|
||||||
|
\example Alpha_wrap_3/triangle_soup_wrap.cpp
|
||||||
\example Alpha_wrap_3/point_set_wrap.cpp
|
\example Alpha_wrap_3/point_set_wrap.cpp
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@ find_package(CGAL REQUIRED)
|
||||||
|
|
||||||
# create a target per cppfile
|
# create a target per cppfile
|
||||||
create_single_source_cgal_program("triangle_mesh_wrap.cpp")
|
create_single_source_cgal_program("triangle_mesh_wrap.cpp")
|
||||||
|
create_single_source_cgal_program("triangle_soup_wrap.cpp")
|
||||||
create_single_source_cgal_program("point_set_wrap.cpp")
|
create_single_source_cgal_program("point_set_wrap.cpp")
|
||||||
create_single_source_cgal_program("wrap_from_cavity.cpp")
|
create_single_source_cgal_program("wrap_from_cavity.cpp")
|
||||||
create_single_source_cgal_program("mixed_inputs_wrap.cpp")
|
create_single_source_cgal_program("mixed_inputs_wrap.cpp")
|
||||||
|
|
|
||||||
|
|
@ -45,6 +45,7 @@ int main(int argc, char** argv)
|
||||||
|
|
||||||
const double alpha = diag_length / relative_alpha;
|
const double alpha = diag_length / relative_alpha;
|
||||||
const double offset = diag_length / relative_offset;
|
const double offset = diag_length / relative_offset;
|
||||||
|
std::cout << "alpha: " << alpha << ", offset: " << offset << std::endl;
|
||||||
|
|
||||||
// Construct the wrap
|
// Construct the wrap
|
||||||
CGAL::Real_timer t;
|
CGAL::Real_timer t;
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,76 @@
|
||||||
|
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
|
||||||
|
#include <CGAL/Surface_mesh.h>
|
||||||
|
|
||||||
|
#include <CGAL/alpha_wrap_3.h>
|
||||||
|
#include <CGAL/Polygon_mesh_processing/bbox.h>
|
||||||
|
#include <CGAL/IO/polygon_soup_io.h>
|
||||||
|
#include <CGAL/Real_timer.h>
|
||||||
|
|
||||||
|
#include <array>
|
||||||
|
#include <iostream>
|
||||||
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
|
namespace AW3 = CGAL::Alpha_wraps_3;
|
||||||
|
|
||||||
|
using K = CGAL::Exact_predicates_inexact_constructions_kernel;
|
||||||
|
using Point_3 = K::Point_3;
|
||||||
|
|
||||||
|
using Mesh = CGAL::Surface_mesh<Point_3>;
|
||||||
|
|
||||||
|
int main(int argc, char** argv)
|
||||||
|
{
|
||||||
|
std::cout.precision(17);
|
||||||
|
|
||||||
|
// Read the input
|
||||||
|
const std::string filename = (argc > 1) ? argv[1] : CGAL::data_file_path("meshes/blobby-shuffled.off");
|
||||||
|
std::cout << "Reading " << filename << "..." << std::endl;
|
||||||
|
|
||||||
|
std::vector<Point_3> points;
|
||||||
|
std::vector<std::array<std::size_t, 3> > faces;
|
||||||
|
if(!CGAL::IO::read_polygon_soup(filename, points, faces) || faces.empty())
|
||||||
|
{
|
||||||
|
std::cerr << "Invalid input." << std::endl;
|
||||||
|
return EXIT_FAILURE;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::cout << "Input: " << points.size() << " points, " << faces.size() << " faces" << std::endl;
|
||||||
|
|
||||||
|
// Compute the alpha and offset values
|
||||||
|
const double relative_alpha = (argc > 2) ? std::stod(argv[2]) : 20.;
|
||||||
|
const double relative_offset = (argc > 3) ? std::stod(argv[3]) : 600.;
|
||||||
|
|
||||||
|
CGAL::Bbox_3 bbox;
|
||||||
|
for(const Point_3& p : points)
|
||||||
|
bbox += p.bbox();
|
||||||
|
|
||||||
|
const double diag_length = std::sqrt(CGAL::square(bbox.xmax() - bbox.xmin()) +
|
||||||
|
CGAL::square(bbox.ymax() - bbox.ymin()) +
|
||||||
|
CGAL::square(bbox.zmax() - bbox.zmin()));
|
||||||
|
|
||||||
|
const double alpha = diag_length / relative_alpha;
|
||||||
|
const double offset = diag_length / relative_offset;
|
||||||
|
|
||||||
|
// Construct the wrap
|
||||||
|
CGAL::Real_timer t;
|
||||||
|
t.start();
|
||||||
|
|
||||||
|
Mesh wrap;
|
||||||
|
CGAL::alpha_wrap_3(points, faces, alpha, offset, wrap);
|
||||||
|
|
||||||
|
t.stop();
|
||||||
|
std::cout << "Result: " << num_vertices(wrap) << " vertices, " << num_faces(wrap) << " faces" << std::endl;
|
||||||
|
std::cout << "Took " << t.time() << " s." << std::endl;
|
||||||
|
|
||||||
|
// Save the result
|
||||||
|
std::string input_name = std::string(filename);
|
||||||
|
input_name = input_name.substr(input_name.find_last_of("/") + 1, input_name.length() - 1);
|
||||||
|
input_name = input_name.substr(0, input_name.find_last_of("."));
|
||||||
|
std::string output_name = input_name
|
||||||
|
+ "_" + std::to_string(static_cast<int>(relative_alpha))
|
||||||
|
+ "_" + std::to_string(static_cast<int>(relative_offset)) + ".off";
|
||||||
|
std::cout << "Writing to " << output_name << std::endl;
|
||||||
|
CGAL::IO::write_polygon_mesh(output_name, wrap, CGAL::parameters::stream_precision(17));
|
||||||
|
|
||||||
|
return EXIT_SUCCESS;
|
||||||
|
}
|
||||||
|
|
@ -99,6 +99,32 @@ public:
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct Wrapping_default_visitor
|
||||||
|
{
|
||||||
|
Wrapping_default_visitor() { }
|
||||||
|
|
||||||
|
template <typename AlphaWrapper>
|
||||||
|
void on_alpha_wrapping_begin(const AlphaWrapper&) { }
|
||||||
|
|
||||||
|
template <typename AlphaWrapper>
|
||||||
|
void on_flood_fill_begin(const AlphaWrapper&) { }
|
||||||
|
|
||||||
|
template <typename AlphaWrapper, typename Gate>
|
||||||
|
void before_facet_treatment(const AlphaWrapper&, const Gate&) { }
|
||||||
|
|
||||||
|
template <typename Wrapper, typename Point>
|
||||||
|
void before_Steiner_point_insertion(const Wrapper&, const Point&) { }
|
||||||
|
|
||||||
|
template <typename Wrapper, typename VertexHandle>
|
||||||
|
void after_Steiner_point_insertion(const Wrapper&, VertexHandle) { }
|
||||||
|
|
||||||
|
template <typename AlphaWrapper>
|
||||||
|
void on_flood_fill_end(const AlphaWrapper&) { }
|
||||||
|
|
||||||
|
template <typename AlphaWrapper>
|
||||||
|
void on_alpha_wrapping_end(const AlphaWrapper&) { };
|
||||||
|
};
|
||||||
|
|
||||||
template <typename Oracle>
|
template <typename Oracle>
|
||||||
class Alpha_wrap_3
|
class Alpha_wrap_3
|
||||||
{
|
{
|
||||||
|
|
@ -172,6 +198,9 @@ public:
|
||||||
|
|
||||||
public:
|
public:
|
||||||
const Geom_traits& geom_traits() const { return m_dt.geom_traits(); }
|
const Geom_traits& geom_traits() const { return m_dt.geom_traits(); }
|
||||||
|
Dt& triangulation() { return m_dt; }
|
||||||
|
const Dt& triangulation() const { return m_dt; }
|
||||||
|
const Alpha_PQ& queue() const { return m_queue; }
|
||||||
|
|
||||||
double default_alpha() const
|
double default_alpha() const
|
||||||
{
|
{
|
||||||
|
|
@ -216,6 +245,15 @@ public:
|
||||||
OVPM ovpm = choose_parameter(get_parameter(np, internal_np::vertex_point),
|
OVPM ovpm = choose_parameter(get_parameter(np, internal_np::vertex_point),
|
||||||
get_property_map(vertex_point, output_mesh));
|
get_property_map(vertex_point, output_mesh));
|
||||||
|
|
||||||
|
typedef typename internal_np::Lookup_named_param_def <
|
||||||
|
internal_np::visitor_t,
|
||||||
|
NamedParameters,
|
||||||
|
Wrapping_default_visitor // default
|
||||||
|
>::reference Visitor;
|
||||||
|
|
||||||
|
Wrapping_default_visitor default_visitor;
|
||||||
|
Visitor visitor = choose_parameter(get_parameter_reference(np, internal_np::visitor), default_visitor);
|
||||||
|
|
||||||
std::vector<Point_3> no_seeds;
|
std::vector<Point_3> no_seeds;
|
||||||
using Seeds = typename internal_np::Lookup_named_param_def<
|
using Seeds = typename internal_np::Lookup_named_param_def<
|
||||||
internal_np::seed_points_t, NamedParameters, std::vector<Point_3> >::reference;
|
internal_np::seed_points_t, NamedParameters, std::vector<Point_3> >::reference;
|
||||||
|
|
@ -228,6 +266,8 @@ public:
|
||||||
t.start();
|
t.start();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
visitor.on_alpha_wrapping_begin(*this);
|
||||||
|
|
||||||
if(!initialize(alpha, offset, seeds))
|
if(!initialize(alpha, offset, seeds))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
@ -237,7 +277,7 @@ public:
|
||||||
CGAL::parameters::vertex_point_map(ovpm).stream_precision(17));
|
CGAL::parameters::vertex_point_map(ovpm).stream_precision(17));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
alpha_flood_fill();
|
alpha_flood_fill(visitor);
|
||||||
|
|
||||||
#ifdef CGAL_AW3_TIMER
|
#ifdef CGAL_AW3_TIMER
|
||||||
t.stop();
|
t.stop();
|
||||||
|
|
@ -315,6 +355,8 @@ public:
|
||||||
dump_triangulation_faces("final_dt3.off", false /*only_boundary_faces*/);
|
dump_triangulation_faces("final_dt3.off", false /*only_boundary_faces*/);
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
visitor.on_alpha_wrapping_end(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Convenience overloads
|
// Convenience overloads
|
||||||
|
|
@ -607,11 +649,12 @@ private:
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public:
|
||||||
// Manifoldness is tolerated while debugging and extracting at intermediate states
|
// Manifoldness is tolerated while debugging and extracting at intermediate states
|
||||||
// Not the preferred way because it uses 3*nv storage
|
// Not the preferred way because it uses 3*nv storage
|
||||||
template <typename OutputMesh, typename OVPM>
|
template <typename OutputMesh, typename OVPM>
|
||||||
void extract_possibly_non_manifold_surface(OutputMesh& output_mesh,
|
void extract_possibly_non_manifold_surface(OutputMesh& output_mesh,
|
||||||
OVPM ovpm)
|
OVPM ovpm) const
|
||||||
{
|
{
|
||||||
namespace PMP = Polygon_mesh_processing;
|
namespace PMP = Polygon_mesh_processing;
|
||||||
|
|
||||||
|
|
@ -696,7 +739,7 @@ private:
|
||||||
|
|
||||||
template <typename OutputMesh, typename OVPM>
|
template <typename OutputMesh, typename OVPM>
|
||||||
void extract_manifold_surface(OutputMesh& output_mesh,
|
void extract_manifold_surface(OutputMesh& output_mesh,
|
||||||
OVPM ovpm)
|
OVPM ovpm) const
|
||||||
{
|
{
|
||||||
namespace PMP = Polygon_mesh_processing;
|
namespace PMP = Polygon_mesh_processing;
|
||||||
|
|
||||||
|
|
@ -748,7 +791,12 @@ private:
|
||||||
if(faces.empty())
|
if(faces.empty())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
CGAL_assertion(PMP::is_polygon_soup_a_polygon_mesh(faces));
|
if(!PMP::is_polygon_soup_a_polygon_mesh(faces))
|
||||||
|
{
|
||||||
|
CGAL_warning_msg(false, "Could NOT extract mesh...");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
PMP::polygon_soup_to_polygon_mesh(points, faces, output_mesh,
|
PMP::polygon_soup_to_polygon_mesh(points, faces, output_mesh,
|
||||||
CGAL::parameters::default_values(),
|
CGAL::parameters::default_values(),
|
||||||
CGAL::parameters::vertex_point_map(ovpm));
|
CGAL::parameters::vertex_point_map(ovpm));
|
||||||
|
|
@ -763,7 +811,7 @@ private:
|
||||||
template <typename OutputMesh, typename OVPM>
|
template <typename OutputMesh, typename OVPM>
|
||||||
void extract_surface(OutputMesh& output_mesh,
|
void extract_surface(OutputMesh& output_mesh,
|
||||||
OVPM ovpm,
|
OVPM ovpm,
|
||||||
const bool tolerate_non_manifoldness = false)
|
const bool tolerate_non_manifoldness = false) const
|
||||||
{
|
{
|
||||||
if(tolerate_non_manifoldness)
|
if(tolerate_non_manifoldness)
|
||||||
extract_possibly_non_manifold_surface(output_mesh, ovpm);
|
extract_possibly_non_manifold_surface(output_mesh, ovpm);
|
||||||
|
|
@ -990,12 +1038,15 @@ private:
|
||||||
return initialize_with_cavities(seeds);
|
return initialize_with_cavities(seeds);
|
||||||
}
|
}
|
||||||
|
|
||||||
void alpha_flood_fill()
|
template <typename Visitor>
|
||||||
|
void alpha_flood_fill(Visitor& visitor)
|
||||||
{
|
{
|
||||||
#ifdef CGAL_AW3_DEBUG
|
#ifdef CGAL_AW3_DEBUG
|
||||||
std::cout << "> Flood fill..." << std::endl;
|
std::cout << "> Flood fill..." << std::endl;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
visitor.on_flood_fill_begin(*this);
|
||||||
|
|
||||||
// Explore all finite cells that are reachable from one of the initial outside cells.
|
// Explore all finite cells that are reachable from one of the initial outside cells.
|
||||||
while(!m_queue.empty())
|
while(!m_queue.empty())
|
||||||
{
|
{
|
||||||
|
|
@ -1022,6 +1073,8 @@ private:
|
||||||
std::cout << "Priority: " << gate.priority() << std::endl;
|
std::cout << "Priority: " << gate.priority() << std::endl;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
visitor.before_facet_treatment(*this, gate);
|
||||||
|
|
||||||
m_queue.pop();
|
m_queue.pop();
|
||||||
|
|
||||||
#ifdef CGAL_AW3_DEBUG_DUMP_EVERY_STEP
|
#ifdef CGAL_AW3_DEBUG_DUMP_EVERY_STEP
|
||||||
|
|
@ -1082,10 +1135,14 @@ private:
|
||||||
m_queue.erase(Gate(mf));
|
m_queue.erase(Gate(mf));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
visitor.before_Steiner_point_insertion(*this, steiner_point);
|
||||||
|
|
||||||
// Actual insertion of the Steiner point
|
// Actual insertion of the Steiner point
|
||||||
Vertex_handle vh = m_dt.insert(steiner_point, lt, conflict_cell, li, lj);
|
Vertex_handle vh = m_dt.insert(steiner_point, lt, conflict_cell, li, lj);
|
||||||
vh->info() = DEFAULT;
|
vh->info() = DEFAULT;
|
||||||
|
|
||||||
|
visitor.after_Steiner_point_insertion(*this, vh);
|
||||||
|
|
||||||
std::vector<Cell_handle> new_cells;
|
std::vector<Cell_handle> new_cells;
|
||||||
new_cells.reserve(32);
|
new_cells.reserve(32);
|
||||||
m_dt.incident_cells(vh, std::back_inserter(new_cells));
|
m_dt.incident_cells(vh, std::back_inserter(new_cells));
|
||||||
|
|
@ -1133,6 +1190,8 @@ private:
|
||||||
}
|
}
|
||||||
} // while(!queue.empty())
|
} // while(!queue.empty())
|
||||||
|
|
||||||
|
visitor.on_flood_fill_end(*this);
|
||||||
|
|
||||||
// Check that no useful facet has been ignored
|
// Check that no useful facet has been ignored
|
||||||
CGAL_postcondition_code(for(auto fit=m_dt.finite_facets_begin(), fend=m_dt.finite_facets_end(); fit!=fend; ++fit) {)
|
CGAL_postcondition_code(for(auto fit=m_dt.finite_facets_begin(), fend=m_dt.finite_facets_end(); fit!=fend; ++fit) {)
|
||||||
CGAL_postcondition_code( if(fit->first->info().is_outside == fit->first->neighbor(fit->second)->info().is_outside) continue;)
|
CGAL_postcondition_code( if(fit->first->info().is_outside == fit->first->neighbor(fit->second)->info().is_outside) continue;)
|
||||||
|
|
|
||||||
|
|
@ -145,6 +145,8 @@ public:
|
||||||
bool empty() const { return m_tree_ptr->empty(); }
|
bool empty() const { return m_tree_ptr->empty(); }
|
||||||
bool do_call() const { return (!empty() || base().do_call()); }
|
bool do_call() const { return (!empty() || base().do_call()); }
|
||||||
|
|
||||||
|
void clear() { m_tree_ptr->clear() && base().clear(); }
|
||||||
|
|
||||||
public:
|
public:
|
||||||
typename AABB_tree::Bounding_box bbox() const
|
typename AABB_tree::Bounding_box bbox() const
|
||||||
{
|
{
|
||||||
|
|
@ -313,6 +315,8 @@ public:
|
||||||
bool empty() const { return m_tree_ptr->empty(); }
|
bool empty() const { return m_tree_ptr->empty(); }
|
||||||
bool do_call() const { return !empty(); }
|
bool do_call() const { return !empty(); }
|
||||||
|
|
||||||
|
void clear() { m_tree_ptr->clear(); }
|
||||||
|
|
||||||
public:
|
public:
|
||||||
typename AABB_tree::Bounding_box bbox() const
|
typename AABB_tree::Bounding_box bbox() const
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -148,7 +148,7 @@ void alpha_wrap_3(const PointRange& points,
|
||||||
OutputMesh& alpha_wrap,
|
OutputMesh& alpha_wrap,
|
||||||
const CGAL::Named_function_parameters<T_I, Tag_I, Base_I>& in_np,
|
const CGAL::Named_function_parameters<T_I, Tag_I, Base_I>& in_np,
|
||||||
const CGAL::Named_function_parameters<T_O, Tag_O, Base_O>& out_np,
|
const CGAL::Named_function_parameters<T_O, Tag_O, Base_O>& out_np,
|
||||||
typename std::enable_if<boost::has_range_const_iterator<FaceRange>::value>::type* = nullptr)
|
std::enable_if_t<boost::has_range_const_iterator<FaceRange>::value>* = nullptr)
|
||||||
{
|
{
|
||||||
return alpha_wrap_3(points, faces, alpha, alpha / 30., alpha_wrap, in_np, out_np);
|
return alpha_wrap_3(points, faces, alpha, alpha / 30., alpha_wrap, in_np, out_np);
|
||||||
}
|
}
|
||||||
|
|
@ -160,7 +160,7 @@ void alpha_wrap_3(const PointRange& points,
|
||||||
const double alpha,
|
const double alpha,
|
||||||
OutputMesh& alpha_wrap,
|
OutputMesh& alpha_wrap,
|
||||||
const CGAL_NP_CLASS& in_np,
|
const CGAL_NP_CLASS& in_np,
|
||||||
typename std::enable_if<boost::has_range_const_iterator<FaceRange>::value>::type* = nullptr)
|
std::enable_if_t<boost::has_range_const_iterator<FaceRange>::value>* = nullptr)
|
||||||
{
|
{
|
||||||
return alpha_wrap_3(points, faces, alpha, alpha / 30., alpha_wrap, in_np,
|
return alpha_wrap_3(points, faces, alpha, alpha / 30., alpha_wrap, in_np,
|
||||||
CGAL::parameters::default_values());
|
CGAL::parameters::default_values());
|
||||||
|
|
@ -171,7 +171,7 @@ void alpha_wrap_3(const PointRange& points,
|
||||||
const FaceRange& faces,
|
const FaceRange& faces,
|
||||||
const double alpha,
|
const double alpha,
|
||||||
OutputMesh& alpha_wrap,
|
OutputMesh& alpha_wrap,
|
||||||
typename std::enable_if<boost::has_range_const_iterator<FaceRange>::value>::type* = nullptr)
|
std::enable_if_t<boost::has_range_const_iterator<FaceRange>::value>* = nullptr)
|
||||||
{
|
{
|
||||||
return alpha_wrap_3(points, faces, alpha, alpha / 30., alpha_wrap,
|
return alpha_wrap_3(points, faces, alpha, alpha / 30., alpha_wrap,
|
||||||
CGAL::parameters::default_values(), CGAL::parameters::default_values());
|
CGAL::parameters::default_values(), CGAL::parameters::default_values());
|
||||||
|
|
@ -245,7 +245,7 @@ void alpha_wrap_3(const TriangleMesh& tmesh,
|
||||||
const InputNamedParameters& in_np,
|
const InputNamedParameters& in_np,
|
||||||
const OutputNamedParameters& out_np
|
const OutputNamedParameters& out_np
|
||||||
#ifndef DOXYGEN_RUNNING
|
#ifndef DOXYGEN_RUNNING
|
||||||
, typename std::enable_if<! boost::has_range_const_iterator<TriangleMesh>::value>::type* = nullptr
|
, std::enable_if_t<! boost::has_range_const_iterator<TriangleMesh>::value>* = nullptr
|
||||||
#endif
|
#endif
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
|
@ -338,7 +338,7 @@ void alpha_wrap_3(const PointRange& points,
|
||||||
#else
|
#else
|
||||||
const CGAL::Named_function_parameters<T_I, Tag_I, Base_I>& in_np,
|
const CGAL::Named_function_parameters<T_I, Tag_I, Base_I>& in_np,
|
||||||
const CGAL::Named_function_parameters<T_O, Tag_O, Base_O>& out_np,
|
const CGAL::Named_function_parameters<T_O, Tag_O, Base_O>& out_np,
|
||||||
typename std::enable_if<boost::has_range_const_iterator<PointRange>::value>::type* = nullptr
|
std::enable_if_t<boost::has_range_const_iterator<PointRange>::value>* = nullptr
|
||||||
#endif
|
#endif
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -18,17 +18,17 @@ int main() {
|
||||||
{
|
{
|
||||||
typedef CGAL::Get_arithmetic_kernel<Integer>::Arithmetic_kernel AK_;
|
typedef CGAL::Get_arithmetic_kernel<Integer>::Arithmetic_kernel AK_;
|
||||||
CGAL_USE_TYPE(AK_);
|
CGAL_USE_TYPE(AK_);
|
||||||
CGAL_static_assertion((boost::is_same<AK,AK_>::value));
|
CGAL_static_assertion((std::is_same<AK,AK_>::value));
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
typedef CGAL::Get_arithmetic_kernel<Rational>::Arithmetic_kernel AK_;
|
typedef CGAL::Get_arithmetic_kernel<Rational>::Arithmetic_kernel AK_;
|
||||||
CGAL_USE_TYPE(AK_);
|
CGAL_USE_TYPE(AK_);
|
||||||
CGAL_static_assertion((boost::is_same<AK,AK_>::value));
|
CGAL_static_assertion((std::is_same<AK,AK_>::value));
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
typedef CGAL::Get_arithmetic_kernel<BFI>::Arithmetic_kernel AK_;
|
typedef CGAL::Get_arithmetic_kernel<BFI>::Arithmetic_kernel AK_;
|
||||||
CGAL_USE_TYPE(AK_);
|
CGAL_USE_TYPE(AK_);
|
||||||
CGAL_static_assertion((boost::is_same<AK,AK_>::value));
|
CGAL_static_assertion((std::is_same<AK,AK_>::value));
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -85,7 +85,7 @@ Option_parser::Option_parser() :
|
||||||
m_generic_opts.add_options()
|
m_generic_opts.add_options()
|
||||||
("author,a", "print author name(s)")
|
("author,a", "print author name(s)")
|
||||||
("help,h", "print help message")
|
("help,h", "print help message")
|
||||||
("license,l", "print licence information")
|
("license,l", "print license information")
|
||||||
("version,v", "print version string")
|
("version,v", "print version string")
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -289,7 +289,7 @@ ArrangementPainterOstream<CGAL::Arr_linear_traits_2<Kernel_>>::operator<<(
|
||||||
QRectF seg_bb = this->convert(seg.bbox());
|
QRectF seg_bb = this->convert(seg.bbox());
|
||||||
if (
|
if (
|
||||||
this->clippingRect.isValid() &&
|
this->clippingRect.isValid() &&
|
||||||
!this->clippingRect.intersects(seg_bb) &
|
!this->clippingRect.intersects(seg_bb) &&
|
||||||
(!seg.is_horizontal() && !seg.is_vertical()))
|
(!seg.is_horizontal() && !seg.is_vertical()))
|
||||||
{ return *this; }
|
{ return *this; }
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -25,14 +25,14 @@
|
||||||
#include <QKeyEvent>
|
#include <QKeyEvent>
|
||||||
|
|
||||||
template <std::size_t I = 0, typename FuncT, typename... Tp>
|
template <std::size_t I = 0, typename FuncT, typename... Tp>
|
||||||
inline typename std::enable_if<I == sizeof...(Tp), void>::type
|
inline std::enable_if_t<I == sizeof...(Tp), void>
|
||||||
for_each(std::tuple<Tp...>&, FuncT)
|
for_each(std::tuple<Tp...>&, FuncT)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
template <std::size_t I = 0, typename FuncT, typename... Tp>
|
template <std::size_t I = 0, typename FuncT, typename... Tp>
|
||||||
inline typename std::enable_if <
|
inline std::enable_if_t <
|
||||||
I<sizeof...(Tp), void>::type for_each(std::tuple<Tp...>& t, FuncT f)
|
I<sizeof...(Tp), void> for_each(std::tuple<Tp...>& t, FuncT f)
|
||||||
{
|
{
|
||||||
f(std::get<I>(t));
|
f(std::get<I>(t));
|
||||||
for_each<I + 1, FuncT, Tp...>(t, f);
|
for_each<I + 1, FuncT, Tp...>(t, f);
|
||||||
|
|
|
||||||
|
|
@ -1937,8 +1937,8 @@ perform a point-location query on the resulting arrangement. The query
|
||||||
point \f$q\f$ is drawn as a plus sign. The face that contains it is
|
point \f$q\f$ is drawn as a plus sign. The face that contains it is
|
||||||
drawn with a shaded texture. The program calls an instance of the
|
drawn with a shaded texture. The program calls an instance of the
|
||||||
function template `print_arrangement_size()`, which prints
|
function template `print_arrangement_size()`, which prints
|
||||||
quantitative measures of the arrangement; see \ref lst_paz "code
|
quantitative measures of the arrangement; see \ref lst_paz
|
||||||
example" for its listing in Section \ref aos_ssec-basic-arr_class.
|
"code example" for its listing in Section \ref aos_ssec-basic-arr_class.
|
||||||
|
|
||||||
\cgalExample{Arrangement_on_surface_2/incremental_insertion.cpp}
|
\cgalExample{Arrangement_on_surface_2/incremental_insertion.cpp}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -112,7 +112,7 @@ public:
|
||||||
typedef X_monotone_curve_2 Curve_2;
|
typedef X_monotone_curve_2 Curve_2;
|
||||||
|
|
||||||
//! A functor that trims curves.
|
//! A functor that trims curves.
|
||||||
Class Trim_2 {
|
class Trim_2 {
|
||||||
public:
|
public:
|
||||||
//! \name Creation
|
//! \name Creation
|
||||||
//! @{
|
//! @{
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,6 @@ namespace ArrTraits {
|
||||||
* \cgalHasModel ArrangementClosedLeftTraits_2::Compare_y_on_boundary_2
|
* \cgalHasModel ArrangementClosedLeftTraits_2::Compare_y_on_boundary_2
|
||||||
* \cgalHasModel ArrangementClosedRightTraits_2::Compare_y_on_boundary_2
|
* \cgalHasModel ArrangementClosedRightTraits_2::Compare_y_on_boundary_2
|
||||||
* \cgalHasModel ArrangementIdentifiedVerticalTraits_2::Compare_y_on_boundary_2
|
* \cgalHasModel ArrangementIdentifiedVerticalTraits_2::Compare_y_on_boundary_2
|
||||||
* \cgalHasModel ArrangementOpenBoundaryTraits_2::Compare_y_on_boundary_2
|
|
||||||
* \cgalHasModel ArrangementSphericalBoundaryTraits_2::Compare_y_on_boundary_2
|
* \cgalHasModel ArrangementSphericalBoundaryTraits_2::Compare_y_on_boundary_2
|
||||||
*/
|
*/
|
||||||
class CompareYOnBoundary_2 {
|
class CompareYOnBoundary_2 {
|
||||||
|
|
|
||||||
|
|
@ -120,7 +120,7 @@ locate(const Arrangement_on_surface_2<GeometryTraits_2, TopologyTraits>& arr,
|
||||||
* Use the form 'A a(*b);' and not ''A a = b;' to handle the case where A has
|
* Use the form 'A a(*b);' and not ''A a = b;' to handle the case where A has
|
||||||
* only an implicit constructor, (which takes *b as a parameter).
|
* only an implicit constructor, (which takes *b as a parameter).
|
||||||
*/
|
*/
|
||||||
typename boost::mpl::if_<boost::is_same<Gt2, Bgt2>, const Bgt2&, Bgt2>::type
|
typename boost::mpl::if_<std::is_same<Gt2, Bgt2>, const Bgt2&, Bgt2>::type
|
||||||
ex_traits(*geom_traits);
|
ex_traits(*geom_traits);
|
||||||
|
|
||||||
// Define the sweep-line visitor and perform the sweep.
|
// Define the sweep-line visitor and perform the sweep.
|
||||||
|
|
|
||||||
|
|
@ -90,14 +90,10 @@ public:
|
||||||
typedef typename Gt_adaptor_2::Top_side_category Top_side_category;
|
typedef typename Gt_adaptor_2::Top_side_category Top_side_category;
|
||||||
typedef typename Gt_adaptor_2::Right_side_category Right_side_category;
|
typedef typename Gt_adaptor_2::Right_side_category Right_side_category;
|
||||||
|
|
||||||
BOOST_MPL_ASSERT
|
CGAL_static_assertion((std::is_same< Left_side_category, Arr_oblivious_side_tag >::value));
|
||||||
((boost::is_same< Left_side_category, Arr_oblivious_side_tag >));
|
CGAL_static_assertion((std::is_same< Bottom_side_category, Arr_oblivious_side_tag >::value));
|
||||||
BOOST_MPL_ASSERT
|
CGAL_static_assertion((std::is_same< Top_side_category, Arr_oblivious_side_tag >::value));
|
||||||
((boost::is_same< Bottom_side_category, Arr_oblivious_side_tag >));
|
CGAL_static_assertion((std::is_same< Right_side_category, Arr_oblivious_side_tag >::value));
|
||||||
BOOST_MPL_ASSERT
|
|
||||||
((boost::is_same< Top_side_category, Arr_oblivious_side_tag >));
|
|
||||||
BOOST_MPL_ASSERT
|
|
||||||
((boost::is_same< Right_side_category, Arr_oblivious_side_tag >));
|
|
||||||
//@}
|
//@}
|
||||||
|
|
||||||
/*! \struct
|
/*! \struct
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,6 @@
|
||||||
#include <list>
|
#include <list>
|
||||||
|
|
||||||
#include <boost/variant.hpp>
|
#include <boost/variant.hpp>
|
||||||
#include <boost/utility/enable_if.hpp>
|
|
||||||
#include <boost/mpl/has_xxx.hpp>
|
#include <boost/mpl/has_xxx.hpp>
|
||||||
|
|
||||||
#include <CGAL/tags.h>
|
#include <CGAL/tags.h>
|
||||||
|
|
@ -32,6 +31,8 @@
|
||||||
#include <CGAL/Arr_tags.h>
|
#include <CGAL/Arr_tags.h>
|
||||||
#include <CGAL/Arr_geometry_traits/Curve_data_aux.h>
|
#include <CGAL/Arr_geometry_traits/Curve_data_aux.h>
|
||||||
|
|
||||||
|
#include <type_traits>
|
||||||
|
|
||||||
namespace CGAL {
|
namespace CGAL {
|
||||||
|
|
||||||
/*! \class
|
/*! \class
|
||||||
|
|
@ -258,8 +259,7 @@ public:
|
||||||
* has a nested type named Are_mergeable_2.
|
* has a nested type named Are_mergeable_2.
|
||||||
*/
|
*/
|
||||||
template <typename GeomeTraits_2>
|
template <typename GeomeTraits_2>
|
||||||
typename boost::enable_if_c<has_are_mergeable_2<GeomeTraits_2>::value,
|
std::enable_if_t<has_are_mergeable_2<GeomeTraits_2>::value,bool>
|
||||||
bool>::type
|
|
||||||
are_mergeable(const X_monotone_curve_2& cv1,
|
are_mergeable(const X_monotone_curve_2& cv1,
|
||||||
const X_monotone_curve_2& cv2) const
|
const X_monotone_curve_2& cv2) const
|
||||||
{
|
{
|
||||||
|
|
@ -277,8 +277,7 @@ public:
|
||||||
* This function should never be called!
|
* This function should never be called!
|
||||||
*/
|
*/
|
||||||
template <typename GeomeTraits_2>
|
template <typename GeomeTraits_2>
|
||||||
typename boost::enable_if_c<!has_are_mergeable_2<GeomeTraits_2>::value,
|
std::enable_if_t<!has_are_mergeable_2<GeomeTraits_2>::value,bool>
|
||||||
bool>::type
|
|
||||||
are_mergeable(const X_monotone_curve_2& /* cv1 */,
|
are_mergeable(const X_monotone_curve_2& /* cv1 */,
|
||||||
const X_monotone_curve_2& /* cv2 */) const
|
const X_monotone_curve_2& /* cv2 */) const
|
||||||
{
|
{
|
||||||
|
|
@ -320,7 +319,7 @@ public:
|
||||||
* has a nested type named Merge_2.
|
* has a nested type named Merge_2.
|
||||||
*/
|
*/
|
||||||
template <typename GeomeTraits_2>
|
template <typename GeomeTraits_2>
|
||||||
typename boost::enable_if_c<has_merge_2<GeomeTraits_2>::value, void>::type
|
std::enable_if_t<has_merge_2<GeomeTraits_2>::value, void>
|
||||||
merge(const X_monotone_curve_2& cv1, const X_monotone_curve_2& cv2,
|
merge(const X_monotone_curve_2& cv1, const X_monotone_curve_2& cv2,
|
||||||
X_monotone_curve_2& c) const
|
X_monotone_curve_2& c) const
|
||||||
{
|
{
|
||||||
|
|
@ -340,7 +339,7 @@ public:
|
||||||
* This function should never be called!
|
* This function should never be called!
|
||||||
*/
|
*/
|
||||||
template <typename GeomeTraits_2>
|
template <typename GeomeTraits_2>
|
||||||
typename boost::enable_if_c<!has_merge_2<GeomeTraits_2>::value, void>::type
|
std::enable_if_t<!has_merge_2<GeomeTraits_2>::value, void>
|
||||||
merge(const X_monotone_curve_2& /* cv1 */,
|
merge(const X_monotone_curve_2& /* cv1 */,
|
||||||
const X_monotone_curve_2& /* cv2 */,
|
const X_monotone_curve_2& /* cv2 */,
|
||||||
X_monotone_curve_2& /* c */) const
|
X_monotone_curve_2& /* c */) const
|
||||||
|
|
@ -407,8 +406,8 @@ public:
|
||||||
* has a nested type named Construct_opposite_2.
|
* has a nested type named Construct_opposite_2.
|
||||||
*/
|
*/
|
||||||
template <typename GeomeTraits_2>
|
template <typename GeomeTraits_2>
|
||||||
typename boost::enable_if_c<has_construct_opposite_2<GeomeTraits_2>::value,
|
std::enable_if_t<has_construct_opposite_2<GeomeTraits_2>::value,
|
||||||
X_monotone_curve_2>::type
|
X_monotone_curve_2>
|
||||||
construct_opposite(const X_monotone_curve_2& cv) const
|
construct_opposite(const X_monotone_curve_2& cv) const
|
||||||
{
|
{
|
||||||
X_monotone_curve_2 new_cv(m_base.construct_opposite_2_object()(cv),
|
X_monotone_curve_2 new_cv(m_base.construct_opposite_2_object()(cv),
|
||||||
|
|
@ -421,8 +420,8 @@ public:
|
||||||
* This function should never be called!
|
* This function should never be called!
|
||||||
*/
|
*/
|
||||||
template <typename GeomeTraits_2>
|
template <typename GeomeTraits_2>
|
||||||
typename boost::enable_if_c<!has_construct_opposite_2<GeomeTraits_2>::value,
|
std::enable_if_t<!has_construct_opposite_2<GeomeTraits_2>::value,
|
||||||
X_monotone_curve_2>::type
|
X_monotone_curve_2>
|
||||||
construct_opposite(const X_monotone_curve_2&) const
|
construct_opposite(const X_monotone_curve_2&) const
|
||||||
{
|
{
|
||||||
CGAL_error_msg("Construct opposite curve is not supported!");
|
CGAL_error_msg("Construct opposite curve is not supported!");
|
||||||
|
|
|
||||||
|
|
@ -34,8 +34,6 @@
|
||||||
#include <CGAL/Arrangement_2/Arrangement_2_iterators.h>
|
#include <CGAL/Arrangement_2/Arrangement_2_iterators.h>
|
||||||
#include <CGAL/assertions.h>
|
#include <CGAL/assertions.h>
|
||||||
|
|
||||||
#include <boost/pool/pool_alloc.hpp>
|
|
||||||
|
|
||||||
namespace CGAL {
|
namespace CGAL {
|
||||||
|
|
||||||
inline void* _clean_pointer(const void* p)
|
inline void* _clean_pointer(const void* p)
|
||||||
|
|
@ -964,7 +962,7 @@ public:
|
||||||
* The arrangement DCEL class.
|
* The arrangement DCEL class.
|
||||||
*/
|
*/
|
||||||
template <class V, class H, class F,
|
template <class V, class H, class F,
|
||||||
class Allocator = boost::fast_pool_allocator<int> >
|
class Allocator = CGAL_ALLOCATOR(int) >
|
||||||
class Arr_dcel_base {
|
class Arr_dcel_base {
|
||||||
public:
|
public:
|
||||||
// Define the vertex, halfedge and face types.
|
// Define the vertex, halfedge and face types.
|
||||||
|
|
|
||||||
|
|
@ -1127,7 +1127,7 @@ public:
|
||||||
* \return SMALLER - y(p) < xc(x(p)), i.e. the point is below the curve;
|
* \return SMALLER - y(p) < xc(x(p)), i.e. the point is below the curve;
|
||||||
* EQUAL - p lies on the curve.
|
* EQUAL - p lies on the curve.
|
||||||
* LARGER - y(p) > xc(x(p)), i.e. the point is above the curve;
|
* LARGER - y(p) > xc(x(p)), i.e. the point is above the curve;
|
||||||
* \pre p is not a construction point.
|
* \pre p is not a contraction point.
|
||||||
* \pre p is in the x-range of xc.
|
* \pre p is in the x-range of xc.
|
||||||
*/
|
*/
|
||||||
Comparison_result operator()(const Point_2& p,
|
Comparison_result operator()(const Point_2& p,
|
||||||
|
|
|
||||||
|
|
@ -96,7 +96,7 @@ public:
|
||||||
m_subcurves()
|
m_subcurves()
|
||||||
{
|
{
|
||||||
typedef typename std::iterator_traits<InputIterator>::value_type VT;
|
typedef typename std::iterator_traits<InputIterator>::value_type VT;
|
||||||
typedef typename boost::is_same<VT, Point_type_2>::type Is_point;
|
typedef typename std::is_same<VT, Point_type_2>::type Is_point;
|
||||||
construct_polycurve(begin, end, Is_point());
|
construct_polycurve(begin, end, Is_point());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -108,7 +108,7 @@ public:
|
||||||
*/
|
*/
|
||||||
template <typename InputIterator>
|
template <typename InputIterator>
|
||||||
void construct_polycurve(InputIterator begin, InputIterator end,
|
void construct_polycurve(InputIterator begin, InputIterator end,
|
||||||
boost::false_type)
|
std::false_type)
|
||||||
{ m_subcurves.assign(begin, end); }
|
{ m_subcurves.assign(begin, end); }
|
||||||
|
|
||||||
/*! Construct a polycurve from a range of points.
|
/*! Construct a polycurve from a range of points.
|
||||||
|
|
@ -120,7 +120,7 @@ public:
|
||||||
template <typename InputIterator>
|
template <typename InputIterator>
|
||||||
CGAL_DEPRECATED void construct_polycurve(InputIterator begin,
|
CGAL_DEPRECATED void construct_polycurve(InputIterator begin,
|
||||||
InputIterator end,
|
InputIterator end,
|
||||||
boost::true_type)
|
std::true_type)
|
||||||
{
|
{
|
||||||
// Check if there are no points in the range:
|
// Check if there are no points in the range:
|
||||||
InputIterator ps = begin;
|
InputIterator ps = begin;
|
||||||
|
|
@ -433,7 +433,7 @@ public:
|
||||||
Base(begin, end)
|
Base(begin, end)
|
||||||
{
|
{
|
||||||
typedef typename std::iterator_traits<InputIterator>::value_type VT;
|
typedef typename std::iterator_traits<InputIterator>::value_type VT;
|
||||||
typedef typename boost::is_same<VT, Point_type_2>::type Is_point;
|
typedef typename std::is_same<VT, Point_type_2>::type Is_point;
|
||||||
construct_x_monotone_polycurve(begin, end, Is_point());
|
construct_x_monotone_polycurve(begin, end, Is_point());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -444,7 +444,7 @@ public:
|
||||||
*/
|
*/
|
||||||
template <typename InputIterator>
|
template <typename InputIterator>
|
||||||
void construct_x_monotone_polycurve(InputIterator, InputIterator,
|
void construct_x_monotone_polycurve(InputIterator, InputIterator,
|
||||||
boost::false_type)
|
std::false_type)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
/*! Construct from a range of points, defining the endpoints of the
|
/*! Construct from a range of points, defining the endpoints of the
|
||||||
|
|
@ -453,7 +453,7 @@ public:
|
||||||
template <typename InputIterator>
|
template <typename InputIterator>
|
||||||
CGAL_DEPRECATED void construct_x_monotone_polycurve(InputIterator,
|
CGAL_DEPRECATED void construct_x_monotone_polycurve(InputIterator,
|
||||||
InputIterator,
|
InputIterator,
|
||||||
boost::true_type)
|
std::true_type)
|
||||||
{}
|
{}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -247,7 +247,7 @@ overlay(const Arrangement_on_surface_2<GeometryTraitsA_2, TopologyTraitsA>& arr1
|
||||||
* Use the form 'A a(*b);' and not ''A a = b;' to handle the case where A has
|
* Use the form 'A a(*b);' and not ''A a = b;' to handle the case where A has
|
||||||
* only an implicit constructor, (which takes *b as a parameter).
|
* only an implicit constructor, (which takes *b as a parameter).
|
||||||
*/
|
*/
|
||||||
typename boost::mpl::if_<boost::is_same<Gt_adaptor_2, Ovl_gt2>,
|
typename boost::mpl::if_<std::is_same<Gt_adaptor_2, Ovl_gt2>,
|
||||||
const Ovl_gt2&, Ovl_gt2>::type
|
const Ovl_gt2&, Ovl_gt2>::type
|
||||||
ex_traits(*traits_adaptor);
|
ex_traits(*traits_adaptor);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -52,7 +52,7 @@ Arr_naive_point_location<Arrangement>::locate(const Point_2& p) const
|
||||||
return make_result(hh);
|
return make_result(hh);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Go over all faces an locate the innermost one that contains the query
|
// Go over all faces and locate the innermost one that contains the query
|
||||||
// point in its interior.
|
// point in its interior.
|
||||||
Face_const_handle f_inner;
|
Face_const_handle f_inner;
|
||||||
const Face_const_handle invalid_f;
|
const Face_const_handle invalid_f;
|
||||||
|
|
|
||||||
|
|
@ -776,7 +776,7 @@ _is_in_connected_component (const Point_2& p,
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// Find the first halfedge around a given target vertex, when going clockwise
|
// Find the first halfedge around a given target vertex, when going clockwise
|
||||||
// from "6 o'clock" around this vertex (when shooting up) or starting from
|
// from "6 o'clock" around this vertex (when shooting up) or starting from
|
||||||
// "12 o'clock (when shooting down).
|
// "12 o'clock" (when shooting down).
|
||||||
//
|
//
|
||||||
template <class Arrangement>
|
template <class Arrangement>
|
||||||
typename Arr_walk_along_line_point_location<Arrangement>::Halfedge_const_handle
|
typename Arr_walk_along_line_point_location<Arrangement>::Halfedge_const_handle
|
||||||
|
|
|
||||||
|
|
@ -352,15 +352,12 @@ public:
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/*! Obtain a Compare_y_at_x_2 functor object. */
|
/*! Obtain a Compare_curve_end_x_2 functor object. */
|
||||||
Compare_curve_end_x_2 compare_curve_end_x_2_object () const
|
Compare_curve_end_x_2 compare_curve_end_x_2_object () const
|
||||||
{
|
{
|
||||||
return Compare_curve_end_x_2(this);
|
return Compare_curve_end_x_2(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*! A functor that compares the y-coordinates of an edge end and a curve at
|
/*! A functor that compares the y-coordinates of an edge end and a curve at
|
||||||
* the point x-coordinate
|
* the point x-coordinate
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -25,8 +25,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <iterator>
|
#include <iterator>
|
||||||
#include <boost/type_traits/is_same.hpp>
|
#include <type_traits>
|
||||||
#include <boost/utility/enable_if.hpp>
|
|
||||||
|
|
||||||
#include <CGAL/basic.h>
|
#include <CGAL/basic.h>
|
||||||
#include <CGAL/tags.h>
|
#include <CGAL/tags.h>
|
||||||
|
|
@ -1144,14 +1143,14 @@ public:
|
||||||
Approximate_2;
|
Approximate_2;
|
||||||
|
|
||||||
/*! Obtain an Approximate_2 functor object. */
|
/*! Obtain an Approximate_2 functor object. */
|
||||||
Approximate_2 approximate_2_object_impl(boost::false_type) const
|
Approximate_2 approximate_2_object_impl(std::false_type) const
|
||||||
{ return subcurve_traits_2()->approximate_2_object(); }
|
{ return subcurve_traits_2()->approximate_2_object(); }
|
||||||
|
|
||||||
Approximate_2 approximate_2_object_impl(boost::true_type) const { }
|
Approximate_2 approximate_2_object_impl(std::true_type) const { }
|
||||||
|
|
||||||
Approximate_2 approximate_2_object() const
|
Approximate_2 approximate_2_object() const
|
||||||
{
|
{
|
||||||
typedef typename boost::is_same<void, Approximate_2>::type Is_void;
|
typedef typename std::is_same<void, Approximate_2>::type Is_void;
|
||||||
return approximate_2_object_impl(Is_void());
|
return approximate_2_object_impl(Is_void());
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -1215,7 +1214,7 @@ public:
|
||||||
ForwardIterator end) const
|
ForwardIterator end) const
|
||||||
{
|
{
|
||||||
typedef typename std::iterator_traits<ForwardIterator>::value_type VT;
|
typedef typename std::iterator_traits<ForwardIterator>::value_type VT;
|
||||||
typedef typename boost::is_same<VT,Point_2>::type Is_point;
|
typedef typename std::is_same<VT,Point_2>::type Is_point;
|
||||||
|
|
||||||
// Dispatch the range to the appropriate implementation.
|
// Dispatch the range to the appropriate implementation.
|
||||||
return constructor_impl(begin, end, Is_point());
|
return constructor_impl(begin, end, Is_point());
|
||||||
|
|
@ -1233,7 +1232,7 @@ public:
|
||||||
template <typename ForwardIterator>
|
template <typename ForwardIterator>
|
||||||
X_monotone_curve_2 constructor_impl(ForwardIterator /* begin */,
|
X_monotone_curve_2 constructor_impl(ForwardIterator /* begin */,
|
||||||
ForwardIterator /* end */,
|
ForwardIterator /* end */,
|
||||||
boost::true_type) const
|
std::true_type) const
|
||||||
{ CGAL_error_msg("Cannot construct a polycurve from a range of points!"); }
|
{ CGAL_error_msg("Cannot construct a polycurve from a range of points!"); }
|
||||||
|
|
||||||
/*! Obtain an x-monotone polycurve from a range of subcurves.
|
/*! Obtain an x-monotone polycurve from a range of subcurves.
|
||||||
|
|
@ -1254,7 +1253,7 @@ public:
|
||||||
template <typename ForwardIterator>
|
template <typename ForwardIterator>
|
||||||
X_monotone_curve_2 constructor_impl(ForwardIterator begin,
|
X_monotone_curve_2 constructor_impl(ForwardIterator begin,
|
||||||
ForwardIterator end,
|
ForwardIterator end,
|
||||||
boost::false_type) const
|
std::false_type) const
|
||||||
{
|
{
|
||||||
CGAL_precondition_msg
|
CGAL_precondition_msg
|
||||||
(
|
(
|
||||||
|
|
|
||||||
|
|
@ -25,10 +25,9 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <iterator>
|
#include <iterator>
|
||||||
|
#include <type_traits>
|
||||||
|
|
||||||
#include <boost/variant.hpp>
|
#include <boost/variant.hpp>
|
||||||
#include <boost/type_traits/is_same.hpp>
|
|
||||||
#include <boost/utility/enable_if.hpp>
|
|
||||||
|
|
||||||
#include <CGAL/basic.h>
|
#include <CGAL/basic.h>
|
||||||
#include <CGAL/tags.h>
|
#include <CGAL/tags.h>
|
||||||
|
|
@ -1174,7 +1173,7 @@ public:
|
||||||
Curve_2 operator()(ForwardIterator begin, ForwardIterator end) const
|
Curve_2 operator()(ForwardIterator begin, ForwardIterator end) const
|
||||||
{
|
{
|
||||||
typedef typename std::iterator_traits<ForwardIterator>::value_type VT;
|
typedef typename std::iterator_traits<ForwardIterator>::value_type VT;
|
||||||
typedef typename boost::is_same<VT, Point_2>::type Is_point;
|
typedef typename std::is_same<VT, Point_2>::type Is_point;
|
||||||
// Dispatch the range to the appropriate implementation.
|
// Dispatch the range to the appropriate implementation.
|
||||||
return constructor_impl(begin, end, Is_point());
|
return constructor_impl(begin, end, Is_point());
|
||||||
}
|
}
|
||||||
|
|
@ -1191,7 +1190,7 @@ public:
|
||||||
template <typename ForwardIterator>
|
template <typename ForwardIterator>
|
||||||
Curve_2 constructor_impl(ForwardIterator /* begin */,
|
Curve_2 constructor_impl(ForwardIterator /* begin */,
|
||||||
ForwardIterator /* end */,
|
ForwardIterator /* end */,
|
||||||
boost::true_type) const
|
std::true_type) const
|
||||||
{ CGAL_error_msg("Cannot construct a polycurve from a range of points!"); }
|
{ CGAL_error_msg("Cannot construct a polycurve from a range of points!"); }
|
||||||
|
|
||||||
/*! Construction implementation from a range of subcurves.
|
/*! Construction implementation from a range of subcurves.
|
||||||
|
|
@ -1202,7 +1201,7 @@ public:
|
||||||
*/
|
*/
|
||||||
template <typename ForwardIterator>
|
template <typename ForwardIterator>
|
||||||
Curve_2 constructor_impl(ForwardIterator begin, ForwardIterator end,
|
Curve_2 constructor_impl(ForwardIterator begin, ForwardIterator end,
|
||||||
boost::false_type) const
|
std::false_type) const
|
||||||
{
|
{
|
||||||
// Range has to contain at least one subcurve
|
// Range has to contain at least one subcurve
|
||||||
CGAL_precondition(begin != end);
|
CGAL_precondition(begin != end);
|
||||||
|
|
|
||||||
|
|
@ -29,8 +29,7 @@
|
||||||
|
|
||||||
#include <list>
|
#include <list>
|
||||||
#include <iterator>
|
#include <iterator>
|
||||||
#include <boost/type_traits/is_same.hpp>
|
#include <type_traits>
|
||||||
#include <boost/utility/enable_if.hpp>
|
|
||||||
|
|
||||||
#include <CGAL/basic.h>
|
#include <CGAL/basic.h>
|
||||||
#include <CGAL/tags.h>
|
#include <CGAL/tags.h>
|
||||||
|
|
@ -381,7 +380,7 @@ public:
|
||||||
Curve_2 operator()(ForwardIterator begin, ForwardIterator end) const
|
Curve_2 operator()(ForwardIterator begin, ForwardIterator end) const
|
||||||
{
|
{
|
||||||
typedef typename std::iterator_traits<ForwardIterator>::value_type VT;
|
typedef typename std::iterator_traits<ForwardIterator>::value_type VT;
|
||||||
typedef typename boost::is_same<VT, Point_2>::type Is_point;
|
typedef typename std::is_same<VT, Point_2>::type Is_point;
|
||||||
// Dispatch the range to the appropriate implementation.
|
// Dispatch the range to the appropriate implementation.
|
||||||
return constructor_impl(begin, end, Is_point());
|
return constructor_impl(begin, end, Is_point());
|
||||||
}
|
}
|
||||||
|
|
@ -401,7 +400,7 @@ public:
|
||||||
*/
|
*/
|
||||||
template <typename ForwardIterator>
|
template <typename ForwardIterator>
|
||||||
Curve_2 constructor_impl(ForwardIterator begin, ForwardIterator end,
|
Curve_2 constructor_impl(ForwardIterator begin, ForwardIterator end,
|
||||||
boost::false_type) const
|
std::false_type) const
|
||||||
{ return Base::Construct_curve_2::operator()(begin, end); }
|
{ return Base::Construct_curve_2::operator()(begin, end); }
|
||||||
|
|
||||||
/*! Construction of a polyline from a range of points.
|
/*! Construction of a polyline from a range of points.
|
||||||
|
|
@ -414,7 +413,7 @@ public:
|
||||||
*/
|
*/
|
||||||
template <typename ForwardIterator>
|
template <typename ForwardIterator>
|
||||||
Curve_2 constructor_impl(ForwardIterator begin, ForwardIterator end,
|
Curve_2 constructor_impl(ForwardIterator begin, ForwardIterator end,
|
||||||
boost::true_type) const
|
std::true_type) const
|
||||||
{
|
{
|
||||||
// The range must not contain a single point.
|
// The range must not contain a single point.
|
||||||
CGAL_precondition_msg(std::distance(begin, end) != 1,
|
CGAL_precondition_msg(std::distance(begin, end) != 1,
|
||||||
|
|
@ -503,7 +502,7 @@ public:
|
||||||
const
|
const
|
||||||
{
|
{
|
||||||
typedef typename std::iterator_traits<ForwardIterator>::value_type VT;
|
typedef typename std::iterator_traits<ForwardIterator>::value_type VT;
|
||||||
typedef typename boost::is_same<VT, Point_2>::type Is_point;
|
typedef typename std::is_same<VT, Point_2>::type Is_point;
|
||||||
// Dispatch the range to the appropriate implementation.
|
// Dispatch the range to the appropriate implementation.
|
||||||
return constructor_impl(begin, end, Is_point());
|
return constructor_impl(begin, end, Is_point());
|
||||||
}
|
}
|
||||||
|
|
@ -526,7 +525,7 @@ public:
|
||||||
template <typename ForwardIterator>
|
template <typename ForwardIterator>
|
||||||
X_monotone_curve_2 constructor_impl(ForwardIterator begin,
|
X_monotone_curve_2 constructor_impl(ForwardIterator begin,
|
||||||
ForwardIterator end,
|
ForwardIterator end,
|
||||||
boost::false_type) const
|
std::false_type) const
|
||||||
{ return Base::Construct_x_monotone_curve_2::operator()(begin, end); }
|
{ return Base::Construct_x_monotone_curve_2::operator()(begin, end); }
|
||||||
|
|
||||||
/*! Construction of an x-monotone polyline from a range of points.
|
/*! Construction of an x-monotone polyline from a range of points.
|
||||||
|
|
@ -541,7 +540,7 @@ public:
|
||||||
template <typename ForwardIterator>
|
template <typename ForwardIterator>
|
||||||
X_monotone_curve_2 constructor_impl(ForwardIterator begin,
|
X_monotone_curve_2 constructor_impl(ForwardIterator begin,
|
||||||
ForwardIterator end,
|
ForwardIterator end,
|
||||||
boost::true_type) const
|
std::true_type) const
|
||||||
{
|
{
|
||||||
// The range must not contain a single point.
|
// The range must not contain a single point.
|
||||||
CGAL_precondition_msg(std::distance(begin, end) != 1,
|
CGAL_precondition_msg(std::distance(begin, end) != 1,
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,7 @@
|
||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <ostream>
|
#include <ostream>
|
||||||
|
#include <type_traits>
|
||||||
#include <CGAL/Arr_enums.h>
|
#include <CGAL/Arr_enums.h>
|
||||||
#include <CGAL/tags.h>
|
#include <CGAL/tags.h>
|
||||||
#include <CGAL/Arr_tags.h>
|
#include <CGAL/Arr_tags.h>
|
||||||
|
|
@ -26,8 +27,6 @@
|
||||||
#include <CGAL/Arithmetic_kernel.h>
|
#include <CGAL/Arithmetic_kernel.h>
|
||||||
#include <CGAL/Algebraic_kernel_d_1.h>
|
#include <CGAL/Algebraic_kernel_d_1.h>
|
||||||
|
|
||||||
#include <boost/type_traits/is_same.hpp>
|
|
||||||
|
|
||||||
namespace CGAL {
|
namespace CGAL {
|
||||||
namespace Arr_rational_arc {
|
namespace Arr_rational_arc {
|
||||||
|
|
||||||
|
|
@ -63,8 +62,8 @@ public:
|
||||||
typedef std::vector<std::pair<Algebraic_real_1, Multiplicity> >
|
typedef std::vector<std::pair<Algebraic_real_1, Multiplicity> >
|
||||||
Root_multiplicity_vector;
|
Root_multiplicity_vector;
|
||||||
|
|
||||||
CGAL_static_assertion((boost::is_same<Integer,Coefficient>::value));
|
CGAL_static_assertion((std::is_same<Integer,Coefficient>::value));
|
||||||
CGAL_static_assertion((boost::is_same<Polynomial_1,
|
CGAL_static_assertion((std::is_same<Polynomial_1,
|
||||||
typename FT_poly_rat_1::Numerator_type>::value));
|
typename FT_poly_rat_1::Numerator_type>::value));
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,7 @@
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <list>
|
#include <list>
|
||||||
#include <ostream>
|
#include <ostream>
|
||||||
|
#include <type_traits>
|
||||||
#include <CGAL/Arr_enums.h>
|
#include <CGAL/Arr_enums.h>
|
||||||
#include <CGAL/tags.h>
|
#include <CGAL/tags.h>
|
||||||
#include <CGAL/Arr_tags.h>
|
#include <CGAL/Arr_tags.h>
|
||||||
|
|
@ -34,7 +35,6 @@
|
||||||
#include <CGAL/Arr_rat_arc/Rational_function.h>
|
#include <CGAL/Arr_rat_arc/Rational_function.h>
|
||||||
#include <CGAL/Arr_rat_arc/Rational_function_pair.h>
|
#include <CGAL/Arr_rat_arc/Rational_function_pair.h>
|
||||||
|
|
||||||
#include <boost/type_traits/is_same.hpp>
|
|
||||||
|
|
||||||
namespace CGAL {
|
namespace CGAL {
|
||||||
namespace Arr_rational_arc {
|
namespace Arr_rational_arc {
|
||||||
|
|
@ -100,8 +100,8 @@ public:
|
||||||
|
|
||||||
typedef Algebraic_point_2 Point_2;
|
typedef Algebraic_point_2 Point_2;
|
||||||
|
|
||||||
CGAL_static_assertion((boost::is_same<Integer, Coefficient>::value));
|
CGAL_static_assertion((std::is_same<Integer, Coefficient>::value));
|
||||||
CGAL_static_assertion((boost::is_same<Polynomial_1,
|
CGAL_static_assertion((std::is_same<Polynomial_1,
|
||||||
typename FT_poly_rat_1::Numerator_type>::value));
|
typename FT_poly_rat_1::Numerator_type>::value));
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
|
||||||
|
|
@ -486,7 +486,7 @@ public:
|
||||||
compare_xy(cv2.right(), p) == LARGER);
|
compare_xy(cv2.right(), p) == LARGER);
|
||||||
|
|
||||||
// Compare the slopes of the two segments to determine their relative
|
// Compare the slopes of the two segments to determine their relative
|
||||||
// position immediately to the left of q.
|
// position immediately to the right of q.
|
||||||
// Notice we use the supporting lines in order to compare the slopes.
|
// Notice we use the supporting lines in order to compare the slopes.
|
||||||
return (kernel.compare_slope_2_object()(cv1.line(), cv2.line()));
|
return (kernel.compare_slope_2_object()(cv1.line(), cv2.line()));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -84,7 +84,7 @@ private:
|
||||||
|
|
||||||
typedef typename Polyhedron::Halfedge_around_vertex_circulator
|
typedef typename Polyhedron::Halfedge_around_vertex_circulator
|
||||||
Polyhedron_halfedge_around_vertex_circulator;
|
Polyhedron_halfedge_around_vertex_circulator;
|
||||||
typedef boost::is_same<typename Polyhedron::Plane_3, Vector_3>
|
typedef std::is_same<typename Polyhedron::Plane_3, Vector_3>
|
||||||
Polyhedron_has_normal;
|
Polyhedron_has_normal;
|
||||||
|
|
||||||
typedef typename Polyhedron::HalfedgeDS HDS;
|
typedef typename Polyhedron::HalfedgeDS HDS;
|
||||||
|
|
@ -103,7 +103,7 @@ private:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
void compute_planes(Polyhedron& polyhedron, boost::true_type)
|
void compute_planes(Polyhedron& polyhedron, std::true_type)
|
||||||
{
|
{
|
||||||
std::transform(polyhedron.facets_begin(), polyhedron.facets_end(),
|
std::transform(polyhedron.facets_begin(), polyhedron.facets_end(),
|
||||||
polyhedron.planes_begin(), Normal_equation());
|
polyhedron.planes_begin(), Normal_equation());
|
||||||
|
|
@ -120,7 +120,7 @@ private:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
void compute_planes(Polyhedron& polyhedron, boost::false_type)
|
void compute_planes(Polyhedron& polyhedron, std::false_type)
|
||||||
{
|
{
|
||||||
std::transform(polyhedron.facets_begin(), polyhedron.facets_end(),
|
std::transform(polyhedron.facets_begin(), polyhedron.facets_end(),
|
||||||
polyhedron.planes_begin(), Plane_equation());
|
polyhedron.planes_begin(), Plane_equation());
|
||||||
|
|
@ -350,12 +350,12 @@ private:
|
||||||
|
|
||||||
/*! Obtain the normal of a facet of a polyhedron that supports normals */
|
/*! Obtain the normal of a facet of a polyhedron that supports normals */
|
||||||
template <typename Facet>
|
template <typename Facet>
|
||||||
const Vector_3& get_normal(const Facet& facet, boost::true_type) const
|
const Vector_3& get_normal(const Facet& facet, std::true_type) const
|
||||||
{ return facet->plane(); }
|
{ return facet->plane(); }
|
||||||
|
|
||||||
/*! Obtain the normal of a facet of a polyhedron that supports planes */
|
/*! Obtain the normal of a facet of a polyhedron that supports planes */
|
||||||
template <typename Facet>
|
template <typename Facet>
|
||||||
Vector_3 get_normal(const Facet& facet, boost::false_type) const
|
Vector_3 get_normal(const Facet& facet, std::false_type) const
|
||||||
{ return facet->plane().orthogonal_vector(); }
|
{ return facet->plane().orthogonal_vector(); }
|
||||||
|
|
||||||
/*! Process a polyhedron vertex recursively constructing the Gaussian map
|
/*! Process a polyhedron vertex recursively constructing the Gaussian map
|
||||||
|
|
|
||||||
|
|
@ -91,30 +91,14 @@ public:
|
||||||
typedef typename Gt_adaptor_2::Top_side_category Top_side_category;
|
typedef typename Gt_adaptor_2::Top_side_category Top_side_category;
|
||||||
typedef typename Gt_adaptor_2::Right_side_category Right_side_category;
|
typedef typename Gt_adaptor_2::Right_side_category Right_side_category;
|
||||||
|
|
||||||
BOOST_MPL_ASSERT
|
CGAL_static_assertion((std::is_same< Left_side_category, Arr_oblivious_side_tag >::value ||
|
||||||
(
|
std::is_same< Left_side_category, Arr_identified_side_tag >::value));
|
||||||
(boost::mpl::or_<
|
CGAL_static_assertion((std::is_same< Bottom_side_category, Arr_oblivious_side_tag >::value ||
|
||||||
boost::is_same< Left_side_category, Arr_oblivious_side_tag >,
|
std::is_same< Bottom_side_category, Arr_contracted_side_tag >::value));
|
||||||
boost::is_same< Left_side_category, Arr_identified_side_tag > >)
|
CGAL_static_assertion((std::is_same< Top_side_category, Arr_oblivious_side_tag >::value ||
|
||||||
);
|
std::is_same< Top_side_category, Arr_contracted_side_tag >::value));
|
||||||
BOOST_MPL_ASSERT
|
CGAL_static_assertion((std::is_same< Right_side_category, Arr_oblivious_side_tag >::value ||
|
||||||
(
|
std::is_same< Right_side_category, Arr_identified_side_tag >::value));
|
||||||
(boost::mpl::or_<
|
|
||||||
boost::is_same< Bottom_side_category, Arr_oblivious_side_tag >,
|
|
||||||
boost::is_same< Bottom_side_category, Arr_contracted_side_tag > >)
|
|
||||||
);
|
|
||||||
BOOST_MPL_ASSERT
|
|
||||||
(
|
|
||||||
(boost::mpl::or_<
|
|
||||||
boost::is_same< Top_side_category, Arr_oblivious_side_tag >,
|
|
||||||
boost::is_same< Top_side_category, Arr_contracted_side_tag > >)
|
|
||||||
);
|
|
||||||
BOOST_MPL_ASSERT
|
|
||||||
(
|
|
||||||
(boost::mpl::or_<
|
|
||||||
boost::is_same< Right_side_category, Arr_oblivious_side_tag >,
|
|
||||||
boost::is_same< Right_side_category, Arr_identified_side_tag > >)
|
|
||||||
);
|
|
||||||
//@}
|
//@}
|
||||||
|
|
||||||
/*! \struct
|
/*! \struct
|
||||||
|
|
|
||||||
|
|
@ -252,7 +252,7 @@ typedef boost::mpl::bool_<false> Arr_false;
|
||||||
template <typename ArrSideCategory>
|
template <typename ArrSideCategory>
|
||||||
struct Arr_is_side_oblivious {
|
struct Arr_is_side_oblivious {
|
||||||
typedef ArrSideCategory Side_cat;
|
typedef ArrSideCategory Side_cat;
|
||||||
typedef boost::is_same<Side_cat, Arr_oblivious_side_tag> Is_same;
|
typedef std::is_same<Side_cat, Arr_oblivious_side_tag> Is_same;
|
||||||
typedef boost::mpl::if_<Is_same, Arr_true, Arr_false> result;
|
typedef boost::mpl::if_<Is_same, Arr_true, Arr_false> result;
|
||||||
typedef typename result::type type;
|
typedef typename result::type type;
|
||||||
};
|
};
|
||||||
|
|
@ -260,7 +260,7 @@ struct Arr_is_side_oblivious {
|
||||||
template <typename ArrSideCategory>
|
template <typename ArrSideCategory>
|
||||||
struct Arr_is_side_open {
|
struct Arr_is_side_open {
|
||||||
typedef ArrSideCategory Side_cat;
|
typedef ArrSideCategory Side_cat;
|
||||||
typedef boost::is_same<Side_cat, Arr_open_side_tag> Is_same;
|
typedef std::is_same<Side_cat, Arr_open_side_tag> Is_same;
|
||||||
typedef boost::mpl::if_<Is_same, Arr_true, Arr_false> result;
|
typedef boost::mpl::if_<Is_same, Arr_true, Arr_false> result;
|
||||||
typedef typename result::type type;
|
typedef typename result::type type;
|
||||||
};
|
};
|
||||||
|
|
@ -268,7 +268,7 @@ struct Arr_is_side_open {
|
||||||
template <typename ArrSideCategory>
|
template <typename ArrSideCategory>
|
||||||
struct Arr_is_side_identified {
|
struct Arr_is_side_identified {
|
||||||
typedef ArrSideCategory Side_cat;
|
typedef ArrSideCategory Side_cat;
|
||||||
typedef boost::is_same<Side_cat, Arr_identified_side_tag> Is_same;
|
typedef std::is_same<Side_cat, Arr_identified_side_tag> Is_same;
|
||||||
typedef boost::mpl::if_<Is_same, Arr_true, Arr_false> result;
|
typedef boost::mpl::if_<Is_same, Arr_true, Arr_false> result;
|
||||||
typedef typename result::type type;
|
typedef typename result::type type;
|
||||||
};
|
};
|
||||||
|
|
@ -276,7 +276,7 @@ struct Arr_is_side_identified {
|
||||||
template <typename ArrSideCategory>
|
template <typename ArrSideCategory>
|
||||||
struct Arr_is_side_contracted {
|
struct Arr_is_side_contracted {
|
||||||
typedef ArrSideCategory Side_cat;
|
typedef ArrSideCategory Side_cat;
|
||||||
typedef boost::is_same<Side_cat, Arr_contracted_side_tag> Is_same;
|
typedef std::is_same<Side_cat, Arr_contracted_side_tag> Is_same;
|
||||||
typedef boost::mpl::if_<Is_same, Arr_true, Arr_false> result;
|
typedef boost::mpl::if_<Is_same, Arr_true, Arr_false> result;
|
||||||
typedef typename result::type type;
|
typedef typename result::type type;
|
||||||
};
|
};
|
||||||
|
|
@ -284,7 +284,7 @@ struct Arr_is_side_contracted {
|
||||||
template <typename ArrSideCategory>
|
template <typename ArrSideCategory>
|
||||||
struct Arr_is_side_closed {
|
struct Arr_is_side_closed {
|
||||||
typedef ArrSideCategory Side_cat;
|
typedef ArrSideCategory Side_cat;
|
||||||
typedef boost::is_same<Side_cat, Arr_closed_side_tag> Is_same;
|
typedef std::is_same<Side_cat, Arr_closed_side_tag> Is_same;
|
||||||
typedef boost::mpl::if_<Is_same, Arr_true, Arr_false> result;
|
typedef boost::mpl::if_<Is_same, Arr_true, Arr_false> result;
|
||||||
typedef typename result::type type;
|
typedef typename result::type type;
|
||||||
};
|
};
|
||||||
|
|
@ -429,6 +429,7 @@ struct Arr_sane_identified_tagging {
|
||||||
* otherwise bool_<false>
|
* otherwise bool_<false>
|
||||||
*/
|
*/
|
||||||
typedef boost::mpl::and_<LR_ok, BT_ok> result;
|
typedef boost::mpl::and_<LR_ok, BT_ok> result;
|
||||||
|
static constexpr bool value = result::value;
|
||||||
};
|
};
|
||||||
|
|
||||||
/*! Checks whether one of two boundary sides are identified
|
/*! Checks whether one of two boundary sides are identified
|
||||||
|
|
|
||||||
|
|
@ -188,6 +188,7 @@ is_in_face(const Face* f, const Point_2& p, const Vertex* v) const
|
||||||
auto cmp_x_op = m_geom_traits->compare_x_2_object();
|
auto cmp_x_op = m_geom_traits->compare_x_2_object();
|
||||||
auto cmp_y_at_x_op = m_geom_traits->compare_y_at_x_2_object();
|
auto cmp_y_at_x_op = m_geom_traits->compare_y_at_x_2_object();
|
||||||
auto cmp_x_pt_ce = m_geom_traits->compare_x_point_curve_end_2_object();
|
auto cmp_x_pt_ce = m_geom_traits->compare_x_point_curve_end_2_object();
|
||||||
|
auto cmp_x_ce_ce = m_geom_traits->compare_x_curve_ends_2_object();
|
||||||
auto is_vertical = m_geom_traits->is_vertical_2_object();
|
auto is_vertical = m_geom_traits->is_vertical_2_object();
|
||||||
auto is_on_y_identification = m_geom_traits->is_on_y_identification_2_object();
|
auto is_on_y_identification = m_geom_traits->is_on_y_identification_2_object();
|
||||||
|
|
||||||
|
|
@ -251,7 +252,6 @@ is_in_face(const Face* f, const Point_2& p, const Vertex* v) const
|
||||||
Arr_parameter_space ps_y_target;
|
Arr_parameter_space ps_y_target;
|
||||||
|
|
||||||
do {
|
do {
|
||||||
|
|
||||||
/* Compare p to the target vertex of the current halfedge. If the
|
/* Compare p to the target vertex of the current halfedge. If the
|
||||||
* vertex v is on the boundary of the component, p is not in the interior
|
* vertex v is on the boundary of the component, p is not in the interior
|
||||||
* the face.
|
* the face.
|
||||||
|
|
@ -265,14 +265,15 @@ is_in_face(const Face* f, const Point_2& p, const Vertex* v) const
|
||||||
* the north pole, increase the intersection counter
|
* the north pole, increase the intersection counter
|
||||||
*/
|
*/
|
||||||
if (curr->direction() == ARR_LEFT_TO_RIGHT) {
|
if (curr->direction() == ARR_LEFT_TO_RIGHT) {
|
||||||
auto ps_y_1 = ps_y_op(curr->curve(), ARR_MAX_END);
|
|
||||||
auto ps_y_2 = ps_y_op(curr->next()->curve(), ARR_MAX_END);
|
|
||||||
if ((ps_y_1 == ARR_TOP_BOUNDARY) && (ps_y_2 == ARR_TOP_BOUNDARY)) {
|
|
||||||
// Compare the x-coordinates:
|
|
||||||
const auto& cv1 = curr->curve();
|
const auto& cv1 = curr->curve();
|
||||||
const auto& cv2 = curr->next()->curve();
|
const auto& cv2 = curr->next()->curve();
|
||||||
|
auto ps_y_1 = ps_y_op(cv1, ARR_MAX_END);
|
||||||
|
auto ps_y_2 = ps_y_op(cv2, ARR_MAX_END);
|
||||||
|
if ((ps_y_1 == ARR_TOP_BOUNDARY) && (ps_y_2 == ARR_TOP_BOUNDARY)) {
|
||||||
|
// Compare the x-coordinates:
|
||||||
Comparison_result rc1, rc2;
|
Comparison_result rc1, rc2;
|
||||||
if (is_on_y_identification(cv1)) {
|
if (is_on_y_identification(cv1)) {
|
||||||
|
if (is_on_y_identification(p)) return false;
|
||||||
// -----------
|
// -----------
|
||||||
// | | |<---- cv1 go
|
// | | |<---- cv1 go
|
||||||
// | | ||
|
// | | ||
|
||||||
|
|
@ -285,6 +286,7 @@ is_in_face(const Face* f, const Point_2& p, const Vertex* v) const
|
||||||
rc2 = cmp_x_pt_ce(p, cv2, ARR_MAX_END);
|
rc2 = cmp_x_pt_ce(p, cv2, ARR_MAX_END);
|
||||||
}
|
}
|
||||||
else if (is_on_y_identification(cv2)) {
|
else if (is_on_y_identification(cv2)) {
|
||||||
|
if (is_on_y_identification(p)) return false;
|
||||||
// -----------
|
// -----------
|
||||||
// cv2--->| | |
|
// cv2--->| | |
|
||||||
// || | |
|
// || | |
|
||||||
|
|
@ -296,7 +298,14 @@ is_in_face(const Face* f, const Point_2& p, const Vertex* v) const
|
||||||
rc1 = cmp_x_pt_ce(p, cv1, ARR_MAX_END);
|
rc1 = cmp_x_pt_ce(p, cv1, ARR_MAX_END);
|
||||||
rc2 = LARGER;
|
rc2 = LARGER;
|
||||||
}
|
}
|
||||||
|
else if (is_on_y_identification(p)) {
|
||||||
|
// If the max end of cv1 is smaller than the max end of cv2,
|
||||||
|
// the identification x-coordinate is in the x-range.
|
||||||
|
rc1 = cmp_x_ce_ce(cv1, ARR_MAX_END, cv2, ARR_MAX_END);
|
||||||
|
rc2 = LARGER;
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
|
// None of p, cv1, or cv2 lie on the identification curve.
|
||||||
rc1 = cmp_x_pt_ce(p, cv1, ARR_MAX_END);
|
rc1 = cmp_x_pt_ce(p, cv1, ARR_MAX_END);
|
||||||
rc2 = cmp_x_pt_ce(p, cv2, ARR_MAX_END);
|
rc2 = cmp_x_pt_ce(p, cv2, ARR_MAX_END);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -87,30 +87,14 @@ public:
|
||||||
typedef typename Gt_adaptor_2::Top_side_category Top_side_category;
|
typedef typename Gt_adaptor_2::Top_side_category Top_side_category;
|
||||||
typedef typename Gt_adaptor_2::Right_side_category Right_side_category;
|
typedef typename Gt_adaptor_2::Right_side_category Right_side_category;
|
||||||
|
|
||||||
BOOST_MPL_ASSERT(
|
CGAL_static_assertion((std::is_same< Left_side_category, Arr_oblivious_side_tag >::value ||
|
||||||
(boost::mpl::or_<
|
std::is_same< Left_side_category, Arr_open_side_tag >::value));
|
||||||
boost::is_same< Left_side_category, Arr_oblivious_side_tag >,
|
CGAL_static_assertion((std::is_same< Bottom_side_category, Arr_oblivious_side_tag >::value ||
|
||||||
boost::is_same< Left_side_category, Arr_open_side_tag > >
|
std::is_same< Bottom_side_category, Arr_open_side_tag >::value));
|
||||||
)
|
CGAL_static_assertion((std::is_same< Top_side_category, Arr_oblivious_side_tag>::value ||
|
||||||
);
|
std::is_same< Top_side_category, Arr_open_side_tag >::value));
|
||||||
BOOST_MPL_ASSERT(
|
CGAL_static_assertion((std::is_same< Right_side_category, Arr_oblivious_side_tag >::value ||
|
||||||
(boost::mpl::or_<
|
std::is_same< Right_side_category, Arr_open_side_tag >::value));
|
||||||
boost::is_same< Bottom_side_category, Arr_oblivious_side_tag >,
|
|
||||||
boost::is_same< Bottom_side_category, Arr_open_side_tag > >
|
|
||||||
)
|
|
||||||
);
|
|
||||||
BOOST_MPL_ASSERT(
|
|
||||||
(boost::mpl::or_<
|
|
||||||
boost::is_same< Top_side_category, Arr_oblivious_side_tag >,
|
|
||||||
boost::is_same< Top_side_category, Arr_open_side_tag > >
|
|
||||||
)
|
|
||||||
);
|
|
||||||
BOOST_MPL_ASSERT(
|
|
||||||
(boost::mpl::or_<
|
|
||||||
boost::is_same< Right_side_category, Arr_oblivious_side_tag >,
|
|
||||||
boost::is_same< Right_side_category, Arr_open_side_tag > >
|
|
||||||
)
|
|
||||||
);
|
|
||||||
//@}
|
//@}
|
||||||
|
|
||||||
/*! \struct
|
/*! \struct
|
||||||
|
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue