mirror of https://github.com/CGAL/cgal
Merge remote-tracking branch 'cgal/master' into Aos_2-boundary_objects-efic
This commit is contained in:
commit
5e73fe1eba
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
Checks: '-clang-diagnostic*,-clang-analyzer*,modernize-use-nullptr'
|
||||
HeaderFilterRegex: 'CGAL/*'
|
||||
...
|
||||
|
||||
|
|
@ -3,7 +3,7 @@ sudo add-apt-repository ppa:mikhailnov/pulseeffects -y
|
|||
sudo apt-get update
|
||||
sudo apt-get install -y libmpfr-dev \
|
||||
libeigen3-dev qtbase5-dev libqt5sql5-sqlite libqt5opengl5-dev qtscript5-dev \
|
||||
libqt5svg5-dev qttools5-dev qttools5-dev-tools libboost1.72-dev zsh
|
||||
libqt5svg5-dev qttools5-dev qttools5-dev-tools libboost-dev libinsighttoolkit4-dev zsh
|
||||
#update cmake to 3.18.4
|
||||
sudo apt purge --auto-remove cmake
|
||||
cd /tmp
|
||||
|
|
|
|||
|
|
@ -18,10 +18,15 @@ jobs:
|
|||
if(asso == 'OWNER' || asso == 'MEMBER') {
|
||||
const body = context.payload.comment.body
|
||||
if(body.includes("build:")) {
|
||||
const re = /\/build:(\w+)\s*/;
|
||||
const re = /\/(force-)?build:(\w+)\s*/;
|
||||
if(re.test(body)){
|
||||
const res = re.exec(body)
|
||||
return res[1];
|
||||
if(body.includes("force-")) {
|
||||
return res[2]+":yes"
|
||||
}
|
||||
else{
|
||||
return res[2]+":no"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -65,19 +70,29 @@ jobs:
|
|||
mkdir -p build_doc && cd build_doc && cmake ../Documentation/doc
|
||||
|
||||
- name: Build and Upload Doc
|
||||
id: build_and_run
|
||||
if: steps.get_round.outputs.result != 'stop'
|
||||
run: |
|
||||
set -ex
|
||||
PR_NUMBER=${{ steps.get_pr_number.outputs.result }}
|
||||
ROUND=${{ steps.get_round.outputs.result }}
|
||||
TMP_ROUND=${{ steps.get_round.outputs.result }}
|
||||
ROUND=$(echo $TMP_ROUND | cut -d ":" -f 1)
|
||||
force=$(echo $TMP_ROUND | cut -d ":" -f 2)
|
||||
wget --no-verbose cgal.github.io -O tmp.html
|
||||
if ! egrep -q "\/$PR_NUMBER\/$ROUND" tmp.html; then
|
||||
if ! egrep -q "\/$PR_NUMBER\/$ROUND" tmp.html || [ "$force" = "yes" ]; then
|
||||
#list impacted packages
|
||||
LIST_OF_PKGS=$(git diff --name-only HEAD^1 HEAD |cut -s -d/ -f1 |sort -u | xargs -I {} ls -d {}/package_info 2>/dev/null |cut -d/ -f1 |egrep -v Installation||true)
|
||||
LIST_OF_PKGS=$(git diff --name-only HEAD^1 HEAD |cut -s -d/ -f1 |sort -u | xargs -I {} echo {} && ls -d {}/package_info 2>/dev/null |cut -d/ -f1 |egrep -v Installation||true)
|
||||
if [ "$LIST_OF_PKGS" = "" ]; then
|
||||
echo "::set-output name=DoxygenError::No package affected."
|
||||
exit 1
|
||||
fi
|
||||
cd build_doc && make -j2 doc
|
||||
make -j2 doc_with_postprocessing 2>tmp.log
|
||||
if [ -s tmp.log ]; then
|
||||
content=`cat ./tmp.log`
|
||||
echo "::set-output name=DoxygenError::$(cat tmp.log)"
|
||||
exit 1
|
||||
fi
|
||||
cd build_doc && make -j2 doc && make -j2 doc_with_postprocessing
|
||||
cd ..
|
||||
git clone https://CGAL:${{ secrets.PUSH_TO_CGAL_GITHUB_IO_TOKEN }}@github.com/CGAL/cgal.github.io.git
|
||||
mkdir -p cgal.github.io/${PR_NUMBER}/$ROUND
|
||||
|
|
@ -94,18 +109,36 @@ jobs:
|
|||
mv tmp.html index.html
|
||||
git add ${PR_NUMBER}/$ROUND index.html && git commit -q --amend -m "base commit" && git push -q -f -u origin master
|
||||
else
|
||||
echo "::set-output name=DoxygenError::This round already exists. Overwrite it with /force-build"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Post address
|
||||
uses: actions/github-script@v3
|
||||
if: steps.get_round.outputs.result != 'stop'
|
||||
if: ${{ success() && steps.get_round.outputs.result != 'stop' }}
|
||||
with:
|
||||
script: |
|
||||
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 }}/${{ steps.get_round.outputs.result }}/Manual/index.html"
|
||||
const tmp_round = "${{ steps.get_round.outputs.result }}";
|
||||
const id = tmp_round.indexOf(":");
|
||||
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"
|
||||
github.issues.createComment({
|
||||
owner: "CGAL",
|
||||
repo: "cgal",
|
||||
issue_number: ${{ github.event.issue.number }},
|
||||
body: address
|
||||
});
|
||||
|
||||
- name: Post error
|
||||
uses: actions/github-script@v3
|
||||
if: ${{ failure() && steps.get_round.outputs.result != 'stop' }}
|
||||
with:
|
||||
script: |
|
||||
const error = "${{steps.build_and_run.outputs.DoxygenError}}"
|
||||
const msg = "There was an error while building the doc: \n"+error
|
||||
github.issues.createComment({
|
||||
owner: "CGAL",
|
||||
repo: "cgal",
|
||||
issue_number: ${{ github.event.issue.number }},
|
||||
body: msg
|
||||
});
|
||||
|
|
|
|||
|
|
@ -25,8 +25,8 @@ jobs:
|
|||
if [ -d ${PR_NUMBER} ]; then
|
||||
git rm -r ${PR_NUMBER}
|
||||
fi
|
||||
#git diff exits with 1 if there is a diff
|
||||
if ! git diff --quiet; then
|
||||
#git diff exits with 1 if there is no diff
|
||||
if git diff --quiet; then
|
||||
git commit -a --amend -m"base commit" && git push -f -u origin master
|
||||
fi
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,70 @@
|
|||
name: Filter Testsuite
|
||||
|
||||
on:
|
||||
issue_comment:
|
||||
types: [created]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
if: github.event.comment.user.login == 'maxGimeno' && contains(github.event.comment.body, '/testme')
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/github-script@v3
|
||||
id: get_label
|
||||
with:
|
||||
result-encoding: string
|
||||
script: |
|
||||
//get branch name and username
|
||||
const pr_url = context.payload.issue.pull_request.url
|
||||
const pr_content = await github.request(pr_url)
|
||||
const label = pr_content.data.head.label
|
||||
const base = pr_content.data.base.ref
|
||||
console.log(label)
|
||||
return label+":"+base
|
||||
- name: Run Testsuite
|
||||
run: |
|
||||
mkdir -p ~/.ssh
|
||||
#ssh key
|
||||
(
|
||||
cat <<EOF
|
||||
${{ secrets.ssh_key }}
|
||||
EOF
|
||||
)>> ~/.ssh/id_rsa
|
||||
chmod 600 /home/runner/.ssh/id_rsa
|
||||
#ssh public key
|
||||
(
|
||||
cat <<EOF
|
||||
${{ secrets.ssh_key_pub }}
|
||||
EOF
|
||||
)>> ~/.ssh/id_rsa.pub
|
||||
chmod 644 /home/runner/.ssh/id_rsa.pub
|
||||
#known hosts
|
||||
wget --no-check-certificate https://cgal.geometryfactory.com/CGAL/ssh_known_hosts -O ~/.ssh/known_hosts
|
||||
#config file
|
||||
wget --no-check-certificate https://cgal.geometryfactory.com/CGAL/ssh_config -O ~/.ssh/config
|
||||
#list of hosts
|
||||
wget --no-check-certificate https://cgal.geometryfactory.com/CGAL/ssh_host_list -O ~/ssh_host_list
|
||||
#ssh command
|
||||
LABEL="${{ steps.get_label.outputs.result }}"
|
||||
USER_NAME=$(echo $LABEL | cut -d':' -f 1)
|
||||
BRANCH_NAME=$(echo $LABEL | cut -d':' -f 2)
|
||||
BASE=$(echo $LABEL | cut -d':' -f 3)
|
||||
PR_NUMBER=${{ github.event.issue.number }}
|
||||
mapfile -t HOSTS < ~/ssh_host_list;
|
||||
for i in ${!HOSTS[@]}; do
|
||||
HOST=$(echo ${HOSTS[$i]}|cut -d' ' -f 1 )
|
||||
PATH_TO_SCRIPT=$(echo ${HOSTS[$i]}|cut -d' ' -f 2 )
|
||||
echo "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
|
||||
- name: Post address
|
||||
uses: actions/github-script@v3
|
||||
with:
|
||||
script: |
|
||||
const address = "The testsuite is lauched. results will be found, after it is done, here : https://cgal.geometryfactory.com/~mgimeno/test_suite/TESTRESULTS/index.shtml "
|
||||
github.issues.createComment({
|
||||
owner: "CGAL",
|
||||
repo: "cgal",
|
||||
issue_number: ${{ github.event.issue.number }},
|
||||
body: address
|
||||
});
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
# Created by the script cgal_create_cmake_script
|
||||
# This is the CMake script for compiling a CGAL application.
|
||||
|
||||
cmake_minimum_required(VERSION 3.1...3.14)
|
||||
cmake_minimum_required(VERSION 3.1...3.20)
|
||||
project(AABB_traits_benchmark)
|
||||
|
||||
find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Core)
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# This is the CMake script for compiling the AABB tree demo.
|
||||
|
||||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
cmake_minimum_required(VERSION 3.1...3.20)
|
||||
project(AABB_tree_Demo)
|
||||
|
||||
# Find includes in corresponding build directories
|
||||
|
|
|
|||
|
|
@ -154,7 +154,7 @@ void MainWindow::on_actionInside_points_triggered()
|
|||
bool ok;
|
||||
|
||||
const unsigned int nb_points = (unsigned)
|
||||
QInputDialog::getInt(NULL, "#Points",
|
||||
QInputDialog::getInt(nullptr, "#Points",
|
||||
"#Points:",10000,1,100000000,9,&ok);
|
||||
|
||||
if(!ok)
|
||||
|
|
@ -171,19 +171,19 @@ void MainWindow::on_actionPoints_in_interval_triggered()
|
|||
bool ok;
|
||||
|
||||
const unsigned int nb_points = (unsigned)
|
||||
QInputDialog::getInt(NULL, "#Points",
|
||||
QInputDialog::getInt(nullptr, "#Points",
|
||||
"#Points:",10000,1,100000000,9,&ok);
|
||||
|
||||
if(!ok)
|
||||
return;
|
||||
|
||||
const double min =
|
||||
QInputDialog::getDouble(NULL, "min",
|
||||
QInputDialog::getDouble(nullptr, "min",
|
||||
"Min:",-0.1,-1000.0,1000.0,9,&ok);
|
||||
if(!ok)
|
||||
return;
|
||||
const double max =
|
||||
QInputDialog::getDouble(NULL, "max",
|
||||
QInputDialog::getDouble(nullptr, "max",
|
||||
"Max:",0.1,-1000.0,1000.0,9,&ok);
|
||||
if(!ok)
|
||||
return;
|
||||
|
|
@ -199,7 +199,7 @@ void MainWindow::on_actionBoundary_segments_triggered()
|
|||
bool ok;
|
||||
|
||||
const unsigned int nb_slices = (unsigned)
|
||||
QInputDialog::getInt(NULL, "#Slices",
|
||||
QInputDialog::getInt(nullptr, "#Slices",
|
||||
"Slices:",100,1,1000000,8,&ok);
|
||||
|
||||
if(!ok)
|
||||
|
|
@ -216,7 +216,7 @@ void MainWindow::on_actionBoundary_points_triggered()
|
|||
bool ok;
|
||||
|
||||
const unsigned int nb_points = (unsigned)
|
||||
QInputDialog::getInt(NULL, "#Points",
|
||||
QInputDialog::getInt(nullptr, "#Points",
|
||||
"Points:",1000,1,10000000,8,&ok);
|
||||
|
||||
if(!ok)
|
||||
|
|
@ -233,7 +233,7 @@ void MainWindow::on_actionEdge_points_triggered()
|
|||
bool ok;
|
||||
|
||||
const unsigned int nb_points = (unsigned)
|
||||
QInputDialog::getInt(NULL, "#Points",
|
||||
QInputDialog::getInt(nullptr, "#Points",
|
||||
"Points:",1000,1,10000000,8,&ok);
|
||||
|
||||
if(!ok)
|
||||
|
|
@ -248,7 +248,7 @@ void MainWindow::on_actionEdge_points_triggered()
|
|||
void MainWindow::on_actionBench_distances_triggered()
|
||||
{
|
||||
bool ok;
|
||||
const double duration = QInputDialog::getDouble(NULL, "Duration",
|
||||
const double duration = QInputDialog::getDouble(nullptr, "Duration",
|
||||
"Duration (s):",1.0,0.01,1000,8,&ok);
|
||||
if(!ok)
|
||||
return;
|
||||
|
|
@ -262,7 +262,7 @@ void MainWindow::on_actionBench_distances_triggered()
|
|||
void MainWindow::on_actionBench_intersections_triggered()
|
||||
{
|
||||
bool ok;
|
||||
const double duration = QInputDialog::getDouble(NULL, "Duration",
|
||||
const double duration = QInputDialog::getDouble(nullptr, "Duration",
|
||||
"Duration (s):",1.0,0.01,1000.0,8,&ok);
|
||||
if(!ok)
|
||||
return;
|
||||
|
|
@ -361,7 +361,7 @@ void MainWindow::on_actionRefine_bisection_triggered()
|
|||
{
|
||||
bool ok;
|
||||
const double max_len =
|
||||
QInputDialog::getDouble(NULL, "Max edge len",
|
||||
QInputDialog::getDouble(nullptr, "Max edge len",
|
||||
"Max edge len:",0.1,0.001,100.0,9,&ok);
|
||||
if(!ok)
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ class MainWindow :
|
|||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
MainWindow(QWidget* parent = 0);
|
||||
MainWindow(QWidget* parent = nullptr);
|
||||
~MainWindow();
|
||||
|
||||
public slots:
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ Scene::Scene()
|
|||
, m_grid_size(slow_distance_grid_size)
|
||||
, m_cut_plane(NONE)
|
||||
{
|
||||
m_pPolyhedron = NULL;
|
||||
m_pPolyhedron = nullptr;
|
||||
|
||||
// view options
|
||||
m_view_points = true;
|
||||
|
|
@ -541,7 +541,7 @@ int Scene::open(QString filename)
|
|||
return -1;
|
||||
}
|
||||
|
||||
if(m_pPolyhedron != NULL)
|
||||
if(m_pPolyhedron != nullptr)
|
||||
delete m_pPolyhedron;
|
||||
|
||||
// allocate new polyhedron
|
||||
|
|
@ -553,7 +553,7 @@ int Scene::open(QString filename)
|
|||
QApplication::restoreOverrideCursor();
|
||||
|
||||
delete m_pPolyhedron;
|
||||
m_pPolyhedron = NULL;
|
||||
m_pPolyhedron = nullptr;
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
|
@ -571,7 +571,7 @@ void Scene::update_bbox()
|
|||
std::cout << "Compute bbox...";
|
||||
m_bbox = Bbox();
|
||||
|
||||
if(m_pPolyhedron == NULL)
|
||||
if(m_pPolyhedron == nullptr)
|
||||
{
|
||||
std::cout << "failed (no polyhedron)." << std::endl;
|
||||
return;
|
||||
|
|
@ -794,7 +794,7 @@ FT Scene::bbox_diag() const
|
|||
|
||||
void Scene::build_facet_tree()
|
||||
{
|
||||
if ( NULL == m_pPolyhedron )
|
||||
if ( nullptr == m_pPolyhedron )
|
||||
{
|
||||
std::cerr << "Build facet tree failed: load polyhedron first." << std::endl;
|
||||
return;
|
||||
|
|
@ -813,7 +813,7 @@ void Scene::build_facet_tree()
|
|||
|
||||
void Scene::build_edge_tree()
|
||||
{
|
||||
if ( NULL == m_pPolyhedron )
|
||||
if ( nullptr == m_pPolyhedron )
|
||||
{
|
||||
std::cerr << "Build edge tree failed: load polyhedron first." << std::endl;
|
||||
return;
|
||||
|
|
@ -860,7 +860,7 @@ void Scene::generate_points_in(const unsigned int nb_points,
|
|||
const double vmin,
|
||||
const double vmax)
|
||||
{
|
||||
if(m_pPolyhedron == NULL)
|
||||
if(m_pPolyhedron == nullptr)
|
||||
{
|
||||
std::cout << "Load polyhedron first." << std::endl;
|
||||
return;
|
||||
|
|
@ -913,7 +913,7 @@ void Scene::generate_points_in(const unsigned int nb_points,
|
|||
|
||||
void Scene::generate_inside_points(const unsigned int nb_points)
|
||||
{
|
||||
if(m_pPolyhedron == NULL)
|
||||
if(m_pPolyhedron == nullptr)
|
||||
{
|
||||
std::cout << "Load polyhedron first." << std::endl;
|
||||
return;
|
||||
|
|
@ -955,7 +955,7 @@ void Scene::generate_inside_points(const unsigned int nb_points)
|
|||
|
||||
void Scene::generate_boundary_segments(const unsigned int nb_slices)
|
||||
{
|
||||
if(m_pPolyhedron == NULL)
|
||||
if(m_pPolyhedron == nullptr)
|
||||
{
|
||||
std::cout << "Load polyhedron first." << std::endl;
|
||||
return;
|
||||
|
|
@ -1005,7 +1005,7 @@ void Scene::generate_boundary_segments(const unsigned int nb_slices)
|
|||
|
||||
void Scene::generate_boundary_points(const unsigned int nb_points)
|
||||
{
|
||||
if(m_pPolyhedron == NULL)
|
||||
if(m_pPolyhedron == nullptr)
|
||||
{
|
||||
std::cout << "Load polyhedron first." << std::endl;
|
||||
return;
|
||||
|
|
@ -1055,7 +1055,7 @@ void Scene::generate_boundary_points(const unsigned int nb_points)
|
|||
|
||||
void Scene::generate_edge_points(const unsigned int nb_points)
|
||||
{
|
||||
if(m_pPolyhedron == NULL)
|
||||
if(m_pPolyhedron == nullptr)
|
||||
{
|
||||
std::cout << "Load polyhedron first." << std::endl;
|
||||
return;
|
||||
|
|
@ -1219,7 +1219,7 @@ void Scene::cut_segment_plane()
|
|||
{
|
||||
const Segment* inter_seg = CGAL::object_cast<Segment>(&(it->first));
|
||||
|
||||
if ( NULL != inter_seg )
|
||||
if ( nullptr != inter_seg )
|
||||
{
|
||||
m_cut_segments.push_back(*inter_seg);
|
||||
}
|
||||
|
|
@ -1280,7 +1280,7 @@ void Scene::toggle_view_plane()
|
|||
|
||||
void Scene::refine_bisection(const FT max_sqlen)
|
||||
{
|
||||
if(m_pPolyhedron == NULL)
|
||||
if(m_pPolyhedron == nullptr)
|
||||
{
|
||||
std::cout << "Load polyhedron first." << std::endl;
|
||||
return;
|
||||
|
|
@ -1295,7 +1295,7 @@ void Scene::refine_bisection(const FT max_sqlen)
|
|||
|
||||
void Scene::refine_loop()
|
||||
{
|
||||
if(m_pPolyhedron == NULL)
|
||||
if(m_pPolyhedron == nullptr)
|
||||
{
|
||||
std::cout << "Load polyhedron first." << std::endl;
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
Viewer::Viewer(QWidget* parent)
|
||||
: CGAL::QGLViewer(parent),
|
||||
m_pScene(NULL),
|
||||
m_pScene(nullptr),
|
||||
m_custom_mouse(false)
|
||||
{
|
||||
}
|
||||
|
|
@ -19,7 +19,7 @@ void Viewer::setScene(Scene* pScene)
|
|||
void Viewer::draw()
|
||||
{
|
||||
CGAL::QGLViewer::draw();
|
||||
if(m_pScene != NULL)
|
||||
if(m_pScene != nullptr)
|
||||
{
|
||||
m_pScene->draw(this);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
void Scene::benchmark_intersections(const double duration)
|
||||
{
|
||||
if(m_pPolyhedron == NULL)
|
||||
if(m_pPolyhedron == nullptr)
|
||||
{
|
||||
std::cout << "Load polyhedron first." << std::endl;
|
||||
return;
|
||||
|
|
@ -67,7 +67,7 @@ void Scene::bench_intersections(Facet_tree& tree,
|
|||
|
||||
void Scene::benchmark_distances(const double duration)
|
||||
{
|
||||
if(m_pPolyhedron == NULL)
|
||||
if(m_pPolyhedron == nullptr)
|
||||
{
|
||||
std::cout << "Load polyhedron first." << std::endl;
|
||||
return;
|
||||
|
|
@ -101,7 +101,7 @@ std::size_t Scene::nb_digits(std::size_t value)
|
|||
// refinement loop
|
||||
void Scene::bench_memory()
|
||||
{
|
||||
if(m_pPolyhedron == NULL)
|
||||
if(m_pPolyhedron == nullptr)
|
||||
{
|
||||
std::cout << "Load polyhedron first." << std::endl;
|
||||
return;
|
||||
|
|
@ -137,7 +137,7 @@ void Scene::bench_memory()
|
|||
|
||||
void Scene::bench_construction()
|
||||
{
|
||||
if(m_pPolyhedron == NULL)
|
||||
if(m_pPolyhedron == nullptr)
|
||||
{
|
||||
std::cout << "Load polyhedron first." << std::endl;
|
||||
return;
|
||||
|
|
@ -174,7 +174,7 @@ void Scene::bench_construction()
|
|||
|
||||
void Scene::bench_intersections_vs_nbt()
|
||||
{
|
||||
if(m_pPolyhedron == NULL)
|
||||
if(m_pPolyhedron == nullptr)
|
||||
{
|
||||
std::cout << "Load polyhedron first." << std::endl;
|
||||
return;
|
||||
|
|
@ -218,7 +218,7 @@ void Scene::bench_intersections_vs_nbt()
|
|||
|
||||
void Scene::bench_distances_vs_nbt()
|
||||
{
|
||||
if(m_pPolyhedron == NULL)
|
||||
if(m_pPolyhedron == nullptr)
|
||||
{
|
||||
std::cout << "Load polyhedron first." << std::endl;
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -45,11 +45,9 @@ typedef unspecified_type Do_intersect_3;
|
|||
|
||||
/*!
|
||||
A functor object to construct the intersection between two geometric objects.
|
||||
This functor must support the result_of protocol, that is the return
|
||||
type of the `operator()(A, B)` is `CGAL::cpp11::result<Intersect_3(A,B)>`.
|
||||
|
||||
Provides the operators:
|
||||
`CGAL::cpp11::result<Intersect_3(A,B)> operator()(const A& a, const B& b);`
|
||||
`decltype(auto) operator()(const A& a, const B& b);`
|
||||
where `A` and `B` are any relevant types among `Ray_3`, `Segment_3`, `Line_3`,
|
||||
`Triangle_3`, `Plane_3` and `Bbox_3`.
|
||||
Relevant herein means that a line primitive (ray, segment, line) is tested
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ void triangle_mesh(const char* fname)
|
|||
typedef CGAL::AABB_tree<Traits> Tree;
|
||||
|
||||
TriangleMesh tmesh;
|
||||
if(!CGAL::read_polygon_mesh(fname, tmesh) || CGAL::is_triangle_mesh(tmesh))
|
||||
if(!CGAL::IO::read_polygon_mesh(fname, tmesh) || CGAL::is_triangle_mesh(tmesh))
|
||||
{
|
||||
std::cerr << "Invalid input." << std::endl;
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -99,7 +99,7 @@ public:
|
|||
// types
|
||||
typedef CGAL::AABB_traits<K, My_triangle_primitive> My_AABB_traits;
|
||||
typedef CGAL::AABB_tree<My_AABB_traits> Tree;
|
||||
const double* My_triangle_primitive::point_container = 0;
|
||||
const double* My_triangle_primitive::point_container = nullptr;
|
||||
|
||||
int main()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -106,7 +106,7 @@ public:
|
|||
// types
|
||||
typedef CGAL::AABB_traits<K, My_triangle_primitive> My_AABB_traits;
|
||||
typedef CGAL::AABB_tree<My_AABB_traits> Tree;
|
||||
const std::vector<My_point>* My_triangle_primitive::point_container = 0;
|
||||
const std::vector<My_point>* My_triangle_primitive::point_container = nullptr;
|
||||
|
||||
int main()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ int main(int argc, char* argv[])
|
|||
const char* filename = (argc > 1) ? argv[1] : "data/tetrahedron.off";
|
||||
|
||||
Mesh mesh;
|
||||
if(!CGAL::read_polygon_mesh(filename, mesh))
|
||||
if(!CGAL::IO::read_polygon_mesh(filename, mesh))
|
||||
{
|
||||
std::cerr << "Invalid input." << std::endl;
|
||||
return 1;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Created by the script cgal_create_cmake_script
|
||||
# This is the CMake script for compiling a CGAL application.
|
||||
|
||||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
cmake_minimum_required(VERSION 3.1...3.20)
|
||||
project(AABB_tree_Examples)
|
||||
|
||||
find_package(CGAL REQUIRED)
|
||||
|
|
|
|||
|
|
@ -20,7 +20,6 @@
|
|||
#include <CGAL/disable_warnings.h>
|
||||
|
||||
#include <CGAL/AABB_primitive.h>
|
||||
#include <CGAL/result_of.h>
|
||||
#include <iterator>
|
||||
|
||||
namespace CGAL {
|
||||
|
|
@ -31,14 +30,17 @@ namespace internal {
|
|||
//classical typedefs
|
||||
typedef Iterator key_type;
|
||||
typedef typename GeomTraits::Point_3 value_type;
|
||||
typedef typename cpp11::result_of<
|
||||
typename GeomTraits::Construct_source_3(typename GeomTraits::Segment_3)
|
||||
>::type reference;
|
||||
// typedef decltype(
|
||||
// std::declval<typename GeomTraits::Construct_source_3>()(
|
||||
// std::declval<typename GeomTraits::Segment_3>())) reference;
|
||||
typedef decltype(
|
||||
typename GeomTraits::Construct_source_3()(
|
||||
*std::declval<key_type&>())) reference;
|
||||
typedef boost::readable_property_map_tag category;
|
||||
typedef Source_of_segment_3_iterator_property_map<GeomTraits, Iterator> Self;
|
||||
|
||||
inline friend
|
||||
typename Source_of_segment_3_iterator_property_map<GeomTraits,Iterator>::reference
|
||||
get(Source_of_segment_3_iterator_property_map<GeomTraits,Iterator>, Iterator it)
|
||||
inline friend reference
|
||||
get(Self, key_type it)
|
||||
{
|
||||
return typename GeomTraits::Construct_source_3()( *it );
|
||||
}
|
||||
|
|
@ -57,7 +59,6 @@ namespace internal {
|
|||
* \tparam GeomTraits is a traits class providing the nested type `Point_3` and `Segment_3`.
|
||||
* It also provides the functor `Construct_source_3` that has an operator taking a `Segment_3`
|
||||
* and returning its source as a type convertible to `Point_3`.
|
||||
* In addition `Construct_source_3` must support the result_of protocol.
|
||||
* \tparam Iterator is a model of `ForwardIterator` with its value type convertible to `GeomTraits::Segment_3`
|
||||
* \tparam CacheDatum is either `CGAL::Tag_true` or `CGAL::Tag_false`. In the former case,
|
||||
* the datum is stored in the primitive, while in the latter it is
|
||||
|
|
|
|||
|
|
@ -24,6 +24,8 @@
|
|||
#include <CGAL/internal/AABB_tree/Has_nested_type_Shared_data.h>
|
||||
#include <CGAL/internal/AABB_tree/Is_ray_intersection_geomtraits.h>
|
||||
#include <CGAL/internal/AABB_tree/Primitive_helper.h>
|
||||
#include <CGAL/internal/Has_boolean_tags.h>
|
||||
|
||||
|
||||
#include <boost/optional.hpp>
|
||||
|
||||
|
|
@ -190,14 +192,14 @@ public:
|
|||
typedef typename std::pair<typename GeomTraits::Point_3, typename Primitive::Id> Point_and_primitive_id;
|
||||
|
||||
/// `Intersection_and_primitive_id<Query>::%Type::first_type` is found according to
|
||||
/// the result type of `GeomTraits::Intersect_3::operator()`,
|
||||
/// (that is cpp11::result_of<GeomTraits::Intersect_3(Query, Primitive::Datum)>::type). If it is
|
||||
/// the result type of `GeomTraits::Intersect_3::operator()`. If it is
|
||||
/// `boost::optional<T>` then it is `T`, and the result type otherwise.
|
||||
template<typename Query>
|
||||
struct Intersection_and_primitive_id {
|
||||
typedef typename cpp11::result_of<
|
||||
typename GeomTraits::Intersect_3(Query, typename Primitive::Datum)
|
||||
>::type Intersection_type;
|
||||
typedef decltype(
|
||||
std::declval<typename GeomTraits::Intersect_3>()(
|
||||
std::declval<Query>(),
|
||||
std::declval<typename Primitive::Datum>())) Intersection_type;
|
||||
|
||||
typedef std::pair<
|
||||
typename internal::AABB_tree::Remove_optional<Intersection_type>::type,
|
||||
|
|
@ -364,8 +366,7 @@ public:
|
|||
template<typename Query>
|
||||
boost::optional< typename Intersection_and_primitive_id<Query>::Type >
|
||||
operator()(const Query& query, const typename AT::Primitive& primitive) const {
|
||||
typename cpp11::result_of<typename GeomTraits::Intersect_3(Query, typename Primitive::Datum) >::type
|
||||
inter_res = GeomTraits().intersect_3_object()(internal::Primitive_helper<AT>::get_datum(primitive,m_traits),query);
|
||||
auto inter_res = GeomTraits().intersect_3_object()(internal::Primitive_helper<AT>::get_datum(primitive,m_traits),query);
|
||||
if (!inter_res)
|
||||
return boost::none;
|
||||
return boost::make_optional( std::make_pair(*inter_res, primitive.id()) );
|
||||
|
|
@ -414,6 +415,27 @@ public:
|
|||
CGAL::SMALLER : CGAL::LARGER;
|
||||
}
|
||||
|
||||
CGAL::Comparison_result operator()(const Point& p, const Bounding_box& bb, const Point& bound, Tag_true) const
|
||||
{
|
||||
return GeomTraits().do_intersect_3_object()
|
||||
(GeomTraits().construct_sphere_3_object()
|
||||
(p, GeomTraits().compute_squared_distance_3_object()(p, bound)), bb,true)?
|
||||
CGAL::SMALLER : CGAL::LARGER;
|
||||
}
|
||||
|
||||
CGAL::Comparison_result operator()(const Point& p, const Bounding_box& bb, const Point& bound, Tag_false) const
|
||||
{
|
||||
return GeomTraits().do_intersect_3_object()
|
||||
(GeomTraits().construct_sphere_3_object()
|
||||
(p, GeomTraits().compute_squared_distance_3_object()(p, bound)), bb)?
|
||||
CGAL::SMALLER : CGAL::LARGER;
|
||||
}
|
||||
|
||||
CGAL::Comparison_result operator()(const Point& p, const Bounding_box& bb, const Point& bound) const
|
||||
{
|
||||
return (*this)(p, bb, bound, Boolean_tag<internal::Has_static_filters<GeomTraits>::value>());
|
||||
}
|
||||
|
||||
template <class Solid>
|
||||
CGAL::Comparison_result operator()(const Point& p, const Solid& pr, const FT& sq_distance) const
|
||||
{
|
||||
|
|
@ -423,6 +445,7 @@ public:
|
|||
CGAL::SMALLER :
|
||||
CGAL::LARGER;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
Closest_point closest_point_object() const {return Closest_point(*this);}
|
||||
|
|
|
|||
|
|
@ -527,6 +527,36 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
template <class Query, class Traversal_traits>
|
||||
void traversal_with_priority(const Query& query, Traversal_traits& traits) const
|
||||
{
|
||||
switch(size())
|
||||
{
|
||||
case 0:
|
||||
break;
|
||||
case 1:
|
||||
traits.intersection(query, singleton_data());
|
||||
break;
|
||||
default: // if(size() >= 2)
|
||||
root_node()->template traversal_with_priority<Traversal_traits,Query>(query, traits, m_primitives.size());
|
||||
}
|
||||
}
|
||||
|
||||
template <class Query, class Traversal_traits>
|
||||
void traversal_with_priority_and_group_traversal(const Query& query, Traversal_traits& traits, const std::size_t group_traversal_bound) const
|
||||
{
|
||||
switch(size())
|
||||
{
|
||||
case 0:
|
||||
break;
|
||||
case 1:
|
||||
traits.intersection(query, singleton_data());
|
||||
break;
|
||||
default: // if(size() >= 2)
|
||||
root_node()->template traversal_with_priority_and_group_traversal(m_primitives, query, traits, m_primitives.size(), 0, group_traversal_bound);
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
typedef AABB_node<AABBTraits> Node;
|
||||
|
||||
|
|
|
|||
|
|
@ -20,7 +20,6 @@
|
|||
#include <CGAL/disable_warnings.h>
|
||||
|
||||
#include <CGAL/AABB_primitive.h>
|
||||
#include <CGAL/result_of.h>
|
||||
#include <iterator>
|
||||
|
||||
namespace CGAL {
|
||||
|
|
@ -31,14 +30,18 @@ namespace internal {
|
|||
//classical typedefs
|
||||
typedef Iterator key_type;
|
||||
typedef typename GeomTraits::Point_3 value_type;
|
||||
typedef typename cpp11::result_of<
|
||||
typename GeomTraits::Construct_vertex_3(typename GeomTraits::Triangle_3,int)
|
||||
>::type reference;
|
||||
// typedef decltype(
|
||||
// std::declval<typename GeomTraits::Construct_vertex_3>()(
|
||||
// std::declval<typename GeomTraits::Triangle_3>(),
|
||||
// std::declval<int>())) reference;
|
||||
typedef decltype(
|
||||
typename GeomTraits::Construct_vertex_3()(
|
||||
*std::declval<key_type&>(), 0)) reference;
|
||||
typedef boost::readable_property_map_tag category;
|
||||
typedef Point_from_triangle_3_iterator_property_map<GeomTraits, Iterator> Self;
|
||||
|
||||
inline friend
|
||||
typename Point_from_triangle_3_iterator_property_map<GeomTraits,Iterator>::reference
|
||||
get(Point_from_triangle_3_iterator_property_map<GeomTraits,Iterator>, Iterator it)
|
||||
inline friend reference
|
||||
get(Self, key_type it)
|
||||
{
|
||||
return typename GeomTraits::Construct_vertex_3()( *it, 0 );
|
||||
}
|
||||
|
|
@ -57,7 +60,6 @@ namespace internal {
|
|||
* \tparam GeomTraits is a traits class providing the nested type `Point_3` and `Triangle_3`.
|
||||
* It also provides the functor `Construct_vertex_3` that has an operator taking a `Triangle_3`
|
||||
* and an integer as parameters and returning a triangle point as a type convertible to `Point_3`.
|
||||
* In addition `Construct_vertex_3` must support the result_of protocol.
|
||||
* \tparam Iterator is a model of `ForwardIterator` with its value type convertible to `GeomTraits::Triangle_3`
|
||||
* \tparam CacheDatum is either `CGAL::Tag_true` or `CGAL::Tag_false`. In the former case,
|
||||
* the datum is stored in the primitive, while in the latter it is
|
||||
|
|
|
|||
|
|
@ -18,7 +18,6 @@
|
|||
|
||||
|
||||
#include <CGAL/AABB_primitive.h>
|
||||
#include <CGAL/result_of.h>
|
||||
#include <iterator>
|
||||
|
||||
namespace CGAL
|
||||
|
|
@ -31,14 +30,18 @@ namespace CGAL
|
|||
//classical typedefs
|
||||
typedef Iterator key_type;
|
||||
typedef typename GeomTraits::Point_3 value_type;
|
||||
typedef typename cpp11::result_of<
|
||||
typename GeomTraits::Construct_vertex_3(typename GeomTraits::Tetrahedron_3, int)
|
||||
>::type reference;
|
||||
typedef decltype(
|
||||
std::declval<typename GeomTraits::Construct_vertex_3>()(
|
||||
std::declval<typename GeomTraits::Tetrahedron_3>(),
|
||||
std::declval<int>())) reference;
|
||||
// typedef decltype(
|
||||
// typename GeomTraits::Construct_vertex_3()(
|
||||
// *std::declval<key_type&>(), 0)) reference; // fails polyhedron demo!
|
||||
typedef boost::readable_property_map_tag category;
|
||||
typedef Point_from_cell_iterator_proprety_map<GeomTraits, Iterator> Self;
|
||||
|
||||
inline friend
|
||||
typename Point_from_cell_iterator_proprety_map<GeomTraits, Iterator>::reference
|
||||
get(Point_from_cell_iterator_proprety_map<GeomTraits, Iterator>, Iterator it)
|
||||
inline friend reference
|
||||
get(Self, key_type it)
|
||||
{
|
||||
typename GeomTraits::Construct_point_3 point;
|
||||
return point(it->vertex(1)->point());
|
||||
|
|
|
|||
|
|
@ -68,6 +68,20 @@ public:
|
|||
Traversal_traits& traits,
|
||||
const std::size_t nb_primitives) const;
|
||||
|
||||
template<class Traversal_traits, class Query>
|
||||
void traversal_with_priority(const Query& query,
|
||||
Traversal_traits& traits,
|
||||
const std::size_t nb_primitives) const;
|
||||
|
||||
template<class Primitive_vector, class Traversal_traits, class Query>
|
||||
void traversal_with_priority_and_group_traversal(const Primitive_vector& primitives,
|
||||
const Query& query,
|
||||
Traversal_traits& traits,
|
||||
const std::size_t nb_primitives,
|
||||
std::size_t first_primitive_index,
|
||||
const std::size_t group_size_bound) const;
|
||||
|
||||
|
||||
private:
|
||||
typedef AABBTraits AABB_traits;
|
||||
typedef AABB_node<AABB_traits> Node;
|
||||
|
|
@ -152,6 +166,156 @@ AABB_node<Tr>::traversal(const Query& query,
|
|||
}
|
||||
}
|
||||
|
||||
template<typename Tr>
|
||||
template<class Traversal_traits, class Query>
|
||||
void
|
||||
AABB_node<Tr>::traversal_with_priority(const Query& query,
|
||||
Traversal_traits& traits,
|
||||
const std::size_t nb_primitives) const
|
||||
{
|
||||
// Recursive traversal
|
||||
switch(nb_primitives)
|
||||
{
|
||||
case 2:
|
||||
traits.intersection(query, left_data());
|
||||
if( traits.go_further() )
|
||||
{
|
||||
traits.intersection(query, right_data());
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
traits.intersection(query, left_data());
|
||||
if( traits.go_further() && traits.do_intersect(query, right_child()) )
|
||||
{
|
||||
right_child().traversal_with_priority(query, traits, 2);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
bool ileft, iright;
|
||||
typename Traversal_traits::Priority pleft, pright;
|
||||
std::tie(ileft, pleft) = traits.do_intersect_with_priority(query, left_child());
|
||||
std::tie(iright, pright) = traits.do_intersect_with_priority(query, right_child());
|
||||
CGAL_precondition( (ileft || iright) ? traits.do_intersect(query, *this) : true );
|
||||
|
||||
if(ileft)
|
||||
{
|
||||
if(iright)
|
||||
{
|
||||
// Both children have to be inspected.
|
||||
if(pleft >= pright)
|
||||
{
|
||||
// Inspect the left child first, has higher priority.
|
||||
left_child().traversal_with_priority(query, traits, nb_primitives/2);
|
||||
if( traits.go_further() )
|
||||
right_child().traversal_with_priority(query, traits, nb_primitives-nb_primitives/2);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Inspect the right child first, has higher priority.
|
||||
right_child().traversal_with_priority(query, traits, nb_primitives-nb_primitives/2);
|
||||
if( traits.go_further() )
|
||||
left_child().traversal_with_priority(query, traits, nb_primitives/2);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Only the left child has to be inspected.
|
||||
left_child().traversal_with_priority(query, traits, nb_primitives/2);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(iright)
|
||||
{
|
||||
// Only the right child has to be inspected.
|
||||
right_child().traversal_with_priority(query, traits, nb_primitives-nb_primitives/2);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: find a better name
|
||||
template<typename Tr>
|
||||
template<class Primitive_vector, class Traversal_traits, class Query>
|
||||
void
|
||||
AABB_node<Tr>::traversal_with_priority_and_group_traversal(const Primitive_vector& primitives,
|
||||
const Query& query,
|
||||
Traversal_traits& traits,
|
||||
const std::size_t nb_primitives,
|
||||
std::size_t first_primitive_index,
|
||||
const std::size_t group_traversal_bound) const
|
||||
{
|
||||
// Group traversal
|
||||
CGAL_assertion(group_traversal_bound >= 2);
|
||||
if ( nb_primitives <= group_traversal_bound )
|
||||
{
|
||||
if ( !traits.do_intersect(query, *this) ) return;
|
||||
CGAL_assertion(traits.do_intersect(query, *this));
|
||||
traits.traverse_group(query, primitives.begin()+first_primitive_index, primitives.begin()+first_primitive_index+nb_primitives);
|
||||
return;
|
||||
}
|
||||
|
||||
// Recursive traversal
|
||||
switch(nb_primitives)
|
||||
{
|
||||
case 2:
|
||||
traits.intersection(query, left_data());
|
||||
if( traits.go_further() )
|
||||
{
|
||||
traits.intersection(query, right_data());
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
traits.intersection(query, left_data());
|
||||
if( traits.go_further() && traits.do_intersect(query, right_child()) )
|
||||
{
|
||||
right_child().traversal_with_priority_and_group_traversal(primitives, query, traits, 2, first_primitive_index+1, group_traversal_bound);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
bool ileft, iright;
|
||||
typename Traversal_traits::Priority pleft, pright;
|
||||
std::tie(ileft, pleft) = traits.do_intersect_with_priority(query, left_child());
|
||||
std::tie(iright, pright) = traits.do_intersect_with_priority(query, right_child());
|
||||
CGAL_precondition( (ileft || iright) ? traits.do_intersect(query, *this) : true );
|
||||
|
||||
if(ileft)
|
||||
{
|
||||
if(iright)
|
||||
{
|
||||
// Both children have to be inspected.
|
||||
if(pleft >= pright)
|
||||
{
|
||||
// Inspect the left child first, has higher priority.
|
||||
left_child().traversal_with_priority_and_group_traversal(primitives, query, traits, nb_primitives/2, first_primitive_index, group_traversal_bound);
|
||||
if( traits.go_further() )
|
||||
right_child().traversal_with_priority_and_group_traversal(primitives, query, traits, nb_primitives-nb_primitives/2, first_primitive_index+nb_primitives/2, group_traversal_bound);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Inspect the right child first, has higher priority.
|
||||
right_child().traversal_with_priority_and_group_traversal(primitives, query, traits, nb_primitives-nb_primitives/2, first_primitive_index+nb_primitives/2, group_traversal_bound);
|
||||
if( traits.go_further() )
|
||||
left_child().traversal_with_priority_and_group_traversal(primitives, query, traits, nb_primitives/2, first_primitive_index, group_traversal_bound);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Only the left child has to be inspected.
|
||||
left_child().traversal_with_priority_and_group_traversal(primitives, query, traits, nb_primitives/2, first_primitive_index, group_traversal_bound);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(iright)
|
||||
{
|
||||
// Only the right child has to be inspected.
|
||||
right_child().traversal_with_priority_and_group_traversal(primitives, query, traits, nb_primitives-nb_primitives/2, first_primitive_index+nb_primitives/2, group_traversal_bound);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} // end namespace CGAL
|
||||
|
||||
#endif // CGAL_AABB_NODE_H
|
||||
|
|
|
|||
|
|
@ -21,7 +21,6 @@
|
|||
#include <boost/optional.hpp>
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
#include <boost/variant/apply_visitor.hpp>
|
||||
#if BOOST_VERSION >= 105000
|
||||
# if defined(BOOST_MSVC)
|
||||
# pragma warning(push)
|
||||
# pragma warning(disable: 4996)
|
||||
|
|
@ -30,9 +29,6 @@
|
|||
# if defined(BOOST_MSVC)
|
||||
# pragma warning(pop)
|
||||
# endif
|
||||
#else
|
||||
# include <queue>
|
||||
#endif
|
||||
|
||||
#include <CGAL/assertions.h>
|
||||
|
||||
|
|
@ -54,11 +50,7 @@ public:
|
|||
// BVH_node::traversal this is done through the function parameter
|
||||
// nb_primitives in the recursion.
|
||||
typedef
|
||||
#if BOOST_VERSION >= 105000
|
||||
boost::heap::priority_queue< Node_ptr_with_ft, boost::heap::compare< std::greater<Node_ptr_with_ft> > >
|
||||
#else
|
||||
std::priority_queue< Node_ptr_with_ft>
|
||||
#endif
|
||||
Heap_type;
|
||||
|
||||
typename AABB_traits::Intersection
|
||||
|
|
@ -167,14 +159,8 @@ private:
|
|||
const Node* node;
|
||||
size_type nb_primitives;
|
||||
FT value;
|
||||
#if BOOST_VERSION >= 105000
|
||||
bool operator<(const Node_ptr_with_ft& other) const { return value < other.value; }
|
||||
bool operator>(const Node_ptr_with_ft& other) const { return value > other.value; }
|
||||
#else
|
||||
bool operator>(const Node_ptr_with_ft& other) const { return value < other.value; }
|
||||
bool operator<(const Node_ptr_with_ft& other) const { return value > other.value; }
|
||||
|
||||
#endif
|
||||
};
|
||||
|
||||
struct as_ray_param_visitor {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Created by the script cgal_create_cmake_script
|
||||
# This is the CMake script for compiling a CGAL application.
|
||||
|
||||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
cmake_minimum_required(VERSION 3.1...3.20)
|
||||
project(AABB_tree_Tests)
|
||||
|
||||
find_package(CGAL REQUIRED)
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Created by the script cgal_create_cmake_script
|
||||
# This is the CMake script for compiling a CGAL application.
|
||||
|
||||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
cmake_minimum_required(VERSION 3.1...3.20)
|
||||
project(Advancing_front_surface_reconstruction_Examples)
|
||||
|
||||
find_package(CGAL REQUIRED)
|
||||
|
|
|
|||
|
|
@ -114,9 +114,9 @@ int main (int argc, char* argv[])
|
|||
const char* fname = (argc>1) ? argv[1] : "data/cube.pwn";
|
||||
// Loading point set from a file.
|
||||
|
||||
if (!CGAL::read_points(fname, std::back_inserter(points),
|
||||
CGAL::parameters::point_map(Point_map()).
|
||||
normal_map(Normal_map())))
|
||||
if (!CGAL::IO::read_points(fname, std::back_inserter(points),
|
||||
CGAL::parameters::point_map(Point_map()).
|
||||
normal_map(Normal_map())))
|
||||
{
|
||||
std::cerr << "Error: cannot read file" << std::endl;
|
||||
return EXIT_FAILURE;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Created by the script cgal_create_cmake_script
|
||||
# This is the CMake script for compiling a CGAL application.
|
||||
|
||||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
cmake_minimum_required(VERSION 3.1...3.20)
|
||||
project(Advancing_front_surface_reconstruction_Tests)
|
||||
|
||||
find_package(CGAL REQUIRED)
|
||||
|
|
|
|||
|
|
@ -267,7 +267,7 @@ compute the <i>least</i> common multiple of the denominators.
|
|||
|
||||
The package is part of \cgal since release 3.3. Of course the package is based
|
||||
on the former Number type support of CGAL. This goes back to Stefan Schirra and Andreas Fabri. But on the other hand the package is to a large extend influenced
|
||||
by the experience with the number type support in <span class="textsc">Exacus</span> \cgalCite{beh-eeeafcs-05},
|
||||
by the experience with the number type support in \exacus \cgalCite{beh-eeeafcs-05},
|
||||
which in the main goes back to
|
||||
Lutz Kettner, Susan Hert, Arno Eigenwillig and Michael Hemmer.
|
||||
However, the package abstracts from the pure support for
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ for Cartesian kernels.
|
|||
\cgalHasModel double
|
||||
\cgalHasModel `CGAL::Gmpq`
|
||||
\cgalHasModel `CGAL::Interval_nt`
|
||||
\cgalHasModel \ref CGAL::Interval_nt_advanced
|
||||
\cgalHasModel `CGAL::Interval_nt_advanced`
|
||||
\cgalHasModel `CGAL::Lazy_exact_nt<FieldNumberType>`
|
||||
\cgalHasModel `CGAL::Quotient<RingNumberType>`
|
||||
\cgalHasModel `leda_rational`
|
||||
|
|
|
|||
|
|
@ -14,8 +14,8 @@ for Homogeneous kernels.
|
|||
\cgalHasModel \cpp built-in number types
|
||||
\cgalHasModel `CGAL::Gmpq`
|
||||
\cgalHasModel `CGAL::Gmpz`
|
||||
\cgalHasModel` CGAL::Interval_nt`
|
||||
\cgalHasModel \ref CGAL::Interval_nt_advanced
|
||||
\cgalHasModel `CGAL::Interval_nt`
|
||||
\cgalHasModel `CGAL::Interval_nt_advanced`
|
||||
\cgalHasModel `CGAL::Lazy_exact_nt<RingNumberType>`
|
||||
\cgalHasModel `CGAL::MP_Float`
|
||||
\cgalHasModel `CGAL::Gmpzf`
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Created by the script cgal_create_cmake_script
|
||||
# This is the CMake script for compiling a CGAL application.
|
||||
|
||||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
cmake_minimum_required(VERSION 3.1...3.20)
|
||||
project(Algebraic_foundations_Examples)
|
||||
|
||||
find_package(CGAL REQUIRED)
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ int main(){
|
|||
CGAL::Gmpq fraction(4,5);
|
||||
FT::Decompose()(fraction,numerator,denominator);
|
||||
|
||||
CGAL::set_pretty_mode(std::cout);
|
||||
CGAL::IO::set_pretty_mode(std::cout);
|
||||
std::cout << "decompose fraction: "<< std::endl;
|
||||
std::cout << "fraction : " << fraction << std::endl;
|
||||
std::cout << "numerator : " << numerator<< std::endl;
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ binary_func(const A& a , const B& b){
|
|||
}
|
||||
|
||||
int main(){
|
||||
CGAL::set_pretty_mode(std::cout);
|
||||
CGAL::IO::set_pretty_mode(std::cout);
|
||||
|
||||
// Function call for ImplicitInteroperable types
|
||||
std::cout<< binary_func(double(3), int(5)) << std::endl;
|
||||
|
|
|
|||
|
|
@ -56,9 +56,9 @@ public:
|
|||
Output_rep(const T& tt) : t(tt) {}
|
||||
std::ostream& operator () (std::ostream& out) const {
|
||||
if ( needs_parens_as_product(t)) {
|
||||
return out << "(" << oformat(t) << ")";
|
||||
return out << "(" << IO::oformat(t) << ")";
|
||||
} else {
|
||||
return out << oformat(t);
|
||||
return out << IO::oformat(t);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -338,6 +338,7 @@ void test_algebraic_structure_intern( const CGAL::Field_tag& ) {
|
|||
test_algebraic_structure_intern< AS >( CGAL::Integral_domain_tag());
|
||||
AS a(1);
|
||||
AS b(3);
|
||||
AS& b_ref = b; b = b_ref; // to exercise self-copy
|
||||
AS c = a / b;
|
||||
(void)c; // avoid warnings for unused variables
|
||||
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@
|
|||
#include <CGAL/number_type_config.h>
|
||||
#include <CGAL/Algebraic_structure_traits.h>
|
||||
#include <CGAL/Real_embeddable_traits.h>
|
||||
#include <CGAL/Kernel/Same_uncertainty.h>
|
||||
|
||||
namespace CGAL {
|
||||
CGAL_NTS_BEGIN_NAMESPACE
|
||||
|
|
@ -302,19 +303,21 @@ to_interval( const Real_embeddable& x) {
|
|||
}
|
||||
|
||||
template <typename NT>
|
||||
NT approximate_sqrt(const NT& nt, CGAL::Null_functor)
|
||||
typename Coercion_traits<double, NT>::Type
|
||||
approximate_sqrt(const NT& x, CGAL::Null_functor)
|
||||
{
|
||||
return NT(sqrt(CGAL::to_double(nt)));
|
||||
return sqrt(CGAL::to_double(x));
|
||||
}
|
||||
|
||||
template <typename NT, typename Sqrt>
|
||||
NT approximate_sqrt(const NT& nt, Sqrt sqrt)
|
||||
typename Sqrt::result_type
|
||||
approximate_sqrt(const NT& nt, Sqrt sqrt)
|
||||
{
|
||||
return sqrt(nt);
|
||||
}
|
||||
|
||||
template <typename NT>
|
||||
NT approximate_sqrt(const NT& nt)
|
||||
decltype(auto) approximate_sqrt(const NT& nt)
|
||||
{
|
||||
// the initial version of this function was using Algebraic_category
|
||||
// for the dispatch but some ring type (like Gmpz) provides a Sqrt
|
||||
|
|
@ -324,6 +327,36 @@ NT approximate_sqrt(const NT& nt)
|
|||
return approximate_sqrt(nt, Sqrt());
|
||||
}
|
||||
|
||||
template <class NT>
|
||||
typename Same_uncertainty_nt<Comparison_result, NT>::type
|
||||
compare_quotients(const NT& xnum, const NT& xden,
|
||||
const NT& ynum, const NT& yden)
|
||||
{
|
||||
// No assumptions on the sign of den are made
|
||||
|
||||
// code assumes that SMALLER == - 1;
|
||||
CGAL_precondition( SMALLER == static_cast<Comparison_result>(-1) );
|
||||
|
||||
int xsign = sign(xnum) * sign(xden) ;
|
||||
int ysign = sign(ynum) * sign(yden) ;
|
||||
if (xsign == 0) return static_cast<Comparison_result>(-ysign);
|
||||
if (ysign == 0) return static_cast<Comparison_result>(xsign);
|
||||
// now (x != 0) && (y != 0)
|
||||
int diff = xsign - ysign;
|
||||
if (diff == 0)
|
||||
{
|
||||
int msign = sign(xden) * sign(yden);
|
||||
NT leftop = NT(xnum * yden * msign);
|
||||
NT rightop = NT(ynum * xden * msign);
|
||||
return CGAL::compare(leftop, rightop);
|
||||
}
|
||||
else
|
||||
{
|
||||
return (xsign < ysign) ? SMALLER : LARGER;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
CGAL_NTS_END_NAMESPACE
|
||||
} //namespace CGAL
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Created by the script cgal_create_cmake_script
|
||||
# This is the CMake script for compiling a CGAL application.
|
||||
|
||||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
cmake_minimum_required(VERSION 3.1...3.20)
|
||||
project(Algebraic_foundations_Tests)
|
||||
|
||||
find_package(CGAL REQUIRED COMPONENTS Core)
|
||||
|
|
|
|||
|
|
@ -310,7 +310,7 @@ that does not follow the generic programming paradigm, by avoiding
|
|||
interfaces between layers. Specifically, working with
|
||||
only one number type allows to optimize some polynomial operations
|
||||
as well as memory handling. The implementation of these kernels
|
||||
make heavy use of the <span class="textsc">Mpfr</span> \cgalCite{cgal:mt-mpfr} and <span class="textsc">Mpfi</span> \cgalCite{cgal:r-mpfi}
|
||||
make heavy use of the \mpfr \cgalCite{cgal:mt-mpfr} and \mpfi \cgalCite{cgal:r-mpfi}
|
||||
libraries, and of their \cgal interfaces, `Gmpfr` and `Gmpfi`.
|
||||
The algebraic numbers (roots of the polynomials) are represented
|
||||
in the two RS kernels by a `Gmpfi` interval and a pointer to
|
||||
|
|
@ -368,12 +368,12 @@ ideas that was brought to them throughout the last years. In particular,
|
|||
they want to thank Menelaos Karavelas and Elias Tsigaridas for their
|
||||
initial contributions.
|
||||
|
||||
The two generic models where initially developed as part of the <span class="textsc">Exacus</span> \cgalCite{beh-eeeafcs-05} project.
|
||||
The two generic models where initially developed as part of the \exacus \cgalCite{beh-eeeafcs-05} project.
|
||||
However, the models are now fully integrated into the \cgal library,
|
||||
since also the relevant layers of <span class="textsc">Exacus</span> are now part of \cgal.
|
||||
since also the relevant layers of \exacus are now part of \cgal.
|
||||
The main authors for `Algebraic_kernel_d_1<Coeff>` and `Algebraic_kernel_d_2<Coeff>` are
|
||||
Michael Hemmer and Michael Kerber, respectively. Notwithstanding, the authors also want to emphasize the
|
||||
contribution of all authors of the <span class="textsc">Exacus</span> project,
|
||||
contribution of all authors of the \exacus project,
|
||||
particularly the contribution of Arno Eigenwillig, Sebastian Limbach and Pavel Emeliyanenko.
|
||||
|
||||
The two univariate kernels that interface the library RS \cgalCite{cgal:r-rs} were
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
cmake_minimum_required(VERSION 3.1...3.20)
|
||||
project(Algebraic_kernel_d_Examples)
|
||||
|
||||
find_package(CGAL REQUIRED COMPONENTS Core)
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@
|
|||
|
||||
#include <CGAL/tss.h>
|
||||
|
||||
#include <boost/shared_ptr.hpp>
|
||||
#include <memory>
|
||||
|
||||
|
||||
namespace CGAL {
|
||||
|
|
@ -393,8 +393,8 @@ public:
|
|||
Algebraic_curve_kernel_2()
|
||||
: _m_gcd_cache_2(new Gcd_cache_2())
|
||||
{
|
||||
_m_curve_cache_2 = boost::shared_ptr<Curve_cache_2>(new Curve_cache_2(this));
|
||||
_m_curve_pair_cache_2 = boost::shared_ptr<Curve_pair_cache_2> (new Curve_pair_cache_2(this));
|
||||
_m_curve_cache_2 = std::shared_ptr<Curve_cache_2>(new Curve_cache_2(this));
|
||||
_m_curve_pair_cache_2 = std::shared_ptr<Curve_pair_cache_2> (new Curve_pair_cache_2(this));
|
||||
// std::cout << "CONSTRUCTION Algebraic_curve_kernel_2 " << std::endl;
|
||||
}
|
||||
|
||||
|
|
@ -2766,9 +2766,9 @@ public:
|
|||
|
||||
protected:
|
||||
|
||||
mutable boost::shared_ptr<Curve_cache_2> _m_curve_cache_2;
|
||||
mutable boost::shared_ptr<Curve_pair_cache_2> _m_curve_pair_cache_2;
|
||||
mutable boost::shared_ptr<Gcd_cache_2> _m_gcd_cache_2;
|
||||
mutable std::shared_ptr<Curve_cache_2> _m_curve_cache_2;
|
||||
mutable std::shared_ptr<Curve_pair_cache_2> _m_curve_pair_cache_2;
|
||||
mutable std::shared_ptr<Gcd_cache_2> _m_gcd_cache_2;
|
||||
|
||||
|
||||
}; // class Algebraic_curve_kernel_2
|
||||
|
|
|
|||
|
|
@ -436,8 +436,8 @@ std::ostream&
|
|||
operator << (std::ostream& os,
|
||||
const CGAL::internal::Algebraic_real_d_1<Coefficient, Rational, HandlePolicy, RepClass >& x){
|
||||
os << "[" << x.polynomial()
|
||||
<< ",[" << oformat(x.low())
|
||||
<< " , " << oformat(x.high()) << " ]]";
|
||||
<< ",[" << IO::oformat(x.low())
|
||||
<< " , " << IO::oformat(x.high()) << " ]]";
|
||||
return os;
|
||||
}
|
||||
|
||||
|
|
@ -458,9 +458,9 @@ operator >> (std::istream& is,
|
|||
is >> poly;
|
||||
swallow(is, ',');// read the ","
|
||||
swallow(is, '[');// read the ","
|
||||
is >> iformat(low);
|
||||
is >> IO::iformat(low);
|
||||
swallow(is, ',');// read the ","
|
||||
is >> iformat(high);
|
||||
is >> IO::iformat(high);
|
||||
swallow(is, ']');// read the "]"
|
||||
swallow(is, ']');// read the "]"
|
||||
x = ALGNUM(poly, low, high);
|
||||
|
|
|
|||
|
|
@ -2417,7 +2417,7 @@ std::ostream& operator<< (
|
|||
typedef typename Curve::Asymptote_y Asymptote_y;
|
||||
|
||||
|
||||
switch (::CGAL::get_mode(out)) {
|
||||
switch (::CGAL::IO::get_mode(out)) {
|
||||
case ::CGAL::IO::PRETTY: {
|
||||
|
||||
out << "--------------- Analysis results ---------------" << std::endl;
|
||||
|
|
@ -2514,7 +2514,7 @@ std::istream& operator>> (
|
|||
std::istream& is,
|
||||
Curve_analysis_2< AlgebraicKernelWithAnalysis_2, Rep_ >& curve) {
|
||||
|
||||
CGAL_precondition(CGAL::is_ascii(is));
|
||||
CGAL_precondition(CGAL::IO::is_ascii(is));
|
||||
|
||||
typedef AlgebraicKernelWithAnalysis_2 Algebraic_kernel_with_analysis_2;
|
||||
|
||||
|
|
|
|||
|
|
@ -441,7 +441,7 @@ protected:
|
|||
}
|
||||
/*
|
||||
#if CGAL_ACK_DEBUG_FLAG
|
||||
::CGAL::set_ascii_mode(CGAL_ACK_DEBUG_PRINT);
|
||||
::CGAL::IO::set_ascii_mode(CGAL_ACK_DEBUG_PRINT);
|
||||
CGAL_ACK_DEBUG_PRINT << "Stha: " << (*seq_it) << std::endl;
|
||||
#endif
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -675,7 +675,7 @@ template < class AlgebraicCurveKernel_2, class Rep>
|
|||
std::ostream& operator<< (std::ostream& os,
|
||||
const Xy_coordinate_2<AlgebraicCurveKernel_2, Rep>& pt)
|
||||
{
|
||||
switch (::CGAL::get_mode(os)) {
|
||||
switch (::CGAL::IO::get_mode(os)) {
|
||||
case ::CGAL::IO::PRETTY: {
|
||||
os << "[x-coord: " << CGAL::to_double(pt.x()) << "; curve: " <<
|
||||
pt.curve().polynomial_2() <<
|
||||
|
|
@ -703,7 +703,7 @@ std::istream& operator >> (
|
|||
std::istream& is,
|
||||
Xy_coordinate_2< AlgebraicCurveKernel_2, Rep_>& pt) {
|
||||
|
||||
CGAL_precondition(CGAL::is_ascii(is));
|
||||
CGAL_precondition(CGAL::IO::is_ascii(is));
|
||||
|
||||
// this instance's first template argument
|
||||
typedef AlgebraicCurveKernel_2 Algebraic_curve_kernel_2;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
cmake_minimum_required(VERSION 3.1...3.20)
|
||||
project(Algebraic_kernel_d_Tests)
|
||||
|
||||
# CGAL and its components
|
||||
|
|
|
|||
|
|
@ -162,7 +162,7 @@ template<typename Arithmetic_kernel> void test_routine() {
|
|||
CGAL_ACK_DEBUG_PRINT << "P[3(0,P[2(0,-2)(2,2)])(1,P[1(1,-1)])(3,P[1(1,-6)])]" << std::endl;
|
||||
#endif
|
||||
f=from_string<Poly_int2>("P[3(0,P[2(0,-2)(2,2)])(1,P[1(1,-1)])(3,P[1(1,-6)])]");
|
||||
::CGAL::set_pretty_mode(std::cout);
|
||||
::CGAL::IO::set_pretty_mode(std::cout);
|
||||
curve=construct_curve_2(f);
|
||||
assert(curve.number_of_status_lines_with_event()==1);
|
||||
assert(number_of_objects<Algebraic_kernel_d_2>(curve)==2);
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ void test_algebraic_curve_kernel_2() {
|
|||
|
||||
Poly_2 polys[ACK_2_n_polys];
|
||||
|
||||
::CGAL::set_mode(std::cerr, ::CGAL::IO::PRETTY);
|
||||
::CGAL::IO::set_mode(std::cerr, ::CGAL::IO::PRETTY);
|
||||
|
||||
//std::cerr << "constructing curves..\n";
|
||||
for(int i = 0; i < ACK_2_n_polys; i++) {
|
||||
|
|
|
|||
|
|
@ -291,7 +291,7 @@ void test_algebraic_kernel_1(const AlgebraicKernel_d_1& ak_1){
|
|||
assert(compare_1(bound,Algebraic_real_1(2)) == SMALLER );
|
||||
}
|
||||
|
||||
CGAL::set_pretty_mode(std::cerr);
|
||||
CGAL::IO::set_pretty_mode(std::cerr);
|
||||
|
||||
// Approximations
|
||||
bool all_right = true;
|
||||
|
|
@ -408,13 +408,13 @@ void test_algebraic_kernel_1(const AlgebraicKernel_d_1& ak_1){
|
|||
|
||||
#define CGAL_TEST_ALGEBRAIC_REAL_IO(_f) \
|
||||
alg1=_f; \
|
||||
ss<<CGAL::oformat(alg1); \
|
||||
ss<<CGAL::IO::oformat(alg1); \
|
||||
CGAL_assertion(ss.good()); \
|
||||
ss>>CGAL::iformat(alg2); \
|
||||
CGAL_assertion(!ss.fail()); \
|
||||
ss>>CGAL::IO::iformat(alg2); \
|
||||
CGAL_assertion(!ss.fail()); \
|
||||
ss.clear(); \
|
||||
assert(alg1==alg2)
|
||||
// Note: after the reading ss>>CGAL::iformat(alg2) the state of ss can
|
||||
// Note: after the reading ss>>CGAL::IO::iformat(alg2) the state of ss can
|
||||
// have the eofbit. The C++ norm says if one tries to write to a stream
|
||||
// with eofbit, then the failbit will be set. That is why one must
|
||||
// clear the iostate with ss.clear().
|
||||
|
|
@ -422,7 +422,7 @@ void test_algebraic_kernel_1(const AlgebraicKernel_d_1& ak_1){
|
|||
|
||||
Algebraic_real_1 alg1,alg2;
|
||||
std::stringstream ss;
|
||||
CGAL::set_ascii_mode(ss);
|
||||
CGAL::IO::set_ascii_mode(ss);
|
||||
|
||||
// test construction from int, Coefficient and Bound
|
||||
CGAL_TEST_ALGEBRAIC_REAL_IO(construct_algebraic_real_1(int(2)));
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Created by the script cgal_create_cmake_script
|
||||
# This is the CMake script for compiling a CGAL application.
|
||||
|
||||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
cmake_minimum_required(VERSION 3.1...3.20)
|
||||
project(Algebraic_kernel_for_circles_Tests)
|
||||
|
||||
find_package(CGAL REQUIRED)
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Created by the script cgal_create_cmake_script
|
||||
# This is the CMake script for compiling a CGAL application.
|
||||
|
||||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
cmake_minimum_required(VERSION 3.1...3.20)
|
||||
project(Algebraic_kernel_for_spheres_Tests)
|
||||
|
||||
find_package(CGAL REQUIRED)
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ does not make sense if the traits class already provides exact constructions.
|
|||
<ul>
|
||||
<li>When the tag `ExactAlphaComparisonTag` is set to \link Tag_true `Tag_true`\endlink,
|
||||
the class `Cartesian_converter` is used internally to switch between the traits class
|
||||
and the %CGAL kernel `CGAL::Simple_cartesian<NT>`, where `NT` can be either `CGAL::Interval_nt` or
|
||||
and the \cgal kernel `CGAL::Simple_cartesian<NT>`, where `NT` can be either `CGAL::Interval_nt` or
|
||||
`CGAL::Exact_rational`. `Cartesian_converter` must thus offer the necessary functors
|
||||
to convert a two-dimensional point of the traits class to a two-dimensional point
|
||||
of `CGAL::Simple_cartesian<NT>`. However, these functors are not necessarily provided by
|
||||
|
|
@ -106,7 +106,7 @@ allowing filtered exact comparisons (that is, interval arithmetic is first used
|
|||
resorting to exact arithmetic). Access to the interval containing the exact value is provided through the function
|
||||
`FT::Approximate_nt approx() const` where `FT::Approximate_nt` is `CGAL::Interval_nt<Protected>`
|
||||
with `Protected=true`. Access to the exact value is provided through the function
|
||||
`FT::Exact_nt exact() const` where `FT::Exact_nt` depends on the configuration of %CGAL
|
||||
`FT::Exact_nt exact() const` where `FT::Exact_nt` depends on the configuration of \cgal
|
||||
(it is `Gmpq` if `gmp` is available and `Quotient<CGAL::MP_Float>` otherwise).
|
||||
An overload for the function `double to_double(FT)` is also available. Its
|
||||
precision is controlled through `FT::set_relative_precision_of_to_double()` in
|
||||
|
|
|
|||
|
|
@ -6,12 +6,8 @@
|
|||
The concept `AlphaShapeTraits_2` describes the requirements for the geometric traits
|
||||
class of the underlying Delaunay triangulation of a basic alpha shape.
|
||||
|
||||
\cgalRefines `DelaunayTriangulationTraits_2`
|
||||
|
||||
In addition to the requirements described in the concept
|
||||
::DelaunayTriangulationTraits_2, the geometric traits class of a
|
||||
Delaunay triangulation plugged in a basic alpha shapes provides the
|
||||
following.
|
||||
\cgalRefines `DelaunayTriangulationTraits_2`, if the underlying triangulation of the alpha shape is a Delaunay triangulation.
|
||||
\cgalRefines `Periodic_2DelaunayTriangulationTraits_2`, if the underlying triangulation of the alpha shape is a periodic Delaunay triangulation.
|
||||
|
||||
\cgalHasModel All models of `Kernel`.
|
||||
\cgalHasModel Projection traits such as `CGAL::Projection_traits_xy_3<K>`.
|
||||
|
|
|
|||
|
|
@ -7,12 +7,7 @@ The concept `WeightedAlphaShapeTraits_2` describes the requirements
|
|||
for the geometric traits class
|
||||
of the underlying regular triangulation of a weighted alpha shape.
|
||||
|
||||
\cgalRefines `RegularTriangulationTraits_2`
|
||||
|
||||
In addition to the requirements described in the concept
|
||||
`RegularTriangulationTraits_2`, the geometric traits class of a
|
||||
regular triangulation plugged in a basic alpha shapes provides the
|
||||
following.
|
||||
\cgalRefines `RegularTriangulationTraits_2`, if the underlying triangulation of the alpha shape is a regular triangulation.
|
||||
|
||||
\cgalHasModel All models of `Kernel`.
|
||||
\cgalHasModel Projection traits such as `CGAL::Projection_traits_xy_3<K>`.
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Created by the script cgal_create_cmake_script
|
||||
# This is the CMake script for compiling a CGAL application.
|
||||
|
||||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
cmake_minimum_required(VERSION 3.1...3.20)
|
||||
project(Alpha_shapes_2_Examples)
|
||||
|
||||
find_package(CGAL REQUIRED)
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Created by the script cgal_create_cmake_script
|
||||
# This is the CMake script for compiling a CGAL application.
|
||||
|
||||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
cmake_minimum_required(VERSION 3.1...3.20)
|
||||
project(Alpha_shapes_2_Tests)
|
||||
|
||||
find_package(CGAL REQUIRED)
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Created by the script cgal_create_cmake_script
|
||||
# This is the CMake script for compiling a CGAL application.
|
||||
|
||||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
cmake_minimum_required(VERSION 3.1...3.20)
|
||||
project(Alpha_shapes_3_Demo)
|
||||
|
||||
# Find includes in corresponding build directories
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ class MainWindow : public CGAL::Qt::DemosMainWindow, private Ui::MainWindow
|
|||
Q_OBJECT
|
||||
|
||||
public:
|
||||
MainWindow(QWidget* parent = 0);
|
||||
MainWindow(QWidget* parent = nullptr);
|
||||
|
||||
void connectActions();
|
||||
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ meaning in particular that the alpha complex may have
|
|||
singular faces. For \f$ 0 \leq k \leq d-1\f$,
|
||||
a \f$ k\f$-simplex of the alpha complex is said to be
|
||||
singular if it is not a facet of a \f$ (k+1)\f$-simplex of the complex.
|
||||
%CGAL provides two versions of alpha shapes. In the general mode,
|
||||
\cgal provides two versions of alpha shapes. In the general mode,
|
||||
the alpha shapes correspond strictly to the above definition.
|
||||
The regularized mode provides a regularized version of the alpha shapes.
|
||||
It corresponds to the domain covered by a regularized version
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ does not make sense if the traits class already provides exact constructions.
|
|||
<ul>
|
||||
<li>When the tag `ExactAlphaComparisonTag` is set to \link Tag_true `Tag_true`\endlink,
|
||||
the class `Cartesian_converter` is used internally to switch between the traits class
|
||||
and the %CGAL kernel `CGAL::Simple_cartesian<NT>`, where `NT` can be either `CGAL::Interval_nt` or
|
||||
and the \cgal kernel `CGAL::Simple_cartesian<NT>`, where `NT` can be either `CGAL::Interval_nt` or
|
||||
`CGAL::Exact_rational`. `Cartesian_converter` must thus offer the necessary functors
|
||||
to convert a three-dimensional point of the traits class to a three-dimensional point
|
||||
of `CGAL::Simple_cartesian<NT>`. However, these functors are not necessarily provided by
|
||||
|
|
@ -103,7 +103,7 @@ allowing filtered exact comparisons (that is, interval arithmetic is first used
|
|||
resorting to exact arithmetic). Access to the interval containing the exact value is provided through the function
|
||||
`FT::Approximate_nt approx() const` where `FT::Approximate_nt` is `Interval_nt<Protected>`
|
||||
with `Protected=true`. Access to the exact value is provided through the function
|
||||
`FT::Exact_nt exact() const` where `FT::Exact_nt` depends on the configuration of %CGAL
|
||||
`FT::Exact_nt exact() const` where `FT::Exact_nt` depends on the configuration of \cgal
|
||||
(it may be `mpq_class`, `Gmpq`, `Quotient<CGAL::MP_Float>`, etc).
|
||||
An overload for the function `double to_double(FT)` is also available. Its
|
||||
precision is controlled through `FT::set_relative_precision_of_to_double()` in
|
||||
|
|
|
|||
|
|
@ -7,12 +7,8 @@ The concept `AlphaShapeTraits_3` describes the requirements
|
|||
for the geometric traits class
|
||||
of the underlying Delaunay triangulation of a basic alpha shape.
|
||||
|
||||
\cgalRefines `DelaunayTriangulationTraits_3`
|
||||
|
||||
In addition to the requirements described in the concept
|
||||
::DelaunayTriangulationTraits_3, the geometric traits class of a
|
||||
Delaunay triangulation plugged in a basic alpha shapes provides the
|
||||
following.
|
||||
\cgalRefines `DelaunayTriangulationTraits_3`, if the underlying triangulation of the alpha shape is a Delaunay triangulation.
|
||||
\cgalRefines `Periodic_3DelaunayTriangulationTraits_3`, if the underlying triangulation of the alpha shape is a periodic Delaunay triangulation.
|
||||
|
||||
\cgalHasModel All models of `Kernel`.
|
||||
|
||||
|
|
|
|||
|
|
@ -7,12 +7,8 @@ The concept `FixedAlphaShapeTraits_3` describes the requirements
|
|||
for the geometric traits class
|
||||
of the underlying Delaunay triangulation of a basic alpha shape with a fixed value alpha.
|
||||
|
||||
\cgalRefines `DelaunayTriangulationTraits_3`
|
||||
|
||||
In addition to the requirements described in the concept
|
||||
`DelaunayTriangulationTraits_3`, the geometric traits class of a
|
||||
Delaunay triangulation plugged in a basic alpha shape with fixed alpha
|
||||
value provides the following.
|
||||
\cgalRefines `DelaunayTriangulationTraits_3`, if the underlying triangulation of the alpha shape is a Delaunay triangulation.
|
||||
\cgalRefines `Periodic_3DelaunayTriangulationTraits_3`, if the underlying triangulation of the alpha shape is a periodic Delaunay triangulation.
|
||||
|
||||
\cgalHasModel All models of `Kernel`.
|
||||
|
||||
|
|
|
|||
|
|
@ -6,12 +6,8 @@
|
|||
The concept `FixedWeightedAlphaShapeTraits_3` describes the requirements
|
||||
for the geometric traits class of the underlying regular triangulation of a weighted alpha shape with fixed alpha value.
|
||||
|
||||
\cgalRefines `RegularTriangulationTraits_3`
|
||||
|
||||
In addition to the requirements described in the concept
|
||||
::RegularTriangulationTraits_3, the geometric traits class of a
|
||||
regular triangulation plugged in a weighted alpha shape with fixed
|
||||
alpha value provides the following.
|
||||
\cgalRefines `RegularTriangulationTraits_3`, if the underlying triangulation of the alpha shape is a regular triangulation.
|
||||
\cgalRefines `Periodic_3RegularTriangulationTraits_3`, if the underlying triangulation of the alpha shape is a periodic regular triangulation.
|
||||
|
||||
\cgalHasModel All models of `Kernel`.
|
||||
|
||||
|
|
|
|||
|
|
@ -7,12 +7,8 @@ The concept `WeightedAlphaShapeTraits_3` describes the requirements
|
|||
for the geometric traits class
|
||||
of the underlying regular triangulation of a weighted alpha shape.
|
||||
|
||||
\cgalRefines `RegularTriangulationTraits_3`
|
||||
|
||||
In addition to the requirements described in the concept
|
||||
`RegularTriangulationTraits_3`, the geometric traits class of a
|
||||
regular triangulation plugged in a basic alpha shapes provides the
|
||||
following.
|
||||
\cgalRefines `RegularTriangulationTraits_3`, if the underlying triangulation of the alpha shape is a regular triangulation.
|
||||
\cgalRefines `Periodic_3RegularTriangulationTraits_3`, if the underlying triangulation of the alpha shape is a periodic regular triangulation.
|
||||
|
||||
\cgalHasModel All models of `Kernel`.
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Created by the script cgal_create_cmake_script
|
||||
# This is the CMake script for compiling a CGAL application.
|
||||
|
||||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
cmake_minimum_required(VERSION 3.1...3.20)
|
||||
project(Alpha_shapes_3_Examples)
|
||||
|
||||
find_package(CGAL REQUIRED)
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
#include <CGAL/internal/Exact_type_selector.h>
|
||||
#include <CGAL/Has_conversion.h>
|
||||
|
||||
#include <boost/shared_ptr.hpp>
|
||||
#include <memory>
|
||||
#include <boost/type_traits.hpp>
|
||||
#include <boost/optional.hpp>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Created by the script cgal_create_cmake_script
|
||||
# This is the CMake script for compiling a CGAL application.
|
||||
|
||||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
cmake_minimum_required(VERSION 3.1...3.20)
|
||||
project(Alpha_shapes_3_Tests)
|
||||
|
||||
find_package(CGAL REQUIRED)
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ template <class Point>
|
|||
bool
|
||||
file_input(std::ifstream& is, std::list<Point>& L, int nb=0)
|
||||
{
|
||||
CGAL::set_ascii_mode(is);
|
||||
CGAL::IO::set_ascii_mode(is);
|
||||
int n;
|
||||
is >> n;
|
||||
if (nb != 0 && nb <= n) n=nb;
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ template <class Weighted_point>
|
|||
bool
|
||||
file_input(std::ifstream& is, std::list<Weighted_point>& L)
|
||||
{
|
||||
CGAL::set_ascii_mode(is);
|
||||
CGAL::IO::set_ascii_mode(is);
|
||||
int n;
|
||||
is >> n;
|
||||
std::cout << "Reading " << n << " points" << std::endl;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Created by the script cgal_create_cmake_script
|
||||
# This is the CMake script for compiling a CGAL application.
|
||||
|
||||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
cmake_minimum_required(VERSION 3.1...3.20)
|
||||
project(Apollonius_graph_2_Examples)
|
||||
|
||||
find_package(CGAL REQUIRED COMPONENTS Core)
|
||||
|
|
|
|||
|
|
@ -1966,7 +1966,7 @@ Apollonius_graph_2<Gt,Agds,LTag>::file_output(std::ostream& os) const
|
|||
|
||||
CGAL_assertion( n >= 1 );
|
||||
|
||||
if( is_ascii(os) ) {
|
||||
if( IO::is_ascii(os) ) {
|
||||
os << n << ' ' << m << ' ' << dimension() << std::endl;
|
||||
} else {
|
||||
os << n << m << dimension();
|
||||
|
|
@ -1980,24 +1980,24 @@ Apollonius_graph_2<Gt,Agds,LTag>::file_output(std::ostream& os) const
|
|||
V[infinite_vertex()] = inum++;
|
||||
|
||||
// finite vertices
|
||||
if (is_ascii(os)) os << std::endl;
|
||||
if (IO::is_ascii(os)) os << std::endl;
|
||||
for (Finite_vertices_iterator vit = finite_vertices_begin();
|
||||
vit != finite_vertices_end(); ++vit) {
|
||||
V[vit] = inum++;
|
||||
os << vit->site();
|
||||
if ( is_ascii(os) ) { os << ' '; }
|
||||
if ( IO::is_ascii(os) ) { os << ' '; }
|
||||
os << vit->number_of_hidden_sites();
|
||||
typename Vertex::Hidden_sites_iterator hit;
|
||||
for (hit = vit->hidden_sites_begin(); hit != vit->hidden_sites_end();
|
||||
++hit) {
|
||||
if ( is_ascii(os) ) { os << ' '; }
|
||||
if ( IO::is_ascii(os) ) { os << ' '; }
|
||||
os << *hit;
|
||||
}
|
||||
// write non-combinatorial info of the vertex
|
||||
// os << *vit ;
|
||||
if ( is_ascii(os) ) { os << std::endl; }
|
||||
if ( IO::is_ascii(os) ) { os << std::endl; }
|
||||
}
|
||||
if ( is_ascii(os) ) { os << std::endl; }
|
||||
if ( IO::is_ascii(os) ) { os << std::endl; }
|
||||
|
||||
// vertices of the faces
|
||||
inum = 0;
|
||||
|
|
@ -2007,25 +2007,25 @@ Apollonius_graph_2<Gt,Agds,LTag>::file_output(std::ostream& os) const
|
|||
F[fit] = inum++;
|
||||
for(int j = 0; j < dim ; ++j) {
|
||||
os << V[ fit->vertex(j) ];
|
||||
if( is_ascii(os) ) { os << ' '; }
|
||||
if( IO::is_ascii(os) ) { os << ' '; }
|
||||
}
|
||||
// write non-combinatorial info of the face
|
||||
// os << *fit ;
|
||||
if( is_ascii(os) ) { os << std::endl; }
|
||||
if( IO::is_ascii(os) ) { os << std::endl; }
|
||||
}
|
||||
if( is_ascii(os) ) { os << std::endl; }
|
||||
if( IO::is_ascii(os) ) { os << std::endl; }
|
||||
|
||||
// neighbor pointers of the faces
|
||||
for( All_faces_iterator it = all_faces_begin();
|
||||
it != all_faces_end(); ++it) {
|
||||
for(int j = 0; j < dimension()+1; ++j){
|
||||
os << F[ it->neighbor(j) ];
|
||||
if( is_ascii(os) ) { os << ' '; }
|
||||
if( IO::is_ascii(os) ) { os << ' '; }
|
||||
}
|
||||
if( is_ascii(os) ) { os << std::endl; }
|
||||
if( IO::is_ascii(os) ) { os << std::endl; }
|
||||
}
|
||||
|
||||
if ( is_ascii(os) ) { os << std::endl; }
|
||||
if ( IO::is_ascii(os) ) { os << std::endl; }
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -484,7 +484,7 @@ file_output(std::ostream& os) const
|
|||
// write each level of the hierarchy
|
||||
for (unsigned int i = 0; i < ag_hierarchy_2__maxlevel; ++i) {
|
||||
hierarchy[i]->file_output(os);
|
||||
if ( is_ascii(os) ) { os << std::endl << std::endl; }
|
||||
if ( IO::is_ascii(os) ) { os << std::endl << std::endl; }
|
||||
}
|
||||
|
||||
Vertex_map* V = new Vertex_map[ag_hierarchy_2__maxlevel];
|
||||
|
|
@ -520,22 +520,22 @@ file_output(std::ostream& os) const
|
|||
}
|
||||
|
||||
// write up and down pointer info
|
||||
if ( is_ascii(os) ) { os << std::endl << std::endl; }
|
||||
if ( IO::is_ascii(os) ) { os << std::endl << std::endl; }
|
||||
for (unsigned int i = 0; i < ag_hierarchy_2__maxlevel; ++i) {
|
||||
os << i;
|
||||
if ( is_ascii(os) ) { os << " "; }
|
||||
if ( IO::is_ascii(os) ) { os << " "; }
|
||||
os << hierarchy[i]->number_of_vertices();
|
||||
if ( is_ascii(os) ) { os << std::endl; }
|
||||
if ( IO::is_ascii(os) ) { os << std::endl; }
|
||||
for (Finite_vertices_iterator vit = hierarchy[i]->finite_vertices_begin();
|
||||
vit != hierarchy[i]->finite_vertices_end(); ++vit) {
|
||||
os << V[i][vit];
|
||||
if ( is_ascii(os) ) { os << " "; }
|
||||
if ( IO::is_ascii(os) ) { os << " "; }
|
||||
os << V_down[i][vit];
|
||||
if ( is_ascii(os) ) { os << " "; }
|
||||
if ( IO::is_ascii(os) ) { os << " "; }
|
||||
os << V_up[i][vit];
|
||||
if ( is_ascii(os) ) { os << std::endl; }
|
||||
if ( IO::is_ascii(os) ) { os << std::endl; }
|
||||
}
|
||||
if ( is_ascii(os) ) { os << std::endl << std::endl; }
|
||||
if ( IO::is_ascii(os) ) { os << std::endl << std::endl; }
|
||||
}
|
||||
|
||||
delete[] V;
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
|
||||
#include <CGAL/Apollonius_graph_2/basic.h>
|
||||
#include <CGAL/atomic.h>
|
||||
#include <atomic>
|
||||
|
||||
namespace CGAL {
|
||||
|
||||
|
|
@ -33,8 +33,8 @@ public:
|
|||
typedef bool bool_;
|
||||
typedef unsigned long long_;
|
||||
#else
|
||||
typedef CGAL::cpp11::atomic<bool> bool_;
|
||||
typedef CGAL::cpp11::atomic<unsigned long> long_;
|
||||
typedef std::atomic<bool> bool_;
|
||||
typedef std::atomic<unsigned long> long_;
|
||||
#endif
|
||||
|
||||
static bool_ count_cases;
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
|
||||
#include <CGAL/Apollonius_graph_2/basic.h>
|
||||
#include <CGAL/atomic.h>
|
||||
#include <atomic>
|
||||
|
||||
#define AG2_PROFILE_PREDICATES
|
||||
|
||||
|
|
@ -33,7 +33,7 @@ public:
|
|||
#ifdef CGAL_NO_ATOMIC
|
||||
typedef unsigned long long_;
|
||||
#else
|
||||
typedef CGAL::cpp11::atomic<unsigned long> long_;
|
||||
typedef std::atomic<unsigned long> long_;
|
||||
#endif
|
||||
|
||||
// high level predicates
|
||||
|
|
|
|||
|
|
@ -44,20 +44,12 @@ public:
|
|||
using Base::f;
|
||||
|
||||
protected:
|
||||
#if defined(__POWERPC__) && \
|
||||
defined(__GNUC__) && (__GNUC__ == 3 ) && (__GNUC_MINOR__ == 4)
|
||||
// hack to avoid nasty warning for G++ 3.4 on Darwin
|
||||
static FT OFFSET()
|
||||
{
|
||||
return FT(10000);
|
||||
}
|
||||
#else
|
||||
|
||||
static const FT& OFFSET()
|
||||
{
|
||||
static const FT offset_(10000);
|
||||
return offset_;
|
||||
}
|
||||
#endif
|
||||
|
||||
template< class Stream >
|
||||
inline
|
||||
|
|
|
|||
|
|
@ -267,24 +267,29 @@ public:
|
|||
}
|
||||
|
||||
|
||||
inline Line_2 line() const
|
||||
inline const Line_2& line() const
|
||||
{
|
||||
return l;
|
||||
}
|
||||
|
||||
inline Point_2 center() const
|
||||
inline const Point_2& center() const
|
||||
{
|
||||
return c;
|
||||
}
|
||||
|
||||
inline const Point_2& origin() const
|
||||
{
|
||||
return o;
|
||||
}
|
||||
|
||||
template< class Stream >
|
||||
void draw(Stream& W) const
|
||||
{
|
||||
std::vector< Point_2 > p;
|
||||
std::vector< Point_2 > pleft, pright;
|
||||
|
||||
pleft.push_back(o);
|
||||
pright.push_back(o);
|
||||
pleft.push_back(origin());
|
||||
pright.push_back(origin());
|
||||
const FT STEP(2);
|
||||
for (int i = 1; i <= 100; i++) {
|
||||
p = compute_points(i * i * STEP);
|
||||
|
|
@ -311,7 +316,7 @@ public:
|
|||
W << Segment_2(pright[i], pright[i+1]);
|
||||
}
|
||||
|
||||
W << o;
|
||||
W << origin();
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Created by the script cgal_create_cmake_script
|
||||
# This is the CMake script for compiling a CGAL application.
|
||||
|
||||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
cmake_minimum_required(VERSION 3.1...3.20)
|
||||
project(Apollonius_graph_2_Tests)
|
||||
|
||||
find_package(CGAL REQUIRED)
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Created by the script cgal_create_cmake_script
|
||||
# This is the CMake script for compiling a CGAL application.
|
||||
|
||||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
cmake_minimum_required(VERSION 3.1...3.20)
|
||||
project(Arithmetic_kernel_Tests)
|
||||
|
||||
find_package(CGAL REQUIRED COMPONENTS Core)
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ public:
|
|||
int i = 0;
|
||||
for(InputIterator it = begin;it != end; it++, i++) {
|
||||
std::stringstream curr_item;
|
||||
::CGAL::set_pretty_mode(curr_item);
|
||||
::CGAL::IO::set_pretty_mode(curr_item);
|
||||
curr_item << i << "th: ";
|
||||
curr_item << (*it);
|
||||
curve_list->insertItem(curr_item.str());
|
||||
|
|
|
|||
|
|
@ -237,7 +237,7 @@ void xAlci_main_window::oc_rasterize_click()
|
|||
oc_activate_layers();
|
||||
} else {
|
||||
// CGAL::set_error_behaviour(CGAL::THROW_EXCEPTION);
|
||||
::CGAL::set_pretty_mode(std::cout);
|
||||
::CGAL::IO::set_pretty_mode(std::cout);
|
||||
Poly_int2 f;
|
||||
|
||||
if(!input_poly(f, oc_input->text().ascii()))
|
||||
|
|
|
|||
|
|
@ -194,16 +194,16 @@ void xAlci_main_window::oc_analyse_click()
|
|||
Poly_int2 ress = fxx*fy*fy - ((fx*fy*fxy)*Poly_int1(2,0)) + fyy*fx*fx,
|
||||
res1 = f*fx, res2 = f*fy;
|
||||
|
||||
CGAL::set_pretty_mode(std::cout);
|
||||
CGAL::IO::set_pretty_mode(std::cout);
|
||||
std::cout << "curv:\n " << ress << "\n\n";
|
||||
std::cout << "fx:\n " << fx << "\n\n";
|
||||
std::cout << "fy:\n " << fy << "\n\n";
|
||||
std::cout << "f*fx:\n " << res1 << "\n\n";
|
||||
std::cout << "f*fy:\n " << res2 << "\n\n";
|
||||
|
||||
CGAL::set_ascii_mode(std::cout);
|
||||
CGAL::IO::set_ascii_mode(std::cout);
|
||||
std::cout << "f:\n " << f << "\n\n";
|
||||
CGAL::set_pretty_mode(std::cout);
|
||||
CGAL::IO::set_pretty_mode(std::cout);
|
||||
std::cout << "f:\n " << f << "\n\n";
|
||||
|
||||
timer.reset();
|
||||
|
|
|
|||
|
|
@ -277,11 +277,11 @@ inline std::ostream & operator<<(std::ostream & os, const Arr::Vertex & vertex)
|
|||
inline Window_stream & operator<<(Window_stream & ws, Arr & arr)
|
||||
{
|
||||
Arr::Edge_iterator ei;
|
||||
ws << CGAL::blue();
|
||||
ws << CGAL::IO::blue();
|
||||
for (ei = arr.edges_begin(); ei != arr.edges_end(); ++ei)
|
||||
ws << (*ei).curve();
|
||||
Arr::Vertex_iterator vi;
|
||||
ws << CGAL::red();
|
||||
ws << CGAL::IO::red();
|
||||
for (vi = arr.vertices_begin(); vi != arr.vertices_end(); ++vi)
|
||||
ws << (*vi).point();
|
||||
return ws;
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ class AlgebraicCurveInputDialog : public QDialog
|
|||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit AlgebraicCurveInputDialog(QWidget *parent = 0);
|
||||
explicit AlgebraicCurveInputDialog(QWidget *parent = nullptr);
|
||||
~AlgebraicCurveInputDialog();
|
||||
std::string getLineEditText();
|
||||
Ui::AlgebraicCurveInputDialog* getUi(){return this->ui;}
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ class QPaintEvent;
|
|||
class ArrangementDemoGraphicsView : public QGraphicsView
|
||||
{
|
||||
public:
|
||||
ArrangementDemoGraphicsView( QWidget* parent = 0 );
|
||||
ArrangementDemoGraphicsView( QWidget* parent = nullptr );
|
||||
|
||||
void setBackgroundColor( QColor color );
|
||||
QColor getBackgroundColor( ) const;
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ QVariant ArrangementDemoPropertiesDialog::property( int index )
|
|||
}
|
||||
|
||||
QTableWidgetItem* item = this->ui->tableWidget->item( index, 0 );
|
||||
if ( item == 0 )
|
||||
if ( item == nullptr )
|
||||
{
|
||||
return res;
|
||||
}
|
||||
|
|
@ -102,17 +102,17 @@ void ArrangementDemoPropertiesDialog::setupUi( )
|
|||
*/
|
||||
void ArrangementDemoPropertiesDialog::updateUi( )
|
||||
{
|
||||
if ( this->parent == NULL )
|
||||
if ( this->parent == nullptr )
|
||||
{
|
||||
return;
|
||||
}
|
||||
ArrangementDemoTab* currentTab = this->parent->getCurrentTab();
|
||||
if ( currentTab == NULL )
|
||||
if ( currentTab == nullptr )
|
||||
{
|
||||
return;
|
||||
}
|
||||
CGAL::Qt::ArrangementGraphicsItemBase* agi = currentTab->getArrangementGraphicsItem( );
|
||||
if ( agi == NULL )
|
||||
if ( agi == nullptr )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ class ArrangementDemoPropertiesDialog : public QDialog
|
|||
GRID_COLOR_KEY /*!< color of the grid */
|
||||
};
|
||||
|
||||
ArrangementDemoPropertiesDialog( ArrangementDemoWindow* parent_ = 0 );
|
||||
ArrangementDemoPropertiesDialog( ArrangementDemoWindow* parent_ = nullptr );
|
||||
QVariant property( int index );
|
||||
|
||||
protected:
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ struct ArrReader
|
|||
|
||||
ArrFormatter arrFormatter;
|
||||
auto arr = new Arrangement();
|
||||
CGAL::read(*arr, ifs, arrFormatter);
|
||||
CGAL::IO::read(*arr, ifs, arrFormatter);
|
||||
return arr;
|
||||
}
|
||||
};
|
||||
|
|
@ -106,7 +106,7 @@ struct ArrWriter
|
|||
using ArrFormatter = CGAL::Arr_with_history_text_formatter<TextFormatter>;
|
||||
|
||||
ArrFormatter arrFormatter;
|
||||
CGAL::write(*arr, ofs, arrFormatter);
|
||||
CGAL::IO::write(*arr, ofs, arrFormatter);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# This is the CMake script for compiling a CGAL application.
|
||||
|
||||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
cmake_minimum_required(VERSION 3.1...3.20)
|
||||
project(Arrangement_on_surface_2_Demo)
|
||||
|
||||
if(NOT POLICY CMP0070 AND POLICY CMP0053)
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ class ColorItemEditor : public QPushButton
|
|||
Q_PROPERTY(QColor color READ color WRITE setColor USER true)
|
||||
|
||||
public:
|
||||
ColorItemEditor(QWidget *widget = 0);
|
||||
ColorItemEditor(QWidget *widget = nullptr);
|
||||
|
||||
public:
|
||||
QColor color( ) const;
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ namespace Ui
|
|||
class NewTabDialog : public QDialog
|
||||
{
|
||||
public:
|
||||
NewTabDialog( QWidget* parent = 0 );
|
||||
NewTabDialog( QWidget* parent = nullptr );
|
||||
int checkedId( ) const;
|
||||
|
||||
protected:
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ class PropertyValueDelegate : public QItemDelegate
|
|||
Q_OBJECT
|
||||
|
||||
public:
|
||||
PropertyValueDelegate( QObject* parent = 0 );
|
||||
PropertyValueDelegate( QObject* parent = nullptr );
|
||||
|
||||
public:
|
||||
QWidget* createEditor( QWidget* parent, const QStyleOptionViewItem& option,
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ class RationalCurveInputDialog : public QDialog
|
|||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit RationalCurveInputDialog(QWidget *parent = 0);
|
||||
explicit RationalCurveInputDialog(QWidget *parent = nullptr);
|
||||
~RationalCurveInputDialog();
|
||||
std::string getNumeratorText();
|
||||
std::string getDenominatorText();
|
||||
|
|
|
|||
|
|
@ -126,7 +126,7 @@ operator()(const Point_2& p, const X_monotone_curve_2& c) const
|
|||
// AlgKernel ker;
|
||||
|
||||
int n = 100;
|
||||
if (this->scene != NULL && this->scene->views().size() != 0)
|
||||
if (this->scene != nullptr && this->scene->views().size() != 0)
|
||||
{ // use the scene to approximate the resolution of the curve
|
||||
QGraphicsView* view = this->scene->views().first();
|
||||
CGAL::Bbox_2 bb = c.bbox(); // assumes bounded curve
|
||||
|
|
|
|||
|
|
@ -185,7 +185,7 @@ void VerticalRayGraphicsItem::modelChanged( )
|
|||
QRectF VerticalRayGraphicsItem::viewportRect( ) const
|
||||
{
|
||||
QRectF res;
|
||||
if ( this->scene( ) == NULL )
|
||||
if ( this->scene( ) == nullptr )
|
||||
{
|
||||
return res;
|
||||
}
|
||||
|
|
@ -207,7 +207,7 @@ QRectF VerticalRayGraphicsItem::viewportRect( ) const
|
|||
void VerticalRayGraphicsItem::drawArrowhead( QPainter* painter,
|
||||
double targetY, bool isShootingUp )
|
||||
{
|
||||
if ( this->scene( ) == 0 || this->scene( )->views( ).size( ) == 0 )
|
||||
if ( this->scene( ) == nullptr || this->scene( )->views( ).size( ) == 0 )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4715,9 +4715,9 @@ these types, solving quadratic equations, and extracting the real
|
|||
roots of polynomials with integer coefficients. The use of the
|
||||
`CORE_algebraic_number_traits` class, which is included in the
|
||||
arrangement package, is highly recommended. The traits class-template
|
||||
relies on the multi-precision number types implemented in the <span
|
||||
class="textsc">Core</span> library and performs exact computations on
|
||||
the number types it defines.
|
||||
relies on the multi-precision number types implemented in the \core
|
||||
library and performs exact computations on the number types it
|
||||
defines.
|
||||
|
||||
</UL>
|
||||
|
||||
|
|
@ -4725,11 +4725,10 @@ The instantiation of the conic traits class-template is slightly more
|
|||
complicated than the instantiation of the traits classes you have
|
||||
encountered so far. This instantiation is exemplified in the header
|
||||
file `arr_conics.h`. Note how we first define the rational and
|
||||
algebraic kernels using the number types given by the <span
|
||||
class="textsc">Core</span> number type traits-class, then use them to
|
||||
define the conic traits class-template. Also note the types defined by
|
||||
the rational kernels, which we need for conveniently constructing
|
||||
conic arcs.
|
||||
algebraic kernels using the number types given by the \core number
|
||||
type traits-class, then use them to define the conic traits
|
||||
class-template. Also note the types defined by the rational kernels,
|
||||
which we need for conveniently constructing conic arcs.
|
||||
|
||||
The `Arr_conic_traits_2` models the `ArrangementTraits_2` and
|
||||
`ArrangementLandmarkTraits_2` concepts. Its \link
|
||||
|
|
@ -6597,7 +6596,7 @@ This package provides an <em>inserter</em> (the `<<` operator) and an
|
|||
`Arrangement_2<Traits,Dcel>` class that inserts an arrangement object
|
||||
into an output stream and extracts an arrangement object from an input
|
||||
stream, respectively. The arrangement is written using a simple
|
||||
predefined ASCII format that encodes the arrangement topology, as well
|
||||
predefined \ascii format that encodes the arrangement topology, as well
|
||||
as all geometric entities associated with vertices and edges.
|
||||
|
||||
The ability to use the input/output operators, requires that the \link
|
||||
|
|
@ -6689,7 +6688,7 @@ with the basic arrangement structure.
|
|||
|
||||
The arrangement package supplies an inserter and an extractor for the
|
||||
`Arrangement_with_history_2<Traits,Dcel>` class. The arrangement is
|
||||
represented using a simple predefined ASCII format. An object of the
|
||||
represented using a simple predefined \ascii format. An object of the
|
||||
`Arrangement_with_history_2<Traits,Dcel>` type can be saved and
|
||||
restored, as long as the \link Arrangement_with_history_2::Curve_2
|
||||
`Curve_2`\endlink type defined by the traits class---as well as the
|
||||
|
|
@ -6720,40 +6719,37 @@ and defines a simple textual input/output format.
|
|||
\section aos_sec-bgl Adapting to Boost Graphs
|
||||
<!--=========================================================================-->
|
||||
|
||||
<span class="textsc">Boost</span>\cgalFootnote{See also <span
|
||||
class="textsc">Boost</span>'s homepage at: <TT>www.boost.org</TT>.}
|
||||
is a collection of portable \cpp libraries that extend the \cpp
|
||||
Standard Library. The <span class="textsc">Boost</span> Graph Library
|
||||
(<span class="textsc">bgl</span>), which one of the libraries in the
|
||||
collection, offers an extensive set of generic graph algorithms
|
||||
parameterized through templates. As our arrangements are embedded as
|
||||
planar graphs, it is only natural to extend the underlying data
|
||||
structure with the interface that the <span class="textsc">bgl</span>
|
||||
expects, and gain the ability to perform the operations that the <span
|
||||
class="textsc">bgl</span> supports, such as shortest-path
|
||||
\boost\cgalFootnote{See also \boost's homepage at:
|
||||
<TT>www.boost.org</TT>.} is a collection of portable \cpp libraries
|
||||
that extend the \cpp Standard Library. The \boost Graph Library
|
||||
(\bgl), which one of the libraries in the collection, offers an
|
||||
extensive set of generic graph algorithms parameterized through
|
||||
templates. As our arrangements are embedded as planar graphs, it is
|
||||
only natural to extend the underlying data structure with the
|
||||
interface that the \bgl expects, and gain the ability to perform the
|
||||
operations that the \bgl supports, such as shortest-path
|
||||
computation. This section describes how to apply the graph algorithms
|
||||
implemented in the <span class="textsc">bgl</span> to `Arrangement_2`
|
||||
instances.
|
||||
implemented in the \bgl to `Arrangement_2` instances.
|
||||
|
||||
An instance of `Arrangement_2` is adapted to a <span
|
||||
class="textsc">Boost</span> graph through the provision of a set of
|
||||
free functions that operate on the arrangement features and conform
|
||||
with the relevant BGL concepts. Besides the straightforward
|
||||
adaptation, which associates a vertex with each \dcel vertex and an
|
||||
edge with each \dcel halfedge, the package also offer a <em>dual</em>
|
||||
adaptor, which associates a graph vertex with each \dcel face, such
|
||||
that two vertices are connected, iff there is a \dcel halfedge that
|
||||
connects the two corresponding faces.
|
||||
An instance of `Arrangement_2` is adapted to a \boost graph through
|
||||
the provision of a set of free functions that operate on the
|
||||
arrangement features and conform with the relevant BGL
|
||||
concepts. Besides the straightforward adaptation, which associates a
|
||||
vertex with each \dcel vertex and an edge with each \dcel halfedge,
|
||||
the package also offer a <em>dual</em> adaptor, which associates a
|
||||
graph vertex with each \dcel face, such that two vertices are
|
||||
connected, iff there is a \dcel halfedge that connects the two
|
||||
corresponding faces.
|
||||
|
||||
<!----------------------------------------------------------------------------->
|
||||
\subsection arr_ssecbgl_primal The Primal Arrangement Representation
|
||||
<!----------------------------------------------------------------------------->
|
||||
|
||||
Arrangement instances are adapted to <span class="textsc">Boost</span>
|
||||
graphs by specializing the \link BGLArgtGT `boost:graph_traits`
|
||||
\endlink template for `Arrangement_2` instances. The graph-traits
|
||||
states the graph concepts that the arrangement class models (see
|
||||
below) and defines the types required by these concepts.
|
||||
Arrangement instances are adapted to \boost graphs by specializing the
|
||||
\link BGLArgtGT `boost:graph_traits` \endlink template for
|
||||
`Arrangement_2` instances. The graph-traits states the graph concepts
|
||||
that the arrangement class models (see below) and defines the types
|
||||
required by these concepts.
|
||||
|
||||
In this specialization the `Arrangement_2` vertices correspond to the
|
||||
graph vertices, where two vertices are adjacent if there is at least
|
||||
|
|
@ -6765,14 +6761,13 @@ the graph-edge type. As halfedges are directed, we consider the graph
|
|||
to be directed as well. Moreover, as several interior-disjoint
|
||||
\f$x\f$-monotone curves (say circular arcs) may share two common
|
||||
endpoints, inducing an arrangement with two vertices that are
|
||||
connected with several edges, we allow parallel edges in our
|
||||
<span class="textsc">Boost</span> graph.
|
||||
connected with several edges, we allow parallel edges in our \boost.
|
||||
|
||||
Given an `Arrangement_2` instance, we can efficiently traverse its
|
||||
vertices and halfedges. Thus, the arrangement graph is a model of the
|
||||
concepts `VertexListGraph` and `EdgeListGraph` introduced by the <span
|
||||
class="textsc">bgl</span>. At the same time, we use an iterator
|
||||
adapter of the circulator over the halfedges incident to a vertex
|
||||
concepts `VertexListGraph` and `EdgeListGraph` introduced by the \bgl.
|
||||
At the same time, we use an iterator adapter of the circulator over
|
||||
the halfedges incident to a vertex
|
||||
(`Halfedge_around_vertex_circulator` - see Section \ref
|
||||
arr_sssectr_vertex), so it is possible to go over the ingoing and
|
||||
outgoing edges of a vertex in linear time. Thus, our arrangement graph
|
||||
|
|
@ -6783,26 +6778,24 @@ edges).
|
|||
It is important to notice that the vertex descriptors we use are \link
|
||||
Arrangement_2 Vertex_handle `Vertex_handle`\endlink objects and
|
||||
<em>not</em> vertex indices. However, in order to gain more efficiency
|
||||
in most <span class="textsc">bgl</span> algorithms, it is better to
|
||||
have them indexed \f$0, 1, \ldots, (n-1)\f$, where \f$n\f$ is the
|
||||
number of vertices. We therefore introduce the
|
||||
`Arr_vertex_index_map<Arrangement>` class-template, which maintains a
|
||||
mapping of vertex handles to indices, as required by the <span
|
||||
class="textsc">bgl</span>. An instance of this class must be attached
|
||||
to a valid arrangement vertex when it is created. It uses the
|
||||
in most \bgl algorithms, it is better to have them indexed \f$0, 1,
|
||||
\ldots, (n-1)\f$, where \f$n\f$ is the number of vertices. We
|
||||
therefore introduce the `Arr_vertex_index_map<Arrangement>`
|
||||
class-template, which maintains a mapping of vertex handles to
|
||||
indices, as required by the \bgl. An instance of this class must be
|
||||
attached to a valid arrangement vertex when it is created. It uses the
|
||||
notification mechanism (see Section \ref arr_ssecnotif) to
|
||||
automatically maintain the mapping of vertices to indices, even when
|
||||
new vertices are inserted into the arrangement or existing vertices
|
||||
are removed.
|
||||
|
||||
In most algorithms provided by the <span class="textsc">bgl</span>,
|
||||
the output is given by <em>property maps</em>, such that each map
|
||||
entry corresponds to a vertex. For example, when we compute the
|
||||
shortest paths from a given source vertex \f$s\f$ to all other
|
||||
vertices we can obtain a map of distances and a map of predecessors -
|
||||
namely for each \f$v\f$ vertex we have its distance from \f$s\f$ and a
|
||||
descriptor of the vertex that precedes \f$v\f$ in a shortest path from
|
||||
\f$s\f$.
|
||||
In most algorithms provided by the \bgl, the output is given by
|
||||
<em>property maps</em>, such that each map entry corresponds to a
|
||||
vertex. For example, when we compute the shortest paths from a given
|
||||
source vertex \f$s\f$ to all other vertices we can obtain a map of
|
||||
distances and a map of predecessors - namely for each \f$v\f$ vertex
|
||||
we have its distance from \f$s\f$ and a descriptor of the vertex that
|
||||
precedes \f$v\f$ in a shortest path from \f$s\f$.
|
||||
|
||||
If the vertex descriptors are simply indices, boost supplies tools to
|
||||
easily represent property maps using vectors. The
|
||||
|
|
@ -6814,8 +6807,8 @@ mapping from \link Arrangement_on_surface_2::Vertex_handle
|
|||
however, that unlike the `Arr_vertex_index_map` class template, the
|
||||
vertex property-map class is not kept synchronized with the number of
|
||||
vertices in the arrangement, so it should not be reused in calls to
|
||||
<span class="textsc">bgl</span> functions in case the arrangement is
|
||||
modified in between these calls.
|
||||
\bgl functions in case the arrangement is modified in between these
|
||||
calls.
|
||||
|
||||
The first example of this section demonstrates the application of
|
||||
Dijkstra's shortest path algorithm to compute the shortest-path length
|
||||
|
|
@ -6824,12 +6817,11 @@ other vertices. The length of a path is defined as the sum of squared
|
|||
Euclidean lengths of its segments. It uses an instance of the functor
|
||||
template `Edge_length<Arrangement>}` to compute the squared Euclidean
|
||||
length of the linear curve associated with a given halfedge of the
|
||||
arrangement. The functor implements a <span
|
||||
class="textsc">Boost</span> property-map that attaches square lengths
|
||||
to edges; when the <span class="textsc">bgl</span> algorithm queries
|
||||
the property map for a squared length of an edge the property map
|
||||
computes and returns it. The functor template is defined in the header
|
||||
file `Edge_length.h`.
|
||||
arrangement. The functor implements a \boost property-map that
|
||||
attaches square lengths to edges; when the \bgl algorithm queries the
|
||||
property map for a squared length of an edge the property map computes
|
||||
and returns it. The functor template is defined in the header file
|
||||
`Edge_length.h`.
|
||||
|
||||
\code
|
||||
#include <CGAL/Exact_predicates_exact_constructions_kernel.h>
|
||||
|
|
@ -6866,16 +6858,15 @@ An arrangement of seven line segments, as constructed by
|
|||
|
||||
In the following example we construct an arrangement of seven line
|
||||
segments, as shown in \cgalFigureRef{aos_fig-bgl_primal_adapter}.
|
||||
Then, it uses the <span class="textsc">bgl</span> generic
|
||||
implementation of Dijkstra's shortest-paths algorithm to compute the
|
||||
sum of squared distances to all vertices from the lexicographically
|
||||
smallest vertex \f$v_0\f$ in the arrangement. Note the usage of the
|
||||
`Arr_vertex_property_map` class template in the call to
|
||||
`boost::dijkstra_shortest_paths()` and in the definition of the
|
||||
distance property-map. We instantiate a property map that attaches a
|
||||
number of type `Number_type` (which is a type of unlimited precision)
|
||||
to each vertex. The number represents the sum of squared distances of
|
||||
the vertex from \f$v_0\f$.
|
||||
Then, it uses the \bgl generic implementation of Dijkstra's
|
||||
shortest-paths algorithm to compute the sum of squared distances to
|
||||
all vertices from the lexicographically smallest vertex \f$v_0\f$ in
|
||||
the arrangement. Note the usage of the `Arr_vertex_property_map` class
|
||||
template in the call to `boost::dijkstra_shortest_paths()` and in the
|
||||
definition of the distance property-map. We instantiate a property map
|
||||
that attaches a number of type `Number_type` (which is a type of
|
||||
unlimited precision) to each vertex. The number represents the sum of
|
||||
squared distances of the vertex from \f$v_0\f$.
|
||||
|
||||
\cgalExample{Arrangement_on_surface_2/bgl_primal_adapter.cpp}
|
||||
|
||||
|
|
@ -6899,11 +6890,10 @@ the graph-edge type. We treat the graph edges as directed, such that a
|
|||
halfedge `e` is directed from \f$f_1\f$, which is its incident face,
|
||||
to \f$f_2\f$, which is the incident face of its twin halfedge. As two
|
||||
arrangement faces may share more than a single edge on their boundary,
|
||||
we allow parallel edges (loops) in our <span
|
||||
class="textsc">Boost</span> graph. As is the case in the primal graph,
|
||||
the dual arrangement graph is also a model of the concepts
|
||||
`VertexListGraph`, `EdgeListGraph` and `BidirectionalGraph` (thus also
|
||||
of `IncidenceGraph`).
|
||||
we allow parallel edges (loops) in our \boost graph. As is the case in
|
||||
the primal graph, the dual arrangement graph is also a model of the
|
||||
concepts `VertexListGraph`, `EdgeListGraph` and `BidirectionalGraph`
|
||||
(thus also of `IncidenceGraph`).
|
||||
|
||||
Since we use \link Arrangement_on_surface_2::Face_handle
|
||||
`Face_handle`\endlink objects as the vertex descriptors, we define the
|
||||
|
|
@ -7003,8 +6993,7 @@ On rare occasions the traits class `Arr_non_caching_segment_traits_2`
|
|||
exhibits slightly better performance than the default one
|
||||
(`Arr_segment_traits_2` even when the segments intersect each other,
|
||||
due to the small overhead of the latter (optimized) traits class. (For
|
||||
example, when the so-called <span class="textsc">Leda</span> rational
|
||||
kernel is used.)
|
||||
example, when the so-called \leda rational kernel is used.)
|
||||
|
||||
<LI>Prior knowledge of the combinatorial structure of the arrangement
|
||||
can be used to accelerate operations that insert \f$x\f$-monotone
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ geometric kernels templated with the `NtTraits::Rational` and
|
|||
instantiate the `CORE_algebraic_number_traits` class as the `NtTraits`
|
||||
parameter, with `Cartesian<NtTraits::Rational>` and
|
||||
`Cartesian<NtTraits::Algebraic>` instantiating the two kernel types,
|
||||
respectively. The number types in this case are provided by the <span class="textsc">Core</span>
|
||||
respectively. The number types in this case are provided by the \core
|
||||
library, with its ability to exactly represent simple algebraic numbers.
|
||||
|
||||
While `Arr_Bezier_curve_traits_2` models the concept
|
||||
|
|
|
|||
|
|
@ -68,8 +68,8 @@ namespace CGAL {
|
|||
* `CORE_algebraic_number_traits` class as the `NtTraits` parameter, with
|
||||
* `Cartesian<NtTraits::Rational>` and `Cartesian<NtTraits::Algebraic>`
|
||||
* instantiating the two kernel types, respectively. The number types in this
|
||||
* case are provided by the <span class="textsc">Core</span> library, with its
|
||||
* ability to exactly represent simple algebraic numbers.
|
||||
* case are provided by the \core library, with its ability to exactly represent
|
||||
* simple algebraic numbers.
|
||||
*
|
||||
* The traits class inherits its point type from `AlgKernel::Point_2`,
|
||||
* and defines a curve and \f$ x\f$-monotone curve types, as detailed below.
|
||||
|
|
|
|||
|
|
@ -7,11 +7,11 @@ namespace CGAL {
|
|||
\anchor arr_refarr_dcel_base
|
||||
|
||||
The `Arr_dcel_base` class is an important ingredient in the
|
||||
definition of <span class="textsc">Dcel</span> data structures. It serves as a basis class for
|
||||
definition of \dcel data structures. It serves as a basis class for
|
||||
any instance of the `Dcel` template parameter of the
|
||||
`Arrangement_2` template. In particular it is the basis class of
|
||||
the default `Dcel` template parameter, and the basis class of any
|
||||
extended <span class="textsc">Dcel</span>. The template parameters `V`, `H`, and `F`
|
||||
extended \dcel. The template parameters `V`, `H`, and `F`
|
||||
must be instantiated with models of the concepts
|
||||
`ArrangementDcelVertex`, `ArrangementDcelHalfedge`,
|
||||
and `ArrangementDcelFace` respectively.
|
||||
|
|
@ -26,7 +26,7 @@ public:
|
|||
|
||||
/*!
|
||||
|
||||
The basic <span class="textsc">Dcel</span> face type. Serves as a basis class for an extended
|
||||
The basic \dcel face type. Serves as a basis class for an extended
|
||||
face record with auxiliary data fields.
|
||||
|
||||
\cgalModels `ArrangementDcelFace`
|
||||
|
|
@ -39,7 +39,7 @@ class Arr_face_base {
|
|||
/*!
|
||||
|
||||
|
||||
The basic <span class="textsc">Dcel</span> halfedge type. Serves as a basis class for an
|
||||
The basic \dcel halfedge type. Serves as a basis class for an
|
||||
extended halfedge record with auxiliary data fields. The `Curve`
|
||||
parameter is the type of \f$ x\f$-monotone curves associated with the vertices.
|
||||
|
||||
|
|
@ -54,7 +54,7 @@ class Arr_halfedge_base {
|
|||
/*!
|
||||
|
||||
|
||||
The basic <span class="textsc">Dcel</span> vertex type. Serves as a basis class for an extended
|
||||
The basic \dcel vertex type. Serves as a basis class for an extended
|
||||
vertex record with auxiliary data fields. The `Point` parameter is
|
||||
the type of points associated with the vertices.
|
||||
|
||||
|
|
|
|||
|
|
@ -4,12 +4,12 @@ namespace CGAL {
|
|||
/*!
|
||||
\ingroup PkgArrangementOnSurface2DCEL
|
||||
|
||||
The default <span class="textsc">Dcel</span> class used by the `Arrangement_2` class-template
|
||||
The default \dcel class used by the `Arrangement_2` class-template
|
||||
is parameterized by a traits class, which is a model of the
|
||||
`ArrangementBasicTraits_2` concept. It simply uses the nested
|
||||
`Traits::Point_2` and `Traits::X_monotone_curve_2` to instantiate
|
||||
the base vertex and halfedge types, respectively. Thus, the default
|
||||
<span class="textsc">Dcel</span> records store no other information, except for the topological
|
||||
\dcel records store no other information, except for the topological
|
||||
incidence relations and the geometric data attached to vertices and edges.
|
||||
|
||||
\cgalModels `ArrangementDcelWithRebind`
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue