mirror of https://github.com/CGAL/cgal
Merge branch 'master' into inventory-dockerfile-GF
This commit is contained in:
commit
e6bf48c50f
|
|
@ -1,75 +0,0 @@
|
|||
name: Filter Testsuite
|
||||
|
||||
on:
|
||||
issue_comment:
|
||||
types: [created]
|
||||
workflow_dispatch:
|
||||
|
||||
permissions: {}
|
||||
jobs:
|
||||
build:
|
||||
permissions:
|
||||
pull-requests: write # to create comment
|
||||
|
||||
if: (github.event.comment.user.login == 'sloriot' || github.event.comment.user.login == 'lrineau') && contains(github.event.comment.body, '/testme')
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/github-script@v7
|
||||
id: get_label
|
||||
with:
|
||||
result-encoding: string
|
||||
script: |
|
||||
//get branch name and username
|
||||
const pr_url = context.payload.issue.pull_request.url
|
||||
const pr_content = await github.request(pr_url)
|
||||
const label = pr_content.data.head.label
|
||||
const base = pr_content.data.base.ref
|
||||
console.log(label)
|
||||
return label+":"+base
|
||||
- name: Run Testsuite
|
||||
run: |
|
||||
mkdir -p ~/.ssh
|
||||
#ssh key
|
||||
(
|
||||
cat <<EOF
|
||||
${{ secrets.ssh_key }}
|
||||
EOF
|
||||
)>> ~/.ssh/id_rsa
|
||||
chmod 600 /home/runner/.ssh/id_rsa
|
||||
#ssh public key
|
||||
(
|
||||
cat <<EOF
|
||||
${{ secrets.ssh_key_pub }}
|
||||
EOF
|
||||
)>> ~/.ssh/id_rsa.pub
|
||||
chmod 644 /home/runner/.ssh/id_rsa.pub
|
||||
#known hosts
|
||||
wget --no-check-certificate https://cgal.geometryfactory.com/CGAL/ssh_known_hosts -O ~/.ssh/known_hosts
|
||||
#config file
|
||||
wget --no-check-certificate https://cgal.geometryfactory.com/CGAL/ssh_config -O ~/.ssh/config
|
||||
#list of hosts
|
||||
wget --no-check-certificate https://cgal.geometryfactory.com/CGAL/ssh_host_list -O ~/ssh_host_list
|
||||
#ssh command
|
||||
LABEL="${{ steps.get_label.outputs.result }}"
|
||||
USER_NAME=$(echo $LABEL | cut -d':' -f 1)
|
||||
BRANCH_NAME=$(echo $LABEL | cut -d':' -f 2)
|
||||
BASE=$(echo $LABEL | cut -d':' -f 3)
|
||||
PR_NUMBER=${{ github.event.issue.number }}
|
||||
mapfile -t HOSTS < ~/ssh_host_list;
|
||||
for i in ${!HOSTS[@]}; do
|
||||
HOST=$(echo ${HOSTS[$i]}|cut -d' ' -f 1 )
|
||||
PATH_TO_SCRIPT=$(echo ${HOSTS[$i]}|cut -d' ' -f 2 )
|
||||
echo "ssh ${HOST} ${PATH_TO_SCRIPT}/run_testsuite_from_branch_name.sh $USER_NAME $BRANCH_NAME $BASE $PR_NUMBER"
|
||||
ssh ${HOST} "${PATH_TO_SCRIPT}/run_testsuite_from_branch_name.sh $USER_NAME $BRANCH_NAME $BASE $PR_NUMBER"
|
||||
done
|
||||
- name: Post address
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
script: |
|
||||
const address = "Testsuite launched. Results will appear on the following page: https://cgal.geometryfactory.com/~cgaltest/test_suite/TESTRESULTS/index.shtml "
|
||||
github.issues.createComment({
|
||||
owner: "CGAL",
|
||||
repo: "cgal",
|
||||
issue_number: ${{ github.event.issue.number }},
|
||||
body: address
|
||||
});
|
||||
|
|
@ -10,17 +10,18 @@ jobs:
|
|||
reuse:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: REUSE version
|
||||
uses: fsfe/reuse-action@v4
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- name: Display reuse-tool version
|
||||
uses: fsfe/reuse-action@v5
|
||||
with:
|
||||
args: --version
|
||||
- name: REUSE lint
|
||||
uses: fsfe/reuse-action@v4
|
||||
- name: REUSE Compliance Check
|
||||
uses: fsfe/reuse-action@v5
|
||||
with:
|
||||
args: --include-submodules lint
|
||||
- name: REUSE SPDX SBOM
|
||||
uses: fsfe/reuse-action@v4
|
||||
uses: fsfe/reuse-action@v5
|
||||
with:
|
||||
args: spdx
|
||||
- name: install dependencies
|
||||
|
|
@ -29,7 +30,7 @@ jobs:
|
|||
run: |
|
||||
mkdir -p ./release
|
||||
cmake -DDESTINATION=./release -DCGAL_VERSION=9.9 -P ./Scripts/developer_scripts/cgal_create_release_with_cmake.cmake
|
||||
- name: REUSE lint release tarball
|
||||
uses: fsfe/reuse-action@v4
|
||||
- name: REUSE Compliance Check of release tarball
|
||||
uses: fsfe/reuse-action@v5
|
||||
with:
|
||||
args: --root ./release/CGAL-9.9 --include-submodules lint
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ void validate(std::any & v, const std::vector<std::string> & values,
|
|||
Option_parser::my_validate<Option_parser::Strategy_id>(v, values);
|
||||
}
|
||||
|
||||
/*! Constructor */
|
||||
/*! constructs */
|
||||
Option_parser::Option_parser() :
|
||||
m_generic_opts("Generic options"),
|
||||
m_config_opts("Configuration options"),
|
||||
|
|
@ -136,7 +136,7 @@ Option_parser::Option_parser() :
|
|||
m_positional_opts.add("input-file", -1);
|
||||
}
|
||||
|
||||
/*! Parse the options */
|
||||
/*! parses the options */
|
||||
void Option_parser::operator()(int argc, char * argv[])
|
||||
{
|
||||
po::store(po::command_line_parser(argc, argv).
|
||||
|
|
@ -225,20 +225,20 @@ void Option_parser::operator()(int argc, char * argv[])
|
|||
}
|
||||
}
|
||||
|
||||
/*! Obtain the base file-name */
|
||||
/*! obtains the base file-name */
|
||||
const std::string & Option_parser::get_file_name(unsigned int i) const
|
||||
{
|
||||
return m_variable_map["input-file"].as<Input_path>()[i];
|
||||
}
|
||||
|
||||
/*! Obtain the full file-name */
|
||||
/*! obtains the full file-name */
|
||||
const std::string & Option_parser::get_full_name(unsigned int i) const
|
||||
{ return m_full_names[i]; }
|
||||
|
||||
/*! Obtain number of type options */
|
||||
/*! obtains number of type options */
|
||||
unsigned int Option_parser::get_number_opts(Type_id &)
|
||||
{ return sizeof(s_type_opts) / sizeof(char *); }
|
||||
|
||||
/*! Obtain number of strategy options */
|
||||
/*! obtains number of strategy options */
|
||||
unsigned int Option_parser::get_number_opts(Strategy_id &)
|
||||
{ return sizeof(s_strategy_opts) / sizeof(char *); }
|
||||
|
|
|
|||
|
|
@ -62,17 +62,17 @@ public:
|
|||
typedef Vector_strategy_id::iterator Vector_strategy_id_iter;
|
||||
|
||||
public:
|
||||
/*! \brief obtains number of type options */
|
||||
/*! obtains number of type options */
|
||||
static unsigned int get_number_opts(Type_id &);
|
||||
|
||||
/*! \brief obtains number of strategy options */
|
||||
/*! obtains number of strategy options */
|
||||
static unsigned int get_number_opts(Strategy_id &);
|
||||
|
||||
/*! Compare the i-th type option to a given option */
|
||||
/*! compares the i-th type option to a given option */
|
||||
static bool compare_opt(unsigned int i, const char * opt, Type_id &)
|
||||
{ return strcmp(s_type_opts[i], opt) == 0; }
|
||||
|
||||
/*! Compare the i-th strategy option to a given option */
|
||||
/*! compares the i-th strategy option to a given option */
|
||||
static bool compare_opt(unsigned int i, const char * opt, Strategy_id &)
|
||||
{ return strcmp(s_strategy_opts[i], opt) == 0; }
|
||||
|
||||
|
|
@ -94,19 +94,19 @@ public:
|
|||
Input_file_missing_error(std::string & str) : error(str) {}
|
||||
};
|
||||
|
||||
/*! Parse the options */
|
||||
/*! parses the options */
|
||||
void operator()(int argc, char * argv[]);
|
||||
|
||||
/*! Obtain the verbosity level */
|
||||
/*! obtains the verbosity level */
|
||||
unsigned int get_verbose_level() const { return m_verbose_level; }
|
||||
|
||||
/*! Obtain the number of input files */
|
||||
/*! obtains the number of input files */
|
||||
unsigned int get_number_files() const { return m_number_files; }
|
||||
|
||||
/*! \brief obtains the base file-name */
|
||||
/*! obtains the base file-name */
|
||||
const std::string & get_file_name(unsigned int i) const;
|
||||
|
||||
/*! \brief obtains the full file-name */
|
||||
/*! obtains the full file-name */
|
||||
const std::string & get_full_name(unsigned int i) const;
|
||||
|
||||
bool get_postscript() const { return m_postscript; }
|
||||
|
|
@ -117,10 +117,10 @@ public:
|
|||
const char * get_strategy_name(Strategy_code id) const
|
||||
{ return s_strategy_opts[id]; }
|
||||
|
||||
/*! Obtain the window width */
|
||||
/*! obtains the window width */
|
||||
unsigned int get_width() const { return m_win_width; }
|
||||
|
||||
/*! Obtain the window height */
|
||||
/*! obtains the window height */
|
||||
unsigned int get_height() const { return m_win_height; }
|
||||
|
||||
template <class MyId>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright(c) 2023, 2024 Tel-Aviv University (Israel).
|
||||
// Copyright (c) 2023, 2024 Tel-Aviv University (Israel).
|
||||
// All rights reserved.
|
||||
//
|
||||
// This file is part of CGAL (www.cgal.org).
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright(c) 2023, 2024 Tel-Aviv University (Israel).
|
||||
// Copyright (c) 2023, 2024 Tel-Aviv University (Israel).
|
||||
// All rights reserved.
|
||||
//
|
||||
// This file is part of CGAL (www.cgal.org).
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright(c) 2023, 2024 Tel-Aviv University (Israel).
|
||||
// Copyright (c) 2023, 2024 Tel-Aviv University (Israel).
|
||||
// All rights reserved.
|
||||
//
|
||||
// This file is part of CGAL (www.cgal.org).
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright(c) 2023, 2024 Tel-Aviv University (Israel).
|
||||
// Copyright (c) 2023, 2024 Tel-Aviv University (Israel).
|
||||
// All rights reserved.
|
||||
//
|
||||
// This file is part of CGAL (www.cgal.org).
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright(c) 2023, 2024 Tel-Aviv University (Israel).
|
||||
// Copyright (c) 2023, 2024 Tel-Aviv University (Israel).
|
||||
// All rights reserved.
|
||||
//
|
||||
// This file is part of CGAL (www.cgal.org).
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright(c) 2023, 2024 Tel-Aviv University (Israel).
|
||||
// Copyright (c) 2023, 2024 Tel-Aviv University (Israel).
|
||||
// All rights reserved.
|
||||
//
|
||||
// This file is part of CGAL (www.cgal.org).
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright(c) 2023, 2024 Tel-Aviv University (Israel).
|
||||
// Copyright (c) 2023, 2024 Tel-Aviv University (Israel).
|
||||
// All rights reserved.
|
||||
//
|
||||
// This file is part of CGAL (www.cgal.org).
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright(c) 2023, 2024 Tel-Aviv University(Israel).
|
||||
// Copyright (c) 2023, 2024 Tel-Aviv University(Israel).
|
||||
// All rights reserved.
|
||||
//
|
||||
// This file is part of CGAL (www.cgal.org).
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright(c) 2023, 2024 Tel-Aviv University (Israel).
|
||||
// Copyright (c) 2023, 2024 Tel-Aviv University (Israel).
|
||||
// All rights reserved.
|
||||
//
|
||||
// This file is part of CGAL (www.cgal.org).
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright(c) 2023, 2024 Tel-Aviv University (Israel).
|
||||
// Copyright (c) 2023, 2024 Tel-Aviv University (Israel).
|
||||
// All rights reserved.
|
||||
//
|
||||
// This file is part of CGAL (www.cgal.org).
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright(c) 2023, 2024 Tel-Aviv University (Israel).
|
||||
// Copyright (c) 2023, 2024 Tel-Aviv University (Israel).
|
||||
// All rights reserved.
|
||||
//
|
||||
// This file is part of CGAL (www.cgal.org).
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright(c) 2023, 2024 Tel-Aviv University (Israel).
|
||||
// Copyright (c) 2023, 2024 Tel-Aviv University (Israel).
|
||||
// All rights reserved.
|
||||
//
|
||||
// This file is part of CGAL (www.cgal.org).
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright(c) 2023, 2024 Tel-Aviv University (Israel).
|
||||
// Copyright (c) 2023, 2024 Tel-Aviv University (Israel).
|
||||
// All rights reserved.
|
||||
//
|
||||
// This file is part of CGAL (www.cgal.org).
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright(c) 2023, 2024 Tel-Aviv University (Israel).
|
||||
// Copyright (c) 2023, 2024 Tel-Aviv University (Israel).
|
||||
// All rights reserved.
|
||||
//
|
||||
// This file is part of CGAL (www.cgal.org).
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright(c) 2023, 2024 Tel-Aviv University (Israel).
|
||||
// Copyright (c) 2023, 2024 Tel-Aviv University (Israel).
|
||||
// All rights reserved.
|
||||
//
|
||||
// This file is part of CGAL (www.cgal.org).
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright(c) 2023, 2024 Tel-Aviv University (Israel).
|
||||
// Copyright (c) 2023, 2024 Tel-Aviv University (Israel).
|
||||
// All rights reserved.
|
||||
//
|
||||
// This file is part of CGAL (www.cgal.org).
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright(c) 2023, 2024 Tel-Aviv University (Israel).
|
||||
// Copyright (c) 2023, 2024 Tel-Aviv University (Israel).
|
||||
// All rights reserved.
|
||||
//
|
||||
// This file is part of CGAL (www.cgal.org).
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright(c) 2023, 2024 Tel-Aviv University (Israel).
|
||||
// Copyright (c) 2023, 2024 Tel-Aviv University (Israel).
|
||||
// All rights reserved.
|
||||
//
|
||||
// This file is part of CGAL (www.cgal.org).
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright(c) 2023, 2024 Tel-Aviv University (Israel).
|
||||
// Copyright (c) 2023, 2024 Tel-Aviv University (Israel).
|
||||
// All rights reserved.
|
||||
//
|
||||
// This file is part of CGAL (www.cgal.org).
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright(c) 2023, 2024 Tel-Aviv University (Israel).
|
||||
// Copyright (c) 2023, 2024 Tel-Aviv University (Israel).
|
||||
// All rights reserved.
|
||||
//
|
||||
// This file is part of CGAL (www.cgal.org).
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright(c) 2023, 2024 Tel-Aviv University (Israel).
|
||||
// Copyright (c) 2023, 2024 Tel-Aviv University (Israel).
|
||||
// All rights reserved.
|
||||
//
|
||||
// This file is part of CGAL (www.cgal.org).
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright(c) 2023, 2024 Tel-Aviv University (Israel).
|
||||
// Copyright (c) 2023, 2024 Tel-Aviv University (Israel).
|
||||
// All rights reserved.
|
||||
//
|
||||
// This file is part of CGAL (www.cgal.org).
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright(c) 2023, 2024 Tel-Aviv University (Israel).
|
||||
// Copyright (c) 2023, 2024 Tel-Aviv University (Israel).
|
||||
// All rights reserved.
|
||||
//
|
||||
// This file is part of CGAL (www.cgal.org).
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright(c) 2023, 2024 Tel-Aviv University (Israel).
|
||||
// Copyright (c) 2023, 2024 Tel-Aviv University (Israel).
|
||||
// All rights reserved.
|
||||
//
|
||||
// This file is part of CGAL (www.cgal.org).
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright(c) 2023, 2024 Tel-Aviv University (Israel).
|
||||
// Copyright (c) 2023, 2024 Tel-Aviv University (Israel).
|
||||
// All rights reserved.
|
||||
//
|
||||
// This file is part of CGAL (www.cgal.org).
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright(c) 2023, 2024 Tel-Aviv University (Israel).
|
||||
// Copyright (c) 2023, 2024 Tel-Aviv University (Israel).
|
||||
// All rights reserved.
|
||||
//
|
||||
// This file is part of CGAL (www.cgal.org).
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright(c) 2023, 2024 Tel-Aviv University (Israel).
|
||||
// Copyright (c) 2023, 2024 Tel-Aviv University (Israel).
|
||||
// All rights reserved.
|
||||
//
|
||||
// This file is part of CGAL (www.cgal.org).
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright(c) 2023, 2024 Tel-Aviv University (Israel).
|
||||
// Copyright (c) 2023, 2024 Tel-Aviv University (Israel).
|
||||
// All rights reserved.
|
||||
//
|
||||
// This file is part of CGAL (www.cgal.org).
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright(c) 2023, 2024 Tel-Aviv University (Israel).
|
||||
// Copyright (c) 2023, 2024 Tel-Aviv University (Israel).
|
||||
// All rights reserved.
|
||||
//
|
||||
// This file is part of CGAL (www.cgal.org).
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright(c) 2023, 2024 Tel-Aviv University (Israel).
|
||||
// Copyright (c) 2023, 2024 Tel-Aviv University (Israel).
|
||||
// All rights reserved.
|
||||
//
|
||||
// This file is part of CGAL (www.cgal.org).
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright(c) 2023, 2024 Tel-Aviv University (Israel).
|
||||
// Copyright (c) 2023, 2024 Tel-Aviv University (Israel).
|
||||
// All rights reserved.
|
||||
//
|
||||
// This file is part of CGAL (www.cgal.org).
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright(c) 2023, 2024 Tel-Aviv University (Israel).
|
||||
// Copyright (c) 2023, 2024 Tel-Aviv University (Israel).
|
||||
// All rights reserved.
|
||||
//
|
||||
// This file is part of CGAL (www.cgal.org).
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright(c) 2023, 2024 Tel-Aviv University (Israel).
|
||||
// Copyright (c) 2023, 2024 Tel-Aviv University (Israel).
|
||||
// All rights reserved.
|
||||
//
|
||||
// This file is part of CGAL (www.cgal.org).
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright(c) 2023, 2024 Tel-Aviv University (Israel).
|
||||
// Copyright (c) 2023, 2024 Tel-Aviv University (Israel).
|
||||
// All rights reserved.
|
||||
//
|
||||
// This file is part of CGAL (www.cgal.org).
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright(c) 2023, 2024 Tel-Aviv University (Israel).
|
||||
// Copyright (c) 2023, 2024 Tel-Aviv University (Israel).
|
||||
// All rights reserved.
|
||||
//
|
||||
// This file is part of CGAL (www.cgal.org).
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright(c) 2023, 2024 Tel-Aviv University (Israel).
|
||||
// Copyright (c) 2023, 2024 Tel-Aviv University (Israel).
|
||||
// All rights reserved.
|
||||
//
|
||||
// This file is part of CGAL (www.cgal.org).
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright(c) 2023, 2024 Tel-Aviv University (Israel).
|
||||
// Copyright (c) 2023, 2024 Tel-Aviv University (Israel).
|
||||
// All rights reserved.
|
||||
//
|
||||
// This file is part of CGAL (www.cgal.org).
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright(c) 2023, 2024 Tel-Aviv University (Israel).
|
||||
// Copyright (c) 2023, 2024 Tel-Aviv University (Israel).
|
||||
// All rights reserved.
|
||||
//
|
||||
// This file is part of CGAL (www.cgal.org).
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright(c) 2023, 2024 Tel-Aviv University (Israel).
|
||||
// Copyright (c) 2023, 2024 Tel-Aviv University (Israel).
|
||||
// All rights reserved.
|
||||
//
|
||||
// This file is part of CGAL (www.cgal.org).
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright(c) 2023, 2024 Tel-Aviv University (Israel).
|
||||
// Copyright (c) 2023, 2024 Tel-Aviv University (Israel).
|
||||
// All rights reserved.
|
||||
//
|
||||
// This file is part of CGAL (www.cgal.org).
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright(c) 2023, 2024 Tel-Aviv University (Israel).
|
||||
// Copyright (c) 2023, 2024 Tel-Aviv University (Israel).
|
||||
// All rights reserved.
|
||||
//
|
||||
// This file is part of CGAL (www.cgal.org).
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright(c) 2023, 2024 Tel-Aviv University (Israel).
|
||||
// Copyright (c) 2023, 2024 Tel-Aviv University (Israel).
|
||||
// All rights reserved.
|
||||
//
|
||||
// This file is part of CGAL (www.cgal.org).
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright(c) 2023, 2024 Tel-Aviv University (Israel).
|
||||
// Copyright (c) 2023, 2024 Tel-Aviv University (Israel).
|
||||
// All rights reserved.
|
||||
//
|
||||
// This file is part of CGAL (www.cgal.org).
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright(c) 2023, 2024 Tel-Aviv University (Israel).
|
||||
// Copyright (c) 2023, 2024 Tel-Aviv University (Israel).
|
||||
// All rights reserved.
|
||||
//
|
||||
// This file is part of CGAL (www.cgal.org).
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright(c) 2023, 2024 Tel-Aviv University (Israel).
|
||||
// Copyright (c) 2023, 2024 Tel-Aviv University (Israel).
|
||||
// All rights reserved.
|
||||
//
|
||||
// This file is part of CGAL (www.cgal.org).
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright(c) 2023, 2024 Tel-Aviv University (Israel).
|
||||
// Copyright (c) 2023, 2024 Tel-Aviv University (Israel).
|
||||
// All rights reserved.
|
||||
//
|
||||
// This file is part of CGAL (www.cgal.org).
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright(c) 2023, 2024 Tel-Aviv University (Israel).
|
||||
// Copyright (c) 2023, 2024 Tel-Aviv University (Israel).
|
||||
// All rights reserved.
|
||||
//
|
||||
// This file is part of CGAL (www.cgal.org).
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright(c) 2023, 2024 Tel-Aviv University (Israel).
|
||||
// Copyright (c) 2023, 2024 Tel-Aviv University (Israel).
|
||||
// All rights reserved.
|
||||
//
|
||||
// This file is part of CGAL (www.cgal.org).
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright(c) 2023, 2024 Tel-Aviv University (Israel).
|
||||
// Copyright (c) 2023, 2024 Tel-Aviv University (Israel).
|
||||
// All rights reserved.
|
||||
//
|
||||
// This file is part of CGAL (www.cgal.org).
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright(c) 2023, 2024 Tel-Aviv University (Israel).
|
||||
// Copyright (c) 2023, 2024 Tel-Aviv University (Israel).
|
||||
// All rights reserved.
|
||||
//
|
||||
// This file is part of CGAL (www.cgal.org).
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -1,355 +1,343 @@
|
|||
|
||||
namespace CGAL {
|
||||
|
||||
/*!
|
||||
\ingroup PkgArrangementOnSurface2TraitsClasses
|
||||
/*! \ingroup PkgArrangementOnSurface2TraitsClasses
|
||||
*
|
||||
* The traits class `Arr_algebraic_segment_traits_2` is a model of the
|
||||
* `ArrangementTraits_2` concept that handles planar algebraic curves of
|
||||
* arbitrary degree, and \f$ x\f$-monotone of such curves. A planar (real)
|
||||
* <I>algebraic curve</I> is the vanishing set of a polynomial in two variables,
|
||||
* that is, the curve is defined by the defining equation \f[
|
||||
* f(x):=\sum_{i+j\leq n} a_{ij} x^i y^j =0, \f] where \f$ n\f$ is the degree of
|
||||
* the curve.
|
||||
*
|
||||
* The traits class allows the construction of algebraic curves, by specifying
|
||||
* their implicit equation. \f$ x\f$-monotone and vertical segments of a curve
|
||||
* can also be defined; unbounded curves and segments are supported. The
|
||||
* template parameter `Coefficient` defines the innermost coefficient type of
|
||||
* the polynomials. Currently, the types `leda::integer` and `CORE::BigInt` are
|
||||
* supported as well as any instance of `CGAL::Sqrt_extension` that is
|
||||
* instantiated with one of the integral types above.
|
||||
*
|
||||
* \cgalModels{ArrangementTraits_2}
|
||||
*/
|
||||
|
||||
The traits class `Arr_algebraic_segment_traits_2` is a model of the `ArrangementTraits_2`
|
||||
concept that handles planar algebraic curves of arbitrary degree,
|
||||
and \f$ x\f$-monotone of such curves.
|
||||
A planar (real) <I>algebraic curve</I>
|
||||
is the vanishing set of a polynomial in two variables, that is, the
|
||||
curve is defined by the defining equation
|
||||
\f[ f(x):=\sum_{i+j\leq n} a_{ij} x^i y^j =0, \f]
|
||||
where \f$ n\f$ is the degree of the curve.
|
||||
|
||||
The traits class allows the construction of algebraic curves,
|
||||
by specifying their implicit equation. \f$ x\f$-monotone and vertical segments
|
||||
of a curve can also be defined; unbounded curves and segments are supported.
|
||||
The template parameter `Coefficient` defines
|
||||
the innermost coefficient type of the polynomials. Currently,
|
||||
the types `leda::integer` and `CORE::BigInt` are supported as well
|
||||
as any instance of `CGAL::Sqrt_extension` that is instantiated with
|
||||
one of the integral types above.
|
||||
|
||||
\cgalModels{ArrangementTraits_2}
|
||||
|
||||
|
||||
*/
|
||||
template <typename Coefficient>
|
||||
class Arr_algebraic_segment_traits_2 {
|
||||
public:
|
||||
|
||||
/// \name Types
|
||||
/// @{
|
||||
|
||||
/*! Value to specify whether a point should be in the interior of a segment, or
|
||||
* its minimal point, or its maximal point in lexicographic order.
|
||||
*/
|
||||
enum Site_of_point { POINT_IN_INTERIOR = 0, MIN_ENDPOINT = -1, MAX_ENDPOINT = 1 };
|
||||
|
||||
/*! the type for bivariate polynomials, with innermost coefficient type
|
||||
* `Coefficient`. Constitutes a model of the concept `Polynomial_d` with two
|
||||
* variables.
|
||||
*
|
||||
* \sa `CGAL::Polynomial_d`
|
||||
*/
|
||||
typedef unspecified_type Polynomial_2;
|
||||
|
||||
/*! model for the concept `AlgebraicKernel_1`
|
||||
*/
|
||||
typedef unspecified_type Algebraic_kernel_1;
|
||||
|
||||
/*! represents coordinates of points.
|
||||
* Typedef from `Algebraic_kernel_1::Algebraic_real_1`
|
||||
*/
|
||||
typedef unspecified_type Algebraic_real_1;
|
||||
|
||||
/*! Typedef from `Algebraic_kernel_1::Bound`
|
||||
*/
|
||||
typedef unspecified_type Bound;
|
||||
|
||||
/// @}
|
||||
|
||||
/// \name Accessing functor objects
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
|
||||
*/
|
||||
Construct_curve_2 construct_curve_2_object() const;
|
||||
|
||||
/*!
|
||||
|
||||
*/
|
||||
Construct_point_2 construct_point_2_object() const;
|
||||
|
||||
/*!
|
||||
|
||||
*/
|
||||
Construct_x_monotone_segment_2 construct_x_monotone_segment_2_object() const;
|
||||
|
||||
/// @}
|
||||
|
||||
/*!
|
||||
|
||||
*/
|
||||
class Construct_curve_2 {
|
||||
public:
|
||||
|
||||
/// \name Object Creation Functors
|
||||
/// @{
|
||||
|
||||
/*! Returns a `Curve_2` object that represents the curve defined by the
|
||||
* polynomial `p`
|
||||
*/
|
||||
Curve_2 operator() (Polynomial_2 p);
|
||||
|
||||
/*! Returns a `Curve_2` object specified by `s`. The passed string represents
|
||||
* the defining polynomial of the curve and must be given in a MAPLE-readable
|
||||
* format using "x" as first and "y" as second variable, e.g.,
|
||||
* \f$(x^3*y-2*x)*(-6*x-y^3*x^6)\f$ for integer coefficients, and
|
||||
* \f$3/2*x*y^4-5/7*x^2+3/1\f$ for rational coefficients.
|
||||
*/
|
||||
Curve_2 operator() (std::string s);
|
||||
|
||||
/// @}
|
||||
|
||||
}; /* end Arr_algebraic_segment_traits_2::Construct_curve_2 */
|
||||
|
||||
/*!
|
||||
|
||||
*/
|
||||
class Construct_point_2 {
|
||||
public:
|
||||
|
||||
/// \name Object Creation Functors
|
||||
/// @{
|
||||
|
||||
/*! Returns a `Point_2` object that represents the `arcno`-th
|
||||
* point in the fiber of `cv` at \f$ x\f$-coordinate `x`,
|
||||
* counted from the bottom, starting with zero.
|
||||
* \pre (`cv` must not have a vertical line at `x`,
|
||||
* and \f$ 0\leq arcno < c\f$, where \f$ c\f$ is the number of points
|
||||
* in the fiber of `cv` at `x`.)
|
||||
*/
|
||||
Point_2 operator() (Algebraic_real_1 x, Curve_2 cv, int arcno);
|
||||
|
||||
/*! Returns a `Point_2` object that represents the
|
||||
* point on `xcv` at \f$ x\f$-coordinate `x`
|
||||
* \pre (`x` is in the \f$ x\f$-range of `xcv`.)
|
||||
*/
|
||||
Point_2 operator() (Algebraic_real_1 x, X_monotone_curve_2 xcv);
|
||||
|
||||
/*! Returns a `Point_2` object that represents (x,y)
|
||||
*/
|
||||
Point_2 operator() (Algebraic_real_1 x, Algebraic_real_1 y);
|
||||
|
||||
/*! Returns a `Point_2` object that represents (x,y)
|
||||
*/
|
||||
Point_2 operator() (Coefficient x, Coefficient y);
|
||||
|
||||
/*! Returns a `Point_2` object that represents (x,y)
|
||||
*/
|
||||
Point_2 operator() (Bound x, Bound y);
|
||||
|
||||
/*! Returns a `Point_2` object that represents (x,y)
|
||||
*/
|
||||
Point_2 operator() (int x, int y);
|
||||
|
||||
/// @}
|
||||
|
||||
}; /* end Arr_algebraic_segment_traits_2::Construct_point_2 */
|
||||
|
||||
/*!
|
||||
|
||||
*/
|
||||
class Construct_x_monotone_segment_2 {
|
||||
public:
|
||||
|
||||
/// \name Object Creation Functors
|
||||
/// @{
|
||||
|
||||
/*! inserts a sequence of `X_monotone_curve_2` objects (terminal segments) into
|
||||
* an output container given through an output iterator. These terminal segments
|
||||
* compose an \f$x\f$-monotone (or vertical) segment of a given curve that
|
||||
* starts in `end_min`, and ends in `end_max`.
|
||||
*
|
||||
* \param cv The input curve.
|
||||
* \param end_min The starting point.
|
||||
* \param end_max The ending point.
|
||||
* \param oi The output iterator that points at the output container.
|
||||
* \return The past-the-end iterator of the output container.
|
||||
*
|
||||
* \pre `end_min` must have a unique \f$x\f$-monotone segment to its right, or
|
||||
* `end_max` must have a unique \f$x\f$-monotone segment to its left.
|
||||
* Furthermore, `end_min` and `end_max` must be connected by an
|
||||
* \f$x\f$-monotone segment of `cv`)
|
||||
*/
|
||||
template <typename OutputIterator>
|
||||
OutputIterator operator() (Curve_2 cv, Point_2 end_min, Point_2 end_max,
|
||||
OutputIterator oi);
|
||||
|
||||
/*! inserts a sequence of `X_monotone_curve_2` objects into an output container
|
||||
* given through an output iterator. These segments form an \f$x\f$-monotone
|
||||
* (or vertical) segment of the curve `cv`.
|
||||
*
|
||||
* If `site_of_p==POINT_IN_INTERIOR`, the maximal segment is
|
||||
* returned that contains `p` in its interior.
|
||||
*
|
||||
* returned that contains `p` as its left endpoint.
|
||||
*
|
||||
* returned that contains `p` as its left endpoint.
|
||||
*
|
||||
* \pre (If `site_of_p==POINT_IN_INTERIOR`, `p`
|
||||
* must be an interior point of an \f$x\f$-monotone or a vertical
|
||||
* segment.
|
||||
* must either have a unique \f$x\f$-monotone segment to the right,
|
||||
* or a vertical segment from `p` upwards.
|
||||
* must either have a unique \f$x\f$-monotone segment to the left,
|
||||
* or a vertical segment from `p` downwards.)
|
||||
*/
|
||||
template <typename OutputIterator>
|
||||
OutputIterator operator() (Curve_2 cv, Point_2 p, Site_of_point site_of_p,
|
||||
OutputIterator out);
|
||||
|
||||
/*! inserts a sequence of `X_monotone_curve_2` objects into an output container
|
||||
* given through an output iterator. These segments form a straight-line
|
||||
* segment connecting the points `p` and `q`. If `p` and `q` share the same
|
||||
* \f$x\f$-coordinate, the constructed vertical segment consists of only one
|
||||
* `X_monotone_curve_2` object and can be computed efficiently. In the
|
||||
* non-vertical case, the construction is only possible if `p` and `q` have both
|
||||
* rational x- and y-coordinates.
|
||||
*
|
||||
* \pre (`p` must not be equal to `q`.)
|
||||
*/
|
||||
template <typename OutputIterator>
|
||||
OutputIterator operator() (Point_2 p, Point_2 q, OutputIterator out);
|
||||
|
||||
/// @}
|
||||
|
||||
}; /* end Arr_algebraic_segment_traits_2::Construct_x_monotone_segment_2 */
|
||||
|
||||
/*! Models the `ArrangementTraits_2::Curve_2` concept.
|
||||
* Represents algebraic curves. Internally, the type stores
|
||||
* topological-geometric information about the particular curve.
|
||||
* In order to use internal caching, instances should only be created
|
||||
* using the `Construct_curve_2` functor of the traits class.
|
||||
*/
|
||||
class Curve_2 {
|
||||
public:
|
||||
|
||||
/// \name Modifiers
|
||||
/// @{
|
||||
|
||||
/*! returns the defining polynomial of the curve.
|
||||
*/
|
||||
Polynomial_2 polynomial () const;
|
||||
|
||||
/// @}
|
||||
|
||||
}; /* end Arr_algebraic_segment_traits_2::Curve_2 */
|
||||
|
||||
/*! Models the `ArrangementBasicTraits_2::Point_2` concept.
|
||||
* Represents points in \f$ \mathbb{R}^2\f$. Intersection points of algebraic
|
||||
* curves are in general non-rational, so we need a data structure that is
|
||||
* capable of representing arbitrary points with algebraic coordinates.
|
||||
*
|
||||
* The traits class represents algebraic coordinates by the type
|
||||
* `Algebraic_real_1`, which is a model of the `AlgebraicReal_1` concept.
|
||||
* A point \f$ p\f$ is stored by a triple \f$ (x,cv,arcno)\f$,
|
||||
* where \f$ x\f$ is the \f$ x\f$-coordinate of a point, \f$ cv\f$ is an instance
|
||||
* of `Curve_2` that contains the point, (and has no vertical line at \f$ x\f$),
|
||||
* and \f$ arcno\f$ is an `int`, denoting that \f$ p\f$ is met as the
|
||||
* \f$arcno\f$-th point when shooting a vertical ray at \f$ x\f$, starting from
|
||||
* \f$-\infty\f$ (where counting starts with \f$ 0\f$).
|
||||
*
|
||||
* In addition to the methods listed below, the copy constructor and assignment
|
||||
* operator for `Point_2` objects are also supported.
|
||||
*
|
||||
* The functor `Construct_point_2` constructs `Point_2` instances.
|
||||
*/
|
||||
|
||||
class Point_2 {
|
||||
public:
|
||||
|
||||
/// \name Modifiers
|
||||
/// @{
|
||||
|
||||
/*! returns the \f$ x\f$-coordinate of `p`.
|
||||
*/
|
||||
Algebraic_real_1 x () const;
|
||||
|
||||
/*! returns the \f$ y\f$-coordinates of `p`.
|
||||
*
|
||||
* <B>Attention:</B> As described above, points are not stored
|
||||
* by their \f$ y\f$-coordinate in `Algebraic_real_1` representation. In fact,
|
||||
* this representation must be computed on demand, and might become quite
|
||||
* costly for points defined by high-degree polynomials. Therefore, it is
|
||||
* recommended to avoid to call this function as much as possible.
|
||||
*/
|
||||
Algebraic_real_1 y () const;
|
||||
|
||||
/*! returns a `Curve_2` instance that `p`is part of.
|
||||
*/
|
||||
Curve_2 curve () const;
|
||||
|
||||
/*! returns the arc number of `p`.
|
||||
*/
|
||||
int arcno () const;
|
||||
|
||||
/*! returns double-approximations of the \f$ x\f$- and \f$ y\f$-coordinates.
|
||||
*/
|
||||
std::pair<double,double> to_double () const;
|
||||
|
||||
/// @}
|
||||
|
||||
}; /* end Arr_algebraic_segment_traits_2::Point_2 */
|
||||
|
||||
/*! Models the `ArrangementBasicTraits_2::X_monotone_curve_2` concept.
|
||||
* Represents terminal segments of an algebraic curves, that means vertical
|
||||
* segments or \f$ x\f$-monotone segments with no critical \f$ x\f$-coordinate
|
||||
* in the interior of their \f$ x\f$-range. Terminal segments might either be
|
||||
* bounded or unbounded. By definition, each interior point of a non-vertical
|
||||
* segment has the same arc number (see the documentation of type `Point_2`
|
||||
* above, which is called the <I>arc number</I> of the segment (note the arc
|
||||
* number at the endpoints might differ). Such segments are represented
|
||||
* internally by a 4-tuple \f$ (p,q,cv,arcno)\f$, where \f$ p\f$ and \f$ q\f$
|
||||
* are the endpoints, \f$ cv\f$ is the <I>supporting curve</I> that the segment
|
||||
* belongs to, and arcno is the arc number of the segment.
|
||||
*
|
||||
* Arbitrary (weakly) \f$ x\f$-monotone segments are presented by a range
|
||||
* of `X_monotone_curve_2` instances, whose union equals the segment.
|
||||
* The functor `Construct_x_monotone_segment_2` allows their construction.
|
||||
* To construct all (maximal) terminal segments of a curve,
|
||||
* use the `Make_x_monotone_2` functor supplied by the traits class.
|
||||
*/
|
||||
class X_monotone_curve_2 {
|
||||
public:
|
||||
|
||||
/// \name Modifiers
|
||||
/// @{
|
||||
|
||||
/*! returns the supporting algebraic curve of `s`.
|
||||
*/
|
||||
Curve_2 curve () const;
|
||||
|
||||
/*! returns whether `s` is a vertical segment.
|
||||
*/
|
||||
bool is_vertical () const;
|
||||
|
||||
/*! returns whether `s` has a finite endpoint on the left
|
||||
*/
|
||||
bool is_finite (CGAL::Arr_curve_end ce) const;
|
||||
|
||||
/*! \pre (The corresponding curve end is finite)
|
||||
*/
|
||||
Point_2 curve_end (CGAL::Arr_curve_end ce) const;
|
||||
|
||||
/*! returns the arc number of the segment.
|
||||
* \pre (The segment is non-vertical)
|
||||
*/
|
||||
int arcno () const;
|
||||
|
||||
/*!
|
||||
returns the \f$ x\f$-coordinate of a vertical segment.
|
||||
\pre (The segment is vertical)
|
||||
*/
|
||||
Algebraic_real_1 x () const;
|
||||
|
||||
/// @}
|
||||
|
||||
}; /* end Arr_algebraic_segment_traits_2::X_monotone_curve_2 */
|
||||
/// \name Types
|
||||
/// @{
|
||||
|
||||
/*! Value to specify whether a point should be in the interior of a segment, or
|
||||
* its minimal point, or its maximal point in lexicographic order.
|
||||
*/
|
||||
enum Site_of_point { POINT_IN_INTERIOR = 0, MIN_ENDPOINT = -1, MAX_ENDPOINT = 1 };
|
||||
|
||||
/*! the type for bivariate polynomials, with innermost coefficient type
|
||||
* `Coefficient`. Constitutes a model of the concept `Polynomial_d` with two
|
||||
* variables.
|
||||
*
|
||||
* \sa `CGAL::Polynomial_d`
|
||||
*/
|
||||
typedef unspecified_type Polynomial_2;
|
||||
|
||||
/*! model for the concept `AlgebraicKernel_1`
|
||||
*/
|
||||
typedef unspecified_type Algebraic_kernel_1;
|
||||
|
||||
/*! represents coordinates of points.
|
||||
* Typedef from `Algebraic_kernel_1::Algebraic_real_1`
|
||||
*/
|
||||
typedef unspecified_type Algebraic_real_1;
|
||||
|
||||
/*! Typedef from `Algebraic_kernel_1::Bound`
|
||||
*/
|
||||
typedef unspecified_type Bound;
|
||||
|
||||
/// @}
|
||||
|
||||
/// \name Accessing functor objects
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
*/
|
||||
Construct_curve_2 construct_curve_2_object() const;
|
||||
|
||||
/*!
|
||||
*/
|
||||
Construct_point_2 construct_point_2_object() const;
|
||||
|
||||
/*!
|
||||
*/
|
||||
Construct_x_monotone_segment_2 construct_x_monotone_segment_2_object() const;
|
||||
|
||||
/// @}
|
||||
|
||||
/*!
|
||||
*/
|
||||
class Construct_curve_2 {
|
||||
public:
|
||||
|
||||
/// \name Object Creation Functors
|
||||
/// @{
|
||||
|
||||
/*! returns a `Curve_2` object that represents the curve defined by the
|
||||
* polynomial `p`
|
||||
*/
|
||||
Curve_2 operator() (Polynomial_2 p);
|
||||
|
||||
/*! returns a `Curve_2` object specified by `s`. The passed string represents
|
||||
* the defining polynomial of the curve and must be given in a MAPLE-readable
|
||||
* format using "x" as first and "y" as second variable, e.g.,
|
||||
* \f$(x^3*y-2*x)*(-6*x-y^3*x^6)\f$ for integer coefficients, and
|
||||
* \f$3/2*x*y^4-5/7*x^2+3/1\f$ for rational coefficients.
|
||||
*/
|
||||
Curve_2 operator() (std::string s);
|
||||
|
||||
/// @}
|
||||
|
||||
}; /* end Arr_algebraic_segment_traits_2::Construct_curve_2 */
|
||||
|
||||
/*!
|
||||
*/
|
||||
class Construct_point_2 {
|
||||
public:
|
||||
|
||||
/// \name Object Creation Functors
|
||||
/// @{
|
||||
|
||||
/*! returns a `Point_2` object that represents the `arcno`-th
|
||||
* point in the fiber of `cv` at \f$ x\f$-coordinate `x`,
|
||||
* counted from the bottom, starting with zero.
|
||||
* \pre (`cv` must not have a vertical line at `x`,
|
||||
* and \f$ 0\leq arcno < c\f$, where \f$ c\f$ is the number of points
|
||||
* in the fiber of `cv` at `x`.)
|
||||
*/
|
||||
Point_2 operator() (Algebraic_real_1 x, Curve_2 cv, int arcno);
|
||||
|
||||
/*! returns a `Point_2` object that represents the
|
||||
* point on `xcv` at \f$ x\f$-coordinate `x`
|
||||
* \pre (`x` is in the \f$ x\f$-range of `xcv`.)
|
||||
*/
|
||||
Point_2 operator() (Algebraic_real_1 x, X_monotone_curve_2 xcv);
|
||||
|
||||
/*! returns a `Point_2` object that represents (x,y)
|
||||
*/
|
||||
Point_2 operator() (Algebraic_real_1 x, Algebraic_real_1 y);
|
||||
|
||||
/*! returns a `Point_2` object that represents (x,y)
|
||||
*/
|
||||
Point_2 operator() (Coefficient x, Coefficient y);
|
||||
|
||||
/*! returns a `Point_2` object that represents (x,y)
|
||||
*/
|
||||
Point_2 operator() (Bound x, Bound y);
|
||||
|
||||
/*! returns a `Point_2` object that represents (x,y)
|
||||
*/
|
||||
Point_2 operator() (int x, int y);
|
||||
|
||||
/// @}
|
||||
|
||||
}; /* end Arr_algebraic_segment_traits_2::Construct_point_2 */
|
||||
|
||||
/*!
|
||||
*/
|
||||
class Construct_x_monotone_segment_2 {
|
||||
public:
|
||||
|
||||
/// \name Object Creation Functors
|
||||
/// @{
|
||||
|
||||
/*! inserts a sequence of `X_monotone_curve_2` objects (terminal segments) into
|
||||
* an output container given through an output iterator. These terminal segments
|
||||
* compose an \f$x\f$-monotone (or vertical) segment of a given curve that
|
||||
* starts in `end_min`, and ends in `end_max`.
|
||||
*
|
||||
* \param cv The input curve.
|
||||
* \param end_min The starting point.
|
||||
* \param end_max The ending point.
|
||||
* \param oi The output iterator that points at the output container.
|
||||
* \return The past-the-end iterator of the output container.
|
||||
*
|
||||
* \pre `end_min` must have a unique \f$x\f$-monotone segment to its right, or
|
||||
* `end_max` must have a unique \f$x\f$-monotone segment to its left.
|
||||
* Furthermore, `end_min` and `end_max` must be connected by an
|
||||
* \f$x\f$-monotone segment of `cv`)
|
||||
*/
|
||||
template <typename OutputIterator>
|
||||
OutputIterator operator() (Curve_2 cv, Point_2 end_min, Point_2 end_max,
|
||||
OutputIterator oi);
|
||||
|
||||
/*! inserts a sequence of `X_monotone_curve_2` objects into an output container
|
||||
* given through an output iterator. These segments form an \f$x\f$-monotone
|
||||
* (or vertical) segment of the curve `cv`.
|
||||
*
|
||||
* If `site_of_p==POINT_IN_INTERIOR`, the maximal segment is
|
||||
* returned that contains `p` in its interior.
|
||||
*
|
||||
* returned that contains `p` as its left endpoint.
|
||||
*
|
||||
* returned that contains `p` as its left endpoint.
|
||||
*
|
||||
* \pre (If `site_of_p==POINT_IN_INTERIOR`, `p`
|
||||
* must be an interior point of an \f$x\f$-monotone or a vertical
|
||||
* segment.
|
||||
* must either have a unique \f$x\f$-monotone segment to the right,
|
||||
* or a vertical segment from `p` upwards.
|
||||
* must either have a unique \f$x\f$-monotone segment to the left,
|
||||
* or a vertical segment from `p` downwards.)
|
||||
*/
|
||||
template <typename OutputIterator>
|
||||
OutputIterator operator() (Curve_2 cv, Point_2 p, Site_of_point site_of_p,
|
||||
OutputIterator out);
|
||||
|
||||
/*! inserts a sequence of `X_monotone_curve_2` objects into an output container
|
||||
* given through an output iterator. These segments form a straight-line
|
||||
* segment connecting the points `p` and `q`. If `p` and `q` share the same
|
||||
* \f$x\f$-coordinate, the constructed vertical segment consists of only one
|
||||
* `X_monotone_curve_2` object and can be computed efficiently. In the
|
||||
* non-vertical case, the construction is only possible if `p` and `q` have both
|
||||
* rational x- and y-coordinates.
|
||||
*
|
||||
* \pre (`p` must not be equal to `q`.)
|
||||
*/
|
||||
template <typename OutputIterator>
|
||||
OutputIterator operator() (Point_2 p, Point_2 q, OutputIterator out);
|
||||
|
||||
/// @}
|
||||
|
||||
}; /* end Arr_algebraic_segment_traits_2::Construct_x_monotone_segment_2 */
|
||||
|
||||
/*! A model of the the `ArrangementTraits_2::Curve_2` concept.
|
||||
* Represents algebraic curves. Internally, the type stores
|
||||
* topological-geometric information about the particular curve.
|
||||
* In order to use internal caching, instances should only be created
|
||||
* using the `Construct_curve_2` functor of the traits class.
|
||||
*/
|
||||
class Curve_2 {
|
||||
public:
|
||||
|
||||
/// \name Modifiers
|
||||
/// @{
|
||||
|
||||
/*! returns the defining polynomial of the curve.
|
||||
*/
|
||||
Polynomial_2 polynomial () const;
|
||||
|
||||
/// @}
|
||||
|
||||
}; /* end Arr_algebraic_segment_traits_2::Curve_2 */
|
||||
|
||||
/*! A model of the `ArrangementBasicTraits_2::Point_2` concept.
|
||||
* Represents points in \f$ \mathbb{R}^2\f$. Intersection points of algebraic
|
||||
* curves are in general non-rational, so we need a data structure that is
|
||||
* capable of representing arbitrary points with algebraic coordinates.
|
||||
*
|
||||
* The traits class represents algebraic coordinates by the type
|
||||
* `Algebraic_real_1`, which is a model of the `AlgebraicReal_1` concept.
|
||||
* A point \f$ p\f$ is stored by a triple \f$ (x,cv,arcno)\f$,
|
||||
* where \f$ x\f$ is the \f$ x\f$-coordinate of a point, \f$ cv\f$ is an instance
|
||||
* of `Curve_2` that contains the point, (and has no vertical line at \f$ x\f$),
|
||||
* and \f$ arcno\f$ is an `int`, denoting that \f$ p\f$ is met as the
|
||||
* \f$arcno\f$-th point when shooting a vertical ray at \f$ x\f$, starting from
|
||||
* \f$-\infty\f$ (where counting starts with \f$ 0\f$).
|
||||
*
|
||||
* In addition to the methods listed below, the copy constructor and assignment
|
||||
* operator for `Point_2` objects are also supported.
|
||||
*
|
||||
* The functor `Construct_point_2` constructs `Point_2` instances.
|
||||
*/
|
||||
|
||||
class Point_2 {
|
||||
public:
|
||||
|
||||
/// \name Modifiers
|
||||
/// @{
|
||||
|
||||
/*! returns the \f$ x\f$-coordinate of `p`.
|
||||
*/
|
||||
Algebraic_real_1 x () const;
|
||||
|
||||
/*! returns the \f$ y\f$-coordinates of `p`.
|
||||
*
|
||||
* <B>Attention:</B> As described above, points are not stored
|
||||
* by their \f$ y\f$-coordinate in `Algebraic_real_1` representation. In fact,
|
||||
* this representation must be computed on demand, and might become quite
|
||||
* costly for points defined by high-degree polynomials. Therefore, it is
|
||||
* recommended to avoid to call this function as much as possible.
|
||||
*/
|
||||
Algebraic_real_1 y () const;
|
||||
|
||||
/*! returns a `Curve_2` instance that `p`is part of.
|
||||
*/
|
||||
Curve_2 curve () const;
|
||||
|
||||
/*! returns the arc number of `p`.
|
||||
*/
|
||||
int arcno () const;
|
||||
|
||||
/*! returns double-approximations of the \f$ x\f$- and \f$ y\f$-coordinates.
|
||||
*/
|
||||
std::pair<double,double> to_double () const;
|
||||
|
||||
/// @}
|
||||
|
||||
}; /* end Arr_algebraic_segment_traits_2::Point_2 */
|
||||
|
||||
/*! A model of the `ArrangementBasicTraits_2::X_monotone_curve_2` concept.
|
||||
* Represents terminal segments of an algebraic curves, that means vertical
|
||||
* segments or \f$ x\f$-monotone segments with no critical \f$ x\f$-coordinate
|
||||
* in the interior of their \f$ x\f$-range. Terminal segments might either be
|
||||
* bounded or unbounded. By definition, each interior point of a non-vertical
|
||||
* segment has the same arc number (see the documentation of type `Point_2`
|
||||
* above, which is called the <I>arc number</I> of the segment (note the arc
|
||||
* number at the endpoints might differ). Such segments are represented
|
||||
* internally by a 4-tuple \f$ (p,q,cv,arcno)\f$, where \f$ p\f$ and \f$ q\f$
|
||||
* are the endpoints, \f$ cv\f$ is the <I>supporting curve</I> that the segment
|
||||
* belongs to, and arcno is the arc number of the segment.
|
||||
*
|
||||
* Arbitrary (weakly) \f$ x\f$-monotone segments are presented by a range
|
||||
* of `X_monotone_curve_2` instances, whose union equals the segment.
|
||||
* The functor `Construct_x_monotone_segment_2` allows their construction.
|
||||
* To construct all (maximal) terminal segments of a curve,
|
||||
* use the `Make_x_monotone_2` functor supplied by the traits class.
|
||||
*/
|
||||
class X_monotone_curve_2 {
|
||||
public:
|
||||
|
||||
/// \name Modifiers
|
||||
/// @{
|
||||
|
||||
/*! returns the supporting algebraic curve of `s`.
|
||||
*/
|
||||
Curve_2 curve () const;
|
||||
|
||||
/*! returns whether `s` is a vertical segment.
|
||||
*/
|
||||
bool is_vertical () const;
|
||||
|
||||
/*! returns whether `s` has a finite endpoint on the left
|
||||
*/
|
||||
bool is_finite (CGAL::Arr_curve_end ce) const;
|
||||
|
||||
/*! \pre (The corresponding curve end is finite)
|
||||
*/
|
||||
Point_2 curve_end (CGAL::Arr_curve_end ce) const;
|
||||
|
||||
/*! returns the arc number of the segment.
|
||||
* \pre (The segment is non-vertical)
|
||||
*/
|
||||
int arcno () const;
|
||||
|
||||
/*! returns the \f$ x\f$-coordinate of a vertical segment.
|
||||
* \pre (The segment is vertical)
|
||||
*/
|
||||
Algebraic_real_1 x () const;
|
||||
|
||||
/// @}
|
||||
|
||||
}; /* end Arr_algebraic_segment_traits_2::X_monotone_curve_2 */
|
||||
|
||||
}; /* end Arr_algebraic_segment_traits_2 */
|
||||
|
||||
|
|
|
|||
|
|
@ -49,10 +49,10 @@ public:
|
|||
/// \name Creation
|
||||
/// @{
|
||||
|
||||
/*! Default constructor. */
|
||||
/*! constructs default */
|
||||
Arr_bounded_planar_topology_traits_2();
|
||||
|
||||
/*! Constructor from a geometry-traits object.
|
||||
/*! constructs from a geometry-traits object.
|
||||
* \param traits the traits.
|
||||
*/
|
||||
Arr_bounded_planar_topology_traits_2(const GeometryTraits_2* traits);
|
||||
|
|
@ -62,16 +62,16 @@ public:
|
|||
/// \name Accessors
|
||||
/// @{
|
||||
|
||||
/*! Obtain the DCEL (const version). */
|
||||
/*! obtains the DCEL (const version). */
|
||||
const Dcel& dcel() const;
|
||||
|
||||
/*! Obtain the DCEL (non-const version). */
|
||||
/*! obtains the DCEL (non-const version). */
|
||||
Dcel& dcel();
|
||||
|
||||
/*! Obtain the unbounded face (const version). */
|
||||
/*! obtains the unbounded face (const version). */
|
||||
const Face* unbounded_face() const;
|
||||
|
||||
/*! Obtain the unbounded face (non-const version). */
|
||||
/*! obtains the unbounded face (non-const version). */
|
||||
Face* unbounded_face();
|
||||
|
||||
/// @}
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ namespace CGAL {
|
|||
* \cgalModels{ArrangementTraits_2,ArrangementDirectionalXMonotoneTraits_2}
|
||||
*
|
||||
*/
|
||||
template< typename Kernel >
|
||||
template <typename Kernel>
|
||||
class Arr_circle_segment_traits_2 {
|
||||
public:
|
||||
|
||||
|
|
@ -133,7 +133,7 @@ public:
|
|||
/*! returns the target point.
|
||||
*
|
||||
* \pre `cv` is not a full circle.
|
||||
*/
|
||||
*/
|
||||
const Point_2& target() const;
|
||||
|
||||
/*! returns the orientation of the curve (`COLLINEAR` in case of line
|
||||
|
|
@ -189,7 +189,7 @@ public:
|
|||
/// \name Creation
|
||||
/// @{
|
||||
|
||||
/*! default constructor.
|
||||
/*! constructs default
|
||||
*/
|
||||
Point_2();
|
||||
|
||||
|
|
@ -323,15 +323,15 @@ public:
|
|||
/// \name Creation
|
||||
/// @{
|
||||
|
||||
/*! Trims the given x-monotone curve to an from src to tgt.
|
||||
/*! trims the given x-monotone curve to an from src to tgt.
|
||||
* \ pre `src` and `tgt` lies on the curve
|
||||
*/
|
||||
|
||||
X_monotone_curve_2(const X_monotone_curve_2& xcv,
|
||||
const Point_2& src,
|
||||
const Point_2& tgt)const
|
||||
const Point_2& tgt) const
|
||||
/// @}
|
||||
} /* end Arr_circle_segment_traits_2::Trim_2 */
|
||||
} /* end Arr_circle_segment_traits_2::Trim_2 */
|
||||
|
||||
}; /* end Arr_circle_segment_traits_2 */
|
||||
|
||||
|
|
|
|||
|
|
@ -260,11 +260,11 @@ public:
|
|||
/// \name Creation
|
||||
/// @{
|
||||
|
||||
/*! construct a default point.
|
||||
/*! constructs a default point.
|
||||
*/
|
||||
Point_2();
|
||||
|
||||
/*! construct a point from an algebraic point.
|
||||
/*! constructs a point from an algebraic point.
|
||||
*/
|
||||
Point_2(const typename Alg_kernel::Point_2& p);
|
||||
|
||||
|
|
@ -401,7 +401,7 @@ public:
|
|||
*/
|
||||
X_monotone_curve_2 operator()(const Curve_2& cv) const;
|
||||
|
||||
/*! Constructs an \f$x\f$-monotone curve connecting the two given endpoints.
|
||||
/*! constructs an \f$x\f$-monotone curve connecting the two given endpoints.
|
||||
* \param source The first point.
|
||||
* \param target The second point.
|
||||
* \pre `source` and `target` must not be the same.
|
||||
|
|
@ -409,7 +409,7 @@ public:
|
|||
*/
|
||||
X_monotone_curve_2 operator()(const Point_2& source, const Point_2& target) const;
|
||||
|
||||
/*! Constructs a special segment of a given line connecting to given
|
||||
/*! constructs a special segment of a given line connecting to given
|
||||
* endpoints.
|
||||
* \param a, b, c The coefficients of the supporting line (\f$ax + by + c = 0\f$).
|
||||
* \param source The source point.
|
||||
|
|
@ -427,13 +427,13 @@ public:
|
|||
*/
|
||||
class Construct_bbox_2 {
|
||||
public:
|
||||
/*! Obtain a bounding box for a conic arc.
|
||||
/*! obtains a bounding box for a conic arc.
|
||||
* \param cv The conic arc.
|
||||
* \return The bounding box.
|
||||
*/
|
||||
Bbox_2 operator()(const Curve_2& cv) const { return bbox(cv); }
|
||||
|
||||
/*! Obtain a bounding box for an \f$x\f$-monotone conic arc.
|
||||
/*! obtains a bounding box for an \f$x\f$-monotone conic arc.
|
||||
* \param xcv The \f$x\f$-monotone conic arc.
|
||||
* \return The bounding box.
|
||||
*/
|
||||
|
|
@ -453,7 +453,7 @@ public:
|
|||
*/
|
||||
class Approximate_2 {
|
||||
public:
|
||||
/*! Obtain an approximation of a point coordinate.
|
||||
/*! obtains an approximation of a point coordinate.
|
||||
* \param p The exact point.
|
||||
* \param i The coordinate index (either 0 or 1).
|
||||
* \pre `i` is either 0 or 1.
|
||||
|
|
@ -462,7 +462,7 @@ public:
|
|||
*/
|
||||
Approximate_number_type operator()(const Point_2& p, int i) const;
|
||||
|
||||
/*! Obtain an approximation of a point.
|
||||
/*! obtains an approximation of a point.
|
||||
* \param p The exact point.
|
||||
*/
|
||||
Approximate_point_2 operator()(const Point_2& p) const;
|
||||
|
|
@ -496,7 +496,7 @@ public:
|
|||
*/
|
||||
class Trim_2 {
|
||||
public:
|
||||
/*! Trims the given \f$x\f$-monotone arc to new endpoints.
|
||||
/*! trims the given \f$x\f$-monotone arc to new endpoints.
|
||||
* \param xcv The \f$x\f$-monotone arc
|
||||
* \param source The new source point.
|
||||
* \param target The new target point.
|
||||
|
|
@ -505,28 +505,28 @@ public:
|
|||
X_monotone_curve_2 operator()(const X_monotone_curve_2& xcv,
|
||||
const Point_2& source,
|
||||
const Point_2& target) const;
|
||||
|
||||
};
|
||||
|
||||
/// \name Accessing Functor Objects
|
||||
/// @{
|
||||
|
||||
/*! Obtain a `Construct_curve_2` functor. */
|
||||
/*! obtains a `Construct_curve_2` functor. */
|
||||
Construct_curve_2 construct_curve_2_object() const;
|
||||
|
||||
/*! Obtain a `Construct_x_monotone_curve_2` functor. */
|
||||
/*! obtains a `Construct_x_monotone_curve_2` functor. */
|
||||
Construct_x_monotone_curve_2 construct_x_monotone_curve_2_object() const;
|
||||
|
||||
/*! Obtain a `Bbox_2` functor. */
|
||||
/*! obtains a `Bbox_2` functor. */
|
||||
Construct_bbox_2 construct_bbox_2_object() const;
|
||||
|
||||
/*! Obtain a `Trim_2` functor. */
|
||||
/*! obtains a `Trim_2` functor. */
|
||||
Trim_2 trim_2_object() const;
|
||||
|
||||
/*! Obtain an `Approximate_2` functor. */
|
||||
/*! obtains an `Approximate_2` functor. */
|
||||
Approximate_2 approximate_2_object() const;
|
||||
|
||||
/// @}
|
||||
|
||||
}; /* end Arr_conic_traits_2 */
|
||||
|
||||
} /* end namespace CGAL */
|
||||
|
|
|
|||
|
|
@ -1,30 +1,28 @@
|
|||
|
||||
namespace CGAL {
|
||||
|
||||
/*!
|
||||
\ingroup PkgArrangementOnSurface2TraitsClasses
|
||||
|
||||
The class `Arr_consolidated_curve_data_traits_2` is a model of the concept `ArrangementTraits_2`,
|
||||
and serves as a decorator class that enables the extension of the curve
|
||||
type defined by the `Traits` parameter. The traits class inherits its
|
||||
point type from `Traits::Point_2`, and defines the types
|
||||
`Curve_2` and `X_monotone_curve_2` extended with extraneous data
|
||||
fields of type `Data`.
|
||||
|
||||
Each `Curve_2` object is associated with a single data field of type
|
||||
`Data`, and each `X_monotone_curve_2` object is associated with
|
||||
a set of unique data objects. When a curve is subdivided into \f$ x\f$-monotone
|
||||
subcurves, all resulting subcurves are associated with a list containing
|
||||
a single data object, copied from the inducing curve. When an \f$ x\f$-monotone
|
||||
curve is split, its data set is duplicated, and inserted into the sets of
|
||||
both resulting subcurves. In case two (or more) \f$ x\f$-monotone curves
|
||||
overlap, their data sets are consolidated, and are inserted into the set
|
||||
of the \f$ x\f$-monotone curve that represents the overlap.
|
||||
|
||||
\cgalModels{ArrangementTraits_2}
|
||||
|
||||
*/
|
||||
template< typename Traits, typename Data >
|
||||
/*! \ingroup PkgArrangementOnSurface2TraitsClasses
|
||||
*
|
||||
* The class `Arr_consolidated_curve_data_traits_2` is a model of the concept
|
||||
* `ArrangementTraits_2`, and serves as a decorator class that enables the
|
||||
* extension of the curve type defined by the `Traits` parameter. The traits
|
||||
* class inherits its point type from `Traits::Point_2`, and defines the types
|
||||
* `Curve_2` and `X_monotone_curve_2` extended with extraneous data fields of
|
||||
* type `Data`.
|
||||
*
|
||||
* Each `Curve_2` object is associated with a single data field of type `Data`,
|
||||
* and each `X_monotone_curve_2` object is associated with a set of unique data
|
||||
* objects. When a curve is subdivided into \f$ x\f$-monotone subcurves, all
|
||||
* resulting subcurves are associated with a list containing a single data
|
||||
* object, copied from the inducing curve. When an \f$ x\f$-monotone curve is
|
||||
* split, its data set is duplicated, and inserted into the sets of both
|
||||
* resulting subcurves. In case two (or more) \f$ x\f$-monotone curves overlap,
|
||||
* their data sets are consolidated, and are inserted into the set of the \f$
|
||||
* x\f$-monotone curve that represents the overlap.
|
||||
*
|
||||
* \cgalModels{ArrangementTraits_2}
|
||||
*/
|
||||
template <typename Traits, typename Data>
|
||||
class Arr_consolidated_curve_data_traits_2
|
||||
: public Arr_curve_data_traits_2<Traits, _Unique_list<Data>,
|
||||
_Consolidate_unique_lists<Data>,
|
||||
|
|
@ -32,139 +30,106 @@ class Arr_consolidated_curve_data_traits_2
|
|||
{
|
||||
public:
|
||||
|
||||
/// \name Types
|
||||
/// @{
|
||||
/// \name Types
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
the base traits-class.
|
||||
*/
|
||||
typedef Traits Base_traits_2;
|
||||
//! the base traits-class.
|
||||
typedef Traits Base_traits_2;
|
||||
|
||||
/*!
|
||||
the base curve.
|
||||
*/
|
||||
typedef typename Base_traits_2::Curve_2 Base_curve_2;
|
||||
//! the base curve.
|
||||
typedef typename Base_traits_2::Curve_2 Base_curve_2;
|
||||
|
||||
/*!
|
||||
the base \f$ x\f$-monotone curve curve.
|
||||
*/
|
||||
typedef typename Base_traits_2::X_monotone_curve_2 Base_x_monotone_curve_2;
|
||||
//! the base \f$ x\f$-monotone curve curve.
|
||||
typedef typename Base_traits_2::X_monotone_curve_2 Base_x_monotone_curve_2;
|
||||
|
||||
/*!
|
||||
a set of data objects that is associated with an \f$ x\f$-monotone curve.
|
||||
*/
|
||||
typedef unspecified_type typedef Data_container;
|
||||
//! a set of data objects that is associated with an \f$ x\f$-monotone curve.
|
||||
typedef unspecified_type typedef Data_container;
|
||||
|
||||
/*!
|
||||
a non-mutable iterator for the data objects in the data container.
|
||||
*/
|
||||
typedef unspecified_type typedef Data_iterator;
|
||||
//! a non-mutable iterator for the data objects in the data container.
|
||||
typedef unspecified_type typedef Data_iterator;
|
||||
|
||||
/// @}
|
||||
/// @}
|
||||
|
||||
/*! The `Data_container` class nested within the consolidated
|
||||
* curve-data traits and associated with the `Traits::X_monotone_curve_2` type
|
||||
* is maintained as a list with unique data objects. This representation is
|
||||
* simple and efficient in terms of memory consumption. It also requires that
|
||||
* the `Data` class supports only the equality operator. Note however that
|
||||
* most set operations require linear time.
|
||||
*/
|
||||
class Data_container {
|
||||
public:
|
||||
|
||||
/*!
|
||||
/// \name Creation
|
||||
/// @{
|
||||
|
||||
/*! constructs default */
|
||||
Data_container();
|
||||
|
||||
The `Data_container` class nested within the consolidated
|
||||
curve-data traits and associated with the `Traits::X_monotone_curve_2`
|
||||
type is maintained as a list with unique data objects. This representation is
|
||||
simple and efficient in terms of memory consumption. It also requires that
|
||||
the `Data` class supports only the equality operator. Note however that
|
||||
most set operations require linear time.
|
||||
/*! constructs set containing a single `data` object. */
|
||||
Data_container(const Data& data);
|
||||
|
||||
*/
|
||||
class Data_container {
|
||||
public:
|
||||
/// @}
|
||||
|
||||
/// \name Creation
|
||||
/// @{
|
||||
/// \name Access Functions
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
default constructor.
|
||||
*/
|
||||
Data_container ();
|
||||
/*! returns the number of data objects in the set. */
|
||||
std::size_t size() const;
|
||||
|
||||
/*!
|
||||
constructs set containing a single `data` object.
|
||||
*/
|
||||
Data_container (const Data& data);
|
||||
/*! returns an iterator pointing to the first data object. */
|
||||
Data_iterator begin() const;
|
||||
|
||||
/// @}
|
||||
/*! returns a past-the-end iterator for the data objects. */
|
||||
Data_iterator end() const;
|
||||
|
||||
/// \name Access Functions
|
||||
/// @{
|
||||
/*! returns the first data object inserted into the set.
|
||||
* \pre The number of data objects is not \f$ 0\f$.
|
||||
*/
|
||||
const Data& front() const;
|
||||
|
||||
/*!
|
||||
returns the number of data objects in the set.
|
||||
*/
|
||||
std::size_t size () const;
|
||||
/*! returns the last data object inserted into the set.
|
||||
* \pre The number of data objects is not \f$ 0\f$.
|
||||
*/
|
||||
const Data& back() const;
|
||||
|
||||
/*!
|
||||
returns an iterator pointing to the first data object.
|
||||
*/
|
||||
Data_iterator begin () const;
|
||||
/// @}
|
||||
|
||||
/*!
|
||||
returns a past-the-end iterator for the data objects.
|
||||
*/
|
||||
Data_iterator end () const;
|
||||
/// \name Predicates
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
returns the first data object inserted into the set.
|
||||
\pre The number of data objects is not \f$ 0\f$.
|
||||
*/
|
||||
const Data& front () const;
|
||||
/*! checks whether the two sets contain the same data objects (regardless of
|
||||
* order).
|
||||
*/
|
||||
bool operator==(const Data_container& other) const;
|
||||
|
||||
/*!
|
||||
returns the last data object inserted into the set.
|
||||
\pre The number of data objects is not \f$ 0\f$.
|
||||
*/
|
||||
const Data& back () const;
|
||||
/*! finds the given `data` object in the set and returns an iterator
|
||||
* for this object, or `end()` if it is not found.
|
||||
*/
|
||||
Data_iterator find(const Data& data);
|
||||
|
||||
/// @}
|
||||
/// @}
|
||||
|
||||
/// \name Predicates
|
||||
/// @{
|
||||
/// \name Modifiers
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
check if the two sets contain the same data objects (regardless of order).
|
||||
*/
|
||||
bool operator== (const Data_container& other) const;
|
||||
/*! inserts the given `data` object into the set. Returns `true` on
|
||||
* success, or `false` if the set already contains the object.
|
||||
*/
|
||||
bool insert(const Data& data);
|
||||
|
||||
/*!
|
||||
find the given `data` object in the set and returns an iterator
|
||||
for this object, or `end()` if it is not found.
|
||||
*/
|
||||
Data_iterator find (const Data& data);
|
||||
/*! erases the given `data` object from the set. Returns `true` on
|
||||
* success, or `false` if the set does not contain the object.
|
||||
*/
|
||||
bool erase(const Data& data);
|
||||
|
||||
/// @}
|
||||
|
||||
/// \name Modifiers
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
inserts the given `data` object into the set. Returns `true` on
|
||||
success, or `false` if the set already contains the object.
|
||||
*/
|
||||
bool insert (const Data& data);
|
||||
|
||||
/*!
|
||||
erases the given `data` object from the set. Returns `true` on
|
||||
success, or `false` if the set does not contain the object.
|
||||
*/
|
||||
bool erase (const Data& data);
|
||||
|
||||
/*!
|
||||
clears the set.
|
||||
*/
|
||||
void clear ();
|
||||
|
||||
/// @}
|
||||
|
||||
}; /* end Arr_consolidated_curve_data_traits_2::Data_container */
|
||||
/*! clears the set. */
|
||||
void clear();
|
||||
|
||||
/// @}
|
||||
|
||||
}; /* end Arr_consolidated_curve_data_traits_2::Data_container */
|
||||
|
||||
}; /* end Arr_consolidated_curve_data_traits_2 */
|
||||
|
||||
} /* end namespace CGAL */
|
||||
|
|
|
|||
|
|
@ -0,0 +1,145 @@
|
|||
// Copyright (c) 2005,2007,2009,2010,2011 Tel-Aviv University (Israel).
|
||||
// All rights reserved.
|
||||
//
|
||||
// This file is part of CGAL (www.cgal.org).
|
||||
//
|
||||
// $URL$
|
||||
// $Id$
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial
|
||||
//
|
||||
// Author(s): Efi Fogel <efif@post.tau.ac.il>
|
||||
// Eric Berberich <ericb@post.tau.ac.il>
|
||||
|
||||
namespace CGAL {
|
||||
|
||||
/*! \ingroup PkgArrangementOnSurface2TraitsClasses
|
||||
*
|
||||
* A metadata traits-class decorator for the arrangement package. It counts the
|
||||
* number of invocations of traits-class functors. It is parameterized with
|
||||
* another traits class and inherits from it. For each traits method it
|
||||
* maintains a counter that counts the number of invocations into the method.
|
||||
*
|
||||
* It models all the concepts that the original traits models.
|
||||
*/
|
||||
|
||||
template <typename BaseTraits>
|
||||
class Arr_counting_traits_2 : public BaseTraits {
|
||||
public:
|
||||
enum Operation_id {
|
||||
COMPARE_X_2_OP = 0,
|
||||
COMPARE_XY_2_OP,
|
||||
CONSTRUCT_MIN_VERTEX_2_OP,
|
||||
CONSTRUCT_MAX_VERTEX_2_OP,
|
||||
IS_VERTICAL_2_OP,
|
||||
COMPARE_Y_AT_X_2_OP,
|
||||
EQUAL_2_POINTS_OP,
|
||||
EQUAL_2_CURVES_OP,
|
||||
COMPARE_Y_AT_X_LEFT_2_OP,
|
||||
COMPARE_Y_AT_X_RIGHT_2_OP,
|
||||
MAKE_X_MONOTONE_2_OP,
|
||||
SPLIT_2_OP,
|
||||
INTERSECT_2_OP,
|
||||
ARE_MERGEABLE_2_OP,
|
||||
MERGE_2_OP,
|
||||
CONSTRUCT_2_OPPOSITE_2_OP,
|
||||
COMPARE_ENDPOINTS_XY_2_OP,
|
||||
APPROXIMATE_2_COORD_OP,
|
||||
APPROXIMATE_2_POINT_OP,
|
||||
APPROXIMATE_2_CURVE_OP,
|
||||
PARAMETER_SPACE_IN_X_2_CURVE_END_OP,
|
||||
PARAMETER_SPACE_IN_X_2_POINT_OP,
|
||||
IS_ON_X_IDENTIFICATION_POINT_2_OP,
|
||||
IS_ON_X_IDENTIFICATION_CURVE_2_OP,
|
||||
COMPARE_Y_ON_BOUNDARY_2_OP,
|
||||
COMPARE_Y_NEAR_BOUNDARY_2_OP,
|
||||
PARAMETER_SPACE_IN_Y_2_CURVE_END_OP,
|
||||
PARAMETER_SPACE_IN_Y_2_POINT_OP,
|
||||
IS_ON_Y_IDENTIFICATION_2_POINT_OP,
|
||||
IS_ON_Y_IDENTIFICATION_2_CURVE_OP,
|
||||
COMPARE_X_ON_BOUNDARY_2_POINTS_OP,
|
||||
COMPARE_X_ON_BOUNDARY_2_POINT_CURVE_END_OP,
|
||||
COMPARE_X_ON_BOUNDARY_2_CURVE_ENDS_OP,
|
||||
COMPARE_X_NEAR_BOUNDARY_2_OP,
|
||||
NUMBER_OF_OPERATIONS
|
||||
};
|
||||
|
||||
/// \name Creation
|
||||
/// @{
|
||||
|
||||
/*! constructs default */
|
||||
template <typename ... Args>
|
||||
Arr_counting_traits_2(Args ... args) : Base(std::forward<Args>(args)...) {}
|
||||
|
||||
/*! disables copy constructor. */
|
||||
Arr_counting_traits_2(const Arr_counting_traits_2&) = delete;
|
||||
|
||||
/// @}
|
||||
|
||||
/*! obtains the counter of the given operation */
|
||||
std::size_t count(Operation_id id) const;
|
||||
|
||||
/*! prints the counter associated with an operation. */
|
||||
template <typename OutStream>
|
||||
OutStream& print(OutStream& os, Operation_id id) const;
|
||||
|
||||
/// \name Types and functors inherited from `BaseTraits`
|
||||
/// @{
|
||||
|
||||
using Has_left_category = typename Base::Has_left_category;
|
||||
using Has_merge_category = typename Base::Has_merge_category;
|
||||
using Has_do_intersect_category = typename Base::Has_do_intersect_category;
|
||||
|
||||
using Left_side_category =
|
||||
typename internal::Arr_complete_left_side_category<Base>::Category;
|
||||
using Bottom_side_category =
|
||||
typename internal::Arr_complete_bottom_side_category<Base>::Category;
|
||||
using Top_side_category =
|
||||
typename internal::Arr_complete_top_side_category<Base>::Category;
|
||||
using Right_side_category =
|
||||
typename internal::Arr_complete_right_side_category<Base>::Category;
|
||||
|
||||
using Point_2 = typename Base::Point_2;
|
||||
using X_monotone_curve_2 = typename Base::X_monotone_curve_2;
|
||||
using Curve_2 = typename Base::Curve_2;
|
||||
|
||||
/// @}
|
||||
|
||||
/// \name Obtain the appropriate functor
|
||||
/// @{
|
||||
|
||||
Compare_x_2 compare_x_2_object() const;
|
||||
Compare_xy_2 compare_xy_2_object() const;
|
||||
Construct_min_vertex_2 construct_min_vertex_2_object() const;
|
||||
Construct_max_vertex_2 construct_max_vertex_2_object() const;
|
||||
Is_vertical_2 is_vertical_2_object() const;
|
||||
Compare_y_at_x_2 compare_y_at_x_2_object() const;
|
||||
Equal_2 equal_2_object() const;
|
||||
Compare_y_at_x_left_2 compare_y_at_x_left_2_object() const;
|
||||
Compare_y_at_x_right_2 compare_y_at_x_right_2_object() const;
|
||||
Make_x_monotone_2 make_x_monotone_2_object() const;
|
||||
Split_2 split_2_object() const;
|
||||
Intersect_2 intersect_2_object() const;
|
||||
Are_mergeable_2 are_mergeable_2_object() const;
|
||||
Merge_2 merge_2_object() const;
|
||||
Construct_opposite_2 construct_opposite_2_object() const;
|
||||
Compare_endpoints_xy_2 compare_endpoints_xy_2_object() const;
|
||||
Approximate_2 approximate_2_object() const;
|
||||
Parameter_space_in_x_2 parameter_space_in_x_2_object() const;
|
||||
Is_on_x_identification_2 is_on_x_identification_2_object() const;
|
||||
Compare_y_on_boundary_2 compare_y_on_boundary_2_object() const;
|
||||
Compare_y_near_boundary_2 compare_y_near_boundary_2_object() const;
|
||||
Parameter_space_in_y_2 parameter_space_in_y_2_object() const;
|
||||
Is_on_y_identification_2 is_on_y_identification_2_object() const;
|
||||
Compare_x_on_boundary_2 compare_x_on_boundary_2_object() const;
|
||||
Compare_x_near_boundary_2 compare_x_near_boundary_2_object() const;
|
||||
|
||||
/// @}
|
||||
|
||||
/*! cleans all operation counters */
|
||||
void clear_counters();
|
||||
};
|
||||
|
||||
template <typename OutStream, class BaseTraits>
|
||||
inline OutStream& operator<<(OutStream& os,
|
||||
const Arr_counting_traits_2<BaseTraits>& traits);
|
||||
} // namespace CGAL
|
||||
|
|
@ -101,8 +101,7 @@ public:
|
|||
/// \name Creation
|
||||
/// @{
|
||||
|
||||
/*! default constructor.
|
||||
*/
|
||||
/*! constructs default */
|
||||
Curve_2();
|
||||
|
||||
/*! constructs curve from the given `base` curve with uninitialized
|
||||
|
|
@ -131,49 +130,49 @@ public:
|
|||
|
||||
/// @}
|
||||
|
||||
}; /* end Arr_curve_data_traits_2::Curve_2 */
|
||||
}; /* end Arr_curve_data_traits_2::Curve_2 */
|
||||
|
||||
/*! The `X_monotone_curve_2` class nested within the curve-data traits extends
|
||||
* the `Base_traits_2::X_monotone_curve_2` type with an extra data field.
|
||||
*/
|
||||
class X_monotone_curve_2 : public Base_x_monotone_curve_2 {
|
||||
public:
|
||||
|
||||
/// \name Creation
|
||||
/// @{
|
||||
|
||||
/*! default constructor.
|
||||
/*! The `X_monotone_curve_2` class nested within the curve-data traits extends
|
||||
* the `Base_traits_2::X_monotone_curve_2` type with an extra data field.
|
||||
*/
|
||||
X_monotone_curve_2();
|
||||
class X_monotone_curve_2 : public Base_x_monotone_curve_2 {
|
||||
public:
|
||||
|
||||
/*! constructs an \f$ x\f$-monotone curve from the given `base` curve with
|
||||
* uninitialized data field.
|
||||
*/
|
||||
X_monotone_curve_2(const Base_x_monotone_curve_2& base);
|
||||
/// \name Creation
|
||||
/// @{
|
||||
|
||||
/*! constructs an \f$ x\f$-monotone curve from the given `base` \f$
|
||||
* x\f$-monotone curve with an attached `data` field.
|
||||
*/
|
||||
X_monotone_curve_2(const Base_x_monotone_curve_2& base,
|
||||
const X_monotone_curve_data& data);
|
||||
/*! constructs default */
|
||||
X_monotone_curve_2();
|
||||
|
||||
/// @}
|
||||
/*! constructs an \f$ x\f$-monotone curve from the given `base` curve with
|
||||
* uninitialized data field.
|
||||
*/
|
||||
X_monotone_curve_2(const Base_x_monotone_curve_2& base);
|
||||
|
||||
/// \name Access Functions
|
||||
/// @{
|
||||
/*! constructs an \f$ x\f$-monotone curve from the given `base` \f$
|
||||
* x\f$-monotone curve with an attached `data` field.
|
||||
*/
|
||||
X_monotone_curve_2(const Base_x_monotone_curve_2& base,
|
||||
const X_monotone_curve_data& data);
|
||||
|
||||
/*! returns the field (a non-const version, which returns a reference
|
||||
* to the data object, is also available).
|
||||
*/
|
||||
const X_monotone_curve_data& data() const;
|
||||
/// @}
|
||||
|
||||
/*! sets the data field.
|
||||
*/
|
||||
void set_data(const X_monotone_curve_data& data);
|
||||
/// \name Access Functions
|
||||
/// @{
|
||||
|
||||
/// @}
|
||||
/*! returns the field (a non-const version, which returns a reference
|
||||
* to the data object, is also available).
|
||||
*/
|
||||
const X_monotone_curve_data& data() const;
|
||||
|
||||
}; /* end Arr_curve_data_traits_2::X_monotone_curve_2 */
|
||||
/*! sets the data field.
|
||||
*/
|
||||
void set_data(const X_monotone_curve_data& data);
|
||||
|
||||
/// @}
|
||||
|
||||
}; /* end Arr_curve_data_traits_2::X_monotone_curve_2 */
|
||||
|
||||
}; /* end Arr_curve_data_traits_2 */
|
||||
|
||||
} /* end namespace CGAL */
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@ namespace CGAL {
|
|||
/// \name Creation
|
||||
/// @{
|
||||
|
||||
/*! Constructs a point from a direction and a location.
|
||||
/*! constructs a point from a direction and a location.
|
||||
* \param[in] dir the direction.
|
||||
* \param[in] location indicates the location of the point pre-image
|
||||
* in the parameter space.
|
||||
|
|
@ -94,13 +94,13 @@ namespace CGAL {
|
|||
/// \name Operations
|
||||
/// @{
|
||||
|
||||
/*! Set the location of the point pre-image in the parameter space.
|
||||
/*! sets the location of the point pre-image in the parameter space.
|
||||
* \param[in] location the updated location of the point pre-image in
|
||||
* the parameter space.
|
||||
*/
|
||||
void set_location(Location_type location);
|
||||
|
||||
/*! Obtain the location of the point.
|
||||
/*! obtains the location of the point.
|
||||
* \return the location of the point pre-image in the parameter space.
|
||||
*/
|
||||
Location_type location() const;
|
||||
|
|
@ -126,7 +126,7 @@ namespace CGAL {
|
|||
/// \name Creation
|
||||
/// @{
|
||||
|
||||
/*! Constructs an \f$x\f$-monotone geodesic arc.
|
||||
/*! constructs an \f$x\f$-monotone geodesic arc.
|
||||
* \param[in] source the source point of the arc.
|
||||
* \param[in] target the target point of the arc.
|
||||
* \param[in] normal the normal of the plane that contains the arc.
|
||||
|
|
@ -146,7 +146,7 @@ namespace CGAL {
|
|||
bool is_degenerate = false,
|
||||
bool is_empty = false);
|
||||
|
||||
/*! Construct an \f$x\f$-monotone geodesic arc.
|
||||
/*! construct an \f$x\f$-monotone geodesic arc.
|
||||
* \param[in] normal the normal of the plane containing the arc.
|
||||
* \param[in] source the source-point direction.
|
||||
* \param[in] target the target-point direction.
|
||||
|
|
@ -156,7 +156,7 @@ namespace CGAL {
|
|||
const Point_2& target,
|
||||
const Direction_3& normal);
|
||||
|
||||
/*! Construct a full great-circle.
|
||||
/*! construct a full great-circle.
|
||||
* \param[in] point the endpoint of the full great-circle.
|
||||
* \param[in] normal the normal of the plane containing the arc.
|
||||
* \pre the point lies on the given plane.
|
||||
|
|
@ -171,90 +171,90 @@ namespace CGAL {
|
|||
/// \name Operations
|
||||
/// @{
|
||||
|
||||
/*! Sets the source endpoint.
|
||||
/*! sets the source endpoint.
|
||||
* \param[in] source the updated source endpoint.
|
||||
*/
|
||||
void set_source(const Point_2& source);
|
||||
|
||||
/*! Sets the target endpoint.
|
||||
/*! sets the target endpoint.
|
||||
* \param[in] target the updated target endpoint.
|
||||
*/
|
||||
void set_target(const Point_2& target);
|
||||
|
||||
/*! Sets the normal of the underlying plane.
|
||||
/*! sets the normal of the underlying plane.
|
||||
* \param[in] normal the updated normal of the underlying plane.
|
||||
*/
|
||||
void set_normal(const Direction_3& normal);
|
||||
|
||||
/*! Sets the flag that indicates whether the arc is vertical.
|
||||
/*! sets the flag that indicates whether the arc is vertical.
|
||||
* \param[in] flag indicates whether the arc pre-image in the parameter
|
||||
* space is vertical.
|
||||
*/
|
||||
void set_is_vertical(bool flag);
|
||||
|
||||
/*! Sets the flag that indicates whether the direction of the arc
|
||||
/*! sets the flag that indicates whether the direction of the arc
|
||||
* pre-image in the parameter space is from left to right.
|
||||
* \param flag indicates whether the arc pre-image in the parameter
|
||||
* space is from left to right.
|
||||
*/
|
||||
void set_is_directed_right(bool flag);
|
||||
|
||||
/*! Sets the flag that indicates whether the arc is a full great circle.
|
||||
/*! sets the flag that indicates whether the arc is a full great circle.
|
||||
* \param[in] flag indicates whether the arc is a full great circle.
|
||||
*/
|
||||
void set_is_full(bool flag);
|
||||
|
||||
/*! Sets the flag that indicates whether the arc degenerates to a point.
|
||||
/*! sets the flag that indicates whether the arc degenerates to a point.
|
||||
* \param[in] flag indicates whether the arc degenerates to a point.
|
||||
*/
|
||||
void set_is_degenerate(bool flag);
|
||||
|
||||
/*! Sets the flag that indicates whether the arc is empty.
|
||||
/*! sets the flag that indicates whether the arc is empty.
|
||||
* \param[in] flag indicates whether the arc is empty.
|
||||
*/
|
||||
void set_is_empty(bool flag);
|
||||
|
||||
/*! Obtains the source point.
|
||||
/*! obtains the source point.
|
||||
*/
|
||||
const Point_2& source() const;
|
||||
|
||||
/*! Obtains the target point.
|
||||
/*! obtains the target point.
|
||||
*/
|
||||
const Point_2& target() const;
|
||||
|
||||
/*! Obtains the normal to the containing plane.
|
||||
/*! obtains the normal to the containing plane.
|
||||
*/
|
||||
const Direction_3& normal() const;
|
||||
|
||||
/*! Obtains the (lexicographically) left endpoint direction.
|
||||
/*! obtains the (lexicographically) left endpoint direction.
|
||||
*/
|
||||
const Point_2& left() const;
|
||||
|
||||
/*! Obtains the (lexicographically) right endpoint.
|
||||
/*! obtains the (lexicographically) right endpoint.
|
||||
*/
|
||||
const Point_2& right() const;
|
||||
|
||||
/*! Determines whether the arc is vertical.
|
||||
/*! determines whether the arc is vertical.
|
||||
*/
|
||||
bool is_vertical() const;
|
||||
|
||||
/*! Determines whether the arc is directed lexicographically from left to
|
||||
/*! determines whether the arc is directed lexicographically from left to
|
||||
* right.
|
||||
*/
|
||||
bool is_directed_right() const;
|
||||
|
||||
/*! Determines whether the arc is a great circle.
|
||||
/*! determines whether the arc is a great circle.
|
||||
*/
|
||||
bool is_full() const;
|
||||
|
||||
/*! Determines whether the arc is degenerate.
|
||||
/*! determines whether the arc is degenerate.
|
||||
*/
|
||||
bool is_degenerate() const;
|
||||
|
||||
/*! Determines whether the arc is empty. */
|
||||
/*! determines whether the arc is empty. */
|
||||
bool is_empty() const;
|
||||
|
||||
/*! Determines whether the arc is a meridian.
|
||||
/*! determines whether the arc is a meridian.
|
||||
*/
|
||||
bool is_meridian() const;
|
||||
|
||||
|
|
@ -283,6 +283,7 @@ namespace CGAL {
|
|||
*
|
||||
* \cgalModels{Assignable,CopyConstructible,AdaptableUnaryFunction,AdaptableTernaryFunction}
|
||||
*/
|
||||
|
||||
/*!
|
||||
*/
|
||||
class Construct_point_2 {
|
||||
|
|
@ -297,7 +298,7 @@ namespace CGAL {
|
|||
/// \name Operations
|
||||
/// @{
|
||||
|
||||
/*! Construct a point on the sphere from three coordinates, which define
|
||||
/*! constructs a point on the sphere from three coordinates, which define
|
||||
* a (not necessarily normalized) direction.
|
||||
* \param[in] x the x coordinate
|
||||
* \param[in] y the y coordinate
|
||||
|
|
@ -305,7 +306,7 @@ namespace CGAL {
|
|||
*/
|
||||
Point_2 operator()(const FT& x, const FT& y, const FT& z);
|
||||
|
||||
/*! Construct a point on the sphere from a (not necessarily normalized)
|
||||
/*! constructs a point on the sphere from a (not necessarily normalized)
|
||||
* direction.
|
||||
* \param other the other direction
|
||||
*/
|
||||
|
|
@ -331,7 +332,7 @@ namespace CGAL {
|
|||
/// \name Operations
|
||||
/// @{
|
||||
|
||||
/*! Construct the minor geodesic arc from two endpoints. The minor arc
|
||||
/*! constructs the minor geodesic arc from two endpoints. The minor arc
|
||||
* is the one with the smaller angle among the two geodesic arcs with
|
||||
* the given endpoints.
|
||||
* 1. Find out whether the arc is x-monotone.
|
||||
|
|
@ -351,7 +352,7 @@ namespace CGAL {
|
|||
*/
|
||||
X_monotone_curve_2 operator()(const Point_2& p, const Point_2& q);
|
||||
|
||||
/*! Construct a full great circle from a normal to a plane.
|
||||
/*! constructs a full great circle from a normal to a plane.
|
||||
* Observe that the constructed arc has one endpoint that lies on
|
||||
* the identification curve. This point is considered both the source and
|
||||
* target (and also the left and right) point of the arc.
|
||||
|
|
@ -360,7 +361,7 @@ namespace CGAL {
|
|||
*/
|
||||
X_monotone_curve_2 operator()(const Direction_3& normal);
|
||||
|
||||
/*! Construct a geodesic arc from two endpoints and a normal to the plane
|
||||
/*! constructs a geodesic arc from two endpoints and a normal to the plane
|
||||
* containing the arc. The two endpoints determine the plane. The normal
|
||||
* determines the orientation of the plane and the final arc (whether its
|
||||
* the minor arc or the major arc). The right-hand rule can be used
|
||||
|
|
@ -395,12 +396,12 @@ namespace CGAL {
|
|||
/// \name Operations
|
||||
/// @{
|
||||
|
||||
/*! Construct a full great circle from a normal to a plane.
|
||||
/*! constructs a full great circle from a normal to a plane.
|
||||
* \param normal the normal to the plane containing the great circle.
|
||||
*/
|
||||
X_monotone_curve_2 operator()(const Direction_3& normal);
|
||||
|
||||
/*! Construct the minor geodesic arc from two endpoints. The minor arc
|
||||
/*! constructs the minor geodesic arc from two endpoints. The minor arc
|
||||
* is the one with the smaller angle among the two geodesic arcs with
|
||||
* the given endpoints.
|
||||
* 1. Find out whether the arc is x-monotone.
|
||||
|
|
@ -419,7 +420,7 @@ namespace CGAL {
|
|||
*/
|
||||
Curve_2 operator()(const Point_2& p, const Point_2& q);
|
||||
|
||||
/*! Construct a geodesic arc from two endpoints and a normal to the plane
|
||||
/*! constructs a geodesic arc from two endpoints and a normal to the plane
|
||||
* containing the arc. The two endpoints determine the plane. The normal
|
||||
* determines the orientation of the plane and the final arc (whether its
|
||||
* the minor arc or the major arc). The right-hand rule can be used
|
||||
|
|
@ -434,15 +435,15 @@ namespace CGAL {
|
|||
/// @}
|
||||
};
|
||||
|
||||
/*! Returns an instance of `Construct_point_2`.
|
||||
/*! returns an instance of `Construct_point_2`.
|
||||
*/
|
||||
Construct_point_2 construct_point_2_object() const;
|
||||
|
||||
/*! Returns an instance of `Construct_x_monotone_curve_2`.
|
||||
/*! returns an instance of `Construct_x_monotone_curve_2`.
|
||||
*/
|
||||
Construct_x_monotone_curve_2 construct_x_monotone_curve_2_object() const;
|
||||
|
||||
/*! Returns an instance of `Construct_curve_2`.
|
||||
/*! returns an instance of `Construct_curve_2`.
|
||||
*/
|
||||
Construct_curve_2 construct_curve_2_object() const;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ namespace CGAL {
|
|||
*
|
||||
* \cgalModels{ArrangementTraits_2,ArrangementLandmarkTraits_2,ArrangementOpenBoundaryTraits_2}
|
||||
*/
|
||||
template< typename Kernel >
|
||||
template <typename Kernel>
|
||||
class Arr_linear_traits_2 {
|
||||
public:
|
||||
|
||||
|
|
@ -147,7 +147,7 @@ public:
|
|||
/// \name Creation
|
||||
/// @{
|
||||
|
||||
/*! Trims the given x-monotone curve to an from src to tgt.
|
||||
/*! trims the given x-monotone curve to an from src to tgt.
|
||||
* \ pre `src` and `tgt` lies on the curve
|
||||
*/
|
||||
X_monotone_curve_2 operator()(const X_monotone_curve_2& xcv,
|
||||
|
|
|
|||
|
|
@ -93,6 +93,7 @@ namespace CGAL {
|
|||
|
||||
/// \name Types
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
*/
|
||||
// TODO: Have to turn these into links, so whenever I mention Point_2 it
|
||||
|
|
@ -119,14 +120,14 @@ namespace CGAL {
|
|||
/// \name Operations
|
||||
/// @{
|
||||
|
||||
/*! Obtain a polycurve that comprises of one given subcurve.
|
||||
/*! obtains a polycurve that comprises of one given subcurve.
|
||||
* \param subcurve input subcurve.
|
||||
* \pre `subcurve` is not degenerated (not tested).
|
||||
* \return A polycurve with one subcurve, namely `subcurve`.
|
||||
*/
|
||||
Curve_2 operator()(const Subcurve_2& subcurve) const;
|
||||
|
||||
/*! Construct a well-oriented polycurve from a range of either
|
||||
/*! constructs a well-oriented polycurve from a range of either
|
||||
* `SubcurveTraits_2::Point_2` or `SubcurveTraits_2::Curve_2`.
|
||||
*
|
||||
* \param begin iterator pointing to the first element in the
|
||||
|
|
@ -169,17 +170,17 @@ namespace CGAL {
|
|||
/// \name Operations
|
||||
/// @{
|
||||
|
||||
/*! Append a subcurve `subcurve` to an existing polycurve `cv` at the back.
|
||||
* If `cv` is empty, `subcurve` will be its first subcurve.
|
||||
/*! appends a subcurve `subcurve` to an existing polycurve `cv` at the
|
||||
* back. If `cv` is empty, `subcurve` will be its first subcurve.
|
||||
* \param cv a polycurve. Note, `cv` is (not necessarily) \f$x\f$-monotone.
|
||||
* \param subcurve a subcurve (not necessarily \f$x\f$-monotone) to be
|
||||
* appended to `cv`
|
||||
*/
|
||||
void operator()(Curve_2& cv, const Subcurve_2& subcurve) const;
|
||||
|
||||
/*! Append a subcurve `subcurve` to an existing \f$x\f$-monotone polycurve
|
||||
* `xcv` at the back. If `xcv` is empty, `subcurve` will be its first
|
||||
* subcurve.
|
||||
/*! appends a subcurve `subcurve` to an existing \f$x\f$-monotone
|
||||
* polycurve `xcv` at the back. If `xcv` is empty, `subcurve` will be its
|
||||
* first subcurve.
|
||||
* \param xcv existing \f$x\f$-monotone polycurve
|
||||
* \param subcurve the subcurve to be added
|
||||
* \pre If `xcv` is not empty then `subcurve` extends `xcv` to the right
|
||||
|
|
@ -201,7 +202,7 @@ namespace CGAL {
|
|||
/// \name Operations
|
||||
/// @{
|
||||
|
||||
/*! Append a subcurve `subcurve` to an existing polycurve `cv` at the
|
||||
/*! appends a subcurve `subcurve` to an existing polycurve `cv` at the
|
||||
* front. If `cv` is empty, `subcurve` will be its first subcurve.
|
||||
* \param cv a polycurve. Note, `cv` is (not necessarily) \f$x\f$-monotone.
|
||||
* \param subcurve a subcurve (not necessarily \f$x\f$-monotone) to be
|
||||
|
|
@ -209,9 +210,9 @@ namespace CGAL {
|
|||
*/
|
||||
void operator()(Curve_2& cv, const Subcurve_2& subcurve) const;
|
||||
|
||||
/*! Append a subcurve `subcurve` to an existing \f$x\f$-monotone polycurve
|
||||
* `xcv` at the front. If `xcv` is empty, `subcurve` will be its first
|
||||
* subcurve.
|
||||
/*! appends a subcurve `subcurve` to an existing \f$x\f$-monotone
|
||||
* polycurve `xcv` at the front. If `xcv` is empty, `subcurve` will be its
|
||||
* first subcurve.
|
||||
* \param xcv existing \f$x\f$-monotone polycurve
|
||||
* \param subcurve the subcurve to be added
|
||||
* \pre If `xcv` is not empty then `subcurve` extends `xcv` to the left if
|
||||
|
|
@ -228,7 +229,7 @@ namespace CGAL {
|
|||
|
||||
class Trim_2 {
|
||||
public:
|
||||
/*! Obtain a trimmed version of the polycurve with src and tgt as end
|
||||
/*! obtains a trimmed version of the polycurve with src and tgt as end
|
||||
* vertices.
|
||||
* Src and tgt will be swapped if they do not conform to the direction of
|
||||
* the polycurve.
|
||||
|
|
@ -238,7 +239,7 @@ namespace CGAL {
|
|||
const Point_2& tgt) const;
|
||||
};
|
||||
|
||||
/*! Subdivide a given subcurve into \f$x\f$-monotone subcurves and
|
||||
/*! subdivides a given subcurve into \f$x\f$-monotone subcurves and
|
||||
* isolated points, and insert them into an output container. An object in
|
||||
* the output container is represented by a discriminated union container
|
||||
* that holds either a point or an \f$x\f$-monotone curve.
|
||||
|
|
@ -273,10 +274,10 @@ namespace CGAL {
|
|||
*
|
||||
* The copy and default constructor as well as the assignment operator are
|
||||
* provided for polycurve subcurves. In addition, an \link
|
||||
* PkgArrangementOnSurface2op_left_shift `operator<<` \endlink for the subcurves is
|
||||
* defined for standard output streams, and an \link
|
||||
* PkgArrangementOnSurface2op_right_shift `operator>>` \endlink for the subcurves is
|
||||
* defined for standard input streams.
|
||||
* PkgArrangementOnSurface2op_left_shift `operator<<` \endlink for the
|
||||
* subcurves is defined for standard output streams, and an \link
|
||||
* PkgArrangementOnSurface2op_right_shift `operator>>` \endlink for the
|
||||
* subcurves is defined for standard input streams.
|
||||
*/
|
||||
template <typename SubcurveType_2, typename PointType_2>
|
||||
class Curve_2 {
|
||||
|
|
@ -323,15 +324,15 @@ namespace CGAL {
|
|||
/// \name Creation
|
||||
/// @{
|
||||
|
||||
/*! Default constructor that constructs an empty polycurve.
|
||||
/*! constructs Default; constructs an empty polycurve.
|
||||
*/
|
||||
Curve_2();
|
||||
|
||||
/*! Construct a polycurve from one subcurve.
|
||||
/*! constructs a polycurve from one subcurve.
|
||||
*/
|
||||
Curve_2(const Subcurve_2 subcurve);
|
||||
|
||||
/*! Construct a polycurve defined by the given range of subcurves
|
||||
/*! constructs a polycurve defined by the given range of subcurves
|
||||
* `[first, last)` (the value-type of `InputIterator` must be
|
||||
* `SubcurveTraits_2::Curve_2`. In general, the subcurves might not
|
||||
* be \f$x\f$-monotone, furthermore, they might not form a
|
||||
|
|
@ -357,7 +358,7 @@ namespace CGAL {
|
|||
/// @{
|
||||
|
||||
/*! \deprecated
|
||||
* Obtain the number of subcurve end-points that comprise the polycurve.
|
||||
* obtains the number of subcurve end-points that comprise the polycurve.
|
||||
* Note that for a bounded polycurve, if there are \f$ n\f$ points in the
|
||||
* polycurve, it comprises \f$ (n - 1)\f$ subcurves.
|
||||
* Currently, only bounded polycurves are supported.
|
||||
|
|
@ -365,20 +366,21 @@ namespace CGAL {
|
|||
unsigned_int points() const;
|
||||
|
||||
/*! \deprecated
|
||||
* Obtain an iterator pointing at the source point of the polycurve.
|
||||
* obtains an iterator pointing at the source point of the polycurve.
|
||||
*/
|
||||
const_iterator begin() const;
|
||||
|
||||
/*! Obtain an iterator pointing at the first subcurve of the polycurve.
|
||||
/*! obtains an iterator pointing at the first subcurve of the polycurve.
|
||||
*/
|
||||
Subcurve_const_iterator begin_subcurves() const;
|
||||
|
||||
/*! \deprecated
|
||||
* Obtain an iterator pointing after the end of the polycurve.
|
||||
* obtains an iterator pointing after the end of the polycurve.
|
||||
*/
|
||||
const_iterator end() const;
|
||||
|
||||
/*! Get an iterator pointing at the past-the-end subcurve of the polycurve.
|
||||
/*! obtains an iterator pointing at the past-the-end subcurve of the
|
||||
* polycurve.
|
||||
*/
|
||||
Subcurve_const_iterator end_subcurves() const;
|
||||
|
||||
|
|
@ -387,38 +389,38 @@ namespace CGAL {
|
|||
*/
|
||||
const_iterator rbegin() const;
|
||||
|
||||
/*! Obtain an iterator pointing at the last subcurve of the polycurve.
|
||||
/*! obtains an iterator pointing at the last subcurve of the polycurve.
|
||||
*/
|
||||
Subcurve_const_reverse_iterator rbegin_subcurves() const;
|
||||
|
||||
/*! \deprecated
|
||||
* Obtain an iterator pointing before the beginning of the polycurve.
|
||||
* obtains an iterator pointing before the beginning of the polycurve.
|
||||
*/
|
||||
const_iterator rend() const;
|
||||
|
||||
/*! Obtain an iterator pointing at the past-the-end subcurve of
|
||||
/*! obtains an iterator pointing at the past-the-end subcurve of
|
||||
* the polycurve in reverse order.
|
||||
*/
|
||||
Subcurve_const_reverse_iterator rend_subcurves() const;
|
||||
|
||||
/*! \deprecated
|
||||
* Obtain the number of subcurves composing the polycurve
|
||||
* obtains the number of subcurves composing the polycurve
|
||||
* (equivalent to `pi.points() - 1`). Was replaced by number_of_subcurves()
|
||||
*/
|
||||
size_type size() const;
|
||||
|
||||
/*! Obtain the number of subcurves that comprise the polycurve.
|
||||
/*! obtains the number of subcurves that comprise the polycurve.
|
||||
*/
|
||||
size_type number_of_subcurves() const;
|
||||
|
||||
/*! Obtain the \f$ k\f$th subcurve of the polycurve.
|
||||
/*! obtains the \f$ k\f$th subcurve of the polycurve.
|
||||
* \pre \f$k\f$ is not greater than or equal to \f$n-1\f$, where
|
||||
* \f$n\f$ is the number of subcurves.
|
||||
*/
|
||||
typename SubcurveTraits_2::X_monotone_curve_2
|
||||
operator[](size_t k) const;
|
||||
|
||||
/*! Obtain the bounding box of the polycurve.
|
||||
/*! obtains the bounding box of the polycurve.
|
||||
*/
|
||||
Bbox_2 bbox() const;
|
||||
|
||||
|
|
@ -427,7 +429,7 @@ namespace CGAL {
|
|||
/// \name Operations
|
||||
/// @{
|
||||
|
||||
/*! Append a subcurve to the polycurve at the back.
|
||||
/*! appends a subcurve to the polycurve at the back.
|
||||
* \a Warning: This function does not perform the precondition test
|
||||
* that the `Push_back_2` functor does. Thus, it is
|
||||
* recommended to use the latter.
|
||||
|
|
@ -438,7 +440,7 @@ namespace CGAL {
|
|||
*/
|
||||
inline void push_back(const Subcurve_2& subcurve);
|
||||
|
||||
/*! Append a subcurve to the polycurve at the front.
|
||||
/*! appends a subcurve to the polycurve at the front.
|
||||
* \a Warning: This is a risky function! Don't use it! Prefer the
|
||||
* corresponding functor which is provided in the traits
|
||||
* class.
|
||||
|
|
@ -450,12 +452,12 @@ namespace CGAL {
|
|||
inline void push_front(const Subcurve_2& subcurve);
|
||||
|
||||
/*! \deprecated
|
||||
* Add a new point to the polycurvs, which becomes the new target point
|
||||
* adds a new point to the polycurvs, which becomes the new target point
|
||||
* of `pi`.
|
||||
*/
|
||||
void push_back(const Point_2 & p);
|
||||
|
||||
/*! Reset the polycurve.
|
||||
/*! resets the polycurve.
|
||||
*/
|
||||
void clear();
|
||||
|
||||
|
|
@ -463,7 +465,6 @@ namespace CGAL {
|
|||
|
||||
}; /* end Arr_polycurve_traits_2::Curve_2 */
|
||||
|
||||
|
||||
/*! The `X_monotone_curve_2` class nested within the polycurve
|
||||
* traits is used to represent \f$ x\f$-monotone piecewise linear subcurves.
|
||||
*
|
||||
|
|
@ -518,4 +519,5 @@ namespace CGAL {
|
|||
/// @} /* End Accessing Functor Objects */
|
||||
|
||||
}; /* end Arr_polycurve_traits_2 */
|
||||
|
||||
} /* end namespace CGAL */
|
||||
|
|
|
|||
|
|
@ -149,7 +149,7 @@ public:
|
|||
//! obtains the past-the-end reverse iterator for the polyline points.
|
||||
Segment_const_reverse_iterator rend_segments() const;
|
||||
|
||||
/*! Obtain the number of subcurves that comprise the poyline.
|
||||
/*! obtains the number of subcurves that comprise the poyline.
|
||||
* \return The number of subcurves.
|
||||
*/
|
||||
Segments_size_type number_of_segments() const;
|
||||
|
|
@ -169,13 +169,13 @@ public:
|
|||
typedef std::reverse_iterator<Segment_const_iterator>
|
||||
Segment_const_reverse_iterator;
|
||||
|
||||
/*! Construct default. */
|
||||
/*! constructs default. */
|
||||
X_monotone_curve_2();
|
||||
|
||||
/*! Construct from a subcurve. */
|
||||
/*! constructs from a subcurve. */
|
||||
X_monotone_curve_2(X_monotone_segment_2 seg);
|
||||
|
||||
/*! Construct from a range. Similar to the constructor of a general
|
||||
/*! constructs from a range. Similar to the constructor of a general
|
||||
* polycurve. Like in the case of general polycurve, for the sake of
|
||||
* backwards compatibility we have to keep an implementation of construction
|
||||
* from a range of points. DO NOT USE THIS CONSTRUCTION.
|
||||
|
|
@ -183,23 +183,23 @@ public:
|
|||
template <typename InputIterator>
|
||||
X_monotone_curve_2(InputIterator begin, InputIterator end);
|
||||
|
||||
/*! Obtain the first iterator of the polyline subcurves.
|
||||
/*! obtains the first iterator of the polyline subcurves.
|
||||
*/
|
||||
Segment_const_iterator begin_segments() const;
|
||||
|
||||
/*! Obtain the past-the-end iterator of the polyline subcurves.
|
||||
/*! obtains the past-the-end iterator of the polyline subcurves.
|
||||
*/
|
||||
Segment_const_iterator end_segments() const;
|
||||
|
||||
/*! Obtain the first reverse iterator of the polyline subcurves.
|
||||
/*! obtains the first reverse iterator of the polyline subcurves.
|
||||
*/
|
||||
Segment_const_reverse_iterator rbegin_segments() const;
|
||||
|
||||
/*! Obtain the past-the-end reverse iterator for the polyline points.
|
||||
/*! obtains the past-the-end reverse iterator for the polyline points.
|
||||
*/
|
||||
Segment_const_reverse_iterator rend_segments() const;
|
||||
|
||||
/*! Obtain the number of subcurves that comprise the poyline.
|
||||
/*! obtains the number of subcurves that comprise the poyline.
|
||||
* \return The number of subcurves.
|
||||
*/
|
||||
Segments_size_type number_of_segments() const;
|
||||
|
|
@ -219,7 +219,7 @@ public:
|
|||
/// \name Operations
|
||||
/// @{
|
||||
|
||||
/*! Obtain a polyline connecting the two given endpoints.
|
||||
/*! obtains a polyline connecting the two given endpoints.
|
||||
* \param p The first point.
|
||||
* \param q The second point.
|
||||
* \pre `p` and `q` are distinct.
|
||||
|
|
@ -227,14 +227,14 @@ public:
|
|||
*/
|
||||
Curve_2 operator()(const Point_2& p, const Point_2& q) const;
|
||||
|
||||
/*! Obtain a polyline that comprises of one given segment.
|
||||
/*! obtains a polyline that comprises of one given segment.
|
||||
* \param seg input segment
|
||||
* \pre `seg` is not degenerated (not tested)
|
||||
* \return A polyline with one segment, namely `seg`.
|
||||
*/
|
||||
Curve_2 operator()(const Segment_2& seg) const;
|
||||
|
||||
/*! Construct a well-oriented polyline from a range of either
|
||||
/*! constructs a well-oriented polyline from a range of either
|
||||
* `SegmentTraits_2::Point_2` or `SegmentTraits_2::Segment_2`.
|
||||
*
|
||||
* \param begin iterator pointing to the first element in the range.
|
||||
|
|
@ -270,7 +270,7 @@ public:
|
|||
/// \name Operations
|
||||
/// @{
|
||||
|
||||
/*! Append a point `p` to an existing polyline `cv` at the back.
|
||||
/*! appends a point `p` to an existing polyline `cv` at the back.
|
||||
* \param cv a polyline. Note, `cv` is not (necessarily)
|
||||
* \f$ x\f$-monotone.
|
||||
* \param p a point to be appended to `cv` at the back.
|
||||
|
|
@ -278,7 +278,7 @@ public:
|
|||
*/
|
||||
void operator()(Curve_2& cv, const Point_2& p) const;
|
||||
|
||||
/*! Append a segment `seg` to an existing polyline `cv` at the back.
|
||||
/*! appends a segment `seg` to an existing polyline `cv` at the back.
|
||||
* If `cv` is empty, `seg` will be its first segment.
|
||||
* \param cv a polyline. Note, `cv` is (not necessarily) \f$x\f$-monotone.
|
||||
* \param seg a segment (not necessarily \f$x\f$-monotone) to be appended
|
||||
|
|
@ -286,7 +286,7 @@ public:
|
|||
*/
|
||||
void operator()(Curve_2& cv, const Segment_2& seg) const;
|
||||
|
||||
/*! Append a point `p` to an existing \f$x\f$-monotone polyline `xcv` at
|
||||
/*! appends a point `p` to an existing \f$x\f$-monotone polyline `xcv` at
|
||||
* the back.
|
||||
* \param xcv the existing \f$x\f$-monotone polyline
|
||||
* \param p the point to be pushed back.
|
||||
|
|
@ -297,7 +297,7 @@ public:
|
|||
*/
|
||||
void operator()(const X_monotone_curve_2& xcv, Point_2& p) const;
|
||||
|
||||
/*! Append a segment `seg` to an existing \f$x\f$-monotone polyline `xcv`
|
||||
/*! appends a segment `seg` to an existing \f$x\f$-monotone polyline `xcv`
|
||||
* at the back. If `xcv` is empty, `seg` will be its first segment.
|
||||
* \param xcv existing \f$x\f$-monotone polyline
|
||||
* \param seg the segment to be added
|
||||
|
|
@ -320,7 +320,7 @@ public:
|
|||
/// \name Operations
|
||||
/// @{
|
||||
|
||||
/*! Append a point `p` to an existing polyline `cv` at the front.
|
||||
/*! appends a point `p` to an existing polyline `cv` at the front.
|
||||
* \param cv a polyline. Note, `cv` is not (necessarily)
|
||||
* \f$ x\f$-monotone.
|
||||
* \param p a point to be appended to `cv` at the back.
|
||||
|
|
@ -328,7 +328,7 @@ public:
|
|||
*/
|
||||
void operator()(Curve_2& cv, const Point_2& p) const;
|
||||
|
||||
/*! Append a segment `seg` to an existing polyline `cv` at the front.
|
||||
/*! appends a segment `seg` to an existing polyline `cv` at the front.
|
||||
* If `cv` is empty, `seg` will be its first segment.
|
||||
* \param cv a polyline. Note, `cv` is (not necessarily) \f$x\f$-monotone.
|
||||
* \param seg a segment (not necessarily \f$x\f$-monotone) to be appended
|
||||
|
|
@ -336,7 +336,7 @@ public:
|
|||
*/
|
||||
void operator()(Curve_2& cv, const Segment_2& seg) const;
|
||||
|
||||
/*! Append a point `p` to an existing \f$x\f$-monotone polyline `xcv` at
|
||||
/*! appends a point `p` to an existing \f$x\f$-monotone polyline `xcv` at
|
||||
* the front.
|
||||
* \param xcv the existing \f$x\f$-monotone polyline
|
||||
* \param p the point to be pushed back.
|
||||
|
|
@ -347,7 +347,7 @@ public:
|
|||
*/
|
||||
void operator()(const X_monotone_curve_2& xcv, Point_2& p) const;
|
||||
|
||||
/*! Append a segment `seg` to an existing \f$x\f$-monotone polyline `xcv`
|
||||
/*! appends a segment `seg` to an existing \f$x\f$-monotone polyline `xcv`
|
||||
* at the front. If `xcv` is empty, `seg` will be its first segment.
|
||||
* \param xcv existing \f$x\f$-monotone polyline
|
||||
* \param seg the segment to be added
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -49,10 +49,10 @@ public:
|
|||
/// \name Creation
|
||||
/// @{
|
||||
|
||||
/*! Default constructor. */
|
||||
/*! constructs default */
|
||||
Arr_spherical_topology_traits_2();
|
||||
|
||||
/*! Constructor from a geometry-traits object.
|
||||
/*! constructs from a geometry-traits object.
|
||||
* \param traits the traits.
|
||||
*/
|
||||
Arr_spherical_topology_traits_2(const GeometryTraits_2* traits);
|
||||
|
|
@ -62,36 +62,36 @@ public:
|
|||
/// \name Accessors
|
||||
/// @{
|
||||
|
||||
/*! Obtain the DCEL (const version). */
|
||||
/*! obtains the DCEL (const version). */
|
||||
const Dcel& dcel() const;
|
||||
|
||||
/*! Obtain the DCEL (non-const version). */
|
||||
/*! obtains the DCEL (non-const version). */
|
||||
Dcel& dcel();
|
||||
|
||||
/*! Obtain the spherical face (const version). */
|
||||
/*! obtains the spherical face (const version). */
|
||||
const Face* spherical_face() const;
|
||||
|
||||
/*! Obtain the spherical face (non-const version). */
|
||||
/*! obtains the spherical face (non-const version). */
|
||||
Face* spherical_face();
|
||||
|
||||
/*! Obtain the south pole (const version). */
|
||||
/*! obtains the south pole (const version). */
|
||||
const Vertex* south_pole() const;
|
||||
|
||||
/*! Obtain the south pole (non-const version). */
|
||||
/*! obtains the south pole (non-const version). */
|
||||
Vertex* south_pole();
|
||||
|
||||
/*! Obtain the north pole (const version). */
|
||||
/*! obtains the north pole (const version). */
|
||||
const Vertex* north_pole() const;
|
||||
|
||||
/*! Obtain the north pole (non-const version). */
|
||||
/*! obtains the north pole (non-const version). */
|
||||
Vertex* north_pole();
|
||||
|
||||
/*! Obtain a vertex on the line of discontinuity that corresponds to
|
||||
/*! obtains a vertex on the line of discontinuity that corresponds to
|
||||
* the given point (or return NULL if no such vertex exists).
|
||||
*/
|
||||
const Vertex* discontinuity_vertex(const Point_2& pt) const;
|
||||
|
||||
/*! Obtain a vertex on the line of discontinuity that corresponds to
|
||||
/*! obtains a vertex on the line of discontinuity that corresponds to
|
||||
* the given point (or return NULL if no such vertex exists).
|
||||
*/
|
||||
Vertex* discontinuity_vertex(const Point_2& pt);
|
||||
|
|
|
|||
|
|
@ -0,0 +1,145 @@
|
|||
/// Copyright (c) 2007,2009,2010,2011 Tel-Aviv University (Israel).
|
||||
// All rights reserved.
|
||||
//
|
||||
// This file is part of CGAL (www.cgal.org).
|
||||
//
|
||||
// $URL$
|
||||
// $Id$
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial
|
||||
//
|
||||
// Author(s): Efi Fogel <efif@post.tau.ac.il>
|
||||
|
||||
namespace CGAL {
|
||||
|
||||
/*! \ingroup PkgArrangementOnSurface2TraitsClasses
|
||||
*
|
||||
* A metadata traits-class decorator for the arrangement package. It traces the
|
||||
* invocations of traits-class functors. It is parameterized with another traits
|
||||
* class and inherits from it. For each traits method it prints out its input
|
||||
* parameters and its output result
|
||||
*
|
||||
* It models all the concepts that the original traits models.
|
||||
*/
|
||||
template <typename BaseTraits>
|
||||
class Arr_tracing_traits_2 : public BaseTraits {
|
||||
public:
|
||||
enum Operation_id {
|
||||
COMPARE_X_2_OP = 0,
|
||||
COMPARE_XY_2_OP,
|
||||
CONSTRUCT_MIN_VERTEX_2_OP,
|
||||
CONSTRUCT_MAX_VERTEX_2_OP,
|
||||
IS_VERTICAL_2_OP,
|
||||
COMPARE_Y_AT_X_2_OP,
|
||||
EQUAL_POINTS_2_OP,
|
||||
EQUAL_CURVES_2_OP,
|
||||
COMPARE_Y_AT_X_LEFT_2_OP,
|
||||
COMPARE_Y_AT_X_RIGHT_2_OP,
|
||||
MAKE_X_MONOTONE_2_OP,
|
||||
SPLIT_2_OP,
|
||||
INTERSECT_2_OP,
|
||||
ARE_MERGEABLE_2_OP,
|
||||
MERGE_2_OP,
|
||||
CONSTRUCT_2_OPPOSITE_2_OP,
|
||||
COMPARE_ENDPOINTS_XY_2_OP,
|
||||
APPROXIMATE_2_OP,
|
||||
PARAMETER_SPACE_IN_X_2_OP,
|
||||
IS_ON_X_IDENTIFICATION_2_OP,
|
||||
COMPARE_Y_ON_BOUNDARY_2_OP,
|
||||
COMPARE_Y_NEAR_BOUNDARY_2_OP,
|
||||
PARAMETER_SPACE_IN_Y_2_OP,
|
||||
IS_ON_Y_IDENTIFICATION_2_OP,
|
||||
COMPARE_X_ON_BOUNDARY_2_OP,
|
||||
COMPARE_X_NEAR_BOUNDARY_2_OP,
|
||||
NUMBER_OF_OPERATIONS
|
||||
};
|
||||
|
||||
public:
|
||||
/// \name Creation
|
||||
/// @{
|
||||
|
||||
/*! constructs default */
|
||||
template<typename ... Args>
|
||||
Arr_tracing_traits_2(Args ... args) : Base(std::forward<Args>(args)...) {}
|
||||
|
||||
/*! disables copy constructor. */
|
||||
Arr_tracing_traits_2(const Arr_tracing_traits_2&) = delete;
|
||||
|
||||
/// @}
|
||||
|
||||
/*! enables the trace of a traits operation
|
||||
* \param id the operation identifier
|
||||
*/
|
||||
void enable_trace(Operation_id id);
|
||||
|
||||
/*! enables the trace of all traits operations
|
||||
*/
|
||||
void enable_all_traces();
|
||||
|
||||
/*! disables the trace of a traits operation
|
||||
* \param id the operation identifier
|
||||
*/
|
||||
void disable_trace(Operation_id id);
|
||||
|
||||
/*! disables the trace of all traits operations
|
||||
*/
|
||||
void disable_all_traces();
|
||||
|
||||
/// \name Types and functors inherited from `BaseTraits`
|
||||
/// @{
|
||||
|
||||
using Has_left_category = typename Base::Has_left_category;
|
||||
using Has_merge_category = typename Base::Has_merge_category;
|
||||
using Has_do_intersect_category = typename Base::Has_do_intersect_category;
|
||||
|
||||
using Left_side_category =
|
||||
typename internal::Arr_complete_left_side_category< Base >::Category;
|
||||
using Bottom_side_category =
|
||||
typename internal::Arr_complete_bottom_side_category< Base >::Category;
|
||||
using Top_side_category =
|
||||
typename internal::Arr_complete_top_side_category< Base >::Category;
|
||||
using Right_side_category =
|
||||
typename internal::Arr_complete_right_side_category< Base >::Category;
|
||||
|
||||
using Point_2 = typename Base::Point_2;
|
||||
using X_monotone_curve_2 = typename Base::X_monotone_curve_2;
|
||||
using Curve_2 = typename Base::Curve_2;
|
||||
using Multiplicity = typename Base::Multiplicity;
|
||||
|
||||
/// @}
|
||||
|
||||
/// \name Obtain the appropriate functor
|
||||
/// @{
|
||||
|
||||
Compare_x_2 compare_x_2_object() const;
|
||||
Compare_xy_2 compare_xy_2_object() const;
|
||||
Construct_min_vertex_2 construct_min_vertex_2_object() const;
|
||||
Construct_max_vertex_2 construct_max_vertex_2_object() const;
|
||||
Is_vertical_2 is_vertical_2_object() const;
|
||||
Compare_y_at_x_2 compare_y_at_x_2_object() const;
|
||||
Equal_2 equal_2_object() const;
|
||||
Compare_y_at_x_left_2 compare_y_at_x_left_2_object() const;
|
||||
Compare_y_at_x_right_2 compare_y_at_x_right_2_object() const;
|
||||
Make_x_monotone_2 make_x_monotone_2_object() const;
|
||||
Split_2 split_2_object() const;
|
||||
Intersect_2 intersect_2_object() const;
|
||||
Are_mergeable_2 are_mergeable_2_object() const;
|
||||
Merge_2 merge_2_object() const;
|
||||
Construct_opposite_2 construct_opposite_2_object() const;
|
||||
Compare_endpoints_xy_2 compare_endpoints_xy_2_object() const;
|
||||
Approximate_2 approximate_2_object() const;
|
||||
Parameter_space_in_x_2 parameter_space_in_x_2_object() const;
|
||||
Is_on_x_identification_2 is_on_x_identification_2_object() const;
|
||||
Compare_y_on_boundary_2 compare_y_on_boundary_2_object() const;
|
||||
Compare_y_near_boundary_2 compare_y_near_boundary_2_object() const;
|
||||
Parameter_space_in_y_2 parameter_space_in_y_2_object() const;
|
||||
Is_on_y_identification_2 is_on_y_identification_2_object() const;
|
||||
Compare_x_on_boundary_2 compare_x_on_boundary_2_object() const;
|
||||
Compare_x_near_boundary_2 compare_x_near_boundary_2_object() const;
|
||||
|
||||
/// @}
|
||||
};
|
||||
|
||||
template <typename OutputStream>
|
||||
OutputStream& operator<<(OutputStream& os, Comparison_result cr);
|
||||
|
||||
} // namespace CGAL
|
||||
|
|
@ -49,10 +49,10 @@ public:
|
|||
/// \name Creation
|
||||
/// @{
|
||||
|
||||
/*! Default constructor. */
|
||||
/*! constructs default. */
|
||||
Arr_unb_planar_topology_traits_2();
|
||||
|
||||
/*! Constructor from a geometry-traits object.
|
||||
/*! constructs from a geometry-traits object.
|
||||
* \param traits the traits.
|
||||
*/
|
||||
Arr_unb_planar_topology_traits_2(const GeometryTraits_2* traits);
|
||||
|
|
@ -62,16 +62,16 @@ public:
|
|||
/// \name Accessors
|
||||
/// @{
|
||||
|
||||
/*! Obtain the DCEL (const version). */
|
||||
/*! obtains the DCEL (const version). */
|
||||
const Dcel& dcel() const;
|
||||
|
||||
/*! Obtain the DCEL (non-const version). */
|
||||
/*! obtains the DCEL (non-const version). */
|
||||
Dcel& dcel();
|
||||
|
||||
/*! Obtain the unbounded face (const version). */
|
||||
/*! obtains the unbounded face (const version). */
|
||||
const Face* unbounded_face() const;
|
||||
|
||||
/*! Obtain the unbounded face (non-const version). */
|
||||
/*! obtains the unbounded face (non-const version). */
|
||||
Face* unbounded_face();
|
||||
|
||||
/// @}
|
||||
|
|
|
|||
|
|
@ -16,8 +16,8 @@ public:
|
|||
/// A model of this concept must provide:
|
||||
/// @{
|
||||
|
||||
/*! obtains an approximation of `p`'s \f$x\f$-coordinate (if `i == 0`), or of
|
||||
* `p`'s \f$y\f$-coordinate (if `i == 1`).
|
||||
/*! obtains an approximation of `p`'s \f$x\f$-coordinate (if `i` == 0), or of
|
||||
* `p`'s \f$y\f$-coordinate (if `i` == 1).
|
||||
*/
|
||||
CGAL::Approximate_number_type operator()(ArrTraits::Point_2 p, int i);
|
||||
|
||||
|
|
|
|||
|
|
@ -38,10 +38,10 @@ public:
|
|||
/// \name Access Functions
|
||||
/// @{
|
||||
|
||||
/*! Obtain the DCEL (const version). */
|
||||
/*! obtains the DCEL (const version). */
|
||||
const Dcel& dcel() const;
|
||||
|
||||
/*! Obtain the DCEL (non-const version). */
|
||||
/*! obtains the DCEL (non-const version). */
|
||||
Dcel& dcel();
|
||||
|
||||
/// @}
|
||||
|
|
|
|||
|
|
@ -198,46 +198,48 @@ implemented as peripheral classes or as free (global) functions.
|
|||
- `CGAL::Arrangement_on_surface_with_history_2<GeometryTraits_2,TopologyTraits>`
|
||||
- `CGAL::Arrangement_2<Traits,Dcel>`
|
||||
- `CGAL::Arrangement_with_history_2<Traits,Dcel>`
|
||||
- `CGAL::Arr_accessor<Arrangement>`
|
||||
- `CGAL::Aos_observer<ArrangementOnSurface_2>`
|
||||
- `CGAL::Arr_observer<Arrangement_2>`
|
||||
- `CGAL::Arrangement_2::Vertex`
|
||||
- `CGAL::Arrangement_2::Halfedge`
|
||||
- `CGAL::Arrangement_2::Face`
|
||||
- `CGAL::Arr_accessor<Arrangement>`
|
||||
- `CGAL::Arr_algebraic_segment_traits_2<Coefficient>`
|
||||
- `CGAL::Arr_Bezier_curve_traits_2<RatKernel,AlgKernel,NtTraits>`
|
||||
- `CGAL::Arr_bounded_planar_topology_traits_2<GeometryTraits_2,Dcel>`
|
||||
- `CGAL::Arr_circle_segment_traits_2<Kernel>`
|
||||
- `CGAL::Arr_circular_arc_traits_2<CircularKernel>`
|
||||
- `CGAL::Arr_circular_line_arc_traits_2<CircularKernel>`
|
||||
- `CGAL::Arr_conic_traits_2<RatKernel,AlgKernel,NtTraits>`
|
||||
- `CGAL::Arr_consolidated_curve_data_traits_2<Traits,Data>`
|
||||
- `CGAL::Arr_counting_traits_2<BaseTraits>`
|
||||
- `CGAL::Arr_curve_data_traits_2<Tr,XData,Mrg,CData,Cnv>`
|
||||
- `CGAL::Arr_dcel_base<V,H,F>`
|
||||
- `CGAL::Arr_dcel<Traits,V,H,F>`
|
||||
- `CGAL::Arr_default_dcel<Traits>`
|
||||
- `CGAL::Arr_face_extended_dcel<Traits,FData,V,H,F>`
|
||||
- `CGAL::Arr_extended_dcel<Traits,VData,HData,FData,V,H,F>`
|
||||
- `CGAL::Arr_segment_traits_2<Kernel>`
|
||||
- `CGAL::Arr_non_caching_segment_traits_2<Kernel>`
|
||||
- `CGAL::Arr_linear_traits_2<Kernel>`
|
||||
- `CGAL::Arr_polyline_traits_2<SegmentTraits>`
|
||||
- `CGAL::Arr_circle_segment_traits_2<Kernel>`
|
||||
- `CGAL::Arr_line_arc_traits_2<CircularKernel>`
|
||||
- `CGAL::Arr_circular_arc_traits_2<CircularKernel>`
|
||||
- `CGAL::Arr_circular_line_arc_traits_2<CircularKernel>`
|
||||
- `CGAL::Arr_conic_traits_2<RatKernel,AlgKernel,NtTraits>`
|
||||
- `CGAL::Arr_rational_function_traits_2<AlgebraicKernel_d_1>`
|
||||
- `CGAL::Arr_Bezier_curve_traits_2<RatKernel,AlgKernel,NtTraits>`
|
||||
- `CGAL::Arr_algebraic_segment_traits_2<Coefficient>`
|
||||
- `CGAL::Arr_geodesic_arc_on_sphere_traits_2<Kernel,x,y>`
|
||||
- `CGAL::Arr_curve_data_traits_2<Tr,XData,Mrg,CData,Cnv>`
|
||||
- `CGAL::Arr_consolidated_curve_data_traits_2<Traits,Data>`
|
||||
- `CGAL::Arr_text_formatter<Arrangement>`
|
||||
- `CGAL::Arr_face_extended_text_formatter<Arrangement>`
|
||||
- `CGAL::Arr_extended_dcel_text_formatter<Arrangement>`
|
||||
- `CGAL::Arr_with_history_text_formatter<ArrFormatter>`
|
||||
- `CGAL::Arr_naive_point_location<Arrangement>`
|
||||
- `CGAL::Arr_walk_along_line_point_location<Arrangement>`
|
||||
- `CGAL::Arr_trapezoid_ric_point_location<Arrangement>`
|
||||
- `CGAL::Arr_landmarks_point_location<Arrangement,Generator>`
|
||||
- `CGAL::Arr_vertex_index_map<Arrangement>`
|
||||
- `CGAL::Arr_face_index_map<Arrangement>`
|
||||
- `CGAL::Arr_extended_dcel<Traits,VData,HData,FData,V,H,F>`
|
||||
- `CGAL::Arr_extended_dcel_text_formatter<Arrangement>`
|
||||
- `CGAL::Arr_face_extended_text_formatter<Arrangement>`
|
||||
- `CGAL::Arr_geodesic_arc_on_sphere_traits_2<Kernel,x,y>`
|
||||
- `CGAL::Arr_landmarks_point_location<Arrangement,Generator>`
|
||||
- `CGAL::Arr_line_arc_traits_2<CircularKernel>`
|
||||
- `CGAL::Arr_linear_traits_2<Kernel>`
|
||||
- `CGAL::Arr_naive_point_location<Arrangement>`
|
||||
- `CGAL::Arr_non_caching_segment_traits_2<Kernel>`
|
||||
- `CGAL::Arr_observer<Arrangement_2>`
|
||||
- `CGAL::Arr_polyline_traits_2<SegmentTraits>`
|
||||
- `CGAL::Arr_point_location_result<Arrangement>`
|
||||
- `CGAL::Arr_bounded_planar_topology_traits_2<GeometryTraits_2,Dcel>`
|
||||
- `CGAL::Arr_unb_planar_topology_traits_2<GeometryTraits_2,Dcel>`
|
||||
- `CGAL::Arr_rational_function_traits_2<AlgebraicKernel_d_1>`
|
||||
- `CGAL::Arr_segment_traits_2<Kernel>`
|
||||
- `CGAL::Arr_spherical_topology_traits_2<GeometryTraits_2,Dcel>`
|
||||
- `CGAL::Arr_text_formatter<Arrangement>`
|
||||
- `CGAL::Arr_tracing_traits_2<BaseTraits>`
|
||||
- `CGAL::Arr_trapezoid_ric_point_location<Arrangement>`
|
||||
- `CGAL::Arr_unb_planar_topology_traits_2<GeometryTraits_2,Dcel>`
|
||||
- `CGAL::Arr_vertex_index_map<Arrangement>`
|
||||
- `CGAL::Arr_walk_along_line_point_location<Arrangement>`
|
||||
- `CGAL::Arr_with_history_text_formatter<ArrFormatter>`
|
||||
- `CGAL::Aos_observer<ArrangementOnSurface_2>`
|
||||
- `CGAL::CORE_algebraic_number_traits`
|
||||
|
||||
\cgalCRPSection{Functions}
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@
|
|||
\example Arrangement_on_surface_2/conics.cpp
|
||||
\example Arrangement_on_surface_2/conic_multiplicities.cpp
|
||||
\example Arrangement_on_surface_2/consolidated_curve_data.cpp
|
||||
\example Arrangement_on_surface_2/count_and_trace.cpp
|
||||
\example Arrangement_on_surface_2/curve_history.cpp
|
||||
\example Arrangement_on_surface_2/dcel_extension.cpp
|
||||
\example Arrangement_on_surface_2/dcel_extension_io.cpp
|
||||
|
|
|
|||
|
|
@ -0,0 +1,80 @@
|
|||
#include <iostream>
|
||||
|
||||
#include <CGAL/Exact_predicates_exact_constructions_kernel.h>
|
||||
#include <CGAL/Arr_segment_traits_2.h>
|
||||
#include <CGAL/Arr_counting_traits_2.h>
|
||||
#include <CGAL/Arr_tracing_traits_2.h>
|
||||
#include <CGAL/Arr_geodesic_arc_on_sphere_traits_2.h>
|
||||
#include <CGAL/Arr_spherical_topology_traits_2.h>
|
||||
#include <CGAL/Arrangement_on_surface_2.h>
|
||||
#include <CGAL/Arrangement_2.h>
|
||||
#include <CGAL/Cartesian.h>
|
||||
#include <CGAL/CORE_algebraic_number_traits.h>
|
||||
#include <CGAL/Arr_Bezier_curve_traits_2.h>
|
||||
|
||||
#include "arr_print.h"
|
||||
|
||||
using Kernel = CGAL::Exact_predicates_exact_constructions_kernel;
|
||||
|
||||
using Segment_base_traits = CGAL::Arr_segment_traits_2<Kernel>;
|
||||
using Segment_cnt_traits = CGAL::Arr_counting_traits_2<Segment_base_traits>;
|
||||
using Segment_traits = CGAL::Arr_tracing_traits_2<Segment_cnt_traits>;
|
||||
using Segment_arrangement = CGAL::Arrangement_2<Segment_traits>;
|
||||
using Point = Segment_traits::Point_2;
|
||||
using Segment = Segment_traits::Curve_2;
|
||||
|
||||
using Geodesic_base_traits = CGAL::Arr_geodesic_arc_on_sphere_traits_2<Kernel>;
|
||||
using Geodesic_cnt_traits = CGAL::Arr_counting_traits_2<Geodesic_base_traits>;
|
||||
using Geodesic_traits = CGAL::Arr_tracing_traits_2<Geodesic_cnt_traits>;
|
||||
using Topol_traits = CGAL::Arr_spherical_topology_traits_2<Geodesic_traits>;
|
||||
using Geodesic_arrangement =
|
||||
CGAL::Arrangement_on_surface_2<Geodesic_traits, Topol_traits>;
|
||||
using Geodesic_point = Geodesic_traits::Point_2;
|
||||
using Geodesic_curve = Geodesic_traits::Curve_2;
|
||||
|
||||
using Nt_traits = CGAL::CORE_algebraic_number_traits;
|
||||
using NT = Nt_traits::Rational;
|
||||
using Rational = Nt_traits::Rational;
|
||||
using Algebraic = Nt_traits::Algebraic;
|
||||
using Rat_kernel = CGAL::Cartesian<Rational>;
|
||||
using Alg_kernel = CGAL::Cartesian<Algebraic>;
|
||||
using Rat_point = Rat_kernel::Point_2;
|
||||
using Bezier_base_traits =
|
||||
CGAL::Arr_Bezier_curve_traits_2<Rat_kernel, Alg_kernel, Nt_traits>;
|
||||
using Bezier_cnt_traits = CGAL::Arr_counting_traits_2<Bezier_base_traits>;
|
||||
using Bezier_traits = CGAL::Arr_tracing_traits_2<Bezier_cnt_traits>;
|
||||
using Bezier_arrangement = CGAL::Arrangement_2<Bezier_traits>;
|
||||
|
||||
int main() {
|
||||
Segment_traits seg_traits;
|
||||
seg_traits.disable_all_traces();
|
||||
seg_traits.enable_trace(Segment_traits::COMPARE_Y_AT_X_2_OP);
|
||||
Segment_arrangement seg_arr(&seg_traits);
|
||||
std::vector<Point> ps = { Point(0,0), Point(1,0), Point(0,1) };
|
||||
std::vector<Segment> segs =
|
||||
{ Segment(ps[0], ps[1]), Segment(ps[1], ps[2]), Segment(ps[2], ps[0]) };
|
||||
CGAL::insert(seg_arr, segs.begin(), segs.end());
|
||||
std::cout << seg_traits;
|
||||
print_arrangement_size(seg_arr);
|
||||
std::cout << std::endl;
|
||||
|
||||
Geodesic_traits geodesic_traits;
|
||||
geodesic_traits.disable_all_traces();
|
||||
geodesic_traits.enable_trace(Geodesic_traits::COMPARE_XY_2_OP);
|
||||
auto ctr_p = geodesic_traits.construct_point_2_object();
|
||||
auto ctr_cv = geodesic_traits.construct_curve_2_object();
|
||||
std::vector<Geodesic_point> gps =
|
||||
{ ctr_p(-1,0,0), ctr_p(0,-1,0), ctr_p(0,0,-1) };
|
||||
std::vector<Geodesic_curve> gas =
|
||||
{ ctr_cv(gps[0], gps[1]), ctr_cv(gps[1], gps[2]), ctr_cv(gps[2], gps[0]) };
|
||||
Geodesic_arrangement geodesic_arr(&geodesic_traits);
|
||||
CGAL::insert(geodesic_arr, gas.begin(), gas.end());
|
||||
std::cout << geodesic_traits;
|
||||
print_arrangement_size(geodesic_arr);
|
||||
|
||||
Bezier_traits bezier_traits;
|
||||
bezier_traits.disable_all_traces();
|
||||
std::cout << bezier_traits;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -22,7 +22,7 @@ int main() {
|
|||
|
||||
Geom_traits traits;
|
||||
traits.disable_all_traces();
|
||||
traits.enable_trace(Tracing_traits::INTERSECT_OP);
|
||||
traits.enable_trace(Tracing_traits::INTERSECT_2_OP);
|
||||
|
||||
// Construct an arrangement using aggregated insertion:
|
||||
My_arrangement arr1(&traits);
|
||||
|
|
|
|||
|
|
@ -48,27 +48,27 @@ public:
|
|||
private:
|
||||
Arrangement_2* p_arr; // The associated arrangement.
|
||||
|
||||
/*! Copy constructor - not supported. */
|
||||
/*! Copy constructor not supported. */
|
||||
Aos_observer(const Self&);
|
||||
|
||||
/*! Assignment operator - not supported. */
|
||||
/*! Assignment operator not supported. */
|
||||
Self& operator=(const Self&);
|
||||
|
||||
public:
|
||||
/// \name Construction and destruction functions.
|
||||
//@{
|
||||
|
||||
/*! Default constructor. */
|
||||
/*! constructs defaults. */
|
||||
Aos_observer() : p_arr(nullptr) {}
|
||||
|
||||
/*! Constructor with an associated arrangement. */
|
||||
/*! constructs with an associated arrangement. */
|
||||
Aos_observer(Arrangement_2& arr) : p_arr(&arr)
|
||||
{
|
||||
// Register the observer object in the arrangement.
|
||||
p_arr->_register_observer(this);
|
||||
}
|
||||
|
||||
/*! Destructor. */
|
||||
/*! destructs. */
|
||||
virtual ~Aos_observer()
|
||||
{
|
||||
// Unregister the observer object from the arrangement.
|
||||
|
|
@ -80,13 +80,13 @@ public:
|
|||
/// \name Modifying the associated arrangement.
|
||||
//@{
|
||||
|
||||
/*! Get the associated arrangement (const version). */
|
||||
/*! obtains the associated arrangement (const version). */
|
||||
const Arrangement_2* arrangement() const { return (p_arr); }
|
||||
|
||||
/*! Get the associated arrangement (non-const version). */
|
||||
/*! obtains the associated arrangement (non-const version). */
|
||||
Arrangement_2* arrangement() { return (p_arr); }
|
||||
|
||||
/*! Attach the observer to an arrangement.
|
||||
/*! attaches the observer to an arrangement.
|
||||
* \pre The observer is not already attached to an arrangement.
|
||||
*/
|
||||
void attach(Arrangement_2& arr)
|
||||
|
|
@ -110,7 +110,7 @@ public:
|
|||
after_attach();
|
||||
}
|
||||
|
||||
/*! Detach the observer from the arrangement. */
|
||||
/*! detaches the observer from the arrangement. */
|
||||
void detach()
|
||||
{
|
||||
if (p_arr == nullptr) return;
|
||||
|
|
@ -564,7 +564,7 @@ public:
|
|||
//@}
|
||||
};
|
||||
|
||||
} //namespace CGAL
|
||||
} // namespace CGAL
|
||||
|
||||
#include <CGAL/enable_warnings.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -123,7 +123,7 @@ public:
|
|||
/// \name Construction.
|
||||
//@{
|
||||
|
||||
/*! Default constructor. */
|
||||
/*! constructs default. */
|
||||
Arr_Bezier_curve_traits_2 ()
|
||||
{
|
||||
p_cache = new Bezier_cache;
|
||||
|
|
@ -131,14 +131,14 @@ public:
|
|||
m_owner = true;
|
||||
}
|
||||
|
||||
/*! Copy constructor. */
|
||||
/*! constructs copy. */
|
||||
Arr_Bezier_curve_traits_2 (const Self& tr) :
|
||||
p_cache (tr.p_cache),
|
||||
p_inter_map (tr.p_inter_map),
|
||||
m_owner (false)
|
||||
{}
|
||||
|
||||
/*! Assignment operator. */
|
||||
/*! assigns. */
|
||||
Self& operator= (const Self& tr)
|
||||
{
|
||||
if (this == &tr)
|
||||
|
|
@ -150,7 +150,7 @@ public:
|
|||
return (*this);
|
||||
}
|
||||
|
||||
/*! Destructor. */
|
||||
/*! destructs. */
|
||||
~Arr_Bezier_curve_traits_2 ()
|
||||
{
|
||||
if (m_owner)
|
||||
|
|
@ -176,13 +176,12 @@ public:
|
|||
|
||||
public:
|
||||
|
||||
/*! Constructor. */
|
||||
/*! constructs. */
|
||||
Compare_x_2 (const Bezier_cache *cache) :
|
||||
p_cache (cache)
|
||||
{}
|
||||
|
||||
/*!
|
||||
* Compare the x-coordinates of two points.
|
||||
/*! compares the x-coordinates of two points.
|
||||
* \param p1 The first point.
|
||||
* \param p2 The second point.
|
||||
* \return LARGER if x(p1) > x(p2);
|
||||
|
|
@ -196,7 +195,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
/*! Get a Compare_x_2 functor object. */
|
||||
/*! obtains a `Compare_x_2` functor object. */
|
||||
Compare_x_2 compare_x_2_object () const
|
||||
{
|
||||
return (Compare_x_2 (p_cache));
|
||||
|
|
@ -212,13 +211,12 @@ public:
|
|||
|
||||
public:
|
||||
|
||||
/*! Constructor. */
|
||||
/*! constructs. */
|
||||
Compare_xy_2 (const Bezier_cache *cache) :
|
||||
p_cache (cache)
|
||||
{}
|
||||
|
||||
/*!
|
||||
* Compares two points lexigoraphically: by x, then by y.
|
||||
/*! compares two points lexigoraphically: by x, then by y.
|
||||
* \param p1 The first point.
|
||||
* \param p2 The second point.
|
||||
* \return LARGER if x(p1) > x(p2), or if x(p1) = x(p2) and y(p1) > y(p2);
|
||||
|
|
@ -232,7 +230,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
/*! Get a Compare_xy_2 functor object. */
|
||||
/*! obtains a `Compare_xy_2` functor object. */
|
||||
Compare_xy_2 compare_xy_2_object () const
|
||||
{
|
||||
return (Compare_xy_2 (p_cache));
|
||||
|
|
@ -244,8 +242,7 @@ public:
|
|||
class Construct_min_vertex_2
|
||||
{
|
||||
public:
|
||||
/*!
|
||||
* Get the left endpoint of the x-monotone curve (segment).
|
||||
/*! obtains the left endpoint of the x-monotone curve (segment).
|
||||
* \param cv The curve.
|
||||
* \return The left endpoint.
|
||||
*/
|
||||
|
|
@ -255,7 +252,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
/*! Get a Construct_min_vertex_2 functor object. */
|
||||
/*! obtains a `Construct_min_vertex_2` functor object. */
|
||||
Construct_min_vertex_2 construct_min_vertex_2_object () const
|
||||
{
|
||||
return Construct_min_vertex_2();
|
||||
|
|
@ -267,8 +264,7 @@ public:
|
|||
class Construct_max_vertex_2
|
||||
{
|
||||
public:
|
||||
/*!
|
||||
* Get the right endpoint of the x-monotone curve (segment).
|
||||
/*! obtains the right endpoint of the x-monotone curve (segment).
|
||||
* \param cv The curve.
|
||||
* \return The right endpoint.
|
||||
*/
|
||||
|
|
@ -278,7 +274,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
/*! Get a Construct_max_vertex_2 functor object. */
|
||||
/*! obtains a `Construct_max_vertex_2` functor object. */
|
||||
Construct_max_vertex_2 construct_max_vertex_2_object () const
|
||||
{
|
||||
return Construct_max_vertex_2();
|
||||
|
|
@ -290,8 +286,7 @@ public:
|
|||
class Is_vertical_2
|
||||
{
|
||||
public:
|
||||
/*!
|
||||
* Check whether the given x-monotone curve is a vertical segment.
|
||||
/*! checks whether the given x-monotone curve is a vertical segment.
|
||||
* \param cv The curve.
|
||||
* \return (true) if the curve is a vertical segment; (false) otherwise.
|
||||
*/
|
||||
|
|
@ -301,7 +296,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
/*! Get an Is_vertical_2 functor object. */
|
||||
/*! obtains an `Is_vertical_2` functor object. */
|
||||
Is_vertical_2 is_vertical_2_object () const
|
||||
{
|
||||
return Is_vertical_2();
|
||||
|
|
@ -317,13 +312,12 @@ public:
|
|||
|
||||
public:
|
||||
|
||||
/*! Constructor. */
|
||||
/*! constructs. */
|
||||
Compare_y_at_x_2 (const Bezier_cache *cache) :
|
||||
p_cache (cache)
|
||||
{}
|
||||
|
||||
/*!
|
||||
* Return the location of the given point with respect to the input curve.
|
||||
/*! returns the location of the given point with respect to the input curve.
|
||||
* \param cv The curve.
|
||||
* \param p The point.
|
||||
* \pre p is in the x-range of cv.
|
||||
|
|
@ -339,7 +333,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
/*! Get a Compare_y_at_x_2 functor object. */
|
||||
/*! obtains a `Compare_y_at_x_2` functor object. */
|
||||
Compare_y_at_x_2 compare_y_at_x_2_object () const
|
||||
{
|
||||
return (Compare_y_at_x_2 (p_cache));
|
||||
|
|
@ -355,13 +349,12 @@ public:
|
|||
|
||||
public:
|
||||
|
||||
/*! Constructor. */
|
||||
/*! constructs. */
|
||||
Compare_y_at_x_left_2 (const Bezier_cache *cache) :
|
||||
p_cache (cache)
|
||||
{}
|
||||
|
||||
/*!
|
||||
* Compares the y value of two x-monotone curves immediately to the left
|
||||
/*! compares the y value of two x-monotone curves immediately to the left
|
||||
* of their intersection point.
|
||||
* \param cv1 The first curve.
|
||||
* \param cv2 The second curve.
|
||||
|
|
@ -380,7 +373,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
/*! Get a Compare_y_at_x_left_2 functor object. */
|
||||
/*! obtains a `Compare_y_at_x_left_2` functor object. */
|
||||
Compare_y_at_x_left_2 compare_y_at_x_left_2_object () const
|
||||
{
|
||||
return (Compare_y_at_x_left_2 (p_cache));
|
||||
|
|
@ -396,13 +389,12 @@ public:
|
|||
|
||||
public:
|
||||
|
||||
/*! Constructor. */
|
||||
/*! constructs. */
|
||||
Compare_y_at_x_right_2 (const Bezier_cache *cache) :
|
||||
p_cache (cache)
|
||||
{}
|
||||
|
||||
/*!
|
||||
* Compares the y value of two x-monotone curves immediately to the right
|
||||
/*! compares the y value of two x-monotone curves immediately to the right
|
||||
* of their intersection point.
|
||||
* \param cv1 The first curve.
|
||||
* \param cv2 The second curve.
|
||||
|
|
@ -421,7 +413,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
/*! Get a Compare_y_at_x_right_2 functor object. */
|
||||
/*! obtains a `Compare_y_at_x_right_2` functor object. */
|
||||
Compare_y_at_x_right_2 compare_y_at_x_right_2_object () const
|
||||
{
|
||||
return (Compare_y_at_x_right_2 (p_cache));
|
||||
|
|
@ -437,13 +429,12 @@ public:
|
|||
|
||||
public:
|
||||
|
||||
/*! Constructor. */
|
||||
/*! constructs. */
|
||||
Equal_2 (const Bezier_cache *cache) :
|
||||
p_cache (cache)
|
||||
{}
|
||||
|
||||
/*!
|
||||
* Check if the two x-monotone curves are the same (have the same graph).
|
||||
/*! checks if the two x-monotone curves are the same (have the same graph).
|
||||
* \param cv1 The first curve.
|
||||
* \param cv2 The second curve.
|
||||
* \return (true) if the two curves are the same; (false) otherwise.
|
||||
|
|
@ -455,8 +446,7 @@ public:
|
|||
const_cast<Bezier_cache&> (*p_cache)));
|
||||
}
|
||||
|
||||
/*!
|
||||
* Check if the two points are the same.
|
||||
/*! checks if the two points are the same.
|
||||
* \param p1 The first point.
|
||||
* \param p2 The second point.
|
||||
* \return (true) if the two point are the same; (false) otherwise.
|
||||
|
|
@ -468,7 +458,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
/*! Get an Equal_2 functor object. */
|
||||
/*! obtains an `Equal_2` functor object. */
|
||||
Equal_2 equal_2_object () const
|
||||
{
|
||||
return (Equal_2 (p_cache));
|
||||
|
|
@ -486,10 +476,10 @@ public:
|
|||
Bezier_cache* p_cache;
|
||||
|
||||
public:
|
||||
/*! Constructor. */
|
||||
/*! constructs. */
|
||||
Make_x_monotone_2(Bezier_cache* cache) : p_cache(cache) {}
|
||||
|
||||
/*! Subdivide a given Bezier curve into x-monotone subcurves and insert them
|
||||
/*! subdivides a given Bezier curve into x-monotone subcurves and insert them
|
||||
* into a given output iterator.
|
||||
* \param cv the curve.
|
||||
* \param oi an output iterator for the result. Its value type is a variant
|
||||
|
|
@ -600,7 +590,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
/*! Get a Make_x_monotone_2 functor object. */
|
||||
/*! obtains a `Make_x_monotone_2` functor object. */
|
||||
Make_x_monotone_2 make_x_monotone_2_object() const
|
||||
{ return (Make_x_monotone_2 (p_cache)); }
|
||||
|
||||
|
|
@ -610,8 +600,7 @@ public:
|
|||
class Split_2
|
||||
{
|
||||
public:
|
||||
/*!
|
||||
* Split a given x-monotone curve at a given point into two sub-curves.
|
||||
/*! splits a given x-monotone curve at a given point into two sub-curves.
|
||||
* \param cv The curve to split
|
||||
* \param p The split point.
|
||||
* \param c1 Output: The left resulting subcurve (p is its right endpoint).
|
||||
|
|
@ -626,7 +615,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
/*! Get a Split_2 functor object. */
|
||||
/*! obtains a `Split_2` functor object. */
|
||||
Split_2 split_2_object () const
|
||||
{
|
||||
return Split_2();
|
||||
|
|
@ -643,14 +632,13 @@ public:
|
|||
|
||||
public:
|
||||
|
||||
/*! Constructor. */
|
||||
/*! constructs. */
|
||||
Intersect_2 (Bezier_cache *cache, Intersection_map *imap) :
|
||||
p_cache (cache),
|
||||
p_imap (imap)
|
||||
{}
|
||||
|
||||
/*!
|
||||
* Find the intersections of the two given curves and insert them to the
|
||||
/*! finds the intersections of the two given curves and insert them to the
|
||||
* given output iterator.
|
||||
* \param cv1 The first curve.
|
||||
* \param cv2 The second curve.
|
||||
|
|
@ -666,7 +654,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
/*! Get an Intersect_2 functor object. */
|
||||
/*! obtains an `Intersect_2` functor object. */
|
||||
Intersect_2 intersect_2_object () const
|
||||
{
|
||||
return (Intersect_2 (p_cache, p_inter_map));
|
||||
|
|
@ -678,8 +666,7 @@ public:
|
|||
class Are_mergeable_2
|
||||
{
|
||||
public:
|
||||
/*!
|
||||
* Check whether it is possible to merge two given x-monotone curves.
|
||||
/*! checks whether it is possible to merge two given x-monotone curves.
|
||||
* \param cv1 The first curve.
|
||||
* \param cv2 The second curve.
|
||||
* \return (true) if the two curves are mergeable - if they are supported
|
||||
|
|
@ -692,7 +679,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
/*! Get an Are_mergeable_2 functor object. */
|
||||
/*! obtains an `Are_mergeable_2` functor object. */
|
||||
Are_mergeable_2 are_mergeable_2_object () const
|
||||
{
|
||||
return Are_mergeable_2();
|
||||
|
|
@ -709,7 +696,7 @@ public:
|
|||
/*! The traits (in case it has state) */
|
||||
const Traits* m_traits;
|
||||
|
||||
/*! Constructor
|
||||
/*! constructs
|
||||
* \param traits the traits (in case it has state)
|
||||
*/
|
||||
Merge_2(const Traits* traits) : m_traits(traits) {}
|
||||
|
|
@ -718,8 +705,7 @@ public:
|
|||
Nt_traits, Bounding_traits>;
|
||||
|
||||
public:
|
||||
/*!
|
||||
* Merge two given x-monotone curves into a single curve (segment).
|
||||
/*! merges two given x-monotone curves into a single curve (segment).
|
||||
* \param cv1 The first curve.
|
||||
* \param cv2 The second curve.
|
||||
* \param c Output: The merged curve.
|
||||
|
|
@ -736,7 +722,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
/*! Get a Merge_2 functor object. */
|
||||
/*! obtains a `Merge_2` functor object. */
|
||||
Merge_2 merge_2_object () const
|
||||
{
|
||||
return Merge_2(this);
|
||||
|
|
@ -752,8 +738,7 @@ public:
|
|||
class Compare_endpoints_xy_2
|
||||
{
|
||||
public:
|
||||
/*!
|
||||
* Compare the endpoints of an $x$-monotone curve lexicographically.
|
||||
/*! compares the endpoints of an $x$-monotone curve lexicographically.
|
||||
* (assuming the curve has a designated source and target points).
|
||||
* \param cv The curve.
|
||||
* \return SMALLER if the curve is directed right;
|
||||
|
|
@ -768,7 +753,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
/*! Get a Compare_endpoints_xy_2 functor object. */
|
||||
/*! obtains a `Compare_endpoints_xy_2` functor object. */
|
||||
Compare_endpoints_xy_2 compare_endpoints_xy_2_object() const
|
||||
{
|
||||
return Compare_endpoints_xy_2();
|
||||
|
|
@ -781,16 +766,14 @@ public:
|
|||
/*! The traits (in case it has state) */
|
||||
const Traits& m_traits;
|
||||
|
||||
/*! Constructor
|
||||
/*! constructs
|
||||
* \param traits the traits (in case it has state)
|
||||
*/
|
||||
Trim_2(const Traits& traits) : m_traits(traits) {}
|
||||
|
||||
friend class Arr_Bezier_curve_traits_2<Rat_kernel, Alg_kernel,
|
||||
Nt_traits, Bounding_traits>;
|
||||
/*!\brief
|
||||
* Returns a trimmed version of an arc
|
||||
*
|
||||
/*! returns a trimmed version of an arc
|
||||
* \param xcv The arc
|
||||
* \param src the new first endpoint
|
||||
* \param tgt the new second endpoint
|
||||
|
|
@ -824,7 +807,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
/*! Obtain a Trim_2 functor object. */
|
||||
/*! obtains a `Trim_2` functor object. */
|
||||
Trim_2 trim_2_object() const { return Trim_2(*this); }
|
||||
|
||||
/*! \class Construct_opposite_2
|
||||
|
|
@ -833,9 +816,7 @@ public:
|
|||
class Construct_opposite_2
|
||||
{
|
||||
public:
|
||||
|
||||
/*!
|
||||
* Construct an opposite x-monotone curve (with swapped source and target).
|
||||
/*! constructs an opposite x-monotone curve (with swapped source and target).
|
||||
* \param cv The curve.
|
||||
* \return The opposite curve.
|
||||
*/
|
||||
|
|
@ -845,7 +826,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
/*! Get a Construct_opposite_2 functor object. */
|
||||
/*! obtains a `Construct_opposite_2` functor object. */
|
||||
Construct_opposite_2 construct_opposite_2_object() const
|
||||
{
|
||||
return Construct_opposite_2();
|
||||
|
|
@ -854,7 +835,8 @@ public:
|
|||
//@}
|
||||
};
|
||||
|
||||
} //namespace CGAL
|
||||
} // namespace CGAL
|
||||
|
||||
#include <CGAL/enable_warnings.h>
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -69,30 +69,29 @@ private:
|
|||
|
||||
public:
|
||||
|
||||
/*! Constructor with an associated arrangement. */
|
||||
/*! constructs from an associated arrangement. */
|
||||
Arr_accessor(Arrangement_2& arr) : p_arr(&arr) {}
|
||||
|
||||
/* Get the arrangement. */
|
||||
/*! obtains the arrangement. */
|
||||
Arrangement_2& arrangement() { return (*p_arr); }
|
||||
|
||||
/* Get the arrangement (const version). */
|
||||
/*! obtains the arrangement (const version). */
|
||||
const Arrangement_2& arrangement() const { return (*p_arr); }
|
||||
|
||||
/// \name Accessing the notification functions (for the global functions).
|
||||
//@{
|
||||
|
||||
/*! Notify that a global operation is about to take place. */
|
||||
/*! notifies that a global operation is about to take place. */
|
||||
void notify_before_global_change() { p_arr->_notify_before_global_change(); }
|
||||
|
||||
/*! Notify that a global operation was completed. */
|
||||
/*! notifies that a global operation was completed. */
|
||||
void notify_after_global_change() { p_arr->_notify_after_global_change(); }
|
||||
//@}
|
||||
|
||||
/// \name Local operations and predicates for the arrangement.
|
||||
//@{
|
||||
|
||||
/*!
|
||||
* Locate the arrangement feature that contains the given curve-end.
|
||||
/*! locates the arrangement feature that contains the given curve-end.
|
||||
* \param cv The curve.
|
||||
* \param ind ARR_MIN_END if we refer to cv's minimal end;
|
||||
* ARR_MAX_END if we refer to its maximal end.
|
||||
|
|
@ -128,8 +127,7 @@ public:
|
|||
return Pl_result::make_result(Vertex_const_handle());
|
||||
}
|
||||
|
||||
/*!
|
||||
* Locate the place for the given curve around the given vertex.
|
||||
/*! locates the place for the given curve around the given vertex.
|
||||
* \param vh A handle for the arrangement vertex.
|
||||
* \param cv The given x-monotone curve.
|
||||
* \pre v is one of cv's endpoints.
|
||||
|
|
@ -162,8 +160,7 @@ public:
|
|||
return (p_arr->_handle_for (he));
|
||||
}
|
||||
|
||||
/*!
|
||||
* Locate the place for the given curve-end around the given vertex,
|
||||
/*! locates the place for the given curve-end around the given vertex,
|
||||
* which lies on the boundary.
|
||||
* \param vh A handle for the arrangement vertex.
|
||||
* \param cv The curve.
|
||||
|
|
@ -177,11 +174,11 @@ public:
|
|||
* vertex (in a clockwise order).
|
||||
*/
|
||||
Halfedge_handle
|
||||
locate_around_boundary_vertex(Vertex_handle vh,
|
||||
const X_monotone_curve_2& cv,
|
||||
Arr_curve_end ind,
|
||||
Arr_parameter_space ps_x,
|
||||
Arr_parameter_space ps_y) const
|
||||
locate_around_boundary_vertex(Vertex_handle vh,
|
||||
const X_monotone_curve_2& cv,
|
||||
Arr_curve_end ind,
|
||||
Arr_parameter_space ps_x,
|
||||
Arr_parameter_space ps_y) const
|
||||
{
|
||||
CGAL_precondition((ps_x != ARR_INTERIOR) || (ps_y != ARR_INTERIOR));
|
||||
|
||||
|
|
@ -193,8 +190,7 @@ public:
|
|||
return (p_arr->_handle_for (he));
|
||||
}
|
||||
|
||||
/*!
|
||||
* Compute the distance (in halfedges) between two halfedges.
|
||||
/*! computes the distance (in halfedges) between two halfedges.
|
||||
* \param e1 A handle for the source halfedge.
|
||||
* \param e2 A handle for the destination halfedge.
|
||||
* \return In case e1 and e2 belong to the same connected component, the
|
||||
|
|
@ -222,8 +218,7 @@ public:
|
|||
return (static_cast<int>(dist));
|
||||
}
|
||||
|
||||
/*!
|
||||
* Determine whether a given query halfedge lies in the interior of a new
|
||||
/*! determines whether a given query halfedge lies in the interior of a new
|
||||
* face we are about to create, by connecting it with another halfedge
|
||||
* using a given x-monotone curve.
|
||||
* \param prev1 A handle for the query halfedge.
|
||||
|
|
@ -244,8 +239,7 @@ public:
|
|||
cv));
|
||||
}
|
||||
|
||||
/*!
|
||||
* Check if the given vertex represents one of the ends of a given curve.
|
||||
/*! checks if the given vertex represents one of the ends of a given curve.
|
||||
* \param v The vertex.
|
||||
* \param cv The curve.
|
||||
* \param ind ARR_MIN_END if we refer to cv's minimal end;
|
||||
|
|
@ -262,8 +256,7 @@ public:
|
|||
cv, ind, ps_x, ps_y));
|
||||
}
|
||||
|
||||
/*!
|
||||
* Check whether the given halfedge lies on the outer boundary of its
|
||||
/*! checks whether the given halfedge lies on the outer boundary of its
|
||||
* incident face.
|
||||
* \param he The given halfedge.
|
||||
* \return (true) in case he lies on the outer boundary of its incident face;
|
||||
|
|
@ -275,8 +268,7 @@ public:
|
|||
return (! p_he->is_on_inner_ccb());
|
||||
}
|
||||
|
||||
/*!
|
||||
* Check whether the given halfedge lies on the inner boundary of its
|
||||
/*! checks whether the given halfedge lies on the inner boundary of its
|
||||
* incident face.
|
||||
* \param he The given halfedge.
|
||||
* \return (true) in case he lies on a hole inside its incident face;
|
||||
|
|
@ -288,8 +280,7 @@ public:
|
|||
return (p_he->is_on_inner_ccb());
|
||||
}
|
||||
|
||||
/*!
|
||||
* Create a new vertex and associate it with the given point.
|
||||
/*! creates a new vertex and associate it with the given point.
|
||||
* \param p The point.
|
||||
* \return A handle for the newly created vertex.
|
||||
*/
|
||||
|
|
@ -300,8 +291,7 @@ public:
|
|||
return (p_arr->_handle_for (v));
|
||||
}
|
||||
|
||||
/*!
|
||||
* Create a new boundary vertex.
|
||||
/*! creates a new boundary vertex.
|
||||
* \param pt the point
|
||||
* \param ps_x The parameter space in x.
|
||||
* \param ps_y The parameter space in y.
|
||||
|
|
@ -328,8 +318,7 @@ public:
|
|||
return (p_arr->_handle_for(v));
|
||||
}
|
||||
|
||||
/*!
|
||||
* Create a new boundary vertex.
|
||||
/*! creates a new boundary vertex.
|
||||
* \param cv The curve incident to the boundary.
|
||||
* \param ind The relevant curve-end.
|
||||
* \param ps_x The parameter space in x.
|
||||
|
|
@ -358,8 +347,7 @@ public:
|
|||
return (p_arr->_handle_for(v));
|
||||
}
|
||||
|
||||
/*!
|
||||
* Locate the arrangement features that will be used for inserting the
|
||||
/*! locates the arrangement features that will be used for inserting the
|
||||
* given curve end, which has a boundary condition, and set a proper vertex
|
||||
* there.
|
||||
* \param f The face that contains the curve end.
|
||||
|
|
@ -388,8 +376,7 @@ public:
|
|||
return (std::make_pair(p_arr->_handle_for(v), p_arr->_handle_for(pred)));
|
||||
}
|
||||
|
||||
/*!
|
||||
* Insert an x-monotone curve into the arrangement, where the end vertices
|
||||
/*! inserts an x-monotone curve into the arrangement, where the end vertices
|
||||
* are given by the target points of two given halfedges.
|
||||
* The two halfedges should be given such that in case a new face is formed,
|
||||
* it will be the incident face of the halfedge directed from the first
|
||||
|
|
@ -426,8 +413,7 @@ public:
|
|||
return (p_arr->_handle_for(he));
|
||||
}
|
||||
|
||||
/*!
|
||||
* Insert an x-monotone curve into the arrangement, such that one of its
|
||||
/*! inserts an x-monotone curve into the arrangement, such that one of its
|
||||
* endpoints corresponds to a given arrangement vertex, given the exact
|
||||
* place for the curve in the circular list around this vertex. The other
|
||||
* endpoint corresponds to a free vertex (a newly created vertex or an
|
||||
|
|
@ -463,8 +449,7 @@ public:
|
|||
return (p_arr->_handle_for (he));
|
||||
}
|
||||
|
||||
/*!
|
||||
* Insert an x-monotone curve into the arrangement, such that both its
|
||||
/*! inserts an x-monotone curve into the arrangement, such that both its
|
||||
* endpoints correspond to free arrangement vertices (newly created vertices
|
||||
* or existing isolated vertices), so a new hole is formed in the face
|
||||
* that contains the two vertices.
|
||||
|
|
@ -511,16 +496,14 @@ public:
|
|||
|
||||
}
|
||||
|
||||
/*!
|
||||
* Insert the given vertex as an isolated vertex inside the given face.
|
||||
/*! inserts the given vertex as an isolated vertex inside the given face.
|
||||
* \param f The face that should contain the isolated vertex.
|
||||
* \param v The isolated vertex.
|
||||
*/
|
||||
void insert_isolated_vertex(Face_handle f, Vertex_handle v)
|
||||
{ p_arr->_insert_isolated_vertex(p_arr->_face (f), p_arr->_vertex(v)); }
|
||||
|
||||
/*!
|
||||
* Relocate all holes and isolated vertices to their proper position,
|
||||
/*! relocates all holes and isolated vertices to their proper position,
|
||||
* immediately after a face has split due to the insertion of a new halfedge.
|
||||
* In case insert_at_vertices_ex() was invoked and indicated that a new face
|
||||
* has been created, this function should be called with the halfedge
|
||||
|
|
@ -539,8 +522,7 @@ public:
|
|||
void relocate_holes_in_new_face(Halfedge_handle new_he)
|
||||
{ p_arr->_relocate_holes_in_new_face(p_arr->_halfedge(new_he)); }
|
||||
|
||||
/*!
|
||||
* Move an outer CCB from one face to another.
|
||||
/*! moves an outer CCB from one face to another.
|
||||
* \param from_face The source face.
|
||||
* \param to_face The destination face.
|
||||
* \param ccb A CCB circulator that corresponds to component to move.
|
||||
|
|
@ -552,8 +534,7 @@ public:
|
|||
p_arr->_halfedge (ccb));
|
||||
}
|
||||
|
||||
/*!
|
||||
* Move an inner CCB from one face to another.
|
||||
/*! moves an inner CCB from one face to another.
|
||||
* \param from_face The source face.
|
||||
* \param to_face The destination face.
|
||||
* \param ccb A CCB circulator that corresponds to component to move.
|
||||
|
|
@ -565,8 +546,7 @@ public:
|
|||
p_arr->_halfedge(ccb));
|
||||
}
|
||||
|
||||
/*!
|
||||
* Move an isolated vertex from one face to another.
|
||||
/*! moves an isolated vertex from one face to another.
|
||||
* \param from_face The source face.
|
||||
* \param to_face The destination face.
|
||||
* \param v The isolated vertex to move.
|
||||
|
|
@ -578,8 +558,7 @@ public:
|
|||
p_arr->_face(to_face), p_arr->_vertex(v));
|
||||
}
|
||||
|
||||
/*!
|
||||
* Remove an isolated vertex from its face.
|
||||
/*! removes an isolated vertex from its face.
|
||||
* \param v The isolated vertex to remove.
|
||||
*/
|
||||
void remove_isolated_vertex_ex (Vertex_handle v)
|
||||
|
|
@ -589,8 +568,7 @@ public:
|
|||
p_arr->_remove_isolated_vertex(iso_v);
|
||||
}
|
||||
|
||||
/*!
|
||||
* Modify the point associated with a given vertex. The point may be
|
||||
/*! modifies the point associated with a given vertex. The point may be
|
||||
* geometrically different than the one currently associated with the vertex.
|
||||
* \param v The vertex to modify.
|
||||
* \param p The new point to associate with v.
|
||||
|
|
@ -602,9 +580,8 @@ public:
|
|||
return v;
|
||||
}
|
||||
|
||||
/*!
|
||||
* Modify the x-monotone curve associated with a given edge. The curve may be
|
||||
* geometrically different than the one currently associated with the edge.
|
||||
/*! modifies the x-monotone curve associated with a given edge. The curve may
|
||||
* be geometrically different than the one currently associated with the edge.
|
||||
* \param e The edge to modify.
|
||||
* \param cv The new x-monotone curve to associate with e.
|
||||
* \return A handle for the modified edge (same as e).
|
||||
|
|
@ -616,8 +593,7 @@ public:
|
|||
return e;
|
||||
}
|
||||
|
||||
/*!
|
||||
* Split a given edge into two at a given point, and associate the given
|
||||
/*! splits a given edge into two at a given point, and associate the given
|
||||
* x-monotone curves with the split edges.
|
||||
* \param e The edge to split (one of the pair of twin halfedges).
|
||||
* \param p The split point.
|
||||
|
|
@ -638,8 +614,7 @@ public:
|
|||
return (p_arr->_handle_for(he));
|
||||
}
|
||||
|
||||
/*!
|
||||
* Split a given edge into two at the given vertex, and associate the given
|
||||
/*! splits a given edge into two at the given vertex, and associate the given
|
||||
* x-monotone curves with the split edges.
|
||||
* \param e The edge to split (one of the pair of twin halfedges).
|
||||
* \param v The split vertex.
|
||||
|
|
@ -661,8 +636,7 @@ public:
|
|||
return (p_arr->_handle_for(he));
|
||||
}
|
||||
|
||||
/*!
|
||||
* Split a fictitious edge at the given vertex.
|
||||
/*! splits a fictitious edge at the given vertex.
|
||||
* \param e The edge to split (one of the pair of twin halfedges).
|
||||
* \param v The split vertex.
|
||||
* \return A handle for the first split halfedge, whose source equals the
|
||||
|
|
@ -677,8 +651,7 @@ public:
|
|||
return (p_arr->_handle_for(he));
|
||||
}
|
||||
|
||||
/*!
|
||||
* Remove a pair of twin halfedges from the arrangement.
|
||||
/*! removes a pair of twin halfedges from the arrangement.
|
||||
* \param e A handle for one of the halfedges to be removed.
|
||||
* \param remove_source Should the source vertex of e be removed if it
|
||||
* becomes isolated (true by default).
|
||||
|
|
@ -698,8 +671,7 @@ public:
|
|||
return (p_arr->_handle_for(f));
|
||||
}
|
||||
|
||||
/*!
|
||||
* Check if the two given halfedges lie on the same inner component.
|
||||
/*! checks if the two given halfedges lie on the same inner component.
|
||||
* \param e1 A handle for the first halfedge.
|
||||
* \param e2 A handle for the second halfedge.
|
||||
* \return Whether e1 and e2 lie on the same inner component.
|
||||
|
|
@ -714,8 +686,7 @@ public:
|
|||
return (ic1 == ic2);
|
||||
}
|
||||
|
||||
/*!
|
||||
* Check if the two given halfedges lie on the same outer component.
|
||||
/*! checks if the two given halfedges lie on the same outer component.
|
||||
* \param e1 A handle for the first halfedge.
|
||||
* \param e2 A handle for the second halfedge.
|
||||
* \return Whether e1 and e2 lie on the same outer component.
|
||||
|
|
@ -741,7 +712,7 @@ public:
|
|||
typedef typename Arrangement_2::_Is_valid_vertex Is_valid_vertex;
|
||||
typedef typename Arrangement_2::_Valid_vertex_iterator Valid_vertex_iterator;
|
||||
|
||||
/*! Get an iterator for the first valid arrangement vertex. */
|
||||
/*! obtains an iterator for the first valid arrangement vertex. */
|
||||
Valid_vertex_iterator valid_vertices_begin()
|
||||
{
|
||||
return (Valid_vertex_iterator
|
||||
|
|
@ -750,7 +721,7 @@ public:
|
|||
Is_valid_vertex (p_arr->topology_traits())));
|
||||
}
|
||||
|
||||
/*! Get a past-the-end iterator for the valid arrangement vertices. */
|
||||
/*! obtains a past-the-end iterator for the valid arrangement vertices. */
|
||||
Valid_vertex_iterator valid_vertices_end()
|
||||
{
|
||||
return (Valid_vertex_iterator
|
||||
|
|
@ -759,7 +730,7 @@ public:
|
|||
Is_valid_vertex (p_arr->topology_traits())));
|
||||
}
|
||||
|
||||
/*! Get the number of valid arrangement vertices. */
|
||||
/*! obtains the number of valid arrangement vertices. */
|
||||
Size number_of_valid_vertices() const
|
||||
{
|
||||
return (p_arr->topology_traits()->number_of_valid_vertices());
|
||||
|
|
@ -786,13 +757,11 @@ public:
|
|||
typedef DInner_ccb Dcel_inner_ccb;
|
||||
typedef DIso_vertex Dcel_isolated_vertex;
|
||||
|
||||
/*!
|
||||
* Get the arrangement DCEL.
|
||||
/*! obtains the arrangement DCEL.
|
||||
*/
|
||||
const Dcel& dcel() const { return (p_arr->_dcel()); }
|
||||
|
||||
/*!
|
||||
* Clear the entire arrangement.
|
||||
/*! clears the entire arrangement.
|
||||
*/
|
||||
void clear_all()
|
||||
{
|
||||
|
|
@ -800,8 +769,7 @@ public:
|
|||
p_arr->_dcel().delete_all();
|
||||
}
|
||||
|
||||
/*!
|
||||
* Set the boundary of a vertex
|
||||
/*! sets the boundary of a vertex
|
||||
* \param p A vertex
|
||||
* \param ps_x The boundary condition at x.
|
||||
* \param ps_y The boundary condition at y.
|
||||
|
|
@ -816,8 +784,7 @@ public:
|
|||
return (v_to_set);
|
||||
}
|
||||
|
||||
/*!
|
||||
* Create a new vertex.
|
||||
/*! creates a new vertex.
|
||||
* \param p A pointer to the point (may be nullptr in case of a vertex at
|
||||
* infinity).
|
||||
* \param ps_x The boundary condition at x.
|
||||
|
|
@ -842,8 +809,7 @@ public:
|
|||
return (new_v);
|
||||
}
|
||||
|
||||
/*!
|
||||
* Create a new edge (halfedge pair), associated with the given curve.
|
||||
/*! creates a new edge (halfedge pair), associated with the given curve.
|
||||
* \param cv A pointer to the x-monotone curve (may be nullptr in case of
|
||||
* a fictitious edge).
|
||||
* \return A pointer to one of the created DCEL halfedge.
|
||||
|
|
@ -860,34 +826,29 @@ public:
|
|||
return new_he;
|
||||
}
|
||||
|
||||
/*!
|
||||
* Create a new face.
|
||||
/*! creates a new face.
|
||||
* \return A pointer to the created DCEL face.
|
||||
*/
|
||||
Dcel_face* new_face() { return (p_arr->_dcel().new_face()); }
|
||||
|
||||
/*!
|
||||
* Create a new outer CCB.
|
||||
/*! creates a new outer CCB.
|
||||
* \return A pointer to the created DCEL outer CCB.
|
||||
*/
|
||||
Dcel_outer_ccb* new_outer_ccb() { return (p_arr->_dcel().new_outer_ccb()); }
|
||||
|
||||
/*!
|
||||
* Create a new inner CCB.
|
||||
/*! creates a new inner CCB.
|
||||
* \return A pointer to the created DCEL inner CCB.
|
||||
*/
|
||||
Dcel_inner_ccb* new_inner_ccb()
|
||||
{ return (p_arr->_dcel().new_inner_ccb()); }
|
||||
|
||||
/*!
|
||||
* Create a new isolated vertex.
|
||||
/*! creates a new isolated vertex.
|
||||
* \return A pointer to the created DCEL isolated vertex.
|
||||
*/
|
||||
Dcel_isolated_vertex* new_isolated_vertex()
|
||||
{ return (p_arr->_dcel().new_isolated_vertex()); }
|
||||
|
||||
/*!
|
||||
* Remove a range of vertices
|
||||
/*! removes a range of vertices
|
||||
*/
|
||||
template <typename VertexRange>
|
||||
void delete_vertices(const VertexRange& range)
|
||||
|
|
@ -902,8 +863,7 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
/*!
|
||||
* Remove a range of edges
|
||||
/*! removes a range of edges
|
||||
*/
|
||||
template <typename EdgeRange>
|
||||
void delete_edges(const EdgeRange& range)
|
||||
|
|
@ -918,8 +878,7 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
/*!
|
||||
* Remove a range of faces
|
||||
/*! removes a range of faces
|
||||
*/
|
||||
template <typename FaceRange>
|
||||
void delete_faces(const FaceRange& range)
|
||||
|
|
@ -932,8 +891,7 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
/*!
|
||||
* Remove a range of outer ccbs
|
||||
/*! removes a range of outer ccbs
|
||||
*/
|
||||
template <typename CcbRange>
|
||||
void delete_outer_ccbs(const CcbRange& range)
|
||||
|
|
@ -946,8 +904,7 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
/*!
|
||||
* Remove a range of inner ccbs
|
||||
/*! removes a range of inner ccbs
|
||||
*/
|
||||
template <typename CcbRange>
|
||||
void delete_inner_ccbs(const CcbRange& range)
|
||||
|
|
@ -960,14 +917,13 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
/*!
|
||||
* Update the topology traits after the DCEL has been updated.
|
||||
/*! updates the topology traits after the DCEL has been updated.
|
||||
*/
|
||||
void dcel_updated() { p_arr->topology_traits()->dcel_updated(); }
|
||||
//@}
|
||||
|
||||
};
|
||||
|
||||
} //namespace CGAL
|
||||
} // namespace CGAL
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -33,11 +33,10 @@
|
|||
|
||||
namespace CGAL {
|
||||
|
||||
template< class Coefficient_ >
|
||||
template <class Coefficient_>
|
||||
class Arr_algebraic_segment_traits_2 {
|
||||
|
||||
public:
|
||||
|
||||
enum Site_of_point {
|
||||
POINT_IN_INTERIOR = 0,
|
||||
MIN_ENDPOINT = -1,
|
||||
|
|
@ -57,16 +56,15 @@ public:
|
|||
|
||||
typedef CGAL::Arr_algebraic_segment_traits_2<Coefficient> Self;
|
||||
|
||||
// Default constructor
|
||||
// constructs default
|
||||
Arr_algebraic_segment_traits_2 () {}
|
||||
|
||||
|
||||
// Copy constructor
|
||||
// constructs copy
|
||||
Arr_algebraic_segment_traits_2 (const Self& /* s */) { /* No state...*/}
|
||||
|
||||
// Assignment operator
|
||||
const Self& operator= (const Self& s)
|
||||
{return s;}
|
||||
// assigns
|
||||
const Self& operator= (const Self& s) { return s; }
|
||||
|
||||
// public types
|
||||
|
||||
|
|
@ -613,11 +611,7 @@ public:
|
|||
return Construct_curve_2(&CKvA_2::instance());
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
/*
|
||||
|
||||
// additional functionality (for not introducing a "general" arc)
|
||||
|
||||
|
|
@ -650,12 +644,12 @@ public:
|
|||
|
||||
};
|
||||
|
||||
*/
|
||||
*/
|
||||
|
||||
};
|
||||
|
||||
} //namespace CGAL
|
||||
} // namespace CGAL
|
||||
|
||||
#include <CGAL/enable_warnings.h>
|
||||
|
||||
#endif // CGAL_ARR_ALGEBRAIC_SEGMENT_TRAITS_H
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -118,26 +118,26 @@ public:
|
|||
///! \name Construction methods.
|
||||
//@{
|
||||
|
||||
/*! Default constructor. */
|
||||
/*! constructs default. */
|
||||
Arr_bounded_planar_topology_traits_2() :
|
||||
Base(),
|
||||
unb_face(nullptr)
|
||||
{}
|
||||
|
||||
/*! Constructor from a geometry-traits object. */
|
||||
/*! constructs from a geometry-traits object. */
|
||||
Arr_bounded_planar_topology_traits_2(const Gt2* traits) :
|
||||
Base(traits),
|
||||
unb_face(nullptr)
|
||||
{}
|
||||
|
||||
/*! Assign the contents of another topology-traits class. */
|
||||
/*! assigns the contents of another topology-traits class. */
|
||||
void assign(const Self& other);
|
||||
//@}
|
||||
|
||||
///! \name Accessing the DCEL and constructing iterators.
|
||||
//@{
|
||||
|
||||
/*! Determine whether the DCEL reprsenets an empty structure. */
|
||||
/*! determines whether the DCEL reprsenets an empty structure. */
|
||||
bool is_empty_dcel() const
|
||||
{
|
||||
// An empty bounded arrangement has no edges or vertices.
|
||||
|
|
@ -145,40 +145,40 @@ public:
|
|||
this->m_dcel.size_of_halfedges() == 0);
|
||||
}
|
||||
|
||||
/*! Check if the given vertex is concrete (associated with a point). */
|
||||
/*! checks if the given vertex is concrete (associated with a point). */
|
||||
inline bool is_concrete_vertex(const Vertex*) const { return true; }
|
||||
|
||||
/*! Get the number of concrete vertices. */
|
||||
/*! obtains the number of concrete vertices. */
|
||||
Size number_of_concrete_vertices() const
|
||||
{
|
||||
// All vertices are concrete.
|
||||
return (this->m_dcel.size_of_vertices());
|
||||
}
|
||||
|
||||
/*! Check if the given vertex is valid (not a fictitious one). */
|
||||
/*! checks if the given vertex is valid (not a fictitious one). */
|
||||
inline bool is_valid_vertex(const Vertex*) const { return true; }
|
||||
|
||||
/*! Get the number of valid vertices. */
|
||||
/*! obtains the number of valid vertices. */
|
||||
Size number_of_valid_vertices() const
|
||||
{
|
||||
// All vertices are valid.
|
||||
return (this->m_dcel.size_of_vertices());
|
||||
}
|
||||
|
||||
/*! Check if the given halfedge is valid (not a fictitious one). */
|
||||
/*! checks if the given halfedge is valid (not a fictitious one). */
|
||||
inline bool is_valid_halfedge(const Halfedge*) const { return true; }
|
||||
|
||||
/*! Get the number of valid halfedges. */
|
||||
/*! obtains the number of valid halfedges. */
|
||||
Size number_of_valid_halfedges() const
|
||||
{
|
||||
// All halfedges are valid.
|
||||
return (this->m_dcel.size_of_halfedges());
|
||||
}
|
||||
|
||||
/*! Check if the given face is valid (not a fictitious one). */
|
||||
/*! checks if the given face is valid (not a fictitious one). */
|
||||
inline bool is_valid_face (const Face*) const { return true; }
|
||||
|
||||
/*! Get the number of valid faces. */
|
||||
/*! obtains the number of valid faces. */
|
||||
Size number_of_valid_faces() const
|
||||
{
|
||||
// All faces are valid.
|
||||
|
|
@ -255,15 +255,15 @@ public:
|
|||
///! \name Topology-traits methods.
|
||||
//@{
|
||||
|
||||
/*! Initialize an empty DCEL structure.
|
||||
/*! initializes an empty DCEL structure.
|
||||
*/
|
||||
void init_dcel();
|
||||
|
||||
/*! Make the necessary updates after the DCEL structure have been updated.
|
||||
/*! makes the necessary updates after the DCEL structure have been updated.
|
||||
*/
|
||||
void dcel_updated();
|
||||
|
||||
/*! Check if the given vertex is associated with the given curve end.
|
||||
/*! checks if the given vertex is associated with the given curve end.
|
||||
* \param v The vertex.
|
||||
* \param cv The x-monotone curve.
|
||||
* \param ind The curve end.
|
||||
|
|
@ -295,8 +295,8 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
/*! Given a curve end with boundary conditions and a face that contains the
|
||||
* interior of the curve, find a place for a boundary vertex that will
|
||||
/*! given a curve end with boundary conditions and a face that contains the
|
||||
* interior of the curve, finds a place for a boundary vertex that will
|
||||
* represent the curve end along the face boundary.
|
||||
* \param f The face.
|
||||
* \param cv The x-monotone curve.
|
||||
|
|
@ -318,7 +318,7 @@ public:
|
|||
return std::nullopt;
|
||||
}
|
||||
|
||||
/*! Locate the predecessor halfedge for the given curve around a given
|
||||
/*! locates the predecessor halfedge for the given curve around a given
|
||||
* vertex with boundary conditions.
|
||||
* \param v The vertex.
|
||||
* \param cv The x-monotone curve.
|
||||
|
|
@ -340,7 +340,7 @@ public:
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
/*! Locate a DCEL feature that contains the given curve end.
|
||||
/*! locates a DCEL feature that contains the given curve end.
|
||||
* \param cv The x-monotone curve.
|
||||
* \param ind The curve end.
|
||||
* \param ps_x The boundary condition of the curve end in x.
|
||||
|
|
@ -361,7 +361,7 @@ public:
|
|||
return Result(v);
|
||||
}
|
||||
|
||||
/*! Split a fictitious edge using the given vertex.
|
||||
/*! splits a fictitious edge using the given vertex.
|
||||
* \param e The edge to split (one of the pair of halfedges).
|
||||
* \param v The split vertex.
|
||||
* \pre e is a fictitious halfedge.
|
||||
|
|
@ -375,21 +375,21 @@ public:
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
/*! Determine whether the given face is unbounded.
|
||||
/*! determines whether the given face is unbounded.
|
||||
* \param f The face.
|
||||
* \return Whether f is unbounded.
|
||||
* There is only one unbounded face in the arrangement:
|
||||
*/
|
||||
bool is_unbounded(const Face* f) const { return (f == unb_face); }
|
||||
|
||||
/*! Determine whether the given boundary vertex is redundant.
|
||||
/*! determines whether the given boundary vertex is redundant.
|
||||
* \param v The vertex.
|
||||
* \return Whether v is redundant, and should be erased.
|
||||
* There are no redundant vertices.
|
||||
*/
|
||||
bool is_redundant(const Vertex*) const { return false; }
|
||||
|
||||
/*! Erase the given redundant vertex by merging a fictitious edge.
|
||||
/*! erases the given redundant vertex by merging a fictitious edge.
|
||||
* The function does not free the vertex v itself.
|
||||
* \param v The vertex.
|
||||
* \pre v is a redundant vertex.
|
||||
|
|
@ -402,20 +402,20 @@ public:
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
//! reference_face (const version).
|
||||
/*! The function returns a reference face of the arrangement.
|
||||
All reference faces of arrangements of the same type have a common
|
||||
point.
|
||||
\return A pointer to the reference face.
|
||||
*/
|
||||
//! reference_face (const version).
|
||||
/*! returns a reference face of the arrangement. All reference faces of
|
||||
* arrangements of the same type have a common point.
|
||||
*
|
||||
* \return A pointer to the reference face.
|
||||
*/
|
||||
const Face* reference_face() const { return unbounded_face(); }
|
||||
|
||||
//! reference_face (non-const version).
|
||||
/*! The function returns a reference face of the arrangement.
|
||||
All reference faces of arrangements of the same type have a common
|
||||
point.
|
||||
\return A pointer to the reference face.
|
||||
*/
|
||||
/*! returns a reference face of the arrangement. All reference faces of
|
||||
* arrangements of the same type have a common point.
|
||||
*
|
||||
* \return A pointer to the reference face.
|
||||
*/
|
||||
Face* reference_face() { return unbounded_face(); }
|
||||
|
||||
//@}
|
||||
|
|
@ -426,17 +426,17 @@ public:
|
|||
/*! This function is used by the "walk" point-location strategy. */
|
||||
const Face* initial_face() const { return (unb_face); }
|
||||
|
||||
/*! Get the unbounded face (const version). */
|
||||
/*! obtains the unbounded face (const version). */
|
||||
const Face* unbounded_face() const { return (unb_face); }
|
||||
|
||||
/*! Get the unbounded face (non-const version). */
|
||||
/*! obtains the unbounded face (non-const version). */
|
||||
Face* unbounded_face() { return (unb_face); }
|
||||
//@}
|
||||
|
||||
/// \name Additional predicates, specialized for this topology-traits class.
|
||||
//@{
|
||||
|
||||
/*! Compare the given vertex and the given point.
|
||||
/*! compares the given vertex and the given point.
|
||||
* \param p The point.
|
||||
* \param v The vertex.
|
||||
* \return The result of the comparison of the x-coordinates of p and v.
|
||||
|
|
@ -444,7 +444,7 @@ public:
|
|||
virtual Comparison_result compare_x(const Point_2& p, const Vertex* v) const
|
||||
{ return (this->m_geom_traits->compare_x_2_object()(p, v->point())); }
|
||||
|
||||
/*! Compare the given vertex and the given point.
|
||||
/*! compares the given vertex and the given point.
|
||||
* \param p The point.
|
||||
* \param v The vertex.
|
||||
* \return The result of the xy-lexicographic comparison of p and v.
|
||||
|
|
@ -452,7 +452,7 @@ public:
|
|||
virtual Comparison_result compare_xy(const Point_2& p, const Vertex* v) const
|
||||
{ return (this->m_geom_traits->compare_xy_2_object()(p, v->point())); }
|
||||
|
||||
/*! Compare the relative y-position of the given point and the given edge
|
||||
/*! compares the relative y-position of the given point and the given edge
|
||||
* (which may be fictitious).
|
||||
* \param p The point.
|
||||
* \param he The edge (one of the pair of halfedges).
|
||||
|
|
|
|||
|
|
@ -72,12 +72,12 @@ protected:
|
|||
bool m_use_cache;
|
||||
|
||||
public:
|
||||
/*! Default constructor. */
|
||||
/*! constructs default. */
|
||||
Arr_circle_segment_traits_2 (bool use_intersection_caching = false) :
|
||||
m_use_cache(use_intersection_caching)
|
||||
{}
|
||||
|
||||
/*! Get the next curve index. */
|
||||
/*! obtains the next curve index. */
|
||||
static unsigned int get_index ()
|
||||
{
|
||||
#ifdef CGAL_NO_ATOMIC
|
||||
|
|
@ -94,8 +94,7 @@ public:
|
|||
class Compare_x_2
|
||||
{
|
||||
public:
|
||||
/*!
|
||||
* Compare the x-coordinates of two points.
|
||||
/*! compares the \f$x\f$-coordinates of two points.
|
||||
* \param p1 The first point.
|
||||
* \param p2 The second point.
|
||||
* \return LARGER if x(p1) > x(p2);
|
||||
|
|
@ -111,7 +110,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
/*! Get a Compare_x_2 functor object. */
|
||||
/*! obtains a `Compare_x_2` functor object. */
|
||||
Compare_x_2 compare_x_2_object () const
|
||||
{
|
||||
return Compare_x_2();
|
||||
|
|
@ -120,8 +119,7 @@ public:
|
|||
class Compare_xy_2
|
||||
{
|
||||
public:
|
||||
/*!
|
||||
* Compares two points lexigoraphically: by x, then by y.
|
||||
/*! compares two points lexigoraphically: by x, then by y.
|
||||
* \param p1 The first point.
|
||||
* \param p2 The second point.
|
||||
* \return LARGER if x(p1) > x(p2), or if x(p1) = x(p2) and y(p1) > y(p2);
|
||||
|
|
@ -142,7 +140,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
/*! Get a Compare_xy_2 functor object. */
|
||||
/*! obtains a Compare_xy_2 functor object. */
|
||||
Compare_xy_2 compare_xy_2_object () const
|
||||
{
|
||||
return Compare_xy_2();
|
||||
|
|
@ -151,8 +149,7 @@ public:
|
|||
class Construct_min_vertex_2
|
||||
{
|
||||
public:
|
||||
/*!
|
||||
* Get the left endpoint of the x-monotone curve (segment).
|
||||
/*! obtains the left endpoint of the \f$x\f$-monotone curve (segment).
|
||||
* \param cv The curve.
|
||||
* \return The left endpoint.
|
||||
*/
|
||||
|
|
@ -162,7 +159,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
/*! Get a Construct_min_vertex_2 functor object. */
|
||||
/*! obtains a `Construct_min_vertex_2` functor object. */
|
||||
Construct_min_vertex_2 construct_min_vertex_2_object () const
|
||||
{
|
||||
return Construct_min_vertex_2();
|
||||
|
|
@ -171,8 +168,7 @@ public:
|
|||
class Construct_max_vertex_2
|
||||
{
|
||||
public:
|
||||
/*!
|
||||
* Get the right endpoint of the x-monotone curve (segment).
|
||||
/*! obtains the right endpoint of the \f$x\f$-monotone curve (segment).
|
||||
* \param cv The curve.
|
||||
* \return The right endpoint.
|
||||
*/
|
||||
|
|
@ -182,7 +178,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
/*! Get a Construct_max_vertex_2 functor object. */
|
||||
/*! obtains a Construct_max_vertex_2 functor object. */
|
||||
Construct_max_vertex_2 construct_max_vertex_2_object () const
|
||||
{
|
||||
return Construct_max_vertex_2();
|
||||
|
|
@ -191,8 +187,7 @@ public:
|
|||
class Is_vertical_2
|
||||
{
|
||||
public:
|
||||
/*!
|
||||
* Check whether the given x-monotone curve is a vertical segment.
|
||||
/*! checks whether the given \f$x\f$-monotone curve is a vertical segment.
|
||||
* \param cv The curve.
|
||||
* \return (true) if the curve is a vertical segment; (false) otherwise.
|
||||
*/
|
||||
|
|
@ -202,7 +197,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
/*! Get an Is_vertical_2 functor object. */
|
||||
/*! obtains an `Is_vertical_2` functor object. */
|
||||
Is_vertical_2 is_vertical_2_object () const
|
||||
{
|
||||
return Is_vertical_2();
|
||||
|
|
@ -211,11 +206,10 @@ public:
|
|||
class Compare_y_at_x_2
|
||||
{
|
||||
public:
|
||||
/*!
|
||||
* Return the location of the given point with respect to the input curve.
|
||||
/*! returns the location of the given point with respect to the input curve.
|
||||
* \param cv The curve.
|
||||
* \param p The point.
|
||||
* \pre p is in the x-range of cv.
|
||||
* \pre p is in the \f$x\f$-range of `cv`.
|
||||
* \return SMALLER if y(p) < cv(x(p)), i.e. the point is below the curve;
|
||||
* LARGER if y(p) > cv(x(p)), i.e. the point is above the curve;
|
||||
* EQUAL if p lies on the curve.
|
||||
|
|
@ -229,7 +223,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
/*! Get a Compare_y_at_x_2 functor object. */
|
||||
/*! obtains a `Compare_y_at_x_2` functor object. */
|
||||
Compare_y_at_x_2 compare_y_at_x_2_object () const
|
||||
{
|
||||
return Compare_y_at_x_2();
|
||||
|
|
@ -238,9 +232,8 @@ public:
|
|||
class Compare_y_at_x_right_2
|
||||
{
|
||||
public:
|
||||
/*!
|
||||
* Compares the y value of two x-monotone curves immediately to the right
|
||||
* of their intersection point.
|
||||
/*! compares the y value of two \f$x\f$-monotone curves immediately to the
|
||||
* right of their intersection point.
|
||||
* \param cv1 The first curve.
|
||||
* \param cv2 The second curve.
|
||||
* \param p The intersection point.
|
||||
|
|
@ -283,7 +276,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
/*! Get a Compare_y_at_x_right_2 functor object. */
|
||||
/*! obtains a `Compare_y_at_x_right_2` functor object. */
|
||||
Compare_y_at_x_right_2 compare_y_at_x_right_2_object () const
|
||||
{
|
||||
return Compare_y_at_x_right_2();
|
||||
|
|
@ -292,16 +285,15 @@ public:
|
|||
class Compare_y_at_x_left_2
|
||||
{
|
||||
public:
|
||||
/*!
|
||||
* Compares the y value of two x-monotone curves immediately to the left
|
||||
* of their intersection point.
|
||||
/*! compares the \f$y\f$-value of two \f$x\f$-monotone curves immediately to
|
||||
* the left of their intersection point.
|
||||
* \param cv1 The first curve.
|
||||
* \param cv2 The second curve.
|
||||
* \param p The intersection point.
|
||||
* \pre The point p lies on both curves, and both of them must be also be
|
||||
* \pre The point `p` lies on both curves, and both of them must be also be
|
||||
* defined (lexicographically) to its left.
|
||||
* \return The relative position of cv1 with respect to cv2 immdiately to
|
||||
* the left of p: SMALLER, LARGER or EQUAL.
|
||||
* \return The relative position of `cv1` with respect to `cv2` immdiately
|
||||
* to the left of `p`: `SMALLER`, `LARGER`, or `EQUAL`.
|
||||
*/
|
||||
Comparison_result operator() (const X_monotone_curve_2& cv1,
|
||||
const X_monotone_curve_2& cv2,
|
||||
|
|
@ -338,7 +330,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
/*! Get a Compare_y_at_x_left_2 functor object. */
|
||||
/*! obtains a `Compare_y_at_x_left_2` functor object. */
|
||||
Compare_y_at_x_left_2 compare_y_at_x_left_2_object () const
|
||||
{
|
||||
return Compare_y_at_x_left_2();
|
||||
|
|
@ -347,8 +339,8 @@ public:
|
|||
class Equal_2
|
||||
{
|
||||
public:
|
||||
/*!
|
||||
* Check if the two x-monotone curves are the same (have the same graph).
|
||||
/*! checks if the two \f$x\f$-monotone curves are the same (have the same
|
||||
* graph).
|
||||
* \param cv1 The first curve.
|
||||
* \param cv2 The second curve.
|
||||
* \return (true) if the two curves are the same; (false) otherwise.
|
||||
|
|
@ -362,8 +354,7 @@ public:
|
|||
return (cv1.equals (cv2));
|
||||
}
|
||||
|
||||
/*!
|
||||
* Check if the two points are the same.
|
||||
/*! checks if the two points are the same.
|
||||
* \param p1 The first point.
|
||||
* \param p2 The second point.
|
||||
* \return (true) if the two point are the same; (false) otherwise.
|
||||
|
|
@ -374,7 +365,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
/*! Get an Equal_2 functor object. */
|
||||
/*! obtains an `Equal_2` functor object. */
|
||||
Equal_2 equal_2_object () const
|
||||
{
|
||||
return Equal_2();
|
||||
|
|
@ -395,7 +386,7 @@ public:
|
|||
/*! The traits (in case it has state) */
|
||||
const Traits& m_traits;
|
||||
|
||||
/*! Constructor
|
||||
/*! constructs
|
||||
* \param traits the traits.
|
||||
*/
|
||||
Approximate_2(const Traits& traits) : m_traits(traits) {}
|
||||
|
|
@ -403,24 +394,24 @@ public:
|
|||
friend class Arr_circle_segment_traits_2<Kernel, Filter>;
|
||||
|
||||
public:
|
||||
/*! Obtain an approximation of a point coordinate.
|
||||
/*! obtains an approximation of a point coordinate.
|
||||
* \param p the exact point.
|
||||
* \param i the coordinate index (either 0 or 1).
|
||||
* \pre i is either 0 or 1.
|
||||
* \return An approximation of p's x-coordinate (if i == 0), or an
|
||||
* approximation of p's y-coordinate (if i == 1).
|
||||
* \pre `i` is either 0 or 1.
|
||||
* \return An approximation of `p`'s \f$x\f$-coordinate (if `i` == 0), or an
|
||||
* approximation of `p`'s \f$y\f$-coordinate (if `i` == 1).
|
||||
*/
|
||||
Approximate_number_type operator()(const Point_2& p, int i) const {
|
||||
CGAL_precondition((i == 0) || (i == 1));
|
||||
return (i == 0) ? (CGAL::to_double(p.x())) : (CGAL::to_double(p.y()));
|
||||
}
|
||||
|
||||
/*! Obtain an approximation of a point.
|
||||
/*! obtains an approximation of a point.
|
||||
*/
|
||||
Approximate_point_2 operator()(const Point_2& p) const
|
||||
{ return Approximate_point_2(operator()(p, 0), operator()(p, 1)); }
|
||||
|
||||
/*! Obtain an approximation of an \f$x\f$-monotone curve.
|
||||
/*! obtains an approximation of an \f$x\f$-monotone curve.
|
||||
*/
|
||||
template <typename OutputIterator>
|
||||
OutputIterator operator()(const X_monotone_curve_2& xcv, double error,
|
||||
|
|
@ -430,7 +421,7 @@ public:
|
|||
}
|
||||
|
||||
private:
|
||||
/*! Handle segments.
|
||||
/*! handles segments.
|
||||
*/
|
||||
template <typename OutputIterator>
|
||||
OutputIterator approximate_segment(const X_monotone_curve_2& xcv,
|
||||
|
|
@ -477,7 +468,7 @@ public:
|
|||
return oi;
|
||||
}
|
||||
|
||||
/*! Compute the circular point given the parameter t and the transform
|
||||
/*! computes the circular point given the parameter t and the transform
|
||||
* data, that is, the center (translation) and the sin and cos of the
|
||||
* rotation angle.
|
||||
*/
|
||||
|
|
@ -486,7 +477,7 @@ public:
|
|||
y = r * std::sin(t);
|
||||
}
|
||||
|
||||
/*! Transform a point. In particular, rotate the canonical point
|
||||
/*! transforms a point. In particular, rotate the canonical point
|
||||
* (`xc`,`yc`) by an angle, the sine and cosine of which are `sint` and
|
||||
* `cost`, respectively, and translate by (`cx`,`cy`).
|
||||
*/
|
||||
|
|
@ -496,7 +487,7 @@ public:
|
|||
y = yc + cy;
|
||||
}
|
||||
|
||||
/*! Handle circular arcs.
|
||||
/*! handles circular arcs.
|
||||
*/
|
||||
template <typename OutputIterator>
|
||||
OutputIterator approximate_arc(const X_monotone_curve_2& xcv,
|
||||
|
|
@ -554,7 +545,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
/*! Obtain an Approximate_2 functor object. */
|
||||
/*! obtains an `Approximate_2` functor object. */
|
||||
Approximate_2 approximate_2_object() const { return Approximate_2(*this); }
|
||||
//@}
|
||||
|
||||
|
|
@ -562,7 +553,7 @@ public:
|
|||
//@{
|
||||
|
||||
/*! \class
|
||||
* A functor for subdividing a curve into x-monotone curves.
|
||||
* A functor for subdividing a curve into \f$x\f$-monotone curves.
|
||||
*/
|
||||
class Make_x_monotone_2 {
|
||||
private:
|
||||
|
|
@ -573,8 +564,8 @@ public:
|
|||
public:
|
||||
Make_x_monotone_2(bool use_cache = false) : m_use_cache(use_cache) {}
|
||||
|
||||
/*! Subdivide a given circular arc or line segment into x-monotone subcurves
|
||||
* and insert them to a given output iterator.
|
||||
/*! subdivides a given circular arc or line segment into \f$x\f$-monotone
|
||||
* subcurves and insert them to a given output iterator.
|
||||
* \param cv the curve.
|
||||
* \param oi the output iterator for the result. Its dereference type is a
|
||||
* variant that wraps a \c Point_2 or an \c X_monotone_curve_2
|
||||
|
|
@ -632,7 +623,7 @@ public:
|
|||
else {
|
||||
// Act according to the number of vertical tangency points.
|
||||
if (n_vpts == 2) {
|
||||
// Subdivide the circular arc into three x-monotone arcs.
|
||||
// Subdivide the circular arc into three \f$x\f$-monotone arcs.
|
||||
*oi++ = X_monotone_curve_2(circ,
|
||||
cv.source(), vpts[0],
|
||||
cv.orientation(),
|
||||
|
|
@ -650,7 +641,7 @@ public:
|
|||
index);
|
||||
}
|
||||
else if (n_vpts == 1) {
|
||||
// Subdivide the circular arc into two x-monotone arcs.
|
||||
// Subdivide the circular arc into two \f$x\f$-monotone arcs.
|
||||
*oi++ = X_monotone_curve_2(circ,
|
||||
cv.source(),
|
||||
vpts[0],
|
||||
|
|
@ -666,7 +657,7 @@ public:
|
|||
else {
|
||||
CGAL_assertion(n_vpts == 0);
|
||||
|
||||
// The arc is already x-monotone:
|
||||
// The arc is already \f$x\f$-monotone:
|
||||
*oi++ = X_monotone_curve_2(circ,
|
||||
cv.source(),
|
||||
cv.target(),
|
||||
|
|
@ -679,7 +670,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
/*! Get a Make_x_monotone_2 functor object. */
|
||||
/*! obtains a `Make_x_monotone_2` functor object. */
|
||||
Make_x_monotone_2 make_x_monotone_2_object() const
|
||||
{ return Make_x_monotone_2(m_use_cache); }
|
||||
|
||||
|
|
@ -687,13 +678,13 @@ public:
|
|||
{
|
||||
public:
|
||||
|
||||
/*!
|
||||
* Split a given x-monotone curve at a given point into two sub-curves.
|
||||
/*! splits a given \f$x\f$-monotone curve at a given point into two
|
||||
* sub-curves.
|
||||
* \param cv The curve to split
|
||||
* \param p The split point.
|
||||
* \param c1 Output: The left resulting subcurve (p is its right endpoint).
|
||||
* \param c2 Output: The right resulting subcurve (p is its left endpoint).
|
||||
* \pre p lies on cv but is not one of its end-points.
|
||||
* \param c1 Output: The left resulting subcurve (`p` is its right endpoint).
|
||||
* \param c2 Output: The right resulting subcurve (`p` is its left endpoint).
|
||||
* \pre `p` lies on cv but is not one of its end-points.
|
||||
*/
|
||||
void operator() (const X_monotone_curve_2& cv, const Point_2& p,
|
||||
X_monotone_curve_2& c1, X_monotone_curve_2& c2) const
|
||||
|
|
@ -707,7 +698,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
/*! Get a Split_2 functor object. */
|
||||
/*! obtains a `Split_2` functor object. */
|
||||
Split_2 split_2_object () const
|
||||
{
|
||||
return Split_2();
|
||||
|
|
@ -718,10 +709,10 @@ public:
|
|||
Intersection_map& _inter_map; // The map of intersection points.
|
||||
|
||||
public:
|
||||
/*! Constructor. */
|
||||
/*! constructs. */
|
||||
Intersect_2(Intersection_map& map) : _inter_map(map) {}
|
||||
|
||||
/*! Find the intersections of the two given curves and insert them to the
|
||||
/*! finds the intersections of the two given curves and insert them to the
|
||||
* given output iterator. As two segments may itersect only once, only a
|
||||
* single will be contained in the iterator.
|
||||
* \param cv1 The first curve.
|
||||
|
|
@ -736,18 +727,18 @@ public:
|
|||
{ return (cv1.intersect(cv2, oi, &_inter_map)); }
|
||||
};
|
||||
|
||||
/*! Get an Intersect_2 functor object. */
|
||||
/*! obtains an `Intersect_2` functor object. */
|
||||
Intersect_2 intersect_2_object() const { return (Intersect_2(inter_map)); }
|
||||
|
||||
class Are_mergeable_2
|
||||
{
|
||||
public:
|
||||
/*!
|
||||
* Check whether it is possible to merge two given x-monotone curves.
|
||||
/*! checks whether it is possible to merge two given \f$x\f$-monotone curves.
|
||||
* \param cv1 The first curve.
|
||||
* \param cv2 The second curve.
|
||||
* \return (true) if the two curves are mergeable - if they are supported
|
||||
* by the same line and share a common endpoint; (false) otherwise.
|
||||
* \return (true) if `cv1` and `cv2` are mergeable, that is, if they are
|
||||
* supported by the same line and share a common endpoint; (false)
|
||||
* otherwise.
|
||||
*/
|
||||
bool operator() (const X_monotone_curve_2& cv1,
|
||||
const X_monotone_curve_2& cv2) const
|
||||
|
|
@ -756,14 +747,14 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
/*! Get an Are_mergeable_2 functor object. */
|
||||
/*! obtains an `Are_mergeable_2` functor object. */
|
||||
Are_mergeable_2 are_mergeable_2_object () const
|
||||
{
|
||||
return Are_mergeable_2();
|
||||
}
|
||||
|
||||
/*! \class Merge_2
|
||||
* A functor that merges two x-monotone arcs into one.
|
||||
* A functor that merges two \f$x\f$-monotone arcs into one.
|
||||
*/
|
||||
class Merge_2
|
||||
{
|
||||
|
|
@ -773,7 +764,7 @@ public:
|
|||
/*! The traits (in case it has state) */
|
||||
const Traits* m_traits;
|
||||
|
||||
/*! Constructor
|
||||
/*! Constructs
|
||||
* \param traits the traits (in case it has state)
|
||||
*/
|
||||
Merge_2(const Traits* traits) : m_traits(traits) {}
|
||||
|
|
@ -781,8 +772,7 @@ public:
|
|||
friend class Arr_circle_segment_traits_2<Kernel, Filter>;
|
||||
|
||||
public:
|
||||
/*!
|
||||
* Merge two given x-monotone curves into a single curve.
|
||||
/*! merges two given \f$x\f$-monotone curves into a single curve.
|
||||
* \param cv1 The first curve.
|
||||
* \param cv2 The second curve.
|
||||
* \param c Output: The merged curve.
|
||||
|
|
@ -799,7 +789,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
/*! Get a Merge_2 functor object. */
|
||||
/*! obtains a `Merge_2` functor object. */
|
||||
Merge_2 merge_2_object () const
|
||||
{
|
||||
return Merge_2(this);
|
||||
|
|
@ -808,10 +798,9 @@ public:
|
|||
class Compare_endpoints_xy_2
|
||||
{
|
||||
public:
|
||||
/*!
|
||||
* compare lexicogrphic the endpoints of a x-monotone curve.
|
||||
/*! compares lexicogrphic the endpoints of a \f$x\f$-monotone curve.
|
||||
* \param cv the curve
|
||||
* \return SMALLER if the curve is directed right, else return SMALLER
|
||||
* \return `SMALLER` if the curve is directed right, else return `LARGER`.
|
||||
*/
|
||||
Comparison_result operator()(const X_monotone_curve_2& cv) const
|
||||
{
|
||||
|
|
@ -821,7 +810,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
/*! Get a Compare_endpoints_xy_2 functor object. */
|
||||
/*! obtains a `Compare_endpoints_xy_2` functor object. */
|
||||
Compare_endpoints_xy_2 compare_endpoints_xy_2_object() const
|
||||
{
|
||||
return Compare_endpoints_xy_2();
|
||||
|
|
@ -830,10 +819,9 @@ public:
|
|||
class Construct_opposite_2
|
||||
{
|
||||
public:
|
||||
/*!
|
||||
* construct an opposite x-monotone curve.
|
||||
/*! constructs an opposite \f$x\f$-monotone curve.
|
||||
* \param cv the curve
|
||||
* \return an opposite x-monotone curve.
|
||||
* \return an opposite \f$x\f$-monotone curve.
|
||||
*/
|
||||
X_monotone_curve_2 operator()(const X_monotone_curve_2& cv) const
|
||||
{
|
||||
|
|
@ -841,7 +829,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
/*! Get a Construct_opposite_2 functor object. */
|
||||
/*! obtains a `Construct_opposite_2` functor object. */
|
||||
Construct_opposite_2 construct_opposite_2_object() const
|
||||
{
|
||||
return Construct_opposite_2();
|
||||
|
|
@ -854,7 +842,7 @@ public:
|
|||
/*! The traits (in case it has state) */
|
||||
const Traits& m_traits;
|
||||
|
||||
/*! Constructor
|
||||
/*! constructs
|
||||
* \param traits the traits (in case it has state)
|
||||
*/
|
||||
Trim_2(const Traits& traits) : m_traits(traits) {}
|
||||
|
|
@ -862,7 +850,7 @@ public:
|
|||
friend class Arr_circle_segment_traits_2<Kernel, Filter>;
|
||||
|
||||
public:
|
||||
/*! Obtain a trimmed version of an arc
|
||||
/*! obtains a trimmed version of an arc
|
||||
* \param xcv The arc
|
||||
* \param src the new first endpoint
|
||||
* \param tgt the new second endpoint
|
||||
|
|
@ -893,14 +881,14 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
/*! Obtain a Trim_2 functor object. */
|
||||
/*! obtains a `Trim_2` functor object. */
|
||||
Trim_2 trim_2_object() const { return Trim_2(*this); }
|
||||
|
||||
// @}
|
||||
|
||||
};
|
||||
|
||||
} //namespace CGAL
|
||||
} // namespace CGAL
|
||||
|
||||
#include <CGAL/enable_warnings.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -206,4 +206,4 @@ public:
|
|||
|
||||
#include <CGAL/enable_warnings.h>
|
||||
|
||||
#endif // CGAL_CIRCULAR_KERNEL_CIRCULAR_ARC_TRAITS_H
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -380,8 +380,7 @@ namespace CGAL {
|
|||
typedef typename CircularKernel::Circular_arc_point_2
|
||||
Circular_arc_point_2;
|
||||
|
||||
public :
|
||||
|
||||
public:
|
||||
typedef Circular_arc_point_2 result_type;
|
||||
//typedef const result_type& qualified_result_type;
|
||||
|
||||
|
|
@ -395,14 +394,13 @@ namespace CGAL {
|
|||
}
|
||||
};
|
||||
|
||||
|
||||
template <class CircularKernel, class Arc1, class Arc2>
|
||||
class Construct_max_vertex_2//: public Has_qrt
|
||||
{
|
||||
typedef typename CircularKernel::Circular_arc_point_2 Point_2;
|
||||
|
||||
public:
|
||||
/*!
|
||||
* Get the right endpoint of the x-monotone curve (segment).
|
||||
/*! obtains the right endpoint of the x-monotone curve (segment).
|
||||
* \param cv The curve.
|
||||
* \return The right endpoint.
|
||||
*/
|
||||
|
|
@ -418,10 +416,10 @@ namespace CGAL {
|
|||
}
|
||||
};
|
||||
|
||||
template <class CircularKernel>
|
||||
template <class CircularKernel>
|
||||
class Variant_Is_vertical_2
|
||||
{
|
||||
public :
|
||||
public:
|
||||
|
||||
template < typename T >
|
||||
bool
|
||||
|
|
@ -449,7 +447,7 @@ namespace CGAL {
|
|||
|
||||
// an empty class used to have different types between Curve_2 and X_monotone_curve_2
|
||||
// in Arr_circular_line_arc_traits_2.
|
||||
namespace internal_Argt_traits{
|
||||
namespace internal_Argt_traits {
|
||||
struct Not_X_Monotone{};
|
||||
inline std::ostream& operator << (std::ostream& os, const Not_X_Monotone&)
|
||||
{return os;}
|
||||
|
|
@ -520,45 +518,42 @@ namespace CGAL {
|
|||
typedef VariantFunctors::Intersect_2<CircularKernel, Arc1, Arc2>
|
||||
Intersect_2;
|
||||
|
||||
Compare_x_2 compare_x_2_object() const
|
||||
{ return ck.compare_x_2_object(); }
|
||||
|
||||
Compare_x_2 compare_x_2_object() const
|
||||
{ return ck.compare_x_2_object(); }
|
||||
Compare_xy_2 compare_xy_2_object() const
|
||||
{ return ck.compare_xy_2_object(); }
|
||||
|
||||
Compare_xy_2 compare_xy_2_object() const
|
||||
{ return ck.compare_xy_2_object(); }
|
||||
Compare_y_at_x_2 compare_y_at_x_2_object() const
|
||||
{ return Compare_y_at_x_2(); }
|
||||
|
||||
Compare_y_at_x_2 compare_y_at_x_2_object() const
|
||||
{ return Compare_y_at_x_2(); }
|
||||
Compare_y_at_x_right_2 compare_y_at_x_right_2_object() const
|
||||
{ return Compare_y_at_x_right_2(); }
|
||||
|
||||
Compare_y_at_x_right_2 compare_y_at_x_right_2_object() const
|
||||
{ return Compare_y_at_x_right_2(); }
|
||||
Equal_2 equal_2_object() const
|
||||
{ return Equal_2(); }
|
||||
|
||||
Equal_2 equal_2_object() const
|
||||
{ return Equal_2(); }
|
||||
Make_x_monotone_2 make_x_monotone_2_object() const
|
||||
{ return Make_x_monotone_2(); }
|
||||
|
||||
Make_x_monotone_2 make_x_monotone_2_object() const
|
||||
{ return Make_x_monotone_2(); }
|
||||
Split_2 split_2_object() const
|
||||
{ return Split_2(); }
|
||||
|
||||
Split_2 split_2_object() const
|
||||
{ return Split_2(); }
|
||||
|
||||
Intersect_2 intersect_2_object() const
|
||||
Intersect_2 intersect_2_object() const
|
||||
{ return Intersect_2(); }
|
||||
|
||||
Construct_min_vertex_2 construct_min_vertex_2_object() const
|
||||
Construct_min_vertex_2 construct_min_vertex_2_object() const
|
||||
{ return Construct_min_vertex_2(); }
|
||||
|
||||
Construct_max_vertex_2 construct_max_vertex_2_object() const
|
||||
Construct_max_vertex_2 construct_max_vertex_2_object() const
|
||||
{ return Construct_max_vertex_2(); }
|
||||
|
||||
Is_vertical_2 is_vertical_2_object() const
|
||||
Is_vertical_2 is_vertical_2_object() const
|
||||
{ return Is_vertical_2();}
|
||||
|
||||
|
||||
};
|
||||
|
||||
} // namespace CGAL
|
||||
|
||||
#include <CGAL/enable_warnings.h>
|
||||
|
||||
#endif // CGAL_CIRCULAR_KERNEL_VARIANT_TRAITS_H
|
||||
#endif
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
|
@ -92,10 +92,10 @@ public:
|
|||
/// \name Construction.
|
||||
//@{
|
||||
|
||||
/*! Construct default. */
|
||||
/*! constructs default. */
|
||||
Arr_curve_data_traits_2() {}
|
||||
|
||||
/*! Construct from a base-traits class. */
|
||||
/*! constructs from a base-traits class. */
|
||||
Arr_curve_data_traits_2(const Base_traits_2& traits) : Base_traits_2(traits) {}
|
||||
//@}
|
||||
|
||||
|
|
@ -113,10 +113,10 @@ public:
|
|||
const Base_traits_2& m_base;
|
||||
|
||||
public:
|
||||
/*! Constructor. */
|
||||
/*! constructs. */
|
||||
Make_x_monotone_2(const Base_traits_2& base) : m_base(base) {}
|
||||
|
||||
/*! Subdivide a given curve into x-monotone subcurves and insert them into
|
||||
/*! subdivides a given curve into x-monotone subcurves and insert them into
|
||||
* a given output iterator.
|
||||
* \param cv the curve.
|
||||
* \param oi the output iterator for the result. Its value type is a variant
|
||||
|
|
@ -152,7 +152,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
/*! Obtain a Make_x_monotone_2 functor object. */
|
||||
/*! obtains a Make_x_monotone_2 functor object. */
|
||||
Make_x_monotone_2 make_x_monotone_2_object() const
|
||||
{ return Make_x_monotone_2(*this); }
|
||||
|
||||
|
|
@ -161,10 +161,10 @@ public:
|
|||
const Base_traits_2& m_base;
|
||||
|
||||
public:
|
||||
/*! Constructor. */
|
||||
/*! constructs. */
|
||||
Split_2(const Base_traits_2& base) : m_base(base) {}
|
||||
|
||||
/*! Split a given x-monotone curve at a given point into two sub-curves.
|
||||
/*! splits a given x-monotone curve at a given point into two sub-curves.
|
||||
* \param cv[in] The curve to split
|
||||
* \param p[in] The split point.
|
||||
* \param c1[out] The left resulting subcurve (p is its right endpoint).
|
||||
|
|
@ -183,7 +183,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
/*! Obtain a Split_2 functor object. */
|
||||
/*! obtains a Split_2 functor object. */
|
||||
Split_2 split_2_object() const { return Split_2(*this); }
|
||||
|
||||
class Intersect_2 {
|
||||
|
|
@ -191,10 +191,10 @@ public:
|
|||
const Base_traits_2& m_base;
|
||||
|
||||
public:
|
||||
/*! Constructor. */
|
||||
/*! constructs. */
|
||||
Intersect_2(const Base_traits_2& base) : m_base(base) {}
|
||||
|
||||
/*! Find the intersections of the two given curves and insert them to the
|
||||
/*! finds the intersections of the two given curves and insert them to the
|
||||
* given output iterator. As two segments may itersect only once, only a
|
||||
* single will be contained in the iterator.
|
||||
* \param cv1 The first curve.
|
||||
|
|
@ -240,7 +240,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
/*! Obtain an Intersect_2 functor object. */
|
||||
/*! obtains an `Intersect_2` functor object. */
|
||||
Intersect_2 intersect_2_object() const { return Intersect_2(*this); }
|
||||
|
||||
class Are_mergeable_2 {
|
||||
|
|
@ -288,10 +288,10 @@ public:
|
|||
}
|
||||
|
||||
public:
|
||||
/*! Constructor. */
|
||||
/*! constructs. */
|
||||
Are_mergeable_2(const Base_traits_2& base) : m_base(base) {}
|
||||
|
||||
/*! Check whether it is possible to merge two given x-monotone curves.
|
||||
/*! checks whether it is possible to merge two given x-monotone curves.
|
||||
* \param cv1[in] The first curve.
|
||||
* \param cv2[in] The second curve.
|
||||
* \return (true) if the two curves are mergeable; (false) otherwise.
|
||||
|
|
@ -301,7 +301,7 @@ public:
|
|||
{ return are_mergeable<Base_traits_2>(cv1, cv2, m_base, 0); }
|
||||
};
|
||||
|
||||
/*! Obtain an Are_mergeable_2 functor object. */
|
||||
/*! obtains an Are_mergeable_2 functor object. */
|
||||
Are_mergeable_2 are_mergeable_2_object() const
|
||||
{ return Are_mergeable_2(*this); }
|
||||
|
||||
|
|
@ -312,7 +312,7 @@ public:
|
|||
private:
|
||||
const Base_traits_2& m_base;
|
||||
|
||||
/*! Generate a helper class template to find out whether the base geometry
|
||||
/*! generates a helper class template to find out whether the base geometry
|
||||
* traits has a nested type named Merge_2.
|
||||
*/
|
||||
BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(has_merge_2, Are_mergeable_2, false)
|
||||
|
|
@ -348,10 +348,10 @@ public:
|
|||
{ CGAL_error_msg("Merging curves is not supported."); }
|
||||
|
||||
public:
|
||||
/*! Constructor. */
|
||||
/*! constructs. */
|
||||
Merge_2(const Base_traits_2& base) : m_base(base) {}
|
||||
|
||||
/*! Merge two given x-monotone curves into a single curve (segment).
|
||||
/*! merges two given x-monotone curves into a single curve (segment).
|
||||
* \param[in] cv1 The first curve.
|
||||
* \param[in] cv2 The second curve.
|
||||
* \param[out] c The merged curve.
|
||||
|
|
@ -363,7 +363,7 @@ public:
|
|||
{ merge<Base_traits_2>(cv1, cv2, c); }
|
||||
};
|
||||
|
||||
/*! Obtain a Merge_2 functor object. */
|
||||
/*! obtains a `Merge_2` functor object. */
|
||||
Merge_2 merge_2_object() const { return Merge_2(*this); }
|
||||
|
||||
//@}
|
||||
|
|
@ -373,10 +373,10 @@ public:
|
|||
const Base_traits_2& m_base;
|
||||
|
||||
public:
|
||||
/*! Constructor. */
|
||||
/*! constructs. */
|
||||
Construct_x_monotone_curve_2(const Base_traits_2& base) : m_base(base) {}
|
||||
|
||||
/*! Obtain an x-monotone curve connecting the two given endpoints.
|
||||
/*! obtains an x-monotone curve connecting the two given endpoints.
|
||||
* \param p The first point.
|
||||
* \param q The second point.
|
||||
* \pre p and q must not be the same.
|
||||
|
|
@ -390,7 +390,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
/*! Obtain a Construct_x_monotone_curve_2 functor object. */
|
||||
/*! obtains a Construct_x_monotone_curve_2 functor object. */
|
||||
Construct_x_monotone_curve_2 construct_x_monotone_curve_2_object() const
|
||||
{ return Construct_x_monotone_curve_2(*this); }
|
||||
|
||||
|
|
@ -398,7 +398,7 @@ public:
|
|||
private:
|
||||
const Base_traits_2& m_base;
|
||||
|
||||
/*! Generate a helper class template to find out whether the base geometry
|
||||
/*! generates a helper class template to find out whether the base geometry
|
||||
* traits has a nested type named Construct_opposite_2.
|
||||
*/
|
||||
BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(has_construct_opposite_2,
|
||||
|
|
@ -431,10 +431,10 @@ public:
|
|||
}
|
||||
|
||||
public:
|
||||
/*! Constructor. */
|
||||
/*! constructs. */
|
||||
Construct_opposite_2(const Base_traits_2& base) : m_base(base) {}
|
||||
|
||||
/*! Construct an opposite x-monotone (with swapped source and target).
|
||||
/*! constructs an opposite x-monotone (with swapped source and target).
|
||||
* \param cv The curve.
|
||||
* \return The opposite curve.
|
||||
*/
|
||||
|
|
@ -442,7 +442,7 @@ public:
|
|||
{ return construct_opposite<Base_traits_2>(cv); }
|
||||
};
|
||||
|
||||
/*! Obtain a Construct_opposite_2 functor object. */
|
||||
/*! obtains a Construct_opposite_2 functor object. */
|
||||
Construct_opposite_2 construct_opposite_2_object() const
|
||||
{ return Construct_opposite_2(*this); }
|
||||
//@}
|
||||
|
|
|
|||
|
|
@ -82,13 +82,13 @@ protected:
|
|||
char pss[2]; // The x and y parameter spaces (condensed in two bytes).
|
||||
|
||||
public:
|
||||
/*! Default constructor. */
|
||||
/*! constructs default. */
|
||||
Arr_vertex_base() :
|
||||
p_inc(nullptr),
|
||||
p_pt(nullptr)
|
||||
{ pss[0] = pss[1] = static_cast<char>(CGAL::ARR_INTERIOR); }
|
||||
|
||||
/*! Destructor. */
|
||||
/*! destructs. */
|
||||
virtual ~Arr_vertex_base() {}
|
||||
|
||||
// Access/modification for pointer squatting
|
||||
|
|
@ -96,35 +96,35 @@ public:
|
|||
void set_inc(void * inc) const
|
||||
{ const_cast<Arr_vertex_base&>(*this).p_inc = inc; }
|
||||
|
||||
/*! Check if the point pointer is nullptr. */
|
||||
/*! checks if the point pointer is nullptr. */
|
||||
bool has_null_point() const { return (p_pt == nullptr); }
|
||||
|
||||
/*! Obtain the point (const version). */
|
||||
/*! obtains the point (const version). */
|
||||
const Point& point() const
|
||||
{
|
||||
CGAL_assertion(p_pt != nullptr);
|
||||
return (*p_pt);
|
||||
}
|
||||
|
||||
/*! Obtain the point (non-const version). */
|
||||
/*! obtains the point (non-const version). */
|
||||
Point& point()
|
||||
{
|
||||
CGAL_assertion(p_pt != nullptr);
|
||||
return (*p_pt);
|
||||
}
|
||||
|
||||
/*! Set the point (may be a nullptr point). */
|
||||
/*! sets the point (may be a nullptr point). */
|
||||
void set_point(Point* p) { p_pt = p; }
|
||||
|
||||
/*! Obtain the boundary type in x. */
|
||||
/*! obtains the boundary type in x. */
|
||||
Arr_parameter_space parameter_space_in_x() const
|
||||
{ return (Arr_parameter_space(pss[0])); }
|
||||
|
||||
/*! Obtain the boundary type in y. */
|
||||
/*! obtains the boundary type in y. */
|
||||
Arr_parameter_space parameter_space_in_y() const
|
||||
{ return (Arr_parameter_space(pss[1])); }
|
||||
|
||||
/*! Set the boundary conditions of the vertex. */
|
||||
/*! sets the boundary conditions of the vertex. */
|
||||
void set_boundary(Arr_parameter_space ps_x, Arr_parameter_space ps_y)
|
||||
{
|
||||
pss[0] = static_cast<char>(ps_x);
|
||||
|
|
@ -132,7 +132,7 @@ public:
|
|||
return;
|
||||
}
|
||||
|
||||
/*! Assign from another vertex. */
|
||||
/*! assigns from another vertex. */
|
||||
virtual void assign(const Arr_vertex_base<Point>& v)
|
||||
{
|
||||
p_pt = v.p_pt;
|
||||
|
|
@ -170,7 +170,7 @@ protected:
|
|||
X_monotone_curve* p_cv; // The associated x-monotone curve.
|
||||
|
||||
public:
|
||||
/*! Default constructor */
|
||||
/*! constructs default */
|
||||
Arr_halfedge_base() :
|
||||
p_opp(nullptr),
|
||||
p_prev(nullptr),
|
||||
|
|
@ -180,27 +180,27 @@ public:
|
|||
p_cv(nullptr)
|
||||
{}
|
||||
|
||||
/*! Destructor. */
|
||||
/*! destructs. */
|
||||
virtual ~Arr_halfedge_base() {}
|
||||
|
||||
/*! Check if the curve pointer is nullptr. */
|
||||
/*! checks if the curve pointer is nullptr. */
|
||||
bool has_null_curve() const { return (p_cv == nullptr); }
|
||||
|
||||
/*! Obtain the x-monotone curve (const version). */
|
||||
/*! obtains the x-monotone curve (const version). */
|
||||
const X_monotone_curve& curve() const
|
||||
{
|
||||
CGAL_precondition(p_cv != nullptr);
|
||||
return (*p_cv);
|
||||
}
|
||||
|
||||
/*! Obtain the x-monotone curve (non-const version). */
|
||||
/*! obtains the x-monotone curve (non-const version). */
|
||||
X_monotone_curve& curve()
|
||||
{
|
||||
CGAL_precondition(p_cv != nullptr);
|
||||
return (*p_cv);
|
||||
}
|
||||
|
||||
/*! Set the x-monotone curve. */
|
||||
/*! sets the x-monotone curve. */
|
||||
void set_curve(X_monotone_curve* c)
|
||||
{
|
||||
p_cv = c;
|
||||
|
|
@ -212,13 +212,12 @@ public:
|
|||
opp->p_cv = c;
|
||||
}
|
||||
|
||||
/*! Assign from another halfedge. */
|
||||
/*! assigns from another halfedge. */
|
||||
virtual void assign(const Arr_halfedge_base<X_monotone_curve>& he)
|
||||
{ p_cv = he.p_cv; }
|
||||
};
|
||||
|
||||
/*!
|
||||
* Base face class.
|
||||
/*! Base face class.
|
||||
*/
|
||||
class Arr_face_base
|
||||
{
|
||||
|
|
@ -248,27 +247,27 @@ protected:
|
|||
Isolated_vertices_container iso_verts; // The isolated vertices inside
|
||||
// the face.
|
||||
public:
|
||||
/*! Default constructor. */
|
||||
/*! constructs default. */
|
||||
Arr_face_base() : flags(0) {}
|
||||
|
||||
/*! Destructor. */
|
||||
/*! destructs. */
|
||||
virtual ~Arr_face_base() {}
|
||||
|
||||
/*! Check if the face is unbounded. */
|
||||
/*! checks if the face is unbounded. */
|
||||
bool is_unbounded() const { return ((flags & IS_UNBOUNDED) != 0); }
|
||||
|
||||
/*! Set the face as bounded or unbounded. */
|
||||
/*! sets the face as bounded or unbounded. */
|
||||
void set_unbounded(bool unbounded)
|
||||
{ flags = (unbounded) ? (flags | IS_UNBOUNDED) : (flags & ~IS_UNBOUNDED); }
|
||||
|
||||
/*! Check if the face is fictitious. */
|
||||
/*! checks if the face is fictitious. */
|
||||
bool is_fictitious() const { return ((flags & IS_FICTITIOUS) != 0); }
|
||||
|
||||
/*! Set the face as fictitious or valid. */
|
||||
/*! sets the face as fictitious or valid. */
|
||||
void set_fictitious(bool fictitious)
|
||||
{ flags = (fictitious) ? (flags | IS_FICTITIOUS) : (flags & ~IS_FICTITIOUS); }
|
||||
|
||||
/*! Assign from another face. */
|
||||
/*! assigns from another face. */
|
||||
virtual void assign(const Arr_face_base& f) { flags = f.flags; }
|
||||
};
|
||||
|
||||
|
|
@ -293,38 +292,38 @@ public:
|
|||
typedef Arr_halfedge<V,H,F> Halfedge;
|
||||
typedef Arr_isolated_vertex<V,H,F> Isolated_vertex;
|
||||
|
||||
/*! Default constructor. */
|
||||
/*! constructs default. */
|
||||
Arr_vertex() {}
|
||||
|
||||
/*! Check if the vertex is isolated. */
|
||||
/*! checks if the vertex is isolated. */
|
||||
bool is_isolated() const
|
||||
{
|
||||
// Note that we use the LSB of the p_inc pointer as a Boolean flag.
|
||||
return (_is_lsb_set(this->p_inc));
|
||||
}
|
||||
|
||||
/*! Obtain an incident halfedge (const version). */
|
||||
/*! obtains an incident halfedge (const version). */
|
||||
const Halfedge* halfedge() const
|
||||
{
|
||||
CGAL_precondition(! is_isolated());
|
||||
return (reinterpret_cast<const Halfedge*>(this->p_inc));
|
||||
}
|
||||
|
||||
/*! Obtain an incident halfedge (non-const version). */
|
||||
/*! obtains an incident halfedge (non-const version). */
|
||||
Halfedge* halfedge()
|
||||
{
|
||||
CGAL_precondition(! is_isolated());
|
||||
return (reinterpret_cast<Halfedge*>(this->p_inc));
|
||||
}
|
||||
|
||||
/*! Set an incident halfedge (for non-isolated vertices). */
|
||||
/*! sets an incident halfedge (for non-isolated vertices). */
|
||||
void set_halfedge(Halfedge* he)
|
||||
{
|
||||
// Set the halfedge pointer and reset the LSB.
|
||||
this->p_inc = he;
|
||||
}
|
||||
|
||||
/*! Obtain the isolated vertex information (const version). */
|
||||
/*! obtains the isolated vertex information (const version). */
|
||||
const Isolated_vertex* isolated_vertex() const
|
||||
{
|
||||
CGAL_precondition(is_isolated());
|
||||
|
|
@ -332,14 +331,14 @@ public:
|
|||
(this->p_inc)));
|
||||
}
|
||||
|
||||
/*! Obtain the isolated vertex information (non-const version). */
|
||||
/*! obtains the isolated vertex information (non-const version). */
|
||||
Isolated_vertex* isolated_vertex()
|
||||
{
|
||||
CGAL_precondition(is_isolated());
|
||||
return (reinterpret_cast<Isolated_vertex*>(_clean_pointer(this->p_inc)));
|
||||
}
|
||||
|
||||
/*! Set the isolated vertex information. */
|
||||
/*! sets the isolated vertex information. */
|
||||
void set_isolated_vertex(Isolated_vertex* iv)
|
||||
{
|
||||
// Set the isolated vertex-information pointer and set its LSB.
|
||||
|
|
@ -362,20 +361,20 @@ public:
|
|||
typedef Arr_outer_ccb<V,H,F> Outer_ccb;
|
||||
typedef Arr_inner_ccb<V,H,F> Inner_ccb;
|
||||
|
||||
/*! Default constructor. */
|
||||
/*! constructs default. */
|
||||
Arr_halfedge() {}
|
||||
|
||||
/*! Obtain the opposite halfedge (const version). */
|
||||
/*! obtains the opposite halfedge (const version). */
|
||||
const Halfedge* opposite () const
|
||||
{ return (reinterpret_cast<const Halfedge*>(this->p_opp)); }
|
||||
|
||||
/*! Obtain the opposite halfedge (non-const version). */
|
||||
/*! obtains the opposite halfedge (non-const version). */
|
||||
Halfedge* opposite() { return (reinterpret_cast<Halfedge*>(this->p_opp)); }
|
||||
|
||||
/*! Sets the opposite halfedge. */
|
||||
void set_opposite(Halfedge* he) { this->p_opp = he; }
|
||||
|
||||
/*! Obtain the direction of the halfedge. */
|
||||
/*! obtains the direction of the halfedge. */
|
||||
Arr_halfedge_direction direction() const
|
||||
{
|
||||
// Note that we use the LSB of the p_v pointer as a Boolean flag.
|
||||
|
|
@ -383,7 +382,7 @@ public:
|
|||
else return (ARR_RIGHT_TO_LEFT);
|
||||
}
|
||||
|
||||
/*! Set the direction of the edge (and of its opposite halfedge). */
|
||||
/*! sets the direction of the edge (and of its opposite halfedge). */
|
||||
void set_direction(Arr_halfedge_direction dir)
|
||||
{
|
||||
Halfedge* opp = reinterpret_cast<Halfedge*>(this->p_opp);
|
||||
|
|
@ -398,43 +397,43 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
/*! Obtain the previous halfedge along the chain (const version). */
|
||||
/*! obtains the previous halfedge along the chain (const version). */
|
||||
const Halfedge* prev() const
|
||||
{ return (reinterpret_cast<const Halfedge*>(this->p_prev)); }
|
||||
|
||||
/*! Obtain the previous halfedge along the chain (const version). */
|
||||
/*! obtains the previous halfedge along the chain (const version). */
|
||||
Halfedge* prev() { return (reinterpret_cast<Halfedge*>(this->p_prev)); }
|
||||
|
||||
/*! Set the previous halfedge along the chain. */
|
||||
/*! sets the previous halfedge along the chain. */
|
||||
void set_prev(Halfedge* he)
|
||||
{
|
||||
this->p_prev = he;
|
||||
he->p_next = this;
|
||||
}
|
||||
|
||||
/*! Obtain the next halfedge along the chain (const version). */
|
||||
/*! obtains the next halfedge along the chain (const version). */
|
||||
const Halfedge* next() const
|
||||
{ return (reinterpret_cast<const Halfedge*>(this->p_next)); }
|
||||
|
||||
/*! Obtain the next halfedge along the chain (const version). */
|
||||
/*! obtains the next halfedge along the chain (const version). */
|
||||
Halfedge* next() { return (reinterpret_cast<Halfedge*>(this->p_next)); }
|
||||
|
||||
/*! Set the next halfedge along the chain. */
|
||||
/*! sets the next halfedge along the chain. */
|
||||
void set_next(Halfedge* he)
|
||||
{
|
||||
this->p_next = he;
|
||||
he->p_prev = this;
|
||||
}
|
||||
|
||||
/*! Obtain the target vertex (const version). */
|
||||
/*! obtains the target vertex (const version). */
|
||||
const Vertex* vertex() const
|
||||
{ return (reinterpret_cast<const Vertex*>(_clean_pointer(this->p_v))); }
|
||||
|
||||
/*! Obtain the target vertex (non-const version). */
|
||||
/*! obtains the target vertex (non-const version). */
|
||||
Vertex* vertex()
|
||||
{ return (reinterpret_cast<Vertex*>(_clean_pointer(this->p_v))); }
|
||||
|
||||
/*! Set the target vertex. */
|
||||
/*! sets the target vertex. */
|
||||
void set_vertex(Vertex* v)
|
||||
{
|
||||
// Set the vertex pointer, preserving the content of the LSB.
|
||||
|
|
@ -442,10 +441,10 @@ public:
|
|||
else this->p_v = v;
|
||||
}
|
||||
|
||||
/*! Check whether the halfedge lies on the boundary of an outer CCB. */
|
||||
/*! checks whether the halfedge lies on the boundary of an outer CCB. */
|
||||
bool is_on_outer_ccb() const { return (!_is_lsb_set(this->p_comp)); }
|
||||
|
||||
/*! Obtain an incident outer CCB (const version).
|
||||
/*! obtains an incident outer CCB (const version).
|
||||
* \pre The edge does not lie on an inner CCB.
|
||||
*/
|
||||
const Outer_ccb* outer_ccb() const
|
||||
|
|
@ -454,7 +453,7 @@ public:
|
|||
return (reinterpret_cast<const Outer_ccb*>(this->p_comp));
|
||||
}
|
||||
|
||||
/*! Obtain an incident outer CCB (non-const version).
|
||||
/*! obtains an incident outer CCB (non-const version).
|
||||
* \pre The edge does not lie on an inner CCB.
|
||||
*/
|
||||
Outer_ccb* outer_ccb()
|
||||
|
|
@ -463,17 +462,17 @@ public:
|
|||
return (reinterpret_cast<Outer_ccb*>(this->p_comp));
|
||||
}
|
||||
|
||||
/*! Set the incident outer CCB. */
|
||||
/*! sets the incident outer CCB. */
|
||||
void set_outer_ccb(Outer_ccb *oc)
|
||||
{
|
||||
// Set the component pointer and reset its LSB.
|
||||
this->p_comp = oc;
|
||||
}
|
||||
|
||||
/*! Check whether the halfedge lies on the boundary of an inner CCB. */
|
||||
/*! checks whether the halfedge lies on the boundary of an inner CCB. */
|
||||
bool is_on_inner_ccb() const { return (_is_lsb_set(this->p_comp)); }
|
||||
|
||||
/*! Obtain an incident inner CCB (const version).
|
||||
/*! obtains an incident inner CCB (const version).
|
||||
* \pre The edge lies on an inner CCB.
|
||||
*/
|
||||
const Inner_ccb* inner_ccb() const
|
||||
|
|
@ -493,7 +492,7 @@ public:
|
|||
return valid;
|
||||
}
|
||||
|
||||
/*! Obtain an incident inner CCB (non-const version).
|
||||
/*! obtains an incident inner CCB (non-const version).
|
||||
* \pre The edge lies on an inner CCB.
|
||||
*/
|
||||
Inner_ccb* inner_ccb()
|
||||
|
|
@ -519,7 +518,7 @@ public:
|
|||
return reinterpret_cast<Inner_ccb*>(_clean_pointer(this->p_comp));
|
||||
}
|
||||
|
||||
/*! Set the incident inner CCB. */
|
||||
/*! sets the incident inner CCB. */
|
||||
void set_inner_ccb(const Inner_ccb *ic)
|
||||
{
|
||||
// Set the component pointer and set its LSB.
|
||||
|
|
@ -553,7 +552,7 @@ private:
|
|||
|
||||
public:
|
||||
|
||||
/*! Default constructor. */
|
||||
/*! constructs default. */
|
||||
Arr_face()
|
||||
{}
|
||||
|
||||
|
|
@ -565,20 +564,20 @@ public:
|
|||
_Const_ccb_to_halfedge_cast>
|
||||
Outer_ccb_const_iterator;
|
||||
|
||||
/*! Obtain the number of outer CCBs the face has. */
|
||||
/*! obtains the number of outer CCBs the face has. */
|
||||
size_t number_of_outer_ccbs() const { return (this->outer_ccbs.size()); }
|
||||
|
||||
/*! Obtain an iterator for the first outer CCB of the face. */
|
||||
/*! obtains an iterator for the first outer CCB of the face. */
|
||||
Outer_ccb_iterator outer_ccbs_begin() { return (this->outer_ccbs.begin()); }
|
||||
|
||||
/*! Obtain a past-the-end iterator for the outer CCBs inside the face. */
|
||||
/*! obtains a past-the-end iterator for the outer CCBs inside the face. */
|
||||
Outer_ccb_iterator outer_ccbs_end() { return (this->outer_ccbs.end()); }
|
||||
|
||||
/*! Obtain an const iterator for the first outer CCB inside the face. */
|
||||
/*! obtains an const iterator for the first outer CCB inside the face. */
|
||||
Outer_ccb_const_iterator outer_ccbs_begin() const
|
||||
{ return (this->outer_ccbs.begin()); }
|
||||
|
||||
/*! Obtain a const past-the-end iterator for the outer CCBs inside the face. */
|
||||
/*! obtains a const past-the-end iterator for the outer CCBs inside the face. */
|
||||
Outer_ccb_const_iterator outer_ccbs_end() const
|
||||
{ return (this->outer_ccbs.end()); }
|
||||
|
||||
|
|
@ -601,20 +600,20 @@ public:
|
|||
typedef Inner_ccb_iterator Hole_iterator;
|
||||
typedef Inner_ccb_const_iterator Hole_const_iterator;
|
||||
|
||||
/*! Obtain the number of inner CCBs the face has. */
|
||||
/*! obtains the number of inner CCBs the face has. */
|
||||
size_t number_of_inner_ccbs() const { return (this->inner_ccbs.size()); }
|
||||
|
||||
/*! Obtain an iterator for the first inner CCB of the face. */
|
||||
/*! obtains an iterator for the first inner CCB of the face. */
|
||||
Inner_ccb_iterator inner_ccbs_begin() { return (this->inner_ccbs.begin()); }
|
||||
|
||||
/*! Obtain a past-the-end iterator for the inner CCBs inside the face. */
|
||||
/*! obtains a past-the-end iterator for the inner CCBs inside the face. */
|
||||
Inner_ccb_iterator inner_ccbs_end() { return (this->inner_ccbs.end()); }
|
||||
|
||||
/*! Obtain an const iterator for the first inner CCB inside the face. */
|
||||
/*! obtains an const iterator for the first inner CCB inside the face. */
|
||||
Inner_ccb_const_iterator inner_ccbs_begin() const
|
||||
{ return (this->inner_ccbs.begin()); }
|
||||
|
||||
/*! Obtain a const past-the-end iterator for the inner CCBs inside the face. */
|
||||
/*! obtains a const past-the-end iterator for the inner CCBs inside the face. */
|
||||
Inner_ccb_const_iterator inner_ccbs_end() const
|
||||
{ return (this->inner_ccbs.end()); }
|
||||
|
||||
|
|
@ -669,23 +668,23 @@ public:
|
|||
typename F::Isolated_vertex_iterator::iterator_category>
|
||||
Isolated_vertex_const_iterator;
|
||||
|
||||
/*! Obtain the number of isloated vertices inside the face. */
|
||||
/*! obtains the number of isloated vertices inside the face. */
|
||||
size_t number_of_isolated_vertices() const
|
||||
{ return (this->iso_verts.size()); }
|
||||
|
||||
/*! Obtain an iterator for the first isloated vertex inside the face. */
|
||||
/*! obtains an iterator for the first isloated vertex inside the face. */
|
||||
Isolated_vertex_iterator isolated_vertices_begin()
|
||||
{ return (this->iso_verts.begin()); }
|
||||
|
||||
/*! Obtain a past-the-end iterator for the isloated vertices inside the face. */
|
||||
/*! obtains a past-the-end iterator for the isloated vertices inside the face. */
|
||||
Isolated_vertex_iterator isolated_vertices_end()
|
||||
{ return (this->iso_verts.end()); }
|
||||
|
||||
/*! Obtain an const iterator for the first isloated vertex inside the face. */
|
||||
/*! obtains an const iterator for the first isloated vertex inside the face. */
|
||||
Isolated_vertex_const_iterator isolated_vertices_begin() const
|
||||
{ return (this->iso_verts.begin()); }
|
||||
|
||||
/*! Obtain a const past-the-end iterator for the isloated vertices inside the
|
||||
/*! obtains a const past-the-end iterator for the isloated vertices inside the
|
||||
* face. */
|
||||
Isolated_vertex_const_iterator isolated_vertices_end() const
|
||||
{ return (this->iso_verts.end()); }
|
||||
|
|
@ -736,47 +735,47 @@ private:
|
|||
bool iter_is_not_singular;
|
||||
|
||||
public:
|
||||
/*! Default constructor. */
|
||||
/*! constructs default. */
|
||||
Arr_outer_ccb() : p_f(nullptr), iter_is_not_singular(false) {}
|
||||
|
||||
/*! Copy constructor. */
|
||||
/*! constructs copy. */
|
||||
Arr_outer_ccb(const Arr_outer_ccb& other) :
|
||||
p_f(other.p_f), iter_is_not_singular(other.iter_is_not_singular)
|
||||
{ if (other.iter_is_not_singular) iter = other.iter; }
|
||||
|
||||
/*! Obtain a halfedge along the component (const version). */
|
||||
/*! obtains a halfedge along the component (const version). */
|
||||
const Halfedge* halfedge() const { return (*iter); }
|
||||
|
||||
/*! Obtain a halfedge along the component (non-const version). */
|
||||
/*! obtains a halfedge along the component (non-const version). */
|
||||
Halfedge* halfedge() { return (*iter); }
|
||||
|
||||
/*! Set a representative halfedge for the component. */
|
||||
/*! sets a representative halfedge for the component. */
|
||||
void set_halfedge(Halfedge* he) { *iter = he; }
|
||||
|
||||
/*! Obtain the incident face (const version). */
|
||||
/*! obtains the incident face (const version). */
|
||||
const Face* face() const { return (p_f); }
|
||||
|
||||
/*! Obtain the incident face (non-const version). */
|
||||
/*! obtains the incident face (non-const version). */
|
||||
Face* face() { return (p_f); }
|
||||
|
||||
/*! Set the incident face. */
|
||||
/*! sets the incident face. */
|
||||
void set_face(Face* f) { p_f = f; }
|
||||
|
||||
/*! Obtain the iterator (const version). */
|
||||
/*! obtains the iterator (const version). */
|
||||
Outer_ccb_iterator iterator() const
|
||||
{
|
||||
CGAL_assertion(iter_is_not_singular);
|
||||
return (iter);
|
||||
}
|
||||
|
||||
/*! Obtain the iterator (non-const version). */
|
||||
/*! obtains the iterator (non-const version). */
|
||||
Outer_ccb_iterator iterator()
|
||||
{
|
||||
CGAL_assertion(iter_is_not_singular);
|
||||
return (iter);
|
||||
}
|
||||
|
||||
/*! Set the outer CCB iterator. */
|
||||
/*! sets the outer CCB iterator. */
|
||||
void set_iterator(Outer_ccb_iterator it)
|
||||
{
|
||||
iter = it;
|
||||
|
|
@ -813,71 +812,71 @@ private:
|
|||
} status;
|
||||
|
||||
public:
|
||||
/*! Default constructor. */
|
||||
/*! constructs default. */
|
||||
Arr_inner_ccb() : status(ITER_IS_SINGULAR) { f_or_icc.f = nullptr; }
|
||||
|
||||
/*! Copy constructor. */
|
||||
/*! constructs copy. */
|
||||
Arr_inner_ccb(const Arr_inner_ccb& other) :
|
||||
f_or_icc(other.f_or_icc), status(other.status)
|
||||
{ if (other.status == ITER_IS_NOT_SINGULAR) iter = other.iter; }
|
||||
|
||||
/*! Obtain a halfedge along the component (const version). */
|
||||
/*! obtains a halfedge along the component (const version). */
|
||||
const Halfedge* halfedge() const
|
||||
{
|
||||
CGAL_assertion(is_valid());
|
||||
return (*iter);
|
||||
}
|
||||
|
||||
/*! Obtain a halfedge along the component (non-const version). */
|
||||
/*! obtains a halfedge along the component (non-const version). */
|
||||
Halfedge* halfedge()
|
||||
{
|
||||
CGAL_assertion(is_valid());
|
||||
return (*iter);
|
||||
}
|
||||
|
||||
/*! Set a representative halfedge for the component. */
|
||||
/*! sets a representative halfedge for the component. */
|
||||
void set_halfedge(Halfedge *he)
|
||||
{
|
||||
CGAL_assertion(is_valid());
|
||||
*iter = he;
|
||||
}
|
||||
|
||||
/*! Obtain the incident face (const version). */
|
||||
/*! obtains the incident face (const version). */
|
||||
const Face* face() const
|
||||
{
|
||||
CGAL_assertion(status != INVALID);
|
||||
return f_or_icc.f;
|
||||
}
|
||||
|
||||
/*! Obtain the incident face (non-const version). */
|
||||
/*! obtains the incident face (non-const version). */
|
||||
Face* face()
|
||||
{
|
||||
CGAL_assertion(status != INVALID);
|
||||
return f_or_icc.f;
|
||||
}
|
||||
|
||||
/*! Set the incident face. */
|
||||
/*! sets the incident face. */
|
||||
void set_face(Face* f)
|
||||
{
|
||||
CGAL_assertion(status != INVALID);
|
||||
f_or_icc.f = f;
|
||||
}
|
||||
|
||||
/*! Obtain the iterator (const version). */
|
||||
/*! obtains the iterator (const version). */
|
||||
Inner_ccb_iterator iterator() const
|
||||
{
|
||||
CGAL_assertion(status == ITER_IS_NOT_SINGULAR);
|
||||
return (iter);
|
||||
}
|
||||
|
||||
/*! Obtain the iterator (non-const version). */
|
||||
/*! obtains the iterator (non-const version). */
|
||||
Inner_ccb_iterator iterator()
|
||||
{
|
||||
CGAL_assertion(status == ITER_IS_NOT_SINGULAR);
|
||||
return (iter);
|
||||
}
|
||||
|
||||
/*! Set the inner CCB iterator. */
|
||||
/*! sets the inner CCB iterator. */
|
||||
void set_iterator(Inner_ccb_iterator it)
|
||||
{
|
||||
CGAL_assertion(is_valid());
|
||||
|
|
@ -885,17 +884,17 @@ public:
|
|||
status = ITER_IS_NOT_SINGULAR;
|
||||
}
|
||||
|
||||
/*! Check validity */
|
||||
/*! checks validity */
|
||||
bool is_valid() const { return (status != INVALID); }
|
||||
|
||||
/*! Obtain the next CCB to primary chain. */
|
||||
/*! obtains the next CCB to primary chain. */
|
||||
Arr_inner_ccb* next() const
|
||||
{
|
||||
CGAL_assertion(status == INVALID);
|
||||
return f_or_icc.icc;
|
||||
}
|
||||
|
||||
/*! Set the next CCB to primary chain. */
|
||||
/*! sets the next CCB to primary chain. */
|
||||
void set_next(Arr_inner_ccb* next)
|
||||
{
|
||||
status = INVALID;
|
||||
|
|
@ -921,38 +920,38 @@ private:
|
|||
bool iter_is_not_singular;
|
||||
|
||||
public:
|
||||
/*! Default constructor. */
|
||||
/*! constructs default. */
|
||||
Arr_isolated_vertex() : p_f(nullptr), iter_is_not_singular(false) {}
|
||||
|
||||
/*! Copy constructor. */
|
||||
/*! constructs copy. */
|
||||
Arr_isolated_vertex(const Arr_isolated_vertex& other) :
|
||||
p_f(other.p_f), iter_is_not_singular(other.iter_is_not_singular)
|
||||
{ if (other.iter_is_not_singular) iv_it = other.iv_it; }
|
||||
|
||||
/*! Obtain the containing face (const version). */
|
||||
/*! obtains the containing face (const version). */
|
||||
const Face* face() const { return (p_f); }
|
||||
|
||||
/*! Obtain the containing face (non-const version). */
|
||||
/*! obtains the containing face (non-const version). */
|
||||
Face* face() { return (p_f); }
|
||||
|
||||
/*! Set the incident face, the one that contains the isolated vertex. */
|
||||
/*! sets the incident face, the one that contains the isolated vertex. */
|
||||
void set_face(Face* f) { p_f = f; }
|
||||
|
||||
/*! Obtain the isolated vertex iterator (const version). */
|
||||
/*! obtains the isolated vertex iterator (const version). */
|
||||
Isolated_vertex_iterator iterator() const
|
||||
{
|
||||
CGAL_assertion(iter_is_not_singular);
|
||||
return (iv_it);
|
||||
}
|
||||
|
||||
/*! Obtain the isolated vertex iterator (non-const version). */
|
||||
/*! obtains the isolated vertex iterator (non-const version). */
|
||||
Isolated_vertex_iterator iterator()
|
||||
{
|
||||
CGAL_assertion(iter_is_not_singular);
|
||||
return (iv_it);
|
||||
}
|
||||
|
||||
/*! Set the isolated vertex iterator. */
|
||||
/*! sets the isolated vertex iterator. */
|
||||
void set_iterator(Isolated_vertex_iterator iv)
|
||||
{
|
||||
iv_it = iv;
|
||||
|
|
@ -1035,40 +1034,40 @@ public:
|
|||
Edge_const_iterator;
|
||||
|
||||
private:
|
||||
// Copy constructor - not supported.
|
||||
// Copy constructor not supported.
|
||||
Arr_dcel_base(const Self&);
|
||||
|
||||
// Assignment operator - not supported.
|
||||
// Assignment operator not supported.
|
||||
Self& operator=(const Self&);
|
||||
|
||||
public:
|
||||
/// \name Construction and destruction.
|
||||
//@{
|
||||
/*! Default constructor. */
|
||||
/*! constructs default. */
|
||||
Arr_dcel_base() {}
|
||||
|
||||
/*! Destructor. */
|
||||
/*! destructs. */
|
||||
~Arr_dcel_base() { delete_all(); }
|
||||
//@}
|
||||
|
||||
/// \name The DCEL size.
|
||||
//@{
|
||||
/*! Obtain the number of DCEL vertices. */
|
||||
/*! obtains the number of DCEL vertices. */
|
||||
Size size_of_vertices() const { return (vertices.size()); }
|
||||
|
||||
/*! Obtain the number of DCEL halfedges (twice the number of edges). */
|
||||
/*! obtains the number of DCEL halfedges (twice the number of edges). */
|
||||
Size size_of_halfedges() const { return (halfedges.size()); }
|
||||
|
||||
/*! Obtain the number of DCEL faces. */
|
||||
/*! obtains the number of DCEL faces. */
|
||||
Size size_of_faces() const { return (faces.size()); }
|
||||
|
||||
/*! Obtain the number of outer CCBs. */
|
||||
/*! obtains the number of outer CCBs. */
|
||||
Size size_of_outer_ccbs() const { return (out_ccbs.size()); }
|
||||
|
||||
/*! Obtain the number of inner CCBs. */
|
||||
/*! obtains the number of inner CCBs. */
|
||||
Size size_of_inner_ccbs() const { return (in_ccbs.size()); }
|
||||
|
||||
/*! Obtain the number of isolated vertices. */
|
||||
/*! obtains the number of isolated vertices. */
|
||||
Size size_of_isolated_vertices() const { return (iso_verts.size()); }
|
||||
//@}
|
||||
|
||||
|
|
@ -1141,7 +1140,7 @@ public:
|
|||
|
||||
// \name Creation of new DCEL features.
|
||||
//@{
|
||||
/*! Create a new vertex. */
|
||||
/*! creates a new vertex. */
|
||||
Vertex* new_vertex()
|
||||
{
|
||||
Vertex* v = vertex_alloc.allocate(1);
|
||||
|
|
@ -1150,7 +1149,7 @@ public:
|
|||
return v;
|
||||
}
|
||||
|
||||
/*! Create a new pair of opposite halfedges. */
|
||||
/*! creates a new pair of opposite halfedges. */
|
||||
Halfedge* new_edge()
|
||||
{
|
||||
// Create two new halfedges.
|
||||
|
|
@ -1164,7 +1163,7 @@ public:
|
|||
return (h1);
|
||||
}
|
||||
|
||||
/*! Create a new face. */
|
||||
/*! creates a new face. */
|
||||
Face* new_face()
|
||||
{
|
||||
Face* f = face_alloc.allocate(1);
|
||||
|
|
@ -1173,7 +1172,7 @@ public:
|
|||
return(f);
|
||||
}
|
||||
|
||||
/*! Create a new outer CCB. */
|
||||
/*! creates a new outer CCB. */
|
||||
Outer_ccb* new_outer_ccb()
|
||||
{
|
||||
Outer_ccb* oc = out_ccb_alloc.allocate(1);
|
||||
|
|
@ -1182,7 +1181,7 @@ public:
|
|||
return (oc);
|
||||
}
|
||||
|
||||
/*! Create a new inner CCB. */
|
||||
/*! creates a new inner CCB. */
|
||||
Inner_ccb* new_inner_ccb()
|
||||
{
|
||||
Inner_ccb* ic = in_ccb_alloc.allocate(1);
|
||||
|
|
@ -1191,7 +1190,7 @@ public:
|
|||
return (ic);
|
||||
}
|
||||
|
||||
/*! Create a new isolated vertex. */
|
||||
/*! creates a new isolated vertex. */
|
||||
Isolated_vertex* new_isolated_vertex()
|
||||
{
|
||||
Isolated_vertex* iv = iso_vert_alloc.allocate(1);
|
||||
|
|
@ -1304,7 +1303,7 @@ public:
|
|||
}
|
||||
//@}
|
||||
|
||||
/*! Assign our DCEL the contents of another DCEL.
|
||||
/*! assigns our DCEL the contents of another DCEL.
|
||||
*/
|
||||
void assign(const Self& dcel)
|
||||
{
|
||||
|
|
@ -1504,7 +1503,7 @@ public:
|
|||
}
|
||||
|
||||
protected:
|
||||
/*! Create a new halfedge. */
|
||||
/*! creates a new halfedge. */
|
||||
Halfedge* _new_halfedge()
|
||||
{
|
||||
Halfedge* h = halfedge_alloc.allocate(1);
|
||||
|
|
@ -1513,7 +1512,7 @@ protected:
|
|||
return (h);
|
||||
}
|
||||
|
||||
/*! Delete an existing halfedge. */
|
||||
/*! deletes an existing halfedge. */
|
||||
void _delete_halfedge(Halfedge* h)
|
||||
{
|
||||
halfedges.erase(h);
|
||||
|
|
@ -1522,7 +1521,7 @@ protected:
|
|||
}
|
||||
};
|
||||
|
||||
} //namespace CGAL
|
||||
} // namespace CGAL
|
||||
|
||||
#include <CGAL/enable_warnings.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ public:
|
|||
typedef typename Base::Segment_assertions Segment_assertions;
|
||||
typedef typename Base::Has_exact_division Has_exact_division;
|
||||
|
||||
/*! Default constructor. */
|
||||
/*! constructs default. */
|
||||
Arr_directional_non_caching_segment_basic_traits_2() : Base() {}
|
||||
|
||||
/// \name Types and functors inherited from the base, required by the
|
||||
|
|
@ -103,7 +103,7 @@ public:
|
|||
//@{
|
||||
typedef typename Kernel::Construct_opposite_segment_2 Construct_opposite_2;
|
||||
|
||||
/*! Obtain a Construct_opposite_2 functor object. */
|
||||
/*! obtains a Construct_opposite_2 functor object. */
|
||||
Construct_opposite_2 construct_opposite_2_object() const
|
||||
{ return Construct_opposite_2(); }
|
||||
|
||||
|
|
@ -114,7 +114,7 @@ public:
|
|||
/*! The traits (in case it has state). */
|
||||
const Traits& m_traits;
|
||||
|
||||
/*! Constructor
|
||||
/*! Constructs
|
||||
* \param traits the traits (in case it has state).
|
||||
*/
|
||||
Compare_endpoints_xy_2(const Traits& traits) : m_traits(traits) {}
|
||||
|
|
@ -122,7 +122,7 @@ public:
|
|||
friend class Arr_directional_non_caching_segment_basic_traits_2<Kernel>;
|
||||
|
||||
public:
|
||||
/*! Compare the two endpoints of a given curve lexigoraphically.
|
||||
/*! compares the two endpoints of a given curve lexigoraphically.
|
||||
* \param cv The curve.
|
||||
* \return SMALLER if cv is directed from left to right and LARGER
|
||||
* otherwise.
|
||||
|
|
@ -138,7 +138,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
/*! Obtain a Compare_endpoints_xy_2 functor object. */
|
||||
/*! obtains a Compare_endpoints_xy_2 functor object. */
|
||||
Compare_endpoints_xy_2 compare_endpoints_xy_2_object() const
|
||||
{ return Compare_endpoints_xy_2(*this); }
|
||||
//@}
|
||||
|
|
|
|||
|
|
@ -43,16 +43,16 @@ private:
|
|||
Data m_data; // The auxiliary data field.
|
||||
|
||||
public:
|
||||
/*! Get the auxiliary data (const version). */
|
||||
/*! obtains the auxiliary data (const version). */
|
||||
const Data& data() const { return m_data; }
|
||||
|
||||
/*! Get the auxiliary data (non-const version). */
|
||||
/*! obtains the auxiliary data (non-const version). */
|
||||
Data& data() { return m_data; }
|
||||
|
||||
/*! Set the auxiliary data. */
|
||||
/*! sets the auxiliary data. */
|
||||
void set_data(const Data& data) { m_data = data; }
|
||||
|
||||
/*! Assign from another vertex. */
|
||||
/*! assigns from another vertex. */
|
||||
virtual void assign(const Vertex_base& v) {
|
||||
Vertex_base::assign(v);
|
||||
const Self& ex_v = static_cast<const Self&>(v);
|
||||
|
|
@ -83,16 +83,16 @@ private:
|
|||
Data m_data; // The auxiliary data field.
|
||||
|
||||
public:
|
||||
/*! Get the auxiliary data (const version). */
|
||||
/*! obtains the auxiliary data (const version). */
|
||||
const Data& data() const { return m_data; }
|
||||
|
||||
/*! Get the auxiliary data (non-const version). */
|
||||
/*! obtains the auxiliary data (non-const version). */
|
||||
Data& data() { return m_data; }
|
||||
|
||||
/*! Set the auxiliary data. */
|
||||
/*! sets the auxiliary data. */
|
||||
void set_data(const Data& data) { m_data = data; }
|
||||
|
||||
/*! Assign from another halfedge. */
|
||||
/*! assigns from another halfedge. */
|
||||
virtual void assign(const Halfedge_base& he) {
|
||||
Halfedge_base::assign(he);
|
||||
const Self& ex_he = static_cast<const Self&>(he);
|
||||
|
|
@ -123,16 +123,16 @@ private:
|
|||
Data m_data; // The auxiliary data field.
|
||||
|
||||
public:
|
||||
/*! Get the auxiliary data (const version). */
|
||||
/*! obtains the auxiliary data (const version). */
|
||||
const Data& data() const { return m_data; }
|
||||
|
||||
/*! Get the auxiliary data (non-const version). */
|
||||
/*! obtains the auxiliary data (non-const version). */
|
||||
Data& data() { return m_data; }
|
||||
|
||||
/*! Set the auxiliary data. */
|
||||
/*! sets the auxiliary data. */
|
||||
void set_data(const Data& data) { m_data = data; }
|
||||
|
||||
/*! Assign from another face. */
|
||||
/*! assigns from another face. */
|
||||
virtual void assign(const Face_base& f) {
|
||||
Face_base::assign(f);
|
||||
const Self& ex_f = static_cast<const Self&>(f);
|
||||
|
|
@ -176,10 +176,10 @@ public:
|
|||
Halfedge_other, Face_base>;
|
||||
};
|
||||
|
||||
/*! Default constructor. */
|
||||
/*! constructs default. */
|
||||
Arr_face_extended_dcel() {}
|
||||
|
||||
/*! Destructor. */
|
||||
/*! destructs. */
|
||||
virtual ~Arr_face_extended_dcel() {}
|
||||
};
|
||||
|
||||
|
|
@ -227,14 +227,14 @@ public:
|
|||
Vertex_other, Halfedge_other, Face_base>;
|
||||
};
|
||||
|
||||
/*! Default constructor. */
|
||||
/*! constructs default. */
|
||||
Arr_extended_dcel() {}
|
||||
|
||||
/*! Destructor. */
|
||||
/*! destructs. */
|
||||
virtual ~Arr_extended_dcel() {}
|
||||
};
|
||||
|
||||
} //namespace CGAL
|
||||
} // namespace CGAL
|
||||
|
||||
#include <CGAL/enable_warnings.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -62,24 +62,24 @@ private:
|
|||
enum {MIN_REV_MAP_SIZE = 32};
|
||||
|
||||
public:
|
||||
/*! Default constructor. */
|
||||
/*! constructs default. */
|
||||
Arr_face_index_map() :
|
||||
Base(),
|
||||
n_faces(0),
|
||||
rev_map(MIN_REV_MAP_SIZE)
|
||||
{}
|
||||
|
||||
/*! Constructor with an associated arrangement. */
|
||||
/*! constructs from an associated arrangement. */
|
||||
Arr_face_index_map(const Base_aos& arr) :
|
||||
Base(const_cast<Base_aos&>(arr))
|
||||
{ _init(); }
|
||||
|
||||
/*! Copy constructor. */
|
||||
/*! constructs copy. */
|
||||
Arr_face_index_map(const Self& other) :
|
||||
Base(const_cast<Base_aos&>(*(other.arrangement())))
|
||||
{ _init(); }
|
||||
|
||||
/*! Assignment operator. */
|
||||
/*! assigns. */
|
||||
Self& operator= (const Self& other) {
|
||||
if (this == &other) return (*this);
|
||||
|
||||
|
|
@ -89,13 +89,13 @@ public:
|
|||
return (*this);
|
||||
}
|
||||
|
||||
/*! Get the index of a given face.
|
||||
/*! obtains the index of a given face.
|
||||
* \param f A handle to the face.
|
||||
* \pre f is a valid face in the arrangement.
|
||||
*/
|
||||
unsigned int operator[](Face_handle f) const { return (index_map[f]); }
|
||||
|
||||
/*! Get the face given its index.
|
||||
/*! obtains the face given its index.
|
||||
* \param i The index of the face.
|
||||
* \pre i is less than the number of faces in the arrangement.
|
||||
*/
|
||||
|
|
@ -107,27 +107,27 @@ public:
|
|||
/// \name Notification functions, to keep the mapping up-to-date.
|
||||
//@{
|
||||
|
||||
/*! Update the mapping after the arrangement has been assigned with another
|
||||
/*! updates the mapping after the arrangement has been assigned with another
|
||||
* arrangement.
|
||||
*/
|
||||
virtual void after_assign() override { _init(); }
|
||||
|
||||
/*! Update the mapping after the arrangement is cleared.
|
||||
/*! updates the mapping after the arrangement is cleared.
|
||||
*/
|
||||
virtual void after_clear() override { _init(); }
|
||||
|
||||
/*! Update the mapping after attaching to a new arrangement.
|
||||
/*! updates the mapping after attaching to a new arrangement.
|
||||
*/
|
||||
virtual void after_attach() override { _init(); }
|
||||
|
||||
/*! Update the mapping after detaching the arrangement.
|
||||
/*! updates the mapping after detaching the arrangement.
|
||||
*/
|
||||
virtual void after_detach() override {
|
||||
n_faces = 0;
|
||||
index_map.clear();
|
||||
}
|
||||
|
||||
/*! Update the mapping after the creation of a new face is split from another
|
||||
/*! updates the mapping after the creation of a new face is split from another
|
||||
* face.
|
||||
* \param f A handle to the existing face.
|
||||
* \param new_f A handle to the newly created face.
|
||||
|
|
@ -147,7 +147,7 @@ public:
|
|||
rev_map[n_faces - 1] = new_f;
|
||||
}
|
||||
|
||||
/*! Update the mapping before the merge of two faces.
|
||||
/*! updates the mapping before the merge of two faces.
|
||||
* \param f1 A handle to the face that is going to remain.
|
||||
* \param f2 A handle to the face that is about to be removed.
|
||||
*/
|
||||
|
|
@ -181,7 +181,7 @@ public:
|
|||
//@}
|
||||
|
||||
private:
|
||||
/*! Initialize the map for the given arrangement. */
|
||||
/*! initializes the map for the given arrangement. */
|
||||
void _init() {
|
||||
// Get the number of faces and allocate the reverse map accordingly.
|
||||
n_faces = static_cast<unsigned int>(this->arrangement()->number_of_faces());
|
||||
|
|
@ -206,7 +206,7 @@ private:
|
|||
}
|
||||
};
|
||||
|
||||
/*! Get the index property-map function. Provided so that boost is able to
|
||||
/*! obtains the index property-map function. Provided so that boost is able to
|
||||
* access the Arr_face_index_map above.
|
||||
* \param index_map The index map.
|
||||
* \param f A face handle.
|
||||
|
|
@ -217,7 +217,7 @@ unsigned int get(const CGAL::Arr_face_index_map<Arrangement>& index_map,
|
|||
typename Arrangement::Face_handle f)
|
||||
{ return (index_map[f]); }
|
||||
|
||||
} //namespace CGAL
|
||||
} // namespace CGAL
|
||||
|
||||
#include <CGAL/enable_warnings.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -80,12 +80,12 @@ public:
|
|||
const Self * m_traits;
|
||||
|
||||
public:
|
||||
/*! Constructor
|
||||
/*! constructs
|
||||
* \param traits the traits (in case it has state)
|
||||
*/
|
||||
Less_xy_2(const Self * traits) : m_traits(traits) {}
|
||||
|
||||
/*! Compare two points lexigoraphically: by x, then by y.
|
||||
/*! compares two points lexigoraphically: by x, then by y.
|
||||
* We actually reversing the order, so x <--> y.
|
||||
* \param p1 the first endpoint directional point.
|
||||
* \param p2 the second endpoint directional point.
|
||||
|
|
@ -120,14 +120,12 @@ public:
|
|||
const Self * m_traits;
|
||||
|
||||
public:
|
||||
|
||||
/*! Constructor
|
||||
/*! constructs
|
||||
* \param traits the traits (in case it has state)
|
||||
*/
|
||||
Less_yx_2(const Self * traits) : m_traits(traits) {}
|
||||
|
||||
|
||||
/*! Compare two points lexigoraphically: by y, then by x.
|
||||
/*! compares two points lexigoraphically: by y, then by x.
|
||||
* We actually reversing the order, so x <--> y.
|
||||
* \param p1 the first endpoint directional point.
|
||||
* \param p2 the second endpoint directional point.
|
||||
|
|
@ -160,12 +158,12 @@ public:
|
|||
|
||||
public:
|
||||
|
||||
/*! Constructor
|
||||
/*! constructs
|
||||
* \param traits the traits (in case it has state)
|
||||
*/
|
||||
Orientation_2 (const Self * traits) : m_traits(traits) {}
|
||||
|
||||
/*! Checks the orientation between three points.
|
||||
/*! checks the orientation between three points.
|
||||
* We actually reversing the order, so x <--> y.
|
||||
* \param p
|
||||
* \param q
|
||||
|
|
@ -231,7 +229,6 @@ public:
|
|||
|
||||
Compare_y_2 compare_y_2_object() const {return Base::compare_x_2_object(); }
|
||||
|
||||
|
||||
/*! A functor that compares two points by x coordinate.
|
||||
*/
|
||||
class Compare_x_2
|
||||
|
|
@ -241,14 +238,12 @@ public:
|
|||
const Self * m_traits;
|
||||
|
||||
public:
|
||||
|
||||
/*! Constructor
|
||||
/*! constructs
|
||||
* \param traits the traits (in case it has state)
|
||||
*/
|
||||
Compare_x_2(const Self * traits) : m_traits(traits) {}
|
||||
|
||||
|
||||
/*! Compare two points by y coordinate.
|
||||
/*! compares two points by y coordinate.
|
||||
* We actually reversing the order, so x <--> y.
|
||||
* \param p1 the first endpoint directional point.
|
||||
* \param p2 the second endpoint directional point.
|
||||
|
|
@ -388,7 +383,7 @@ public:
|
|||
|
||||
public:
|
||||
|
||||
/*! Constructor
|
||||
/*! constructs
|
||||
* \param traits the traits (in case it has state)
|
||||
*/
|
||||
Less_xy_2(const Self * traits) : m_traits(traits) {}
|
||||
|
|
@ -429,7 +424,7 @@ public:
|
|||
|
||||
public:
|
||||
|
||||
/*! Constructor
|
||||
/*! constructs
|
||||
* \param traits the traits (in case it has state)
|
||||
*/
|
||||
Less_yx_2(const Self * traits) : m_traits(traits) {}
|
||||
|
|
@ -467,7 +462,7 @@ public:
|
|||
|
||||
public:
|
||||
|
||||
/*! Constructor
|
||||
/*! constructs
|
||||
* \param traits the traits (in case it has state)
|
||||
*/
|
||||
Orientation_2 (const Self * traits) : m_traits(traits) {}
|
||||
|
|
@ -549,7 +544,7 @@ public:
|
|||
|
||||
public:
|
||||
|
||||
/*! Constructor
|
||||
/*! constructs
|
||||
* \param traits the traits (in case it has state)
|
||||
*/
|
||||
Compare_x_2(const Self * traits) : m_traits(traits) {}
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -55,13 +55,13 @@ private:
|
|||
FT m_c;
|
||||
|
||||
public:
|
||||
/*! Default Constructor */
|
||||
/*! constructs default */
|
||||
Arr_plane_3() : m_a(0), m_b(0), m_c(0) {}
|
||||
|
||||
/*! Constructor */
|
||||
/*! constructs */
|
||||
Arr_plane_3(int a, int b, int c) : m_a(a), m_b(b), m_c(c) {}
|
||||
|
||||
/*! Constructor */
|
||||
/*! constructs */
|
||||
Arr_plane_3(typename Kernel::Plane_3 p)
|
||||
{
|
||||
CGAL_precondition_code(Kernel kernel;);
|
||||
|
|
@ -71,7 +71,7 @@ public:
|
|||
m_a = p.a(); m_b = p.b(); m_c = p.c() ;
|
||||
}
|
||||
|
||||
/*! Constructor */
|
||||
/*! constructs */
|
||||
Arr_plane_3(const Point_3 & p, const Point_3 & r)
|
||||
{
|
||||
FT prx = r.x() - p.x();
|
||||
|
|
@ -82,16 +82,16 @@ public:
|
|||
m_c = r.x() * pry - prx * r.y();
|
||||
}
|
||||
|
||||
/*! Obtain the x coefficient */
|
||||
/*! obtains the x coefficient */
|
||||
const FT & a() const { return m_a; }
|
||||
|
||||
/*! Obtain the y coefficient */
|
||||
/*! obtains the y coefficient */
|
||||
const FT & b() const { return m_b; }
|
||||
|
||||
/*! Obtain the z coefficient */
|
||||
/*! obtains the z coefficient */
|
||||
const FT & c() const { return m_c; }
|
||||
|
||||
/*! Obtain the i-th coefficient of the plane
|
||||
/*! obtains the i-th coefficient of the plane
|
||||
* \param i the index of the coefficient
|
||||
* \return the i-th coefficient
|
||||
*/
|
||||
|
|
@ -108,14 +108,14 @@ public:
|
|||
(c() == plane.c()));
|
||||
}
|
||||
|
||||
/*! Convert to kernel's plane */
|
||||
/*! converts to kernel's plane */
|
||||
operator typename Kernel::Plane_3 () const
|
||||
{
|
||||
Kernel kernel;
|
||||
return kernel.construct_plane_3_object() (m_a, m_b, m_c, 0);
|
||||
}
|
||||
|
||||
/*! Compute the image point of the projection of p under an affine
|
||||
/*! computes the image point of the projection of p under an affine
|
||||
* transformation, which maps the plane onto the xy-plane, with the
|
||||
* z-coordinate removed.
|
||||
* \param p the point
|
||||
|
|
@ -139,7 +139,7 @@ public:
|
|||
return Point_2(x, y);
|
||||
}
|
||||
|
||||
/*! Compute a 3d point p_3 coincident to the plane, such that the image point
|
||||
/*! computes a 3d point p_3 coincident to the plane, such that the image point
|
||||
* of the projection of p_3 under an affine transformation, which maps the
|
||||
* plane onto the a given axis-parallel plane is a given 2d point.
|
||||
* \param p_2 the image point
|
||||
|
|
@ -183,7 +183,7 @@ public:
|
|||
return p_3;
|
||||
}
|
||||
|
||||
/*! Determine the relative position of a point and the plane
|
||||
/*! determines the relative position of a point and the plane
|
||||
* \param p the point
|
||||
* \return ON_ORIENTED_BOUNDARY, ON_POSITIVE_SIDE, or ON_NEGATIVE_SIDE,
|
||||
* determined by the position of p relative to the oriented plane.
|
||||
|
|
@ -194,7 +194,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
/*! Intersect 2 planes
|
||||
/*! intersects 2 planes
|
||||
* \param plane1 the first plane
|
||||
* \param plane2 the second plane
|
||||
* \return a variant that represents the intersection. It wraps a line of
|
||||
|
|
@ -244,7 +244,7 @@ intersect(const Arr_plane_3<Kernel> & plane1,
|
|||
return Intersection_result(plane1);
|
||||
}
|
||||
|
||||
/*! Compute the image point of the projection of p under an affine
|
||||
/*! computes the image point of the projection of p under an affine
|
||||
* transformation, which maps the plane onto the xy-plane, with the
|
||||
* z-coordinate removed.
|
||||
* \param plane the plane
|
||||
|
|
@ -259,7 +259,7 @@ construct_projected_xy_point(const Arr_plane_3<Kernel> & plane,
|
|||
return plane.to_2d(p);
|
||||
}
|
||||
|
||||
/*! Export a plane to an output stream
|
||||
/*! exports a plane to an output stream
|
||||
* \param os the output stream
|
||||
* \param plane the plane
|
||||
* \return the output stream
|
||||
|
|
@ -272,6 +272,6 @@ inline std::ostream & operator<<(std::ostream & os,
|
|||
return os;
|
||||
}
|
||||
|
||||
} //namespace CGAL
|
||||
} // namespace CGAL
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ public:
|
|||
Algebraic x; // The x-coordinate.
|
||||
Algebraic y; // The y-coordinate.
|
||||
|
||||
/*! Constructor. */
|
||||
/*! constructs. */
|
||||
Intersection_point (const Algebraic& _s, const Algebraic& _t,
|
||||
const Algebraic& _x, const Algebraic& _y) :
|
||||
s(_s), t(_t),
|
||||
|
|
@ -124,7 +124,7 @@ private:
|
|||
app_y (0)
|
||||
{}
|
||||
|
||||
/*! Constructor. */
|
||||
/*! constructs. */
|
||||
My_point_2 (typename Parameter_list::const_iterator it,
|
||||
const Algebraic& _x, const Algebraic& _y) :
|
||||
prm_it (it),
|
||||
|
|
@ -134,7 +134,7 @@ private:
|
|||
app_y (CGAL::to_double(_y))
|
||||
{}
|
||||
|
||||
/*! Get the parameter value. */
|
||||
/*! obtains the parameter value. */
|
||||
const Algebraic& parameter () const
|
||||
{
|
||||
return (*prm_it);
|
||||
|
|
@ -177,7 +177,7 @@ private:
|
|||
|
||||
public:
|
||||
|
||||
/*! Constructor. */
|
||||
/*! constructs. */
|
||||
_Bezier_cache ()
|
||||
{}
|
||||
|
||||
|
|
@ -869,6 +869,6 @@ _Bezier_cache<NtTraits>::_compute_resultant
|
|||
return (det);
|
||||
}
|
||||
|
||||
} //namespace CGAL
|
||||
} // namespace CGAL
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -105,7 +105,7 @@ private:
|
|||
|
||||
public:
|
||||
|
||||
/*! Default constructor. */
|
||||
/*! constructs default. */
|
||||
_Bezier_curve_2_rep () :
|
||||
_no_self_inter (true),
|
||||
p_polyX(nullptr),
|
||||
|
|
@ -114,7 +114,7 @@ public:
|
|||
p_normY(nullptr)
|
||||
{}
|
||||
|
||||
/*! Copy constructor (isn't really used). */
|
||||
/*! constructs copy (isn't really used). */
|
||||
_Bezier_curve_2_rep (const _Bezier_curve_2_rep& other) :
|
||||
_ctrl_pts(other._ctrl_pts),
|
||||
_bbox(other._bbox),
|
||||
|
|
@ -134,8 +134,7 @@ public:
|
|||
p_normY = new Integer(*(other.p_normY));
|
||||
}
|
||||
|
||||
/*!
|
||||
* Constructor from a given range of control points.
|
||||
/*! constructs from a given range of control points.
|
||||
* \param pts_begin An iterator pointing to the first point in the range.
|
||||
* \param pts_end A past-the-end iterator for the range.
|
||||
* \pre The value-type of the input iterator must be Rat_kernel::Point_2.
|
||||
|
|
@ -206,7 +205,7 @@ public:
|
|||
_no_self_inter = ! bound_tr.may_have_self_intersections (_ctrl_pts);
|
||||
}
|
||||
|
||||
/*! Destructor. */
|
||||
/*! destructs. */
|
||||
~_Bezier_curve_2_rep ()
|
||||
{
|
||||
if (p_polyX != nullptr)
|
||||
|
|
@ -222,14 +221,14 @@ public:
|
|||
/// \name Access the polynomials (lazily evaluated).
|
||||
//@{
|
||||
|
||||
/*! Check if the polynomials are already constructed. */
|
||||
/*! checks if the polynomials are already constructed. */
|
||||
bool has_polynomials () const
|
||||
{
|
||||
return (p_polyX != nullptr && p_normX != nullptr &&
|
||||
p_polyY != nullptr && p_normY != nullptr);
|
||||
}
|
||||
|
||||
/*! Get the polynomial X(t). */
|
||||
/*! obtains the polynomial X(t). */
|
||||
const Polynomial& x_polynomial () const
|
||||
{
|
||||
if (p_polyX == nullptr)
|
||||
|
|
@ -238,7 +237,7 @@ public:
|
|||
return (*p_polyX);
|
||||
}
|
||||
|
||||
/*! Get the normalizing factor for X(t). */
|
||||
/*! obtains the normalizing factor for X(t). */
|
||||
const Integer& x_norm () const
|
||||
{
|
||||
if (p_normX == nullptr)
|
||||
|
|
@ -247,7 +246,7 @@ public:
|
|||
return (*p_normX);
|
||||
}
|
||||
|
||||
/*! Get the polynomial Y(t). */
|
||||
/*! obtains the polynomial Y(t). */
|
||||
const Polynomial& y_polynomial () const
|
||||
{
|
||||
if (p_polyY == nullptr)
|
||||
|
|
@ -256,7 +255,7 @@ public:
|
|||
return (*p_polyY);
|
||||
}
|
||||
|
||||
/*! Get the normalizing factor for Y(t). */
|
||||
/*! obtains the normalizing factor for Y(t). */
|
||||
const Integer& y_norm () const
|
||||
{
|
||||
if (p_normY == nullptr)
|
||||
|
|
@ -268,14 +267,12 @@ public:
|
|||
|
||||
private:
|
||||
|
||||
/*!
|
||||
* Construct the representation of X(t) and Y(t).
|
||||
/*! construct the representation of X(t) and Y(t).
|
||||
* The function is declared as "const" as it changes only mutable members.
|
||||
*/
|
||||
void _construct_polynomials () const;
|
||||
|
||||
/*!
|
||||
* Compute the value of n! / (j! k! (n-k-j)!).
|
||||
/*! computes the value of n! / (j! k! (n-k-j)!).
|
||||
*/
|
||||
Integer _choose (int n, int j, int k) const;
|
||||
|
||||
|
|
@ -324,22 +321,19 @@ public:
|
|||
|
||||
public:
|
||||
|
||||
/*!
|
||||
* Default constructor.
|
||||
/*!constructs default.
|
||||
*/
|
||||
_Bezier_curve_2 () :
|
||||
Bcv_handle (Bcv_rep())
|
||||
{}
|
||||
|
||||
/*!
|
||||
* Copy constructor.
|
||||
/*! constructs copy.
|
||||
*/
|
||||
_Bezier_curve_2 (const Self& bc) :
|
||||
Bcv_handle (bc)
|
||||
{}
|
||||
|
||||
/*!
|
||||
* Constructor from a given range of control points.
|
||||
/*! constructs from a given range of control points.
|
||||
* \param pts_begin An iterator pointing to the first point in the range.
|
||||
* \param pts_end A past-the-end iterator for the range.
|
||||
* \pre The value-type of the input iterator must be Rat_kernel::Point_2.
|
||||
|
|
@ -350,8 +344,7 @@ public:
|
|||
Bcv_handle (Bcv_rep (pts_begin, pts_end))
|
||||
{}
|
||||
|
||||
/*!
|
||||
* Assignment operator.
|
||||
/*! assigns.
|
||||
*/
|
||||
Self& operator= (const Self& bc)
|
||||
{
|
||||
|
|
@ -362,56 +355,49 @@ public:
|
|||
return (*this);
|
||||
}
|
||||
|
||||
/*!
|
||||
* Get a unique curve ID (based on the actual representation pointer).
|
||||
/*! obtains a unique curve ID (based on the actual representation pointer).
|
||||
*/
|
||||
size_t id () const
|
||||
{
|
||||
return (reinterpret_cast<size_t> (this->ptr()));
|
||||
}
|
||||
|
||||
/*!
|
||||
* Get the polynomial for the x-coordinates of the curve.
|
||||
/*! obtains the polynomial for the x-coordinates of the curve.
|
||||
*/
|
||||
const Polynomial& x_polynomial () const
|
||||
{
|
||||
return (this->_rep().x_polynomial());
|
||||
}
|
||||
|
||||
/*!
|
||||
* Get the normalizing factor for the x-coordinates.
|
||||
/*! obtains the normalizing factor for the x-coordinates.
|
||||
*/
|
||||
const Integer& x_norm () const
|
||||
{
|
||||
return (this->_rep().x_norm());
|
||||
}
|
||||
|
||||
/*!
|
||||
* Get the polynomial for the y-coordinates of the curve.
|
||||
/*! obtains the polynomial for the y-coordinates of the curve.
|
||||
*/
|
||||
const Polynomial& y_polynomial () const
|
||||
{
|
||||
return (this->_rep().y_polynomial());
|
||||
}
|
||||
|
||||
/*!
|
||||
* Get the normalizing factor for the y-coordinates.
|
||||
/*! obtains the normalizing factor for the y-coordinates.
|
||||
*/
|
||||
const Integer& y_norm () const
|
||||
{
|
||||
return (this->_rep().y_norm());
|
||||
}
|
||||
|
||||
/*!
|
||||
* Get the number of control points inducing the Bezier curve.
|
||||
/*! obtains the number of control points inducing the Bezier curve.
|
||||
*/
|
||||
unsigned int number_of_control_points () const
|
||||
{
|
||||
return static_cast<unsigned int>((this->_rep()._ctrl_pts.size()));
|
||||
}
|
||||
|
||||
/*!
|
||||
* Get the i'th control point.
|
||||
/*! obtains the i'th control point.
|
||||
* \pre i must be between 0 and n - 1, where n is the number of control
|
||||
* points.
|
||||
*/
|
||||
|
|
@ -422,46 +408,40 @@ public:
|
|||
return ((this->_rep()._ctrl_pts)[i]);
|
||||
}
|
||||
|
||||
/*!
|
||||
* Get an iterator for the first control point.
|
||||
/*! obtains an iterator for the first control point.
|
||||
*/
|
||||
Control_point_iterator control_points_begin () const
|
||||
{
|
||||
return (this->_rep()._ctrl_pts.begin());
|
||||
}
|
||||
|
||||
/*!
|
||||
* Get a past-the-end iterator for control points.
|
||||
/*! obtains a past-the-end iterator for control points.
|
||||
*/
|
||||
Control_point_iterator control_points_end () const
|
||||
{
|
||||
return (this->_rep()._ctrl_pts.end());
|
||||
}
|
||||
|
||||
/*!
|
||||
* Check if both curve handles refer to the same object.
|
||||
/*! checks if both curve handles refer to the same object.
|
||||
*/
|
||||
bool is_same (const Self& bc) const
|
||||
{
|
||||
return (this->identical (bc));
|
||||
}
|
||||
|
||||
/*!
|
||||
* Compute a point of the Bezier curve given a rational t-value.
|
||||
/*! computes a point of the Bezier curve given a rational t-value.
|
||||
* \param t The given t-value.
|
||||
* \return The point B(t).
|
||||
*/
|
||||
Rat_point_2 operator() (const Rational& t) const;
|
||||
|
||||
/*!
|
||||
* Compute a point of the Bezier curve given an algebraic t-value.
|
||||
/*! computes a point of the Bezier curve given an algebraic t-value.
|
||||
* \param t The given t-value.
|
||||
* \return The point B(t).
|
||||
*/
|
||||
Alg_point_2 operator() (const Algebraic& t) const;
|
||||
|
||||
/*!
|
||||
* Sample a portion of the curve (for drawing purposes, etc.).
|
||||
/*! samples a portion of the curve (for drawing purposes, etc.).
|
||||
* \param t_start The t-value to start with.
|
||||
* \param t_end The t-value to end at.
|
||||
* \param n_samples The required number of samples.
|
||||
|
|
@ -507,8 +487,7 @@ public:
|
|||
return (oi);
|
||||
}
|
||||
|
||||
/*!
|
||||
* Compute all parameter values t such that the x-coordinate of B(t) is x0.
|
||||
/*! computes all parameter values t such that the x-coordinate of B(t) is x0.
|
||||
* Note that the function does not return only values between 0 and 1, so
|
||||
* the output t-values may belong to the imaginary continuation of the curve.
|
||||
* \param x0 The given x-coordinate.
|
||||
|
|
@ -525,8 +504,7 @@ public:
|
|||
oi));
|
||||
}
|
||||
|
||||
/*!
|
||||
* Compute all parameter values t such that the y-coordinate of B(t) is y0.
|
||||
/*! computes all parameter values t such that the y-coordinate of B(t) is y0.
|
||||
* Note that the function does not return only values between 0 and 1, so
|
||||
* the output t-values may belong to the imaginary continuation of the curve.
|
||||
* \param y0 The given y-coordinate.
|
||||
|
|
@ -542,21 +520,18 @@ public:
|
|||
oi));
|
||||
}
|
||||
|
||||
/*!
|
||||
* Check if the two curves have the same support.
|
||||
/*! checks if the two curves have the same support.
|
||||
*/
|
||||
bool has_same_support (const Self& bc) const;
|
||||
|
||||
/*!
|
||||
* Get the bounding box of the curve.
|
||||
/*! obtains the bounding box of the curve.
|
||||
*/
|
||||
const Bbox_2& bbox () const
|
||||
{
|
||||
return (this->_rep()._bbox);
|
||||
}
|
||||
|
||||
/*!
|
||||
* Check if the curve contains not self intersections.
|
||||
/*! checks if the curve contains not self intersections.
|
||||
* Note that there may not be any self intersections even if the
|
||||
* function returns true (but not vice versa).
|
||||
*/
|
||||
|
|
@ -578,8 +553,7 @@ private:
|
|||
return (*(this->ptr()));
|
||||
}
|
||||
|
||||
/*!
|
||||
* Compute all parameter values t, such that P(t) = val.
|
||||
/*! computes all parameter values t, such that P(t) = val.
|
||||
* \param poly The polynomial.
|
||||
* \param norm Its normalizing factor.
|
||||
* \param val The required value.
|
||||
|
|
@ -618,8 +592,7 @@ private:
|
|||
}
|
||||
};
|
||||
|
||||
/*!
|
||||
* Exporter for Bezier curves.
|
||||
/*! exports a Bezier curves.
|
||||
*/
|
||||
template <class Rat_kernel, class Alg_kernel, class Nt_traits,
|
||||
class Bounding_traits>
|
||||
|
|
@ -638,8 +611,7 @@ operator<< (std::ostream& os,
|
|||
return (os);
|
||||
}
|
||||
|
||||
/*!
|
||||
* Importer for Bezier curves.
|
||||
/*! imports a Bezier curves.
|
||||
*/
|
||||
template <class Rat_kernel, class Alg_kernel, class Nt_traits,
|
||||
class Bounding_traits>
|
||||
|
|
@ -947,6 +919,6 @@ bool _Bezier_curve_2<RatKer, AlgKer, NtTrt, BndTrt>::has_same_support
|
|||
return (true);
|
||||
}
|
||||
|
||||
} //namespace CGAL
|
||||
} // namespace CGAL
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ private:
|
|||
|
||||
public:
|
||||
|
||||
/*! Constructor, given an exact algebraic representation. */
|
||||
/*! constructs, given an exact algebraic representation. */
|
||||
Originator (const Curve_2& c, const Algebraic& t) :
|
||||
_curve (c),
|
||||
_xid (0),
|
||||
|
|
@ -104,7 +104,7 @@ private:
|
|||
set_parameter (t);
|
||||
}
|
||||
|
||||
/*! Constructor, given an exact algebraic representation. */
|
||||
/*! constructs, given an exact algebraic representation. */
|
||||
Originator (const Curve_2& c, unsigned int xid,
|
||||
const Algebraic& t) :
|
||||
_curve (c),
|
||||
|
|
@ -114,7 +114,7 @@ private:
|
|||
set_parameter (t);
|
||||
}
|
||||
|
||||
/*! Constructor with bounding information and no exact representation. */
|
||||
/*! constructs with bounding information and no exact representation. */
|
||||
Originator (const Curve_2& c, const Bez_point_bound& bpb) :
|
||||
_curve (c),
|
||||
_xid (0),
|
||||
|
|
@ -122,7 +122,7 @@ private:
|
|||
p_t (nullptr)
|
||||
{}
|
||||
|
||||
/*! Constructor with bounding information and no exact representation. */
|
||||
/*! constructs with bounding information and no exact representation. */
|
||||
Originator (const Curve_2& c, unsigned int xid,
|
||||
const Bez_point_bound& bpb) :
|
||||
_curve (c),
|
||||
|
|
@ -174,19 +174,19 @@ private:
|
|||
return (*this);
|
||||
}
|
||||
|
||||
/*! Get the originating curve. */
|
||||
/*! obtains the originating curve. */
|
||||
const Curve_2& curve () const
|
||||
{
|
||||
return (_curve);
|
||||
}
|
||||
|
||||
/*! Get the serial number of the originating x-monotone curve. */
|
||||
/*! obtains the serial number of the originating x-monotone curve. */
|
||||
unsigned int xid () const
|
||||
{
|
||||
return (_xid);
|
||||
}
|
||||
|
||||
/*! Get the bounding information. */
|
||||
/*! obtains the bounding information. */
|
||||
const Bez_point_bound& point_bound () const
|
||||
{
|
||||
return (_bpb);
|
||||
|
|
@ -264,7 +264,7 @@ private:
|
|||
BoundNT t_min; /*!< Minimal parameter value. */
|
||||
BoundNT t_max; /*!< Maximal parameter value. */
|
||||
|
||||
/*! Constructor given control points an a t-range. */
|
||||
/*! constructs given control points an a t-range. */
|
||||
Subcurve (const Control_points& _ctrl,
|
||||
const BoundNT& _tmin,
|
||||
const BoundNT& _tmax) :
|
||||
|
|
@ -273,7 +273,7 @@ private:
|
|||
t_max (_tmax)
|
||||
{}
|
||||
|
||||
/*! Constructor given a t-range. */
|
||||
/*! constructs given a t-range. */
|
||||
Subcurve (const BoundNT& _tmin,
|
||||
const BoundNT& _tmax) :
|
||||
t_min (_tmin),
|
||||
|
|
@ -924,7 +924,7 @@ public:
|
|||
_rep()._bbox = bbox;
|
||||
}
|
||||
|
||||
/*! Get the bounding box of the point. */
|
||||
/*! obtains the bounding box of the point. */
|
||||
void get_bbox (typename Bounding_traits::NT& min_x,
|
||||
typename Bounding_traits::NT& min_y,
|
||||
typename Bounding_traits::NT& max_x,
|
||||
|
|
@ -938,13 +938,13 @@ public:
|
|||
|
||||
private:
|
||||
|
||||
/*! Get the representation (const version). */
|
||||
/*! obtains the representation (const version). */
|
||||
inline const Bpt_rep& _rep () const
|
||||
{
|
||||
return (*(this->ptr()));
|
||||
}
|
||||
|
||||
/*! Get the representation (non-const version). */
|
||||
/*! obtains the representation (non-const version). */
|
||||
inline Bpt_rep& _rep ()
|
||||
{
|
||||
return (*(this->ptr()));
|
||||
|
|
@ -1701,6 +1701,6 @@ void _Bezier_point_2_rep<RatKer, AlgKer, NtTrt, BndTrt>::_make_exact
|
|||
CGAL_error();
|
||||
}
|
||||
|
||||
} //namespace CGAL
|
||||
} // namespace CGAL
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -130,7 +130,7 @@ private:
|
|||
Rational t_min;
|
||||
Rational t_max;
|
||||
|
||||
/*! Get the rational bounding box of the subcurve. */
|
||||
/*! obtains the rational bounding box of the subcurve. */
|
||||
void bbox(Rational& x_min, Rational& y_min,
|
||||
Rational& x_max, Rational& y_max) const
|
||||
{
|
||||
|
|
@ -464,7 +464,7 @@ private:
|
|||
const Point_2& p,
|
||||
Bezier_cache& cache) const;
|
||||
|
||||
/*! Get the range of t-value over which the subcurve is defined.
|
||||
/*! obtains the range of t-value over which the subcurve is defined.
|
||||
* \param cache Caches the vertical tangency points and intersection points.
|
||||
* \return A pair comprised of the t-value for the source point and the
|
||||
* t-value for the target point.
|
||||
|
|
@ -2585,6 +2585,6 @@ _exact_vertical_position(const Point_2& p,
|
|||
return EQUAL;
|
||||
}
|
||||
|
||||
} //namespace CGAL
|
||||
} // namespace CGAL
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -50,13 +50,13 @@ private:
|
|||
CoordNT _y;
|
||||
|
||||
public:
|
||||
/*! Default constructor. */
|
||||
/*! constructs default. */
|
||||
_One_root_point_2_rep() :
|
||||
_x(0),
|
||||
_y(0)
|
||||
{}
|
||||
|
||||
/*! Constructor of a point with one-root coefficients.
|
||||
/*! constructs a point with one-root coefficients.
|
||||
This constructor of a point can also be used with rational coefficients
|
||||
thanks to convertor of CoordNT. */
|
||||
_One_root_point_2_rep(const CoordNT& x, const CoordNT& y) :
|
||||
|
|
@ -83,28 +83,29 @@ private:
|
|||
public:
|
||||
typedef typename Point_rep::CoordNT CoordNT;
|
||||
|
||||
/*! Default constructor. */
|
||||
/*! constructs default. */
|
||||
_One_root_point_2() : Point_handle(Point_rep()) {}
|
||||
|
||||
/*! Copy constructor. */
|
||||
/*! constructs copy. */
|
||||
_One_root_point_2(const Self& p) : Point_handle(p) {}
|
||||
|
||||
_One_root_point_2& operator=(const _One_root_point_2&)=default;
|
||||
|
||||
/*! Constructor of a point with one-root coefficients.
|
||||
This constructor of a point can also be used with rational coefficients
|
||||
thanks to convertor of CoordNT. */
|
||||
/*! constructs a point with one-root coefficients.
|
||||
* This constructor of a point can also be used with rational coefficients
|
||||
* thanks to convertor of CoordNT.
|
||||
*/
|
||||
_One_root_point_2(const CoordNT& x, const CoordNT& y) :
|
||||
Point_handle(Point_rep(x, y))
|
||||
{}
|
||||
|
||||
/*! Get the x-coordinate. */
|
||||
/*! obtains the x-coordinate. */
|
||||
const CoordNT& x() const { return (this->ptr()->_x); }
|
||||
|
||||
/*! Get the y-coordinate. */
|
||||
/*! obtains the y-coordinate. */
|
||||
const CoordNT& y() const { return (this->ptr()->_y); }
|
||||
|
||||
/*! Check for equality. */
|
||||
/*! checks for equality. */
|
||||
bool equals(const Self& p) const
|
||||
{
|
||||
if (this->identical(p)) return (true);
|
||||
|
|
@ -117,7 +118,7 @@ public:
|
|||
|
||||
bool operator == (const Self& p) const { return equals(p); }
|
||||
|
||||
/*! Set the point coordinates. */
|
||||
/*! sets the point coordinates. */
|
||||
void set(const NT& x, const NT& y)
|
||||
{
|
||||
this->copy_on_write();
|
||||
|
|
@ -126,7 +127,7 @@ public:
|
|||
return;
|
||||
}
|
||||
|
||||
/*! Set the point coordinates. */
|
||||
/*! sets the point coordinates. */
|
||||
void set(const CoordNT& x, const CoordNT& y)
|
||||
{
|
||||
this->copy_on_write();
|
||||
|
|
@ -136,8 +137,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
/*!
|
||||
* Exporter for conic arcs.
|
||||
/*! exports a conic arc.
|
||||
*/
|
||||
template <typename NT, bool Filter>
|
||||
std::ostream& operator<<(std::ostream& os,
|
||||
|
|
@ -187,14 +187,14 @@ protected:
|
|||
Orientation m_orient; // The orientation (COLLINEAR for line segments).
|
||||
|
||||
public:
|
||||
/*! Default constructor. */
|
||||
/*! constructs default. */
|
||||
_Circle_segment_2() :
|
||||
m_is_full(false),
|
||||
m_has_radius(false),
|
||||
m_orient(COLLINEAR)
|
||||
{}
|
||||
|
||||
/*! Constructor from a line segment.
|
||||
/*! constructs from a line segment.
|
||||
* \param seg The segment.
|
||||
*/
|
||||
_Circle_segment_2(const Segment_2& seg) :
|
||||
|
|
@ -206,7 +206,7 @@ public:
|
|||
m_orient(COLLINEAR)
|
||||
{}
|
||||
|
||||
/*! Constructor from of a line segment.
|
||||
/*! constructs from of a line segment.
|
||||
* \param ps The source point.
|
||||
* \param pt The target point.
|
||||
*/
|
||||
|
|
@ -220,7 +220,7 @@ public:
|
|||
m_orient(COLLINEAR)
|
||||
{}
|
||||
|
||||
/*! Constructor of a segment, given a supporting line and two endpoints,
|
||||
/*! constructs a segment, given a supporting line and two endpoints,
|
||||
* which need not necessarily have rational coordinates.
|
||||
* \param line The supporting line.
|
||||
* \param source The source point.
|
||||
|
|
@ -243,7 +243,7 @@ public:
|
|||
-target.y() * line.b()) == EQUAL);
|
||||
}
|
||||
|
||||
/*! Constructor from a circle.
|
||||
/*! constructs from a circle.
|
||||
* \param circ The circle.
|
||||
*/
|
||||
_Circle_segment_2(const Circle_2& circ) :
|
||||
|
|
@ -253,7 +253,7 @@ public:
|
|||
m_orient(circ.orientation())
|
||||
{ CGAL_assertion(m_orient != COLLINEAR); }
|
||||
|
||||
/*! Constructor from a circle.
|
||||
/*! constructs from a circle.
|
||||
* \param c The circle center.
|
||||
* \param r The radius.
|
||||
* \param orient The orientation of the circle.
|
||||
|
|
@ -267,7 +267,7 @@ public:
|
|||
m_orient(orient)
|
||||
{ CGAL_assertion (orient != COLLINEAR); }
|
||||
|
||||
/*! Constructor of a circular arc, given a supporting circle and two
|
||||
/*! constructs a circular arc, given a supporting circle and two
|
||||
* endpoints, which need not necessarily have rational coordinates.
|
||||
* The orientation of the circle determines the orientation of the arc.
|
||||
* \param circ The supporting circle.
|
||||
|
|
@ -297,7 +297,7 @@ public:
|
|||
CGAL::square(target.y() - circ.center().y())) == EQUAL);
|
||||
}
|
||||
|
||||
/*! Constructor of a circular arc, given a supporting circle and two
|
||||
/*! constructs a circular arc, given a supporting circle and two
|
||||
* endpoints, which need not necessarily have rational coordinates.
|
||||
* \param c The circle center.
|
||||
* \param r The radius.
|
||||
|
|
@ -330,7 +330,7 @@ public:
|
|||
CGAL::square(target.y() - c.y())) == EQUAL);
|
||||
}
|
||||
|
||||
/*! Constructor of a circular arc, from the given three points, in case of
|
||||
/*! constructs a circular arc, from the given three points, in case of
|
||||
* three collinear points, a segment will be constructed.
|
||||
* \param p1 The arc source.
|
||||
* \param p2 A point in the interior of the arc.
|
||||
|
|
@ -408,19 +408,19 @@ public:
|
|||
m_circ = Circle_2(circ_center, sqr_rad, m_orient);
|
||||
}
|
||||
|
||||
/*! Get the orientation of the curve.
|
||||
/*! obtains the orientation of the curve.
|
||||
* \return COLLINEAR in case of a line segment,
|
||||
* CLOCKWISE or COUNTERCLOCKWISE for circular curves.
|
||||
*/
|
||||
inline Orientation orientation() const { return (m_orient); }
|
||||
|
||||
/*! Check if the arc is linear. */
|
||||
/*! checks if the arc is linear. */
|
||||
inline bool is_linear() const { return (m_orient == COLLINEAR); }
|
||||
|
||||
/*! Check if the arc is circular. */
|
||||
/*! checks if the arc is circular. */
|
||||
inline bool is_circular() const { return (m_orient != COLLINEAR); }
|
||||
|
||||
/*! Obtain the supporting line.
|
||||
/*! obtains the supporting line.
|
||||
* \pre The curve orientation is COLLINEAR.
|
||||
*/
|
||||
const Line_2& supporting_line() const
|
||||
|
|
@ -429,7 +429,7 @@ public:
|
|||
return m_line;
|
||||
}
|
||||
|
||||
/*! Obtain the supporting circle.
|
||||
/*! obtains the supporting circle.
|
||||
* \pre The curve orientation is not COLLINEAR.
|
||||
*/
|
||||
const Circle_2& supporting_circle() const
|
||||
|
|
@ -438,11 +438,10 @@ public:
|
|||
return m_circ;
|
||||
}
|
||||
|
||||
/*! Check if the curve is a full circle. */
|
||||
/*! checks if the curve is a full circle. */
|
||||
bool is_full() const { return (m_is_full); }
|
||||
|
||||
/*!
|
||||
* Get the source point.
|
||||
/*! obtains the source point.
|
||||
* \pre The curve is not a full circle.
|
||||
*/
|
||||
const Point_2& source() const
|
||||
|
|
@ -451,8 +450,7 @@ public:
|
|||
return (m_source);
|
||||
}
|
||||
|
||||
/*!
|
||||
* Get the target point.
|
||||
/*! obtains the target point.
|
||||
* \pre The curve is not a full circle.
|
||||
*/
|
||||
const Point_2& target() const
|
||||
|
|
@ -461,7 +459,7 @@ public:
|
|||
return (m_target);
|
||||
}
|
||||
|
||||
/*! Get the vertical tangency points the arc contains.
|
||||
/*! obtains the vertical tangency points the arc contains.
|
||||
* \param vpts Output: The vertical tangency points.
|
||||
* \pre The curve is circular.
|
||||
* \return The number of points (0, 1, or 2).
|
||||
|
|
@ -514,7 +512,7 @@ public:
|
|||
}
|
||||
|
||||
private:
|
||||
/*! Obtain the vertical tangency points the arc contains, assuming it is
|
||||
/*! obtains the vertical tangency points the arc contains, assuming it is
|
||||
* counterclockwise oriented.
|
||||
* \param vpts Output: The vertical tangency points.
|
||||
* \return The number of points (0, 1, or 2).
|
||||
|
|
@ -580,7 +578,7 @@ private:
|
|||
return (n_vpts);
|
||||
}
|
||||
|
||||
/*! Obtain the index of the quarter-plane containing the given point,
|
||||
/*! obtains the index of the quarter-plane containing the given point,
|
||||
* where the circle center is considered to be the origin.
|
||||
*/
|
||||
int _quart_index(const Point_2& p) const
|
||||
|
|
@ -606,7 +604,7 @@ private:
|
|||
}
|
||||
};
|
||||
|
||||
/*! Exporter for line segments and circular arcs.
|
||||
/*! exports a line segments or a circular arc.
|
||||
*/
|
||||
template <typename Kernel, bool Filter>
|
||||
std::ostream&
|
||||
|
|
@ -648,8 +646,7 @@ public:
|
|||
typedef std::pair<Point_2, Multiplicity> Intersection_point;
|
||||
typedef std::list<Intersection_point> Intersection_list;
|
||||
|
||||
/*!
|
||||
* \struct Less functor for Curve_id_pair.
|
||||
/*! \struct Less functor for Curve_id_pair.
|
||||
*/
|
||||
struct Less_id_pair {
|
||||
bool operator()(const Curve_id_pair& ip1, const Curve_id_pair& ip2) const
|
||||
|
|
@ -692,7 +689,7 @@ protected:
|
|||
// The rest of the bits represent the curve index.
|
||||
|
||||
public:
|
||||
/*! Default constructor.
|
||||
/*! constructs default.
|
||||
*/
|
||||
_X_monotone_circle_segment_2() :
|
||||
m_first(),
|
||||
|
|
@ -703,7 +700,7 @@ public:
|
|||
m_info(0)
|
||||
{}
|
||||
|
||||
/*! Construct an arc from a line segment.
|
||||
/*! constructs an arc from a line segment.
|
||||
* \param line The supporting line.
|
||||
* \param source The source point.
|
||||
* \param target The target point.
|
||||
|
|
@ -734,7 +731,7 @@ public:
|
|||
if (res == SMALLER) m_info = (m_info | IS_DIRECTED_RIGHT_MASK);
|
||||
}
|
||||
|
||||
/*! Construct a segment arc from two kernel points
|
||||
/*! constructs a segment arc from two kernel points
|
||||
* \param source the source point.
|
||||
* \ param target the target point.
|
||||
* \pre source and target are not equal.
|
||||
|
|
@ -766,7 +763,7 @@ public:
|
|||
if (res == SMALLER) m_info = (m_info | IS_DIRECTED_RIGHT_MASK);
|
||||
}
|
||||
|
||||
/*! Construct a circular arc.
|
||||
/*! constructs a circular arc.
|
||||
* \param line The supporting line.
|
||||
* \param source The source point.
|
||||
* \param target The target point.
|
||||
|
|
@ -795,14 +792,14 @@ public:
|
|||
else m_info = (m_info | CLOCKWISE_CODE);
|
||||
}
|
||||
|
||||
/*! Check if the arc is linear. */
|
||||
/*! checks if the arc is linear. */
|
||||
inline bool is_linear () const { return ((m_info & ORIENTATION_MASK) == 0); }
|
||||
|
||||
/*! Check if the arc is circular. */
|
||||
/*! checks if the arc is circular. */
|
||||
inline bool is_circular () const
|
||||
{ return ((m_info & ORIENTATION_MASK) != 0); }
|
||||
|
||||
/*! Obtain the supporting line.
|
||||
/*! obtains the supporting line.
|
||||
* \pre The arc is linear (a line segment).
|
||||
*/
|
||||
Line_2 supporting_line() const
|
||||
|
|
@ -811,7 +808,7 @@ public:
|
|||
return (Line_2 (a(), b(), c()));
|
||||
}
|
||||
|
||||
/*! Obtain the supporting circle.
|
||||
/*! obtains the supporting circle.
|
||||
* \pre The arc is circular.
|
||||
*/
|
||||
Circle_2 supporting_circle() const
|
||||
|
|
@ -822,13 +819,13 @@ public:
|
|||
return (Circle_2(center , sqr_r(), orientation()));
|
||||
}
|
||||
|
||||
/*! Get the source point. */
|
||||
/*! obtains the source point. */
|
||||
inline const Point_2& source() const { return (m_source); }
|
||||
|
||||
/*! Get the target point. */
|
||||
/*! obtains the target point. */
|
||||
inline const Point_2& target() const { return (m_target); }
|
||||
|
||||
/*! True if the arc is directed right, false otherwise. */
|
||||
/*! returns true if the arc is directed right, false otherwise. */
|
||||
bool is_directed_right() const
|
||||
{ return ((m_info & IS_DIRECTED_RIGHT_MASK) != 0); }
|
||||
|
||||
|
|
@ -836,15 +833,15 @@ public:
|
|||
|
||||
bool has_right() const { return true; }
|
||||
|
||||
/*! Get the left endpoint of the arc. */
|
||||
/*! obtains the left endpoint of the arc. */
|
||||
inline const Point_2& left() const
|
||||
{ return (((m_info & IS_DIRECTED_RIGHT_MASK) != 0) ? m_source : m_target); }
|
||||
|
||||
/*! Get the right endpoint of the arc. */
|
||||
/*! obtains the right endpoint of the arc. */
|
||||
inline const Point_2& right() const
|
||||
{ return (((m_info & IS_DIRECTED_RIGHT_MASK) != 0) ? m_target : m_source); }
|
||||
|
||||
/*! Check whether the given point is in the x-range of the arc.
|
||||
/*! checks whether the given point is in the x-range of the arc.
|
||||
*/
|
||||
bool is_in_x_range(const Point_2& p) const
|
||||
{
|
||||
|
|
@ -856,11 +853,11 @@ public:
|
|||
return (CGAL::compare (p.x(), right().x()) != LARGER);
|
||||
}
|
||||
|
||||
/*! Check if the arc is a vertical segment. */
|
||||
/*! checks if the arc is a vertical segment. */
|
||||
inline bool is_vertical() const
|
||||
{ return ((m_info & IS_VERTICAL_SEGMENT_MASK) != 0); }
|
||||
|
||||
/*! Get the orientation of the arc. */
|
||||
/*! obtains the orientation of the arc. */
|
||||
inline Orientation orientation() const
|
||||
{
|
||||
unsigned int or_ = (m_info & ORIENTATION_MASK);
|
||||
|
|
@ -871,7 +868,7 @@ public:
|
|||
return (CGAL::COLLINEAR);
|
||||
}
|
||||
|
||||
/*! Check the position of a given point with respect to the arc.
|
||||
/*! checks the position of a given point with respect to the arc.
|
||||
*/
|
||||
Comparison_result point_position(const Point_2& p) const
|
||||
{
|
||||
|
|
@ -879,7 +876,7 @@ public:
|
|||
else return (_circ_point_position (p));
|
||||
}
|
||||
|
||||
/*! Compare the two arcs to the right of their intersection point.
|
||||
/*! compares the two arcs to the right of their intersection point.
|
||||
*/
|
||||
Comparison_result compare_to_right(const Self& cv, const Point_2& p) const
|
||||
{
|
||||
|
|
@ -895,7 +892,7 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
/*! Compare the two arcs to the left of their intersection point.
|
||||
/*! compares the two arcs to the left of their intersection point.
|
||||
*/
|
||||
Comparison_result compare_to_left(const Self& cv, const Point_2& p) const
|
||||
{
|
||||
|
|
@ -911,7 +908,7 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
/*! Check whether the two arcs have the same supporting curve.
|
||||
/*! checks whether the two arcs have the same supporting curve.
|
||||
*/
|
||||
bool has_same_supporting_curve(const Self& cv) const
|
||||
{
|
||||
|
|
@ -951,7 +948,7 @@ public:
|
|||
CGAL::compare(fact2*c(), fact1*cv.c()) == EQUAL);
|
||||
}
|
||||
|
||||
/*! Check whether the two curves are equal.
|
||||
/*! checks whether the two curves are equal.
|
||||
*/
|
||||
bool equals(const Self& cv) const
|
||||
{
|
||||
|
|
@ -970,7 +967,7 @@ public:
|
|||
m_source.equals(cv.m_target) && m_target.equals(cv.m_source)));
|
||||
}
|
||||
|
||||
/*! Split the curve at a given point into two sub-arcs.
|
||||
/*! splits the curve at a given point into two sub-arcs.
|
||||
*/
|
||||
void split(const Point_2& p, Self& c1, Self& c2) const
|
||||
{
|
||||
|
|
@ -989,7 +986,7 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
/*! Compute the intersections between the two arcs or segments.
|
||||
/*! computes the intersections between the two arcs or segments.
|
||||
*/
|
||||
template <typename OutputIterator>
|
||||
OutputIterator intersect(const Self& cv, OutputIterator oi,
|
||||
|
|
@ -1076,7 +1073,7 @@ public:
|
|||
return oi;
|
||||
}
|
||||
|
||||
/*! Check whether it is possible to merge our arc with the given arc.
|
||||
/*! checks whether it is possible to merge our arc with the given arc.
|
||||
*/
|
||||
bool can_merge_with(const Self& cv) const
|
||||
{
|
||||
|
|
@ -1089,7 +1086,7 @@ public:
|
|||
return (right().equals(cv.left()) || left().equals(cv.right()));
|
||||
}
|
||||
|
||||
/*! Merge our arc with the given arc.
|
||||
/*! merges our arc with the given arc.
|
||||
* \pre The two arcs are mergeable.
|
||||
*/
|
||||
void merge(const Self& cv)
|
||||
|
|
@ -1111,7 +1108,7 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
/*! construct an opposite arc. */
|
||||
/*! constructs an opposite arc. */
|
||||
Self construct_opposite() const
|
||||
{
|
||||
Self opp_cv;
|
||||
|
|
@ -1153,23 +1150,22 @@ public:
|
|||
}
|
||||
|
||||
protected:
|
||||
/*! Get the curve index. */
|
||||
/*! obtains the curve index. */
|
||||
inline unsigned int _index() const { return (m_info >> INDEX_SHIFT_BITS); }
|
||||
|
||||
/// \name Accessors for circular arcs.
|
||||
//@{
|
||||
|
||||
/*! Get the x-coordinate of the center of the supporting circle. */
|
||||
/*! obtains the x-coordinate of the center of the supporting circle. */
|
||||
inline const NT& x0() const { return (m_first); }
|
||||
|
||||
/*! Get the y-coordinate of the center of the supporting circle. */
|
||||
/*! obtains the y-coordinate of the center of the supporting circle. */
|
||||
inline const NT& y0() const { return (m_second); }
|
||||
|
||||
/*! Get the squared radius of the supporting circle. */
|
||||
/*! obtains the squared radius of the supporting circle. */
|
||||
inline const NT& sqr_r() const { return (m_third); }
|
||||
|
||||
/*!
|
||||
* Check if the circular arc lies on the upper half of the supporting circle.
|
||||
/*! checks if the circular arc lies on the upper half of the supporting circle.
|
||||
*/
|
||||
inline bool _is_upper() const
|
||||
{
|
||||
|
|
@ -1186,21 +1182,20 @@ protected:
|
|||
/// \name Accessors for line segments.
|
||||
//@{
|
||||
|
||||
/*! Get the coefficient of x in the equation of the supporting line. */
|
||||
/*! obtains the coefficient of x in the equation of the supporting line. */
|
||||
inline const NT& a() const { return (m_first); }
|
||||
|
||||
/*! Get the coefficient of y in the equation of the supporting line. */
|
||||
/*! obtains the coefficient of y in the equation of the supporting line. */
|
||||
inline const NT& b() const { return (m_second); }
|
||||
|
||||
/*! Get the free coefficient in the equation of the supporting line. */
|
||||
/*! obtains the free coefficient in the equation of the supporting line. */
|
||||
inline const NT& c() const { return (m_third); }
|
||||
//@}
|
||||
|
||||
/// \name Auxiliary functions for the point_position predicate.
|
||||
//@{
|
||||
|
||||
/*!
|
||||
* Check the position of a given point with respect to a line segment.
|
||||
/*! checks the position of a given point with respect to a line segment.
|
||||
*/
|
||||
Comparison_result _line_point_position(const Point_2& p) const
|
||||
{
|
||||
|
|
@ -1232,8 +1227,7 @@ protected:
|
|||
return (CGAL::compare (p.y(), y_proj));
|
||||
}
|
||||
|
||||
/*!
|
||||
* Check the position of a given point with respect to a circular arc.
|
||||
/*! checks the position of a given point with respect to a circular arc.
|
||||
*/
|
||||
Comparison_result _circ_point_position(const Point_2& p) const
|
||||
{
|
||||
|
|
@ -1274,8 +1268,7 @@ protected:
|
|||
/// \name Auxiliary functions for the compare_to_right predicate.
|
||||
//@{
|
||||
|
||||
/*!
|
||||
* Compare two line segments to the right of their intersection point.
|
||||
/*! compares two line segments to the right of their intersection point.
|
||||
*/
|
||||
Comparison_result _lines_compare_to_right(const Self& cv,
|
||||
const Point_2& /* p */) const
|
||||
|
|
@ -1295,8 +1288,7 @@ protected:
|
|||
return (CGAL::compare (cv.a()/cv.b(), a()/b()));
|
||||
}
|
||||
|
||||
/*!
|
||||
* Compare a circular arcs (this) and a line segment (cv) to the right of
|
||||
/*! compares a circular arcs (this) and a line segment (cv) to the right of
|
||||
* their intersection point.
|
||||
*/
|
||||
Comparison_result _circ_line_compare_to_right(const Self& cv,
|
||||
|
|
@ -1339,7 +1331,7 @@ protected:
|
|||
return (_is_upper() ? SMALLER : LARGER);
|
||||
}
|
||||
|
||||
/*! Compare two circular arcs to the right of their intersection point.
|
||||
/*! compares two circular arcs to the right of their intersection point.
|
||||
*/
|
||||
Comparison_result _circs_compare_to_right(const Self& cv,
|
||||
const Point_2& p) const
|
||||
|
|
@ -1471,8 +1463,7 @@ protected:
|
|||
/// \name Auxiliary functions for the compare_to_left predicate.
|
||||
//@{
|
||||
|
||||
/*!
|
||||
* Compare two line segments to the left of their intersection point.
|
||||
/*! compares two line segments to the left of their intersection point.
|
||||
*/
|
||||
Comparison_result _lines_compare_to_left(const Self& cv,
|
||||
const Point_2& ) const
|
||||
|
|
@ -1494,7 +1485,7 @@ protected:
|
|||
return (CGAL::compare (a()/b(), cv.a()/cv.b()));
|
||||
}
|
||||
|
||||
/*! Compare a circular arcs (this) and a line segment (cv) to the left of
|
||||
/*! compares a circular arcs (this) and a line segment (cv) to the left of
|
||||
* their intersection point.
|
||||
*/
|
||||
Comparison_result _circ_line_compare_to_left(const Self& cv,
|
||||
|
|
@ -1540,8 +1531,7 @@ protected:
|
|||
return (_is_upper() ? SMALLER : LARGER);
|
||||
}
|
||||
|
||||
/*!
|
||||
* Compare the two arcs to the left of their intersection point.
|
||||
/*! compares the two arcs to the left of their intersection point.
|
||||
*/
|
||||
Comparison_result _circs_compare_to_left(const Self& cv,
|
||||
const Point_2& p) const
|
||||
|
|
@ -1675,7 +1665,7 @@ protected:
|
|||
/// \name Auxiliary functions for computing intersections.
|
||||
//@{
|
||||
|
||||
/*! Compute the intersections between two line segments.
|
||||
/*! computes the intersections between two line segments.
|
||||
*/
|
||||
void _lines_intersect(const Self& cv,
|
||||
Intersection_list& inter_list) const
|
||||
|
|
@ -1701,7 +1691,7 @@ protected:
|
|||
inter_list.push_back(Intersection_point(p, mult));
|
||||
}
|
||||
|
||||
/*! Compute the intersections between the supporting circle of (*this) and
|
||||
/*! computes the intersections between the supporting circle of (*this) and
|
||||
* the supporting line of the segment cv.
|
||||
*/
|
||||
void _circ_line_intersect(const Self& cv,
|
||||
|
|
@ -1826,7 +1816,7 @@ protected:
|
|||
}
|
||||
}
|
||||
|
||||
/*! Compute the intersections between two circles.
|
||||
/*! computes the intersections between two circles.
|
||||
*/
|
||||
void _circs_intersect(const Self& cv, Intersection_list& inter_list) const
|
||||
{
|
||||
|
|
@ -1891,7 +1881,7 @@ protected:
|
|||
}
|
||||
}
|
||||
|
||||
/*! Check if the given point lies on the arc.
|
||||
/*! checks if the given point lies on the arc.
|
||||
* \pre p lies on the supporting curve.
|
||||
*/
|
||||
bool _is_between_endpoints(const Point_2& p) const
|
||||
|
|
@ -1928,7 +1918,7 @@ protected:
|
|||
return (this->is_in_x_range(p));
|
||||
}
|
||||
|
||||
/*! Check whether the given point lies in the interior of the arc.
|
||||
/*! checks whether the given point lies in the interior of the arc.
|
||||
* \pre p lies on the supporting curve.
|
||||
*/
|
||||
bool _is_strictly_between_endpoints(const Point_2& p) const
|
||||
|
|
@ -1937,7 +1927,7 @@ protected:
|
|||
return (_is_between_endpoints(p));
|
||||
}
|
||||
|
||||
/*! Compute the overlap with a given arc having the same supporting curve.
|
||||
/*! computes the overlap with a given arc having the same supporting curve.
|
||||
* \param cv The given arc.
|
||||
* \param overlap Output: The overlapping arc (if any).
|
||||
* \return Whether we found an overlap.
|
||||
|
|
@ -2048,7 +2038,7 @@ protected:
|
|||
*oi++ = std::make_pair(x_right, y_right); // The right point.
|
||||
}
|
||||
|
||||
/*! Trim the arc given its new endpoints.
|
||||
/*! trims the arc given its new endpoints.
|
||||
* \param ps The new source point.
|
||||
* \param pt The new target point.
|
||||
* \return The new trimmed arc.
|
||||
|
|
@ -2068,7 +2058,7 @@ protected:
|
|||
//@}
|
||||
};
|
||||
|
||||
/*! Exporter for circular arcs (or line segments).
|
||||
/*! exports a circular arcs or a line segment
|
||||
*/
|
||||
template <class Kernel, bool Filter>
|
||||
std::ostream&
|
||||
|
|
@ -2082,6 +2072,6 @@ operator<<(std::ostream& os,
|
|||
return (os);
|
||||
}
|
||||
|
||||
} //namespace CGAL
|
||||
} // namespace CGAL
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -105,7 +105,7 @@ public:
|
|||
/// \name Deprecated Constructions.
|
||||
//@{
|
||||
|
||||
/*!Construct a conic arc which is the full conic:
|
||||
/*! constructs a conic arc which is the full conic:
|
||||
* C: r*x^2 + s*y^2 + t*xy + u*x + v*y + w = 0
|
||||
* \pre The conic C must be an ellipse (so 4rs - t^2 > 0).
|
||||
*/
|
||||
|
|
@ -129,7 +129,7 @@ public:
|
|||
_set_full(rat_coeffs, true);
|
||||
}
|
||||
|
||||
/*! Construct a conic arc which lies on the conic:
|
||||
/*! constructs a conic arc which lies on the conic:
|
||||
* C: r*x^2 + s*y^2 + t*xy + u*x + v*y + w = 0
|
||||
* \param orient The orientation of the arc (clockwise or counterclockwise).
|
||||
* \param source The source point.
|
||||
|
|
@ -156,7 +156,7 @@ public:
|
|||
_set(rat_coeffs);
|
||||
}
|
||||
|
||||
/*! Construct a segment conic arc from two endpoints.
|
||||
/*! constructs a segment conic arc from two endpoints.
|
||||
* \param source the source point with rational coordinates.
|
||||
*/
|
||||
CGAL_DEPRECATED Conic_arc_2(const Point_2& source, const Point_2& target) :
|
||||
|
|
@ -186,7 +186,7 @@ public:
|
|||
m_extra_data->side = ZERO;
|
||||
}
|
||||
|
||||
/*! Construct a conic arc from the given line segment.
|
||||
/*! constructs a conic arc from the given line segment.
|
||||
* \param seg The line segment with rational endpoints.
|
||||
*/
|
||||
CGAL_DEPRECATED Conic_arc_2 (const Rat_segment_2& seg) :
|
||||
|
|
@ -241,7 +241,7 @@ public:
|
|||
_set(rat_coeffs);
|
||||
}
|
||||
|
||||
/*! Set a circular arc that corresponds to a full circle.
|
||||
/*! sets a circular arc that corresponds to a full circle.
|
||||
* \param circ The circle (with rational center and rational squared radius).
|
||||
*/
|
||||
CGAL_DEPRECATED Conic_arc_2(const Rat_circle_2& circ) :
|
||||
|
|
@ -277,7 +277,7 @@ public:
|
|||
_set_full(rat_coeffs, false);
|
||||
}
|
||||
|
||||
/*! Set a circular arc that lies on the given circle:
|
||||
/*! sets a circular arc that lies on the given circle:
|
||||
* C: (x - x0)^2 + (y - y0)^2 = R^2
|
||||
* \param orient The orientation of the circle.
|
||||
* \param source The source point.
|
||||
|
|
@ -342,7 +342,7 @@ public:
|
|||
_set(rat_coeffs);
|
||||
}
|
||||
|
||||
/*! Construct a circular arc from the given three points.
|
||||
/*! constructs a circular arc from the given three points.
|
||||
* \param p1 The arc source.
|
||||
* \param p2 A point in the interior of the arc.
|
||||
* \param p3 The arc target.
|
||||
|
|
@ -424,7 +424,7 @@ public:
|
|||
_set(rat_coeffs);
|
||||
}
|
||||
|
||||
/*! Construct a conic arc from the given five points, specified by the
|
||||
/*! constructs a conic arc from the given five points, specified by the
|
||||
* points p1, p2, p3, p4 and p5.
|
||||
* \param p1 The source point of the given arc.
|
||||
* \param p2,p3,p4 Points lying on the conic arc, between p1 and p5.
|
||||
|
|
@ -515,7 +515,7 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
/*! Construct a conic arc which lies on the conic:
|
||||
/*! constructs a conic arc which lies on the conic:
|
||||
* C: r*x^2 + s*y^2 + t*xy + u*x + v*y + w = 0
|
||||
* The source and the target are specified by the intersection of the
|
||||
* conic with:
|
||||
|
|
@ -684,7 +684,7 @@ public:
|
|||
_set(rat_coeffs);
|
||||
}
|
||||
|
||||
/*! Get a bounding box for the conic arc.
|
||||
/*! obtains a bounding box for the conic arc.
|
||||
* \return The bounding box.
|
||||
*/
|
||||
CGAL_DEPRECATED Bbox_2 bbox() const {
|
||||
|
|
@ -769,7 +769,7 @@ public:
|
|||
//@}
|
||||
|
||||
protected:
|
||||
/*! Calculate the vertical tangency points of the arc.
|
||||
/*! calculates the vertical tangency points of the arc.
|
||||
* \param vpts The vertical tangency points.
|
||||
* \pre The vpts vector should be allocated at the size of 2.
|
||||
* \return The number of vertical tangency points.
|
||||
|
|
@ -797,7 +797,7 @@ protected:
|
|||
return m;
|
||||
}
|
||||
|
||||
/*! Calculate the horizontal tangency points of the arc.
|
||||
/*! calculates the horizontal tangency points of the arc.
|
||||
* \param hpts The horizontal tangency points.
|
||||
* \pre The hpts vector should be allocated at the size of 2.
|
||||
* \return The number of horizontal tangency points.
|
||||
|
|
@ -825,7 +825,7 @@ protected:
|
|||
return m;
|
||||
}
|
||||
|
||||
/*! Check whether the given point is strictly between the source and the
|
||||
/*! checks whether the given point is strictly between the source and the
|
||||
* target (but not any of them).
|
||||
* The point is assumed to be on the conic's boundary.
|
||||
* \param p The query point.
|
||||
|
|
@ -892,7 +892,7 @@ protected:
|
|||
}
|
||||
}
|
||||
|
||||
/*! Find the vertical tangency points of the underlying conic.
|
||||
/*! finds the vertical tangency points of the underlying conic.
|
||||
* \param ps The output points of vertical tangency.
|
||||
* This area must be allocated at the size of 2.
|
||||
* \return The number of vertical tangency points.
|
||||
|
|
@ -970,7 +970,7 @@ protected:
|
|||
return n;
|
||||
}
|
||||
|
||||
/*! Find the horizontal tangency points of the underlying conic.
|
||||
/*! finds the horizontal tangency points of the underlying conic.
|
||||
* \param ps The output points of horizontal tangency.
|
||||
* This area must be allocated at the size of 2.
|
||||
* \return The number of horizontal tangency points.
|
||||
|
|
@ -1020,7 +1020,7 @@ protected:
|
|||
return n;
|
||||
}
|
||||
|
||||
/*! Set the properties of a conic arc that is really a full curve
|
||||
/*! sets the properties of a conic arc that is really a full curve
|
||||
* (that is, an ellipse).
|
||||
* \param rat_coeffs A vector of size 6, storing the rational coefficients
|
||||
* of x^2, y^2, xy, x, y and the free coefficient resp.
|
||||
|
|
@ -1074,7 +1074,7 @@ protected:
|
|||
else reset_flags(); // invalid arc
|
||||
}
|
||||
|
||||
/*! Check whether the given point lies on the supporting conic of the arc.
|
||||
/*! checks whether the given point lies on the supporting conic of the arc.
|
||||
* \param p The query point.
|
||||
* \return (true) if p lies on the supporting conic; (false) otherwise.
|
||||
*/
|
||||
|
|
@ -1093,7 +1093,7 @@ protected:
|
|||
return (CGAL::sign(val) == ZERO);
|
||||
}
|
||||
|
||||
/*! Build the data for hyperbolic arc, containing the characterization of the
|
||||
/*! builds the data for hyperbolic arc, containing the characterization of the
|
||||
* hyperbolic branch the arc is placed on.
|
||||
*/
|
||||
CGAL_DEPRECATED void _build_hyperbolic_arc_data() {
|
||||
|
|
@ -1189,7 +1189,7 @@ protected:
|
|||
sign_of_extra_data(m_target.x(), m_target.y()));
|
||||
}
|
||||
|
||||
/*! Check whether the given point is between the source and the target.
|
||||
/*! checks whether the given point is between the source and the target.
|
||||
* The point is assumed to be on the conic's boundary.
|
||||
* \param p The query point.
|
||||
* \return (true) if the point is between the two endpoints,
|
||||
|
|
@ -1206,7 +1206,7 @@ protected:
|
|||
else return _is_strictly_between_endpoints(p);
|
||||
}
|
||||
|
||||
/*! Find the y coordinates of the underlying conic at a given x coordinate.
|
||||
/*! finds the y coordinates of the underlying conic at a given x coordinate.
|
||||
* \param x The x coordinate.
|
||||
* \param ys The output y coordinates.
|
||||
* \pre The vector ys must be allocated at the size of 2.
|
||||
|
|
@ -1224,7 +1224,7 @@ protected:
|
|||
return (_solve_quadratic_equation(A, B, C, ys[0], ys[1]));
|
||||
}
|
||||
|
||||
/*! Find all points on the arc with a given x-coordinate.
|
||||
/*! finds all points on the arc with a given x-coordinate.
|
||||
* \param p A placeholder for the x-coordinate.
|
||||
* \param ps The point on the arc at x(p).
|
||||
* \pre The vector ps should be allocated at the size of 2.
|
||||
|
|
@ -1248,7 +1248,7 @@ protected:
|
|||
return m;
|
||||
}
|
||||
|
||||
/*! Solve the given quadratic equation: Ax^2 + B*x + C = 0.
|
||||
/*! solves the given quadratic equation: Ax^2 + B*x + C = 0.
|
||||
* \param x_minus The root obtained from taking -sqrt(discriminant).
|
||||
* \param x_plus The root obtained from taking -sqrt(discriminant).
|
||||
* \return The number of disticnt solutions to the equation.
|
||||
|
|
@ -1289,7 +1289,7 @@ protected:
|
|||
return 2;
|
||||
}
|
||||
|
||||
/*! Find the x coordinates of the underlying conic at a given y coordinate.
|
||||
/*! finds the x coordinates of the underlying conic at a given y coordinate.
|
||||
* \param y The y coordinate.
|
||||
* \param xs The output x coordinates.
|
||||
* \pre The vector xs must be allocated at the size of 2.
|
||||
|
|
@ -1308,7 +1308,7 @@ protected:
|
|||
return (_solve_quadratic_equation(A, B, C, xs[0], xs[1]));
|
||||
}
|
||||
|
||||
/*! Find all points on the arc with a given y-coordinate.
|
||||
/*! finds all points on the arc with a given y-coordinate.
|
||||
* \param p A placeholder for the y-coordinate.
|
||||
* \param ps The point on the arc at x(p).
|
||||
* \pre The vector ps should be allocated at the size of 2.
|
||||
|
|
@ -1332,7 +1332,7 @@ protected:
|
|||
return m;
|
||||
}
|
||||
|
||||
/*! Set the properties of a conic arc (for the usage of the constructors).
|
||||
/*! sets the properties of a conic arc (for the usage of the constructors).
|
||||
* \param rat_coeffs A vector of size 6, storing the rational coefficients
|
||||
* of x^2, y^2, xy, x, y and the free coefficient resp.
|
||||
*/
|
||||
|
|
@ -1454,7 +1454,7 @@ public:
|
|||
/// \name Construction and destruction functions.
|
||||
//@{
|
||||
|
||||
/*! Default constructor.
|
||||
/*! constructs default.
|
||||
*/
|
||||
Conic_arc_2() :
|
||||
m_r(0), m_s(0), m_t(0), m_u(0), m_v(0), m_w(0),
|
||||
|
|
@ -1463,7 +1463,7 @@ public:
|
|||
m_extra_data(nullptr)
|
||||
{}
|
||||
|
||||
/*! Copy constructor.
|
||||
/*! constructs copy.
|
||||
* \param arc The copied arc.
|
||||
*/
|
||||
Conic_arc_2(const Self& arc) :
|
||||
|
|
@ -1478,11 +1478,11 @@ public:
|
|||
new Extra_data(*(arc.m_extra_data)) : nullptr;
|
||||
}
|
||||
|
||||
/*! Destructor.
|
||||
/*! destructs.
|
||||
*/
|
||||
virtual ~Conic_arc_2() { if (m_extra_data != nullptr) delete m_extra_data; }
|
||||
|
||||
/*! Assignment operator.
|
||||
/*! assigns.
|
||||
* \param arc The copied arc.
|
||||
*/
|
||||
const Self& operator=(const Self& arc) {
|
||||
|
|
@ -1515,15 +1515,15 @@ public:
|
|||
/// \name Get the arc properties.
|
||||
//@{
|
||||
|
||||
/*! Determine whether the arc is valid.
|
||||
/*! determines whether the arc is valid.
|
||||
*/
|
||||
bool is_valid() const { return test_flag(IS_VALID); }
|
||||
|
||||
/*! Determine whether the arc represents a full conic curve.
|
||||
/*! determines whether the arc represents a full conic curve.
|
||||
*/
|
||||
bool is_full_conic() const { return test_flag(IS_FULL_CONIC); }
|
||||
|
||||
/*! Obtain the coefficients of the underlying conic.
|
||||
/*! obtains the coefficients of the underlying conic.
|
||||
*/
|
||||
const Integer& r() const { return (m_r); }
|
||||
const Integer& s() const { return (m_s); }
|
||||
|
|
@ -1532,7 +1532,7 @@ public:
|
|||
const Integer& v() const { return (m_v); }
|
||||
const Integer& w() const { return (m_w); }
|
||||
|
||||
/*! Obtain the arc's source.
|
||||
/*! obtains the arc's source.
|
||||
* \return The source point.
|
||||
* \pre The arc does not represent a full conic curve.
|
||||
*/
|
||||
|
|
@ -1541,14 +1541,14 @@ public:
|
|||
return m_source;
|
||||
}
|
||||
|
||||
/*! Obtain the non const reference to the curve source point.
|
||||
/*! obtains the non const reference to the curve source point.
|
||||
*/
|
||||
Point_2& source() {
|
||||
CGAL_precondition(! is_full_conic());
|
||||
return (this->m_source);
|
||||
}
|
||||
|
||||
/*! Obtain the arc's target.
|
||||
/*! obtains the arc's target.
|
||||
* \return The target point.
|
||||
* \pre The arc does not represent a full conic curve.
|
||||
*/
|
||||
|
|
@ -1557,19 +1557,19 @@ public:
|
|||
return m_target;
|
||||
}
|
||||
|
||||
/*! Obtain the non const reference to the curve source point.
|
||||
/*! obtains the non const reference to the curve source point.
|
||||
*/
|
||||
Point_2& target() {
|
||||
CGAL_precondition(! is_full_conic());
|
||||
return this->m_target;
|
||||
}
|
||||
|
||||
/*! Obtain the orientation of the arc.
|
||||
/*! obtains the orientation of the arc.
|
||||
* \return The orientation.
|
||||
*/
|
||||
Orientation orientation() const { return m_orient; }
|
||||
|
||||
/*! Obtain the extra data.
|
||||
/*! obtains the extra data.
|
||||
*/
|
||||
const Extra_data* extra_data() const { return m_extra_data; }
|
||||
//@}
|
||||
|
|
@ -1603,17 +1603,17 @@ public:
|
|||
// only friends have the privilege to use.
|
||||
//@{
|
||||
|
||||
/*! Set the source point of the conic arc.
|
||||
/*! sets the source point of the conic arc.
|
||||
* \param ps The new source point.
|
||||
*/
|
||||
void set_source(const Point_2& ps) { m_source = ps; }
|
||||
|
||||
/*! Set the target point of the conic arc.
|
||||
/*! sets the target point of the conic arc.
|
||||
* \param pt The new source point.
|
||||
*/
|
||||
void set_target(const Point_2& pt) { m_target = pt; }
|
||||
|
||||
/*! Set the coefficients.
|
||||
/*! sets the coefficients.
|
||||
*/
|
||||
void set_coefficients(Integer r, Integer s, Integer t,
|
||||
Integer u, Integer v, Integer w) {
|
||||
|
|
@ -1625,22 +1625,22 @@ public:
|
|||
m_w = w;
|
||||
}
|
||||
|
||||
/*! Set the orientation.
|
||||
/*! sets the orientation.
|
||||
*/
|
||||
void set_orientation(Orientation orient) { m_orient = orient; }
|
||||
|
||||
/*! Set the endpoints.
|
||||
/*! sets the endpoints.
|
||||
*/
|
||||
void set_endpoints(const Point_2& source, const Point_2& target) {
|
||||
m_source = source;
|
||||
m_target = target;
|
||||
}
|
||||
|
||||
/*! Set the extra data field.
|
||||
/*! sets the extra data field.
|
||||
*/
|
||||
void set_extra_data(Extra_data* extra_data) { m_extra_data = extra_data; }
|
||||
|
||||
/*! Set the extra data field.
|
||||
/*! sets the extra data field.
|
||||
*/
|
||||
void set_extra_data(const Algebraic& a, const Algebraic& b,
|
||||
const Algebraic& c, Sign side)
|
||||
|
|
@ -1652,7 +1652,7 @@ public:
|
|||
m_extra_data->side = side;
|
||||
}
|
||||
|
||||
/*! Update the extra data field.
|
||||
/*! updates the extra data field.
|
||||
*/
|
||||
void update_extra_data() {
|
||||
const Algebraic x1 = source().x();
|
||||
|
|
@ -1675,7 +1675,7 @@ public:
|
|||
/// \name Auxiliary functions.
|
||||
//@{
|
||||
|
||||
/*! Evaluate the sign of (a*x + b*y + c) stored with the extra data field
|
||||
/*! evaluates the sign of (a*x + b*y + c) stored with the extra data field
|
||||
* at a given point.
|
||||
* \param px The x-coordinate of query point.
|
||||
* \param py The y-coordinate of query point.
|
||||
|
|
@ -1691,7 +1691,7 @@ public:
|
|||
//@}
|
||||
};
|
||||
|
||||
/*! Exporter for conic arcs.
|
||||
/*! exports a conic arc.
|
||||
*/
|
||||
template <typename Rat_kernel, typename Alg_kernel, typename Nt_traits>
|
||||
std::ostream&
|
||||
|
|
@ -1721,6 +1721,6 @@ operator<< (std::ostream& os,
|
|||
return os;
|
||||
}
|
||||
|
||||
} //namespace CGAL
|
||||
} // namespace CGAL
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue