mirror of https://github.com/CGAL/cgal
Merge remote-tracking branch 'cgal/master' into HEAD
This commit is contained in:
commit
664aa7c162
|
|
@ -2,6 +2,7 @@ name: remove_labels
|
||||||
on:
|
on:
|
||||||
pull_request_target:
|
pull_request_target:
|
||||||
types: [synchronize]
|
types: [synchronize]
|
||||||
|
workflow_dispatch:
|
||||||
jobs:
|
jobs:
|
||||||
remove_label:
|
remove_label:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
|
||||||
|
|
@ -66,7 +66,6 @@ jobs:
|
||||||
with:
|
with:
|
||||||
repository: ${{ github.repository }}
|
repository: ${{ github.repository }}
|
||||||
ref: refs/pull/${{ steps.get_pr_number.outputs.result }}/merge
|
ref: refs/pull/${{ steps.get_pr_number.outputs.result }}/merge
|
||||||
token: ${{ secrets.PUSH_TO_CGAL_GITHUB_IO_TOKEN }}
|
|
||||||
fetch-depth: 2
|
fetch-depth: 2
|
||||||
|
|
||||||
- name: install dependencies
|
- name: install dependencies
|
||||||
|
|
@ -74,7 +73,7 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
set -x
|
set -x
|
||||||
sudo apt-get update && sudo apt-get install -y graphviz ssh bibtex2html
|
sudo apt-get update && sudo apt-get install -y graphviz ssh bibtex2html
|
||||||
sudo pip install lxml==4.6.3
|
sudo pip install lxml
|
||||||
sudo pip install pyquery
|
sudo pip install pyquery
|
||||||
wget --no-verbose -O doxygen_exe https://cgal.geometryfactory.com/~cgaltest/doxygen_1_8_13_patched/doxygen
|
wget --no-verbose -O doxygen_exe https://cgal.geometryfactory.com/~cgaltest/doxygen_1_8_13_patched/doxygen
|
||||||
sudo mv doxygen_exe /usr/bin/doxygen
|
sudo mv doxygen_exe /usr/bin/doxygen
|
||||||
|
|
@ -160,7 +159,8 @@ jobs:
|
||||||
with:
|
with:
|
||||||
script: |
|
script: |
|
||||||
const error = process.env.ERRORMSG
|
const error = process.env.ERRORMSG
|
||||||
const msg = "There was an error while building the doc: \n"+error
|
const job_url = `${context.serverUrl}/CGAL/cgal/actions/runs/${context.runId}`
|
||||||
|
const msg = "There was an error while building the doc: \n"+error + "\n" + job_url
|
||||||
github.rest.issues.createComment({
|
github.rest.issues.createComment({
|
||||||
owner: "CGAL",
|
owner: "CGAL",
|
||||||
repo: "cgal",
|
repo: "cgal",
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
name: CMake Test Merge Branch
|
name: CMake Test Merge Branch
|
||||||
|
|
||||||
on: [push, pull_request]
|
on: [push, pull_request, workflow_dispatch]
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
name: CMake Testsuite
|
name: CMake Testsuite
|
||||||
|
|
||||||
on: [push, pull_request]
|
on: [push, pull_request, workflow_dispatch]
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ name: Documentation Removal
|
||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request_target:
|
pull_request_target:
|
||||||
types: [closed, removed]
|
types: [closed, removed, workflow_dispatch]
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
name: Test Polyhedron Demo
|
name: Test Polyhedron Demo
|
||||||
|
|
||||||
on: [push, pull_request]
|
on: [push, pull_request,workflow_dispatch]
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@ name: Filter Testsuite
|
||||||
on:
|
on:
|
||||||
issue_comment:
|
issue_comment:
|
||||||
types: [created]
|
types: [created]
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
permissions: {}
|
permissions: {}
|
||||||
jobs:
|
jobs:
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,30 @@
|
||||||
|
table {
|
||||||
|
margin-left: auto;
|
||||||
|
margin-right: auto;
|
||||||
|
margin-bottom: 24px;
|
||||||
|
border-spacing: 0;
|
||||||
|
border-bottom: 2px solid black;
|
||||||
|
border-top: 2px solid black;
|
||||||
|
}
|
||||||
|
table th {
|
||||||
|
padding: 3px 10px;
|
||||||
|
background-color: white;
|
||||||
|
border-top: none;
|
||||||
|
border-left: none;
|
||||||
|
border-right: none;
|
||||||
|
border-bottom: 1px solid black;
|
||||||
|
}
|
||||||
|
table td {
|
||||||
|
padding: 3px 10px;
|
||||||
|
border-top: none;
|
||||||
|
border-left: none;
|
||||||
|
border-bottom: none;
|
||||||
|
border-right: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
table tr.odd {
|
||||||
|
background-color: #f0f0f0;
|
||||||
|
}
|
||||||
|
table tr.even {
|
||||||
|
background-color: #e0e0e0;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,43 @@
|
||||||
|
name: List workflow last run
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
schedule:
|
||||||
|
- cron: "0 10 * * 1"
|
||||||
|
env:
|
||||||
|
GH_TOKEN: ${{ github.token }}
|
||||||
|
jobs:
|
||||||
|
list_workflow:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
outputs:
|
||||||
|
messages: ${{ steps.cat_output.outputs.message }}
|
||||||
|
steps:
|
||||||
|
- name: checkout
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
- name: run script
|
||||||
|
run: |
|
||||||
|
chmod +x ./Scripts/developer_scripts/list_cgal_workflows_last_run.sh
|
||||||
|
./Scripts/developer_scripts/list_cgal_workflows_last_run.sh > output.md
|
||||||
|
- name: convert markdown to html
|
||||||
|
run: |
|
||||||
|
sudo apt-get update && sudo apt-get install -y pandoc
|
||||||
|
pandoc -f markdown -t html --self-contained --css=.github/workflows/list_workflow_last_run.css -o output.html output.md
|
||||||
|
- name: set_output
|
||||||
|
id: cat_output
|
||||||
|
run: |
|
||||||
|
delimiter="$(openssl rand -hex 8)"
|
||||||
|
echo "message<<${delimiter}" >> "${GITHUB_OUTPUT}"
|
||||||
|
echo "Subject:List workflow run \nContent-Type: text/html; charset=\"UTF-8\"\n" >> "${GITHUB_OUTPUT}"
|
||||||
|
echo "<html><body>" >> "${GITHUB_OUTPUT}"
|
||||||
|
cat output.html >> "${GITHUB_OUTPUT}"
|
||||||
|
echo "</body></html>" >> "${GITHUB_OUTPUT}"
|
||||||
|
echo "${delimiter}" >> "${GITHUB_OUTPUT}"
|
||||||
|
call_send_email:
|
||||||
|
needs: list_workflow
|
||||||
|
uses: ./.github/workflows/send_email.yml
|
||||||
|
with:
|
||||||
|
message: ${{needs.list_workflow.outputs.messages}}
|
||||||
|
secrets:
|
||||||
|
email: ${{ secrets.CGAL_SEND_WORKFLOW_LIST_EMAIL_TO }}
|
||||||
|
private_key: ${{ secrets.CGAL_SEND_WORKFLOW_LIST_EMAIL_SSH_PRIVATE_KEY }}
|
||||||
|
user: ${{ secrets.CGAL_SEND_WORKFLOW_LIST_EMAIL_SSH_USER }}
|
||||||
|
host: ${{ secrets.CGAL_SEND_WORKFLOW_LIST_EMAIL_SSH_HOST }}
|
||||||
|
|
@ -0,0 +1,31 @@
|
||||||
|
name: Send Email using SSH
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_call:
|
||||||
|
inputs:
|
||||||
|
message:
|
||||||
|
description: 'Message to send'
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
secrets:
|
||||||
|
email:
|
||||||
|
required: true
|
||||||
|
private_key:
|
||||||
|
required: true
|
||||||
|
user:
|
||||||
|
required: true
|
||||||
|
host:
|
||||||
|
required: true
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
send_email:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: install ssh keys
|
||||||
|
run: |
|
||||||
|
install -m 600 -D /dev/null ~/.ssh/id_rsa
|
||||||
|
echo "${{ secrets.private_key }}" > ~/.ssh/id_rsa
|
||||||
|
ssh-keyscan -H ${{ secrets.host }} > ~/.ssh/known_hosts
|
||||||
|
- name: send email via ssh
|
||||||
|
run: |
|
||||||
|
echo -e '${{ inputs.message }}' | ssh ${{ secrets.user }}@${{ secrets.host }} "/sbin/sendmail -t ${{ secrets.email }}"
|
||||||
|
|
@ -0,0 +1,38 @@
|
||||||
|
name: Wiki Notification
|
||||||
|
|
||||||
|
on: gollum
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
prepare_email:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
outputs:
|
||||||
|
messages: ${{ steps.set-result.outputs.result }}
|
||||||
|
steps:
|
||||||
|
- name: get informations and prepare email
|
||||||
|
uses: actions/github-script@v6
|
||||||
|
id: set-result
|
||||||
|
with:
|
||||||
|
result-encoding: string
|
||||||
|
script: |
|
||||||
|
const payload = context.payload;
|
||||||
|
const actor = payload.sender;
|
||||||
|
const pages = payload.pages;
|
||||||
|
let messages = "Subject:Updates to CGAL Wiki \nContent-Type: text/html\n";
|
||||||
|
messages += "<html><body>";
|
||||||
|
messages += `<p>The following CGAL Wiki page were modified by <a href="${actor.html_url}">"${actor.login}"</a>:</p><ul>\n`
|
||||||
|
for (const page of pages){
|
||||||
|
messages += `<li><a href="${page.html_url}">${page.title}</a> (link to <a href="${page.html_url}/_compare/${page.sha}%5E...${page.sha}">the diff</a>)</li>\n`;
|
||||||
|
}
|
||||||
|
messages += "</ul></body></html>";
|
||||||
|
console.log( messages );
|
||||||
|
return messages;
|
||||||
|
call_send_email:
|
||||||
|
needs: prepare_email
|
||||||
|
uses: ./.github/workflows/send_email.yml
|
||||||
|
with:
|
||||||
|
message: ${{needs.prepare_email.outputs.messages}}
|
||||||
|
secrets:
|
||||||
|
email: ${{ secrets.CGAL_SEND_WIKI_EMAIL_TO }}
|
||||||
|
private_key: ${{ secrets.CGAL_SEND_WIKI_EMAIL_SSH_PRIVATE_KEY }}
|
||||||
|
user: ${{ secrets.CGAL_SEND_WIKI_EMAIL_SSH_USER }}
|
||||||
|
host: ${{ secrets.CGAL_SEND_WIKI_EMAIL_SSH_HOST }}
|
||||||
|
|
@ -6,12 +6,14 @@ project(AABB_traits_benchmark)
|
||||||
|
|
||||||
find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Core)
|
find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Core)
|
||||||
|
|
||||||
# google benchmark
|
|
||||||
find_package(benchmark)
|
|
||||||
|
|
||||||
if (benchmark_FOUND)
|
|
||||||
create_single_source_cgal_program("tree_creation.cpp")
|
|
||||||
target_link_libraries(tree_creation benchmark::benchmark)
|
|
||||||
endif()
|
|
||||||
create_single_source_cgal_program("test.cpp")
|
create_single_source_cgal_program("test.cpp")
|
||||||
create_single_source_cgal_program("tree_construction.cpp")
|
create_single_source_cgal_program("tree_construction.cpp")
|
||||||
|
|
||||||
|
# google benchmark
|
||||||
|
find_package(benchmark QUIET)
|
||||||
|
if(benchmark_FOUND)
|
||||||
|
create_single_source_cgal_program("tree_creation.cpp")
|
||||||
|
target_link_libraries(tree_creation benchmark::benchmark)
|
||||||
|
else()
|
||||||
|
message(STATUS "NOTICE: The benchmark 'tree_creation.cpp' requires the Google benchmark library, and will not be compiled.")
|
||||||
|
endif()
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@ project(AABB_tree_Demo)
|
||||||
|
|
||||||
# Find includes in corresponding build directories
|
# Find includes in corresponding build directories
|
||||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||||
|
|
||||||
# Instruct CMake to run moc automatically when needed.
|
# Instruct CMake to run moc automatically when needed.
|
||||||
set(CMAKE_AUTOMOC ON)
|
set(CMAKE_AUTOMOC ON)
|
||||||
if(NOT POLICY CMP0070 AND POLICY CMP0053)
|
if(NOT POLICY CMP0070 AND POLICY CMP0053)
|
||||||
|
|
@ -31,10 +32,8 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND)
|
||||||
|
|
||||||
include(AddFileDependencies)
|
include(AddFileDependencies)
|
||||||
|
|
||||||
qt5_generate_moc("MainWindow.h"
|
qt5_generate_moc("MainWindow.h" "${CMAKE_CURRENT_BINARY_DIR}/MainWindow_moc.cpp")
|
||||||
"${CMAKE_CURRENT_BINARY_DIR}/MainWindow_moc.cpp")
|
add_file_dependencies(MainWindow_moc.cpp "${CMAKE_CURRENT_SOURCE_DIR}/MainWindow.h")
|
||||||
add_file_dependencies(MainWindow_moc.cpp
|
|
||||||
"${CMAKE_CURRENT_SOURCE_DIR}/MainWindow.h")
|
|
||||||
|
|
||||||
qt5_generate_moc("Viewer.h" "${CMAKE_CURRENT_BINARY_DIR}/Viewer_moc.cpp")
|
qt5_generate_moc("Viewer.h" "${CMAKE_CURRENT_BINARY_DIR}/Viewer_moc.cpp")
|
||||||
add_file_dependencies(Viewer_moc.cpp "${CMAKE_CURRENT_SOURCE_DIR}/Viewer.h")
|
add_file_dependencies(Viewer_moc.cpp "${CMAKE_CURRENT_SOURCE_DIR}/Viewer.h")
|
||||||
|
|
@ -62,8 +61,7 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND)
|
||||||
include(${CGAL_MODULES_DIR}/CGAL_add_test.cmake)
|
include(${CGAL_MODULES_DIR}/CGAL_add_test.cmake)
|
||||||
cgal_add_compilation_test(AABB_demo)
|
cgal_add_compilation_test(AABB_demo)
|
||||||
|
|
||||||
else(CGAL_Qt5_FOUND
|
else(CGAL_Qt5_FOUND AND Qt5_FOUND)
|
||||||
AND Qt5_FOUND)
|
|
||||||
|
|
||||||
set(AABB_MISSING_DEPS "")
|
set(AABB_MISSING_DEPS "")
|
||||||
|
|
||||||
|
|
@ -75,11 +73,6 @@ else(CGAL_Qt5_FOUND
|
||||||
set(AABB_MISSING_DEPS "Qt5, ${AABB_MISSING_DEPS}")
|
set(AABB_MISSING_DEPS "Qt5, ${AABB_MISSING_DEPS}")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
message(
|
message("NOTICE: This demo requires ${AABB_MISSING_DEPS}, and will not be compiled.")
|
||||||
STATUS
|
|
||||||
"NOTICE: This demo requires ${AABB_MISSING_DEPS}and will not be compiled."
|
|
||||||
)
|
|
||||||
|
|
||||||
endif(
|
endif(CGAL_Qt5_FOUND AND Qt5_FOUND)
|
||||||
CGAL_Qt5_FOUND
|
|
||||||
AND Qt5_FOUND)
|
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@
|
||||||
\cgalPkgDescriptionBegin{3D Fast Intersection and Distance Computation,PkgAABBTree}
|
\cgalPkgDescriptionBegin{3D Fast Intersection and Distance Computation,PkgAABBTree}
|
||||||
\cgalPkgPicture{aabb-teaser-thumb.png}
|
\cgalPkgPicture{aabb-teaser-thumb.png}
|
||||||
\cgalPkgSummaryBegin
|
\cgalPkgSummaryBegin
|
||||||
\cgalPkgAuthors{Pierre Alliez, Stéphane Tayeb, Camille Wormser}
|
\cgalPkgAuthors{Pierre Alliez, Stéphane Tayeb, and Camille Wormser}
|
||||||
\cgalPkgDesc{The AABB (axis-aligned bounding box) tree component offers a static data structure and algorithms to perform efficient intersection and distance queries on sets of finite 3D geometric objects.}
|
\cgalPkgDesc{The AABB (axis-aligned bounding box) tree component offers a static data structure and algorithms to perform efficient intersection and distance queries on sets of finite 3D geometric objects.}
|
||||||
\cgalPkgManuals{Chapter_3D_Fast_Intersection_and_Distance_Computation,PkgAABBTreeRef}
|
\cgalPkgManuals{Chapter_3D_Fast_Intersection_and_Distance_Computation,PkgAABBTreeRef}
|
||||||
\cgalPkgSummaryEnd
|
\cgalPkgSummaryEnd
|
||||||
|
|
|
||||||
|
|
@ -143,18 +143,18 @@ struct AABB_covered_triangle_tree_traits
|
||||||
|
|
||||||
// Primitive ID --> box vector pos --> Bounding Box
|
// Primitive ID --> box vector pos --> Bounding Box
|
||||||
using BPMB = internal::Vector_property_map<CGAL::Bbox_3>;
|
using BPMB = internal::Vector_property_map<CGAL::Bbox_3>;
|
||||||
using BPM = CGAL::Property_map_binder<IDPM, BPMB>;
|
using BPM = CGAL::Compose_property_map<IDPM, BPMB>;
|
||||||
|
|
||||||
// Primitive ID --> point vector pos --> Reference Point
|
// Primitive ID --> point vector pos --> Reference Point
|
||||||
using RPPMB = internal::Vector_property_map<Point>;
|
using RPPMB = internal::Vector_property_map<Point>;
|
||||||
using RPPM = CGAL::Property_map_binder<IDPM, RPPMB>;
|
using RPPM = CGAL::Compose_property_map<IDPM, RPPMB>;
|
||||||
|
|
||||||
// Primitive ID --> Datum pos vector pos --> Datum pos --> Datum
|
// Primitive ID --> Datum pos vector pos --> Datum pos --> Datum
|
||||||
// The vector of data has size nf, but the vector of datum pos has size tree.size()
|
// The vector of data has size nf, but the vector of datum pos has size tree.size()
|
||||||
using DPPMB = internal::Vector_property_map<std::size_t>; // pos --> Datum pos
|
using DPPMB = internal::Vector_property_map<std::size_t>; // pos --> Datum pos
|
||||||
using DPPM = CGAL::Property_map_binder<IDPM, DPPMB>; // PID --> Datum pos
|
using DPPM = CGAL::Compose_property_map<IDPM, DPPMB>; // PID --> Datum pos
|
||||||
using DPMB = internal::Vector_property_map<Triangle_3>; // Datum pos --> Datum
|
using DPMB = internal::Vector_property_map<Triangle_3>; // Datum pos --> Datum
|
||||||
using DPM = CGAL::Property_map_binder<DPPM, DPMB>; // PID --> Datum
|
using DPM = CGAL::Compose_property_map<DPPM, DPMB>; // PID --> Datum
|
||||||
|
|
||||||
using Primitive = CGAL::AABB_primitive<ID, DPM, RPPM,
|
using Primitive = CGAL::AABB_primitive<ID, DPM, RPPM,
|
||||||
CGAL::Tag_true /*external pmaps*/,
|
CGAL::Tag_true /*external pmaps*/,
|
||||||
|
|
@ -207,7 +207,7 @@ public:
|
||||||
: Base(traits),
|
: Base(traits),
|
||||||
m_sq_length(square(max_length)),
|
m_sq_length(square(max_length)),
|
||||||
m_dppmb(), m_bpm(), m_rppm(), m_dpmb(),
|
m_dppmb(), m_bpm(), m_rppm(), m_dpmb(),
|
||||||
m_dpm(DPPM(m_dppmb/*first binder's value_map*/)/*second binder's key map*/, m_dpmb)
|
m_dpm(DPPM(Default(), m_dppmb/*first binder's value_map*/)/*second binder's key map*/, m_dpmb)
|
||||||
{
|
{
|
||||||
initialize_tree_property_maps();
|
initialize_tree_property_maps();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@
|
||||||
\cgalPkgDescriptionBegin{Advancing Front Surface Reconstruction,PkgAdvancingFrontSurfaceReconstruction}
|
\cgalPkgDescriptionBegin{Advancing Front Surface Reconstruction,PkgAdvancingFrontSurfaceReconstruction}
|
||||||
\cgalPkgPicture{afsr-detail.png}
|
\cgalPkgPicture{afsr-detail.png}
|
||||||
\cgalPkgSummaryBegin
|
\cgalPkgSummaryBegin
|
||||||
\cgalPkgAuthors{Tran Kai Frank Da, David Cohen-Steiner}
|
\cgalPkgAuthors{Tran Kai Frank Da and David Cohen-Steiner}
|
||||||
\cgalPkgDesc{This package provides a greedy algorithm for surface reconstruction from an
|
\cgalPkgDesc{This package provides a greedy algorithm for surface reconstruction from an
|
||||||
unorganized point set. Starting from a seed facet, a piecewise linear
|
unorganized point set. Starting from a seed facet, a piecewise linear
|
||||||
surface is grown by adding Delaunay triangles one by one. The most
|
surface is grown by adding Delaunay triangles one by one. The most
|
||||||
|
|
|
||||||
|
|
@ -4,15 +4,13 @@ project(Algebraic_kernel_d_Examples)
|
||||||
find_package(CGAL REQUIRED COMPONENTS Core)
|
find_package(CGAL REQUIRED COMPONENTS Core)
|
||||||
|
|
||||||
find_package(MPFI QUIET)
|
find_package(MPFI QUIET)
|
||||||
|
|
||||||
if(MPFI_FOUND AND NOT CGAL_DISABLE_GMP)
|
if(MPFI_FOUND AND NOT CGAL_DISABLE_GMP)
|
||||||
include(${MPFI_USE_FILE})
|
include(${MPFI_USE_FILE})
|
||||||
include(CGAL_VersionUtils)
|
|
||||||
create_single_source_cgal_program("Compare_1.cpp")
|
create_single_source_cgal_program("Compare_1.cpp")
|
||||||
create_single_source_cgal_program("Construct_algebraic_real_1.cpp")
|
create_single_source_cgal_program("Construct_algebraic_real_1.cpp")
|
||||||
create_single_source_cgal_program("Isolate_1.cpp")
|
create_single_source_cgal_program("Isolate_1.cpp")
|
||||||
create_single_source_cgal_program("Sign_at_1.cpp")
|
create_single_source_cgal_program("Sign_at_1.cpp")
|
||||||
create_single_source_cgal_program("Solve_1.cpp")
|
create_single_source_cgal_program("Solve_1.cpp")
|
||||||
else()
|
else()
|
||||||
message(STATUS "This program requires the CGAL, CGAL_Core and MPFI libraries, and will not be compiled.")
|
message("NOTICE: This project requires the MPFI library and GMP support, and will not be compiled.")
|
||||||
endif()
|
endif()
|
||||||
|
|
|
||||||
|
|
@ -4,48 +4,33 @@ project(Algebraic_kernel_d_Tests)
|
||||||
# CGAL and its components
|
# CGAL and its components
|
||||||
find_package(CGAL REQUIRED COMPONENTS Core)
|
find_package(CGAL REQUIRED COMPONENTS Core)
|
||||||
|
|
||||||
find_package(RS3 QUIET)
|
find_package(MPFI QUIET)
|
||||||
|
|
||||||
if(MPFI_FOUND)
|
if(MPFI_FOUND)
|
||||||
|
message(STATUS "Found MPFI")
|
||||||
include(${MPFI_USE_FILE})
|
include(${MPFI_USE_FILE})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
find_package(RS3 QUIET)
|
||||||
if(RS3_FOUND)
|
if(RS3_FOUND)
|
||||||
|
message(STATUS "Found RS3")
|
||||||
include(${RS3_USE_FILE})
|
include(${RS3_USE_FILE})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Boost and its components
|
|
||||||
find_package(Boost)
|
|
||||||
|
|
||||||
if(NOT Boost_FOUND)
|
|
||||||
|
|
||||||
message(
|
|
||||||
STATUS "This project requires the Boost library, and will not be compiled.")
|
|
||||||
|
|
||||||
return()
|
|
||||||
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# include for local directory
|
# include for local directory
|
||||||
include_directories(BEFORE include)
|
include_directories(BEFORE include)
|
||||||
|
|
||||||
# Creating entries for all .cpp/.C files with "main" routine
|
|
||||||
# ##########################################################
|
|
||||||
|
|
||||||
create_single_source_cgal_program("cyclic.cpp")
|
create_single_source_cgal_program("cyclic.cpp")
|
||||||
create_single_source_cgal_program("Descartes.cpp")
|
create_single_source_cgal_program("Descartes.cpp")
|
||||||
|
|
||||||
if(NOT CGAL_DISABLE_GMP)
|
if(NOT CGAL_DISABLE_GMP)
|
||||||
create_single_source_cgal_program("Algebraic_curve_kernel_2.cpp")
|
create_single_source_cgal_program("Algebraic_curve_kernel_2.cpp")
|
||||||
create_single_source_cgal_program("algebraic_curve_kernel_2_tools.cpp")
|
create_single_source_cgal_program("algebraic_curve_kernel_2_tools.cpp")
|
||||||
create_single_source_cgal_program("Algebraic_kernel_d_1_LEDA.cpp")
|
create_single_source_cgal_program("Algebraic_kernel_d_1_LEDA.cpp")
|
||||||
|
|
||||||
create_single_source_cgal_program(
|
create_single_source_cgal_program("Algebraic_kernel_d_1_CORE_Integer_rational.cpp")
|
||||||
"Algebraic_kernel_d_1_CORE_Integer_rational.cpp")
|
create_single_source_cgal_program("Algebraic_kernel_d_1_CORE_SqrtII_rational.cpp")
|
||||||
create_single_source_cgal_program(
|
create_single_source_cgal_program("Algebraic_kernel_d_1_CORE_SqrtRI_rational.cpp")
|
||||||
"Algebraic_kernel_d_1_CORE_SqrtII_rational.cpp")
|
create_single_source_cgal_program("Algebraic_kernel_d_1_CORE_SqrtRR_rational.cpp")
|
||||||
create_single_source_cgal_program(
|
|
||||||
"Algebraic_kernel_d_1_CORE_SqrtRI_rational.cpp")
|
|
||||||
create_single_source_cgal_program(
|
|
||||||
"Algebraic_kernel_d_1_CORE_SqrtRR_rational.cpp")
|
|
||||||
|
|
||||||
create_single_source_cgal_program("Algebraic_kernel_d_1_GMP.cpp")
|
create_single_source_cgal_program("Algebraic_kernel_d_1_GMP.cpp")
|
||||||
create_single_source_cgal_program("Algebraic_kernel_d_2.cpp")
|
create_single_source_cgal_program("Algebraic_kernel_d_2.cpp")
|
||||||
|
|
@ -54,14 +39,13 @@ if(NOT CGAL_DISABLE_GMP)
|
||||||
create_single_source_cgal_program("Curve_analysis_2.cpp")
|
create_single_source_cgal_program("Curve_analysis_2.cpp")
|
||||||
create_single_source_cgal_program("Curve_pair_analysis_2.cpp")
|
create_single_source_cgal_program("Curve_pair_analysis_2.cpp")
|
||||||
create_single_source_cgal_program("Real_embeddable_traits_extension.cpp")
|
create_single_source_cgal_program("Real_embeddable_traits_extension.cpp")
|
||||||
|
|
||||||
if(RS_FOUND)
|
if(RS_FOUND)
|
||||||
create_single_source_cgal_program("Algebraic_kernel_rs_gmpq_d_1.cpp")
|
create_single_source_cgal_program("Algebraic_kernel_rs_gmpq_d_1.cpp")
|
||||||
create_single_source_cgal_program("Algebraic_kernel_rs_gmpz_d_1.cpp")
|
create_single_source_cgal_program("Algebraic_kernel_rs_gmpz_d_1.cpp")
|
||||||
else()
|
else()
|
||||||
message(
|
message(STATUS "NOTICE: Some tests require the RS library, and will not be compiled.")
|
||||||
STATUS
|
|
||||||
"NOTICE: Some tests require the RS library, and will not be compiled.")
|
|
||||||
endif()
|
endif()
|
||||||
else()
|
else()
|
||||||
message(STATUS "NOTICE: Some tests require the CGAL_Core library, and will not be compiled.")
|
message(STATUS "NOTICE: Some tests require GMP support, and will not be compiled.")
|
||||||
endif()
|
endif()
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@
|
||||||
\cgalPkgDescriptionBegin{2D Alpha Shapes,PkgAlphaShapes2}
|
\cgalPkgDescriptionBegin{2D Alpha Shapes,PkgAlphaShapes2}
|
||||||
\cgalPkgPicture{alpha-detail.png}
|
\cgalPkgPicture{alpha-detail.png}
|
||||||
\cgalPkgSummaryBegin
|
\cgalPkgSummaryBegin
|
||||||
\cgalPkgAuthors{Tran Kai Frank Da}
|
\cgalPkgAuthor{Tran Kai Frank Da}
|
||||||
\cgalPkgDesc{This package offers a data structure encoding the whole family of alpha-complexes related to a given 2D Delaunay or regular triangulation. In particular, the data structure allows to retrieve the alpha-complex for any alpha value, the whole spectrum of critical alpha values and a filtration on the triangulation faces (this filtration is based on the first alpha value for which each face is included on the alpha-complex).}
|
\cgalPkgDesc{This package offers a data structure encoding the whole family of alpha-complexes related to a given 2D Delaunay or regular triangulation. In particular, the data structure allows to retrieve the alpha-complex for any alpha value, the whole spectrum of critical alpha values and a filtration on the triangulation faces (this filtration is based on the first alpha value for which each face is included on the alpha-complex).}
|
||||||
\cgalPkgManuals{Chapter_2D_Alpha_Shapes,PkgAlphaShapes2Ref}
|
\cgalPkgManuals{Chapter_2D_Alpha_Shapes,PkgAlphaShapes2Ref}
|
||||||
\cgalPkgSummaryEnd
|
\cgalPkgSummaryEnd
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@ project(Alpha_shapes_3_Demo)
|
||||||
|
|
||||||
# Find includes in corresponding build directories
|
# Find includes in corresponding build directories
|
||||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||||
|
|
||||||
# Instruct CMake to run moc automatically when needed.
|
# Instruct CMake to run moc automatically when needed.
|
||||||
set(CMAKE_AUTOMOC ON)
|
set(CMAKE_AUTOMOC ON)
|
||||||
if(NOT POLICY CMP0070 AND POLICY CMP0053)
|
if(NOT POLICY CMP0070 AND POLICY CMP0053)
|
||||||
|
|
@ -46,8 +47,6 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND)
|
||||||
|
|
||||||
else()
|
else()
|
||||||
|
|
||||||
message(
|
message("NOTICE: This demo requires CGAL and Qt5, and will not be compiled.")
|
||||||
STATUS "NOTICE: This demo requires CGAL, and Qt5, and will not be compiled."
|
|
||||||
)
|
|
||||||
|
|
||||||
endif()
|
endif()
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@
|
||||||
\cgalPkgDescriptionBegin{3D Alpha Wrapping,PkgAlphaWrap3}
|
\cgalPkgDescriptionBegin{3D Alpha Wrapping,PkgAlphaWrap3}
|
||||||
\cgalPkgPicture{alpha_wrap_3.jpg}
|
\cgalPkgPicture{alpha_wrap_3.jpg}
|
||||||
\cgalPkgSummaryBegin
|
\cgalPkgSummaryBegin
|
||||||
\cgalPkgAuthors{Pierre Alliez, David Cohen-Steiner, Michael Hemmer, Cédric Portaneri, Mael Rouxel-Labbé}
|
\cgalPkgAuthors{Pierre Alliez, David Cohen-Steiner, Michael Hemmer, Cédric Portaneri, and Mael Rouxel-Labbé}
|
||||||
\cgalPkgDesc{This component takes a 3D triangle mesh, a triangle soup, or a point set as input, and generates
|
\cgalPkgDesc{This component takes a 3D triangle mesh, a triangle soup, or a point set as input, and generates
|
||||||
a valid triangulated surface mesh that strictly contains the input (watertight, intersection-free
|
a valid triangulated surface mesh that strictly contains the input (watertight, intersection-free
|
||||||
and 2-manifold). The algorithm proceeds by shrink-wrapping
|
and 2-manifold). The algorithm proceeds by shrink-wrapping
|
||||||
|
|
|
||||||
|
|
@ -175,18 +175,18 @@ struct AABB_tree_splitter_traits
|
||||||
|
|
||||||
// Primitive ID --> box vector pos --> Bounding Box
|
// Primitive ID --> box vector pos --> Bounding Box
|
||||||
using BPMB = internal::Vector_property_map<CGAL::Bbox_3>;
|
using BPMB = internal::Vector_property_map<CGAL::Bbox_3>;
|
||||||
using BPM = CGAL::Property_map_binder<IDPM, BPMB>;
|
using BPM = CGAL::Compose_property_map<IDPM, BPMB>;
|
||||||
|
|
||||||
// Primitive ID --> point vector pos --> Reference Point
|
// Primitive ID --> point vector pos --> Reference Point
|
||||||
using RPPMB = internal::Vector_property_map<Point>;
|
using RPPMB = internal::Vector_property_map<Point>;
|
||||||
using RPPM = CGAL::Property_map_binder<IDPM, RPPMB>;
|
using RPPM = CGAL::Compose_property_map<IDPM, RPPMB>;
|
||||||
|
|
||||||
// Primitive ID --> Datum pos vector pos --> Datum pos --> Datum
|
// Primitive ID --> Datum pos vector pos --> Datum pos --> Datum
|
||||||
// The vector of data has size nf, but the vector of datum pos has size tree.size()
|
// The vector of data has size nf, but the vector of datum pos has size tree.size()
|
||||||
using DPPMB = internal::Vector_property_map<std::size_t>; // pos --> Datum pos
|
using DPPMB = internal::Vector_property_map<std::size_t>; // pos --> Datum pos
|
||||||
using DPPM = CGAL::Property_map_binder<IDPM, DPPMB>; // PID --> Datum pos
|
using DPPM = CGAL::Compose_property_map<IDPM, DPPMB>; // PID --> Datum pos
|
||||||
using DPMB = internal::Vector_property_map<Triangle_3>; // Datum pos --> Datum
|
using DPMB = internal::Vector_property_map<Triangle_3>; // Datum pos --> Datum
|
||||||
using DPM = CGAL::Property_map_binder<DPPM, DPMB>; // PID --> Datum
|
using DPM = CGAL::Compose_property_map<DPPM, DPMB>; // PID --> Datum
|
||||||
|
|
||||||
using Primitive = CGAL::AABB_primitive<ID, DPM, RPPM,
|
using Primitive = CGAL::AABB_primitive<ID, DPM, RPPM,
|
||||||
CGAL::Tag_true /*external pmaps*/,
|
CGAL::Tag_true /*external pmaps*/,
|
||||||
|
|
@ -236,7 +236,7 @@ public:
|
||||||
:
|
:
|
||||||
m_sq_alpha(square(alpha)),
|
m_sq_alpha(square(alpha)),
|
||||||
m_dppmb(), m_bpm(), m_rppm(), m_dpmb(),
|
m_dppmb(), m_bpm(), m_rppm(), m_dpmb(),
|
||||||
m_dpm(DPPM(m_dppmb/*first binder's value_map*/)/*second binder's key map*/, m_dpmb)
|
m_dpm(DPPM(Default(), m_dppmb/*first binder's value_map*/)/*second binder's key map*/, m_dpmb)
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
|
||||||
|
|
@ -303,7 +303,7 @@ void test_points_API(const std::string& ps_filename,
|
||||||
|
|
||||||
int main(int argc, char** argv)
|
int main(int argc, char** argv)
|
||||||
{
|
{
|
||||||
const std::string tm_filename = (argc > 1) ? argv[1] : CGAL::data_file_path("meshes/polygon_mesh.off"); // mesh
|
const std::string tm_filename = (argc > 1) ? argv[1] : CGAL::data_file_path("meshes/building.off"); // mesh
|
||||||
const std::string ts_filename = (argc > 2) ? argv[2] : CGAL::data_file_path("meshes/oblong-shuffled.off"); // triangle soup
|
const std::string ts_filename = (argc > 2) ? argv[2] : CGAL::data_file_path("meshes/oblong-shuffled.off"); // triangle soup
|
||||||
const std::string ss_filename = (argc > 3) ? argv[3] : CGAL::data_file_path("images/420.polylines.txt"); // segment soup
|
const std::string ss_filename = (argc > 3) ? argv[3] : CGAL::data_file_path("images/420.polylines.txt"); // segment soup
|
||||||
const std::string ps_filename = (argc > 4) ? argv[4] : CGAL::data_file_path("points_3/b9_training.ply"); // point set
|
const std::string ps_filename = (argc > 4) ? argv[4] : CGAL::data_file_path("points_3/b9_training.ply"); // point set
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ project(Arithmetic_kernel_Tests)
|
||||||
|
|
||||||
find_package(CGAL REQUIRED COMPONENTS Core)
|
find_package(CGAL REQUIRED COMPONENTS Core)
|
||||||
|
|
||||||
find_package(GMP QUIET)
|
find_package(GMP)
|
||||||
|
|
||||||
if(GMP_FOUND)
|
if(GMP_FOUND)
|
||||||
|
|
||||||
|
|
@ -18,7 +18,7 @@ if(GMP_FOUND)
|
||||||
|
|
||||||
include_directories(include)
|
include_directories(include)
|
||||||
|
|
||||||
find_package(MPFI)
|
find_package(MPFI QUIET)
|
||||||
|
|
||||||
if(MPFI_FOUND)
|
if(MPFI_FOUND)
|
||||||
include(${MPFI_USE_FILE})
|
include(${MPFI_USE_FILE})
|
||||||
|
|
@ -27,16 +27,13 @@ if(GMP_FOUND)
|
||||||
# version needs GMP>=4.2, so we require this dependency only here and
|
# version needs GMP>=4.2, so we require this dependency only here and
|
||||||
# not in FindMPFI.cmake
|
# not in FindMPFI.cmake
|
||||||
if(_IS_GMP_VERSION_TO_LOW)
|
if(_IS_GMP_VERSION_TO_LOW)
|
||||||
message(
|
message(STATUS "NOTICE: MPFI tests need GMP>=4.2, some of the tests will not be compiled")
|
||||||
STATUS
|
|
||||||
"MPFI tests need GMP>=4.2, some of the tests will not be compiled")
|
|
||||||
else(_IS_GMP_VERSION_TO_LOW)
|
else(_IS_GMP_VERSION_TO_LOW)
|
||||||
include(${MPFI_USE_FILE})
|
include(${MPFI_USE_FILE})
|
||||||
create_single_source_cgal_program("GMP_arithmetic_kernel.cpp")
|
create_single_source_cgal_program("GMP_arithmetic_kernel.cpp")
|
||||||
endif(_IS_GMP_VERSION_TO_LOW)
|
endif(_IS_GMP_VERSION_TO_LOW)
|
||||||
else(MPFI_FOUND)
|
else(MPFI_FOUND)
|
||||||
message(
|
message(STATUS "NOTICE: MPFI is not present, some of the tests will not be compiled.")
|
||||||
STATUS "MPFI is not present, some of the tests will not be compiled.")
|
|
||||||
endif(MPFI_FOUND)
|
endif(MPFI_FOUND)
|
||||||
|
|
||||||
create_single_source_cgal_program("Arithmetic_kernel.cpp")
|
create_single_source_cgal_program("Arithmetic_kernel.cpp")
|
||||||
|
|
@ -46,7 +43,6 @@ if(GMP_FOUND)
|
||||||
|
|
||||||
else()
|
else()
|
||||||
|
|
||||||
message(
|
message("NOTICE: This project requires GMP support, and will not be compiled.")
|
||||||
STATUS "This program requires the CGAL library, and will not be compiled.")
|
|
||||||
|
|
||||||
endif()
|
endif()
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
#ifndef LEXICAL_CAST_HPP
|
#ifndef LEXICAL_CAST_HPP
|
||||||
#define LEXICAL_CAST_HPP
|
#define LEXICAL_CAST_HPP
|
||||||
|
|
||||||
/*! This files provides lexical casts from std::string to any one of the number
|
/*! This file provides lexical casts from std::string to any one of the number
|
||||||
* types we intend to use in the benchmark, and a lexical cast does not exist.
|
* types we intend to use in the benchmark, and a lexical cast does not exist.
|
||||||
* It is inspired by boost::lexical_cast
|
* It is inspired by boost::lexical_cast
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -12,10 +12,10 @@ if(POLICY CMP0071)
|
||||||
cmake_policy(SET CMP0071 NEW)
|
cmake_policy(SET CMP0071 NEW)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
find_package(CGAL QUIET COMPONENTS Qt5 OPTIONAL_COMPONENTS Core)
|
find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Core Qt5)
|
||||||
find_package(Qt5 QUIET COMPONENTS Gui Widgets)
|
find_package(Qt5 QUIET COMPONENTS Gui Widgets)
|
||||||
|
|
||||||
if (CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND)
|
if (CGAL_Qt5_FOUND AND Qt5_FOUND)
|
||||||
include(${CGAL_USE_FILE})
|
include(${CGAL_USE_FILE})
|
||||||
add_compile_definitions(QT_NO_KEYWORDS)
|
add_compile_definitions(QT_NO_KEYWORDS)
|
||||||
include_directories( BEFORE ./ )
|
include_directories( BEFORE ./ )
|
||||||
|
|
@ -110,10 +110,10 @@ if (CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND)
|
||||||
${CGAL_Qt5_RESOURCE_FILES}
|
${CGAL_Qt5_RESOURCE_FILES}
|
||||||
${CGAL_Qt5_MOC_FILES})
|
${CGAL_Qt5_MOC_FILES})
|
||||||
|
|
||||||
target_link_libraries(arrangement_2 Qt5::Core Qt5::Gui Qt5::Widgets)
|
target_link_libraries(arrangement_2 PRIVATE Qt5::Core Qt5::Gui Qt5::Widgets)
|
||||||
target_link_libraries(arrangement_2 CGAL::CGAL CGAL::CGAL_Qt5)
|
target_link_libraries(arrangement_2 PRIVATE CGAL::CGAL CGAL::CGAL_Qt5)
|
||||||
if(CGAL_Core_FOUND)
|
if(CGAL_Core_FOUND)
|
||||||
target_link_libraries(arrangement_2 CGAL::CGAL_Core)
|
target_link_libraries(arrangement_2 PRIVATE CGAL::CGAL_Core)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_to_cached_list(CGAL_EXECUTABLE_TARGETS arrangement_2)
|
add_to_cached_list(CGAL_EXECUTABLE_TARGETS arrangement_2)
|
||||||
|
|
@ -124,15 +124,11 @@ if (CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND)
|
||||||
else()
|
else()
|
||||||
set(MISSING_DEPS "")
|
set(MISSING_DEPS "")
|
||||||
|
|
||||||
if(NOT CGAL_FOUND)
|
|
||||||
set(MISSING_DEPS "CGAL, ${MISSING_DEPS}")
|
|
||||||
endif()
|
|
||||||
if(NOT CGAL_Qt5_FOUND)
|
if(NOT CGAL_Qt5_FOUND)
|
||||||
set(MISSING_DEPS "the CGAL Qt5 library, ${MISSING_DEPS}")
|
set(MISSING_DEPS "the CGAL Qt5 library, ${MISSING_DEPS}")
|
||||||
endif()
|
endif()
|
||||||
if(NOT Qt5_FOUND)
|
if(NOT Qt5_FOUND)
|
||||||
set(MISSING_DEPS "Qt5, ${MISSING_DEPS}")
|
set(MISSING_DEPS "Qt5, ${MISSING_DEPS}")
|
||||||
endif()
|
endif()
|
||||||
message(STATUS
|
message("NOTICE: This demo requires ${MISSING_DEPS} and will not be compiled.")
|
||||||
"NOTICE: This demo requires ${MISSING_DEPS} and will not be compiled.")
|
|
||||||
endif()
|
endif()
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,6 @@
|
||||||
// A face overlay of two arrangements with unbounded faces.
|
// A face overlay of two arrangements with unbounded faces.
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <boost/lexical_cast.hpp>
|
|
||||||
|
|
||||||
#include <CGAL/basic.h>
|
#include <CGAL/basic.h>
|
||||||
#include <CGAL/Arr_extended_dcel.h>
|
#include <CGAL/Arr_extended_dcel.h>
|
||||||
|
|
@ -14,7 +13,7 @@
|
||||||
// Define a functor for creating a label from a character and an integer.
|
// Define a functor for creating a label from a character and an integer.
|
||||||
struct Overlay_label {
|
struct Overlay_label {
|
||||||
std::string operator()(char c, unsigned int i) const
|
std::string operator()(char c, unsigned int i) const
|
||||||
{ return c + boost::lexical_cast<std::string>(i); }
|
{ return c + std::to_string(i); }
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef CGAL::Arr_face_extended_dcel<Traits, char> Dcel_dlue;
|
typedef CGAL::Arr_face_extended_dcel<Traits, char> Dcel_dlue;
|
||||||
|
|
|
||||||
|
|
@ -153,7 +153,7 @@ public:
|
||||||
Dag_node* m_dag_node; //pointer to the search structure (DAG) node
|
Dag_node* m_dag_node; //pointer to the search structure (DAG) node
|
||||||
|
|
||||||
/*! Initialize the trapezoid's neighbors. */
|
/*! Initialize the trapezoid's neighbors. */
|
||||||
CGAL_TD_INLINE void init_neighbours(Self* lb_ = 0, Self* lt_ = 0,
|
CGAL_TD_INLINE void init_neighbors(Self* lb_ = 0, Self* lt_ = 0,
|
||||||
Self* rb_ = 0, Self* rt_ = 0)
|
Self* rb_ = 0, Self* rt_ = 0)
|
||||||
{
|
{
|
||||||
set_lb(lb_);
|
set_lb(lb_);
|
||||||
|
|
@ -161,6 +161,11 @@ public:
|
||||||
set_rb(rb_);
|
set_rb(rb_);
|
||||||
set_rt(rt_);
|
set_rt(rt_);
|
||||||
}
|
}
|
||||||
|
/*! \copydoc init_neighbors
|
||||||
|
* \deprecated please use #init_neighbors */
|
||||||
|
CGAL_DEPRECATED CGAL_TD_INLINE void init_neighbours(Self* lb_ = 0, Self* lt_ = 0,
|
||||||
|
Self* rb_ = 0, Self* rt_ = 0)
|
||||||
|
{ init_neighbors(lb_, lt_, rb_, rt_); }
|
||||||
|
|
||||||
/*! Set the DAG node. */
|
/*! Set the DAG node. */
|
||||||
CGAL_TD_INLINE void set_dag_node(Dag_node* p)
|
CGAL_TD_INLINE void set_dag_node(Dag_node* p)
|
||||||
|
|
|
||||||
|
|
@ -145,10 +145,14 @@ public:
|
||||||
//Dag_node* m_dag_node; //pointer to the search structure (DAG) node
|
//Dag_node* m_dag_node; //pointer to the search structure (DAG) node
|
||||||
|
|
||||||
/*! Initialize the trapezoid's neighbors. */
|
/*! Initialize the trapezoid's neighbors. */
|
||||||
inline void init_neighbours(boost::optional<Td_map_item&> next)
|
inline void init_neighbors(boost::optional<Td_map_item&> next)
|
||||||
{
|
{
|
||||||
set_next((next) ? *next : Td_map_item(0));
|
set_next((next) ? *next : Td_map_item(0));
|
||||||
}
|
}
|
||||||
|
/*! \copydoc init_neighbors
|
||||||
|
* \deprecated please use #init_neighbors */
|
||||||
|
CGAL_DEPRECATED inline void init_neighbours(boost::optional<Td_map_item&> next)
|
||||||
|
{ init_neighbors(next); }
|
||||||
|
|
||||||
/*! Set the DAG node. */
|
/*! Set the DAG node. */
|
||||||
CGAL_TD_INLINE void set_dag_node(Dag_node* p)
|
CGAL_TD_INLINE void set_dag_node(Dag_node* p)
|
||||||
|
|
|
||||||
|
|
@ -163,7 +163,7 @@ private:
|
||||||
//Dag_node* m_dag_node; //pointer to the search structure (DAG) node
|
//Dag_node* m_dag_node; //pointer to the search structure (DAG) node
|
||||||
|
|
||||||
/*! Initialize the trapezoid's neighbors. */
|
/*! Initialize the trapezoid's neighbors. */
|
||||||
inline void init_neighbours(boost::optional<Td_map_item&> lb, boost::optional<Td_map_item&> lt,
|
inline void init_neighbors(boost::optional<Td_map_item&> lb, boost::optional<Td_map_item&> lt,
|
||||||
boost::optional<Td_map_item&> rb, boost::optional<Td_map_item&> rt)
|
boost::optional<Td_map_item&> rb, boost::optional<Td_map_item&> rt)
|
||||||
{
|
{
|
||||||
set_lb((lb) ? *lb : Td_map_item(0));
|
set_lb((lb) ? *lb : Td_map_item(0));
|
||||||
|
|
@ -171,6 +171,11 @@ private:
|
||||||
set_rb((rb) ? *rb : Td_map_item(0));
|
set_rb((rb) ? *rb : Td_map_item(0));
|
||||||
set_rt((rt) ? *rt : Td_map_item(0));
|
set_rt((rt) ? *rt : Td_map_item(0));
|
||||||
}
|
}
|
||||||
|
/*! \copydoc init_neighbors
|
||||||
|
* \deprecated please use #init_neighbors */
|
||||||
|
CGAL_DEPRECATED inline void init_neighbours(boost::optional<Td_map_item&> lb, boost::optional<Td_map_item&> lt,
|
||||||
|
boost::optional<Td_map_item&> rb, boost::optional<Td_map_item&> rt)
|
||||||
|
{ init_neighbors(lb, lt, rb, rt); }
|
||||||
|
|
||||||
/*! Set the DAG node. */
|
/*! Set the DAG node. */
|
||||||
inline void set_dag_node(Dag_node* p)
|
inline void set_dag_node(Dag_node* p)
|
||||||
|
|
|
||||||
|
|
@ -72,9 +72,9 @@ split_trapezoid_by_vertex(Dag_node& split_node,
|
||||||
CGAL_warning(left_tr.is_on_left_boundary() == tr.is_on_left_boundary());
|
CGAL_warning(left_tr.is_on_left_boundary() == tr.is_on_left_boundary());
|
||||||
CGAL_warning(right_tr.is_on_right_boundary() == tr.is_on_right_boundary());
|
CGAL_warning(right_tr.is_on_right_boundary() == tr.is_on_right_boundary());
|
||||||
|
|
||||||
left_tr.init_neighbours(tr.lb(), tr.lt(),
|
left_tr.init_neighbors(tr.lb(), tr.lt(),
|
||||||
right_node.get_data(), right_node.get_data());
|
right_node.get_data(), right_node.get_data());
|
||||||
right_tr.init_neighbours(left_node.get_data(), left_node.get_data(),
|
right_tr.init_neighbors(left_node.get_data(), left_node.get_data(),
|
||||||
tr.rb(), tr.rt());
|
tr.rb(), tr.rt());
|
||||||
if (!traits->is_empty_item(tr.lb())) {
|
if (!traits->is_empty_item(tr.lb())) {
|
||||||
Td_active_trapezoid& lb(boost::get<Td_active_trapezoid>(tr.lb()));
|
Td_active_trapezoid& lb(boost::get<Td_active_trapezoid>(tr.lb()));
|
||||||
|
|
@ -109,10 +109,10 @@ split_trapezoid_by_vertex(Dag_node& split_node,
|
||||||
//CGAL_warning(left_e.is_on_left_boundary() == e.is_on_left_boundary());
|
//CGAL_warning(left_e.is_on_left_boundary() == e.is_on_left_boundary());
|
||||||
//CGAL_warning(right_e.is_on_right_boundary() == e.is_on_right_boundary());
|
//CGAL_warning(right_e.is_on_right_boundary() == e.is_on_right_boundary());
|
||||||
|
|
||||||
left_e.init_neighbours(boost::none);
|
left_e.init_neighbors(boost::none);
|
||||||
//left_e.init_neighbours(e.lb(),e.lt(),Td_map_item(),right_node.get_data());
|
//left_e.init_neighbors(e.lb(),e.lt(),Td_map_item(),right_node.get_data());
|
||||||
right_e.init_neighbours(e.next());
|
right_e.init_neighbors(e.next());
|
||||||
//right_e.init_neighbours(left_node.get_data(),left_node.get_data(),e.rb(),e.rt());
|
//right_e.init_neighbors(left_node.get_data(),left_node.get_data(),e.rb(),e.rt());
|
||||||
}
|
}
|
||||||
|
|
||||||
// left and right are set to the point itself,
|
// left and right are set to the point itself,
|
||||||
|
|
@ -307,8 +307,8 @@ split_trapezoid_by_halfedge(Dag_node& split_node,
|
||||||
Td_active_trapezoid& top =
|
Td_active_trapezoid& top =
|
||||||
boost::get<Td_active_trapezoid>(top_node.get_data());
|
boost::get<Td_active_trapezoid>(top_node.get_data());
|
||||||
|
|
||||||
top.init_neighbours(prev_top_tr, split_tr.lt(), boost::none , split_tr.rt());
|
top.init_neighbors(prev_top_tr, split_tr.lt(), boost::none , split_tr.rt());
|
||||||
bottom.init_neighbours(split_tr.lb(), prev_bottom_tr, split_tr.rb(),
|
bottom.init_neighbors(split_tr.lb(), prev_bottom_tr, split_tr.rb(),
|
||||||
boost::none);
|
boost::none);
|
||||||
|
|
||||||
if (!traits->is_empty_item(prev_bottom_tr)) {
|
if (!traits->is_empty_item(prev_bottom_tr)) {
|
||||||
|
|
@ -2340,7 +2340,7 @@ vertical_ray_shoot(const Point & p,Locate_type & lt,
|
||||||
// }
|
// }
|
||||||
// else // new_left_t is leftmost representative for he
|
// else // new_left_t is leftmost representative for he
|
||||||
// {
|
// {
|
||||||
// //set_neighbours_after_split_halfedge_update (new_left_t, t1, he1, he2); //MICHAL: this method does nothing
|
// //set_neighbors_after_split_halfedge_update (new_left_t, t1, he1, he2); //MICHAL: this method does nothing
|
||||||
// }
|
// }
|
||||||
// if (t1.rt()==&old_t) t1.set_rt(&new_left_t);
|
// if (t1.rt()==&old_t) t1.set_rt(&new_left_t);
|
||||||
// if (t1.lb()==&old_t) t1.set_lb(&new_left_t);
|
// if (t1.lb()==&old_t) t1.set_lb(&new_left_t);
|
||||||
|
|
@ -2366,7 +2366,7 @@ vertical_ray_shoot(const Point & p,Locate_type & lt,
|
||||||
// }
|
// }
|
||||||
// else // new_right_t is rightmost representative for te
|
// else // new_right_t is rightmost representative for te
|
||||||
// {
|
// {
|
||||||
// //set_neighbours_after_split_halfedge_update (new_right_t,t2,he1, he2,false); //MICHAL: this method does nothing
|
// //set_neighbors_after_split_halfedge_update (new_right_t,t2,he1, he2,false); //MICHAL: this method does nothing
|
||||||
// }
|
// }
|
||||||
// if (t2.rt()==&old_t) t2.set_rt(&new_right_t);
|
// if (t2.rt()==&old_t) t2.set_rt(&new_right_t);
|
||||||
// if (t2.lb()==&old_t) t2.set_lb(&new_right_t);
|
// if (t2.lb()==&old_t) t2.set_lb(&new_right_t);
|
||||||
|
|
|
||||||
|
|
@ -215,16 +215,16 @@ is_in_face(const Face* f, const Point_2& p, const Vertex* v) const
|
||||||
|
|
||||||
/*! We identify 2 main cases:
|
/*! We identify 2 main cases:
|
||||||
* 1. The vertical ray intersects the boundary at a halfedge. In this
|
* 1. The vertical ray intersects the boundary at a halfedge. In this
|
||||||
* case the x-possition of p is strictly larger than the x-possition of
|
* case the x-position of p is strictly larger than the x-position of
|
||||||
* the current-curve source, and strictly smaller than x-possition of
|
* the current-curve source, and strictly smaller than x-position of
|
||||||
* the current-curve target, or vice versa.
|
* the current-curve target, or vice versa.
|
||||||
* 2. The vertical ray intersects the boundary at a vertex. In this case:
|
* 2. The vertical ray intersects the boundary at a vertex. In this case:
|
||||||
* a. the x-possition of p is strictly smaller than the x-position of the
|
* a. the x-position of p is strictly smaller than the x-position of the
|
||||||
* current-curve source, and equal to the x-position of the current-curve
|
* current-curve source, and equal to the x-position of the current-curve
|
||||||
* target, and
|
* target, and
|
||||||
* b. the x-possition of p is equal to the x-position of the next-curve
|
* b. the x-position of p is equal to the x-position of the next-curve
|
||||||
* source (not counting vertical curves in between), and strictly larger
|
* source (not counting vertical curves in between), and strictly larger
|
||||||
* than the x-possition of the next-curve target, or vice verase (that is,
|
* than the x-position of the next-curve target, or vice verase (that is,
|
||||||
* the "smaller" and "larger" interchanged).
|
* the "smaller" and "larger" interchanged).
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1065,7 +1065,7 @@ void draw_lump(std::vector< Coord_2 >& rev_points, int& last_x,
|
||||||
if(set_ready)
|
if(set_ready)
|
||||||
ready = true;
|
ready = true;
|
||||||
|
|
||||||
if(!test_neighbourhood(pix, back_dir, new_dir)) {
|
if(!test_neighborhood(pix, back_dir, new_dir)) {
|
||||||
ux = pix.x;
|
ux = pix.x;
|
||||||
uy = pix.y;
|
uy = pix.y;
|
||||||
if(witness == pix) { // witness subpixel is a pixel itself
|
if(witness == pix) { // witness subpixel is a pixel itself
|
||||||
|
|
@ -1095,7 +1095,7 @@ void draw_lump(std::vector< Coord_2 >& rev_points, int& last_x,
|
||||||
stored_prev = prev_pix;
|
stored_prev = prev_pix;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!test_neighbourhood(pix, back_dir, new_dir)) {
|
if(!test_neighborhood(pix, back_dir, new_dir)) {
|
||||||
if(stored_dir != -1) {
|
if(stored_dir != -1) {
|
||||||
pix = stored_pix;
|
pix = stored_pix;
|
||||||
prev_pix = stored_prev;
|
prev_pix = stored_prev;
|
||||||
|
|
@ -1257,7 +1257,7 @@ bool subdivide(Pixel_2& pix, int back_dir, int& new_dir) {
|
||||||
pix.sub_y = (pix.sub_y<<1) + (idx>>1);
|
pix.sub_y = (pix.sub_y<<1) + (idx>>1);
|
||||||
//Gfx_DETAILED_OUT("subpixel index: " << idx << " (" << pix.sub_x << "; "
|
//Gfx_DETAILED_OUT("subpixel index: " << idx << " (" << pix.sub_x << "; "
|
||||||
// << pix.sub_y << ")" << std::endl);
|
// << pix.sub_y << ")" << std::endl);
|
||||||
if(!test_neighbourhood(pix, back_dir, new_dir))
|
if(!test_neighborhood(pix, back_dir, new_dir))
|
||||||
return subdivide(pix,back_dir,new_dir);
|
return subdivide(pix,back_dir,new_dir);
|
||||||
//Gfx_DETAILED_OUT("new direction found: " << new_dir << " at a pixel:" <<
|
//Gfx_DETAILED_OUT("new direction found: " << new_dir << " at a pixel:" <<
|
||||||
//pix << std::endl);
|
//pix << std::endl);
|
||||||
|
|
@ -1313,7 +1313,7 @@ bool get_seed_point(const Rational& seed, Pixel_2& start, int *dir,
|
||||||
<< start.level << std::endl;
|
<< start.level << std::endl;
|
||||||
throw internal::Insufficient_rasterize_precision_exception();
|
throw internal::Insufficient_rasterize_precision_exception();
|
||||||
}
|
}
|
||||||
//dump_neighbourhood(start);
|
//dump_neighborhood(start);
|
||||||
|
|
||||||
if(limit(engine.pixel_w/NT(lvl))||limit(engine.pixel_h/NT(lvl))) {
|
if(limit(engine.pixel_w/NT(lvl))||limit(engine.pixel_h/NT(lvl))) {
|
||||||
std::cerr << "get_seed_point: too small subpixel size: " <<
|
std::cerr << "get_seed_point: too small subpixel size: " <<
|
||||||
|
|
@ -1425,7 +1425,7 @@ bool test_pixel(const Pixel_2& pix, int *dir, int *b_taken, bool& b_coincide)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Gfx_OUT("test pixel: " << pix << "--------------------------------\n");
|
Gfx_OUT("test pixel: " << pix << "--------------------------------\n");
|
||||||
dump_neighbourhood(pix);
|
dump_neighborhood(pix);
|
||||||
Gfx_OUT("----------------------------------------------\n\n");*/
|
Gfx_OUT("----------------------------------------------\n\n");*/
|
||||||
|
|
||||||
b_coincide = false;
|
b_coincide = false;
|
||||||
|
|
@ -1913,7 +1913,7 @@ inline void get_polynomials(int var, Stripe& stripe) {
|
||||||
* if \c CGAL_CKVA_RENDER_WITH_REFINEMENT is set, in case of success \c pix
|
* if \c CGAL_CKVA_RENDER_WITH_REFINEMENT is set, in case of success \c pix
|
||||||
* receives double approximations of intersection point
|
* receives double approximations of intersection point
|
||||||
*/
|
*/
|
||||||
bool test_neighbourhood(Pixel_2& pix, int dir, int& new_dir)
|
bool test_neighborhood(Pixel_2& pix, int dir, int& new_dir)
|
||||||
{
|
{
|
||||||
NT lvl = NT(one << pix.level);
|
NT lvl = NT(one << pix.level);
|
||||||
NT inv = NT(1.0) / lvl;
|
NT inv = NT(1.0) / lvl;
|
||||||
|
|
@ -2258,6 +2258,11 @@ Lexit:
|
||||||
pix.yv = CGAL::to_double(engine.y_min + y*engine.pixel_h);
|
pix.yv = CGAL::to_double(engine.y_min + y*engine.pixel_h);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
/*! \copydoc test_neighborhood
|
||||||
|
* \deprecated please use #test_neighborhood */
|
||||||
|
CGAL_DEPRECATED bool test_neighbourhood(Pixel_2& pix, int dir, int& new_dir)
|
||||||
|
{ return test_neighborhood(pix, new_dir); }
|
||||||
|
|
||||||
#endif // CGAL_CKVA_RENDER_WITH_REFINEMENT
|
#endif // CGAL_CKVA_RENDER_WITH_REFINEMENT
|
||||||
|
|
||||||
//! \brief returns whether a polynomial has zero over an interval,
|
//! \brief returns whether a polynomial has zero over an interval,
|
||||||
|
|
@ -2585,7 +2590,7 @@ inline bool is_isolated_pixel(const Pixel_2& /* pix */) {
|
||||||
|
|
||||||
// DEBUG ONLY
|
// DEBUG ONLY
|
||||||
#ifdef Gfx_USE_OUT
|
#ifdef Gfx_USE_OUT
|
||||||
void dump_neighbourhood(const Pixel_2& pix) {
|
void dump_neighborhood(const Pixel_2& pix) {
|
||||||
CGAL::IO::set_mode(std::cerr, CGAL::IO::PRETTY);
|
CGAL::IO::set_mode(std::cerr, CGAL::IO::PRETTY);
|
||||||
CGAL::IO::set_mode(std::cout, CGAL::IO::PRETTY);
|
CGAL::IO::set_mode(std::cout, CGAL::IO::PRETTY);
|
||||||
|
|
||||||
|
|
@ -2764,8 +2769,10 @@ void dump_neighbourhood(const Pixel_2& pix) {
|
||||||
Gfx_OUT("sign change at segment 2" << std::endl);
|
Gfx_OUT("sign change at segment 2" << std::endl);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
void dump_neighbourhood(const Pixel_2&) { }
|
void dump_neighborhood(const Pixel_2&) { }
|
||||||
#endif // Gfx_USE_OUT
|
#endif // Gfx_USE_OUT
|
||||||
|
CGAL_DEPRECATED void dump_neighbourhood(const Pixel_2& pix)
|
||||||
|
{ dump_neighborhood(pix); }
|
||||||
|
|
||||||
//!@}
|
//!@}
|
||||||
}; // class Curve_renderer_2<>
|
}; // class Curve_renderer_2<>
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
#ifndef CGAL_TEST_CONFIGURATION_H
|
#ifndef CGAL_TEST_CONFIGURATION_H
|
||||||
#define CGAL_TEST_CONFIGURATION_H
|
#define CGAL_TEST_CONFIGURATION_H
|
||||||
|
|
||||||
/*! This files contains define statements, include statement, and typedef
|
/*! This file contains define statements, include statement, and typedef
|
||||||
* of the number types, kernel, and traits used.
|
* of the number types, kernel, and traits used.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -7,23 +7,6 @@ project(BGL_LCC_Examples)
|
||||||
# CGAL and its components
|
# CGAL and its components
|
||||||
find_package(CGAL REQUIRED)
|
find_package(CGAL REQUIRED)
|
||||||
|
|
||||||
# Boost and its components
|
|
||||||
find_package(Boost REQUIRED)
|
|
||||||
|
|
||||||
if(NOT Boost_FOUND)
|
|
||||||
|
|
||||||
message(
|
|
||||||
STATUS "This project requires the Boost library, and will not be compiled.")
|
|
||||||
|
|
||||||
return()
|
|
||||||
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# include for local directory
|
|
||||||
|
|
||||||
# Creating entries for all C++ files with "main" routine
|
|
||||||
# ##########################################################
|
|
||||||
|
|
||||||
# create a target per cppfile
|
# create a target per cppfile
|
||||||
file(
|
file(
|
||||||
GLOB_RECURSE cppfiles
|
GLOB_RECURSE cppfiles
|
||||||
|
|
|
||||||
|
|
@ -7,38 +7,11 @@ project(BGL_OpenMesh_Examples)
|
||||||
# CGAL and its components
|
# CGAL and its components
|
||||||
find_package(CGAL REQUIRED)
|
find_package(CGAL REQUIRED)
|
||||||
|
|
||||||
# Boost and its components
|
find_package(OpenMesh)
|
||||||
find_package(Boost REQUIRED)
|
|
||||||
|
|
||||||
if(NOT Boost_FOUND)
|
|
||||||
|
|
||||||
message(
|
|
||||||
STATUS "This project requires the Boost library, and will not be compiled.")
|
|
||||||
|
|
||||||
return()
|
|
||||||
|
|
||||||
endif()
|
|
||||||
|
|
||||||
find_package(OpenMesh QUIET)
|
|
||||||
|
|
||||||
if(OpenMesh_FOUND)
|
if(OpenMesh_FOUND)
|
||||||
include(UseOpenMesh)
|
include(UseOpenMesh)
|
||||||
else()
|
|
||||||
|
|
||||||
message(
|
|
||||||
STATUS "NOTICE: These examples require OpenMesh and will not be compiled.")
|
|
||||||
return()
|
|
||||||
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# include for local directory
|
|
||||||
|
|
||||||
# include for local package
|
|
||||||
|
|
||||||
# Creating entries for all C++ files with "main" routine
|
|
||||||
# ##########################################################
|
|
||||||
|
|
||||||
if(OpenMesh_FOUND)
|
|
||||||
create_single_source_cgal_program("TriMesh.cpp")
|
create_single_source_cgal_program("TriMesh.cpp")
|
||||||
target_link_libraries(TriMesh PRIVATE ${OPENMESH_LIBRARIES})
|
target_link_libraries(TriMesh PRIVATE ${OPENMESH_LIBRARIES})
|
||||||
|
else()
|
||||||
|
message("NOTICE: This project requires OpenMesh and will not be compiled.")
|
||||||
endif()
|
endif()
|
||||||
|
|
|
||||||
|
|
@ -8,25 +8,5 @@ project(BGL_graphcut_Examples)
|
||||||
# CGAL and its components
|
# CGAL and its components
|
||||||
find_package(CGAL REQUIRED)
|
find_package(CGAL REQUIRED)
|
||||||
|
|
||||||
# Boost and its components
|
|
||||||
find_package(Boost REQUIRED)
|
|
||||||
|
|
||||||
if(NOT Boost_FOUND)
|
|
||||||
|
|
||||||
message(
|
|
||||||
STATUS "This project requires the Boost library, and will not be compiled.")
|
|
||||||
|
|
||||||
return()
|
|
||||||
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# include for local directory
|
|
||||||
|
|
||||||
# include for local package
|
|
||||||
|
|
||||||
# Creating entries for all C++ files with "main" routine
|
|
||||||
# ##########################################################
|
|
||||||
|
|
||||||
create_single_source_cgal_program("alpha_expansion_example.cpp")
|
create_single_source_cgal_program("alpha_expansion_example.cpp")
|
||||||
create_single_source_cgal_program(
|
create_single_source_cgal_program("face_selection_borders_regularization_example.cpp")
|
||||||
"face_selection_borders_regularization_example.cpp")
|
|
||||||
|
|
|
||||||
|
|
@ -7,54 +7,28 @@ project(BGL_polyhedron_3_Examples)
|
||||||
# CGAL and its components
|
# CGAL and its components
|
||||||
find_package(CGAL REQUIRED)
|
find_package(CGAL REQUIRED)
|
||||||
|
|
||||||
# Boost and its components
|
|
||||||
find_package(Boost REQUIRED)
|
|
||||||
|
|
||||||
if(NOT Boost_FOUND)
|
|
||||||
|
|
||||||
message(
|
|
||||||
STATUS "This project requires the Boost library, and will not be compiled.")
|
|
||||||
|
|
||||||
return()
|
|
||||||
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# include for local directory
|
|
||||||
|
|
||||||
# include for local package
|
|
||||||
|
|
||||||
# Creating entries for all C++ files with "main" routine
|
|
||||||
# ##########################################################
|
|
||||||
|
|
||||||
create_single_source_cgal_program("distance.cpp")
|
create_single_source_cgal_program("distance.cpp")
|
||||||
|
|
||||||
create_single_source_cgal_program("incident_vertices.cpp")
|
create_single_source_cgal_program("incident_vertices.cpp")
|
||||||
|
|
||||||
create_single_source_cgal_program("kruskal.cpp")
|
create_single_source_cgal_program("kruskal.cpp")
|
||||||
|
|
||||||
create_single_source_cgal_program("kruskal_with_stored_id.cpp")
|
create_single_source_cgal_program("kruskal_with_stored_id.cpp")
|
||||||
|
|
||||||
create_single_source_cgal_program("normals.cpp")
|
create_single_source_cgal_program("normals.cpp")
|
||||||
|
|
||||||
create_single_source_cgal_program("range.cpp")
|
create_single_source_cgal_program("range.cpp")
|
||||||
|
|
||||||
create_single_source_cgal_program("transform_iterator.cpp")
|
create_single_source_cgal_program("transform_iterator.cpp")
|
||||||
|
|
||||||
create_single_source_cgal_program("copy_polyhedron.cpp")
|
create_single_source_cgal_program("copy_polyhedron.cpp")
|
||||||
|
|
||||||
find_package( OpenMesh QUIET )
|
find_package(OpenMesh QUIET)
|
||||||
if(OpenMesh_FOUND)
|
if(OpenMesh_FOUND)
|
||||||
target_link_libraries( copy_polyhedron PRIVATE ${OPENMESH_LIBRARIES} )
|
target_link_libraries(copy_polyhedron PRIVATE ${OPENMESH_LIBRARIES})
|
||||||
target_compile_definitions( copy_polyhedron PRIVATE -DCGAL_USE_OPENMESH )
|
target_compile_definitions(copy_polyhedron PRIVATE -DCGAL_USE_OPENMESH)
|
||||||
else()
|
else()
|
||||||
message(STATUS "Examples that use OpenMesh will not be compiled.")
|
message(STATUS "NOTICE: The example 'copy_polyhedron' will not use OpenMesh.")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
find_package( METIS )
|
find_package(METIS QUIET)
|
||||||
include(CGAL_METIS_support)
|
include(CGAL_METIS_support)
|
||||||
if( TARGET CGAL::METIS_support )
|
if(TARGET CGAL::METIS_support)
|
||||||
create_single_source_cgal_program( "polyhedron_partition.cpp" )
|
create_single_source_cgal_program("polyhedron_partition.cpp")
|
||||||
target_link_libraries( polyhedron_partition PUBLIC CGAL::METIS_support)
|
target_link_libraries(polyhedron_partition PUBLIC CGAL::METIS_support)
|
||||||
else()
|
else()
|
||||||
message( STATUS "Examples that use the METIS library will not be compiled." )
|
message(STATUS "NOTICE: The example 'polyhedron_partition' requires the METIS library, and will not be compiled.")
|
||||||
endif()
|
endif()
|
||||||
|
|
|
||||||
|
|
@ -3,8 +3,6 @@ project(BGL_surface_mesh_Examples)
|
||||||
|
|
||||||
find_package(CGAL REQUIRED)
|
find_package(CGAL REQUIRED)
|
||||||
|
|
||||||
# include for local package
|
|
||||||
|
|
||||||
create_single_source_cgal_program("prim.cpp")
|
create_single_source_cgal_program("prim.cpp")
|
||||||
create_single_source_cgal_program("gwdwg.cpp")
|
create_single_source_cgal_program("gwdwg.cpp")
|
||||||
create_single_source_cgal_program("seam_mesh.cpp")
|
create_single_source_cgal_program("seam_mesh.cpp")
|
||||||
|
|
@ -12,11 +10,11 @@ create_single_source_cgal_program("write_inp.cpp")
|
||||||
create_single_source_cgal_program("surface_mesh_dual.cpp")
|
create_single_source_cgal_program("surface_mesh_dual.cpp")
|
||||||
create_single_source_cgal_program("connected_components.cpp")
|
create_single_source_cgal_program("connected_components.cpp")
|
||||||
|
|
||||||
find_package(METIS)
|
find_package(METIS QUIET)
|
||||||
include(CGAL_METIS_support)
|
include(CGAL_METIS_support)
|
||||||
if( TARGET CGAL::METIS_support )
|
if(TARGET CGAL::METIS_support)
|
||||||
create_single_source_cgal_program( "surface_mesh_partition.cpp" )
|
create_single_source_cgal_program("surface_mesh_partition.cpp")
|
||||||
target_link_libraries( surface_mesh_partition PUBLIC CGAL::METIS_support )
|
target_link_libraries(surface_mesh_partition PUBLIC CGAL::METIS_support)
|
||||||
else()
|
else()
|
||||||
message(STATUS "Examples that use the METIS library will not be compiled.")
|
message(STATUS "NOTICE: Examples that use the METIS library will not be compiled.")
|
||||||
endif()
|
endif()
|
||||||
|
|
|
||||||
|
|
@ -588,31 +588,31 @@ struct Face_filtered_graph
|
||||||
return selected_halfedges.count();
|
return selected_halfedges.count();
|
||||||
}
|
}
|
||||||
|
|
||||||
Property_map_binder<FIM, typename Pointer_property_map<typename boost::property_traits<FIM>::value_type>::type>
|
Compose_property_map<FIM, typename Pointer_property_map<typename boost::property_traits<FIM>::value_type>::type>
|
||||||
get_face_index_map() const
|
get_face_index_map() const
|
||||||
{
|
{
|
||||||
is_imap_in_use.set(0);
|
is_imap_in_use.set(0);
|
||||||
initialize_face_indices();
|
initialize_face_indices();
|
||||||
|
|
||||||
return bind_property_maps(fimap, make_property_map(face_indices));
|
return make_compose_property_map(fimap, make_property_map(face_indices));
|
||||||
}
|
}
|
||||||
|
|
||||||
Property_map_binder<VIM, typename Pointer_property_map<typename boost::property_traits<VIM>::value_type>::type>
|
Compose_property_map<VIM, typename Pointer_property_map<typename boost::property_traits<VIM>::value_type>::type>
|
||||||
get_vertex_index_map() const
|
get_vertex_index_map() const
|
||||||
{
|
{
|
||||||
is_imap_in_use.set(1);
|
is_imap_in_use.set(1);
|
||||||
initialize_vertex_indices();
|
initialize_vertex_indices();
|
||||||
|
|
||||||
return bind_property_maps(vimap, make_property_map(vertex_indices) );
|
return make_compose_property_map(vimap, make_property_map(vertex_indices) );
|
||||||
}
|
}
|
||||||
|
|
||||||
Property_map_binder<HIM, typename Pointer_property_map<typename boost::property_traits<HIM>::value_type >::type>
|
Compose_property_map<HIM, typename Pointer_property_map<typename boost::property_traits<HIM>::value_type >::type>
|
||||||
get_halfedge_index_map() const
|
get_halfedge_index_map() const
|
||||||
{
|
{
|
||||||
is_imap_in_use.set(2);
|
is_imap_in_use.set(2);
|
||||||
initialize_halfedge_indices();
|
initialize_halfedge_indices();
|
||||||
|
|
||||||
return bind_property_maps(himap, make_property_map(halfedge_indices) );
|
return make_compose_property_map(himap, make_property_map(halfedge_indices) );
|
||||||
}
|
}
|
||||||
|
|
||||||
/// returns `true` if around any vertex of a selected face there is at most a single umbrella
|
/// returns `true` if around any vertex of a selected face there is at most a single umbrella
|
||||||
|
|
@ -1322,7 +1322,7 @@ struct property_map<CGAL::Face_filtered_graph<Graph, FIMap, VIMap, HIMap>, boost
|
||||||
typedef CGAL::Face_filtered_graph<Graph, FIMap, VIMap, HIMap> FFG;
|
typedef CGAL::Face_filtered_graph<Graph, FIMap, VIMap, HIMap> FFG;
|
||||||
typedef typename FFG::FIM FIM;
|
typedef typename FFG::FIM FIM;
|
||||||
|
|
||||||
typedef typename CGAL::Property_map_binder<FIM,
|
typedef typename CGAL::Compose_property_map<FIM,
|
||||||
typename CGAL::Pointer_property_map<
|
typename CGAL::Pointer_property_map<
|
||||||
typename boost::property_traits<FIM>::value_type>::type> type;
|
typename boost::property_traits<FIM>::value_type>::type> type;
|
||||||
typedef type const_type;
|
typedef type const_type;
|
||||||
|
|
@ -1334,7 +1334,7 @@ struct property_map<CGAL::Face_filtered_graph<Graph, FIMap, VIMap, HIMap>, boost
|
||||||
typedef CGAL::Face_filtered_graph<Graph, FIMap, VIMap, HIMap> FFG;
|
typedef CGAL::Face_filtered_graph<Graph, FIMap, VIMap, HIMap> FFG;
|
||||||
typedef typename FFG::VIM VIM;
|
typedef typename FFG::VIM VIM;
|
||||||
|
|
||||||
typedef typename CGAL::Property_map_binder<VIM,
|
typedef typename CGAL::Compose_property_map<VIM,
|
||||||
typename CGAL::Pointer_property_map<
|
typename CGAL::Pointer_property_map<
|
||||||
typename boost::property_traits<VIM>::value_type>::type> type;
|
typename boost::property_traits<VIM>::value_type>::type> type;
|
||||||
typedef type const_type;
|
typedef type const_type;
|
||||||
|
|
@ -1346,7 +1346,7 @@ struct property_map<CGAL::Face_filtered_graph<Graph, FIMap, VIMap, HIMap>, boost
|
||||||
typedef CGAL::Face_filtered_graph<Graph, FIMap, VIMap, HIMap> FFG;
|
typedef CGAL::Face_filtered_graph<Graph, FIMap, VIMap, HIMap> FFG;
|
||||||
typedef typename FFG::HIM HIM;
|
typedef typename FFG::HIM HIM;
|
||||||
|
|
||||||
typedef typename CGAL::Property_map_binder<HIM,
|
typedef typename CGAL::Compose_property_map<HIM,
|
||||||
typename CGAL::Pointer_property_map<
|
typename CGAL::Pointer_property_map<
|
||||||
typename boost::property_traits<HIM>::value_type>::type> type;
|
typename boost::property_traits<HIM>::value_type>::type> type;
|
||||||
typedef type const_type;
|
typedef type const_type;
|
||||||
|
|
|
||||||
|
|
@ -201,6 +201,13 @@ bool read_polygon_mesh(const std::string& fname,
|
||||||
* \cgalParamExtra{This parameter is only meaningful while using \ascii encoding.}
|
* \cgalParamExtra{This parameter is only meaningful while using \ascii encoding.}
|
||||||
* \cgalParamNEnd
|
* \cgalParamNEnd
|
||||||
*
|
*
|
||||||
|
* \cgalParamNBegin{use_binary_mode}
|
||||||
|
* \cgalParamDescription{indicates whether data should be written in binary (`true`) or in \ascii (`false`)}
|
||||||
|
* \cgalParamType{Boolean}
|
||||||
|
* \cgalParamDefault{`true`}
|
||||||
|
* \cgalParamExtra{This parameter is only meaningful for formats that support binary encoding.}
|
||||||
|
* \cgalParamNEnd
|
||||||
|
*
|
||||||
* \cgalParamNBegin{verbose}
|
* \cgalParamNBegin{verbose}
|
||||||
* \cgalParamDescription{whether extra information is printed when an incident occurs during reading}
|
* \cgalParamDescription{whether extra information is printed when an incident occurs during reading}
|
||||||
* \cgalParamType{Boolean}
|
* \cgalParamType{Boolean}
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,8 @@
|
||||||
#include <CGAL/iterator.h>
|
#include <CGAL/iterator.h>
|
||||||
#include <CGAL/Kernel_traits.h>
|
#include <CGAL/Kernel_traits.h>
|
||||||
#include <CGAL/Origin.h>
|
#include <CGAL/Origin.h>
|
||||||
|
#include <CGAL/iterator.h>
|
||||||
|
#include <CGAL/Default.h>
|
||||||
#include <CGAL/Named_function_parameters.h>
|
#include <CGAL/Named_function_parameters.h>
|
||||||
#include <CGAL/property_map.h>
|
#include <CGAL/property_map.h>
|
||||||
|
|
||||||
|
|
@ -276,34 +278,37 @@ public:
|
||||||
typedef typename CGAL::Identity_property_map<const Dummy_point> const_type;
|
typedef typename CGAL::Identity_property_map<const Dummy_point> const_type;
|
||||||
};
|
};
|
||||||
|
|
||||||
template <class PointRange, class NamedParameters, typename NP_TAG = internal_np::point_t>
|
template <class PointRange, class NamedParameters, class PointMap = Default, class NormalMap = Default>
|
||||||
struct Point_set_processing_3_np_helper
|
struct Point_set_processing_3_np_helper
|
||||||
{
|
{
|
||||||
typedef typename std::iterator_traits<typename PointRange::iterator>::value_type Value_type;
|
typedef typename std::iterator_traits<typename PointRange::iterator>::value_type Value_type;
|
||||||
typedef CGAL::Identity_property_map<Value_type> DefaultPMap;
|
typedef typename Default::Get<PointMap, CGAL::Identity_property_map<Value_type>>::type DefaultPMap;
|
||||||
typedef CGAL::Identity_property_map<const Value_type> DefaultConstPMap;
|
typedef typename Default::Get<PointMap, CGAL::Identity_property_map<const Value_type>>::type DefaultConstPMap;
|
||||||
|
|
||||||
typedef typename internal_np::Lookup_named_param_def<NP_TAG,
|
typedef typename internal_np::Lookup_named_param_def<internal_np::point_t,
|
||||||
NamedParameters,
|
NamedParameters,DefaultPMap> ::type Point_map; // public
|
||||||
DefaultPMap>::type Point_map;
|
typedef typename internal_np::Lookup_named_param_def<internal_np::point_t,
|
||||||
typedef typename internal_np::Lookup_named_param_def<NP_TAG,
|
NamedParameters,DefaultConstPMap> ::type Const_point_map; // public
|
||||||
NamedParameters,
|
|
||||||
DefaultConstPMap>::type Const_point_map;
|
|
||||||
|
|
||||||
typedef typename boost::property_traits<Point_map>::value_type Point;
|
typedef typename boost::property_traits<Point_map>::value_type Point;
|
||||||
typedef typename Kernel_traits<Point>::Kernel Default_geom_traits;
|
typedef typename Kernel_traits<Point>::Kernel Default_geom_traits;
|
||||||
|
|
||||||
typedef typename internal_np::Lookup_named_param_def<internal_np::geom_traits_t,
|
typedef typename internal_np::Lookup_named_param_def <
|
||||||
|
internal_np::geom_traits_t,
|
||||||
NamedParameters,
|
NamedParameters,
|
||||||
Default_geom_traits>::type Geom_traits;
|
Default_geom_traits
|
||||||
|
> ::type Geom_traits; // public
|
||||||
|
|
||||||
typedef typename Geom_traits::FT FT;
|
typedef typename Geom_traits::FT FT; // public
|
||||||
|
|
||||||
typedef Constant_property_map<Value_type, typename Geom_traits::Vector_3> DummyNormalMap;
|
typedef Constant_property_map<Value_type, typename Geom_traits::Vector_3> DummyNormalMap;
|
||||||
|
typedef typename Default::Get<NormalMap, DummyNormalMap>::type DefaultNMap;
|
||||||
|
|
||||||
typedef typename internal_np::Lookup_named_param_def<internal_np::normal_t,
|
typedef typename internal_np::Lookup_named_param_def<
|
||||||
|
internal_np::normal_t,
|
||||||
NamedParameters,
|
NamedParameters,
|
||||||
DummyNormalMap>::type Normal_map;
|
DefaultNMap
|
||||||
|
> ::type Normal_map; // public
|
||||||
|
|
||||||
static Point_map get_point_map(PointRange&, const NamedParameters& np)
|
static Point_map get_point_map(PointRange&, const NamedParameters& np)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -19,21 +19,32 @@
|
||||||
#include <CGAL/Random.h>
|
#include <CGAL/Random.h>
|
||||||
#include <CGAL/boost/graph/helpers.h>
|
#include <CGAL/boost/graph/helpers.h>
|
||||||
|
|
||||||
namespace CGAL
|
namespace CGAL {
|
||||||
{
|
|
||||||
|
|
||||||
// Default color functor; user can change it to have its own face color
|
// Default color functor; user can change it to have its own face color
|
||||||
struct DefaultColorFunctorFaceGraph
|
struct DefaultColorFunctorFaceGraph
|
||||||
{
|
{
|
||||||
template<typename Graph>
|
template<typename Graph>
|
||||||
CGAL::IO::Color operator()(const Graph&,
|
CGAL::IO::Color operator()(const Graph& /*g*/,
|
||||||
typename boost::graph_traits<Graph>::face_descriptor fh) const
|
typename boost::graph_traits<Graph>::face_descriptor /*f*/) const
|
||||||
{
|
{
|
||||||
if (fh==boost::graph_traits<Graph>::null_face()) // use to get the mono color
|
|
||||||
return CGAL::IO::Color(100, 125, 200); // R G B between 0-255
|
|
||||||
|
|
||||||
return get_random_color(CGAL::get_default_random());
|
return get_random_color(CGAL::get_default_random());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// edges and vertices are black by default
|
||||||
|
template<typename Graph>
|
||||||
|
CGAL::IO::Color operator()(const Graph& /*g*/,
|
||||||
|
typename boost::graph_traits<Graph>::edge_descriptor /*e*/) const
|
||||||
|
{
|
||||||
|
return IO::black();
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename Graph>
|
||||||
|
CGAL::IO::Color operator()(const Graph& /*g*/,
|
||||||
|
typename boost::graph_traits<Graph>::vertex_descriptor /*v*/) const
|
||||||
|
{
|
||||||
|
return IO::black();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
class SimpleFaceGraphViewerQt : public Basic_viewer_qt
|
class SimpleFaceGraphViewerQt : public Basic_viewer_qt
|
||||||
|
|
@ -48,28 +59,28 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Construct the viewer.
|
/// Construct the viewer.
|
||||||
/// @param amesh the surface mesh to view
|
/// @param g the face graph to view
|
||||||
/// @param title the title of the window
|
/// @param title the title of the window
|
||||||
/// @param anofaces if true, do not draw faces (faces are not computed; this can be
|
/// @param anofaces if true, do not draw faces (faces are not computed; this can be
|
||||||
/// useful for very big object where this time could be long)
|
/// useful for very big objects where this time could be long)
|
||||||
template <typename SM>
|
template <typename Graph>
|
||||||
SimpleFaceGraphViewerQt(QWidget* parent,
|
SimpleFaceGraphViewerQt(QWidget* parent,
|
||||||
const SM& amesh,
|
const Graph& g,
|
||||||
const char* title="Basic Surface_mesh Viewer",
|
const char* title="Basic Face Graph Viewer",
|
||||||
bool anofaces=false) :
|
bool anofaces=false) :
|
||||||
SimpleFaceGraphViewerQt(parent, amesh, title, anofaces, DefaultColorFunctorFaceGraph())
|
SimpleFaceGraphViewerQt(parent, g, title, anofaces, DefaultColorFunctorFaceGraph())
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename SM, typename ColorFunctor>
|
template <typename Graph, typename ColorFunctor>
|
||||||
SimpleFaceGraphViewerQt(QWidget* parent,
|
SimpleFaceGraphViewerQt(QWidget* parent,
|
||||||
const SM& amesh,
|
const Graph& g,
|
||||||
const char* title,
|
const char* title,
|
||||||
bool anofaces,
|
bool anofaces,
|
||||||
ColorFunctor fcolor) :
|
ColorFunctor fcolor) :
|
||||||
// First draw: no vertex; edges, faces; mono-color; inverse normal
|
// First draw: no vertex; edges, faces; mono-color; inverse normal
|
||||||
Base(parent, title, false, true, true, true, false),
|
Base(parent, title, false, true, true, true, false),
|
||||||
m_compute_elements_impl(compute_elements_functor(amesh, anofaces, fcolor))
|
m_compute_elements_impl(compute_elements_functor(g, anofaces, fcolor))
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -82,43 +93,42 @@ public:
|
||||||
m_compute_elements_impl();
|
m_compute_elements_impl();
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename SM, typename ColorFunctor>
|
template <typename Graph, typename ColorFunctor>
|
||||||
void set_face_graph(const SM& amesh,
|
void set_face_graph(const Graph& g,
|
||||||
bool anofaces,
|
bool anofaces,
|
||||||
ColorFunctor fcolor) {
|
ColorFunctor fcolor) {
|
||||||
m_compute_elements_impl = compute_elements_functor(amesh, anofaces, fcolor);
|
m_compute_elements_impl = compute_elements_functor(g, anofaces, fcolor);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename SM, typename ColorFunctor>
|
template <typename Graph, typename ColorFunctor>
|
||||||
void set_face_graph(const SM& amesh,
|
void set_face_graph(const Graph& g,
|
||||||
bool anofaces=false) {
|
bool anofaces=false) {
|
||||||
set_mesh(amesh, anofaces, DefaultColorFunctorFaceGraph());
|
set_mesh(g, anofaces, DefaultColorFunctorFaceGraph());
|
||||||
}
|
}
|
||||||
protected:
|
protected:
|
||||||
template <typename SM, typename ColorFunctor>
|
template <typename Graph, typename ColorFunctor>
|
||||||
std::function<void()>
|
std::function<void()>
|
||||||
compute_elements_functor(const SM& sm,
|
compute_elements_functor(const Graph& g,
|
||||||
bool anofaces,
|
bool anofaces,
|
||||||
ColorFunctor fcolor)
|
ColorFunctor fcolor)
|
||||||
{
|
{
|
||||||
using Point =
|
using Point = typename boost::property_map_value<Graph, CGAL::vertex_point_t>::type;
|
||||||
typename boost::property_map_value<SM, CGAL::vertex_point_t>::type;
|
|
||||||
using Kernel = typename CGAL::Kernel_traits<Point>::Kernel;
|
using Kernel = typename CGAL::Kernel_traits<Point>::Kernel;
|
||||||
using Vector = typename Kernel::Vector_3;
|
using Vector = typename Kernel::Vector_3;
|
||||||
|
|
||||||
auto vnormals = get(CGAL::dynamic_vertex_property_t<Vector>(), sm);
|
auto vnormals = get(CGAL::dynamic_vertex_property_t<Vector>(), g);
|
||||||
auto point_pmap = get(CGAL::vertex_point, sm);
|
auto point_pmap = get(CGAL::vertex_point, g);
|
||||||
for (auto v : vertices(sm))
|
for (auto v : vertices(g))
|
||||||
{
|
{
|
||||||
Vector n(NULL_VECTOR);
|
Vector n(NULL_VECTOR);
|
||||||
int i=0;
|
int i=0;
|
||||||
for (auto h : halfedges_around_target(halfedge(v, sm), sm))
|
for (auto h : halfedges_around_target(halfedge(v, g), g))
|
||||||
{
|
{
|
||||||
if (!is_border(h, sm))
|
if (!is_border(h, g))
|
||||||
{
|
{
|
||||||
Vector ni = CGAL::cross_product(
|
Vector ni = CGAL::cross_product(
|
||||||
Vector(get(point_pmap, source(h, sm)), get(point_pmap, target(h, sm))),
|
Vector(get(point_pmap, source(h, g)), get(point_pmap, target(h, g))),
|
||||||
Vector(get(point_pmap, target(h, sm)), get(point_pmap, target(next(h, sm), sm))));
|
Vector(get(point_pmap, target(h, g)), get(point_pmap, target(next(h, g), g))));
|
||||||
if (ni != NULL_VECTOR)
|
if (ni != NULL_VECTOR)
|
||||||
{
|
{
|
||||||
n+=ni;
|
n+=ni;
|
||||||
|
|
@ -131,41 +141,41 @@ protected:
|
||||||
|
|
||||||
// This function return a lambda expression, type-erased in a
|
// This function return a lambda expression, type-erased in a
|
||||||
// `std::function<void()>` object.
|
// `std::function<void()>` object.
|
||||||
return [this, &sm, vnormals, anofaces, fcolor, point_pmap]()
|
return [this, &g, vnormals, anofaces, fcolor, point_pmap]()
|
||||||
{
|
{
|
||||||
this->clear();
|
this->clear();
|
||||||
|
|
||||||
if (!anofaces)
|
if (!anofaces)
|
||||||
{
|
{
|
||||||
for (auto fh: faces(sm))
|
for (auto fh: faces(g))
|
||||||
{
|
{
|
||||||
if (fh!=boost::graph_traits<SM>::null_face())
|
const CGAL::IO::Color& c = fcolor(g, fh);
|
||||||
{
|
|
||||||
CGAL::IO::Color c=fcolor(sm, fh);
|
|
||||||
face_begin(c);
|
face_begin(c);
|
||||||
auto hd=halfedge(fh, sm);
|
auto hd=halfedge(fh, g);
|
||||||
const auto first_hd = hd;
|
const auto first_hd = hd;
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
auto v = source(hd, sm);
|
auto v = source(hd, g);
|
||||||
add_point_in_face(get(point_pmap, v), get(vnormals, v));
|
add_point_in_face(get(point_pmap, v), get(vnormals, v));
|
||||||
hd=next(hd, sm);
|
hd=next(hd, g);
|
||||||
}
|
}
|
||||||
while(hd!=first_hd);
|
while(hd!=first_hd);
|
||||||
face_end();
|
face_end();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (auto e: edges(g))
|
||||||
|
{
|
||||||
|
const CGAL::IO::Color& c = fcolor(g, e);
|
||||||
|
add_segment(get(point_pmap, source(halfedge(e, g), g)),
|
||||||
|
get(point_pmap, target(halfedge(e, g), g)),
|
||||||
|
c);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (auto e: edges(sm))
|
for (auto v: vertices(g))
|
||||||
{
|
{
|
||||||
add_segment(get(point_pmap, source(halfedge(e, sm), sm)),
|
const CGAL::IO::Color& c = fcolor(g, v);
|
||||||
get(point_pmap, target(halfedge(e, sm), sm)));
|
this->add_point(get(point_pmap, v), c);
|
||||||
}
|
|
||||||
|
|
||||||
for (auto v: vertices(sm))
|
|
||||||
{
|
|
||||||
this->add_point(get(point_pmap, v));
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -7,100 +7,44 @@ project(BGL_Tests)
|
||||||
# CGAL and its components
|
# CGAL and its components
|
||||||
find_package(CGAL REQUIRED)
|
find_package(CGAL REQUIRED)
|
||||||
|
|
||||||
# Boost and its components
|
create_single_source_cgal_program("test_split.cpp")
|
||||||
find_package(Boost)
|
create_single_source_cgal_program("next.cpp")
|
||||||
|
create_single_source_cgal_program("test_circulator.cpp")
|
||||||
if(NOT Boost_FOUND)
|
create_single_source_cgal_program("test_Gwdwg.cpp")
|
||||||
message(
|
create_single_source_cgal_program("test_bgl_dual.cpp")
|
||||||
STATUS "This project requires the Boost library, and will not be compiled.")
|
create_single_source_cgal_program("graph_concept_Polyhedron_3.cpp")
|
||||||
return()
|
create_single_source_cgal_program("graph_concept_Dual.cpp")
|
||||||
endif()
|
create_single_source_cgal_program("graph_concept_Triangulation_2.cpp")
|
||||||
|
create_single_source_cgal_program("graph_concept_Surface_mesh.cpp")
|
||||||
|
create_single_source_cgal_program("graph_concept_Seam_mesh_Surface_mesh.cpp")
|
||||||
|
create_single_source_cgal_program("graph_concept_Gwdwg_Surface_mesh.cpp")
|
||||||
|
create_single_source_cgal_program("graph_concept_Linear_cell_complex.cpp")
|
||||||
|
create_single_source_cgal_program("graph_concept_Arrangement_2.cpp")
|
||||||
|
create_single_source_cgal_program("graph_concept_Derived.cpp" )
|
||||||
|
create_single_source_cgal_program("test_clear.cpp" )
|
||||||
|
create_single_source_cgal_program("test_helpers.cpp")
|
||||||
|
create_single_source_cgal_program("test_Has_member_clear.cpp")
|
||||||
|
create_single_source_cgal_program("test_Has_member_id.cpp")
|
||||||
|
create_single_source_cgal_program("test_bgl_read_write.cpp")
|
||||||
|
create_single_source_cgal_program("graph_concept_Face_filtered_graph.cpp")
|
||||||
|
create_single_source_cgal_program("test_Manifold_face_removal.cpp")
|
||||||
|
create_single_source_cgal_program("test_Regularize_face_selection_borders.cpp")
|
||||||
|
create_single_source_cgal_program("test_Face_filtered_graph.cpp")
|
||||||
|
create_single_source_cgal_program("test_Euler_operations.cpp")
|
||||||
|
create_single_source_cgal_program("test_test_face.cpp" )
|
||||||
|
create_single_source_cgal_program("test_Collapse_edge.cpp" )
|
||||||
|
create_single_source_cgal_program("test_Collapse_edge_with_constraints.cpp" )
|
||||||
|
create_single_source_cgal_program("test_graph_traits.cpp")
|
||||||
|
create_single_source_cgal_program("test_Properties.cpp")
|
||||||
|
create_single_source_cgal_program("bench_read_from_stream_vs_add_face_and_add_faces.cpp")
|
||||||
|
create_single_source_cgal_program("graph_traits_inheritance.cpp" )
|
||||||
|
create_single_source_cgal_program("test_deprecated_io.cpp")
|
||||||
|
|
||||||
find_package(OpenMesh QUIET)
|
find_package(OpenMesh QUIET)
|
||||||
|
|
||||||
if(OpenMesh_FOUND)
|
if(OpenMesh_FOUND)
|
||||||
include(UseOpenMesh)
|
include(UseOpenMesh)
|
||||||
add_definitions(-DCGAL_USE_OPENMESH)
|
add_definitions(-DCGAL_USE_OPENMESH)
|
||||||
else()
|
|
||||||
message(STATUS "Tests that use OpenMesh will not be compiled.")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# include for local package
|
|
||||||
|
|
||||||
# Creating entries for all .cpp/.C files with "main" routine
|
|
||||||
# ##########################################################
|
|
||||||
|
|
||||||
if(OpenMesh_FOUND)
|
|
||||||
create_single_source_cgal_program("graph_concept_OpenMesh.cpp")
|
|
||||||
target_link_libraries(graph_concept_OpenMesh PRIVATE ${OPENMESH_LIBRARIES})
|
|
||||||
endif()
|
|
||||||
|
|
||||||
create_single_source_cgal_program("test_split.cpp")
|
|
||||||
|
|
||||||
create_single_source_cgal_program("next.cpp")
|
|
||||||
|
|
||||||
create_single_source_cgal_program("test_circulator.cpp")
|
|
||||||
|
|
||||||
create_single_source_cgal_program("test_Gwdwg.cpp")
|
|
||||||
|
|
||||||
create_single_source_cgal_program("test_bgl_dual.cpp")
|
|
||||||
|
|
||||||
create_single_source_cgal_program("graph_concept_Polyhedron_3.cpp")
|
|
||||||
|
|
||||||
create_single_source_cgal_program("graph_concept_Dual.cpp")
|
|
||||||
|
|
||||||
create_single_source_cgal_program("graph_concept_Triangulation_2.cpp")
|
|
||||||
|
|
||||||
create_single_source_cgal_program("graph_concept_Surface_mesh.cpp")
|
|
||||||
|
|
||||||
create_single_source_cgal_program("graph_concept_Seam_mesh_Surface_mesh.cpp")
|
|
||||||
|
|
||||||
create_single_source_cgal_program("graph_concept_Gwdwg_Surface_mesh.cpp")
|
|
||||||
|
|
||||||
create_single_source_cgal_program("graph_concept_Linear_cell_complex.cpp")
|
|
||||||
|
|
||||||
create_single_source_cgal_program("graph_concept_Arrangement_2.cpp")
|
|
||||||
|
|
||||||
create_single_source_cgal_program( "graph_concept_Derived.cpp" )
|
|
||||||
|
|
||||||
create_single_source_cgal_program( "test_clear.cpp" )
|
|
||||||
|
|
||||||
create_single_source_cgal_program("test_helpers.cpp")
|
|
||||||
|
|
||||||
create_single_source_cgal_program("test_Has_member_clear.cpp")
|
|
||||||
|
|
||||||
create_single_source_cgal_program("test_Has_member_id.cpp")
|
|
||||||
|
|
||||||
create_single_source_cgal_program("test_bgl_read_write.cpp")
|
|
||||||
|
|
||||||
create_single_source_cgal_program("graph_concept_Face_filtered_graph.cpp")
|
|
||||||
|
|
||||||
create_single_source_cgal_program("test_Manifold_face_removal.cpp")
|
|
||||||
|
|
||||||
create_single_source_cgal_program("test_Regularize_face_selection_borders.cpp")
|
|
||||||
|
|
||||||
create_single_source_cgal_program("test_Face_filtered_graph.cpp")
|
|
||||||
|
|
||||||
create_single_source_cgal_program("test_Euler_operations.cpp")
|
|
||||||
|
|
||||||
create_single_source_cgal_program( "test_test_face.cpp" )
|
|
||||||
|
|
||||||
create_single_source_cgal_program( "test_Collapse_edge.cpp" )
|
|
||||||
|
|
||||||
create_single_source_cgal_program( "test_Collapse_edge_with_constraints.cpp" )
|
|
||||||
|
|
||||||
create_single_source_cgal_program("test_graph_traits.cpp")
|
|
||||||
|
|
||||||
create_single_source_cgal_program("test_Properties.cpp")
|
|
||||||
|
|
||||||
create_single_source_cgal_program(
|
|
||||||
"bench_read_from_stream_vs_add_face_and_add_faces.cpp")
|
|
||||||
|
|
||||||
create_single_source_cgal_program( "graph_traits_inheritance.cpp" )
|
|
||||||
|
|
||||||
create_single_source_cgal_program("test_deprecated_io.cpp")
|
|
||||||
|
|
||||||
if(OpenMesh_FOUND)
|
|
||||||
target_link_libraries(test_clear PRIVATE ${OPENMESH_LIBRARIES})
|
target_link_libraries(test_clear PRIVATE ${OPENMESH_LIBRARIES})
|
||||||
target_compile_definitions(test_clear PRIVATE -DCGAL_USE_OPENMESH)
|
target_compile_definitions(test_clear PRIVATE -DCGAL_USE_OPENMESH)
|
||||||
target_link_libraries(test_Euler_operations PRIVATE ${OPENMESH_LIBRARIES})
|
target_link_libraries(test_Euler_operations PRIVATE ${OPENMESH_LIBRARIES})
|
||||||
|
|
@ -115,6 +59,11 @@ if(OpenMesh_FOUND)
|
||||||
target_compile_definitions(test_Properties PRIVATE -DCGAL_USE_OPENMESH)
|
target_compile_definitions(test_Properties PRIVATE -DCGAL_USE_OPENMESH)
|
||||||
target_link_libraries(test_bgl_read_write PRIVATE ${OPENMESH_LIBRARIES})
|
target_link_libraries(test_bgl_read_write PRIVATE ${OPENMESH_LIBRARIES})
|
||||||
target_compile_definitions(test_bgl_read_write PRIVATE -DCGAL_USE_OPENMESH)
|
target_compile_definitions(test_bgl_read_write PRIVATE -DCGAL_USE_OPENMESH)
|
||||||
|
|
||||||
|
create_single_source_cgal_program("graph_concept_OpenMesh.cpp")
|
||||||
|
target_link_libraries(graph_concept_OpenMesh PRIVATE ${OPENMESH_LIBRARIES})
|
||||||
|
else()
|
||||||
|
message(STATUS "NOTICE: Tests that use OpenMesh will not be compiled.")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
find_package(VTK QUIET COMPONENTS vtkCommonCore vtkIOCore vtkIOLegacy vtkIOXML vtkFiltersCore vtkFiltersSources)
|
find_package(VTK QUIET COMPONENTS vtkCommonCore vtkIOCore vtkIOLegacy vtkIOXML vtkFiltersCore vtkFiltersSources)
|
||||||
|
|
@ -150,5 +99,5 @@ if(3MF_LIBRARIES AND 3MF_INCLUDE_DIR AND EXISTS "${3MF_INCLUDE_DIR}/Model/COM/N
|
||||||
target_link_libraries(test_3mf_to_sm PRIVATE ${3MF_LIBRARIES})
|
target_link_libraries(test_3mf_to_sm PRIVATE ${3MF_LIBRARIES})
|
||||||
target_compile_definitions(test_3mf_to_sm PRIVATE -DCGAL_LINKED_WITH_3MF)
|
target_compile_definitions(test_3mf_to_sm PRIVATE -DCGAL_LINKED_WITH_3MF)
|
||||||
else()
|
else()
|
||||||
message(STATUS "NOTICE : This program requires the lib3MF library, and will not be compiled.")
|
message(STATUS "NOTICE: The test 'test_3mf_to_sm' requires the lib3MF library, and will not be compiled.")
|
||||||
endif()
|
endif()
|
||||||
|
|
|
||||||
|
|
@ -6,8 +6,6 @@ project(Barycentric_coordinates_2_Benchmarks)
|
||||||
cmake_minimum_required(VERSION 3.1...3.23)
|
cmake_minimum_required(VERSION 3.1...3.23)
|
||||||
|
|
||||||
find_package(CGAL REQUIRED COMPONENTS Core)
|
find_package(CGAL REQUIRED COMPONENTS Core)
|
||||||
include(${CGAL_USE_FILE})
|
|
||||||
include(CGAL_CreateSingleSourceCGALProgram)
|
|
||||||
|
|
||||||
create_single_source_cgal_program("benchmark_segment_coordinates.cpp")
|
create_single_source_cgal_program("benchmark_segment_coordinates.cpp")
|
||||||
create_single_source_cgal_program("benchmark_triangle_coordinates.cpp")
|
create_single_source_cgal_program("benchmark_triangle_coordinates.cpp")
|
||||||
|
|
@ -19,12 +17,10 @@ create_single_source_cgal_program("benchmark_mv_34_vertices.cpp")
|
||||||
find_package(Eigen3 3.1.0 QUIET) # (3.1.0 or greater)
|
find_package(Eigen3 3.1.0 QUIET) # (3.1.0 or greater)
|
||||||
include(CGAL_Eigen3_support)
|
include(CGAL_Eigen3_support)
|
||||||
if(TARGET CGAL::Eigen3_support)
|
if(TARGET CGAL::Eigen3_support)
|
||||||
|
|
||||||
create_single_source_cgal_program("benchmark_hm_4_vertices.cpp")
|
create_single_source_cgal_program("benchmark_hm_4_vertices.cpp")
|
||||||
target_link_libraries(benchmark_hm_4_vertices PUBLIC CGAL::Eigen3_support)
|
target_link_libraries(benchmark_hm_4_vertices PUBLIC CGAL::Eigen3_support)
|
||||||
create_single_source_cgal_program("benchmark_hm_n_vertices.cpp")
|
create_single_source_cgal_program("benchmark_hm_n_vertices.cpp")
|
||||||
target_link_libraries(benchmark_hm_n_vertices PUBLIC CGAL::Eigen3_support)
|
target_link_libraries(benchmark_hm_n_vertices PUBLIC CGAL::Eigen3_support)
|
||||||
|
|
||||||
else()
|
else()
|
||||||
message(NOTICE "Several coordinates require the Eigen library, and will not be compiled.")
|
message(STATUS "NOTICE: Several benchmarks require the Eigen library, and will not be compiled.")
|
||||||
endif()
|
endif()
|
||||||
|
|
|
||||||
|
|
@ -20,14 +20,12 @@ create_single_source_cgal_program("deprecated_coordinates.cpp")
|
||||||
find_package(Eigen3 3.1.0 QUIET) # (3.1.0 or greater)
|
find_package(Eigen3 3.1.0 QUIET) # (3.1.0 or greater)
|
||||||
include(CGAL_Eigen3_support)
|
include(CGAL_Eigen3_support)
|
||||||
if(TARGET CGAL::Eigen3_support)
|
if(TARGET CGAL::Eigen3_support)
|
||||||
|
|
||||||
create_single_source_cgal_program("affine_coordinates.cpp")
|
create_single_source_cgal_program("affine_coordinates.cpp")
|
||||||
target_link_libraries(affine_coordinates PUBLIC CGAL::Eigen3_support)
|
target_link_libraries(affine_coordinates PUBLIC CGAL::Eigen3_support)
|
||||||
create_single_source_cgal_program("harmonic_coordinates.cpp")
|
create_single_source_cgal_program("harmonic_coordinates.cpp")
|
||||||
target_link_libraries(harmonic_coordinates PUBLIC CGAL::Eigen3_support)
|
target_link_libraries(harmonic_coordinates PUBLIC CGAL::Eigen3_support)
|
||||||
create_single_source_cgal_program("shape_deformation.cpp")
|
create_single_source_cgal_program("shape_deformation.cpp")
|
||||||
target_link_libraries(shape_deformation PUBLIC CGAL::Eigen3_support)
|
target_link_libraries(shape_deformation PUBLIC CGAL::Eigen3_support)
|
||||||
|
|
||||||
else()
|
else()
|
||||||
message(NOTICE "Several coordinates require the Eigen library, and will not be compiled.")
|
message(STATUS "NOTICE: Several examples require the Eigen library, and will not be compiled.")
|
||||||
endif()
|
endif()
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,6 @@ create_single_source_cgal_program("test_dh_deprecated_api.cpp")
|
||||||
find_package(Eigen3 3.1.0 QUIET) # (3.1.0 or greater)
|
find_package(Eigen3 3.1.0 QUIET) # (3.1.0 or greater)
|
||||||
include(CGAL_Eigen3_support)
|
include(CGAL_Eigen3_support)
|
||||||
if(TARGET CGAL::Eigen3_support)
|
if(TARGET CGAL::Eigen3_support)
|
||||||
|
|
||||||
create_single_source_cgal_program("test_hm_unit_square.cpp")
|
create_single_source_cgal_program("test_hm_unit_square.cpp")
|
||||||
target_link_libraries(test_hm_unit_square PUBLIC CGAL::Eigen3_support)
|
target_link_libraries(test_hm_unit_square PUBLIC CGAL::Eigen3_support)
|
||||||
create_single_source_cgal_program("test_hm_const_linear_precision.cpp")
|
create_single_source_cgal_program("test_hm_const_linear_precision.cpp")
|
||||||
|
|
@ -56,7 +55,6 @@ if(TARGET CGAL::Eigen3_support)
|
||||||
target_link_libraries(test_bc_projection_traits PUBLIC CGAL::Eigen3_support)
|
target_link_libraries(test_bc_projection_traits PUBLIC CGAL::Eigen3_support)
|
||||||
create_single_source_cgal_program("test_bc_all_coordinates.cpp")
|
create_single_source_cgal_program("test_bc_all_coordinates.cpp")
|
||||||
target_link_libraries(test_bc_all_coordinates PUBLIC CGAL::Eigen3_support)
|
target_link_libraries(test_bc_all_coordinates PUBLIC CGAL::Eigen3_support)
|
||||||
|
|
||||||
else()
|
else()
|
||||||
message(NOTICE "Several coordinates require the Eigen library, and will not be compiled.")
|
message(STATUS "NOTICE: Several tests require the Eigen library, and will not be compiled.")
|
||||||
endif()
|
endif()
|
||||||
|
|
|
||||||
|
|
@ -737,7 +737,7 @@ namespace CGAL {
|
||||||
/*! determines whether two polygons intersect in their interior.
|
/*! determines whether two polygons intersect in their interior.
|
||||||
* \param pgn1 the 1st input polygon.
|
* \param pgn1 the 1st input polygon.
|
||||||
* \param pgn2 the 2nd input polygon.
|
* \param pgn2 the 2nd input polygon.
|
||||||
* \return `true` if `pgn1` and `pgn2` intersect in their interiro and `false`
|
* \return `true` if `pgn1` and `pgn2` intersect in their interior and `false`
|
||||||
* otherwise.
|
* otherwise.
|
||||||
*/
|
*/
|
||||||
template <typename Kernel, typename Container>
|
template <typename Kernel, typename Container>
|
||||||
|
|
@ -755,7 +755,7 @@ bool do_intersect(const Polygon_2<Kernel, Container>& pgn1,
|
||||||
* bso_ssectraits_sel for more information.
|
* bso_ssectraits_sel for more information.
|
||||||
* \param pgn1 the 1st input polygon.
|
* \param pgn1 the 1st input polygon.
|
||||||
* \param pgn2 the 2nd input polygon.
|
* \param pgn2 the 2nd input polygon.
|
||||||
* \return `true` if `pgn1` and `pgn2` intersect in their interiro and `false`
|
* \return `true` if `pgn1` and `pgn2` intersect in their interior and `false`
|
||||||
* otherwise.
|
* otherwise.
|
||||||
*/
|
*/
|
||||||
template <typename Kernel, typename Container, typename UsePolylines>
|
template <typename Kernel, typename Container, typename UsePolylines>
|
||||||
|
|
@ -766,7 +766,7 @@ bool do_intersect(const Polygon_2<Kernel, Container>& pgn1,
|
||||||
/*! determines whether two polygons intersect in their interior.
|
/*! determines whether two polygons intersect in their interior.
|
||||||
* \param pgn1 the 1st input polygon.
|
* \param pgn1 the 1st input polygon.
|
||||||
* \param pgn2 the 2nd input polygon.
|
* \param pgn2 the 2nd input polygon.
|
||||||
* \return `true` if `pgn1` and `pgn2` intersect in their interiro and `false`
|
* \return `true` if `pgn1` and `pgn2` intersect in their interior and `false`
|
||||||
* otherwise.
|
* otherwise.
|
||||||
*/
|
*/
|
||||||
template <typename Kernel, typename Container>
|
template <typename Kernel, typename Container>
|
||||||
|
|
@ -785,7 +785,7 @@ bool do_intersect(const Polygon_2<Kernel, Container>& pgn1,
|
||||||
* information.
|
* information.
|
||||||
* \param pgn1 the 1st input polygon.
|
* \param pgn1 the 1st input polygon.
|
||||||
* \param pgn2 the 2nd input polygon.
|
* \param pgn2 the 2nd input polygon.
|
||||||
* \return `true` if `pgn1` and `pgn2` intersect in their interiro and `false`
|
* \return `true` if `pgn1` and `pgn2` intersect in their interior and `false`
|
||||||
* otherwise.
|
* otherwise.
|
||||||
*/
|
*/
|
||||||
template <typename Kernel, typename Container, typename UsePolylines>
|
template <typename Kernel, typename Container, typename UsePolylines>
|
||||||
|
|
@ -796,7 +796,7 @@ bool do_intersect(const Polygon_2<Kernel, Container>& pgn1,
|
||||||
/*! determines whether two polygons intersect in their interior.
|
/*! determines whether two polygons intersect in their interior.
|
||||||
* \param pgn1 the 1st input polygon.
|
* \param pgn1 the 1st input polygon.
|
||||||
* \param pgn2 the 2nd input polygon.
|
* \param pgn2 the 2nd input polygon.
|
||||||
* \return `true` if `pgn1` and `pgn2` intersect in their interiro and `false`
|
* \return `true` if `pgn1` and `pgn2` intersect in their interior and `false`
|
||||||
* otherwise.
|
* otherwise.
|
||||||
*/
|
*/
|
||||||
template <typename Kernel, typename Container>
|
template <typename Kernel, typename Container>
|
||||||
|
|
@ -815,7 +815,7 @@ bool do_intersect(const Polygon_with_holes_2<Kernel, Container>& pgn1,
|
||||||
* information.
|
* information.
|
||||||
* \param pgn1 the 1st input polygon.
|
* \param pgn1 the 1st input polygon.
|
||||||
* \param pgn2 the 2nd input polygon.
|
* \param pgn2 the 2nd input polygon.
|
||||||
* \return `true` if `pgn1` and `pgn2` intersect in their interiro and `false`
|
* \return `true` if `pgn1` and `pgn2` intersect in their interior and `false`
|
||||||
* otherwise.
|
* otherwise.
|
||||||
*/
|
*/
|
||||||
template <typename Kernel, typename Container, typename UsePolylines>
|
template <typename Kernel, typename Container, typename UsePolylines>
|
||||||
|
|
@ -826,7 +826,7 @@ bool do_intersect(const Polygon_with_holes_2<Kernel, Container>& pgn1,
|
||||||
/*! determines whether two polygons with holes intersect in their interior.
|
/*! determines whether two polygons with holes intersect in their interior.
|
||||||
* \param pgn1 the 1st input polygon.
|
* \param pgn1 the 1st input polygon.
|
||||||
* \param pgn2 the 2nd input polygon.
|
* \param pgn2 the 2nd input polygon.
|
||||||
* \return `true` if `pgn1` and `pgn2` intersect in their interiro and `false`
|
* \return `true` if `pgn1` and `pgn2` intersect in their interior and `false`
|
||||||
* otherwise.
|
* otherwise.
|
||||||
*/
|
*/
|
||||||
template <typename Kernel, typename Container>
|
template <typename Kernel, typename Container>
|
||||||
|
|
@ -844,7 +844,7 @@ bool do_intersect(const Polygon_with_holes_2<Kernel, Container>& pgn1,
|
||||||
* \ref bso_ssectraits_sel for more information.
|
* \ref bso_ssectraits_sel for more information.
|
||||||
* \param pgn1 the 1st input polygon.
|
* \param pgn1 the 1st input polygon.
|
||||||
* \param pgn2 the 2nd input polygon.
|
* \param pgn2 the 2nd input polygon.
|
||||||
* \return `true` if `pgn1` and `pgn2` intersect in their interiro and `false`
|
* \return `true` if `pgn1` and `pgn2` intersect in their interior and `false`
|
||||||
* otherwise.
|
* otherwise.
|
||||||
*/
|
*/
|
||||||
template <typename Kernel, typename Container, typename UsePolylines>
|
template <typename Kernel, typename Container, typename UsePolylines>
|
||||||
|
|
@ -855,7 +855,7 @@ bool do_intersect(const Polygon_with_holes_2<Kernel, Container>& pgn1,
|
||||||
/*! determines whether two general polygons intersect in their interior.
|
/*! determines whether two general polygons intersect in their interior.
|
||||||
* \param pgn1 the 1st input polygon.
|
* \param pgn1 the 1st input polygon.
|
||||||
* \param pgn2 the 2nd input polygon.
|
* \param pgn2 the 2nd input polygon.
|
||||||
* \return `true` if `pgn1` and `pgn2` intersect in their interiro and `false`
|
* \return `true` if `pgn1` and `pgn2` intersect in their interior and `false`
|
||||||
* otherwise.
|
* otherwise.
|
||||||
* \pre `%ArrTraits` must be a model of the concept
|
* \pre `%ArrTraits` must be a model of the concept
|
||||||
* `ArrangementDirectionalXMonotoneTraits_2`.
|
* `ArrangementDirectionalXMonotoneTraits_2`.
|
||||||
|
|
@ -867,7 +867,7 @@ bool do_intersect(const General_polygon_2<ArrTraits>& pgn1,
|
||||||
/*! determines whether two general polygons intersect in their interior.
|
/*! determines whether two general polygons intersect in their interior.
|
||||||
* \param pgn1 the 1st input polygon.
|
* \param pgn1 the 1st input polygon.
|
||||||
* \param pgn2 the 2nd input polygon.
|
* \param pgn2 the 2nd input polygon.
|
||||||
* \return `true` if `pgn1` and `pgn2` intersect in their interiro and `false`
|
* \return `true` if `pgn1` and `pgn2` intersect in their interior and `false`
|
||||||
* otherwise.
|
* otherwise.
|
||||||
* \pre `%ArrTraits` must be a model of the concept
|
* \pre `%ArrTraits` must be a model of the concept
|
||||||
* `ArrangementDirectionalXMonotoneTraits_2`.
|
* `ArrangementDirectionalXMonotoneTraits_2`.
|
||||||
|
|
@ -880,7 +880,7 @@ do_intersect(const General_polygon_2<ArrTraits>& pgn1,
|
||||||
/*! determines whether two general polygons intersect in their interior.
|
/*! determines whether two general polygons intersect in their interior.
|
||||||
* \param pgn1 the 1st input polygon.
|
* \param pgn1 the 1st input polygon.
|
||||||
* \param pgn2 the 2nd input polygon.
|
* \param pgn2 the 2nd input polygon.
|
||||||
* \return `true` if `pgn1` and `pgn2` intersect in their interiro and `false`
|
* \return `true` if `pgn1` and `pgn2` intersect in their interior and `false`
|
||||||
* otherwise.
|
* otherwise.
|
||||||
* \pre `%ArrTraits` must be a model of the concept
|
* \pre `%ArrTraits` must be a model of the concept
|
||||||
* `ArrangementDirectionalXMonotoneTraits_2`.
|
* `ArrangementDirectionalXMonotoneTraits_2`.
|
||||||
|
|
@ -893,7 +893,7 @@ bool do_intersect(const General_polygon_with_holes_2<General_polygon_2<ArrTraits
|
||||||
* interior.
|
* interior.
|
||||||
* \param pgn1 the 1st input polygon.
|
* \param pgn1 the 1st input polygon.
|
||||||
* \param pgn2 the 2nd input polygon.
|
* \param pgn2 the 2nd input polygon.
|
||||||
* \return `true` if `pgn1` and `pgn2` intersect in their interiro and `false`
|
* \return `true` if `pgn1` and `pgn2` intersect in their interior and `false`
|
||||||
* otherwise.
|
* otherwise.
|
||||||
*/
|
*/
|
||||||
template <typename Polygon>
|
template <typename Polygon>
|
||||||
|
|
@ -1001,7 +1001,7 @@ bool do_intersect(InputIterator1 begin1, InputIterator1 end1,
|
||||||
* \param pgn1 the 1st input polygon.
|
* \param pgn1 the 1st input polygon.
|
||||||
* \param pgn2 the 2nd input polygon.
|
* \param pgn2 the 2nd input polygon.
|
||||||
* \param traits a traits object.
|
* \param traits a traits object.
|
||||||
* \return `true` if `pgn1` and `pgn2` intersect in their interiro and `false`
|
* \return `true` if `pgn1` and `pgn2` intersect in their interior and `false`
|
||||||
* otherwise.
|
* otherwise.
|
||||||
* \pre `GpsTraits` must be a model of the concept `GeneralPolygonSetTraits_2`.
|
* \pre `GpsTraits` must be a model of the concept `GeneralPolygonSetTraits_2`.
|
||||||
*/
|
*/
|
||||||
|
|
@ -1014,7 +1014,7 @@ bool do_intersect(const Polygon_2<Kernel, Container>& pgn1,
|
||||||
* \param pgn1 the 1st input polygon.
|
* \param pgn1 the 1st input polygon.
|
||||||
* \param pgn2 the 2nd input polygon.
|
* \param pgn2 the 2nd input polygon.
|
||||||
* \param traits a traits object.
|
* \param traits a traits object.
|
||||||
* \return `true` if `pgn1` and `pgn2` intersect in their interiro and `false`
|
* \return `true` if `pgn1` and `pgn2` intersect in their interior and `false`
|
||||||
* otherwise.
|
* otherwise.
|
||||||
* \pre `GpsTraits` must be a model of the concept `GeneralPolygonSetTraits_2`.
|
* \pre `GpsTraits` must be a model of the concept `GeneralPolygonSetTraits_2`.
|
||||||
*/
|
*/
|
||||||
|
|
@ -1028,7 +1028,7 @@ bool do_intersect(const Polygon_2<Kernel, Container>& pgn1,
|
||||||
* \param pgn1 the 1st input polygon.
|
* \param pgn1 the 1st input polygon.
|
||||||
* \param pgn2 the 2nd input polygon.
|
* \param pgn2 the 2nd input polygon.
|
||||||
* \param traits a traits object.
|
* \param traits a traits object.
|
||||||
* \return `true` if `pgn1` and `pgn2` intersect in their interiro and `false`
|
* \return `true` if `pgn1` and `pgn2` intersect in their interior and `false`
|
||||||
* otherwise.
|
* otherwise.
|
||||||
* \pre `GpsTraits` must be a model of the concept `GeneralPolygonSetTraits_2`.
|
* \pre `GpsTraits` must be a model of the concept `GeneralPolygonSetTraits_2`.
|
||||||
*/
|
*/
|
||||||
|
|
@ -1041,7 +1041,7 @@ bool do_intersect(const Polygon_with_holes_2<Kernel, Container>& pgn1,
|
||||||
* \param pgn1 the 1st input polygon.
|
* \param pgn1 the 1st input polygon.
|
||||||
* \param pgn2 the 2nd input polygon.
|
* \param pgn2 the 2nd input polygon.
|
||||||
* \param traits a traits object.
|
* \param traits a traits object.
|
||||||
* \return `true` if `pgn1` and `pgn2` intersect in their interiro and `false`
|
* \return `true` if `pgn1` and `pgn2` intersect in their interior and `false`
|
||||||
* otherwise.
|
* otherwise.
|
||||||
* \pre `GpsTraits` must be a model of the concept `GeneralPolygonSetTraits_2`.
|
* \pre `GpsTraits` must be a model of the concept `GeneralPolygonSetTraits_2`.
|
||||||
*/
|
*/
|
||||||
|
|
@ -1054,7 +1054,7 @@ bool do_intersect(const Polygon_with_holes_2<Kernel, Container>& pgn1,
|
||||||
* \param pgn1 the 1st input polygon.
|
* \param pgn1 the 1st input polygon.
|
||||||
* \param pgn2 the 2nd input polygon.
|
* \param pgn2 the 2nd input polygon.
|
||||||
* \param traits a traits object.
|
* \param traits a traits object.
|
||||||
* \return `true` if `pgn1` and `pgn2` intersect in their interiro and `false`
|
* \return `true` if `pgn1` and `pgn2` intersect in their interior and `false`
|
||||||
* otherwise.
|
* otherwise.
|
||||||
* \pre `GpsTraits` must be a model of the concept `GeneralPolygonSetTraits_2`.
|
* \pre `GpsTraits` must be a model of the concept `GeneralPolygonSetTraits_2`.
|
||||||
* \pre `%ArrTraits` must be a model of the concept
|
* \pre `%ArrTraits` must be a model of the concept
|
||||||
|
|
@ -1069,7 +1069,7 @@ bool do_intersect(const General_polygon_2<ArrTraits>& pgn1,
|
||||||
* \param pgn1 the 1st input polygon.
|
* \param pgn1 the 1st input polygon.
|
||||||
* \param pgn2 the 2nd input polygon.
|
* \param pgn2 the 2nd input polygon.
|
||||||
* \param traits a traits object.
|
* \param traits a traits object.
|
||||||
* \return `true` if `pgn1` and `pgn2` intersect in their interiro and `false`
|
* \return `true` if `pgn1` and `pgn2` intersect in their interior and `false`
|
||||||
* otherwise.
|
* otherwise.
|
||||||
* \pre `GpsTraits` must be a model of the concept `GeneralPolygonSetTraits_2`.
|
* \pre `GpsTraits` must be a model of the concept `GeneralPolygonSetTraits_2`.
|
||||||
* \pre `%ArrTraits` must be a model of the concept
|
* \pre `%ArrTraits` must be a model of the concept
|
||||||
|
|
@ -1085,7 +1085,7 @@ do_intersect(const General_polygon_2<ArrTraits>& pgn1,
|
||||||
* \param pgn1 the 1st input polygon.
|
* \param pgn1 the 1st input polygon.
|
||||||
* \param pgn2 the 2nd input polygon.
|
* \param pgn2 the 2nd input polygon.
|
||||||
* \param traits a traits object.
|
* \param traits a traits object.
|
||||||
* \return `true` if `pgn1` and `pgn2` intersect in their interiro and `false`
|
* \return `true` if `pgn1` and `pgn2` intersect in their interior and `false`
|
||||||
* otherwise.
|
* otherwise.
|
||||||
* \pre `GpsTraits` must be a model of the concept `GeneralPolygonSetTraits_2`.
|
* \pre `GpsTraits` must be a model of the concept `GeneralPolygonSetTraits_2`.
|
||||||
* \pre `%ArrTraits` must be a model of the concept
|
* \pre `%ArrTraits` must be a model of the concept
|
||||||
|
|
@ -1102,7 +1102,7 @@ do_intersect(const General_polygon_with_holes_2<General_polygon_2<ArrTraits>>& p
|
||||||
* \param pgn1 the 1st input polygon.
|
* \param pgn1 the 1st input polygon.
|
||||||
* \param pgn2 the 2nd input polygon.
|
* \param pgn2 the 2nd input polygon.
|
||||||
* \param traits a traits object.
|
* \param traits a traits object.
|
||||||
* \return `true` if `pgn1` and `pgn2` intersect in their interiro and `false`
|
* \return `true` if `pgn1` and `pgn2` intersect in their interior and `false`
|
||||||
* otherwise.
|
* otherwise.
|
||||||
* \pre `GpsTraits` must be a model of the concept `GeneralPolygonSetTraits_2`.
|
* \pre `GpsTraits` must be a model of the concept `GeneralPolygonSetTraits_2`.
|
||||||
* \pre `GpsTraits` must be a model of the concept `GeneralPolygonSetTraits_2`.
|
* \pre `GpsTraits` must be a model of the concept `GeneralPolygonSetTraits_2`.
|
||||||
|
|
|
||||||
|
|
@ -18,8 +18,5 @@ endforeach()
|
||||||
if(CGAL_Qt5_FOUND)
|
if(CGAL_Qt5_FOUND)
|
||||||
target_link_libraries(draw_polygon_set PUBLIC CGAL::CGAL_Basic_viewer)
|
target_link_libraries(draw_polygon_set PUBLIC CGAL::CGAL_Basic_viewer)
|
||||||
else()
|
else()
|
||||||
message(
|
message(STATUS "NOTICE: The example 'draw_polygon_set' requires Qt and drawing will be disabled.")
|
||||||
STATUS
|
|
||||||
"NOTICE: The example draw_polygon_set requires Qt and drawing will be disabled."
|
|
||||||
)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
|
||||||
|
|
@ -1,17 +1 @@
|
||||||
ETH Zurich (Switzerland).
|
ETH Zurich (Switzerland).
|
||||||
Min_quadrilateral_2
|
|
||||||
Min_sphere_of_spheres_d
|
|
||||||
Matrix_search
|
|
||||||
Approximate_min_ellipsoid_d
|
|
||||||
Min_ellipse_2
|
|
||||||
Min_circle_2
|
|
||||||
Min_sphere_d
|
|
||||||
Min_annulus_d
|
|
||||||
Min_quadrilateral_2
|
|
||||||
Min_sphere_of_spheres_d
|
|
||||||
Matrix_search
|
|
||||||
Approximate_min_ellipsoid_d
|
|
||||||
Min_ellipse_2
|
|
||||||
Min_circle_2
|
|
||||||
Min_sphere_d
|
|
||||||
Min_annulus_d
|
|
||||||
|
|
|
||||||
|
|
@ -6,18 +6,16 @@ project(Box_intersection_d_Tests)
|
||||||
|
|
||||||
find_package(CGAL REQUIRED)
|
find_package(CGAL REQUIRED)
|
||||||
|
|
||||||
find_package(TBB)
|
|
||||||
include(CGAL_TBB_support)
|
|
||||||
|
|
||||||
create_single_source_cgal_program("automated_test.cpp")
|
create_single_source_cgal_program("automated_test.cpp")
|
||||||
create_single_source_cgal_program("benchmark_box_intersection.cpp")
|
create_single_source_cgal_program("benchmark_box_intersection.cpp")
|
||||||
create_single_source_cgal_program("random_set_test.cpp")
|
create_single_source_cgal_program("random_set_test.cpp")
|
||||||
create_single_source_cgal_program("test_box_grid.cpp")
|
create_single_source_cgal_program("test_box_grid.cpp")
|
||||||
create_single_source_cgal_program("test_Has_member_report.cpp")
|
create_single_source_cgal_program("test_Has_member_report.cpp")
|
||||||
|
|
||||||
|
find_package(TBB QUIET)
|
||||||
|
include(CGAL_TBB_support)
|
||||||
if(TARGET CGAL::TBB_support)
|
if(TARGET CGAL::TBB_support)
|
||||||
target_link_libraries(test_box_grid PUBLIC CGAL::TBB_support)
|
target_link_libraries(test_box_grid PUBLIC CGAL::TBB_support)
|
||||||
else()
|
else()
|
||||||
message(
|
message(STATUS "NOTICE: Intel TBB was not found. Parallel code will not be used.")
|
||||||
STATUS "NOTICE: Intel TBB was not found. Sequential code will be used.")
|
|
||||||
endif()
|
endif()
|
||||||
|
|
|
||||||
|
|
@ -5,27 +5,8 @@ project(Core_Examples)
|
||||||
find_package(CGAL REQUIRED COMPONENTS Core)
|
find_package(CGAL REQUIRED COMPONENTS Core)
|
||||||
|
|
||||||
if(NOT CGAL_Core_FOUND)
|
if(NOT CGAL_Core_FOUND)
|
||||||
|
message("NOTICE: This project requires the CGAL_Core library, and will not be compiled.")
|
||||||
message(
|
|
||||||
STATUS
|
|
||||||
"This project requires the CGAL_Core library, and will not be compiled.")
|
|
||||||
return()
|
return()
|
||||||
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Boost and its components
|
|
||||||
find_package(Boost)
|
|
||||||
|
|
||||||
if(NOT Boost_FOUND)
|
|
||||||
|
|
||||||
message(
|
|
||||||
STATUS "This project requires the Boost library, and will not be compiled.")
|
|
||||||
|
|
||||||
return()
|
|
||||||
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# Creating entries for all .cpp/.C files with "main" routine
|
|
||||||
# ##########################################################
|
|
||||||
|
|
||||||
create_single_source_cgal_program("delaunay.cpp")
|
create_single_source_cgal_program("delaunay.cpp")
|
||||||
|
|
|
||||||
|
|
@ -6,15 +6,7 @@ project(CGALimageIO_Examples)
|
||||||
|
|
||||||
find_package(CGAL REQUIRED COMPONENTS ImageIO)
|
find_package(CGAL REQUIRED COMPONENTS ImageIO)
|
||||||
|
|
||||||
if(CGAL_ImageIO_FOUND)
|
create_single_source_cgal_program("convert_raw_image_to_inr.cpp")
|
||||||
|
create_single_source_cgal_program("test_imageio.cpp")
|
||||||
create_single_source_cgal_program("convert_raw_image_to_inr.cpp")
|
create_single_source_cgal_program("extract_a_sub_image.cpp")
|
||||||
create_single_source_cgal_program("test_imageio.cpp")
|
create_single_source_cgal_program("slice_image.cpp")
|
||||||
create_single_source_cgal_program("extract_a_sub_image.cpp")
|
|
||||||
create_single_source_cgal_program("slice_image.cpp")
|
|
||||||
else()
|
|
||||||
message(
|
|
||||||
STATUS
|
|
||||||
"NOTICE: This demo needs the CGAL ImageIO library, and will not be compiled."
|
|
||||||
)
|
|
||||||
endif()
|
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <boost/cstdint.hpp> // for uint32_t, etc.
|
#include <cstdint> // for uint32_t, etc.
|
||||||
|
|
||||||
#ifdef CGAL_USE_ZLIB
|
#ifdef CGAL_USE_ZLIB
|
||||||
#include <zlib.h>
|
#include <zlib.h>
|
||||||
|
|
@ -562,38 +562,50 @@ struct Word_type_generator<WK_FLOAT, sign, 8>
|
||||||
template <>
|
template <>
|
||||||
struct Word_type_generator<WK_FIXED, SGN_SIGNED, 1>
|
struct Word_type_generator<WK_FIXED, SGN_SIGNED, 1>
|
||||||
{
|
{
|
||||||
// typedef boost::int8_t type;
|
// typedef std::int8_t type;
|
||||||
typedef char type;
|
typedef char type;
|
||||||
};
|
};
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
struct Word_type_generator<WK_FIXED, SGN_UNSIGNED, 1>
|
struct Word_type_generator<WK_FIXED, SGN_UNSIGNED, 1>
|
||||||
{
|
{
|
||||||
typedef boost::uint8_t type;
|
typedef std::uint8_t type;
|
||||||
};
|
};
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
struct Word_type_generator<WK_FIXED, SGN_SIGNED, 2>
|
struct Word_type_generator<WK_FIXED, SGN_SIGNED, 2>
|
||||||
{
|
{
|
||||||
typedef boost::int16_t type;
|
typedef std::int16_t type;
|
||||||
};
|
};
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
struct Word_type_generator<WK_FIXED, SGN_UNSIGNED, 2>
|
struct Word_type_generator<WK_FIXED, SGN_UNSIGNED, 2>
|
||||||
{
|
{
|
||||||
typedef boost::uint16_t type;
|
typedef std::uint16_t type;
|
||||||
};
|
};
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
struct Word_type_generator<WK_FIXED, SGN_SIGNED, 4>
|
struct Word_type_generator<WK_FIXED, SGN_SIGNED, 4>
|
||||||
{
|
{
|
||||||
typedef boost::int32_t type;
|
typedef std::int32_t type;
|
||||||
};
|
};
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
struct Word_type_generator<WK_FIXED, SGN_UNSIGNED, 4>
|
struct Word_type_generator<WK_FIXED, SGN_UNSIGNED, 4>
|
||||||
{
|
{
|
||||||
typedef boost::uint32_t type;
|
typedef std::uint32_t type;
|
||||||
|
};
|
||||||
|
|
||||||
|
template <>
|
||||||
|
struct Word_type_generator<WK_FIXED, SGN_SIGNED, 8>
|
||||||
|
{
|
||||||
|
typedef std::int64_t type;
|
||||||
|
};
|
||||||
|
|
||||||
|
template <>
|
||||||
|
struct Word_type_generator<WK_FIXED, SGN_UNSIGNED, 8>
|
||||||
|
{
|
||||||
|
typedef std::uint64_t type;
|
||||||
};
|
};
|
||||||
|
|
||||||
template <WORD_KIND wordKind, SIGN sign, std::size_t wdim>
|
template <WORD_KIND wordKind, SIGN sign, std::size_t wdim>
|
||||||
|
|
|
||||||
|
|
@ -9,8 +9,5 @@ find_package(CGAL REQUIRED COMPONENTS ImageIO)
|
||||||
if(WITH_CGAL_ImageIO)
|
if(WITH_CGAL_ImageIO)
|
||||||
create_single_source_cgal_program("test_trilinear_interpolation.cpp")
|
create_single_source_cgal_program("test_trilinear_interpolation.cpp")
|
||||||
else()
|
else()
|
||||||
message(
|
message("NOTICE: This project requires the CGAL_ImageIO library, and will not be compiled.")
|
||||||
STATUS
|
|
||||||
"NOTICE: Some tests require the CGAL_ImageIO library, and will not be compiled."
|
|
||||||
)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
|
||||||
|
|
@ -22,26 +22,21 @@ find_package(CGAL REQUIRED COMPONENTS Core)
|
||||||
|
|
||||||
include(${CGAL_USE_FILE})
|
include(${CGAL_USE_FILE})
|
||||||
|
|
||||||
find_package(Eigen3 3.1.0) #(requires 3.1.0 or greater)
|
find_package(Eigen3 3.1.0 QUIET) #(requires 3.1.0 or greater)
|
||||||
include(CGAL_Eigen3_support)
|
include(CGAL_Eigen3_support)
|
||||||
if(NOT TARGET CGAL::Eigen3_support)
|
if(NOT TARGET CGAL::Eigen3_support)
|
||||||
message(
|
message("NOTICE: This project requires the Eigen library, and will not be compiled.")
|
||||||
STATUS
|
|
||||||
"NOTICE: This project requires the Eigen library, and will not be compiled."
|
|
||||||
)
|
|
||||||
return()
|
return()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
find_package(IPE 7)
|
find_package(IPE 7)
|
||||||
|
|
||||||
if(IPE_FOUND)
|
if(IPE_FOUND)
|
||||||
if ( NOT ${IPE_VERSION} EQUAL "7")
|
if(NOT ${IPE_VERSION} EQUAL "7")
|
||||||
message("-- Error: ${IPE_VERSION} is not a supported version of IPE (only 7 is).")
|
message("NOTICE: ${IPE_VERSION} is not a supported version of IPE (only 7 is).")
|
||||||
set(IPE_FOUND FALSE)
|
set(IPE_FOUND FALSE)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
if(IPE_FOUND AND IPE_VERSION)
|
if(IPE_FOUND AND IPE_VERSION)
|
||||||
message("-- Using IPE version ${IPE_VERSION} compatibility.")
|
message("-- Using IPE version ${IPE_VERSION} compatibility.")
|
||||||
|
|
||||||
|
|
@ -119,5 +114,5 @@ if(IPE_FOUND AND IPE_VERSION)
|
||||||
cgal_add_compilation_test(simple_triangulation)
|
cgal_add_compilation_test(simple_triangulation)
|
||||||
|
|
||||||
else()
|
else()
|
||||||
message(STATUS "NOTICE: This program requires the Ipe include files and library, and will not be compiled.")
|
message("NOTICE: This project requires the Ipe include files and library, and will not be compiled.")
|
||||||
endif()
|
endif()
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
@INCLUDE = ${CGAL_DOC_PACKAGE_DEFAULTS}
|
@INCLUDE = ${CGAL_DOC_PACKAGE_DEFAULTS}
|
||||||
|
|
||||||
PROJECT_NAME = "CGAL ${CGAL_DOC_VERSION} - CGAL Ipelets"
|
PROJECT_NAME = "CGAL ${CGAL_DOC_VERSION} - CGAL Ipelets"
|
||||||
EXAMPLE_PATH += ${CGAL_PACKAGE_DIR}/demo
|
EXAMPLE_PATH = ${CGAL_PACKAGE_DIR}/demo
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
/*!
|
/*!
|
||||||
\example CGAL_ipelets/test_grabbers.cpp
|
|
||||||
\example CGAL_ipelets/simple_triangulation.cpp
|
\example CGAL_ipelets/simple_triangulation.cpp
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
# This is the CMake script for compiling a CGAL application.
|
# This is the CMake script for compiling a CGAL application.
|
||||||
|
|
||||||
cmake_minimum_required(VERSION 3.1...3.23)
|
cmake_minimum_required(VERSION 3.1...3.23)
|
||||||
project(CGAL_ipelets_Examples)
|
project(CGAL_ipelets_Tests)
|
||||||
|
|
||||||
find_package(CGAL REQUIRED)
|
find_package(CGAL REQUIRED)
|
||||||
|
|
||||||
|
|
@ -41,6 +41,23 @@ plane_from_points(const typename R::Point_3 &p,
|
||||||
return PlaneC3<R>(a, b, c, d);
|
return PlaneC3<R>(a, b, c, d);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template <class R>
|
||||||
|
CGAL_KERNEL_LARGE_INLINE
|
||||||
|
PlaneC3<R>
|
||||||
|
plane_from_points(Origin,
|
||||||
|
const typename R::Point_3 &q,
|
||||||
|
const typename R::Point_3 &r)
|
||||||
|
{
|
||||||
|
typename R::FT a, b, c, d(0);
|
||||||
|
plane_from_pointsC3( /* origin, */
|
||||||
|
q.x(), q.y(), q.z(),
|
||||||
|
r.x(), r.y(), r.z(),
|
||||||
|
a, b, c);
|
||||||
|
return PlaneC3<R>(a, b, c, d);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
template <class R>
|
template <class R>
|
||||||
CGAL_KERNEL_LARGE_INLINE
|
CGAL_KERNEL_LARGE_INLINE
|
||||||
PlaneC3<R>
|
PlaneC3<R>
|
||||||
|
|
@ -53,7 +70,7 @@ plane_from_point_direction(const typename R::Point_3 &p,
|
||||||
return PlaneC3<R>(A, B, C, D);
|
return PlaneC3<R>(A, B, C, D);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class R>
|
template <class R>
|
||||||
CGAL_KERNEL_LARGE_INLINE
|
CGAL_KERNEL_LARGE_INLINE
|
||||||
PlaneC3<R>
|
PlaneC3<R>
|
||||||
plane_from_point_direction(Origin,
|
plane_from_point_direction(Origin,
|
||||||
|
|
|
||||||
|
|
@ -240,6 +240,22 @@ plane_from_pointsC3(const FT &px, const FT &py, const FT &pz,
|
||||||
pd = - pa*rx - pb*ry - pc*rz;
|
pd = - pa*rx - pb*ry - pc*rz;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template <class FT>
|
||||||
|
CGAL_KERNEL_MEDIUM_INLINE
|
||||||
|
void
|
||||||
|
plane_from_pointsC3( /* origin */
|
||||||
|
const FT &qx, const FT &qy, const FT &qz,
|
||||||
|
const FT &rx, const FT &ry, const FT &rz,
|
||||||
|
FT &pa, FT &pb, FT &pc /* , zero */ )
|
||||||
|
{
|
||||||
|
pa = qy*rz - ry*qz;
|
||||||
|
pb = qz*rx - rz*qx;
|
||||||
|
pc = qx*ry - rx*qy;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
template <class FT>
|
template <class FT>
|
||||||
CGAL_KERNEL_MEDIUM_INLINE
|
CGAL_KERNEL_MEDIUM_INLINE
|
||||||
void
|
void
|
||||||
|
|
|
||||||
|
|
@ -33,8 +33,6 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND)
|
||||||
|
|
||||||
else()
|
else()
|
||||||
|
|
||||||
message(
|
message("NOTICE: This demo requires CGAL and Qt5, and will not be compiled.")
|
||||||
STATUS "NOTICE: This demo requires CGAL, and Qt5, and will not be compiled."
|
|
||||||
)
|
|
||||||
|
|
||||||
endif()
|
endif()
|
||||||
|
|
|
||||||
|
|
@ -701,7 +701,13 @@ typedef Iterator_from_circulator< C, const_reference, const_pointer>
|
||||||
template <class Container>
|
template <class Container>
|
||||||
class Circulator_from_container {
|
class Circulator_from_container {
|
||||||
typedef Circulator_from_container<Container> Self;
|
typedef Circulator_from_container<Container> Self;
|
||||||
typedef typename Container::iterator iterator;
|
typedef typename Container::iterator container_iterator;
|
||||||
|
typedef typename Container::const_iterator container_const_iterator;
|
||||||
|
typedef std::conditional_t<
|
||||||
|
std::is_const<Container>::value,
|
||||||
|
container_const_iterator,
|
||||||
|
container_iterator
|
||||||
|
> iterator;
|
||||||
typedef std::iterator_traits<iterator> iterator_traits;
|
typedef std::iterator_traits<iterator> iterator_traits;
|
||||||
public:
|
public:
|
||||||
typedef typename iterator_traits::value_type value_type;
|
typedef typename iterator_traits::value_type value_type;
|
||||||
|
|
|
||||||
|
|
@ -65,7 +65,7 @@ Data structures specialized to classify clusters.
|
||||||
\cgalPkgPicture{data_classif.png}
|
\cgalPkgPicture{data_classif.png}
|
||||||
|
|
||||||
\cgalPkgSummaryBegin
|
\cgalPkgSummaryBegin
|
||||||
\cgalPkgAuthors{Simon Giraudot, Florent Lafarge}
|
\cgalPkgAuthors{Simon Giraudot and Florent Lafarge}
|
||||||
\cgalPkgDesc{This component implements an algorithm that classifies a data set into a user-defined set of labels (such as ground, vegetation, buildings, etc.). A flexible API is provided so that users can classify any type of data, compute their own local features on the input data set, and define their own labels.}
|
\cgalPkgDesc{This component implements an algorithm that classifies a data set into a user-defined set of labels (such as ground, vegetation, buildings, etc.). A flexible API is provided so that users can classify any type of data, compute their own local features on the input data set, and define their own labels.}
|
||||||
\cgalPkgManuals{Chapter_Classification, PkgClassificationRef}
|
\cgalPkgManuals{Chapter_Classification, PkgClassificationRef}
|
||||||
\cgalPkgSummaryEnd
|
\cgalPkgSummaryEnd
|
||||||
|
|
|
||||||
|
|
@ -7,15 +7,6 @@ project(Classification_Examples)
|
||||||
# CGAL and its components
|
# CGAL and its components
|
||||||
find_package(CGAL REQUIRED)
|
find_package(CGAL REQUIRED)
|
||||||
|
|
||||||
# Boost and its components
|
|
||||||
find_package(Boost REQUIRED)
|
|
||||||
|
|
||||||
if(NOT Boost_FOUND)
|
|
||||||
message(
|
|
||||||
STATUS "This project requires the Boost library, and will not be compiled.")
|
|
||||||
return()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
set(Classification_dependencies_met TRUE)
|
set(Classification_dependencies_met TRUE)
|
||||||
|
|
||||||
find_package(Boost OPTIONAL_COMPONENTS serialization iostreams)
|
find_package(Boost OPTIONAL_COMPONENTS serialization iostreams)
|
||||||
|
|
@ -23,44 +14,29 @@ include(CGAL_Boost_serialization_support)
|
||||||
include(CGAL_Boost_iostreams_support)
|
include(CGAL_Boost_iostreams_support)
|
||||||
|
|
||||||
if(NOT TARGET CGAL::Boost_serialization_support)
|
if(NOT TARGET CGAL::Boost_serialization_support)
|
||||||
message(
|
message("NOTICE: This project requires Boost Serialization, and will not be compiled.")
|
||||||
STATUS
|
|
||||||
"NOTICE: This project requires Boost Serialization, and will not be compiled."
|
|
||||||
)
|
|
||||||
set(Classification_dependencies_met FALSE)
|
set(Classification_dependencies_met FALSE)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(NOT TARGET CGAL::Boost_iostreams_support)
|
if(NOT TARGET CGAL::Boost_iostreams_support)
|
||||||
message(
|
message("NOTICE: This project requires Boost IO Streams, and will not be compiled.")
|
||||||
STATUS
|
|
||||||
"NOTICE: This project requires Boost IO Streams, and will not be compiled."
|
|
||||||
)
|
|
||||||
set(Classification_dependencies_met FALSE)
|
set(Classification_dependencies_met FALSE)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
find_package(OpenCV QUIET COMPONENTS core ml) # Need core + machine learning
|
find_package(Eigen3 3.1.0 QUIET) #(3.1.0 or greater)
|
||||||
include(CGAL_OpenCV_support)
|
|
||||||
if(NOT TARGET CGAL::OpenCV_support)
|
|
||||||
message(
|
|
||||||
STATUS
|
|
||||||
"NOTICE: OpenCV was not found. OpenCV random forest predicate for classification won't be available."
|
|
||||||
)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
find_package(Eigen3 3.1.0 REQUIRED) #(3.1.0 or greater)
|
|
||||||
include(CGAL_Eigen3_support)
|
include(CGAL_Eigen3_support)
|
||||||
if(NOT TARGET CGAL::Eigen3_support)
|
if(NOT TARGET CGAL::Eigen3_support)
|
||||||
message(
|
message("NOTICE: This project requires the Eigen library, and will not be compiled.")
|
||||||
STATUS "This project requires the Eigen library, and will not be compiled.")
|
|
||||||
set(Classification_dependencies_met FALSE)
|
set(Classification_dependencies_met FALSE)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
find_package(TBB QUIET)
|
|
||||||
include(CGAL_TBB_support)
|
|
||||||
|
|
||||||
if(NOT Classification_dependencies_met)
|
if(NOT Classification_dependencies_met)
|
||||||
return()
|
return()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
find_package(TBB QUIET)
|
||||||
|
include(CGAL_TBB_support)
|
||||||
|
|
||||||
create_single_source_cgal_program( "example_classification.cpp" )
|
create_single_source_cgal_program( "example_classification.cpp" )
|
||||||
create_single_source_cgal_program( "example_ethz_random_forest.cpp" )
|
create_single_source_cgal_program( "example_ethz_random_forest.cpp" )
|
||||||
create_single_source_cgal_program( "example_feature.cpp" )
|
create_single_source_cgal_program( "example_feature.cpp" )
|
||||||
|
|
@ -70,10 +46,15 @@ create_single_source_cgal_program( "example_cluster_classification.cpp" )
|
||||||
create_single_source_cgal_program( "gis_tutorial_example.cpp" )
|
create_single_source_cgal_program( "gis_tutorial_example.cpp" )
|
||||||
create_single_source_cgal_program( "example_deprecated_conversion.cpp" )
|
create_single_source_cgal_program( "example_deprecated_conversion.cpp" )
|
||||||
|
|
||||||
if (TARGET CGAL::OpenCV_support)
|
find_package(OpenCV QUIET COMPONENTS core ml) # Need core + machine learning
|
||||||
|
include(CGAL_OpenCV_support)
|
||||||
|
if(TARGET CGAL::OpenCV_support)
|
||||||
|
message(STATUS "Found OpenCV")
|
||||||
|
|
||||||
create_single_source_cgal_program( "example_opencv_random_forest.cpp" )
|
create_single_source_cgal_program( "example_opencv_random_forest.cpp" )
|
||||||
target_link_libraries(example_opencv_random_forest
|
target_link_libraries(example_opencv_random_forest PUBLIC CGAL::OpenCV_support)
|
||||||
PUBLIC CGAL::OpenCV_support)
|
else()
|
||||||
|
message("NOTICE: OpenCV was not found. OpenCV random forest predicate for classification won't be available.")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
foreach(target
|
foreach(target
|
||||||
|
|
@ -87,8 +68,8 @@ foreach(target
|
||||||
gis_tutorial_example
|
gis_tutorial_example
|
||||||
example_deprecated_conversion)
|
example_deprecated_conversion)
|
||||||
if(TARGET ${target})
|
if(TARGET ${target})
|
||||||
target_link_libraries(
|
target_link_libraries(${target} PUBLIC CGAL::Eigen3_support
|
||||||
${target} PUBLIC CGAL::Eigen3_support CGAL::Boost_iostreams_support
|
CGAL::Boost_iostreams_support
|
||||||
CGAL::Boost_serialization_support)
|
CGAL::Boost_serialization_support)
|
||||||
if(TARGET CGAL::TBB_support)
|
if(TARGET CGAL::TBB_support)
|
||||||
target_link_libraries(${target} PUBLIC CGAL::TBB_support)
|
target_link_libraries(${target} PUBLIC CGAL::TBB_support)
|
||||||
|
|
|
||||||
|
|
@ -30,9 +30,9 @@ typedef Point_set::Property_map<int> Imap;
|
||||||
typedef Point_set::Property_map<unsigned char> UCmap;
|
typedef Point_set::Property_map<unsigned char> UCmap;
|
||||||
|
|
||||||
|
|
||||||
typedef CGAL::Shape_detection::Point_set::Sphere_neighbor_query<Kernel, Point_set, Pmap> Neighbor_query;
|
typedef CGAL::Shape_detection::Point_set::Sphere_neighbor_query_for_point_set<Point_set> Neighbor_query;
|
||||||
typedef CGAL::Shape_detection::Point_set::Least_squares_plane_fit_region<Kernel, Point_set, Pmap, Vmap> Region_type;
|
typedef CGAL::Shape_detection::Point_set::Least_squares_plane_fit_region_for_point_set<Point_set> Region_type;
|
||||||
typedef CGAL::Shape_detection::Region_growing<Point_set, Neighbor_query, Region_type> Region_growing;
|
typedef CGAL::Shape_detection::Region_growing<Neighbor_query, Region_type> Region_growing;
|
||||||
|
|
||||||
namespace Classification = CGAL::Classification;
|
namespace Classification = CGAL::Classification;
|
||||||
namespace Feature = CGAL::Classification::Feature;
|
namespace Feature = CGAL::Classification::Feature;
|
||||||
|
|
@ -111,25 +111,24 @@ int main (int argc, char** argv)
|
||||||
const double max_accepted_angle = 25.0;
|
const double max_accepted_angle = 25.0;
|
||||||
const std::size_t min_region_size = 10;
|
const std::size_t min_region_size = 10;
|
||||||
|
|
||||||
Neighbor_query neighbor_query (
|
Neighbor_query neighbor_query = CGAL::Shape_detection::Point_set::make_sphere_neighbor_query (
|
||||||
pts,
|
pts, CGAL::parameters::sphere_radius(search_sphere_radius)
|
||||||
search_sphere_radius,
|
.point_map(pts.point_map()));
|
||||||
pts.point_map());
|
Region_type region_type = CGAL::Shape_detection::Point_set::make_least_squares_plane_fit_region(
|
||||||
Region_type region_type (
|
pts, CGAL::parameters::maximum_distance(max_distance_to_plane)
|
||||||
pts,
|
.maximum_angle(max_accepted_angle)
|
||||||
max_distance_to_plane, max_accepted_angle, min_region_size,
|
.minimum_region_size(min_region_size));
|
||||||
pts.point_map(), pts.normal_map());
|
|
||||||
Region_growing region_growing (
|
Region_growing region_growing (
|
||||||
pts, neighbor_query, region_type);
|
pts, neighbor_query, region_type);
|
||||||
|
|
||||||
std::vector<Cluster> clusters;
|
std::vector<Cluster> clusters;
|
||||||
region_growing.detect
|
region_growing.detect
|
||||||
(boost::make_function_output_iterator
|
(boost::make_function_output_iterator
|
||||||
([&](const std::vector<std::size_t>& region) -> void {
|
([&](const std::pair<Kernel::Plane_3, std::vector<Point_set::Index>>& region) -> void {
|
||||||
|
|
||||||
// Create a new cluster.
|
// Create a new cluster.
|
||||||
Classification::Cluster<Point_set, Pmap> cluster (pts, pts.point_map());
|
Classification::Cluster<Point_set, Pmap> cluster (pts, pts.point_map());
|
||||||
for (const std::size_t idx : region)
|
for (Point_set::Index idx : region.second)
|
||||||
cluster.insert(idx);
|
cluster.insert(idx);
|
||||||
clusters.push_back(cluster);
|
clusters.push_back(cluster);
|
||||||
}));
|
}));
|
||||||
|
|
|
||||||
|
|
@ -140,7 +140,7 @@ int main (int argc, char** argv)
|
||||||
classifier.save_configuration(fconfig);
|
classifier.save_configuration(fconfig);
|
||||||
|
|
||||||
// Write result
|
// Write result
|
||||||
std::ofstream f ("classification.ply");
|
std::ofstream f ("classification_ethz_random_forest.ply");
|
||||||
f.precision(18);
|
f.precision(18);
|
||||||
f << pts;
|
f << pts;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -128,7 +128,7 @@ int main (int argc, char** argv)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Write result
|
// Write result
|
||||||
std::ofstream f ("classification.ply");
|
std::ofstream f ("classification_opencv_random_forest.ply");
|
||||||
f.precision(18);
|
f.precision(18);
|
||||||
f << pts;
|
f << pts;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -473,7 +473,8 @@ int main (int argc, char** argv)
|
||||||
// Fill all holes except the bigest (which is the outer hull of the mesh)
|
// Fill all holes except the bigest (which is the outer hull of the mesh)
|
||||||
for (Mesh::Halfedge_index hi : holes)
|
for (Mesh::Halfedge_index hi : holes)
|
||||||
if (hi != outer_hull)
|
if (hi != outer_hull)
|
||||||
CGAL::Polygon_mesh_processing::triangulate_refine_and_fair_hole (dtm_mesh, hi);
|
CGAL::Polygon_mesh_processing::triangulate_refine_and_fair_hole
|
||||||
|
(dtm_mesh, hi, CGAL::parameters::fairing_continuity(0));
|
||||||
|
|
||||||
// Save DTM with holes filled
|
// Save DTM with holes filled
|
||||||
std::ofstream dtm_filled_ofile ("dtm_filled.ply", std::ios_base::binary);
|
std::ofstream dtm_filled_ofile ("dtm_filled.ply", std::ios_base::binary);
|
||||||
|
|
@ -735,7 +736,7 @@ int main (int argc, char** argv)
|
||||||
points.range(label_map)).mean_intersection_over_union() << std::endl;
|
points.range(label_map)).mean_intersection_over_union() << std::endl;
|
||||||
|
|
||||||
// Save the classified point set
|
// Save the classified point set
|
||||||
std::ofstream classified_ofile ("classified.ply");
|
std::ofstream classified_ofile ("classification_gis_tutorial.ply");
|
||||||
CGAL::IO::set_binary_mode (classified_ofile);
|
CGAL::IO::set_binary_mode (classified_ofile);
|
||||||
classified_ofile << points;
|
classified_ofile << points;
|
||||||
classified_ofile.close();
|
classified_ofile.close();
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
GeometryFactory (France)
|
||||||
|
|
@ -7,15 +7,6 @@ project(Classification_Tests)
|
||||||
# CGAL and its components
|
# CGAL and its components
|
||||||
find_package(CGAL REQUIRED)
|
find_package(CGAL REQUIRED)
|
||||||
|
|
||||||
# Boost and its components
|
|
||||||
find_package(Boost REQUIRED)
|
|
||||||
|
|
||||||
if(NOT Boost_FOUND)
|
|
||||||
message(
|
|
||||||
STATUS "This project requires the Boost library, and will not be compiled.")
|
|
||||||
return()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
set(Classification_dependencies_met TRUE)
|
set(Classification_dependencies_met TRUE)
|
||||||
|
|
||||||
find_package(Boost OPTIONAL_COMPONENTS serialization iostreams)
|
find_package(Boost OPTIONAL_COMPONENTS serialization iostreams)
|
||||||
|
|
@ -23,41 +14,35 @@ include(CGAL_Boost_serialization_support)
|
||||||
include(CGAL_Boost_iostreams_support)
|
include(CGAL_Boost_iostreams_support)
|
||||||
|
|
||||||
if(NOT TARGET CGAL::Boost_serialization_support)
|
if(NOT TARGET CGAL::Boost_serialization_support)
|
||||||
message(
|
message("NOTICE: This project requires Boost Serialization, and will not be compiled.")
|
||||||
STATUS
|
|
||||||
"NOTICE: This project requires Boost Serialization, and will not be compiled."
|
|
||||||
)
|
|
||||||
set(Classification_dependencies_met FALSE)
|
|
||||||
endif()
|
|
||||||
if(NOT TARGET CGAL::Boost_iostreams_support)
|
|
||||||
message(
|
|
||||||
STATUS
|
|
||||||
"NOTICE: This project requires Boost IO Streams, and will not be compiled."
|
|
||||||
)
|
|
||||||
set(Classification_dependencies_met FALSE)
|
set(Classification_dependencies_met FALSE)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
find_package(Eigen3 3.1.0 REQUIRED) #(3.1.0 or greater)
|
if(NOT TARGET CGAL::Boost_iostreams_support)
|
||||||
|
message("NOTICE: This project requires Boost IO Streams, and will not be compiled.")
|
||||||
|
set(Classification_dependencies_met FALSE)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
find_package(Eigen3 3.1.0 QUIET) #(3.1.0 or greater)
|
||||||
include(CGAL_Eigen3_support)
|
include(CGAL_Eigen3_support)
|
||||||
if(NOT TARGET CGAL::Eigen3_support)
|
if(NOT TARGET CGAL::Eigen3_support)
|
||||||
message(
|
message("NOTICE: This project requires the Eigen library, and will not be compiled.")
|
||||||
STATUS "This project requires the Eigen library, and will not be compiled.")
|
|
||||||
set(Classification_dependencies_met FALSE)
|
set(Classification_dependencies_met FALSE)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
find_package(TBB QUIET)
|
|
||||||
include(CGAL_TBB_support)
|
|
||||||
|
|
||||||
if(NOT Classification_dependencies_met)
|
if(NOT Classification_dependencies_met)
|
||||||
return()
|
return()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
find_package(TBB QUIET)
|
||||||
|
include(CGAL_TBB_support)
|
||||||
|
|
||||||
create_single_source_cgal_program("test_classification_point_set.cpp")
|
create_single_source_cgal_program("test_classification_point_set.cpp")
|
||||||
create_single_source_cgal_program("test_classification_io.cpp")
|
create_single_source_cgal_program("test_classification_io.cpp")
|
||||||
|
|
||||||
foreach(target test_classification_point_set test_classification_io)
|
foreach(target test_classification_point_set test_classification_io)
|
||||||
target_link_libraries(
|
target_link_libraries(${target} PUBLIC CGAL::Eigen3_support
|
||||||
${target} PUBLIC CGAL::Eigen3_support CGAL::Boost_iostreams_support
|
CGAL::Boost_iostreams_support
|
||||||
CGAL::Boost_serialization_support)
|
CGAL::Boost_serialization_support)
|
||||||
if(TARGET CGAL::TBB_support)
|
if(TARGET CGAL::TBB_support)
|
||||||
target_link_libraries(${target} PUBLIC CGAL::TBB_support)
|
target_link_libraries(${target} PUBLIC CGAL::TBB_support)
|
||||||
|
|
|
||||||
|
|
@ -566,6 +566,15 @@ void test_split_attribute_functor_one_dart
|
||||||
Attribute_descriptor_i a1 = amap.template attribute<i>(adart);
|
Attribute_descriptor_i a1 = amap.template attribute<i>(adart);
|
||||||
if ( found_attributes.is_defined(a1) )
|
if ( found_attributes.is_defined(a1) )
|
||||||
{ // Here the attribute was already present in the hash_map
|
{ // Here the attribute was already present in the hash_map
|
||||||
|
|
||||||
|
// We need to call reserve for the cc with index case. Indeed, if the vector
|
||||||
|
// is reallocated, the reference returned by get_attribute<i>(a1) will be
|
||||||
|
// invalidated, and the copy will be wrong. Note that there is no overhead
|
||||||
|
// since the creation of the attribute need one allocation.
|
||||||
|
amap.template attributes<i>().reserve(amap.template attributes<i>().size()+1);
|
||||||
|
|
||||||
|
// Now we are sure that the creation of a new attribute will not imply
|
||||||
|
// a realloc.
|
||||||
Attribute_descriptor_i a2 = amap.template
|
Attribute_descriptor_i a2 = amap.template
|
||||||
create_attribute<i>(amap.template get_attribute<i>(a1));
|
create_attribute<i>(amap.template get_attribute<i>(a1));
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -146,6 +146,8 @@ namespace CGAL {
|
||||||
{ return cit; }
|
{ return cit; }
|
||||||
bool is_used(size_type i) const
|
bool is_used(size_type i) const
|
||||||
{ return mmap.mdarts.is_used(i); }
|
{ return mmap.mdarts.is_used(i); }
|
||||||
|
bool owns(size_type i) const
|
||||||
|
{ return mmap.mdarts.owns(i); }
|
||||||
private:
|
private:
|
||||||
Self & mmap;
|
Self & mmap;
|
||||||
};
|
};
|
||||||
|
|
@ -286,6 +288,13 @@ namespace CGAL {
|
||||||
{
|
{
|
||||||
CGAL_static_assertion_msg(Helper::template Dimension_index<i>::value>=0,
|
CGAL_static_assertion_msg(Helper::template Dimension_index<i>::value>=0,
|
||||||
"copy_attribute<i> called but i-attributes are disabled.");
|
"copy_attribute<i> called but i-attributes are disabled.");
|
||||||
|
// We need to do a reserve before the emplace in order to avoid a bug of
|
||||||
|
// invalid reference when the container is reallocated.
|
||||||
|
std::get<Helper::template Dimension_index<i>::value>
|
||||||
|
(mattribute_containers).reserve
|
||||||
|
(std::get<Helper::template Dimension_index<i>::value>
|
||||||
|
(mattribute_containers).size()+1);
|
||||||
|
|
||||||
typename Attribute_descriptor<i>::type res=
|
typename Attribute_descriptor<i>::type res=
|
||||||
std::get<Helper::template Dimension_index<i>::value>
|
std::get<Helper::template Dimension_index<i>::value>
|
||||||
(mattribute_containers).emplace(get_attribute<i>(ah));
|
(mattribute_containers).emplace(get_attribute<i>(ah));
|
||||||
|
|
|
||||||
|
|
@ -752,6 +752,9 @@ public:
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool owns(size_type i) const
|
||||||
|
{ return i<capacity() && is_used(i); }
|
||||||
|
|
||||||
bool owns_dereferenceable(const_iterator cit) const
|
bool owns_dereferenceable(const_iterator cit) const
|
||||||
{ return cit!=end() && owns(cit); }
|
{ return cit!=end() && owns(cit); }
|
||||||
|
|
||||||
|
|
@ -764,7 +767,6 @@ public:
|
||||||
void reserve(size_type n)
|
void reserve(size_type n)
|
||||||
{
|
{
|
||||||
if(capacity_>=n) return;
|
if(capacity_>=n) return;
|
||||||
capacity_=n;
|
|
||||||
increase_size();
|
increase_size();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
CNRS and LIRIS' Establishments (France)
|
||||||
|
|
@ -24,9 +24,17 @@ target_compile_definitions(Combinatorial_map_copy_test_index PUBLIC USE_COMPACT_
|
||||||
target_link_libraries(Combinatorial_map_copy_test_index PUBLIC CGAL CGAL::Data)
|
target_link_libraries(Combinatorial_map_copy_test_index PUBLIC CGAL CGAL::Data)
|
||||||
cgal_add_compilation_test(Combinatorial_map_copy_test_index)
|
cgal_add_compilation_test(Combinatorial_map_copy_test_index)
|
||||||
|
|
||||||
|
create_single_source_cgal_program(cmap_test_split_attribute.cpp)
|
||||||
|
|
||||||
# Link with OpenMesh if possible
|
# Link with OpenMesh if possible
|
||||||
find_package(OpenMesh QUIET)
|
find_package(OpenMesh QUIET)
|
||||||
if(TARGET OpenMesh::OpenMesh)
|
if(TARGET OpenMesh::OpenMesh)
|
||||||
|
message(STATUS "Found OpenMesh")
|
||||||
|
|
||||||
target_link_libraries(Combinatorial_map_copy_test PRIVATE OpenMesh::OpenMesh)
|
target_link_libraries(Combinatorial_map_copy_test PRIVATE OpenMesh::OpenMesh)
|
||||||
|
target_compile_definitions(Combinatorial_map_copy_test PRIVATE -DCGAL_USE_OPENMESH)
|
||||||
target_link_libraries(Combinatorial_map_copy_test_index PRIVATE OpenMesh::OpenMesh)
|
target_link_libraries(Combinatorial_map_copy_test_index PRIVATE OpenMesh::OpenMesh)
|
||||||
|
target_compile_definitions(Combinatorial_map_copy_test_index PRIVATE -DCGAL_USE_OPENMESH)
|
||||||
|
else()
|
||||||
|
message(STATUS "NOTICE: Tests will not use OpenMesh.")
|
||||||
endif()
|
endif()
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,92 @@
|
||||||
|
#include <CGAL/Combinatorial_map.h>
|
||||||
|
#include <CGAL/Cell_attribute.h>
|
||||||
|
#include <vector>
|
||||||
|
#include <algorithm>
|
||||||
|
#include <string>
|
||||||
|
#include <cstdlib>
|
||||||
|
|
||||||
|
struct MyInfo
|
||||||
|
{
|
||||||
|
MyInfo() :data(1)
|
||||||
|
{}
|
||||||
|
|
||||||
|
MyInfo(int i) :data(i)
|
||||||
|
{}
|
||||||
|
|
||||||
|
int data;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct Myitem1
|
||||||
|
{
|
||||||
|
using Use_index=CGAL::Tag_true; // use indices
|
||||||
|
using Index_type=std::uint16_t; // 16 bits
|
||||||
|
template<class CMap>
|
||||||
|
struct Dart_wrapper
|
||||||
|
{
|
||||||
|
typedef CGAL::Cell_attribute<CMap, MyInfo> attrib;
|
||||||
|
typedef std::tuple<void, void, attrib> Attributes;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
struct Myitem2
|
||||||
|
{
|
||||||
|
template<class CMap>
|
||||||
|
struct Dart_wrapper
|
||||||
|
{
|
||||||
|
typedef CGAL::Cell_attribute<CMap, MyInfo> attrib;
|
||||||
|
typedef std::tuple<void, void, attrib> Attributes;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
using CMap1=CGAL::Combinatorial_map<3,Myitem1>;
|
||||||
|
using CMap2=CGAL::Combinatorial_map<3,Myitem2>;
|
||||||
|
|
||||||
|
#define NB 1000
|
||||||
|
template<typename CMap>
|
||||||
|
bool test(const std::string& s)
|
||||||
|
{
|
||||||
|
bool res=true;
|
||||||
|
CMap m;
|
||||||
|
// 1) create a face and one attribute.
|
||||||
|
typename CMap::Dart_descriptor dd=m.make_combinatorial_polygon(4);
|
||||||
|
m.template set_attribute<2>(dd, m.template create_attribute<2>(2));
|
||||||
|
// 2) Split this face NB times => will create new 2-attributes for new faces
|
||||||
|
for(std::size_t i=0; i<NB; ++i)
|
||||||
|
{
|
||||||
|
typename CMap::Dart_descriptor
|
||||||
|
newd=m.insert_cell_1_in_cell_2(dd, m.next(m.next(dd)));
|
||||||
|
if(m.template attribute<2>(newd)==CMap::null_descriptor)
|
||||||
|
{
|
||||||
|
std::cout<<"ERROR1: "<<s<<": "
|
||||||
|
<<"attribute<2>(newd)==CMap::null_descriptor"<<std::endl;
|
||||||
|
res=false;
|
||||||
|
}
|
||||||
|
else if(m.template info<2>(newd).data!=2)
|
||||||
|
{
|
||||||
|
std::cout<<"ERROR2: "<<s<<": "<<m.template info<2>(newd).data<<std::endl;
|
||||||
|
res=false;
|
||||||
|
}
|
||||||
|
|
||||||
|
newd=m.template opposite<2>(newd);
|
||||||
|
if(m.template attribute<2>(newd)==CMap::null_descriptor)
|
||||||
|
{
|
||||||
|
std::cout<<"ERROR3: "<<s<<": "
|
||||||
|
<<"attribute<2>(newd)==CMap::null_descriptor"<<std::endl;
|
||||||
|
res=false;
|
||||||
|
}
|
||||||
|
else if(m.template info<2>(newd).data!=2)
|
||||||
|
{
|
||||||
|
std::cout<<"ERROR4: "<<s<<": "<<m.template info<2>(newd).data<<std::endl;
|
||||||
|
res=false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
if(!test<CMap1>("CMap1") || !test<CMap2>("CMap2"))
|
||||||
|
{ return EXIT_FAILURE; }
|
||||||
|
|
||||||
|
return EXIT_SUCCESS;
|
||||||
|
}
|
||||||
|
|
@ -7,7 +7,7 @@
|
||||||
\cgalPkgPicture{Logo-ConeSpanners.png}
|
\cgalPkgPicture{Logo-ConeSpanners.png}
|
||||||
|
|
||||||
\cgalPkgSummaryBegin
|
\cgalPkgSummaryBegin
|
||||||
\cgalPkgAuthors{Weisheng Si, Quincy Tse and Frédérik Paradis}
|
\cgalPkgAuthors{Weisheng Si, Quincy Tse, and Frédérik Paradis}
|
||||||
\cgalPkgDesc{This package provides functors for constructing two kinds of cone-based spanners:
|
\cgalPkgDesc{This package provides functors for constructing two kinds of cone-based spanners:
|
||||||
Yao graph and Theta graph, given a set of vertices on the plane and the directions of cone boundaries.
|
Yao graph and Theta graph, given a set of vertices on the plane and the directions of cone boundaries.
|
||||||
Both exact and inexact constructions are supported.
|
Both exact and inexact constructions are supported.
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
cmake_minimum_required(VERSION 3.1...3.23)
|
cmake_minimum_required(VERSION 3.1...3.23)
|
||||||
project(Cone_spanners_2_Examples)
|
project(Cone_spanners_2_Examples)
|
||||||
|
|
||||||
find_package(CGAL REQUIRED QUIET OPTIONAL_COMPONENTS Core)
|
find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Core)
|
||||||
find_package(LEDA QUIET)
|
find_package(LEDA QUIET)
|
||||||
|
|
||||||
if(CGAL_Core_FOUND OR LEDA_FOUND)
|
if(CGAL_Core_FOUND OR LEDA_FOUND)
|
||||||
|
|
@ -20,12 +20,6 @@ if(CGAL_Core_FOUND OR LEDA_FOUND)
|
||||||
foreach(cppfile ${cppfiles})
|
foreach(cppfile ${cppfiles})
|
||||||
create_single_source_cgal_program("${cppfile}")
|
create_single_source_cgal_program("${cppfile}")
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
else()
|
else()
|
||||||
|
message("NOTICE: This program requires the CGAL_Core library (or LEDA), and will not be compiled.")
|
||||||
message(
|
|
||||||
STATUS
|
|
||||||
"This program requires the CGAL_Core library (or LEDA), and will not be compiled."
|
|
||||||
)
|
|
||||||
|
|
||||||
endif()
|
endif()
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,6 @@
|
||||||
#include <iterator>
|
#include <iterator>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <boost/lexical_cast.hpp>
|
|
||||||
#include <CGAL/Exact_predicates_exact_constructions_kernel_with_root_of.h>
|
#include <CGAL/Exact_predicates_exact_constructions_kernel_with_root_of.h>
|
||||||
#include <CGAL/Construct_theta_graph_2.h>
|
#include <CGAL/Construct_theta_graph_2.h>
|
||||||
#include <CGAL/gnuplot_output_2.h>
|
#include <CGAL/gnuplot_output_2.h>
|
||||||
|
|
@ -79,7 +78,7 @@ int main(int argc, char ** argv)
|
||||||
// obtain the number of vertices in the constructed graph
|
// obtain the number of vertices in the constructed graph
|
||||||
boost::graph_traits<Graph>::vertices_size_type n = boost::num_vertices(g);
|
boost::graph_traits<Graph>::vertices_size_type n = boost::num_vertices(g);
|
||||||
// generate gnuplot files for plotting this graph
|
// generate gnuplot files for plotting this graph
|
||||||
std::string file_prefix = "t" + boost::lexical_cast<std::string>(k) + "n" + boost::lexical_cast<std::string>(n);
|
std::string file_prefix = "t" + std::to_string(k) + "n" + std::to_string(n);
|
||||||
CGAL::gnuplot_output_2(g, file_prefix);
|
CGAL::gnuplot_output_2(g, file_prefix);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
||||||
|
|
@ -6,23 +6,11 @@ project(Cone_spanners_2_Tests)
|
||||||
|
|
||||||
find_package(CGAL REQUIRED COMPONENTS Core)
|
find_package(CGAL REQUIRED COMPONENTS Core)
|
||||||
|
|
||||||
if(CGAL_Core_FOUND)
|
# create a target per cppfile
|
||||||
include_directories(BEFORE "include")
|
file(
|
||||||
|
|
||||||
# create a target per cppfile
|
|
||||||
file(
|
|
||||||
GLOB cppfiles
|
GLOB cppfiles
|
||||||
RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
|
RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/*.cpp)
|
${CMAKE_CURRENT_SOURCE_DIR}/*.cpp)
|
||||||
foreach(cppfile ${cppfiles})
|
foreach(cppfile ${cppfiles})
|
||||||
create_single_source_cgal_program("${cppfile}")
|
create_single_source_cgal_program("${cppfile}")
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
else()
|
|
||||||
|
|
||||||
message(
|
|
||||||
STATUS
|
|
||||||
"This program requires the CGAL and CGAL_Core libraries, and will not be compiled."
|
|
||||||
)
|
|
||||||
|
|
||||||
endif()
|
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,6 @@
|
||||||
#include <iterator>
|
#include <iterator>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <boost/lexical_cast.hpp>
|
|
||||||
#include <CGAL/Exact_predicates_exact_constructions_kernel_with_root_of.h>
|
#include <CGAL/Exact_predicates_exact_constructions_kernel_with_root_of.h>
|
||||||
#include <CGAL/Construct_theta_graph_2.h>
|
#include <CGAL/Construct_theta_graph_2.h>
|
||||||
#include <CGAL/gnuplot_output_2.h>
|
#include <CGAL/gnuplot_output_2.h>
|
||||||
|
|
@ -70,7 +69,7 @@ int main(int argc, char ** argv)
|
||||||
// obtain the number of vertices in the constructed graph
|
// obtain the number of vertices in the constructed graph
|
||||||
boost::graph_traits<Graph>::vertices_size_type n = boost::num_vertices(g);
|
boost::graph_traits<Graph>::vertices_size_type n = boost::num_vertices(g);
|
||||||
// generate gnuplot files for plotting this graph
|
// generate gnuplot files for plotting this graph
|
||||||
std::string file_prefix = "t" + boost::lexical_cast<std::string>(k) + "n" + boost::lexical_cast<std::string>(n);
|
std::string file_prefix = "t" + std::to_string(k) + "n" + std::to_string(n);
|
||||||
CGAL::gnuplot_output_2(g, file_prefix);
|
CGAL::gnuplot_output_2(g, file_prefix);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,6 @@
|
||||||
#include <iterator>
|
#include <iterator>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <boost/lexical_cast.hpp>
|
|
||||||
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
|
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
|
||||||
#include <CGAL/Construct_theta_graph_2.h>
|
#include <CGAL/Construct_theta_graph_2.h>
|
||||||
#include <CGAL/gnuplot_output_2.h>
|
#include <CGAL/gnuplot_output_2.h>
|
||||||
|
|
@ -71,7 +70,7 @@ int main(int argc, char ** argv)
|
||||||
// obtain the number of vertices in the constructed graph
|
// obtain the number of vertices in the constructed graph
|
||||||
boost::graph_traits<Graph>::vertices_size_type n = boost::num_vertices(g);
|
boost::graph_traits<Graph>::vertices_size_type n = boost::num_vertices(g);
|
||||||
// generate gnuplot files for plotting this graph
|
// generate gnuplot files for plotting this graph
|
||||||
std::string file_prefix = "t" + boost::lexical_cast<std::string>(k) + "n" + boost::lexical_cast<std::string>(n);
|
std::string file_prefix = "t" + std::to_string(k) + "n" + std::to_string(n);
|
||||||
CGAL::gnuplot_output_2(g, file_prefix);
|
CGAL::gnuplot_output_2(g, file_prefix);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,6 @@
|
||||||
#include <iterator>
|
#include <iterator>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <boost/lexical_cast.hpp>
|
|
||||||
#include <CGAL/Exact_predicates_exact_constructions_kernel_with_root_of.h>
|
#include <CGAL/Exact_predicates_exact_constructions_kernel_with_root_of.h>
|
||||||
#include <CGAL/Construct_yao_graph_2.h>
|
#include <CGAL/Construct_yao_graph_2.h>
|
||||||
#include <CGAL/gnuplot_output_2.h>
|
#include <CGAL/gnuplot_output_2.h>
|
||||||
|
|
@ -72,7 +71,7 @@ int main(int argc, char ** argv)
|
||||||
boost::graph_traits<Graph>::vertices_size_type n = boost::num_vertices(g);
|
boost::graph_traits<Graph>::vertices_size_type n = boost::num_vertices(g);
|
||||||
|
|
||||||
// generate gnuplot files for plotting this graph
|
// generate gnuplot files for plotting this graph
|
||||||
std::string fileprefix = "y" + boost::lexical_cast<std::string>(k) + "n" + boost::lexical_cast<std::string>(n);
|
std::string fileprefix = "y" + std::to_string(k) + "n" + std::to_string(n);
|
||||||
CGAL::gnuplot_output_2(g, fileprefix);
|
CGAL::gnuplot_output_2(g, fileprefix);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,6 @@
|
||||||
#include <iterator>
|
#include <iterator>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <boost/lexical_cast.hpp>
|
|
||||||
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
|
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
|
||||||
#include <CGAL/Construct_yao_graph_2.h>
|
#include <CGAL/Construct_yao_graph_2.h>
|
||||||
#include <CGAL/gnuplot_output_2.h>
|
#include <CGAL/gnuplot_output_2.h>
|
||||||
|
|
@ -72,7 +71,7 @@ int main(int argc, char ** argv)
|
||||||
boost::graph_traits<Graph>::vertices_size_type n = boost::num_vertices(g);
|
boost::graph_traits<Graph>::vertices_size_type n = boost::num_vertices(g);
|
||||||
|
|
||||||
// generate gnuplot files for plotting this graph
|
// generate gnuplot files for plotting this graph
|
||||||
std::string fileprefix = "y" + boost::lexical_cast<std::string>(k) + "n" + boost::lexical_cast<std::string>(n);
|
std::string fileprefix = "y" + std::to_string(k) + "n" + std::to_string(n);
|
||||||
CGAL::gnuplot_output_2(g, fileprefix);
|
CGAL::gnuplot_output_2(g, fileprefix);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,7 @@
|
||||||
|
|
||||||
|
|
||||||
#include <CGAL/Nef_3/SNC_decorator.h>
|
#include <CGAL/Nef_3/SNC_decorator.h>
|
||||||
|
#include <CGAL/Nef_3/SNC_external_structure.h>
|
||||||
#include <CGAL/Nef_3/SNC_intersection.h>
|
#include <CGAL/Nef_3/SNC_intersection.h>
|
||||||
|
|
||||||
#undef CGAL_NEF_DEBUG
|
#undef CGAL_NEF_DEBUG
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,7 @@
|
||||||
|
|
||||||
#include <CGAL/Modifier_base.h>
|
#include <CGAL/Modifier_base.h>
|
||||||
#include <CGAL/Nef_3/SNC_decorator.h>
|
#include <CGAL/Nef_3/SNC_decorator.h>
|
||||||
|
#include <CGAL/Nef_3/SNC_point_locator.h>
|
||||||
#include <CGAL/Nef_3/SNC_intersection.h>
|
#include <CGAL/Nef_3/SNC_intersection.h>
|
||||||
#include <CGAL/Convex_decomposition_3/SM_walls.h>
|
#include <CGAL/Convex_decomposition_3/SM_walls.h>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -14,8 +14,9 @@
|
||||||
|
|
||||||
#include <CGAL/license/Convex_decomposition_3.h>
|
#include <CGAL/license/Convex_decomposition_3.h>
|
||||||
|
|
||||||
|
#include <CGAL/Modifier_base.h>
|
||||||
#include <CGAL/Nef_3/SNC_decorator.h>
|
#include <CGAL/Nef_3/SNC_decorator.h>
|
||||||
|
#include <CGAL/Nef_3/SNC_point_locator.h>
|
||||||
#include <CGAL/Convex_decomposition_3/SM_walls.h>
|
#include <CGAL/Convex_decomposition_3/SM_walls.h>
|
||||||
|
|
||||||
namespace CGAL {
|
namespace CGAL {
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,8 @@
|
||||||
|
|
||||||
#include <CGAL/license/Convex_decomposition_3.h>
|
#include <CGAL/license/Convex_decomposition_3.h>
|
||||||
|
|
||||||
|
#include <CGAL/Nef_S2/SM_decorator.h>
|
||||||
|
#include <CGAL/Nef_S2/SM_point_locator.h>
|
||||||
|
|
||||||
#undef CGAL_NEF_DEBUG
|
#undef CGAL_NEF_DEBUG
|
||||||
#define CGAL_NEF_DEBUG 227
|
#define CGAL_NEF_DEBUG 227
|
||||||
|
|
|
||||||
|
|
@ -14,10 +14,12 @@
|
||||||
|
|
||||||
#include <CGAL/license/Convex_decomposition_3.h>
|
#include <CGAL/license/Convex_decomposition_3.h>
|
||||||
|
|
||||||
|
#include <CGAL/Modifier_base.h>
|
||||||
#include <CGAL/Nef_3/SNC_decorator.h>
|
#include <CGAL/Nef_3/SNC_decorator.h>
|
||||||
|
#include <CGAL/Nef_3/SNC_point_locator.h>
|
||||||
#include <CGAL/Nef_3/SNC_intersection.h>
|
#include <CGAL/Nef_3/SNC_intersection.h>
|
||||||
#include <CGAL/Nef_S2/Normalizing.h>
|
#include <CGAL/Nef_S2/Normalizing.h>
|
||||||
|
#include <CGAL/Convex_decomposition_3/Ray_hit_generator.h>
|
||||||
#include <CGAL/Convex_decomposition_3/SM_walls.h>
|
#include <CGAL/Convex_decomposition_3/SM_walls.h>
|
||||||
|
|
||||||
#undef CGAL_NEF_DEBUG
|
#undef CGAL_NEF_DEBUG
|
||||||
|
|
|
||||||
|
|
@ -14,10 +14,12 @@
|
||||||
|
|
||||||
#include <CGAL/license/Convex_decomposition_3.h>
|
#include <CGAL/license/Convex_decomposition_3.h>
|
||||||
|
|
||||||
|
#include <CGAL/Modifier_base.h>
|
||||||
#include <CGAL/Nef_3/SNC_decorator.h>
|
#include <CGAL/Nef_3/SNC_decorator.h>
|
||||||
|
#include <CGAL/Nef_3/SNC_point_locator.h>
|
||||||
#include <CGAL/Nef_3/SNC_intersection.h>
|
#include <CGAL/Nef_3/SNC_intersection.h>
|
||||||
#include <CGAL/Nef_S2/Normalizing.h>
|
#include <CGAL/Nef_S2/Normalizing.h>
|
||||||
|
#include <CGAL/Convex_decomposition_3/Ray_hit_generator.h>
|
||||||
#include <CGAL/Convex_decomposition_3/SM_walls.h>
|
#include <CGAL/Convex_decomposition_3/SM_walls.h>
|
||||||
|
|
||||||
#undef CGAL_NEF_DEBUG
|
#undef CGAL_NEF_DEBUG
|
||||||
|
|
|
||||||
|
|
@ -14,8 +14,9 @@
|
||||||
|
|
||||||
#include <CGAL/license/Convex_decomposition_3.h>
|
#include <CGAL/license/Convex_decomposition_3.h>
|
||||||
|
|
||||||
|
#include <CGAL/Modifier_base.h>
|
||||||
#include<CGAL/Nef_3/SNC_decorator.h>
|
#include <CGAL/Nef_3/SNC_decorator.h>
|
||||||
|
#include <CGAL/Convex_decomposition_3/is_reflex_sedge.h>
|
||||||
#include <CGAL/Convex_decomposition_3/Single_wall_creator3.h>
|
#include <CGAL/Convex_decomposition_3/Single_wall_creator3.h>
|
||||||
#include <CGAL/Convex_decomposition_3/External_structure_builder.h>
|
#include <CGAL/Convex_decomposition_3/External_structure_builder.h>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,8 @@
|
||||||
|
|
||||||
#include <CGAL/license/Convex_decomposition_3.h>
|
#include <CGAL/license/Convex_decomposition_3.h>
|
||||||
|
|
||||||
|
#include <CGAL/enum.h>
|
||||||
|
#include <CGAL/Origin.h>
|
||||||
|
|
||||||
#undef CGAL_NEF_DEBUG
|
#undef CGAL_NEF_DEBUG
|
||||||
#define CGAL_NEF_DEBUG 239
|
#define CGAL_NEF_DEBUG 239
|
||||||
|
|
|
||||||
|
|
@ -143,6 +143,10 @@ check whether a given sequence of 2D points forms a (counter)clockwise strongly
|
||||||
convex polygon. These are used in postcondition
|
convex polygon. These are used in postcondition
|
||||||
testing of the two-dimensional convex hull functions.
|
testing of the two-dimensional convex hull functions.
|
||||||
|
|
||||||
|
In case you want to keep collinear points you can use the 2D Delaunay triangulation as
|
||||||
|
in the following example. This sequence is then <em>not</em> strongly convex.
|
||||||
|
|
||||||
|
\cgalExample{Convex_hull_2/ch_delaunay_2.cpp}
|
||||||
|
|
||||||
*/
|
*/
|
||||||
} /* namespace CGAL */
|
} /* namespace CGAL */
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,4 +6,5 @@
|
||||||
\example Convex_hull_2/ch_timing.cpp
|
\example Convex_hull_2/ch_timing.cpp
|
||||||
\example Convex_hull_2/iostream_convex_hull_2.cpp
|
\example Convex_hull_2/iostream_convex_hull_2.cpp
|
||||||
\example Convex_hull_2/vector_convex_hull_2.cpp
|
\example Convex_hull_2/vector_convex_hull_2.cpp
|
||||||
|
\example Convex_hull_2/ch_delaunay_2.cpp
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
|
||||||
|
#include <CGAL/Delaunay_triangulation_2.h>
|
||||||
|
#include <list>
|
||||||
|
#include <iostream>
|
||||||
|
|
||||||
|
typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
|
||||||
|
typedef K::Point_2 Point_2;
|
||||||
|
typedef CGAL::Delaunay_triangulation_2<K> Delaunay_triangulation_2;
|
||||||
|
|
||||||
|
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
std::vector<Point_2> input = { Point_2(0, 0), Point_2(1,1), Point_2(2,0), Point_2(2,2), Point_2(1,2), Point_2(0,2) };
|
||||||
|
|
||||||
|
Delaunay_triangulation_2 dt(input.begin(), input.end());
|
||||||
|
|
||||||
|
std::list<Point_2> result;
|
||||||
|
Delaunay_triangulation_2::Vertex_circulator vc = dt.incident_vertices(dt.infinite_vertex()), done(vc);
|
||||||
|
do{
|
||||||
|
std ::cout << vc->point() << std::endl;
|
||||||
|
// push_front in order to obtain the counterclockwise sequence
|
||||||
|
result.push_front(vc->point());
|
||||||
|
++vc;
|
||||||
|
}while(vc != done);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
@ -27,9 +27,5 @@ int main()
|
||||||
CGAL::ch__batch_test(cch_H_gmp);
|
CGAL::ch__batch_test(cch_H_gmp);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
CGAL::Convex_hull_constructive_traits_2< CGAL::Homogeneous<double> > cch_H_double;
|
|
||||||
std::cout << "Homogeneous<double>:" << std::endl;
|
|
||||||
CGAL::ch__batch_test(cch_H_double);
|
|
||||||
|
|
||||||
return EXIT_SUCCESS;
|
return EXIT_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -25,9 +25,5 @@ int main()
|
||||||
CGAL::ch__batch_test(ch_C_Qgmp);
|
CGAL::ch__batch_test(ch_C_Qgmp);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
CGAL::Cartesian<double> ch_C_double;
|
|
||||||
std::cout << "Cartesian<double>:" << std::endl;
|
|
||||||
CGAL::ch__batch_test(ch_C_double);
|
|
||||||
|
|
||||||
return EXIT_SUCCESS;
|
return EXIT_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -25,9 +25,5 @@ int main()
|
||||||
CGAL::ch__batch_test( ch_H_gmp );
|
CGAL::ch__batch_test( ch_H_gmp );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
CGAL::Homogeneous<double> ch_H_double;
|
|
||||||
std::cout << "Homogeneous<double>:" << std::endl;
|
|
||||||
CGAL::ch__batch_test( ch_H_double );
|
|
||||||
|
|
||||||
return EXIT_SUCCESS;
|
return EXIT_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue