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>
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -1,31 +1,26 @@
|
|||
|
||||
namespace CGAL {
|
||||
|
||||
/*!
|
||||
\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}
|
||||
|
||||
|
||||
/*! \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}
|
||||
*/
|
||||
|
||||
template <typename Coefficient>
|
||||
class Arr_algebraic_segment_traits_2 {
|
||||
public:
|
||||
|
|
@ -65,24 +60,20 @@ typedef unspecified_type Bound;
|
|||
/// @{
|
||||
|
||||
/*!
|
||||
|
||||
*/
|
||||
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:
|
||||
|
|
@ -90,12 +81,12 @@ public:
|
|||
/// \name Object Creation Functors
|
||||
/// @{
|
||||
|
||||
/*! Returns a `Curve_2` object that represents the curve defined by the
|
||||
/*! 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
|
||||
/*! 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
|
||||
|
|
@ -108,7 +99,6 @@ Curve_2 operator() (std::string s);
|
|||
}; /* end Arr_algebraic_segment_traits_2::Construct_curve_2 */
|
||||
|
||||
/*!
|
||||
|
||||
*/
|
||||
class Construct_point_2 {
|
||||
public:
|
||||
|
|
@ -116,7 +106,7 @@ public:
|
|||
/// \name Object Creation Functors
|
||||
/// @{
|
||||
|
||||
/*! Returns a `Point_2` object that represents the `arcno`-th
|
||||
/*! 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`,
|
||||
|
|
@ -125,25 +115,25 @@ public:
|
|||
*/
|
||||
Point_2 operator() (Algebraic_real_1 x, Curve_2 cv, int arcno);
|
||||
|
||||
/*! Returns a `Point_2` object that represents the
|
||||
/*! 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)
|
||||
/*! 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)
|
||||
/*! 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)
|
||||
/*! 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)
|
||||
/*! returns a `Point_2` object that represents (x,y)
|
||||
*/
|
||||
Point_2 operator() (int x, int y);
|
||||
|
||||
|
|
@ -152,7 +142,6 @@ Point_2 operator() (int x, int y);
|
|||
}; /* end Arr_algebraic_segment_traits_2::Construct_point_2 */
|
||||
|
||||
/*!
|
||||
|
||||
*/
|
||||
class Construct_x_monotone_segment_2 {
|
||||
public:
|
||||
|
|
@ -220,7 +209,7 @@ 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.
|
||||
/*! 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
|
||||
|
|
@ -240,7 +229,7 @@ Polynomial_2 polynomial () const;
|
|||
|
||||
}; /* end Arr_algebraic_segment_traits_2::Curve_2 */
|
||||
|
||||
/*! Models the `ArrangementBasicTraits_2::Point_2` concept.
|
||||
/*! 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.
|
||||
|
|
@ -296,7 +285,7 @@ std::pair<double,double> to_double () const;
|
|||
|
||||
}; /* end Arr_algebraic_segment_traits_2::Point_2 */
|
||||
|
||||
/*! Models the `ArrangementBasicTraits_2::X_monotone_curve_2` concept.
|
||||
/*! 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
|
||||
|
|
@ -341,9 +330,8 @@ Point_2 curve_end (CGAL::Arr_curve_end ce) const;
|
|||
*/
|
||||
int arcno () const;
|
||||
|
||||
/*!
|
||||
returns the \f$ x\f$-coordinate of a vertical segment.
|
||||
\pre (The segment is vertical)
|
||||
/*! returns the \f$ x\f$-coordinate of a vertical segment.
|
||||
* \pre (The segment is vertical)
|
||||
*/
|
||||
Algebraic_real_1 x () const;
|
||||
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
||||
/// @}
|
||||
|
|
|
|||
|
|
@ -189,7 +189,7 @@ public:
|
|||
/// \name Creation
|
||||
/// @{
|
||||
|
||||
/*! default constructor.
|
||||
/*! constructs default
|
||||
*/
|
||||
Point_2();
|
||||
|
||||
|
|
@ -323,7 +323,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
|
||||
*/
|
||||
|
||||
|
|
|
|||
|
|
@ -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,28 +1,26 @@
|
|||
|
||||
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}
|
||||
|
||||
/*! \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
|
||||
|
|
@ -35,44 +33,29 @@ public:
|
|||
/// \name Types
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
the base traits-class.
|
||||
*/
|
||||
//! the base traits-class.
|
||||
typedef Traits Base_traits_2;
|
||||
|
||||
/*!
|
||||
the base curve.
|
||||
*/
|
||||
//! the base curve.
|
||||
typedef typename Base_traits_2::Curve_2 Base_curve_2;
|
||||
|
||||
/*!
|
||||
the base \f$ x\f$-monotone curve curve.
|
||||
*/
|
||||
//! 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.
|
||||
*/
|
||||
//! 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.
|
||||
*/
|
||||
//! 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.
|
||||
|
||||
/*! 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:
|
||||
|
|
@ -80,14 +63,10 @@ public:
|
|||
/// \name Creation
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
default constructor.
|
||||
*/
|
||||
/*! constructs default */
|
||||
Data_container();
|
||||
|
||||
/*!
|
||||
constructs set containing a single `data` object.
|
||||
*/
|
||||
/*! constructs set containing a single `data` object. */
|
||||
Data_container(const Data& data);
|
||||
|
||||
/// @}
|
||||
|
|
@ -95,30 +74,22 @@ Data_container (const Data& data);
|
|||
/// \name Access Functions
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
returns the number of data objects in the set.
|
||||
*/
|
||||
/*! returns the number of data objects in the set. */
|
||||
std::size_t size() const;
|
||||
|
||||
/*!
|
||||
returns an iterator pointing to the first data object.
|
||||
*/
|
||||
/*! returns an iterator pointing to the first data object. */
|
||||
Data_iterator begin() const;
|
||||
|
||||
/*!
|
||||
returns a past-the-end iterator for the data objects.
|
||||
*/
|
||||
/*! returns a past-the-end iterator for the data objects. */
|
||||
Data_iterator end() const;
|
||||
|
||||
/*!
|
||||
returns the first data object inserted into the set.
|
||||
\pre The number of data objects is not \f$ 0\f$.
|
||||
/*! 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 last data object inserted into the set.
|
||||
\pre The number of data objects is not \f$ 0\f$.
|
||||
/*! returns the last data object inserted into the set.
|
||||
* \pre The number of data objects is not \f$ 0\f$.
|
||||
*/
|
||||
const Data& back() const;
|
||||
|
||||
|
|
@ -127,14 +98,13 @@ const Data& back () const;
|
|||
/// \name Predicates
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
check if the two sets contain the same data objects (regardless of order).
|
||||
/*! checks whether the two sets contain the same data objects (regardless of
|
||||
* order).
|
||||
*/
|
||||
bool operator==(const Data_container& other) const;
|
||||
|
||||
/*!
|
||||
find the given `data` object in the set and returns an iterator
|
||||
for this object, or `end()` if it is not found.
|
||||
/*! 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);
|
||||
|
||||
|
|
@ -143,28 +113,23 @@ Data_iterator find (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.
|
||||
/*! 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.
|
||||
/*! 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.
|
||||
*/
|
||||
/*! 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
|
||||
|
|
@ -142,8 +141,7 @@ public:
|
|||
/// \name Creation
|
||||
/// @{
|
||||
|
||||
/*! default constructor.
|
||||
*/
|
||||
/*! constructs default */
|
||||
X_monotone_curve_2();
|
||||
|
||||
/*! constructs an \f$ x\f$-monotone curve from the given `base` curve with
|
||||
|
|
@ -176,4 +174,5 @@ public:
|
|||
}; /* 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;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
@ -857,4 +838,5 @@ public:
|
|||
} // 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.
|
||||
|
|
@ -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,8 +917,7 @@ 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(); }
|
||||
//@}
|
||||
|
|
|
|||
|
|
@ -37,7 +37,6 @@ 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,10 +611,6 @@ public:
|
|||
return Construct_curve_2(&CKvA_2::instance());
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
|
||||
// additional functionality (for not introducing a "general" arc)
|
||||
|
|
@ -658,4 +652,4 @@ public:
|
|||
|
||||
#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.
|
||||
|
|
@ -403,18 +403,18 @@ public:
|
|||
}
|
||||
|
||||
//! 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.
|
||||
/*! 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,7 +881,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
/*! Obtain a Trim_2 functor object. */
|
||||
/*! obtains a `Trim_2` functor object. */
|
||||
Trim_2 trim_2_object() const { return Trim_2(*this); }
|
||||
|
||||
// @}
|
||||
|
|
|
|||
|
|
@ -206,4 +206,4 @@ public:
|
|||
|
||||
#include <CGAL/enable_warnings.h>
|
||||
|
||||
#endif // CGAL_CIRCULAR_KERNEL_CIRCULAR_ARC_TRAITS_H
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -381,7 +381,6 @@ namespace CGAL {
|
|||
Circular_arc_point_2;
|
||||
|
||||
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.
|
||||
*/
|
||||
|
|
@ -520,7 +518,6 @@ 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(); }
|
||||
|
||||
|
|
@ -553,12 +550,10 @@ namespace CGAL {
|
|||
|
||||
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);
|
||||
|
|
|
|||
|
|
@ -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,10 +227,10 @@ public:
|
|||
Vertex_other, Halfedge_other, Face_base>;
|
||||
};
|
||||
|
||||
/*! Default constructor. */
|
||||
/*! constructs default. */
|
||||
Arr_extended_dcel() {}
|
||||
|
||||
/*! Destructor. */
|
||||
/*! destructs. */
|
||||
virtual ~Arr_extended_dcel() {}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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 ()
|
||||
{}
|
||||
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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()));
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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&
|
||||
|
|
|
|||
|
|
@ -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&
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ public:
|
|||
/// \name Deprecated Constructions.
|
||||
//@{
|
||||
|
||||
// /*! Construct an x-monotone arc from a conic arc.
|
||||
// /*! constructs an x-monotone arc from a conic arc.
|
||||
// * \param arc The given (base) arc.
|
||||
// * \param id The ID of the base arc.
|
||||
// */
|
||||
|
|
@ -100,7 +100,7 @@ public:
|
|||
// _set();
|
||||
// }
|
||||
|
||||
/*! Construct an x-monotone sub-arc from a conic arc.
|
||||
/*! constructs an x-monotone sub-arc from a conic arc.
|
||||
* \param arc The given (base) arc.
|
||||
* \param source The source point.
|
||||
* \param target The target point.
|
||||
|
|
@ -118,7 +118,7 @@ public:
|
|||
_set();
|
||||
}
|
||||
|
||||
/*! Construct a special segment connecting to given endpoints (for the usage
|
||||
/*! constructs a special segment connecting to given endpoints (for the usage
|
||||
* of the landmarks point-location strategy).
|
||||
* \param source The source point.
|
||||
* \param target The target point.
|
||||
|
|
@ -141,7 +141,7 @@ public:
|
|||
set_flag(IS_SPECIAL_SEGMENT);
|
||||
}
|
||||
|
||||
/*! Construct 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 (ax + by + c = 0).
|
||||
* \param source The source point.
|
||||
|
|
@ -200,7 +200,7 @@ public:
|
|||
//@}
|
||||
|
||||
private:
|
||||
/*! Set the properties of the x-monotone conic arc (for the usage of the
|
||||
/*! sets the properties of the x-monotone conic arc (for the usage of the
|
||||
* constructors).
|
||||
*/
|
||||
CGAL_DEPRECATED void _set() {
|
||||
|
|
@ -304,11 +304,11 @@ public:
|
|||
/// \name Public constructors, assignment operators, and destructors.
|
||||
//@{
|
||||
|
||||
/*! Default constructor.
|
||||
/*! constructs default.
|
||||
*/
|
||||
Conic_x_monotone_arc_2() : Base(), m_id() {}
|
||||
|
||||
/*! Copy constructor.
|
||||
/*! constructs copy.
|
||||
* \param arc The copied arc.
|
||||
*/
|
||||
Conic_x_monotone_arc_2(const Self& arc) :
|
||||
|
|
@ -322,7 +322,7 @@ public:
|
|||
m_id(arc.m_id)
|
||||
{}
|
||||
|
||||
/*! Assignment operator.
|
||||
/*! assigns.
|
||||
* \param arc The copied arc.
|
||||
*/
|
||||
const Self& operator=(const Self& arc) {
|
||||
|
|
@ -353,13 +353,13 @@ private:
|
|||
/// \name private constructors to be used only by the traits class template.
|
||||
//@{
|
||||
|
||||
/*! Construct an x-monotone arc from a conic arc.
|
||||
/*! constructs an x-monotone arc from a conic arc.
|
||||
* \param arc The given (base) arc.
|
||||
* \pre The given arc is x-monotone.
|
||||
*/
|
||||
Conic_x_monotone_arc_2(const Base& arc) : Base(arc), m_id() {}
|
||||
|
||||
/*! Construct an x-monotone arc from a conic arc.
|
||||
/*! constructs an x-monotone arc from a conic arc.
|
||||
* \param arc The given (base) arc.
|
||||
* \param id The ID of the base arc.
|
||||
*/
|
||||
|
|
@ -373,15 +373,15 @@ public:
|
|||
/// \name Accessing the arc properties.
|
||||
//@{
|
||||
|
||||
/*! Obtain the facing mask.
|
||||
/*! obtains the facing mask.
|
||||
*/
|
||||
size_t facing_mask() const { return this->m_info & FACING_MASK; }
|
||||
|
||||
/*! Obtain the degree mask.
|
||||
/*! obtains the degree mask.
|
||||
*/
|
||||
size_t degree_mask() const { return this->m_info & DEGREE_MASK; }
|
||||
|
||||
/*! Obtain the coefficients of the underlying conic.
|
||||
/*! obtains the coefficients of the underlying conic.
|
||||
*/
|
||||
const Integer& r() const { return ( this->m_r); }
|
||||
const Integer& s() const { return ( this->m_s); }
|
||||
|
|
@ -390,50 +390,50 @@ public:
|
|||
const Integer& v() const { return ( this->m_v); }
|
||||
const Integer& w() const { return ( this->m_w); }
|
||||
|
||||
/*! Obtain the left endpoint of the arc.
|
||||
/*! obtains the left endpoint of the arc.
|
||||
*/
|
||||
const Point_2& left() const {
|
||||
if (this->test_flag(IS_DIRECTED_RIGHT)) return this->source();
|
||||
else return this->target();
|
||||
}
|
||||
|
||||
/*! Obtain the right endpoint of the arc.
|
||||
/*! obtains the right endpoint of the arc.
|
||||
*/
|
||||
const Point_2& right() const {
|
||||
if (this->test_flag(IS_DIRECTED_RIGHT)) return this->target();
|
||||
else return this->source();
|
||||
}
|
||||
|
||||
/*! Determine whether the conic arc is directed iexicographically right.
|
||||
/*! determines whether the conic arc is directed iexicographically right.
|
||||
*/
|
||||
bool is_directed_right() const { return this->test_flag(IS_DIRECTED_RIGHT); }
|
||||
|
||||
/*! Determine whether the conic arc is a vertical segment.
|
||||
/*! determines whether the conic arc is a vertical segment.
|
||||
*/
|
||||
bool is_vertical() const { return this->test_flag(IS_VERTICAL_SEGMENT); }
|
||||
|
||||
/*! Determine whether the conic arc is a facing up.
|
||||
/*! determines whether the conic arc is a facing up.
|
||||
*/
|
||||
bool is_upper() const { return this->test_flag(FACING_UP); }
|
||||
|
||||
/*! Determine whether the conic arc is a facing down.
|
||||
/*! determines whether the conic arc is a facing down.
|
||||
*/
|
||||
bool is_lower() const { return this->test_flag(FACING_DOWN); }
|
||||
|
||||
/*! Check whether the arc is a special segment connecting two algebraic
|
||||
/*! checks whether the arc is a special segment connecting two algebraic
|
||||
* endpoints (and has no underlying integer conic coefficients).
|
||||
*/
|
||||
bool is_special_segment() const { return this->test_flag(IS_SPECIAL_SEGMENT); }
|
||||
|
||||
/*! Obtain the mask of the DEGREE_1 flag.
|
||||
/*! obtains the mask of the DEGREE_1 flag.
|
||||
*/
|
||||
static constexpr size_t degree_1_mask() { return flag_mask(DEGREE_1); }
|
||||
|
||||
/*! Obtain the mask of the DEGREE_1 flag.
|
||||
/*! obtains the mask of the DEGREE_1 flag.
|
||||
*/
|
||||
static constexpr size_t degree_2_mask() { return flag_mask(DEGREE_2); }
|
||||
|
||||
/*! Obtain the algebraic coefficients.
|
||||
/*! obtains the algebraic coefficients.
|
||||
*/
|
||||
Algebraic alg_r() const { return m_alg_r; }
|
||||
Algebraic alg_s() const { return m_alg_s; }
|
||||
|
|
@ -442,11 +442,11 @@ public:
|
|||
Algebraic alg_v() const { return m_alg_v; }
|
||||
Algebraic alg_w() const { return m_alg_w; }
|
||||
|
||||
/*! Obtain the conic id.
|
||||
/*! obtains the conic id.
|
||||
*/
|
||||
Conic_id id() const { return m_id; }
|
||||
|
||||
/*! Check whether the given point lies on the arc.
|
||||
/*! checks whether the given point lies on the arc.
|
||||
* \param p The query point.
|
||||
* \param (true) if p lies on the arc; (false) otherwise.
|
||||
*/
|
||||
|
|
@ -474,7 +474,7 @@ public:
|
|||
return _is_between_endpoints(p);
|
||||
}
|
||||
|
||||
/*! Obtain 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 { return Base::bbox(); }
|
||||
|
|
@ -483,7 +483,7 @@ public:
|
|||
// Setters
|
||||
//@{
|
||||
|
||||
/*! Set the algebraic coefficients.
|
||||
/*! sets the algebraic coefficients.
|
||||
*/
|
||||
void set_alg_coefficients(const Algebraic& alg_r, const Algebraic& alg_s,
|
||||
const Algebraic& alg_t, const Algebraic& alg_u,
|
||||
|
|
@ -497,7 +497,7 @@ public:
|
|||
m_alg_w = alg_w;
|
||||
}
|
||||
|
||||
/*! Add a generating conic ID.
|
||||
/*! adds a generating conic ID.
|
||||
*/
|
||||
void set_generating_conic(const Conic_id& id) {
|
||||
this->m_source.set_generating_conic(id);
|
||||
|
|
@ -505,7 +505,7 @@ public:
|
|||
}
|
||||
//@}
|
||||
|
||||
/*! Compute a point on an arc with the same \f$x\f$-coordiante as the given
|
||||
/*! computes a point on an arc with the same \f$x\f$-coordiante as the given
|
||||
* point.
|
||||
* \param p The given point.
|
||||
* \pre The arc is not vertical and `p` is in the \f$x\f$-range of the arc.
|
||||
|
|
@ -590,7 +590,7 @@ public:
|
|||
/// \name Constructing points on the arc.
|
||||
//@{
|
||||
|
||||
/*! Obtain a polyline approximating the conic arc.
|
||||
/*! obtains a polyline approximating the conic arc.
|
||||
* \param n The maximal number of sample points.
|
||||
* \param oi An output iterator, whose value-type is pair<double,double>
|
||||
* (representing an approximated point).
|
||||
|
|
@ -659,7 +659,7 @@ public:
|
|||
/// \name Constructing x-monotone arcs.
|
||||
//@{
|
||||
|
||||
/*! Flip the arc.
|
||||
/*! flips the arc.
|
||||
* \return An arc with swapped source and target and a reverse orientation.
|
||||
*/
|
||||
Self flip() const {
|
||||
|
|
@ -680,7 +680,7 @@ public:
|
|||
return arc;
|
||||
}
|
||||
|
||||
/*! 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.
|
||||
|
|
@ -730,7 +730,7 @@ public:
|
|||
|
||||
//@}
|
||||
|
||||
/*! Compare two arcs immediately to the leftt of their intersection point.
|
||||
/*! compares two arcs immediately to the leftt of their intersection point.
|
||||
* \param xcv1 The first compared arc.
|
||||
* \param xcv2 The second compared arc.
|
||||
* \param p The reference intersection point.
|
||||
|
|
@ -855,7 +855,7 @@ public:
|
|||
return slope_res;
|
||||
}
|
||||
|
||||
/*! Compare two arcs immediately to the right of their intersection point.
|
||||
/*! compares two arcs immediately to the right of their intersection point.
|
||||
* \param xcv1 The first compared arc.
|
||||
* \param xcv2 The second compared arc.
|
||||
* \param p The reference intersection point.
|
||||
|
|
@ -972,7 +972,7 @@ public:
|
|||
return slope_res; // both are facing down
|
||||
}
|
||||
|
||||
/*! Check whether two arcs are equal (have the same graph).
|
||||
/*! checks whether two arcs are equal (have the same graph).
|
||||
* \param xcv1 The first compared arc.
|
||||
* \param xcv2 The second compared arc.
|
||||
* \return `true` if the two arcs have the same graph; `false` otherwise.
|
||||
|
|
@ -1007,7 +1007,7 @@ public:
|
|||
eq(xcv1.target(), xcv2.source()));
|
||||
}
|
||||
|
||||
/*! Check whether it is possible to merge the arc with the given arc.
|
||||
/*! checks whether it is possible to merge the arc with the given arc.
|
||||
* \param xcv1 The first arc.
|
||||
* \param xcv2 The second arc.
|
||||
* \return `true` if it is possible to merge the two arcs;
|
||||
|
|
@ -1028,7 +1028,7 @@ public:
|
|||
return (eq(xcv1.right(), xcv2.left()) || eq(xcv1.left(), xcv2.right()));
|
||||
}
|
||||
|
||||
/*! Merge the current arc with the given arc.
|
||||
/*! merges the current arc with the given arc.
|
||||
* \param xcv1 The first arc to merge with.
|
||||
* \param xcv2 The second arc to merge with.
|
||||
* \pre The two arcs are mergeable.
|
||||
|
|
@ -1060,7 +1060,7 @@ private:
|
|||
/// \name Auxiliary (private) functions.
|
||||
//@{
|
||||
|
||||
/*! 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 px The x-coordinate of query point.
|
||||
* \param py The y-coordinate of query point.
|
||||
* \return (true) if p lies on the supporting conic; (false) otherwise.
|
||||
|
|
@ -1078,7 +1078,7 @@ private:
|
|||
}
|
||||
|
||||
public:
|
||||
/*! Obtain the i'th order derivative by x of the conic at the point p=(x,y).
|
||||
/*! obtains the i'th order derivative by x of the conic at the point p=(x,y).
|
||||
* \param p The point where we derive.
|
||||
* \param i The order of the derivatives (either 1, 2 or 3).
|
||||
* \param slope_numer The numerator of the slope.
|
||||
|
|
@ -1187,7 +1187,7 @@ public:
|
|||
CGAL_error();
|
||||
}
|
||||
|
||||
/*! Obtain the i'th order derivative by y of the conic at the point p=(x,y).
|
||||
/*! obtains the i'th order derivative by y of the conic at the point p=(x,y).
|
||||
* \param p The point where we derive.
|
||||
* \param i The order of the derivatives (either 1, 2 or 3).
|
||||
* \param slope_numer The numerator of the slope.
|
||||
|
|
@ -1297,7 +1297,7 @@ public:
|
|||
}
|
||||
|
||||
private:
|
||||
/*! Compute the multiplicity of an intersection point.
|
||||
/*! computes the multiplicity of an intersection point.
|
||||
* \param arc The arc to intersect with.
|
||||
* \param p The intersection point.
|
||||
* \return The multiplicity of the intersection point.
|
||||
|
|
@ -1348,7 +1348,7 @@ private:
|
|||
|
||||
};
|
||||
|
||||
/*! Exporter for x-monotone conic arcs.
|
||||
/*! exports an x-monotone conic arc.
|
||||
*/
|
||||
template <typename Conic_arc_2>
|
||||
std::ostream& operator<<(std::ostream& os,
|
||||
|
|
|
|||
|
|
@ -42,19 +42,19 @@ private:
|
|||
|
||||
public:
|
||||
|
||||
/*! Default constructor. */
|
||||
/*! constructs default. */
|
||||
_Unique_list () :
|
||||
m_list()
|
||||
{}
|
||||
|
||||
/*! Construct a singleton list. */
|
||||
/*! constructs a singleton list. */
|
||||
_Unique_list (const Data& data) :
|
||||
m_list ()
|
||||
{
|
||||
m_list.push_back (data);
|
||||
}
|
||||
|
||||
/*! Go over the data objects in list. */
|
||||
/*! traverses the data objects in list. */
|
||||
const_iterator begin () const
|
||||
{
|
||||
return (m_list.begin());
|
||||
|
|
@ -65,13 +65,13 @@ public:
|
|||
return (m_list.end());
|
||||
}
|
||||
|
||||
/*! Get the list size. */
|
||||
/*! obtains the list size. */
|
||||
std::size_t size () const
|
||||
{
|
||||
return (m_list.size());
|
||||
}
|
||||
|
||||
/*! Get the first (or last) data object. */
|
||||
/*! obtains the first (or last) data object. */
|
||||
const Data& front () const
|
||||
{
|
||||
return (m_list.front());
|
||||
|
|
@ -105,8 +105,7 @@ public:
|
|||
return (true);
|
||||
}
|
||||
|
||||
/*!
|
||||
* Find the given data object is contained in the list.
|
||||
/*! finds the given data object is contained in the list.
|
||||
* \param data The data object.
|
||||
* \return An iterator for the data object, or end() if it is not found.
|
||||
*/
|
||||
|
|
@ -123,8 +122,7 @@ public:
|
|||
return (iter);
|
||||
}
|
||||
|
||||
/*!
|
||||
* Insert an object into the list.
|
||||
/*! inserts an object into the list.
|
||||
* \param data The data object.
|
||||
* \return (true) if the data object has been successfully inserted;
|
||||
* (false) otherwise (if it already exists).
|
||||
|
|
@ -138,8 +136,7 @@ public:
|
|||
return (true);
|
||||
}
|
||||
|
||||
/*!
|
||||
* Erase an object from the list.
|
||||
/*! erases an object from the list.
|
||||
* \param data The data object.
|
||||
* \return (true) if the data object has been successfully erased;
|
||||
* (false) otherwise (if it is not in the list).
|
||||
|
|
@ -163,7 +160,7 @@ public:
|
|||
return (false);
|
||||
}
|
||||
|
||||
/*! Clear the list. */
|
||||
/*! clears the list. */
|
||||
void clear ()
|
||||
{
|
||||
m_list.clear();
|
||||
|
|
|
|||
|
|
@ -53,10 +53,10 @@ public:
|
|||
typedef typename Subcurves_container::size_type Size;
|
||||
typedef typename Subcurves_container::size_type size_type;
|
||||
|
||||
/*! Construct default. */
|
||||
/*! constructs default. */
|
||||
Polycurve_2() : m_subcurves() {}
|
||||
|
||||
/*! Construct from a subcurve. */
|
||||
/*! constructs from a subcurve. */
|
||||
Polycurve_2(const Subcurve_type_2& seg) : m_subcurves()
|
||||
{ m_subcurves.push_back(seg); }
|
||||
|
||||
|
|
@ -70,7 +70,7 @@ public:
|
|||
* this class.
|
||||
*/
|
||||
|
||||
/*! Construct from a range. The range can be either:
|
||||
/*! constructs from a range. The range can be either:
|
||||
*
|
||||
* For the sake of backwards compatibility we have to keep the possibility
|
||||
* of construction from a range of points. Therefore, we have to test the
|
||||
|
|
@ -100,7 +100,7 @@ public:
|
|||
construct_polycurve(begin, end, Is_point());
|
||||
}
|
||||
|
||||
/*! Construct a polycurve from a range of subcurves.
|
||||
/*! constructs a polycurve from a range of subcurves.
|
||||
* \param begin An iterator pointing to the first subcurve in the range.
|
||||
* \param end An iterator pointing after the past-the-end subcurve
|
||||
* in the range.
|
||||
|
|
@ -111,7 +111,7 @@ public:
|
|||
std::false_type)
|
||||
{ m_subcurves.assign(begin, end); }
|
||||
|
||||
/*! Construct a polycurve from a range of points.
|
||||
/*! constructs a polycurve from a range of points.
|
||||
* \param begin An iterator pointing to the first point in the range.
|
||||
* \param end An iterator pointing after the last point in the range.
|
||||
* \pre There are at least 2 points in the range.
|
||||
|
|
@ -150,7 +150,7 @@ public:
|
|||
* becomes friendly...)
|
||||
*/
|
||||
|
||||
/*! Append a subcurve to the (x-monotone) polycurve.
|
||||
/*! appends a subcurve to the (x-monotone) polycurve.
|
||||
* Warning: This is a risky function! Don't use it! Prefer the
|
||||
* provided implementation in the traits class.
|
||||
* \param seg The new subcurve to be appended to the polycurve.
|
||||
|
|
@ -160,7 +160,7 @@ public:
|
|||
inline void push_back(const Subcurve_type_2& seg)
|
||||
{ this->m_subcurves.push_back(seg); }
|
||||
|
||||
/*! Append a subcurve to the (x-monotone) polycurve.
|
||||
/*! appends a subcurve to the (x-monotone) polycurve.
|
||||
* Warning: This is a risky function! Don't use it! Prefer the
|
||||
* provided implementation in the traits class.
|
||||
* \param seg The new subcurve to be appended to the polycurve.
|
||||
|
|
@ -170,7 +170,7 @@ public:
|
|||
inline void push_front(const Subcurve_type_2& seg)
|
||||
{ this->m_subcurves.insert(this->m_subcurves.begin(), seg); }
|
||||
|
||||
/*! Append a point to the polycurve.
|
||||
/*! appends a point to the polycurve.
|
||||
* To properly implemented this function the traits class is needed,
|
||||
* thus it is deprecated.
|
||||
*/
|
||||
|
|
@ -182,7 +182,7 @@ public:
|
|||
m_subcurves.push_back(Subcurve_type_2(ps, pt));
|
||||
}
|
||||
|
||||
/*! Compute the bounding box of the polycurve.
|
||||
/*! computes the bounding box of the polycurve.
|
||||
* \return The bounding-box.
|
||||
*/
|
||||
Bbox_2 bbox() const
|
||||
|
|
@ -235,14 +235,14 @@ public:
|
|||
{ return m_index != std::numeric_limits<size_type>::max BOOST_PREVENT_MACRO_SUBSTITUTION (); }
|
||||
|
||||
public:
|
||||
/*! Default constructor. */
|
||||
/*! constructs default. */
|
||||
Point_const_iterator() :
|
||||
m_cvP(nullptr),
|
||||
m_num_pts(0),
|
||||
m_index(std::numeric_limits<size_type>::max BOOST_PREVENT_MACRO_SUBSTITUTION ())
|
||||
{}
|
||||
|
||||
/*! Dereference operator.
|
||||
/*! dereferences.
|
||||
* \return The current point.
|
||||
*/
|
||||
const Point_type_2& operator*() const
|
||||
|
|
@ -275,7 +275,7 @@ public:
|
|||
return temp;
|
||||
}
|
||||
|
||||
/*! Decrement operators. */
|
||||
/*! decrements. */
|
||||
Point_const_iterator& operator--()
|
||||
{
|
||||
if ((m_cvP != nullptr) && (is_index_valid())) --m_index;
|
||||
|
|
@ -303,39 +303,39 @@ public:
|
|||
typedef Point_const_iterator const_iterator;
|
||||
typedef Point_const_reverse_iterator const_reverse_iterator;
|
||||
|
||||
/*! Obtain an iterator for the polycurve points.*/
|
||||
/*! obtains an iterator for the polycurve points.*/
|
||||
Point_const_iterator points_begin() const
|
||||
{
|
||||
if (number_of_subcurves() == 0) return (Point_const_iterator());
|
||||
else return (Point_const_iterator(this, 0));
|
||||
}
|
||||
|
||||
/*! Obtain an iterator for the polycurve points.*/
|
||||
/*! obtains an iterator for the polycurve points.*/
|
||||
CGAL_DEPRECATED Point_const_iterator begin() const { return points_begin(); }
|
||||
|
||||
/*! Obtain a past-the-end iterator for the polycurve points.*/
|
||||
/*! obtains a past-the-end iterator for the polycurve points.*/
|
||||
Point_const_iterator points_end() const
|
||||
{
|
||||
if (number_of_subcurves() == 0) return (Point_const_iterator());
|
||||
else return (Point_const_iterator(this, number_of_subcurves() + 1));
|
||||
}
|
||||
|
||||
/*! Obtain a past-the-end iterator for the polycurve points.*/
|
||||
/*! obtains a past-the-end iterator for the polycurve points.*/
|
||||
CGAL_DEPRECATED Point_const_iterator end() const { return points_end(); }
|
||||
|
||||
/*! Obtain a reverse iterator for the polycurve points. */
|
||||
/*! obtains a reverse iterator for the polycurve points. */
|
||||
Point_const_reverse_iterator points_rbegin() const
|
||||
{ return Point_const_reverse_iterator(points_end()); }
|
||||
|
||||
/*! Obtain a reverse iterator for the polycurve points. */
|
||||
/*! obtains a reverse iterator for the polycurve points. */
|
||||
CGAL_DEPRECATED Point_const_reverse_iterator rbegin() const
|
||||
{ return points_rbegin(); }
|
||||
|
||||
/*! Obtain a reverse past-the-end iterator for the polycurve points. */
|
||||
/*! obtains a reverse past-the-end iterator for the polycurve points. */
|
||||
Point_const_reverse_iterator points_rend() const
|
||||
{ return Point_const_reverse_iterator(points_begin()); }
|
||||
|
||||
/*! Obtain a reverse past-the-end iterator for the polycurve points. */
|
||||
/*! obtains a reverse past-the-end iterator for the polycurve points. */
|
||||
CGAL_DEPRECATED Point_const_reverse_iterator rend() const
|
||||
{ return points_rend(); }
|
||||
|
||||
|
|
@ -345,7 +345,7 @@ public:
|
|||
typedef typename std::reverse_iterator<Subcurve_const_iterator>
|
||||
Subcurve_const_reverse_iterator;
|
||||
|
||||
/*! Obtain an iterator for the polycurve subcurves. */
|
||||
/*! obtains an iterator for the polycurve subcurves. */
|
||||
Subcurve_const_iterator subcurves_begin() const
|
||||
{ return m_subcurves.begin(); }
|
||||
|
||||
|
|
@ -353,7 +353,7 @@ public:
|
|||
CGAL_DEPRECATED Subcurve_const_iterator begin_subcurves() const
|
||||
{ return subcurves_begin(); }
|
||||
|
||||
/*! Obtain a past-the-end iterator for the polycurve subcurves. */
|
||||
/*! obtains a past-the-end iterator for the polycurve subcurves. */
|
||||
Subcurve_const_iterator subcurves_end() const
|
||||
{ return m_subcurves.end(); }
|
||||
|
||||
|
|
@ -361,11 +361,11 @@ public:
|
|||
CGAL_DEPRECATED Subcurve_const_iterator end_subcurves() const
|
||||
{ return subcurves_end(); }
|
||||
|
||||
/*! Obtain a reverse iterator for the polycurve subcurves. */
|
||||
/*! obtains a reverse iterator for the polycurve subcurves. */
|
||||
Subcurve_const_reverse_iterator subcurves_rbegin() const
|
||||
{ return (Subcurve_const_reverse_iterator(subcurves_end())); }
|
||||
|
||||
/*! Obtain a reverse past-the-end iterator for the polycurve points. */
|
||||
/*! obtains a reverse past-the-end iterator for the polycurve points. */
|
||||
Subcurve_const_reverse_iterator subcurves_rend() const
|
||||
{ return (Subcurve_const_reverse_iterator(subcurves_begin())); }
|
||||
|
||||
|
|
@ -379,7 +379,7 @@ public:
|
|||
CGAL_DEPRECATED std::size_t points() const
|
||||
{ return (number_of_subcurves() == 0) ? 0 : number_of_subcurves() + 1; }
|
||||
|
||||
/*! Obtain the number of subcurves that comprise the poyline.
|
||||
/*! obtains the number of subcurves that comprise the poyline.
|
||||
* \return The number of subcurves.
|
||||
*/
|
||||
size_type number_of_subcurves() const
|
||||
|
|
@ -388,7 +388,7 @@ public:
|
|||
/*! Deprecated! Replaced by number_of_subcurves(). */
|
||||
CGAL_DEPRECATED size_type size() const { return number_of_subcurves(); }
|
||||
|
||||
/*! Obtain the ith subcurve of the polycurve.
|
||||
/*! obtains the ith subcurve of the polycurve.
|
||||
* \param[in] i The subcurve index(from 0 to size()-1).
|
||||
* \return A const reference to the subcurve.
|
||||
*/
|
||||
|
|
@ -398,7 +398,7 @@ public:
|
|||
return (m_subcurves[i]);
|
||||
}
|
||||
|
||||
/*! Clear the polycurve. */
|
||||
/*! clears the polycurve. */
|
||||
inline void clear() { m_subcurves.clear(); }
|
||||
};
|
||||
|
||||
|
|
@ -416,13 +416,13 @@ public:
|
|||
|
||||
typedef Polycurve_2<Subcurve_type_2, Point_type_2> Base;
|
||||
|
||||
/*! Construct default. */
|
||||
/*! constructs default. */
|
||||
X_monotone_polycurve_2() : Base() {}
|
||||
|
||||
/*! Construct from a subcurve. */
|
||||
/*! constructs from a subcurve. */
|
||||
X_monotone_polycurve_2(Subcurve_type_2 seg) : Base(seg) {}
|
||||
|
||||
/*! Construct from a range.
|
||||
/*! 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
|
||||
|
|
@ -437,7 +437,7 @@ public:
|
|||
construct_x_monotone_polycurve(begin, end, Is_point());
|
||||
}
|
||||
|
||||
/*! Construct from a range of subcurves.
|
||||
/*! constructs from a range of subcurves.
|
||||
* This constructor is expected to be called only from the
|
||||
* traits class, after the input was verified there.
|
||||
* \pre The range of subcurves form an x-monotone polycurve.
|
||||
|
|
@ -447,7 +447,7 @@ public:
|
|||
std::false_type)
|
||||
{}
|
||||
|
||||
/*! Construct from a range of points, defining the endpoints of the
|
||||
/*! constructs from a range of points, defining the endpoints of the
|
||||
* polycurve subcurves.
|
||||
*/
|
||||
template <typename InputIterator>
|
||||
|
|
@ -458,6 +458,7 @@ public:
|
|||
};
|
||||
|
||||
} // namespace polycurve
|
||||
|
||||
} //namespace CGAL
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -47,33 +47,33 @@ public:
|
|||
typedef typename Base::Subcurve_const_reverse_iterator
|
||||
Segment_const_reverse_iterator;
|
||||
|
||||
/*! Construct default. */
|
||||
/*! constructs default. */
|
||||
Polyline_2() : Base() {}
|
||||
|
||||
/*! Construct from a subcurve. */
|
||||
/*! constructs from a subcurve. */
|
||||
Polyline_2(const Subcurve_type_2& subcurve) : Base(subcurve) {}
|
||||
|
||||
/*! Construct from a range. */
|
||||
/*! constructs from a range. */
|
||||
template <typename InputIterator>
|
||||
Polyline_2(InputIterator begin, InputIterator end) : Base(begin, end) {}
|
||||
|
||||
/*! Obtain an iterator for the polycurve subcurves. */
|
||||
/*! obtains an iterator for the polycurve subcurves. */
|
||||
Segment_const_iterator begin_segments() const
|
||||
{ return this->subcurves_begin(); }
|
||||
|
||||
/*! Obtain a past-the-end iterator for the polycurve subcurves. */
|
||||
/*! obtains a past-the-end iterator for the polycurve subcurves. */
|
||||
Segment_const_iterator end_segments() const
|
||||
{ return this->subcurves_end(); }
|
||||
|
||||
/*! Obtain a reverse iterator for the polycurve subcurves. */
|
||||
/*! obtains a reverse iterator for the polycurve subcurves. */
|
||||
Segment_const_reverse_iterator rbegin_segments() const
|
||||
{ return this->subcurves_rbegin(); }
|
||||
|
||||
/*! Obtain a reverse past-the-end iterator for the polycurve points. */
|
||||
/*! obtains a reverse past-the-end iterator for the polycurve points. */
|
||||
Segment_const_reverse_iterator rend_segments() const
|
||||
{ return this->subcurves_rend() ; }
|
||||
|
||||
/*! 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
|
||||
|
|
@ -96,13 +96,13 @@ public:
|
|||
typedef typename Base::Subcurve_const_reverse_iterator
|
||||
Segment_const_reverse_iterator;
|
||||
|
||||
/*! Construct default. */
|
||||
/*! constructs default. */
|
||||
X_monotone_polyline_2() : Base() {}
|
||||
|
||||
/*! Construct from a subcurve. */
|
||||
/*! constructs from a subcurve. */
|
||||
X_monotone_polyline_2(Subcurve_type_2 seg) : Base(seg) {}
|
||||
|
||||
/*! Construct from a range.
|
||||
/*! 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
|
||||
|
|
@ -113,23 +113,23 @@ public:
|
|||
Base(begin, end)
|
||||
{}
|
||||
|
||||
/*! Obtain an iterator for the polycurve subcurves. */
|
||||
/*! obtains an iterator for the polycurve subcurves. */
|
||||
Segment_const_iterator begin_segments() const
|
||||
{ return this->subcurves_begin(); }
|
||||
|
||||
/*! Obtain a past-the-end iterator for the polycurve subcurves. */
|
||||
/*! obtains a past-the-end iterator for the polycurve subcurves. */
|
||||
Segment_const_iterator end_segments() const
|
||||
{ return this->subcurves_end(); }
|
||||
|
||||
/*! Obtain a reverse iterator for the polycurve subcurves. */
|
||||
/*! obtains a reverse iterator for the polycurve subcurves. */
|
||||
Segment_const_reverse_iterator rbegin_segments() const
|
||||
{ return this->subcurves_rbegin(); }
|
||||
|
||||
/*! Obtain a reverse past-the-end iterator for the polycurve points. */
|
||||
/*! obtains a reverse past-the-end iterator for the polycurve points. */
|
||||
Segment_const_reverse_iterator rend_segments() const
|
||||
{ return this->subcurves_rend() ; }
|
||||
|
||||
/*! 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
|
||||
|
|
|
|||
|
|
@ -98,15 +98,13 @@ public:
|
|||
/// \name Construction methods.
|
||||
//@{
|
||||
|
||||
/*!
|
||||
* Default constructor.
|
||||
/*! constructs default.
|
||||
*/
|
||||
_Base_rational_arc_2 () :
|
||||
_info (0)
|
||||
{}
|
||||
|
||||
/*!
|
||||
* Constructor of a whole polynomial curve.
|
||||
/*! constructs a whole polynomial curve.
|
||||
* \param pcoeffs The rational coefficients of the polynomial p(x).
|
||||
*/
|
||||
_Base_rational_arc_2 (const Rat_vector& pcoeffs) :
|
||||
|
|
@ -178,8 +176,7 @@ public:
|
|||
_info = (_info | IS_VALID);
|
||||
}
|
||||
|
||||
/*!
|
||||
* Constructor of a polynomial ray, defined by y = p(x), for x_s <= x if the
|
||||
/*! constructs a polynomial ray, defined by y = p(x), for x_s <= x if the
|
||||
* ray is directed to the right, or for x_s >= x if it is directed to the
|
||||
* left.
|
||||
* \param pcoeffs The rational coefficients of the polynomial p(x).
|
||||
|
|
@ -266,8 +263,7 @@ public:
|
|||
_info = (_info | IS_VALID);
|
||||
}
|
||||
|
||||
/*!
|
||||
* Constructor of a polynomial arc, defined by y = p(x), x_min <= x <= x_max.
|
||||
/*! constructs a polynomial arc, defined by y = p(x), x_min <= x <= x_max.
|
||||
* \param pcoeffs The rational coefficients of the polynomial p(x).
|
||||
* \param x_s The x-coordinate of the source point.
|
||||
* \param x_t The x-coordinate of the target point.
|
||||
|
|
@ -313,8 +309,7 @@ public:
|
|||
_info = (_info | IS_VALID);
|
||||
}
|
||||
|
||||
/*!
|
||||
* Constructor of a polynomial function, defined by y = p(x)/q(x) for any x.
|
||||
/*! constructs a polynomial function, defined by y = p(x)/q(x) for any x.
|
||||
* \param pcoeffs The rational coefficients of the polynomial p(x).
|
||||
* \param qcoeffs The rational coefficients of the polynomial q(x).
|
||||
*/
|
||||
|
|
@ -368,8 +363,7 @@ public:
|
|||
(IS_CONTINUOUS | IS_VALID) : IS_VALID ) );
|
||||
}
|
||||
|
||||
/*!
|
||||
* Constructor of a ray of a rational function, defined by y = p(x)/q(x),
|
||||
/*! constructs a ray of a rational function, defined by y = p(x)/q(x),
|
||||
* for x_s <= x if the ray is directed to the right, or for x_s >= x if it
|
||||
* is directed to the left.
|
||||
* \param pcoeffs The rational coefficients of the polynomial p(x).
|
||||
|
|
@ -461,8 +455,7 @@ public:
|
|||
(IS_CONTINUOUS | IS_VALID) : IS_VALID ) );
|
||||
}
|
||||
|
||||
/*!
|
||||
* Constructor of a bounded rational arc, defined by y = p(x)/q(x),
|
||||
/*! constructs a bounded rational arc, defined by y = p(x)/q(x),
|
||||
* where: x_min <= x <= x_max.
|
||||
* \param pcoeffs The rational coefficients of the polynomial p(x).
|
||||
* \param qcoeffs The rational coefficients of the polynomial q(x).
|
||||
|
|
@ -550,19 +543,19 @@ public:
|
|||
/// \name Accessing the arc properties.
|
||||
//@{
|
||||
|
||||
/*! Get the numerator polynomial of the underlying rational function. */
|
||||
/*! obtains the numerator polynomial of the underlying rational function. */
|
||||
const Polynomial& numerator () const
|
||||
{
|
||||
return (_numer);
|
||||
}
|
||||
|
||||
/*! Get the denominator polynomial of the underlying rational function. */
|
||||
/*! obtains the denominator polynomial of the underlying rational function. */
|
||||
const Polynomial& denominator () const
|
||||
{
|
||||
return (_denom);
|
||||
}
|
||||
|
||||
/*! Check if the x-coordinate of the source point is infinite. */
|
||||
/*! checks if the x-coordinate of the source point is infinite. */
|
||||
Arr_parameter_space source_infinite_in_x () const
|
||||
{
|
||||
return
|
||||
|
|
@ -571,7 +564,7 @@ public:
|
|||
ARR_INTERIOR;
|
||||
}
|
||||
|
||||
/*! Check if the y-coordinate of the source point is infinite. */
|
||||
/*! checks if the y-coordinate of the source point is infinite. */
|
||||
Arr_parameter_space source_infinite_in_y () const
|
||||
{
|
||||
return
|
||||
|
|
@ -580,7 +573,7 @@ public:
|
|||
ARR_INTERIOR;
|
||||
}
|
||||
|
||||
/*! Check if the x-coordinate of the target point is infinite. */
|
||||
/*! checks if the x-coordinate of the target point is infinite. */
|
||||
Arr_parameter_space target_infinite_in_x () const
|
||||
{
|
||||
return
|
||||
|
|
@ -589,7 +582,7 @@ public:
|
|||
ARR_INTERIOR;
|
||||
}
|
||||
|
||||
/*! Check if the y-coordinate of the target point is infinite. */
|
||||
/*! checks if the y-coordinate of the target point is infinite. */
|
||||
Arr_parameter_space target_infinite_in_y () const
|
||||
{
|
||||
return
|
||||
|
|
@ -598,7 +591,7 @@ public:
|
|||
ARR_INTERIOR;
|
||||
}
|
||||
|
||||
/*! Get the source point. */
|
||||
/*! obtains the source point. */
|
||||
const Point_2& source () const
|
||||
{
|
||||
CGAL_precondition ((_info & IS_VALID) != 0 &&
|
||||
|
|
@ -607,7 +600,7 @@ public:
|
|||
return (_ps);
|
||||
}
|
||||
|
||||
/*! Get the x-coordinate of the source point. */
|
||||
/*! obtains the x-coordinate of the source point. */
|
||||
Algebraic source_x () const
|
||||
{
|
||||
CGAL_precondition ((_info & IS_VALID) != 0 &&
|
||||
|
|
@ -615,7 +608,7 @@ public:
|
|||
return (_ps.x());
|
||||
}
|
||||
|
||||
/*! Get the y-coordinate of the source point. */
|
||||
/*! obtains the y-coordinate of the source point. */
|
||||
Algebraic source_y () const
|
||||
{
|
||||
CGAL_precondition ((_info & IS_VALID) != 0 &&
|
||||
|
|
@ -623,7 +616,7 @@ public:
|
|||
return (_ps.y());
|
||||
}
|
||||
|
||||
/*! Get the target point. */
|
||||
/*! obtains the target point. */
|
||||
const Point_2& target () const
|
||||
{
|
||||
CGAL_precondition ((_info & IS_VALID) != 0 &&
|
||||
|
|
@ -632,7 +625,7 @@ public:
|
|||
return (_pt);
|
||||
}
|
||||
|
||||
/*! Get the x-coordinate of the target point. */
|
||||
/*! obtains the x-coordinate of the target point. */
|
||||
Algebraic target_x () const
|
||||
{
|
||||
CGAL_precondition ((_info & IS_VALID) != 0 &&
|
||||
|
|
@ -640,7 +633,7 @@ public:
|
|||
return (_pt.x());
|
||||
}
|
||||
|
||||
/*! Get the y-coordinate of the target point. */
|
||||
/*! obtains the y-coordinate of the target point. */
|
||||
Algebraic target_y () const
|
||||
{
|
||||
CGAL_precondition ((_info & IS_VALID) != 0 &&
|
||||
|
|
@ -648,35 +641,35 @@ public:
|
|||
return (_pt.y());
|
||||
}
|
||||
|
||||
/*! Check if the x-coordinate of the left point is infinite. */
|
||||
/*! checks if the x-coordinate of the left point is infinite. */
|
||||
Arr_parameter_space left_infinite_in_x () const
|
||||
{
|
||||
return ((_info & IS_DIRECTED_RIGHT) != 0) ?
|
||||
source_infinite_in_x() : target_infinite_in_x();
|
||||
}
|
||||
|
||||
/*! Check if the y-coordinate of the left point is infinite. */
|
||||
/*! checks if the y-coordinate of the left point is infinite. */
|
||||
Arr_parameter_space left_infinite_in_y () const
|
||||
{
|
||||
return ((_info & IS_DIRECTED_RIGHT) != 0) ?
|
||||
source_infinite_in_y() : target_infinite_in_y();
|
||||
}
|
||||
|
||||
/*! Check if the x-coordinate of the right point is infinite. */
|
||||
/*! checks if the x-coordinate of the right point is infinite. */
|
||||
Arr_parameter_space right_infinite_in_x () const
|
||||
{
|
||||
return ((_info & IS_DIRECTED_RIGHT) != 0) ?
|
||||
target_infinite_in_x() : source_infinite_in_x();
|
||||
}
|
||||
|
||||
/*! Check if the y-coordinate of the right point is infinite. */
|
||||
/*! checks if the y-coordinate of the right point is infinite. */
|
||||
Arr_parameter_space right_infinite_in_y () const
|
||||
{
|
||||
return ((_info & IS_DIRECTED_RIGHT) != 0) ?
|
||||
target_infinite_in_y() : source_infinite_in_y();
|
||||
}
|
||||
|
||||
/*! Get the left endpoint. */
|
||||
/*! obtains the left endpoint. */
|
||||
const Point_2& left () const
|
||||
{
|
||||
CGAL_precondition (left_infinite_in_x() == ARR_INTERIOR &&
|
||||
|
|
@ -684,7 +677,7 @@ public:
|
|||
return ((_info & IS_DIRECTED_RIGHT) ? _ps : _pt);
|
||||
}
|
||||
|
||||
/*! Get the right endpoint. */
|
||||
/*! obtains the right endpoint. */
|
||||
const Point_2& right () const
|
||||
{
|
||||
CGAL_precondition (right_infinite_in_x() == ARR_INTERIOR &&
|
||||
|
|
@ -692,19 +685,19 @@ public:
|
|||
return ((_info & IS_DIRECTED_RIGHT) ? _pt : _ps);
|
||||
}
|
||||
|
||||
/*! Check if the arc is valid. */
|
||||
/*! checks if the arc is valid. */
|
||||
bool is_valid () const
|
||||
{
|
||||
return ((_info & IS_VALID) != 0);
|
||||
}
|
||||
|
||||
/*! Check if the arc is continuous. */
|
||||
/*! checks if the arc is continuous. */
|
||||
bool is_continuous () const
|
||||
{
|
||||
return ((_info & IS_CONTINUOUS) != 0);
|
||||
}
|
||||
|
||||
/*! Check if the arc is directed right. */
|
||||
/*! checks if the arc is directed right. */
|
||||
bool is_directed_right () const
|
||||
{
|
||||
return ((_info & IS_DIRECTED_RIGHT) != 0);
|
||||
|
|
@ -714,20 +707,19 @@ public:
|
|||
/// \name Modifiers.
|
||||
//@{
|
||||
|
||||
/*! Mark the arc as being continuous. */
|
||||
/*! marks the arc as being continuous. */
|
||||
void set_continuous ()
|
||||
{
|
||||
_info = (_info | IS_CONTINUOUS);
|
||||
}
|
||||
|
||||
/*! Mark the arc as being invalid. */
|
||||
/*! marks the arc as being invalid. */
|
||||
void set_invalid ()
|
||||
{
|
||||
_info = (_info & ~IS_VALID);
|
||||
}
|
||||
|
||||
/*!
|
||||
* Split the arc into two at a given pole. The function returns the sub-arc
|
||||
/*! splits the arc into two at a given pole. The function returns the sub-arc
|
||||
* to the left of the pole and sets (*this) to be the right sub-arc.
|
||||
* \param x0 The x-coordinate of the pole.
|
||||
* \pre x0 lies in the interior of the arc.
|
||||
|
|
@ -791,8 +783,7 @@ public:
|
|||
/// \name Predicates.
|
||||
//@{
|
||||
|
||||
/*!
|
||||
* Get the relative position of the point with respect to the rational arc.
|
||||
/*! obtains the relative position of the point with respect to the rational arc.
|
||||
* \param p The query point.
|
||||
* \pre p is in the x-range of the arc.
|
||||
* \return SMALLER if the point is below the arc;
|
||||
|
|
@ -816,8 +807,7 @@ public:
|
|||
return (CGAL::compare (p.y(), y));
|
||||
}
|
||||
|
||||
/*!
|
||||
* Compare the x-coordinate of a vertical asymptote of the arc (one of its
|
||||
/*! compares the x-coordinate of a vertical asymptote of the arc (one of its
|
||||
* ends) and the given point.
|
||||
*/
|
||||
Comparison_result compare_end (const Point_2& p,
|
||||
|
|
@ -852,8 +842,7 @@ public:
|
|||
return ((ce == ARR_MIN_END) ? SMALLER : LARGER);
|
||||
}
|
||||
|
||||
/*!
|
||||
* Compare the x-coordinate of a vertical asymptotes of the two arcs.
|
||||
/*! compares the x-coordinate of a vertical asymptotes of the two arcs.
|
||||
*/
|
||||
Comparison_result compare_ends (Arr_curve_end ind1,
|
||||
const Self& arc, Arr_curve_end ind2) const
|
||||
|
|
@ -1021,8 +1010,7 @@ public:
|
|||
return (val_res);
|
||||
}
|
||||
|
||||
/*!
|
||||
* Compare the slopes of the arc with another given arc at their given
|
||||
/*! compares the slopes of the arc with another given arc at their given
|
||||
* intersection point.
|
||||
* \param cv The given arc.
|
||||
* \param p The intersection point.
|
||||
|
|
@ -1106,8 +1094,7 @@ public:
|
|||
return (EQUAL);
|
||||
}
|
||||
|
||||
/*!
|
||||
* Compare the two arcs at x = -oo.
|
||||
/*! compares the two arcs at x = -oo.
|
||||
* \param arc The given arc.
|
||||
* \pre Both arcs have a left end which is unbounded in x.
|
||||
* \return SMALLER if (*this) lies below the other arc;
|
||||
|
|
@ -1162,8 +1149,7 @@ public:
|
|||
return (flip_res ? SMALLER : LARGER);
|
||||
}
|
||||
|
||||
/*!
|
||||
* Compare the two arcs at x = +oo.
|
||||
/*! compares the two arcs at x = +oo.
|
||||
* \param arc The given arc.
|
||||
* \pre Both arcs are have a right end which is unbounded in x.
|
||||
* \return SMALLER if (*this) lies below the other arc;
|
||||
|
|
@ -1218,8 +1204,7 @@ public:
|
|||
return (flip_res ? SMALLER : LARGER);
|
||||
}
|
||||
|
||||
/*!
|
||||
* Check whether the two arcs are equal (have the same graph).
|
||||
/*! checks whether the two arcs are equal (have the same graph).
|
||||
* \param arc The compared arc.
|
||||
* \return (true) if the two arcs have the same graph; (false) otherwise.
|
||||
*/
|
||||
|
|
@ -1276,8 +1261,7 @@ public:
|
|||
return (true);
|
||||
}
|
||||
|
||||
/*!
|
||||
* Check whether it is possible to merge the arc with the given arc.
|
||||
/*! checks whether it is possible to merge the arc with the given arc.
|
||||
* \param arc The query arc.
|
||||
* \return (true) if it is possible to merge the two arcs;
|
||||
* (false) otherwise.
|
||||
|
|
@ -1311,8 +1295,7 @@ public:
|
|||
/// \name Constructions of points and curves.
|
||||
//@{
|
||||
|
||||
/*!
|
||||
* Flip the arc (swap its source and target).
|
||||
/*! flips the arc (swap its source and target).
|
||||
* \return The flipped arc.
|
||||
*/
|
||||
Self flip () const
|
||||
|
|
@ -1341,8 +1324,7 @@ public:
|
|||
return (arc);
|
||||
}
|
||||
|
||||
/*!
|
||||
* Print the rational arc.
|
||||
/*! prints the rational arc.
|
||||
*/
|
||||
std::ostream& print (std::ostream& os) const
|
||||
{
|
||||
|
|
@ -1386,8 +1368,7 @@ protected:
|
|||
/// \name Auxiliary (protected) functions.
|
||||
//@{
|
||||
|
||||
/*!
|
||||
* Check if the given x-value is in the x-range of the arc.
|
||||
/*! checks if the given x-value is in the x-range of the arc.
|
||||
* \param x The x-value.
|
||||
* \param eq_src Output: Is this value equal to the x-coordinate of the
|
||||
* source point.
|
||||
|
|
@ -1470,8 +1451,7 @@ protected:
|
|||
return (true);
|
||||
}
|
||||
|
||||
/*!
|
||||
* Check if the given x-value is in the x-range of the arc, excluding its
|
||||
/*! checks if the given x-value is in the x-range of the arc, excluding its
|
||||
* open ends.
|
||||
*/
|
||||
bool _is_in_true_x_range (const Algebraic& x) const
|
||||
|
|
@ -1494,8 +1474,7 @@ protected:
|
|||
return (true);
|
||||
}
|
||||
|
||||
/*!
|
||||
* Check if the underlying rational function is the same in the given arc.
|
||||
/*! checks if the underlying rational function is the same in the given arc.
|
||||
* \param arc The given arc.
|
||||
* \return (true) if arc's underlying rational function is the same
|
||||
* as of *this; (false) otherwise.
|
||||
|
|
@ -1506,8 +1485,7 @@ protected:
|
|||
return (_numer * arc._denom == _denom * arc._numer);
|
||||
}
|
||||
|
||||
/*!
|
||||
* Compute the sign of the given polynomial at x = -oo.
|
||||
/*! computes the sign of the given polynomial at x = -oo.
|
||||
*/
|
||||
CGAL::Sign _sign_at_minus_infinity (const Polynomial& poly) const
|
||||
{
|
||||
|
|
@ -1531,8 +1509,7 @@ protected:
|
|||
return ((lead_sign == CGAL::POSITIVE) ? CGAL::NEGATIVE : CGAL::POSITIVE);
|
||||
}
|
||||
|
||||
/*!
|
||||
* Compute the sign of the given polynomial at x = +oo.
|
||||
/*! computes the sign of the given polynomial at x = +oo.
|
||||
*/
|
||||
CGAL::Sign _sign_at_plus_infinity (const Polynomial& poly) const
|
||||
{
|
||||
|
|
@ -1548,8 +1525,7 @@ protected:
|
|||
return (CGAL::sign (nt_traits.get_coefficient (poly, degree)));
|
||||
}
|
||||
|
||||
/*!
|
||||
* Compute infinity type of the rational function P(x)/Q(x) at x = -oo.
|
||||
/*! computes infinity type of the rational function P(x)/Q(x) at x = -oo.
|
||||
* \param y Output: The value of the horizontal asymptote (if exists).
|
||||
* \return The infinity type for the y-coordinate at x = -oo.
|
||||
*/
|
||||
|
|
@ -1588,8 +1564,7 @@ protected:
|
|||
((def_diff % 2 == 0) ? ARR_BOTTOM_BOUNDARY : ARR_TOP_BOUNDARY);
|
||||
}
|
||||
|
||||
/*!
|
||||
* Compute infinity type of the rational function P(x)/Q(x) at x = +oo.
|
||||
/*! computes infinity type of the rational function P(x)/Q(x) at x = +oo.
|
||||
* \param y Output: The value of the horizontal asymptote (if exists).
|
||||
* \return The infinity type for the y-coordinate at x = +oo.
|
||||
*/
|
||||
|
|
@ -1625,8 +1600,7 @@ protected:
|
|||
ARR_TOP_BOUNDARY : ARR_BOTTOM_BOUNDARY;
|
||||
}
|
||||
|
||||
/*!
|
||||
* Compute all zeros of the denominator polynomial that lie within the
|
||||
/*! computes all zeros of the denominator polynomial that lie within the
|
||||
* x-range of the arc.
|
||||
*/
|
||||
template <class OutputIterator>
|
||||
|
|
@ -1673,7 +1647,7 @@ protected:
|
|||
return (oi);
|
||||
}
|
||||
|
||||
/*! Check whether the arc is continuous. */
|
||||
/*! checks whether the arc is continuous. */
|
||||
bool _is_continuous ()
|
||||
{
|
||||
// Compute the roots of the denominator polynomial, and make sure
|
||||
|
|
@ -1687,8 +1661,7 @@ protected:
|
|||
return (q_roots.empty());
|
||||
}
|
||||
|
||||
/*!
|
||||
* Determine the signs of the rational functions infinitisimally to the left
|
||||
/*! determines the signs of the rational functions infinitisimally to the left
|
||||
* and to the right of the given pole.
|
||||
* \param x0 The x-coordinate of the pole.
|
||||
* \pre x0 lies in the interior of the arc.
|
||||
|
|
@ -1754,8 +1727,7 @@ protected:
|
|||
return (std::make_pair (sign_left, sign_right));
|
||||
}
|
||||
|
||||
/*!
|
||||
* Print a polynomial nicely.
|
||||
/*! prints a polynomial nicely.
|
||||
*/
|
||||
std::ostream& _print_polynomial (std::ostream& os,
|
||||
const Polynomial& poly,
|
||||
|
|
@ -1797,8 +1769,7 @@ protected:
|
|||
//@}
|
||||
};
|
||||
|
||||
/*!
|
||||
* Exporter for rational arcs.
|
||||
/*! exports a rational arc.
|
||||
*/
|
||||
template <class Alg_kernel, class Nt_traits>
|
||||
std::ostream&
|
||||
|
|
@ -1836,15 +1807,13 @@ public:
|
|||
/// \name Construction methods.
|
||||
//@{
|
||||
|
||||
/*!
|
||||
* Default constructor.
|
||||
/*! constructs default.
|
||||
*/
|
||||
_Continuous_rational_arc_2 () :
|
||||
Base()
|
||||
{}
|
||||
|
||||
/*!
|
||||
* Constructor from a base arc.
|
||||
/*! constructors from a base arc.
|
||||
*/
|
||||
_Continuous_rational_arc_2 (const Base& arc) :
|
||||
Base (arc)
|
||||
|
|
@ -1852,16 +1821,14 @@ public:
|
|||
CGAL_precondition (arc.is_continuous());
|
||||
}
|
||||
|
||||
/*!
|
||||
* Constructor of a whole polynomial curve.
|
||||
/*! constructs a whole polynomial curve.
|
||||
* \param pcoeffs The rational coefficients of the polynomial p(x).
|
||||
*/
|
||||
_Continuous_rational_arc_2 (const Rat_vector& pcoeffs) :
|
||||
Base (pcoeffs)
|
||||
{}
|
||||
|
||||
/*!
|
||||
* Constructor of a polynomial ray, defined by y = p(x), for x_s <= x if the
|
||||
/*! constructs a polynomial ray, defined by y = p(x), for x_s <= x if the
|
||||
* ray is directed to the right, or for x_s >= x if it is directed to the
|
||||
* left.
|
||||
* \param pcoeffs The rational coefficients of the polynomial p(x).
|
||||
|
|
@ -1874,8 +1841,7 @@ public:
|
|||
Base (pcoeffs, x_s, dir_right)
|
||||
{}
|
||||
|
||||
/*!
|
||||
* Constructor of a polynomial arc, defined by y = p(x), x_min <= x <= x_max.
|
||||
/*! constructors a polynomial arc, defined by y = p(x), x_min <= x <= x_max.
|
||||
* \param pcoeffs The rational coefficients of the polynomial p(x).
|
||||
* \param x_s The x-coordinate of the source point.
|
||||
* \param x_t The x-coordinate of the target point.
|
||||
|
|
@ -1886,8 +1852,7 @@ public:
|
|||
Base (pcoeffs, x_s, x_t)
|
||||
{}
|
||||
|
||||
/*!
|
||||
* Constructor of a polynomial function, defined by y = p(x)/q(x) for any x.
|
||||
/*! constructs a polynomial function, defined by y = p(x)/q(x) for any x.
|
||||
* \param pcoeffs The rational coefficients of the polynomial p(x).
|
||||
* \param qcoeffs The rational coefficients of the polynomial q(x).
|
||||
* \pre The denominator polynomial q(x) does not have any roots.
|
||||
|
|
@ -1903,8 +1868,7 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
/*!
|
||||
* Constructor of a ray of a rational function, defined by y = p(x)/q(x),
|
||||
/*! constructs a ray of a rational function, defined by y = p(x)/q(x),
|
||||
* for x_s <= x if the ray is directed to the right, or for x_s >= x if it
|
||||
* is directed to the left.
|
||||
* \param pcoeffs The rational coefficients of the polynomial p(x).
|
||||
|
|
@ -1927,8 +1891,7 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
/*!
|
||||
* Constructor of a bounded rational arc, defined by y = p(x)/q(x),
|
||||
/*! constructs a bounded rational arc, defined by y = p(x)/q(x),
|
||||
* where: x_min <= x <= x_max.
|
||||
* \param pcoeffs The rational coefficients of the polynomial p(x).
|
||||
* \param qcoeffs The rational coefficients of the polynomial q(x).
|
||||
|
|
@ -1954,8 +1917,7 @@ public:
|
|||
/// \name Constructions of points and curves.
|
||||
//@{
|
||||
|
||||
/*!
|
||||
* Compute the intersections with the given arc.
|
||||
/*! computes the intersections with the given arc.
|
||||
* \param arc The given intersecting arc.
|
||||
* \param oi The output iterator.
|
||||
* \return The past-the-end iterator.
|
||||
|
|
@ -2148,8 +2110,7 @@ public:
|
|||
return oi;
|
||||
}
|
||||
|
||||
/*!
|
||||
* Split the arc into two at a given split point.
|
||||
/*! splits the arc into two at a given split point.
|
||||
* \param p The split point.
|
||||
* \param c1 Output: The first resulting arc, lying to the left of p.
|
||||
* \param c2 Output: The first resulting arc, lying to the right of p.
|
||||
|
|
@ -2195,8 +2156,7 @@ public:
|
|||
return;
|
||||
}
|
||||
|
||||
/*!
|
||||
* Merge the current arc with the given arc.
|
||||
/*! merges the current arc with the given arc.
|
||||
* \param arc The arc to merge with.
|
||||
* \pre The two arcs are mergeable.
|
||||
*/
|
||||
|
|
@ -2349,23 +2309,20 @@ public:
|
|||
/// \name Construction methods.
|
||||
//@{
|
||||
|
||||
/*!
|
||||
* Default constructor.
|
||||
/*! constructs default.
|
||||
*/
|
||||
_Rational_arc_2 () :
|
||||
Base()
|
||||
{}
|
||||
|
||||
/*!
|
||||
* Constructor of a whole polynomial curve.
|
||||
/*! constructs a whole polynomial curve.
|
||||
* \param pcoeffs The rational coefficients of the polynomial p(x).
|
||||
*/
|
||||
_Rational_arc_2 (const Rat_vector& pcoeffs) :
|
||||
Base (pcoeffs)
|
||||
{}
|
||||
|
||||
/*!
|
||||
* Constructor of a polynomial ray, defined by y = p(x), for x_s <= x if the
|
||||
/*! constructs a polynomial ray, defined by y = p(x), for x_s <= x if the
|
||||
* ray is directed to the right, or for x_s >= x if it is directed to the
|
||||
* left.
|
||||
* \param pcoeffs The rational coefficients of the polynomial p(x).
|
||||
|
|
@ -2378,8 +2335,7 @@ public:
|
|||
Base (pcoeffs, x_s, dir_right)
|
||||
{}
|
||||
|
||||
/*!
|
||||
* Constructor of a polynomial arc, defined by y = p(x), x_min <= x <= x_max.
|
||||
/*! constructs a polynomial arc, defined by y = p(x), x_min <= x <= x_max.
|
||||
* \param pcoeffs The rational coefficients of the polynomial p(x).
|
||||
* \param x_s The x-coordinate of the source point.
|
||||
* \param x_t The x-coordinate of the target point.
|
||||
|
|
@ -2390,8 +2346,7 @@ public:
|
|||
Base (pcoeffs, x_s, x_t)
|
||||
{}
|
||||
|
||||
/*!
|
||||
* Constructor of a polynomial function, defined by y = p(x)/q(x) for any x.
|
||||
/*! constructs a polynomial function, defined by y = p(x)/q(x) for any x.
|
||||
* \param pcoeffs The rational coefficients of the polynomial p(x).
|
||||
* \param qcoeffs The rational coefficients of the polynomial q(x).
|
||||
*/
|
||||
|
|
@ -2399,8 +2354,7 @@ public:
|
|||
Base (pcoeffs, qcoeffs)
|
||||
{}
|
||||
|
||||
/*!
|
||||
* Constructor of a ray of a rational function, defined by y = p(x)/q(x),
|
||||
/*! constructs a ray of a rational function, defined by y = p(x)/q(x),
|
||||
* for x_s <= x if the ray is directed to the right, or for x_s >= x if it
|
||||
* is directed to the left.
|
||||
* \param pcoeffs The rational coefficients of the polynomial p(x).
|
||||
|
|
@ -2414,8 +2368,7 @@ public:
|
|||
Base (pcoeffs, qcoeffs, x_s, dir_right)
|
||||
{}
|
||||
|
||||
/*!
|
||||
* Constructor of a bounded rational arc, defined by y = p(x)/q(x),
|
||||
/*! constructs a bounded rational arc, defined by y = p(x)/q(x),
|
||||
* where: x_min <= x <= x_max.
|
||||
* \param pcoeffs The rational coefficients of the polynomial p(x).
|
||||
* \param qcoeffs The rational coefficients of the polynomial q(x).
|
||||
|
|
@ -2429,8 +2382,7 @@ public:
|
|||
{}
|
||||
//@}
|
||||
|
||||
/*!
|
||||
* Subdivide the given portion of a rational function into continuous
|
||||
/*! subdivides the given portion of a rational function into continuous
|
||||
* sub-arcs, splitting it at the roots of the denominator polynomial.
|
||||
* \param oi An output iterator of _Continuous_rational_arc_2 objects.
|
||||
*/
|
||||
|
|
@ -2475,7 +2427,7 @@ public:
|
|||
|
||||
protected:
|
||||
|
||||
/*! Check whether the arc is continuous. */
|
||||
/*! checks whether the arc is continuous. */
|
||||
void _check_continuity ()
|
||||
{
|
||||
if (this->_is_continuous())
|
||||
|
|
|
|||
|
|
@ -0,0 +1,258 @@
|
|||
// 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>
|
||||
|
||||
#ifndef CGAL_ARR_HAS_H
|
||||
#define CGAL_ARR_HAS_H
|
||||
|
||||
#include <CGAL/license/Arrangement_on_surface_2.h>
|
||||
|
||||
#include <type_traits>
|
||||
|
||||
namespace CGAL {
|
||||
|
||||
// Compare_x_2
|
||||
// Helper trait to check for the presence of nested Compare_x_2
|
||||
template <typename, typename = std::void_t<>>
|
||||
struct has_compare_x_2 : std::false_type {};
|
||||
|
||||
// Specialization if the nested type Compare_x_2 exists
|
||||
template <typename T>
|
||||
struct has_compare_x_2<T, std::void_t<typename T::Compare_x_2>> : std::true_type {};
|
||||
|
||||
// Compare_xy_2
|
||||
// Helper trait to check for the presence of nested Compare_xy_2
|
||||
template <typename, typename = std::void_t<>>
|
||||
struct has_compare_xy_2 : std::false_type {};
|
||||
|
||||
// Specialization if the nested type Compare_xy_2 exists
|
||||
template <typename T>
|
||||
struct has_compare_xy_2<T, std::void_t<typename T::Compare_xy_2>> : std::true_type {};
|
||||
|
||||
// Construct_min_vertex_2
|
||||
// Helper trait to check for the presence of nested Construct_min_vertex_2
|
||||
template <typename, typename = std::void_t<>>
|
||||
struct has_construct_min_vertex_2 : std::false_type {};
|
||||
|
||||
// Specialization if the nested type Construct_min_vertex_2 exists
|
||||
template <typename T>
|
||||
struct has_construct_min_vertex_2<T, std::void_t<typename T::Construct_min_vertex_2>> : std::true_type {};
|
||||
|
||||
// Construct_max_vertex_2
|
||||
// Helper trait to check for the presence of nested Construct_max_vertex_2
|
||||
template <typename, typename = std::void_t<>>
|
||||
struct has_construct_max_vertex_2 : std::false_type {};
|
||||
|
||||
// Specialization if the nested type Construct_max_vertex_2 exists
|
||||
template <typename T>
|
||||
struct has_construct_max_vertex_2<T, std::void_t<typename T::Construct_max_vertex_2>> : std::true_type {};
|
||||
|
||||
// Is_vertical_2
|
||||
// Helper trait to check for the presence of nested Is_vertical_2
|
||||
template <typename, typename = std::void_t<>>
|
||||
struct has_is_vertical_2 : std::false_type {};
|
||||
|
||||
// Specialization if the nested type Is_vertical_2 exists
|
||||
template <typename T>
|
||||
struct has_is_vertical_2<T, std::void_t<typename T::Is_vertical_2>> : std::true_type {};
|
||||
|
||||
// Compare_y_at_x_2
|
||||
// Helper trait to check for the presence of nested Compare_y_at_x_2
|
||||
template <typename, typename = std::void_t<>>
|
||||
struct has_compare_y_at_x_2 : std::false_type {};
|
||||
|
||||
// Specialization if the nested type Compare_y_at_x_2 exists
|
||||
template <typename T>
|
||||
struct has_compare_y_at_x_2<T, std::void_t<typename T::Compare_y_at_x_2>> : std::true_type {};
|
||||
|
||||
// Equal
|
||||
// Helper trait to check for the presence of nested Equal
|
||||
template <typename, typename = std::void_t<>>
|
||||
struct has_equal_2 : std::false_type {};
|
||||
|
||||
// Specialization if the nested type Equal exists
|
||||
template <typename T>
|
||||
struct has_equal_2<T, std::void_t<typename T::Equal>> : std::true_type {};
|
||||
|
||||
// Compare_y_at_x_left_2
|
||||
// Helper trait to check for the presence of nested Compare_y_at_x_left_2
|
||||
template <typename, typename = std::void_t<>>
|
||||
struct has_compare_y_at_x_left_2 : std::false_type {};
|
||||
|
||||
// Specialization if the nested type Compare_y_at_x_left_2 exists
|
||||
template <typename T>
|
||||
struct has_compare_y_at_x_left_2<T, std::void_t<typename T::Compare_y_at_x_left_2>> : std::true_type {};
|
||||
|
||||
// Compare_y_at_x_right_2
|
||||
// Helper trait to check for the presence of nested Compare_y_at_x_right_2
|
||||
template <typename, typename = std::void_t<>>
|
||||
struct has_compare_y_at_x_right_2 : std::false_type {};
|
||||
|
||||
// Specialization if the nested type Compare_y_at_x_right_2 exists
|
||||
template <typename T>
|
||||
struct has_compare_y_at_x_right_2<T, std::void_t<typename T::Compare_y_at_x_right_2>> : std::true_type {};
|
||||
|
||||
// Make_x_monotone_2
|
||||
// Helper trait to check for the presence of nested Make_x_monotone_2
|
||||
template <typename, typename = std::void_t<>>
|
||||
struct has_make_x_monotone_2 : std::false_type {};
|
||||
|
||||
// Specialization if the nested type Make_x_monotone_2 exists
|
||||
template <typename T>
|
||||
struct has_make_x_monotone_2<T, std::void_t<typename T::Make_x_monotone_2>> : std::true_type {};
|
||||
|
||||
// Split_2
|
||||
// Helper trait to check for the presence of nested Split_2
|
||||
template <typename, typename = std::void_t<>>
|
||||
struct has_split_2 : std::false_type {};
|
||||
|
||||
// Specialization if the nested type Split_2 exists
|
||||
template <typename T>
|
||||
struct has_split_2<T, std::void_t<typename T::Split_2>> : std::true_type {};
|
||||
|
||||
// Intersect_2
|
||||
// Helper trait to check for the presence of nested Intersect_2
|
||||
template <typename, typename = std::void_t<>>
|
||||
struct has_intersect_2 : std::false_type {};
|
||||
|
||||
// Specialization if the nested type Intersect_2 exists
|
||||
template <typename T>
|
||||
struct has_intersect_2<T, std::void_t<typename T::Intersect_2>> : std::true_type {};
|
||||
|
||||
// Are_mergeable_2
|
||||
// Helper trait to check for the presence of nested Are_mergeable_2
|
||||
template <typename, typename = std::void_t<>>
|
||||
struct has_are_mergeable_2 : std::false_type {};
|
||||
|
||||
// Specialization if the nested type Are_mergeable_2 exists
|
||||
template <typename T>
|
||||
struct has_are_mergeable_2<T, std::void_t<typename T::Are_mergeable_2>> : std::true_type {};
|
||||
|
||||
// Merge_2
|
||||
// Helper trait to check for the presence of nested Merge_2
|
||||
template <typename, typename = std::void_t<>>
|
||||
struct has_merge_2 : std::false_type {};
|
||||
|
||||
// Specialization if the nested type Merge_2 exists
|
||||
template <typename T>
|
||||
struct has_merge_2<T, std::void_t<typename T::Merge_2>> : std::true_type {};
|
||||
|
||||
// Construct_opposite_2
|
||||
// Helper trait to check for the presence of nested Construct_opposite_2
|
||||
template <typename, typename = std::void_t<>>
|
||||
struct has_construct_opposite_2 : std::false_type {};
|
||||
|
||||
// Specialization if the nested type Construct_opposite_2 exists
|
||||
template <typename T>
|
||||
struct has_construct_opposite_2<T, std::void_t<typename T::Construct_opposite_2>> : std::true_type {};
|
||||
|
||||
// Construct_point_2
|
||||
// Helper trait to check for the presence of nested Construct_point_2
|
||||
template <typename, typename = std::void_t<>>
|
||||
struct has_construct_point_2 : std::false_type {};
|
||||
|
||||
// Specialization if the nested type Construct_point_2 exists
|
||||
template <typename T>
|
||||
struct has_construct_point_2<T, std::void_t<typename T::Construct_point_2>> : std::true_type {};
|
||||
|
||||
// Compare_endpoints_xy_2
|
||||
// Helper trait to check for the presence of nested Compare_endpoints_xy_2
|
||||
template <typename, typename = std::void_t<>>
|
||||
struct has_compare_endpoints_xy_2 : std::false_type {};
|
||||
|
||||
// Specialization if the nested type Compare_endpoints_xy_2 exists
|
||||
template <typename T>
|
||||
struct has_compare_endpoints_xy_2<T, std::void_t<typename T::Compare_endpoints_xy_2>> : std::true_type {};
|
||||
|
||||
// Approximate_2
|
||||
// Helper trait to check for the presence of nested Approximate_2
|
||||
template <typename, typename = std::void_t<>>
|
||||
struct has_approximate_2 : std::false_type {};
|
||||
|
||||
// Specialization if the nested type Approximate_2 exists
|
||||
template <typename T>
|
||||
struct has_approximate_2<T, std::void_t<typename T::Approximate_2>> : std::true_type {};
|
||||
|
||||
// Parameter_space_in_x_2
|
||||
// Helper trait to check for the presence of nested Parameter_space_in_x_2
|
||||
template <typename, typename = std::void_t<>>
|
||||
struct has_parameter_space_in_x_2 : std::false_type {};
|
||||
|
||||
// Specialization if the nested type Parameter_space_in_x_2 exists
|
||||
template <typename T>
|
||||
struct has_parameter_space_in_x_2<T, std::void_t<typename T::Parameter_space_in_x_2>> : std::true_type {};
|
||||
|
||||
// Is_on_x_identification_2
|
||||
// Helper trait to check for the presence of nested Is_on_x_identification_2
|
||||
template <typename, typename = std::void_t<>>
|
||||
struct has_is_on_x_identification_2 : std::false_type {};
|
||||
|
||||
// Specialization if the nested type Is_on_x_identification_2 exists
|
||||
template <typename T>
|
||||
struct has_is_on_x_identification_2<T, std::void_t<typename T::Is_on_x_identification_2>> : std::true_type {};
|
||||
|
||||
// Compare_y_on_boundary_2
|
||||
// Helper trait to check for the presence of nested Compare_y_on_boundary_2
|
||||
template <typename, typename = std::void_t<>>
|
||||
struct has_compare_y_on_boundary_2 : std::false_type {};
|
||||
|
||||
// Specialization if the nested type Compare_y_on_boundary_2 exists
|
||||
template <typename T>
|
||||
struct has_compare_y_on_boundary_2<T, std::void_t<typename T::Compare_y_on_boundary_2>> : std::true_type {};
|
||||
|
||||
// Compare_y_near_boundary_2
|
||||
// Helper trait to check for the presence of nested Compare_y_near_boundary_2
|
||||
template <typename, typename = std::void_t<>>
|
||||
struct has_compare_y_near_boundary_2 : std::false_type {};
|
||||
|
||||
// Specialization if the nested type Compare_y_near_boundary_2 exists
|
||||
template <typename T>
|
||||
struct has_compare_y_near_boundary_2<T, std::void_t<typename T::Compare_y_near_boundary_2>> : std::true_type {};
|
||||
|
||||
// Parameter_space_in_y_2
|
||||
// Helper trait to check for the presence of nested Parameter_space_in_y_2
|
||||
template <typename, typename = std::void_t<>>
|
||||
struct has_parameter_space_in_y_2 : std::false_type {};
|
||||
|
||||
// Specialization if the nested type Parameter_space_in_y_2 exists
|
||||
template <typename T>
|
||||
struct has_parameter_space_in_y_2<T, std::void_t<typename T::Parameter_space_in_y_2>> : std::true_type {};
|
||||
|
||||
// Is_on_y_identification_2
|
||||
// Helper trait to check for the presence of nested Is_on_y_identification_2
|
||||
template <typename, typename = std::void_t<>>
|
||||
struct has_is_on_y_identification_2 : std::false_type {};
|
||||
|
||||
// Specialization if the nested type Is_on_y_identification_2 exists
|
||||
template <typename T>
|
||||
struct has_is_on_y_identification_2<T, std::void_t<typename T::Is_on_y_identification_2>> : std::true_type {};
|
||||
|
||||
// Compare_x_on_boundary_2
|
||||
// Helper trait to check for the presence of nested Compare_x_on_boundary_2
|
||||
template <typename, typename = std::void_t<>>
|
||||
struct has_compare_x_on_boundary_2 : std::false_type {};
|
||||
|
||||
// Specialization if the nested type Compare_x_on_boundary_2 exists
|
||||
template <typename T>
|
||||
struct has_compare_x_on_boundary_2<T, std::void_t<typename T::Compare_x_on_boundary_2>> : std::true_type {};
|
||||
|
||||
// Compare_x_near_boundary_2
|
||||
// Helper trait to check for the presence of nested Compare_x_near_boundary_2
|
||||
template <typename, typename = std::void_t<>>
|
||||
struct has_compare_x_near_boundary_2 : std::false_type {};
|
||||
|
||||
// Specialization if the nested type Compare_x_near_boundary_2 exists
|
||||
template <typename T>
|
||||
struct has_compare_x_near_boundary_2<T, std::void_t<typename T::Compare_x_near_boundary_2>> : std::true_type {};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
@ -38,8 +38,6 @@
|
|||
#include <CGAL/Arr_tags.h>
|
||||
#include <CGAL/global_functions_circular_kernel_2.h>
|
||||
|
||||
|
||||
|
||||
namespace CGAL {
|
||||
|
||||
// Traits class for CGAL::Arrangement_2 (and similar) based on a
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -24,9 +24,9 @@
|
|||
#include <CGAL/disable_warnings.h>
|
||||
|
||||
/*! \file The basic non-caching segment traits-class for the arrangement
|
||||
* package. This traits class handles x-monotone non-intersecting segments.
|
||||
* It is a model of the ArrangementBasicTraits_2 concept. The class is
|
||||
* templated by a kernel and inherits from it all the types and many of the
|
||||
* package. This traits class handles \f$x\f$-monotone non-intersecting
|
||||
* segments. It is a model of the ArrangementBasicTraits_2 concept. The class
|
||||
* is templated by a kernel and inherits from it all the types and many of the
|
||||
* functors required by the concept it models.
|
||||
*/
|
||||
|
||||
|
|
@ -41,7 +41,7 @@
|
|||
namespace CGAL {
|
||||
|
||||
/*! \class
|
||||
* A model of the ArrangementBasicTraits_2 concept that handles x-monotone
|
||||
* A model of the ArrangementBasicTraits_2 concept that handles \f$x\f$-monotone
|
||||
* non-intersecting line segments.
|
||||
*/
|
||||
template <class T_Kernel>
|
||||
|
|
@ -73,9 +73,8 @@ public:
|
|||
typedef Arr_oblivious_side_tag Top_side_category;
|
||||
typedef Arr_oblivious_side_tag Right_side_category;
|
||||
|
||||
/*! Default Constructor */
|
||||
Arr_non_caching_segment_basic_traits_2()
|
||||
{}
|
||||
/*! constructs default */
|
||||
Arr_non_caching_segment_basic_traits_2() {}
|
||||
|
||||
/// \name Types and functor inherited from the kernel
|
||||
//@{
|
||||
|
|
@ -85,25 +84,25 @@ public:
|
|||
typedef typename Kernel::Segment_2 X_monotone_curve_2;
|
||||
typedef unsigned int Multiplicity;
|
||||
|
||||
/*! Compare the x-coordinates of two points */
|
||||
/*! Compare the \f$x\f$-coordinates of two points. */
|
||||
typedef typename Kernel::Compare_x_2 Compare_x_2;
|
||||
|
||||
/*! Compare two points lexigoraphically; by x, then by y */
|
||||
/*! Compare two points lexigoraphically; by \f$x\f$, then by \f$y\f$. */
|
||||
typedef typename Kernel::Compare_xy_2 Compare_xy_2;
|
||||
|
||||
/*! Obtain the left endpoint of a given segment */
|
||||
/*! Obtain the left endpoint of a given segment. */
|
||||
typedef typename Kernel::Construct_min_vertex_2 Construct_min_vertex_2;
|
||||
|
||||
/*! Obtain the right endpoint of a given segment */
|
||||
/*! Obtain the right endpoint of a given segment. */
|
||||
typedef typename Kernel::Construct_max_vertex_2 Construct_max_vertex_2;
|
||||
|
||||
/*! Check whether a given segment is vertical */
|
||||
/*! Check whether a given segment is vertical. */
|
||||
typedef typename Kernel::Is_vertical_2 Is_vertical_2;
|
||||
|
||||
/*! Return the location of a given point with respect to an input segment */
|
||||
/*! Return the location of a given point with respect to an input segment. */
|
||||
typedef typename Kernel::Compare_y_at_x_2 Compare_y_at_x_2;
|
||||
|
||||
/*! Check if two segments or if two points are identical */
|
||||
/*! Check if two segments or if two points are identical. */
|
||||
typedef typename Kernel::Equal_2 Equal_2;
|
||||
|
||||
//@}
|
||||
|
|
@ -116,17 +115,15 @@ public:
|
|||
*/
|
||||
class Compare_y_at_x_left_2 {
|
||||
public:
|
||||
|
||||
/*
|
||||
* Compare the y value of two segments immediately to the left of their
|
||||
* intersection point.
|
||||
/* compares the \f$y\f$-value of two segments immediately to the left of
|
||||
* their intersection point.
|
||||
* \param cv1 The first segment.
|
||||
* \param cv2 The second segment.
|
||||
* \param p The intersection point.
|
||||
* \pre The point p lies on both segments, 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.
|
||||
* \pre The point `p` lies on both segments, 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`.
|
||||
*/
|
||||
Comparison_result operator()(const X_monotone_curve_2& cv1,
|
||||
const X_monotone_curve_2& cv2,
|
||||
|
|
@ -164,28 +161,24 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
/*! Obtain 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();
|
||||
}
|
||||
{ return Compare_y_at_x_left_2(); }
|
||||
|
||||
/*! \class
|
||||
* A functor for comparing two segments to the right of a point.
|
||||
*/
|
||||
class Compare_y_at_x_right_2 {
|
||||
public:
|
||||
|
||||
/*!
|
||||
* Compare the y value of two segments immediately to the right of their
|
||||
* intersection point.
|
||||
/*! compares the \f$y\f$-value of two segments immediately to the right of
|
||||
* their intersection point.
|
||||
* \param cv1 The first segment.
|
||||
* \param cv2 The second segment.
|
||||
* \param p The intersection point.
|
||||
* \pre The point p lies on both segments, and both of them must be also be
|
||||
* defined (lexicographically) to its right.
|
||||
* \return The relative position of cv1 with respect to cv2 immdiately to
|
||||
* the right of p: SMALLER, LARGER or EQUAL.
|
||||
* \pre The point `p` lies on both segments, and both of them must be also
|
||||
* be defined (lexicographically) to its right.
|
||||
* \return The relative position of `cv1` with respect to `cv2` immdiately
|
||||
* to the right of `p`: `SMALLER`, `LARGER`, or `EQUAL`.
|
||||
*/
|
||||
|
||||
Comparison_result operator()(const X_monotone_curve_2 & cv1,
|
||||
|
|
@ -222,11 +215,9 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
/*! Obtain 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();
|
||||
}
|
||||
{ return Compare_y_at_x_right_2(); }
|
||||
//@}
|
||||
|
||||
/// \name Functor definitions for the landmarks point-location strategy.
|
||||
|
|
@ -242,7 +233,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) {}
|
||||
|
|
@ -250,24 +241,24 @@ public:
|
|||
friend class Arr_non_caching_segment_basic_traits_2<Kernel>;
|
||||
|
||||
public:
|
||||
/*! Return 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 */,
|
||||
|
|
@ -286,16 +277,14 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
/*! Get an Approximate_2 functor object. */
|
||||
/*! obtains an Approximate_2 functor object. */
|
||||
Approximate_2 approximate_2_object () const { return Approximate_2(*this); }
|
||||
|
||||
typedef typename Kernel::Construct_segment_2 Construct_x_monotone_curve_2;
|
||||
|
||||
/*! Get 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 (this->construct_segment_2_object());
|
||||
}
|
||||
{ return (this->construct_segment_2_object()); }
|
||||
//@}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ public:
|
|||
typedef typename Base::Segment_assertions Segment_assertions;
|
||||
typedef typename Base::Has_exact_division Has_exact_division;
|
||||
|
||||
/*! Default constructor */
|
||||
/*! constructs default */
|
||||
Arr_non_caching_segment_traits_2() : Base() {}
|
||||
|
||||
/// \name Types and functors inherited from the base
|
||||
|
|
@ -118,7 +118,7 @@ public:
|
|||
*/
|
||||
class Make_x_monotone_2 {
|
||||
public:
|
||||
/*! 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. As segments are always x_monotone, only one
|
||||
* x-monotone curve is inserted into the output iterator.
|
||||
* \param cv the segment.
|
||||
|
|
@ -138,7 +138,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(); }
|
||||
|
||||
|
|
@ -149,7 +149,7 @@ public:
|
|||
typedef Arr_non_caching_segment_traits_2<Kernel_T> Self;
|
||||
|
||||
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).
|
||||
|
|
@ -189,7 +189,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
/*! Obtain a Split_2 functor object. */
|
||||
/*! obtains a Split_2 functor object. */
|
||||
Split_2 split_2_object() const { return Split_2(); }
|
||||
|
||||
/*! \class
|
||||
|
|
@ -202,7 +202,7 @@ public:
|
|||
/*! The traits (in case it has state) */
|
||||
const Traits& m_traits;
|
||||
|
||||
/*! Constructor
|
||||
/*! constructs
|
||||
* \param traits the traits (in case it has state)
|
||||
*/
|
||||
Intersect_2(const Traits& traits) : m_traits(traits) {}
|
||||
|
|
@ -210,7 +210,7 @@ public:
|
|||
friend class Arr_non_caching_segment_traits_2<Kernel>;
|
||||
|
||||
public:
|
||||
/*! Find the intersections of the two given segments and insert them into
|
||||
/*! finds the intersections of the two given segments and insert them into
|
||||
* the given output iterator. As two segments may itersect only once, only
|
||||
* a single intersection will be contained in the iterator.
|
||||
* \param cv1 The first curve.
|
||||
|
|
@ -264,7 +264,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
|
||||
|
|
@ -277,7 +277,7 @@ public:
|
|||
/*! The traits (in case it has state) */
|
||||
const Traits* m_traits;
|
||||
|
||||
/*! Constructor
|
||||
/*! constructs
|
||||
* \param traits the traits (in case it has state)
|
||||
*/
|
||||
Are_mergeable_2(const Traits* traits) : m_traits(traits) {}
|
||||
|
|
@ -285,7 +285,7 @@ public:
|
|||
friend class Arr_non_caching_segment_traits_2<Kernel>;
|
||||
|
||||
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, that is, if they are
|
||||
|
|
@ -308,7 +308,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
/*! 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); }
|
||||
|
||||
|
|
@ -322,7 +322,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) {}
|
||||
|
|
@ -330,7 +330,7 @@ public:
|
|||
friend class Arr_non_caching_segment_traits_2<Kernel>;
|
||||
|
||||
public:
|
||||
/*! Merge two given segments into a single segment.
|
||||
/*! merges two given segments into a single segment.
|
||||
* \param cv1 The first curve.
|
||||
* \param cv2 The second curve.
|
||||
* \param c Output: The merged curve.
|
||||
|
|
@ -365,7 +365,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
/*! Obtain a Merge_2 functor object */
|
||||
/*! obtains a Merge_2 functor object */
|
||||
Merge_2 merge_2_object() const { return Merge_2(this); }
|
||||
//@}
|
||||
|
||||
|
|
@ -373,14 +373,13 @@ 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(); }
|
||||
|
||||
class Compare_endpoints_xy_2 {
|
||||
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.
|
||||
|
|
@ -397,7 +396,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(); }
|
||||
//@}
|
||||
|
|
@ -408,7 +407,7 @@ public:
|
|||
//! Functor
|
||||
typedef typename Kernel::Construct_segment_2 Construct_curve_2;
|
||||
|
||||
/*! Obtain a Construct_curve_2 functor object. */
|
||||
/*! obtains a Construct_curve_2 functor object. */
|
||||
Construct_curve_2 construct_curve_2_object() const
|
||||
{ return this->construct_segment_2_object(); }
|
||||
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ protected:
|
|||
const Base_traits_2* m_base_traits;
|
||||
|
||||
public:
|
||||
/*! Constructor. */
|
||||
/*! constructs. */
|
||||
Arr_batched_point_location_traits_2(const Base_traits_2& tr) :
|
||||
m_base_traits(&tr)
|
||||
{}
|
||||
|
|
@ -184,7 +184,7 @@ public:
|
|||
//! The base operator.
|
||||
Base_construct_min_vertex_2 m_base_min_v;
|
||||
|
||||
/*! Constructor.
|
||||
/*! constructs.
|
||||
* The constructor is declared private to allow only the functor
|
||||
* obtaining function, which is a member of the nesting class,
|
||||
* constructing it.
|
||||
|
|
@ -197,8 +197,7 @@ public:
|
|||
friend class Arr_batched_point_location_traits_2<Arrangement_2>;
|
||||
|
||||
public:
|
||||
/*!
|
||||
* Get the left endpoint of the x-monotone curve (segment).
|
||||
/*! obtains the left endpoint of the x-monotone curve (segment).
|
||||
* \param xcv The curve.
|
||||
* \return The left endpoint.
|
||||
*/
|
||||
|
|
@ -211,7 +210,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
/*! Obtain 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
|
||||
|
|
@ -224,7 +223,7 @@ public:
|
|||
//! The base operator.
|
||||
Base_construct_max_vertex_2 m_base_max_v;
|
||||
|
||||
/*! Constructor.
|
||||
/*! constructs.
|
||||
* The constructor is declared private to allow only the functor
|
||||
* obtaining function, which is a member of the nesting class,
|
||||
* constructing it.
|
||||
|
|
@ -237,8 +236,7 @@ public:
|
|||
friend class Arr_batched_point_location_traits_2<Arrangement_2>;
|
||||
|
||||
public:
|
||||
/*!
|
||||
* Get the right endpoint of the x-monotone curve .
|
||||
/*! obtains the right endpoint of the x-monotone curve .
|
||||
* \param xcv The curve.
|
||||
* \return The right endpoint.
|
||||
*/
|
||||
|
|
@ -251,7 +249,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
/*! Obtain a Construct_min_vertex_2 functor object. */
|
||||
/*! obtains a Construct_min_vertex_2 functor object. */
|
||||
Construct_max_vertex_2 construct_max_vertex_2_object() const
|
||||
{
|
||||
return
|
||||
|
|
@ -266,7 +264,7 @@ public:
|
|||
|
||||
Vertex_const_handle invalid_v;
|
||||
|
||||
/*! Constructor.
|
||||
/*! constructs.
|
||||
* The constructor is declared private to allow only the functor
|
||||
* obtaining function, which is a member of the nesting class,
|
||||
* constructing it.
|
||||
|
|
@ -280,8 +278,7 @@ public:
|
|||
friend class Arr_batched_point_location_traits_2<Arrangement_2>;
|
||||
|
||||
public:
|
||||
/*!
|
||||
* Get the left endpoint of the x-monotone curve (segment).
|
||||
/*! obtains the left endpoint of the x-monotone curve (segment).
|
||||
* \param xcv The curve.
|
||||
* \return The left endpoint.
|
||||
*/
|
||||
|
|
@ -295,7 +292,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
/*! Obtain a Construct_min_vertex_2 functor object. */
|
||||
/*! obtains a Construct_min_vertex_2 functor object. */
|
||||
Compare_xy_2 compare_xy_2_object() const
|
||||
{ return Compare_xy_2(m_base_traits->compare_xy_2_object()); }
|
||||
|
||||
|
|
@ -307,7 +304,7 @@ public:
|
|||
//! The base operator.
|
||||
Base_compare_y_at_x_2 m_base_cmp_y_at_x;
|
||||
|
||||
/*! Constructor.
|
||||
/*! constructs.
|
||||
* The constructor is declared private to allow only the functor
|
||||
* obtaining function, which is a member of the nesting class,
|
||||
* constructing it.
|
||||
|
|
@ -325,7 +322,7 @@ public:
|
|||
{ return (m_base_cmp_y_at_x(p.base(), xcv.base())); }
|
||||
};
|
||||
|
||||
/*! Obtain a Compare_y_at_x_2 function object. */
|
||||
/*! obtains a Compare_y_at_x_2 function object. */
|
||||
Compare_y_at_x_2 compare_y_at_x_2_object() const
|
||||
{ return (Compare_y_at_x_2(m_base_traits->compare_y_at_x_2_object())); }
|
||||
|
||||
|
|
@ -337,7 +334,7 @@ public:
|
|||
//! The base operator.
|
||||
Base_compare_y_at_x_right_2 m_base_cmp_y_at_x_right;
|
||||
|
||||
/*! Constructor.
|
||||
/*! constructs.
|
||||
* The constructor is declared private to allow only the functor
|
||||
* obtaining function, which is a member of the nesting class,
|
||||
* constructing it.
|
||||
|
|
@ -356,7 +353,7 @@ public:
|
|||
{ return (m_base_cmp_y_at_x_right(xcv1.base(), xcv2.base(), p.base())); }
|
||||
};
|
||||
|
||||
/*! Obtain a Compare_y_at_x_right_2 function object. */
|
||||
/*! obtains a Compare_y_at_x_right_2 function object. */
|
||||
Compare_y_at_x_right_2 compare_y_at_x_right_2_object() const
|
||||
{
|
||||
return (Compare_y_at_x_right_2
|
||||
|
|
@ -374,7 +371,7 @@ public:
|
|||
Vertex_const_handle invalid_v;
|
||||
Halfedge_const_handle invalid_he;
|
||||
|
||||
/*! Constructor.
|
||||
/*! constructs.
|
||||
* The constructor is declared private to allow only the functor
|
||||
* obtaining function, which is a member of the nesting class,
|
||||
* constructing it.
|
||||
|
|
@ -389,7 +386,7 @@ public:
|
|||
friend class Arr_batched_point_location_traits_2<Arrangement_2>;
|
||||
|
||||
public:
|
||||
/*! Check if two curves are the same. */
|
||||
/*! checks if two curves are the same. */
|
||||
bool operator()(const X_monotone_curve_2& xcv1,
|
||||
const X_monotone_curve_2& xcv2) const
|
||||
{
|
||||
|
|
@ -400,7 +397,7 @@ public:
|
|||
return (m_base_eq(xcv1.base(), xcv2.base()));
|
||||
}
|
||||
|
||||
/*! Check if the two points are the same. */
|
||||
/*! checks if the two points are the same. */
|
||||
bool operator()(const Point_2& p1, const Point_2& p2) const
|
||||
{
|
||||
if (p1.vertex_handle() == p2.vertex_handle() &&
|
||||
|
|
@ -411,7 +408,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
/*! Obtain an `Equal_2` function object. */
|
||||
/*! obtains an `Equal_2` function object. */
|
||||
Equal_2 equal_2_object() const
|
||||
{ return (Equal_2(m_base_traits->equal_2_object())); }
|
||||
|
||||
|
|
@ -421,7 +418,7 @@ public:
|
|||
//! The base operator.
|
||||
Base_compare_x_2 m_base_cmp_x;
|
||||
|
||||
/*! Constructor.
|
||||
/*! constructs.
|
||||
* The constructor is declared private to allow only the functor
|
||||
* obtaining function, which is a member of the nesting class,
|
||||
* constructing it.
|
||||
|
|
@ -436,7 +433,7 @@ public:
|
|||
{ return (m_base_cmp_x(p1.base(), p2.base())); }
|
||||
};
|
||||
|
||||
/*! Obtain a Compare_x_2 function object. */
|
||||
/*! obtains a Compare_x_2 function object. */
|
||||
Compare_x_2 compare_x_2_object() const
|
||||
{ return (Compare_x_2(m_base_traits->compare_x_2_object())); }
|
||||
|
||||
|
|
@ -446,7 +443,7 @@ public:
|
|||
//! The base operator.
|
||||
Base_is_vertical_2 m_base_is_vert;
|
||||
|
||||
/*! Constructor.
|
||||
/*! constructs.
|
||||
* The constructor is declared private to allow only the functor
|
||||
* obtaining function, which is a member of the nesting class,
|
||||
* constructing it.
|
||||
|
|
@ -461,7 +458,7 @@ public:
|
|||
{ return (m_base_is_vert(xcv.base())); }
|
||||
};
|
||||
|
||||
/*! Obtain a Is_vertical_2 function object. */
|
||||
/*! obtains a Is_vertical_2 function object. */
|
||||
Is_vertical_2 is_vertical_2_object() const
|
||||
{ return (Is_vertical_2(m_base_traits->is_vertical_2_object())); }
|
||||
|
||||
|
|
@ -476,7 +473,7 @@ public:
|
|||
//! The base traits.
|
||||
const Base_traits_2* m_base;
|
||||
|
||||
/*! Constructor.
|
||||
/*! constructs.
|
||||
* The constructor is declared private to allow only the functor
|
||||
* obtaining function, which is a member of the nesting class,
|
||||
* constructing it.
|
||||
|
|
@ -498,7 +495,7 @@ public:
|
|||
{ return m_base->parameter_space_in_x_2_object() (xcv.base()); }
|
||||
};
|
||||
|
||||
/*! Obtain a Parameter_space_in_x_2 function object */
|
||||
/*! obtains a Parameter_space_in_x_2 function object */
|
||||
Parameter_space_in_x_2 parameter_space_in_x_2_object() const
|
||||
{ return Parameter_space_in_x_2(m_base_traits); }
|
||||
|
||||
|
|
@ -510,7 +507,7 @@ public:
|
|||
//! The base traits.
|
||||
const Base_traits_2* m_base;
|
||||
|
||||
/*! Constructor.
|
||||
/*! constructs.
|
||||
* The constructor is declared private to allow only the functor
|
||||
* obtaining function, which is a member of the nesting class,
|
||||
* constructing it.
|
||||
|
|
@ -528,7 +525,7 @@ public:
|
|||
{ return m_base->is_on_x_identification_2_object()(xcv.base()); }
|
||||
};
|
||||
|
||||
/*! Obtain a Is_on_x_identification_2 function object */
|
||||
/*! obtains a Is_on_x_identification_2 function object */
|
||||
Is_on_x_identification_2 is_on_x_identification_2_object() const
|
||||
{ return Is_on_x_identification_2(m_base_traits); }
|
||||
|
||||
|
|
@ -540,7 +537,7 @@ public:
|
|||
//! The base traits.
|
||||
const Base_traits_2* m_base;
|
||||
|
||||
/*! Constructor.
|
||||
/*! constructs.
|
||||
* \param tr The base traits class. It must be passed, to handle
|
||||
* non stateless traits (e.g., it stores data).
|
||||
* The constructor is declared private to allow only the functor
|
||||
|
|
@ -574,7 +571,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
/*! Obtain a Compare_y_on_boundary_2 functor object. */
|
||||
/*! obtains a Compare_y_on_boundary_2 functor object. */
|
||||
Compare_y_on_boundary_2 compare_y_on_boundary_2_object() const
|
||||
{ return Compare_y_on_boundary_2(m_base_traits); }
|
||||
|
||||
|
|
@ -586,7 +583,7 @@ public:
|
|||
//! The base traits.
|
||||
const Base_traits_2* m_base;
|
||||
|
||||
/*! Constructor.
|
||||
/*! constructs.
|
||||
* \param tr The base traits class. It must be passed, to handle
|
||||
* non stateless traits (e.g., it stores data).
|
||||
* The constructor is declared private to allow only the functor
|
||||
|
|
@ -610,7 +607,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
/*! Obtain a Compare_y_near_boundary_2 functor object. */
|
||||
/*! obtains a Compare_y_near_boundary_2 functor object. */
|
||||
Compare_y_near_boundary_2 compare_y_near_boundary_2_object() const
|
||||
{ return Compare_y_near_boundary_2(m_base_traits); }
|
||||
|
||||
|
|
@ -624,7 +621,7 @@ public:
|
|||
//! The base traits.
|
||||
const Base_traits_2* m_base;
|
||||
|
||||
/*! Constructor.
|
||||
/*! constructs.
|
||||
* The constructor is declared private to allow only the functor
|
||||
* obtaining function, which is a member of the nesting class,
|
||||
* constructing it.
|
||||
|
|
@ -646,7 +643,7 @@ public:
|
|||
{ return m_base->parameter_space_in_y_2_object()(xcv.base()); }
|
||||
};
|
||||
|
||||
/*! Obtain a Parameter_space_in_y_2 function object */
|
||||
/*! obtains a Parameter_space_in_y_2 function object */
|
||||
Parameter_space_in_y_2 parameter_space_in_y_2_object() const
|
||||
{ return Parameter_space_in_y_2(m_base_traits); }
|
||||
|
||||
|
|
@ -658,7 +655,7 @@ public:
|
|||
//! The base traits.
|
||||
const Base_traits_2* m_base;
|
||||
|
||||
/*! Constructor.
|
||||
/*! constructs.
|
||||
* The constructor is declared private to allow only the functor
|
||||
* obtaining function, which is a member of the nesting class,
|
||||
* constructing it.
|
||||
|
|
@ -676,7 +673,7 @@ public:
|
|||
{ return m_base->is_on_y_identification_2_object()(xcv.base()); }
|
||||
};
|
||||
|
||||
/*! Obtain a Is_on_y_identification_2 function object */
|
||||
/*! obtains a Is_on_y_identification_2 function object */
|
||||
Is_on_y_identification_2 is_on_y_identification_2_object() const
|
||||
{ return Is_on_y_identification_2(m_base_traits); }
|
||||
|
||||
|
|
@ -688,7 +685,7 @@ public:
|
|||
//! The base traits.
|
||||
const Base_traits_2* m_base;
|
||||
|
||||
/*! Constructor.
|
||||
/*! constructs.
|
||||
* \param tr The base traits class. It must be passed, to handle
|
||||
* non stateless traits (e.g., it stores data).
|
||||
* The constructor is declared private to allow only the functor
|
||||
|
|
@ -722,7 +719,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
/*! Obtain a Compare_x_on_boundary_2 functor object. */
|
||||
/*! obtains a Compare_x_on_boundary_2 functor object. */
|
||||
Compare_x_on_boundary_2 compare_x_on_boundary_2_object() const
|
||||
{ return Compare_x_on_boundary_2(m_base_traits); }
|
||||
|
||||
|
|
@ -734,7 +731,7 @@ public:
|
|||
//! The base traits.
|
||||
const Base_traits_2* m_base;
|
||||
|
||||
/*! Constructor.
|
||||
/*! constructs.
|
||||
* \param tr The base traits class. It must be passed, to handle
|
||||
* non stateless traits (e.g., it stores data).
|
||||
* The constructor is declared private to allow only the functor
|
||||
|
|
@ -757,7 +754,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
/*! Obtain a Compare_x_near_boundary_2 function object. */
|
||||
/*! obtains a Compare_x_near_boundary_2 function object. */
|
||||
Compare_x_near_boundary_2 compare_x_near_boundary_2_object() const
|
||||
{ return Compare_x_near_boundary_2(m_base_traits); }
|
||||
};
|
||||
|
|
|
|||
|
|
@ -98,14 +98,14 @@ public:
|
|||
bool is_empty() const { return nn.is_empty(); }
|
||||
|
||||
private:
|
||||
/*! Copy constructor - not supported. */
|
||||
/*! Copy constructor not supported. */
|
||||
Arr_landmarks_generator_base(const Self&);
|
||||
|
||||
/*! Assignment operator - not supported. */
|
||||
/*! Assignment operator not supported. */
|
||||
Self& operator=(const Self& );
|
||||
|
||||
public:
|
||||
/*! Constructor from an arrangement.
|
||||
/*! constructs from an arrangement.
|
||||
* \param arr (in) The arrangement.
|
||||
*/
|
||||
Arr_landmarks_generator_base(const Base_aos& arr) :
|
||||
|
|
@ -120,7 +120,7 @@ public:
|
|||
// inherited class.
|
||||
}
|
||||
|
||||
/*! Create the landmarks set (choosing the landmarks) ,
|
||||
/*! creates the landmarks set (choosing the landmarks) ,
|
||||
* and saving them in the nearest-neighbor search structure.
|
||||
*/
|
||||
virtual void build_landmark_set() {
|
||||
|
|
@ -136,7 +136,7 @@ public:
|
|||
updated = true;
|
||||
}
|
||||
|
||||
/*! clear the set of landmarks.
|
||||
/*! clears the set of landmarks.
|
||||
*/
|
||||
virtual void clear_landmark_set() {
|
||||
nn.clear();
|
||||
|
|
@ -144,7 +144,7 @@ public:
|
|||
updated = false;
|
||||
}
|
||||
|
||||
/*! Obtain the nearest neighbor (landmark) to the given point.
|
||||
/*! obtains the nearest neighbor (landmark) to the given point.
|
||||
* \param p The query point.
|
||||
* \param obj Output: The location of the nearest landmark point in the
|
||||
* arrangement (a vertex, halfedge, or face handle).
|
||||
|
|
@ -399,7 +399,7 @@ public:
|
|||
//@}
|
||||
|
||||
protected:
|
||||
/*! Create the list of landmarks with their location.
|
||||
/*! creates the list of landmarks with their location.
|
||||
* This is a pure virtual function, and the class that inherites from
|
||||
* this generator must implement it.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -82,14 +82,14 @@ protected:
|
|||
// number of landmarks as parameter
|
||||
|
||||
private:
|
||||
/*! Copy constructor - not supported. */
|
||||
/*! Copy constructor not supported. */
|
||||
Arr_grid_landmarks_generator(const Self&);
|
||||
|
||||
/*! Assignment operator - not supported. */
|
||||
/*! Assignment operator not supported. */
|
||||
Self& operator=(const Self&);
|
||||
|
||||
public:
|
||||
/*! Constructor from an arrangement.
|
||||
/*! constructs from an arrangement.
|
||||
* \param arr (in) The arrangement.
|
||||
*/
|
||||
Arr_grid_landmarks_generator(const Arrangement_2& arr) :
|
||||
|
|
@ -111,7 +111,7 @@ public:
|
|||
build_landmark_set();//this->
|
||||
}
|
||||
|
||||
/*! Create the landmarks set (choosing the landmarks),
|
||||
/*! creates the landmarks set (choosing the landmarks),
|
||||
* and store them in the nearest neighbor search structure.
|
||||
*/
|
||||
virtual void build_landmark_set()
|
||||
|
|
@ -128,7 +128,7 @@ public:
|
|||
this->updated = true;
|
||||
}
|
||||
|
||||
/*! Clear the set of landmarks.
|
||||
/*! clears the set of landmarks.
|
||||
*/
|
||||
virtual void clear_landmark_set()
|
||||
{
|
||||
|
|
@ -136,7 +136,7 @@ public:
|
|||
this->updated = false;
|
||||
}
|
||||
|
||||
/*! Obtain the nearest neighbor (landmark) to the given point.
|
||||
/*! obtains the nearest neighbor (landmark) to the given point.
|
||||
* \param q The query point.
|
||||
* \param obj (out) The location of the nearest landmark point in the
|
||||
* arrangement (a vertex, halfedge, or face handle).
|
||||
|
|
@ -165,7 +165,7 @@ public:
|
|||
}
|
||||
|
||||
protected:
|
||||
/*! Create a set of landmark points on a grid.
|
||||
/*! creates a set of landmark points on a grid.
|
||||
*/
|
||||
virtual void _create_points_set(Points_set& points)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -64,10 +64,10 @@ public:
|
|||
Approximate_number_type m_vec[2]; // Approximate point x and y-coordinates.
|
||||
|
||||
public:
|
||||
/*! Default constructor. */
|
||||
/*! constructs default. */
|
||||
NN_Point_2() { m_vec[0] = m_vec[1] = 0; }
|
||||
|
||||
/*! Constructor from a point. */
|
||||
/*! constructs from a point. */
|
||||
NN_Point_2(const Point_2& p) :
|
||||
m_point(p)
|
||||
{
|
||||
|
|
@ -77,7 +77,7 @@ public:
|
|||
m_vec[1] = m_traits.approximate_2_object()(p, 1);
|
||||
}
|
||||
|
||||
/*! Constructor from a point and an its location in the arrangement. */
|
||||
/*! constructs from a point and an its location in the arrangement. */
|
||||
NN_Point_2(const Point_2& p, const PL_result_type obj) :
|
||||
m_point(p),
|
||||
m_object(obj)
|
||||
|
|
@ -94,10 +94,10 @@ public:
|
|||
/* Get the object representing the location in the arrangement. */
|
||||
const PL_result_type& object() const { return (m_object); }
|
||||
|
||||
/*! Get an iterator for the approximate coordinates. */
|
||||
/*! obtains an iterator for the approximate coordinates. */
|
||||
const Approximate_number_type* begin() const { return (m_vec); }
|
||||
|
||||
/*! Get a past-the-end iterator for the approximate coordinates. */
|
||||
/*! obtains a past-the-end iterator for the approximate coordinates. */
|
||||
const Approximate_number_type* end() const { return (m_vec + 2); }
|
||||
|
||||
/*! Equality operators. */
|
||||
|
|
@ -116,11 +116,11 @@ public:
|
|||
{
|
||||
typedef const Approximate_number_type* result_type;
|
||||
|
||||
/*! Get an iterator for the approximate coordinates. */
|
||||
/*! obtains an iterator for the approximate coordinates. */
|
||||
const Approximate_number_type* operator()(const NN_Point_2& nnp) const
|
||||
{ return (nnp.begin()); }
|
||||
|
||||
/*! Get a past-the-end iterator for the approximate coordinates. */
|
||||
/*! obtains a past-the-end iterator for the approximate coordinates. */
|
||||
const Approximate_number_type* operator()(const NN_Point_2& nnp, int) const
|
||||
{ return (nnp.end()); }
|
||||
};
|
||||
|
|
@ -143,24 +143,23 @@ public:
|
|||
private:
|
||||
typedef Arr_landmarks_nearest_neighbor<Arrangement_2> Self;
|
||||
|
||||
/*! Copy constructor - not supported. */
|
||||
/*! Copy constructor not supported. */
|
||||
Arr_landmarks_nearest_neighbor(const Self&);
|
||||
|
||||
/*! Assignment operator - not supported. */
|
||||
/*! Assignment operator not supported. */
|
||||
Self& operator=(const Self&);
|
||||
|
||||
public:
|
||||
/*! Default constructor. */
|
||||
/*! constructs default. */
|
||||
Arr_landmarks_nearest_neighbor () :
|
||||
m_tree(nullptr),
|
||||
m_is_empty(true)
|
||||
{}
|
||||
|
||||
/*! Destructor. */
|
||||
/*! destructs. */
|
||||
~Arr_landmarks_nearest_neighbor() { clear(); }
|
||||
|
||||
/*!
|
||||
* Allocate the search tree and initialize it with landmark points.
|
||||
/*! allocates the search tree and initialize it with landmark points.
|
||||
* \param begin An iterator for the first landmark point.
|
||||
* \param end A past-the-end iterator for the landmark points.
|
||||
* \pre The search tree is not initialized.
|
||||
|
|
@ -181,7 +180,7 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
/*! Clear the search tree. */
|
||||
/*! clears the search tree. */
|
||||
void clear()
|
||||
{
|
||||
if (m_tree != nullptr)
|
||||
|
|
@ -190,8 +189,7 @@ public:
|
|||
m_is_empty = true;
|
||||
}
|
||||
|
||||
/*!
|
||||
* Find the nearest landmark point to the query point.
|
||||
/*! finds the nearest landmark point to the query point.
|
||||
* \param q The query point.
|
||||
* \param obj Output: The location of the nearest landmark point in the
|
||||
* arrangement (a vertex, halfedge, or face handle).
|
||||
|
|
|
|||
|
|
@ -171,7 +171,7 @@ public:
|
|||
/*! The traits (in case it has state) */
|
||||
const Traits* m_traits;
|
||||
|
||||
/*! Constructor
|
||||
/*! constructs
|
||||
* \param traits the traits (in case it has state)
|
||||
* The constructor is declared private to allow only the functor
|
||||
* obtaining function, which is a member of the nesting class,
|
||||
|
|
@ -352,7 +352,7 @@ public:
|
|||
|
||||
};
|
||||
|
||||
/*! Obtain a Compare_curve_end_x_2 functor object. */
|
||||
/*! obtains a Compare_curve_end_x_2 functor object. */
|
||||
Compare_curve_end_x_2 compare_curve_end_x_2_object () const
|
||||
{
|
||||
return Compare_curve_end_x_2(this);
|
||||
|
|
@ -371,7 +371,7 @@ public:
|
|||
/*! The traits (in case it has state) */
|
||||
const Traits* m_traits;
|
||||
|
||||
/*! Constructor
|
||||
/*! constructs
|
||||
* \param traits the traits (in case it has state)
|
||||
* The constructor is declared private to allow only the functor
|
||||
* obtaining function, which is a member of the nesting class,
|
||||
|
|
@ -481,7 +481,7 @@ public:
|
|||
|
||||
};
|
||||
|
||||
/*! Obtain a Compare_y_at_x_2 functor object. */
|
||||
/*! obtains a Compare_y_at_x_2 functor object. */
|
||||
Compare_curve_end_y_at_x_2 compare_curve_end_y_at_x_2_object () const
|
||||
{
|
||||
return Compare_curve_end_y_at_x_2(this);
|
||||
|
|
@ -498,7 +498,7 @@ public:
|
|||
const Traits* m_traits;
|
||||
const Traits_base* m_traits_base; //MICHAL: rational-upd
|
||||
|
||||
/*! Constructor
|
||||
/*! constructs
|
||||
* \param traits the traits (in case it has state)
|
||||
* The constructor is declared private to allow only the functor
|
||||
* obtaining function, which is a member of the nesting class,
|
||||
|
|
@ -586,7 +586,7 @@ public:
|
|||
|
||||
};
|
||||
|
||||
/*! Obtain an Equal_curve_end_2 functor object. */
|
||||
/*! obtains an Equal_curve_end_2 functor object. */
|
||||
Equal_curve_end_2 equal_curve_end_2_object () const
|
||||
{
|
||||
return Equal_curve_end_2(this);
|
||||
|
|
@ -601,7 +601,7 @@ public:
|
|||
/*! The traits (in case it has state) */
|
||||
const Traits* m_traits;
|
||||
|
||||
/*! Constructor
|
||||
/*! constructs
|
||||
* \param traits the traits (in case it has state)
|
||||
* The constructor is declared private to allow only the functor
|
||||
* obtaining function, which is a member of the nesting class,
|
||||
|
|
@ -613,8 +613,7 @@ public:
|
|||
friend class Td_traits<Traits_base, Arrangement_on_surface_2>;
|
||||
|
||||
public:
|
||||
/*!
|
||||
* Compare two edge ends lexigoraphically: by x, then by y.
|
||||
/*! compares two edge ends lexigoraphically: by x, then by y.
|
||||
* \param cv1, cv1_end The first cv end.
|
||||
* \param cv2, cv2_end The second cv end.
|
||||
* \return LARGER if x(cv1-end) > x(cv2-end),
|
||||
|
|
@ -860,15 +859,12 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
/*! Obtain a Compare_curve_end_xy_2 functor object. */
|
||||
/*! obtains a Compare_curve_end_xy_2 functor object. */
|
||||
Compare_curve_end_xy_2 compare_curve_end_xy_2_object () const
|
||||
{
|
||||
return Compare_curve_end_xy_2(this);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// Td_traits class ctors and dtor
|
||||
|
||||
Td_traits(const Traits_base& t) : Traits_base(t)
|
||||
|
|
|
|||
|
|
@ -85,20 +85,20 @@ protected:
|
|||
enum { INVALID_INDEX = 0xffffffff };
|
||||
|
||||
public:
|
||||
/*! Construct default. */
|
||||
/*! constructs default. */
|
||||
Arr_polycurve_basic_traits_2() :
|
||||
m_subcurve_traits(new Subcurve_traits_2()),
|
||||
m_own_traits(true)
|
||||
{}
|
||||
|
||||
/*! Construct from a subcurve traits.
|
||||
/*! constructs from a subcurve traits.
|
||||
* \param seg_traits an already existing subcurve tarits, which is passed in;
|
||||
* it will be used by the class.
|
||||
*/
|
||||
Arr_polycurve_basic_traits_2(const Subcurve_traits_2* geom_traits) :
|
||||
m_subcurve_traits(geom_traits), m_own_traits(false) {}
|
||||
|
||||
/*! Construct copy.
|
||||
/*! constructs copy.
|
||||
* If the 'other' polycurve traits owns its subcurve traits, then make
|
||||
* this polycurve traits own its subcurve traits as well
|
||||
* \param other the other traits.
|
||||
|
|
@ -117,7 +117,7 @@ public:
|
|||
~Arr_polycurve_basic_traits_2()
|
||||
{ if (m_own_traits) delete m_subcurve_traits; }
|
||||
|
||||
/*! Obtain the subcurve traits.
|
||||
/*! obtains the subcurve traits.
|
||||
* \return the subcurve traits.
|
||||
*/
|
||||
const Subcurve_traits_2* subcurve_traits_2() const
|
||||
|
|
@ -147,13 +147,13 @@ public:
|
|||
|
||||
friend class Arr_polycurve_basic_traits_2<Subcurve_traits_2>;
|
||||
|
||||
/*! Constructor. */
|
||||
/*! constructs. */
|
||||
Compare_x_2(const Polycurve_basic_traits_2& traits) :
|
||||
m_poly_traits(traits)
|
||||
{}
|
||||
|
||||
public:
|
||||
/*! Compare the \f$x\f$-coordinates of two directional points.
|
||||
/*! compares the \f$x\f$-coordinates of two directional points.
|
||||
* \param p1 the first directional point.
|
||||
* \param p2 the second directional point.
|
||||
* \return `SMALLER` - \f$x\f$(`p1`) < \f$x\f$(`p2`);
|
||||
|
|
@ -165,7 +165,7 @@ public:
|
|||
Comparison_result operator()(const Point_2& p1, const Point_2& p2) const
|
||||
{ return m_poly_traits.subcurve_traits_2()->compare_x_2_object()(p1, p2); }
|
||||
|
||||
/*! Compare two ends of \f$x\f$-monotone curves in \f$x\f$.
|
||||
/*! compares two ends of \f$x\f$-monotone curves in \f$x\f$.
|
||||
* \param xs1 the first curve.
|
||||
* \param ce1 the curve-end indicator of the first \f$x\f$-monotone curve
|
||||
* `xs1`:
|
||||
|
|
@ -177,7 +177,7 @@ public:
|
|||
Arr_curve_end ce1, const Point_2& p2)
|
||||
{ return operator()(xs1, ce1, p2, All_sides_oblivious_category()); }
|
||||
|
||||
/*! Compare two ends of \f$x\f$-monotone curves in x.
|
||||
/*! compares two ends of \f$x\f$-monotone curves in x.
|
||||
* \param xs1 the first curve.
|
||||
* \param ce1 the curve-end indicator of the first \f$x\f$-monotone curve
|
||||
* `xs1`:
|
||||
|
|
@ -296,7 +296,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
/*! Obtain 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(*this); }
|
||||
|
||||
//! Compare two curve-ends or points lexigoraphically: by x, then by y.
|
||||
|
|
@ -310,13 +310,13 @@ public:
|
|||
|
||||
friend class Arr_polycurve_basic_traits_2<Subcurve_traits_2>;
|
||||
|
||||
/*! Constructor. */
|
||||
/*! constructs. */
|
||||
Compare_xy_2(const Polycurve_basic_traits_2& traits) :
|
||||
m_poly_traits(traits)
|
||||
{}
|
||||
|
||||
public:
|
||||
/*! Compare two directional points lexigoraphically: by \f$x\f$, then by
|
||||
/*! compares two directional points lexigoraphically: by \f$x\f$, then by
|
||||
* \f$y\f$.
|
||||
* \param p1 the first endpoint directional point.
|
||||
* \param p2 the second endpoint directional point.
|
||||
|
|
@ -332,7 +332,7 @@ public:
|
|||
Comparison_result operator()(const Point_2& p1, const Point_2& p2) const
|
||||
{ return m_poly_traits.subcurve_traits_2()->compare_xy_2_object()(p1, p2); }
|
||||
|
||||
/*! Compare two ends of \f$x\f$-monotone curves lexicographically.
|
||||
/*! compares two ends of \f$x\f$-monotone curves lexicographically.
|
||||
* \param xs1 the first curve.
|
||||
* \param ce1 the curve-end indicator of the first \f$x\f$-monotone curve
|
||||
* `xs1`:
|
||||
|
|
@ -344,7 +344,7 @@ public:
|
|||
Arr_curve_end ce1, const Point_2& p2)
|
||||
{ return operator()(xs1, ce1, p2, All_sides_oblivious_category()); }
|
||||
|
||||
/*! Compare two ends of \f$x\f$-monotone curves lexicographically.
|
||||
/*! compares two ends of \f$x\f$-monotone curves lexicographically.
|
||||
* \param xs1 the first curve.
|
||||
* \param ce1 the curve-end indicator of the first \f$x\f$-monotone curve
|
||||
* `xs1`:
|
||||
|
|
@ -517,7 +517,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
/*! Obtain 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(*this); }
|
||||
|
||||
/*! A functor that obtain the lexicographically smallest endpoint of an
|
||||
|
|
@ -533,13 +533,13 @@ public:
|
|||
|
||||
friend class Arr_polycurve_basic_traits_2<Subcurve_traits_2>;
|
||||
|
||||
/* Constructor. */
|
||||
/*! constructs. */
|
||||
Construct_min_vertex_2(const Polycurve_basic_traits_2& traits) :
|
||||
m_poly_traits(traits)
|
||||
{}
|
||||
|
||||
public:
|
||||
/*! Obtain the left endpoint of the \f$x\f$-monotone polycurve. The return
|
||||
/*! obtains the left endpoint of the \f$x\f$-monotone polycurve. The return
|
||||
* type is the same as the return type of the corresponding operator in the
|
||||
* functor of the subtraits, which is either by value or by reference.
|
||||
* \param xcv the polycurve curve.
|
||||
|
|
@ -561,7 +561,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
/*! Obtain 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(*this); }
|
||||
|
||||
|
|
@ -578,13 +578,13 @@ public:
|
|||
|
||||
friend class Arr_polycurve_basic_traits_2<Subcurve_traits_2>;
|
||||
|
||||
/*! Constructor. */
|
||||
/*! constructs. */
|
||||
Construct_max_vertex_2(const Polycurve_basic_traits_2& traits) :
|
||||
m_poly_traits(traits)
|
||||
{}
|
||||
|
||||
public:
|
||||
/*! Obtain the right endpoint of the \f$x\f$-monotone polycurve. The return
|
||||
/*! obtains the right endpoint of the \f$x\f$-monotone polycurve. The return
|
||||
* type is the same as the return type of the corresponding operator in the
|
||||
* functor of the subtraits, which is either by value or by reference.
|
||||
* \param xcv the polycurve.
|
||||
|
|
@ -603,7 +603,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
/*! Obtain 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(*this); }
|
||||
|
||||
|
|
@ -618,13 +618,13 @@ public:
|
|||
|
||||
friend class Arr_polycurve_basic_traits_2<Subcurve_traits_2>;
|
||||
|
||||
/*! Constructor. */
|
||||
/*! constructs. */
|
||||
Is_vertical_2(const Polycurve_basic_traits_2& traits) :
|
||||
m_poly_traits(traits)
|
||||
{}
|
||||
|
||||
public:
|
||||
/*! Check whether the given \f$x\f$-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.
|
||||
*/
|
||||
|
|
@ -637,7 +637,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
/*! Obtain 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(*this); }
|
||||
|
||||
/*! A functor that compares the \f$y\f$-coordinates of a point and an
|
||||
|
|
@ -762,13 +762,13 @@ public:
|
|||
|
||||
friend class Arr_polycurve_basic_traits_2<Subcurve_traits_2>;
|
||||
|
||||
/*! Constructor. */
|
||||
/*! constructs. */
|
||||
Compare_y_at_x_2(const Polycurve_basic_traits_2& traits) :
|
||||
m_poly_traits(traits)
|
||||
{}
|
||||
|
||||
public:
|
||||
/*! Obtain the location of the given point with respect to the input curve.
|
||||
/*! obtains the location of the given point with respect to the input curve.
|
||||
* \param p the point.
|
||||
* \param xcv the polycurve curve.
|
||||
* \pre `p` is in the \f$x\f$-range of `xcv`.
|
||||
|
|
@ -781,7 +781,7 @@ public:
|
|||
const X_monotone_curve_2& xcv) const
|
||||
{ return operator()(p, xcv, All_sides_oblivious_category()); }
|
||||
|
||||
/*! Obtain the location of the given curve_end with respect to the input
|
||||
/*! obtains the location of the given curve_end with respect to the input
|
||||
* curve.
|
||||
* \param xcv The polycurve curve.
|
||||
* \param ce the curve-end indicator of the \f$x\f$-monotone subcurve xl:
|
||||
|
|
@ -801,7 +801,7 @@ public:
|
|||
{ return operator()(xs1, ce1, xs2, All_sides_oblivious_category()); }
|
||||
};
|
||||
|
||||
/*! Obtain 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(*this); }
|
||||
|
||||
|
|
@ -818,13 +818,13 @@ public:
|
|||
|
||||
friend class Arr_polycurve_basic_traits_2<Subcurve_traits_2>;
|
||||
|
||||
/*! Constructor. */
|
||||
/*! constructs. */
|
||||
Compare_y_at_x_left_2(const Polycurve_basic_traits_2& traits) :
|
||||
m_poly_traits(traits)
|
||||
{}
|
||||
|
||||
public:
|
||||
/*! Compare the y value of two \f$x\f$-monotone curves immediately to the
|
||||
/*! compares the y value of two \f$x\f$-monotone curves immediately to the
|
||||
* left of their intersection point.
|
||||
* \param cv1 the first polycurve curve.
|
||||
* \param cv2 the second polycurve curve.
|
||||
|
|
@ -851,7 +851,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
/*! Obtain 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(*this); }
|
||||
|
||||
|
|
@ -868,13 +868,13 @@ public:
|
|||
|
||||
friend class Arr_polycurve_basic_traits_2<Subcurve_traits_2>;
|
||||
|
||||
/*! Constructor. */
|
||||
/*! constructs. */
|
||||
Compare_y_at_x_right_2(const Polycurve_basic_traits_2& traits) :
|
||||
m_poly_traits(traits)
|
||||
{}
|
||||
|
||||
public:
|
||||
/*! Compare the \f$y\f$-value of two \f$x\f$-monotone curves immediately to
|
||||
/*! compares the \f$y\f$-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.
|
||||
|
|
@ -901,7 +901,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
/*! Obtain 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(*this); }
|
||||
|
|
@ -919,11 +919,11 @@ public:
|
|||
|
||||
friend class Arr_polycurve_basic_traits_2<Subcurve_traits_2>;
|
||||
|
||||
/*! Constructor. */
|
||||
/*! constructs. */
|
||||
Equal_2(const Polycurve_basic_traits_2& poly_tr) : m_poly_traits(poly_tr) {}
|
||||
|
||||
public:
|
||||
/*! Check whether the two points are the same.
|
||||
/*! checks whether 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.
|
||||
|
|
@ -931,7 +931,7 @@ public:
|
|||
bool operator()(const Point_2& p1, const Point_2& p2) const
|
||||
{ return m_poly_traits.subcurve_traits_2()->equal_2_object()(p1, p2); }
|
||||
|
||||
/*! Check whether the two \f$x\f$-monotone curves are the same (have the
|
||||
/*! checks whether the two \f$x\f$-monotone curves are the same (have the
|
||||
* same graph).
|
||||
* \param cv1 the first curve.
|
||||
* \param cv2 the second curve.
|
||||
|
|
@ -1008,7 +1008,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
/*! Obtain an Equal_2 functor object. */
|
||||
/*! obtains an Equal_2 functor object. */
|
||||
Equal_2 equal_2_object() const { return Equal_2(*this); }
|
||||
|
||||
/*! A functor that lexicographically compares the endpoints of a curve. */
|
||||
|
|
@ -1022,13 +1022,13 @@ public:
|
|||
|
||||
friend class Arr_polycurve_basic_traits_2<Subcurve_traits_2>;
|
||||
|
||||
/*! Constructor. */
|
||||
/*! constructs. */
|
||||
Compare_endpoints_xy_2(const Polycurve_basic_traits_2& traits) :
|
||||
m_poly_traits(traits)
|
||||
{}
|
||||
|
||||
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 `cv` is oriented left-to-right;
|
||||
|
|
@ -1062,13 +1062,13 @@ public:
|
|||
|
||||
friend class Arr_polycurve_basic_traits_2<Subcurve_traits_2>;
|
||||
|
||||
/*! Constructor */
|
||||
/*! constructs */
|
||||
Construct_opposite_2(const Polycurve_basic_traits_2& traits) :
|
||||
m_poly_traits(traits)
|
||||
{}
|
||||
|
||||
public:
|
||||
/*! Construct the reversed \f$x\f$-monotone polycurve of the input.
|
||||
/*! constructs the reversed \f$x\f$-monotone polycurve of the input.
|
||||
* Note that the functor constructs the opposites of _all_ subcurves
|
||||
* constituting `xcv`.
|
||||
* \param xcv the \f$x\f$-monotone polycurve to be reveres
|
||||
|
|
@ -1132,7 +1132,7 @@ public:
|
|||
using Approximate_point_2 =
|
||||
typename has_approximate_2<Subcurve_traits_2>::Approximate_point_2;
|
||||
|
||||
/*! Obtain an Approximate_2 functor object. */
|
||||
/*! obtains an Approximate_2 functor object. */
|
||||
Approximate_2 approximate_2_object_impl(std::false_type) const
|
||||
{ return subcurve_traits_2()->approximate_2_object(); }
|
||||
|
||||
|
|
@ -1152,7 +1152,7 @@ public:
|
|||
//! The polycurve traits (in case it has state).
|
||||
const Polycurve_basic_traits_2& m_poly_traits;
|
||||
|
||||
/*! Constructor. */
|
||||
/*! constructs. */
|
||||
Construct_point_2(const Polycurve_basic_traits_2& traits) :
|
||||
m_poly_traits(traits)
|
||||
{}
|
||||
|
|
@ -1160,7 +1160,7 @@ public:
|
|||
friend class Arr_polycurve_basic_traits_2<Subcurve_traits_2>;
|
||||
|
||||
public:
|
||||
/*! Construct a point.
|
||||
/*! constructs a point.
|
||||
* Apply perfect forwarding.
|
||||
*/
|
||||
template <typename ... Args>
|
||||
|
|
@ -1171,7 +1171,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
/*! Obtain a Construct_x_monotone_curve_2 functor object. */
|
||||
/*! obtains a Construct_x_monotone_curve_2 functor object. */
|
||||
Construct_point_2 construct_point_2_object() const
|
||||
{ return Construct_point_2(*this); }
|
||||
|
||||
|
|
@ -1186,13 +1186,14 @@ public:
|
|||
|
||||
friend class Arr_polycurve_basic_traits_2<Subcurve_traits_2>;
|
||||
|
||||
/*! Constructor. */
|
||||
/*! constructs. */
|
||||
Construct_x_monotone_curve_2(const Polycurve_basic_traits_2& traits) :
|
||||
m_poly_traits(traits)
|
||||
{}
|
||||
|
||||
public:
|
||||
/*! Obtain an \f$x\f$-monotone polycurve that consists of one given subcurve.
|
||||
/*! obtains an \f$x\f$-monotone polycurve that consists of one given
|
||||
* subcurve.
|
||||
* \param seg input subcurve.
|
||||
* \pre seg is not degenerated.
|
||||
* \return an \f$x\f$-monotone polycurve with one subcurve.
|
||||
|
|
@ -1223,7 +1224,7 @@ public:
|
|||
return X_monotone_curve_2(seg);
|
||||
}
|
||||
|
||||
/*! Construct an \f$x\f$-monotone polycurve, which is well-oriented, from a
|
||||
/*! constructs an \f$x\f$-monotone polycurve, which is well-oriented, from a
|
||||
* range of elements.
|
||||
* \pre the elements in the range should form a continuous well-oriented
|
||||
* \f$x\f$-monotone polycurve.
|
||||
|
|
@ -1238,7 +1239,7 @@ public:
|
|||
return constructor_impl(begin, end, Is_point());
|
||||
}
|
||||
|
||||
/*! Construct an \f$x\f$-monotone polycurve from a range of points.
|
||||
/*! constructs an \f$x\f$-monotone polycurve from a range of points.
|
||||
* The polycurve may be oriented left-to-right or right-to-left
|
||||
* depending on the lexicographical order of the points in the input.
|
||||
* \pre range contains at least two points.
|
||||
|
|
@ -1253,7 +1254,7 @@ public:
|
|||
std::true_type) const
|
||||
{ CGAL_error_msg("Cannot construct a polycurve from a range of points!"); }
|
||||
|
||||
/*! Obtain an \f$x\f$-monotone polycurve from a range of subcurves.
|
||||
/*! obtains an \f$x\f$-monotone polycurve from a range of subcurves.
|
||||
* \param begin An iterator pointing to the first subcurve in the range.
|
||||
* \param end An iterator pointing to the past-the-end subcurve
|
||||
* in the range.
|
||||
|
|
@ -1345,7 +1346,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); }
|
||||
|
||||
|
|
@ -1368,13 +1369,13 @@ public:
|
|||
|
||||
friend class Arr_polycurve_basic_traits_2<Subcurve_traits_2>;
|
||||
|
||||
/*! Constructor. */
|
||||
/*! constructs. */
|
||||
Parameter_space_in_x_2(const Polycurve_basic_traits_2& traits) :
|
||||
m_poly_traits(traits)
|
||||
{}
|
||||
|
||||
public:
|
||||
/*! Obtains the parameter space at the end of a curve along the
|
||||
/*! obtains the parameter space at the end of a curve along the
|
||||
* \f$x\f$-axis. Note that if the curve-end coincides with a pole, then
|
||||
* unless the curve coincides with the identification curve, the curve-end
|
||||
* is considered to be approaching the boundary, but not on the boundary.
|
||||
|
|
@ -1405,7 +1406,7 @@ public:
|
|||
return geom_traits->parameter_space_in_x_2_object()(xs, ce);
|
||||
}
|
||||
|
||||
/*! Obtains the parameter space at a point along the \f$x\f$-axis.
|
||||
/*! obtains the parameter space at a point along the \f$x\f$-axis.
|
||||
* \param p the point.
|
||||
* \return the parameter space at `p`.
|
||||
* \pre `p` does not lie on the vertical identification curve.
|
||||
|
|
@ -1416,7 +1417,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
/*! Obtain a Parameter_space_in_x_2 function object */
|
||||
/*! obtains a Parameter_space_in_x_2 function object */
|
||||
Parameter_space_in_x_2 parameter_space_in_x_2_object() const
|
||||
{ return Parameter_space_in_x_2(*this); }
|
||||
|
||||
|
|
@ -1433,13 +1434,13 @@ public:
|
|||
|
||||
friend class Arr_polycurve_basic_traits_2<Subcurve_traits_2>;
|
||||
|
||||
/*! Constructor. */
|
||||
/*! constructs. */
|
||||
Parameter_space_in_y_2(const Polycurve_basic_traits_2& traits) :
|
||||
m_poly_traits(traits)
|
||||
{}
|
||||
|
||||
public:
|
||||
/*! Obtains the parameter space at the end of an curve along the
|
||||
/*! obtains the parameter space at the end of an curve along the
|
||||
* \f$y\f$-axis. Note that if the curve-end coincides with a pole, then
|
||||
* unless the curve coincides with the identification curve, the curve-end
|
||||
* is considered to be approaching the boundary, but not on the boundary.
|
||||
|
|
@ -1470,7 +1471,7 @@ public:
|
|||
return geom_traits->parameter_space_in_y_2_object()(xs, ce);
|
||||
}
|
||||
|
||||
/*! Obtains the parameter space at a point along the \f$y\f$-axis.
|
||||
/*! obtains the parameter space at a point along the \f$y\f$-axis.
|
||||
* \param p the point.
|
||||
* \return the parameter space at `p`.
|
||||
* \pre p does not lie on the horizontal identification curve.
|
||||
|
|
@ -1482,7 +1483,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
/*! Obtain a Parameter_space_in_y_2 function object */
|
||||
/*! obtains a Parameter_space_in_y_2 function object */
|
||||
Parameter_space_in_y_2 parameter_space_in_y_2_object() const
|
||||
{ return Parameter_space_in_y_2(*this); }
|
||||
|
||||
|
|
@ -1499,13 +1500,13 @@ public:
|
|||
|
||||
friend class Arr_polycurve_basic_traits_2<Subcurve_traits_2>;
|
||||
|
||||
/*! Constructor. */
|
||||
/*! constructs. */
|
||||
Compare_x_on_boundary_2(const Polycurve_basic_traits_2& traits) :
|
||||
m_poly_traits(traits)
|
||||
{}
|
||||
|
||||
public:
|
||||
/*! Compare the \f$x\f$-coordinates of a point with the \f$x\f$-coordinate
|
||||
/*! compares the \f$x\f$-coordinates of a point with the \f$x\f$-coordinate
|
||||
* of an \f$x\f$-curve-end on the boundary.
|
||||
* \param point the point.
|
||||
* \param xcv the \f$x\f$-monotone curve, the endpoint of which is compared.
|
||||
|
|
@ -1525,7 +1526,7 @@ public:
|
|||
Arr_curve_end ce) const
|
||||
{ return operator()(point, xcv, ce, Bottom_or_top_sides_category()); }
|
||||
|
||||
/*! Compare the \f$x\f$-coordinates of 2 curve-ends on the boundary of the
|
||||
/*! compares the \f$x\f$-coordinates of 2 curve-ends on the boundary of the
|
||||
* parameter space.
|
||||
* \param xcv1 the first curve.
|
||||
* \param ce1 the first curve-end indicator:
|
||||
|
|
@ -1553,7 +1554,7 @@ public:
|
|||
{ return operator()(xcv1, ce1, xcv2, ce2, Bottom_or_top_sides_category()); }
|
||||
|
||||
private:
|
||||
/*! \brief compares the \f$x\f$-coordinates of a point with the
|
||||
/*! compares the \f$x\f$-coordinates of a point with the
|
||||
* \f$x\f$-coordinate of an \f$x\f$-monotone curve-end on the boundary.
|
||||
*/
|
||||
Comparison_result operator()(const Point_2& point,
|
||||
|
|
@ -1570,7 +1571,7 @@ public:
|
|||
return geom_traits->compare_x_on_boundary_2_object()(point, xs, ce);
|
||||
}
|
||||
|
||||
/*! \brief compares the \f$x\f$-coordinates of 2 curve-ends on the boundary
|
||||
/*! compares the \f$x\f$-coordinates of 2 curve-ends on the boundary
|
||||
* of the parameter space.
|
||||
*/
|
||||
Comparison_result operator()(const X_monotone_curve_2& xcv1,
|
||||
|
|
@ -1597,13 +1598,12 @@ public:
|
|||
const Arr_curve_end ce) const
|
||||
{ return (ce == ARR_MIN_END) ? 0 : xcv.number_of_subcurves() - 1; }
|
||||
|
||||
/*! Given a point \f$p\f$, an x-monotone curve \f$C(t) = (X(t),Y(t))\f$,
|
||||
* and an enumerator that specifies either the minimum end or the
|
||||
* maximum end of the curve, and thus maps to a parameter value
|
||||
* \f$d \in \{0,1\}\f$, compare x_p and limit{t => d} X(t).
|
||||
* If the parameter space is unbounded, a precondition ensures that \f$C\f$
|
||||
* has a vertical asymptote at its \f$d\f$-end; that is
|
||||
* limit{t => d} X(t) is finite.
|
||||
/*! given a point \f$p\f$, an \f$x\f$-monotone curve \f$C(t) =
|
||||
* (X(t),Y(t))\f$, and an enumerator that specifies either the minimum end
|
||||
* or the maximum end of the curve, and thus maps to a parameter value \f$d
|
||||
* \in \{0,1\}\f$, compares x_p and limit{t => d} X(t). If the parameter
|
||||
* space is unbounded, a precondition ensures that \f$C\f$ has a vertical
|
||||
* asymptote at its \f$d\f$-end; that is limit{t => d} X(t) is finite.
|
||||
*/
|
||||
Comparison_result operator()(const Point_2& p,
|
||||
const X_monotone_curve_2& xcv,
|
||||
|
|
@ -1616,7 +1616,7 @@ public:
|
|||
return cmp_x_on_boundary(p, xcv[index], ce);
|
||||
}
|
||||
|
||||
/*! Given two \f$x\f$-monotone curves \f$C_1(t) = (X_1(t),Y_1(t))\f$ and
|
||||
/*! given two \f$x\f$-monotone curves \f$C_1(t) = (X_1(t),Y_1(t))\f$ and
|
||||
* \f$C2_(t) = (X_2(t),Y_2(t))\f$ and two enumerators that specify either
|
||||
* the minimum ends or the maximum ends of the curves, and thus map to
|
||||
* parameter values \f$d_1 \in \{0,1\}\f$ and \f$d_2 \in \{0,1\}\f$ for
|
||||
|
|
@ -1624,7 +1624,7 @@ public:
|
|||
* limit{t => d1} X1(t) and limit{t => d2} X2(t).
|
||||
* If the parameter space is unbounded, a precondition ensures that
|
||||
* \f$C_1\f$ and \f$C_2\f$ have vertical asymptotes at their respective
|
||||
* ends; that is, limit{t => d1} X1(t) and limit{t =? d2} X2(t) are finite.
|
||||
* ends; that is, limit{t => d1} X1(t) and limit{t => d2} X2(t) are finite.
|
||||
*/
|
||||
Comparison_result operator()(const X_monotone_curve_2& xcv1,
|
||||
Arr_curve_end ce1/* for xcv1 */,
|
||||
|
|
@ -1649,7 +1649,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
/*! Obtain a Compare_x_on_boundary_2 function object. */
|
||||
/*! obtains a Compare_x_on_boundary_2 function object. */
|
||||
Compare_x_on_boundary_2 compare_x_on_boundary_2_object() const
|
||||
{ return Compare_x_on_boundary_2(*this); }
|
||||
|
||||
|
|
@ -1703,13 +1703,13 @@ public:
|
|||
|
||||
friend class Arr_polycurve_basic_traits_2<Subcurve_traits_2>;
|
||||
|
||||
/*! Constructor. */
|
||||
/*! constructs. */
|
||||
Compare_y_on_boundary_2(const Polycurve_basic_traits_2& traits) :
|
||||
m_poly_traits(traits)
|
||||
{}
|
||||
|
||||
public:
|
||||
/*! Compare the \f$y\f$-coordinate of two given points that lie on the
|
||||
/*! compares the \f$y\f$-coordinate of two given points that lie on the
|
||||
* vertical identification curve.
|
||||
* \param p1 the first point.
|
||||
* \param p2 the second point.
|
||||
|
|
@ -1725,7 +1725,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
/*! Obtain a Compare_y_on_boundary_2 function object */
|
||||
/*! obtains a Compare_y_on_boundary_2 function object */
|
||||
Compare_y_on_boundary_2 compare_y_on_boundary_2_object() const
|
||||
{ return Compare_y_on_boundary_2(*this); }
|
||||
|
||||
|
|
@ -1742,13 +1742,13 @@ public:
|
|||
|
||||
friend class Arr_polycurve_basic_traits_2<Subcurve_traits_2>;
|
||||
|
||||
/*! Constructor. */
|
||||
/*! constructs. */
|
||||
Compare_y_near_boundary_2(const Polycurve_basic_traits_2& traits) :
|
||||
m_poly_traits(traits)
|
||||
{}
|
||||
|
||||
public:
|
||||
/*! Compare the \f$y\f$-coordinates of 2 curves at their ends near the
|
||||
/*! compares the \f$y\f$-coordinates of 2 curves at their ends near the
|
||||
* boundary of the parameter space.
|
||||
* \param xcv1 the first curve.
|
||||
* \param xcv2 the second curve.
|
||||
|
|
@ -1780,7 +1780,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
/*! Obtain a Compare_y_near_boundary_2 function object */
|
||||
/*! obtains a Compare_y_near_boundary_2 function object */
|
||||
Compare_y_near_boundary_2 compare_y_near_boundary_2_object() const
|
||||
{ return Compare_y_near_boundary_2(*this); }
|
||||
|
||||
|
|
@ -1797,13 +1797,13 @@ public:
|
|||
|
||||
friend class Arr_polycurve_basic_traits_2<Subcurve_traits_2>;
|
||||
|
||||
/*! Constructor. */
|
||||
/*! constructs. */
|
||||
Is_on_y_identification_2(const Polycurve_basic_traits_2& traits) :
|
||||
m_poly_traits(traits)
|
||||
{}
|
||||
|
||||
public:
|
||||
/*! Determine whether a point lies in the vertical boundary.
|
||||
/*! determines whether a point lies in the vertical boundary.
|
||||
* \param p the point.
|
||||
* \return a Boolean indicating whether `p` lies in the vertical boundary.
|
||||
*/
|
||||
|
|
@ -1812,7 +1812,7 @@ public:
|
|||
return geom_traits->is_on_y_identification_2_object()(p);
|
||||
}
|
||||
|
||||
/*! Determine whether an \f$x\f$-monotone curve lies in the vertical
|
||||
/*! determines whether an \f$x\f$-monotone curve lies in the vertical
|
||||
* boundary.
|
||||
* \param xcv the \f$x\f$-monotone curve.
|
||||
* \return a Boolean indicating whether `xcv` lies in the vertical boundary.
|
||||
|
|
@ -1825,7 +1825,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
/*! Obtain a Is_on_y_identification_2 function object */
|
||||
/*! obtains a Is_on_y_identification_2 function object */
|
||||
Is_on_y_identification_2 is_on_y_identification_2_object() const
|
||||
{ return Is_on_y_identification_2(*this); }
|
||||
|
||||
|
|
@ -1842,13 +1842,13 @@ public:
|
|||
|
||||
friend class Arr_polycurve_basic_traits_2<Subcurve_traits_2>;
|
||||
|
||||
/*! Constructor. */
|
||||
/*! constructs. */
|
||||
Is_on_x_identification_2(const Polycurve_basic_traits_2& traits) :
|
||||
m_poly_traits(traits)
|
||||
{}
|
||||
|
||||
public:
|
||||
/*! Determine whether a point lies in the vertical boundary.
|
||||
/*! determines whether a point lies in the vertical boundary.
|
||||
* \param p the point.
|
||||
* \return a Boolean indicating whether `p` lies in the vertical boundary.
|
||||
*/
|
||||
|
|
@ -1857,7 +1857,7 @@ public:
|
|||
return geom_traits->is_on_x_identification_2_object()(p);
|
||||
}
|
||||
|
||||
/*! Determine whether an \f$x\f$-monotone curve lies in the vertical
|
||||
/*! determines whether an \f$x\f$-monotone curve lies in the vertical
|
||||
* boundary.
|
||||
* \param `xcv` the \f$x\f$-monotone curve.
|
||||
* \return a Boolean indicating whether `xcv` lies in the vertical boundary.
|
||||
|
|
@ -1870,7 +1870,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
/*! Obtain a Is_on_x_identification_2 function object */
|
||||
/*! obtains a Is_on_x_identification_2 function object */
|
||||
Is_on_x_identification_2 is_on_x_identification_2_object() const
|
||||
{ return Is_on_x_identification_2(*this); }
|
||||
|
||||
|
|
@ -1906,13 +1906,13 @@ public:
|
|||
|
||||
friend class Arr_polycurve_basic_traits_2<Subcurve_traits_2>;
|
||||
|
||||
/*! Constructor. */
|
||||
/*! constructs. */
|
||||
Push_back_2(const Polycurve_basic_traits_2& traits) :
|
||||
m_poly_traits(traits)
|
||||
{}
|
||||
|
||||
public:
|
||||
/*! Append a subcurve to an existing \f$x\f$-monotone polycurve at the back.
|
||||
/*! appends a subcurve to an existing \f$x\f$-monotone polycurve at the back.
|
||||
*/
|
||||
void operator()(X_monotone_curve_2& xcv, const X_monotone_subcurve_2& seg)
|
||||
const
|
||||
|
|
@ -2071,7 +2071,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
/*! Obtain a Push_back_2 functor object. */
|
||||
/*! obtains a Push_back_2 functor object. */
|
||||
Push_back_2 push_back_2_object() const { return Push_back_2(*this); }
|
||||
|
||||
/* Functor to augment a polycurve by adding a subcurve at the front.
|
||||
|
|
@ -2087,7 +2087,7 @@ public:
|
|||
|
||||
friend class Arr_polycurve_basic_traits_2<Subcurve_traits_2>;
|
||||
|
||||
/*! Constructor. */
|
||||
/*! constructs. */
|
||||
Push_front_2(const Polycurve_basic_traits_2& traits) :
|
||||
m_poly_traits(traits)
|
||||
{}
|
||||
|
|
@ -2225,7 +2225,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
/*! Obtain a Push_front_2 functor object. */
|
||||
/*! obtains a Push_front_2 functor object. */
|
||||
Push_front_2 push_front_2_object() const { return Push_front_2(*this); }
|
||||
|
||||
//! A functor that trimps an \f$x\f$-monotone curve.
|
||||
|
|
@ -2239,11 +2239,11 @@ public:
|
|||
|
||||
friend class Arr_polycurve_basic_traits_2<Subcurve_traits_2>;
|
||||
|
||||
/*! Constructor. */
|
||||
/*! constructs. */
|
||||
Trim_2(const Polycurve_basic_traits_2& traits) : m_poly_traits(traits) {}
|
||||
|
||||
public:
|
||||
/*! \brief returns a trimmed version of the polycurve with `source` and
|
||||
/*! returns a trimmed version of the polycurve with `source` and
|
||||
* `target` as end points.
|
||||
*/
|
||||
X_monotone_curve_2 operator()(const X_monotone_curve_2& xcv,
|
||||
|
|
@ -2339,7 +2339,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
/*! Obtain a Trim_2 functor object. */
|
||||
/*! obtains a Trim_2 functor object. */
|
||||
Trim_2 trim_2_object() const { return Trim_2(*this); }
|
||||
|
||||
///@}
|
||||
|
|
@ -2349,7 +2349,7 @@ protected:
|
|||
* Roadmap: locate() should return an iterator to the located subcurve
|
||||
*/
|
||||
|
||||
/*! Obtain the index of the subcurve in the polycurve that contains a point
|
||||
/*! obtains the index of the subcurve in the polycurve that contains a point
|
||||
* \f$q\f$ in its \f$x\f$-range. The function performs a binary search, so if
|
||||
* the point \f$q\f$ is in the \f$x\f$-range of the polycurve with \f$n\f$
|
||||
* subcurves, the subcurve containing it can be located in \cgalBigO{log n}
|
||||
|
|
@ -2491,7 +2491,7 @@ protected:
|
|||
{ return m_compare(xs, ce, m_x_monotone_subcurve, m_curve_end); }
|
||||
};
|
||||
|
||||
/*! Locate the index of a curve in a polycurve that contains an endpoint
|
||||
/*! locates the index of a curve in a polycurve that contains an endpoint
|
||||
* of a curve.
|
||||
* This implementation is used in the case where at least one side of the
|
||||
* parameter space is not oblivious.
|
||||
|
|
@ -2521,7 +2521,7 @@ protected:
|
|||
return locate_gen(xcv, compare);
|
||||
}
|
||||
|
||||
/*! Locate the index of a curve in a polycurve that contains an endpoint
|
||||
/*! locates the index of a curve in a polycurve that contains an endpoint
|
||||
* of a curve.
|
||||
* This implementation is used in the case where all sides of the parameter
|
||||
* space is oblivious.
|
||||
|
|
@ -2540,7 +2540,7 @@ protected:
|
|||
return locate(xcv, p);
|
||||
}
|
||||
|
||||
/*! Locate the index of a curve in a polycurve that contains a point.
|
||||
/*! locates the index of a curve in a polycurve that contains a point.
|
||||
* This implementation is used in the case where at least one side of the
|
||||
* parameter space is not oblivious.
|
||||
* \param(in) xcv the given polycurve.
|
||||
|
|
@ -2567,7 +2567,7 @@ protected:
|
|||
return locate_gen(xcv, compare);
|
||||
}
|
||||
|
||||
/*! Locate the index of a curve in a polycurve that contains a point.
|
||||
/*! locates the index of a curve in a polycurve that contains a point.
|
||||
* This implementation is used in the case where all sides of the parameter
|
||||
* space are oblivious.
|
||||
* \param(in) xcv the given polycurve.
|
||||
|
|
@ -2599,7 +2599,7 @@ protected:
|
|||
return locate_gen(xcv, compare);
|
||||
}
|
||||
|
||||
/*! Find the index of the subcurve in the polycurve that is defined to the
|
||||
/*! finds the index of the subcurve in the polycurve that is defined to the
|
||||
* left (or to the right) of the point `q`.
|
||||
* \param cv the polycurve curve.
|
||||
* \param q the point.
|
||||
|
|
|
|||
|
|
@ -111,10 +111,10 @@ private:
|
|||
using Self = Arr_polycurve_traits_2<Subcurve_traits_2>;
|
||||
|
||||
public:
|
||||
/*! Default constructor */
|
||||
/*! constructs default */
|
||||
Arr_polycurve_traits_2() : Base() {}
|
||||
|
||||
/*! Constructor with given subcurve traits
|
||||
/*! constructs with given subcurve traits
|
||||
* \param seg_traits an already existing subcurve tarits which is passed will
|
||||
* be used by the class.
|
||||
*/
|
||||
|
|
@ -141,7 +141,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
/*! Obtain a number_of_points_2 functor object. */
|
||||
/*! obtains a `Number_of_points_2` functor object. */
|
||||
Number_of_points_2 number_of_points_2_object() const
|
||||
{ return Number_of_points_2(); }
|
||||
|
||||
|
|
@ -163,12 +163,12 @@ public:
|
|||
const Polycurve_traits_2& m_poly_traits;
|
||||
|
||||
public:
|
||||
/*! Constructor. */
|
||||
/*! constructs. */
|
||||
Make_x_monotone_2(const Polycurve_traits_2& traits) :
|
||||
m_poly_traits(traits)
|
||||
{}
|
||||
|
||||
/*! Subdivide a given curve into x-monotone sub-curves and insert them into
|
||||
/*! subdivides a given curve into x-monotone sub-curves and insert them into
|
||||
* a given output iterator.
|
||||
*
|
||||
* \pre if `cv` is not empty then it must be continuous and well-oriented.
|
||||
|
|
@ -470,7 +470,7 @@ public:
|
|||
{ return operator_impl(cv, oi, All_sides_oblivious_category()); }
|
||||
};
|
||||
|
||||
/*! 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); }
|
||||
|
||||
|
|
@ -483,7 +483,7 @@ public:
|
|||
using Polycurve_traits_2 = Arr_polycurve_traits_2<Subcurve_traits_2>;
|
||||
|
||||
public:
|
||||
/*! Constructor. */
|
||||
/*! constructs. */
|
||||
Push_back_2(const Polycurve_traits_2& traits) : Base::Push_back_2(traits) {}
|
||||
|
||||
// Normally, the moment the compiler finds a name, it stops looking. In
|
||||
|
|
@ -493,21 +493,21 @@ public:
|
|||
// code below.
|
||||
using Base::Push_back_2::operator();
|
||||
|
||||
// /*! Append a subcurve to an existing x-monotone polycurve at the back.
|
||||
// /*! appends a subcurve to an existing x-monotone polycurve at the back.
|
||||
// */
|
||||
// void operator()(X_monotone_curve_2& xcv,
|
||||
// const X_monotone_subcurve_2& seg)
|
||||
// const
|
||||
// { Base::Push_back_2::operator()(xcv, seg); }
|
||||
|
||||
/* Append a subcurve to an existing polycurve at the back.
|
||||
/* appends a subcurve to an existing polycurve at the back.
|
||||
* If the polycurve is empty, the subcurve will be its only subcurve.
|
||||
*/
|
||||
void operator()(Curve_2& cv, const Subcurve_2& seg) const
|
||||
{ cv.push_back(seg); }
|
||||
};
|
||||
|
||||
/*! Obtain a Push_back_2 functor object. */
|
||||
/*! obtains a `Push_back_2` functor object. */
|
||||
Push_back_2 push_back_2_object() const { return Push_back_2(*this); }
|
||||
|
||||
/* Functor to augment a polycurve by either adding a vertex or a subcurve
|
||||
|
|
@ -519,7 +519,7 @@ public:
|
|||
using Polycurve_traits_2 = Arr_polycurve_traits_2<Subcurve_traits_2>;
|
||||
|
||||
public:
|
||||
/*! Constructor. */
|
||||
/*! constructs. */
|
||||
Push_front_2(const Polycurve_traits_2& traits) :
|
||||
Base::Push_front_2(traits)
|
||||
{}
|
||||
|
|
@ -531,19 +531,19 @@ public:
|
|||
// code below.
|
||||
using Base::Push_front_2::operator();
|
||||
|
||||
// /*! Append a subcurve to an existing x-monotone polycurve at the front.
|
||||
// /*! appends a subcurve to an existing x-monotone polycurve at the front.
|
||||
// */
|
||||
// void operator()(X_monotone_curve_2& xcv,
|
||||
// const X_monotone_subcurve_2& seg)
|
||||
// const
|
||||
// { Base::Push_front_2::operator()(xcv, seg); }
|
||||
|
||||
/* Append a subcurve to an existing polycurve at the front. */
|
||||
/* appends a subcurve to an existing polycurve at the front. */
|
||||
void operator()(Curve_2& cv, const Subcurve_2& seg) const
|
||||
{ cv.push_front(seg); }
|
||||
};
|
||||
|
||||
/*! Obtain a Push_front_2 functor object. */
|
||||
/*! obtains a `Push_front_2` functor object. */
|
||||
Push_front_2 push_front_2_object() const { return Push_front_2(*this); }
|
||||
|
||||
class Split_2 {
|
||||
|
|
@ -554,11 +554,11 @@ public:
|
|||
const Polycurve_traits_2& m_poly_traits;
|
||||
|
||||
public:
|
||||
/*! Constructor. */
|
||||
/*! constructs. */
|
||||
Split_2(const Polycurve_traits_2& traits) : m_poly_traits(traits) {}
|
||||
|
||||
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).
|
||||
|
|
@ -659,7 +659,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 {
|
||||
|
|
@ -670,10 +670,10 @@ public:
|
|||
const Polycurve_traits_2& m_poly_traits;
|
||||
|
||||
public:
|
||||
/*! Constructor. */
|
||||
/*! constructs. */
|
||||
Intersect_2(const Polycurve_traits_2& traits) : m_poly_traits(traits) {}
|
||||
|
||||
/*! Find the intersections of the two given curves and insert them into the
|
||||
/*! finds the intersections of the two given curves and insert them into the
|
||||
* given output iterator. As two subcurves may itersect only once, only a
|
||||
* single intersection will be contained in the iterator.
|
||||
* Note: If the intersection yields an overlap then it will be oriented
|
||||
|
|
@ -996,7 +996,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 {
|
||||
|
|
@ -1007,10 +1007,10 @@ public:
|
|||
const Polycurve_traits_2& m_poly_traits;
|
||||
|
||||
public:
|
||||
/*! Constructor. */
|
||||
/*! constructs. */
|
||||
Are_mergeable_2(const Polycurve_traits_2& traits) : m_poly_traits(traits) {}
|
||||
|
||||
/*! 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, that is, they share a
|
||||
|
|
@ -1047,7 +1047,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
/*! 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); }
|
||||
|
||||
|
|
@ -1065,12 +1065,12 @@ public:
|
|||
const Geometry_traits& m_poly_traits;
|
||||
|
||||
public:
|
||||
/*! Constructor
|
||||
/*! constructs
|
||||
* \param traits the traits (in case it has state)
|
||||
*/
|
||||
Merge_2(const Geometry_traits& traits) : m_poly_traits(traits) {}
|
||||
|
||||
/*! 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.
|
||||
|
|
@ -1122,7 +1122,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
/*! Obtain a Merge_2 functor object. */
|
||||
/*! obtains a `Merge_2` functor object. */
|
||||
Merge_2 merge_2_object() const { return Merge_2(*this); }
|
||||
///@}
|
||||
|
||||
|
|
@ -1137,15 +1137,15 @@ public:
|
|||
const Polycurve_traits_2& m_poly_traits;
|
||||
|
||||
public:
|
||||
/*! Constructor. */
|
||||
/*! constructs. */
|
||||
Construct_curve_2(const Polycurve_traits_2& traits) :
|
||||
m_poly_traits(traits)
|
||||
{}
|
||||
|
||||
/*! Obtain a polycurve that consists of one given subcurve. */
|
||||
/*! obtains a polycurve that consists of one given subcurve. */
|
||||
Curve_2 operator()(const Subcurve_2& seg) const { return Curve_2(seg); }
|
||||
|
||||
/* Construct a well-oriented polycurve from a range of either
|
||||
/* constructs a well-oriented polycurve from a range of either
|
||||
* `SubcurveTraits::Point_2` or `SubcurveTraits::Subcurve_2`.
|
||||
*/
|
||||
template <typename ForwardIterator>
|
||||
|
|
@ -1156,7 +1156,7 @@ public:
|
|||
return constructor_impl(begin, end, Is_point());
|
||||
}
|
||||
|
||||
/*! Construction of a polycurve from a range of points.
|
||||
/*! constructs a polycurve from a range of points.
|
||||
* \pre The range contains at least two points
|
||||
* \pre Consecutive points are disjoint.
|
||||
* \return Well-oriented polycurve connecting the given
|
||||
|
|
@ -1186,7 +1186,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
/*! Obtain a Construct_curve_2 functor object. */
|
||||
/*! obtains a `Construct_curve_2` functor object. */
|
||||
Construct_curve_2 construct_curve_2_object() const
|
||||
{ return Construct_curve_2(*this); }
|
||||
};
|
||||
|
|
|
|||
|
|
@ -118,10 +118,10 @@ public:
|
|||
//@}
|
||||
|
||||
public:
|
||||
/*! Construct default. */
|
||||
/*! constructs default. */
|
||||
Arr_polyline_traits_2() : Base() {}
|
||||
|
||||
/*! Construct from a segment traits
|
||||
/*! constructs from a segment traits
|
||||
* \param geom_traits an already existing segment tarits which is passed will
|
||||
* be used by the class.
|
||||
*/
|
||||
|
|
@ -139,7 +139,7 @@ public:
|
|||
typedef Arr_polyline_traits_2<Segment_traits_2> Polyline_traits_2;
|
||||
|
||||
public:
|
||||
/*! Constructor. */
|
||||
/*! constructs. */
|
||||
Push_back_2(const Polyline_traits_2& traits) :
|
||||
Base::Push_back_2(traits)
|
||||
{}
|
||||
|
|
@ -151,16 +151,16 @@ public:
|
|||
// code below.
|
||||
using Base::Push_back_2::operator();
|
||||
|
||||
// /*! Append a segment `seg` to an existing polyline `cv` at the back. */
|
||||
// /*! appends a segment `seg` to an existing polyline `cv` at the back. */
|
||||
// void operator()(Curve_2& cv, const Segment_2& seg) const
|
||||
// { Base::Push_back_2::operator() (cv, seg); }
|
||||
|
||||
// /* Append a segment `seg` to an existing polyline `xcv` at the back. */
|
||||
// /* appends a segment `seg` to an existing polyline `xcv` at the back. */
|
||||
// void operator()(X_monotone_curve_2& xcv,
|
||||
// const X_monotone_subcurve_2& seg) const
|
||||
// { Base::Push_back_2::operator()(xcv, seg); }
|
||||
|
||||
/* Append a point `p` to an existing polyline `cv` at the back. */
|
||||
/* appends a point `p` to an existing polyline `cv` at the back. */
|
||||
void operator()(Curve_2& cv, const Point_2& p) const {
|
||||
typedef typename Curve_2::size_type size_type;
|
||||
size_type num_seg = cv.number_of_subcurves();
|
||||
|
|
@ -187,7 +187,7 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
/* Append a point `p` to an existing polyline `xcv` at the back. */
|
||||
/* appends a point `p` to an existing polyline `xcv` at the back. */
|
||||
void operator()(X_monotone_curve_2& xcv, const Point_2& p) const
|
||||
{
|
||||
typedef typename X_monotone_curve_2::size_type size_type;
|
||||
|
|
@ -237,7 +237,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
/*! Obtain a Push_back_2 functor object. */
|
||||
/*! obtains a Push_back_2 functor object. */
|
||||
Push_back_2 push_back_2_object() const { return Push_back_2(*this); }
|
||||
|
||||
/* Functor to augment a polyline by either adding a vertex or a segment
|
||||
|
|
@ -249,7 +249,7 @@ public:
|
|||
typedef Arr_polyline_traits_2<Segment_traits_2> Polyline_traits_2;
|
||||
|
||||
public:
|
||||
/*! Constructor. */
|
||||
/*! constructs. */
|
||||
Push_front_2(const Polyline_traits_2& traits) :
|
||||
Base::Push_front_2(traits)
|
||||
{}
|
||||
|
|
@ -261,11 +261,11 @@ public:
|
|||
// code below.
|
||||
using Base::Push_front_2::operator();
|
||||
|
||||
// /*! Append a segment `seg` to an existing polyline `cv` at the front. */
|
||||
// /*! appends a segment `seg` to an existing polyline `cv` at the front. */
|
||||
// void operator()(Curve_2& cv, const Subcurve_2& seg) const
|
||||
// { Base::Push_front_2::operator()(cv, seg); }
|
||||
|
||||
// /*! Append a segment `seg` to an existing polyline `xcv` at the front. */
|
||||
// /*! appends a segment `seg` to an existing polyline `xcv` at the front. */
|
||||
// void operator()(X_monotone_curve_2& xcv,
|
||||
// const X_monotone_subcurve_2& seg) const
|
||||
// { Base::Push_front_2::operator()(xcv, seg); }
|
||||
|
|
@ -294,7 +294,7 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
/*! Append a point `p` to an existing polyline `xcv` at the front. */
|
||||
/*! appends a point `p` to an existing polyline `xcv` at the front. */
|
||||
void operator()(const X_monotone_curve_2& xcv, Point_2& p) const
|
||||
{
|
||||
const auto* geom_traits = this->m_poly_traits.subcurve_traits_2();
|
||||
|
|
@ -339,10 +339,10 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
/*! Obtain a Push_front_2 functor object. */
|
||||
/*! obtains a Push_front_2 functor object. */
|
||||
Push_front_2 push_front_2_object() const { return Push_front_2(*this); }
|
||||
|
||||
/*! Construct a general curve from :
|
||||
/*! constructs a general curve from :
|
||||
* 1. two points,
|
||||
* 2. a sub curve,
|
||||
* 3. a range of points, or
|
||||
|
|
@ -353,7 +353,7 @@ public:
|
|||
typedef Arr_polyline_traits_2<Segment_traits_2> Polyline_traits_2;
|
||||
|
||||
public:
|
||||
/*! Constructor.
|
||||
/*! constructs.
|
||||
*/
|
||||
Construct_curve_2(const Polyline_traits_2& traits) :
|
||||
Base::Construct_curve_2(traits)
|
||||
|
|
@ -402,7 +402,7 @@ public:
|
|||
std::false_type) const
|
||||
{ return Base::Construct_curve_2::operator()(begin, end); }
|
||||
|
||||
/*! Construction of a polyline from a range of points.
|
||||
/*! constructs a polyline from a range of points.
|
||||
* \pre The range contains at least two points
|
||||
* \pre Consecutive points are disjoint.
|
||||
* \return Well-oriented polyline connecting the given points. The order
|
||||
|
|
@ -443,11 +443,11 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
/*! Obtain a Construct_curve_2 functor object. */
|
||||
/*! obtains a Construct_curve_2 functor object. */
|
||||
Construct_curve_2 construct_curve_2_object() const
|
||||
{ return Construct_curve_2(*this); }
|
||||
|
||||
/*! Construct an x-monotone curve. */
|
||||
/*! constructs an x-monotone curve. */
|
||||
class Construct_x_monotone_curve_2 :
|
||||
public Base::Construct_x_monotone_curve_2
|
||||
{
|
||||
|
|
@ -455,13 +455,13 @@ public:
|
|||
typedef Arr_polyline_traits_2<Segment_traits_2> Polyline_traits_2;
|
||||
|
||||
public:
|
||||
/*! Constructor.
|
||||
/*! constructs.
|
||||
*/
|
||||
Construct_x_monotone_curve_2(const Polyline_traits_2& traits) :
|
||||
Base::Construct_x_monotone_curve_2(traits)
|
||||
{}
|
||||
|
||||
/*! Obtain an x-monotone polyline connecting two given endpoints.
|
||||
/*! obtains an x-monotone polyline connecting two given endpoints.
|
||||
* \param p The first point.
|
||||
* \param q The second point.
|
||||
* \pre p and q must not be the same.
|
||||
|
|
@ -485,7 +485,7 @@ public:
|
|||
return X_monotone_curve_2(seg);
|
||||
}
|
||||
|
||||
/*! Obtain an x-monotone polyline that consists of one given segment.
|
||||
/*! obtains an x-monotone polyline that consists of one given segment.
|
||||
* \param seg input segment.
|
||||
* \pre seg is not degenerated.
|
||||
* \return An x-monotone polyline with one segment.
|
||||
|
|
@ -493,7 +493,7 @@ public:
|
|||
X_monotone_curve_2 operator()(const X_monotone_subcurve_2& seg) const
|
||||
{ return Base::Construct_x_monotone_curve_2::operator()(seg); }
|
||||
|
||||
/*! Construct an x-monotone polyline from a range of elements.
|
||||
/*! constructs an x-monotone polyline from a range of elements.
|
||||
* \pre Range should from a continuous well-oriented x-monotone polyline.
|
||||
*/
|
||||
template <typename ForwardIterator>
|
||||
|
|
@ -590,7 +590,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); }
|
||||
|
||||
|
|
@ -605,7 +605,7 @@ public:
|
|||
/*! The traits (in case it has state) */
|
||||
const Traits& m_traits;
|
||||
|
||||
/*! Constructor
|
||||
/*! constructs
|
||||
* \param traits the traits.
|
||||
*/
|
||||
Approximate_2(const Traits& traits) :
|
||||
|
|
@ -622,8 +622,7 @@ public:
|
|||
Approximate_point_2 operator()(const Point_2& p) const
|
||||
{ return Base::Approximate_2::operator()(p); }
|
||||
|
||||
/*! 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 */,
|
||||
OutputIterator oi, bool l2r = true) const {
|
||||
|
|
@ -647,11 +646,10 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
/*! Obtain an Approximate_2 functor object. */
|
||||
/*! obtains an Approximate_2 functor object. */
|
||||
Approximate_2 approximate_2_object() const { return Approximate_2(*this); }
|
||||
|
||||
/*! Deprecated!
|
||||
* Obtain the segment traits.
|
||||
/*! obtains the segment traits.
|
||||
* \return the segment traits.
|
||||
*/
|
||||
CGAL_DEPRECATED const Segment_traits_2* segment_traits_2() const
|
||||
|
|
|
|||
|
|
@ -26,8 +26,6 @@
|
|||
#include <CGAL/Arr_rat_arc/Rational_arc_d_1.h>
|
||||
#include <CGAL/Arr_rat_arc/Cache.h>
|
||||
|
||||
|
||||
|
||||
namespace CGAL {
|
||||
|
||||
/*! \class
|
||||
|
|
@ -161,7 +159,7 @@ public:
|
|||
/*! The traits */
|
||||
const Traits* _traits;
|
||||
|
||||
/*! Constructor
|
||||
/*! constructs
|
||||
* \param traits the traits
|
||||
*/
|
||||
Construct_x_monotone_curve_2(const Traits* traits) : _traits(traits) {}
|
||||
|
|
@ -299,7 +297,7 @@ public:
|
|||
/*! The traits */
|
||||
const Traits* _traits;
|
||||
|
||||
/*! Constructor
|
||||
/*! constructs
|
||||
* \param traits the traits
|
||||
*/
|
||||
Construct_curve_2(const Traits* traits) : _traits(traits) {}
|
||||
|
|
@ -424,7 +422,7 @@ public:
|
|||
/*! The traits */
|
||||
const Traits* _traits;
|
||||
|
||||
/*! Constructor
|
||||
/*! constructs
|
||||
* \param traits the traits
|
||||
*/
|
||||
Construct_point_2(const Traits* traits) : _traits(traits) {}
|
||||
|
|
@ -502,8 +500,7 @@ public:
|
|||
class Compare_x_2
|
||||
{
|
||||
public:
|
||||
/*!
|
||||
* 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);
|
||||
|
|
@ -517,7 +514,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
/*! Obtain 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();
|
||||
|
|
@ -533,7 +530,7 @@ public:
|
|||
/*! The traits */
|
||||
const Traits* _traits;
|
||||
|
||||
/*! Constructor
|
||||
/*! constructs
|
||||
* \param traits the traits
|
||||
*/
|
||||
Compare_xy_2(const Traits* traits) : _traits(traits) {}
|
||||
|
|
@ -541,8 +538,7 @@ public:
|
|||
friend class Arr_rational_function_traits_2<Algebraic_kernel_d_1>;
|
||||
|
||||
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);
|
||||
|
|
@ -555,7 +551,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
/*! Obtain 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(this);
|
||||
|
|
@ -565,8 +561,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.
|
||||
*/
|
||||
|
|
@ -576,7 +571,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
/*! Obtain 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();
|
||||
|
|
@ -586,8 +581,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.
|
||||
*/
|
||||
|
|
@ -597,7 +591,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
/*! Obtain 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();
|
||||
|
|
@ -607,8 +601,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.
|
||||
*/
|
||||
|
|
@ -619,7 +612,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
/*! Obtain 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();
|
||||
|
|
@ -632,10 +625,11 @@ public:
|
|||
{
|
||||
private:
|
||||
Cache& _cache;
|
||||
|
||||
public:
|
||||
Compare_y_at_x_2(Cache& cache) : _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.
|
||||
|
|
@ -650,7 +644,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
/*! Obtain 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(_cache);
|
||||
|
|
@ -666,8 +660,8 @@ public:
|
|||
|
||||
public:
|
||||
Compare_y_at_x_left_2(Cache& cache) : _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.
|
||||
|
|
@ -697,7 +691,7 @@ public:
|
|||
return cv1.compare_at_intersection (cv2,p,true,_cache);}
|
||||
};
|
||||
|
||||
/*! Obtain 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(_cache);
|
||||
|
|
@ -713,8 +707,8 @@ public:
|
|||
|
||||
public:
|
||||
Compare_y_at_x_right_2(Cache& cache) :_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.
|
||||
|
|
@ -747,7 +741,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
/*! Obtain 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(_cache);
|
||||
|
|
@ -762,7 +756,7 @@ public:
|
|||
/*! The traits */
|
||||
const Traits* _traits;
|
||||
|
||||
/*! Constructor
|
||||
/*! constructs
|
||||
* \param traits the traits
|
||||
*/
|
||||
Equal_2(const Traits* traits) : _traits(traits) {}
|
||||
|
|
@ -770,8 +764,7 @@ public:
|
|||
friend class Arr_rational_function_traits_2<Algebraic_kernel_d_1>;
|
||||
|
||||
public:
|
||||
/*!
|
||||
* 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.
|
||||
|
|
@ -785,8 +778,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.
|
||||
|
|
@ -802,7 +794,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
/*! Obtain an Equal_2 functor object. */
|
||||
/*! obtains an Equal_2 functor object. */
|
||||
Equal_2 equal_2_object() const
|
||||
{
|
||||
return Equal_2(this);
|
||||
|
|
@ -816,7 +808,7 @@ public:
|
|||
*/
|
||||
class Make_x_monotone_2 {
|
||||
public:
|
||||
/*! Subdivide a given rational-function curve into x-monotone subcurves
|
||||
/*! subdivides a given rational-function curve into x-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
|
||||
|
|
@ -840,7 +832,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(); }
|
||||
|
||||
|
|
@ -852,8 +844,7 @@ public:
|
|||
|
||||
public:
|
||||
Split_2(Cache& cache) : _cache(cache) {}
|
||||
/*!
|
||||
* 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).
|
||||
|
|
@ -867,7 +858,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
/*! Obtain a Split_2 functor object. */
|
||||
/*! obtains a Split_2 functor object. */
|
||||
Split_2 split_2_object() const
|
||||
{
|
||||
return Split_2(_cache);
|
||||
|
|
@ -880,8 +871,7 @@ public:
|
|||
Cache& _cache;
|
||||
public:
|
||||
Intersect_2(Cache& cache) : _cache(cache) {}
|
||||
/*!
|
||||
* 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.
|
||||
|
|
@ -898,7 +888,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
/*! Obtain an Intersect_2 functor object. */
|
||||
/*! obtains an Intersect_2 functor object. */
|
||||
Intersect_2 intersect_2_object() const
|
||||
{
|
||||
return Intersect_2(_cache);
|
||||
|
|
@ -908,8 +898,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
|
||||
|
|
@ -922,7 +911,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
/*! 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();
|
||||
|
|
@ -939,7 +928,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) {}
|
||||
|
|
@ -947,8 +936,7 @@ public:
|
|||
friend class Arr_rational_function_traits_2<Algebraic_kernel_d_1>;
|
||||
|
||||
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.
|
||||
|
|
@ -965,7 +953,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
/*! Obtain a Merge_2 functor object. */
|
||||
/*! obtains a Merge_2 functor object. */
|
||||
Merge_2 merge_2_object() const
|
||||
{
|
||||
return Merge_2(this);
|
||||
|
|
@ -981,7 +969,7 @@ public:
|
|||
*/
|
||||
class Parameter_space_in_x_2 {
|
||||
public:
|
||||
/*! Obtains the parameter space at the end of a line along the x-axis.
|
||||
/*! obtains the parameter space at the end of a line along the x-axis.
|
||||
* \param xcv the line
|
||||
* \param ce the line end indicator:
|
||||
* ARR_MIN_END - the minimal end of xc or
|
||||
|
|
@ -1000,7 +988,7 @@ public:
|
|||
xcv.left_parameter_space_in_x() : xcv.right_parameter_space_in_x();
|
||||
}
|
||||
|
||||
/*! Obtains the parameter space at a point along the x-axis.
|
||||
/*! obtains the parameter space at a point along the x-axis.
|
||||
* \param p the point.
|
||||
* \return the parameter space at p.
|
||||
*/
|
||||
|
|
@ -1010,7 +998,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
/*! Obtain a Parameter_space_in_x_2 function object */
|
||||
/*! obtains a Parameter_space_in_x_2 function object */
|
||||
Parameter_space_in_x_2 parameter_space_in_x_2_object() const
|
||||
{ return Parameter_space_in_x_2(); }
|
||||
|
||||
|
|
@ -1019,7 +1007,7 @@ public:
|
|||
*/
|
||||
class Parameter_space_in_y_2 {
|
||||
public:
|
||||
/*! Obtains the parameter space at the end of a line along the y-axis .
|
||||
/*! obtains the parameter space at the end of a line along the y-axis .
|
||||
* Note that if the line end coincides with a pole, then unless the line
|
||||
* coincides with the identification arc, the line end is considered to
|
||||
* be approaching the boundary, but not on the boundary.
|
||||
|
|
@ -1043,7 +1031,7 @@ public:
|
|||
xcv.left_parameter_space_in_y() : xcv.right_parameter_space_in_y();
|
||||
}
|
||||
|
||||
/*! Obtains the parameter space at a point along the y-axis.
|
||||
/*! obtains the parameter space at a point along the y-axis.
|
||||
* \param p the point.
|
||||
* \return the parameter space at p.
|
||||
*/
|
||||
|
|
@ -1053,7 +1041,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
/*! Obtain a Parameter_space_in_y_2 function object */
|
||||
/*! obtains a Parameter_space_in_y_2 function object */
|
||||
Parameter_space_in_y_2 parameter_space_in_y_2_object() const
|
||||
{ return Parameter_space_in_y_2(); }
|
||||
|
||||
|
|
@ -1063,7 +1051,7 @@ public:
|
|||
*/
|
||||
class Compare_x_near_boundary_2 {
|
||||
public:
|
||||
/*! Compare the x-coordinate of a point with the x-coordinate of
|
||||
/*! compares the x-coordinate of a point with the x-coordinate of
|
||||
* a line end near the boundary at y = +/- oo.
|
||||
* \param p the point direction.
|
||||
* \param xcv the line, the endpoint of which is compared.
|
||||
|
|
@ -1087,7 +1075,7 @@ public:
|
|||
return (r == NEGATIVE) ? POSITIVE : NEGATIVE ;
|
||||
}
|
||||
|
||||
/*! Compare the x-coordinates of 2 arcs ends near the boundary of the
|
||||
/*! compares the x-coordinates of 2 arcs ends near the boundary of the
|
||||
* parameter space at y = +/- oo.
|
||||
* \param xcv1 the first arc.
|
||||
* \param ce1 the first arc end indicator -
|
||||
|
|
@ -1113,7 +1101,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
/*! Obtain a Compare_x_near_boundary_2 function object */
|
||||
/*! obtains a Compare_x_near_boundary_2 function object */
|
||||
Compare_x_near_boundary_2 compare_x_near_boundary_2_object() const
|
||||
{ return Compare_x_near_boundary_2(); }
|
||||
#endif
|
||||
|
|
@ -1127,7 +1115,7 @@ public:
|
|||
Cache& _cache;
|
||||
|
||||
public:
|
||||
/*! Compare the y-coordinates of 2 lines at their ends near the boundary
|
||||
/*! compares the y-coordinates of 2 lines at their ends near the boundary
|
||||
* of the parameter space at x = +/- oo.
|
||||
* \param xcv1 the first arc.
|
||||
* \param xcv2 the second arc.
|
||||
|
|
@ -1147,7 +1135,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
/*! Obtain a Compare_y_near_boundary_2 function object */
|
||||
/*! obtains a Compare_y_near_boundary_2 function object */
|
||||
Compare_y_near_boundary_2 compare_y_near_boundary_2_object() const
|
||||
{ return Compare_y_near_boundary_2(_cache); }
|
||||
|
||||
|
|
@ -1158,7 +1146,7 @@ public:
|
|||
class Compare_x_on_boundary_2
|
||||
{
|
||||
public:
|
||||
/*! Compares the x coordinate of p with the curve end
|
||||
/*! compares the x coordinate of p with the curve end
|
||||
* of xcv that is defined by ce at its limit.
|
||||
* Returns SMALLER, EQUAL, or LARGER accordingly.
|
||||
*/
|
||||
|
|
@ -1171,7 +1159,8 @@ public:
|
|||
return CGAL::compare(p.x(),
|
||||
(ce == ARR_MIN_END) ? xcv.left_x() : xcv.right_x());
|
||||
}
|
||||
/*! Compares the curve end of xcv1 that is defined by ce1
|
||||
|
||||
/*! compares the curve end of xcv1 that is defined by ce1
|
||||
* with the curve end of xcv2 that is defined by ce2
|
||||
* at their limits in x.
|
||||
* Returns SMALLER, EQUAL, or LARGER accordingly.
|
||||
|
|
@ -1192,7 +1181,7 @@ public:
|
|||
|
||||
}; //Compare_x_on_boundary_2
|
||||
|
||||
/*! Obtain a Compare_x_on_boundary_2 function object */
|
||||
/*! obtains a Compare_x_on_boundary_2 function object */
|
||||
Compare_x_on_boundary_2 compare_x_on_boundary_2_object() const
|
||||
{ return Compare_x_on_boundary_2(); }
|
||||
//@}
|
||||
|
|
@ -1208,7 +1197,8 @@ public:
|
|||
|
||||
public:
|
||||
Compare_x_near_boundary_2(Cache& cache) : _cache(cache) {}
|
||||
/*! Compares the curve end of xcv1 that is defined by ce1
|
||||
|
||||
/*! compares the curve end of xcv1 that is defined by ce1
|
||||
* with the curve end of xcv2 that is defined by ce2
|
||||
* at their limits in x.
|
||||
* Returns SMALLER, EQUAL, or LARGER accordingly.
|
||||
|
|
@ -1221,16 +1211,14 @@ public:
|
|||
}
|
||||
}; //Compare_x_near_boundary_2
|
||||
|
||||
/*! Obtain a Compare_x_near_boundary_2 function object */
|
||||
/*! obtains a Compare_x_near_boundary_2 function object */
|
||||
Compare_x_near_boundary_2 compare_x_near_boundary_2_object() const
|
||||
{ return Compare_x_near_boundary_2(_cache); }
|
||||
|
||||
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;
|
||||
|
|
@ -1245,7 +1233,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();
|
||||
|
|
@ -1254,9 +1242,7 @@ public:
|
|||
class Construct_opposite_2
|
||||
{
|
||||
public:
|
||||
|
||||
/*!
|
||||
* 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.
|
||||
*/
|
||||
|
|
@ -1266,7 +1252,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
/*! 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();
|
||||
|
|
@ -1306,4 +1292,4 @@ public:
|
|||
|
||||
#include <CGAL/enable_warnings.h>
|
||||
|
||||
#endif //CGAL_ARR_RATIONAL_ARC_TRAITS_D_1_H
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -96,23 +96,23 @@ public:
|
|||
/// \name Creation
|
||||
//@{
|
||||
|
||||
/*! Construct default. */
|
||||
/*! constructs default. */
|
||||
_Segment_cached_2();
|
||||
|
||||
/*! Construct a segment from a Kernel segment.
|
||||
/*! constructs a segment from a Kernel segment.
|
||||
* \param seg the segment.
|
||||
* \pre the segment is not degenerate.
|
||||
*/
|
||||
_Segment_cached_2(const Segment_2& seg);
|
||||
|
||||
/*! Construct a segment from two endpoints.
|
||||
/*! constructs a segment from two endpoints.
|
||||
* \param source the source point.
|
||||
* \param target the target point.
|
||||
* \param `source` and `target` are not equal.
|
||||
*/
|
||||
_Segment_cached_2(const Point_2& source, const Point_2& target);
|
||||
|
||||
/*! Construct a segment from two endpoints on a supporting line.
|
||||
/*! constructs a segment from two endpoints on a supporting line.
|
||||
* \param line the supporting line.
|
||||
* \param source the source point.
|
||||
* \param target the target point.
|
||||
|
|
@ -121,7 +121,7 @@ public:
|
|||
_Segment_cached_2(const Line_2& line,
|
||||
const Point_2& source, const Point_2& target);
|
||||
|
||||
/*! Construct a segment from all fields.
|
||||
/*! constructs a segment from all fields.
|
||||
* \param line the supporting line.
|
||||
* \param source the source point.
|
||||
* \param target the target point.
|
||||
|
|
@ -133,7 +133,7 @@ public:
|
|||
const Point_2& source, const Point_2& target,
|
||||
bool is_directed_right, bool is_vert, bool is_degen);
|
||||
|
||||
/*! Assign.
|
||||
/*! assigns.
|
||||
* \param seg the source segment to copy from
|
||||
* \pre the segment is not degenerate.
|
||||
*/
|
||||
|
|
@ -144,44 +144,44 @@ public:
|
|||
/// \name Accessors
|
||||
//@{
|
||||
|
||||
/*! Obtain the supporting line.
|
||||
/*! obtains the supporting line.
|
||||
* \return the supporting line.
|
||||
*/
|
||||
const Line_2& line() const;
|
||||
|
||||
/*! Obtain the segment source.
|
||||
/*! obtains the segment source.
|
||||
* \return the segment source.
|
||||
*/
|
||||
const Point_2& source() const;
|
||||
|
||||
/*! Obtain the segment target.
|
||||
/*! obtains the segment target.
|
||||
* \return the segment target.
|
||||
*/
|
||||
const Point_2& target() const;
|
||||
|
||||
/*! Determine whether the curve is vertical.
|
||||
/*! determines whether the curve is vertical.
|
||||
* \return a Boolean flag indicating whether the curve is vertical.
|
||||
*/
|
||||
bool is_vertical() const;
|
||||
|
||||
/*! Determine whether the curve is degenerate.
|
||||
/*! determines whether the curve is degenerate.
|
||||
* return a Boolean flag indicating whether the curve is degenerate.
|
||||
*/
|
||||
bool is_degenerate() const;
|
||||
|
||||
/*! Determine whether the curve is lexicographically directed from left to
|
||||
/*! determines whether the curve is lexicographically directed from left to
|
||||
* right.
|
||||
* \return a Boolean flag indicating whether the curve is lexicographically
|
||||
* directed from left to right.
|
||||
*/
|
||||
bool is_directed_right() const;
|
||||
|
||||
/*! Obtain the (lexicographically) left endpoint.
|
||||
/*! obtains the (lexicographically) left endpoint.
|
||||
* \return the (lexicographically) left endpoint.
|
||||
*/
|
||||
const Point_2& left() const;
|
||||
|
||||
/*! Obtain the (lexicographically) right endpoint.
|
||||
/*! obtains the (lexicographically) right endpoint.
|
||||
* \return the (lexicographically) right endpoint.
|
||||
*/
|
||||
const Point_2& right() const;
|
||||
|
|
@ -191,13 +191,13 @@ public:
|
|||
/// \name Modifiers
|
||||
//@{
|
||||
|
||||
/*! Set the (lexicographically) left endpoint.
|
||||
/*! sets the (lexicographically) left endpoint.
|
||||
* \param p the point to set.
|
||||
* \pre p lies on the supporting line to the left of the right endpoint.
|
||||
*/
|
||||
void set_left(const Point_2& p);
|
||||
|
||||
/*! Set the (lexicographically) right endpoint.
|
||||
/*! sets the (lexicographically) right endpoint.
|
||||
* \param p the point to set.
|
||||
* \pre p lies on the supporting line to the right of the left endpoint.
|
||||
*/
|
||||
|
|
@ -208,15 +208,18 @@ public:
|
|||
/// \name Deprecated
|
||||
//@{
|
||||
|
||||
/*! Determine whether the given point is in the x-range of the segment.
|
||||
/*! determine whether the given point is in the \f$x\f$-range of the segment.
|
||||
* \param p the query point.
|
||||
* \return (true) is in the x-range of the segment; (false) if it is not.
|
||||
* \return (true) is in the \f$x\f$-range of the segment; (false) if it is
|
||||
* not.
|
||||
*/
|
||||
CGAL_DEPRECATED bool is_in_x_range(const Point_2& p) const;
|
||||
|
||||
/*! Determine whether the given point is in the y-range of the segment.
|
||||
/*! determines whether the given point is in the \f$y\f$-range of the
|
||||
* segment.
|
||||
* \param p the query point.
|
||||
* \return (true) is in the y-range of the segment; (false) if it is not.
|
||||
* \return (true) is in the \f$y\f$-range of the segment; (false) if it is
|
||||
* not.
|
||||
*/
|
||||
CGAL_DEPRECATED bool is_in_y_range(const Point_2& p) const;
|
||||
|
||||
|
|
@ -231,7 +234,7 @@ public:
|
|||
typedef unsigned int Multiplicity;
|
||||
|
||||
public:
|
||||
/*! Construct default. */
|
||||
/*! constructs default. */
|
||||
Arr_segment_traits_2() {}
|
||||
|
||||
/// \name Basic functor definitions.
|
||||
|
|
@ -244,7 +247,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_x_2(const Traits& traits) : m_traits(traits) {}
|
||||
|
|
@ -252,12 +255,12 @@ public:
|
|||
friend class Arr_segment_traits_2<Kernel>;
|
||||
|
||||
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);
|
||||
* SMALLER if x(p1) < x(p2);
|
||||
* EQUAL if x(p1) = x(p2).
|
||||
* \return `LARGER` if x(p1) > x(p2);
|
||||
* `SMALLER` if x(p1) < x(p2);
|
||||
* `EQUAL` if x(p1) = x(p2).
|
||||
*/
|
||||
Comparison_result operator()(const Point_2& p1, const Point_2& p2) const
|
||||
{
|
||||
|
|
@ -266,7 +269,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
/*! Obtain 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(*this); }
|
||||
|
||||
class Compare_xy_2 {
|
||||
|
|
@ -276,7 +279,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_xy_2(const Traits& traits) : m_traits(traits) {}
|
||||
|
|
@ -284,7 +287,7 @@ public:
|
|||
friend class Arr_segment_traits_2<Kernel>;
|
||||
|
||||
public:
|
||||
/*! Compare two points lexicographically: by x, then by y.
|
||||
/*! compares two points lexicographically: 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);
|
||||
|
|
@ -298,12 +301,12 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
/*! Obtain 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(*this); }
|
||||
|
||||
class Construct_min_vertex_2 {
|
||||
public:
|
||||
/*! Obtain 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.
|
||||
*/
|
||||
|
|
@ -311,13 +314,13 @@ public:
|
|||
{ return (cv.left()); }
|
||||
};
|
||||
|
||||
/*! Obtain 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(); }
|
||||
|
||||
class Construct_max_vertex_2 {
|
||||
public:
|
||||
/*! Obtain 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.
|
||||
*/
|
||||
|
|
@ -325,13 +328,13 @@ public:
|
|||
{ return (cv.right()); }
|
||||
};
|
||||
|
||||
/*! Obtain 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(); }
|
||||
|
||||
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.
|
||||
*/
|
||||
|
|
@ -339,17 +342,17 @@ public:
|
|||
{ return (cv.is_vertical()); }
|
||||
};
|
||||
|
||||
/*! Obtain 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(); }
|
||||
|
||||
class Compare_y_at_x_2 {
|
||||
protected:
|
||||
typedef Arr_segment_traits_2<Kernel> Traits;
|
||||
|
||||
/*! the traits (in case it has state) */
|
||||
/*! The traits (in case it has state) */
|
||||
const Traits& m_traits;
|
||||
|
||||
/*! Constructor
|
||||
/*! constructs
|
||||
* \param traits the traits (in case it has state)
|
||||
*/
|
||||
Compare_y_at_x_2(const Traits& traits) : m_traits(traits) {}
|
||||
|
|
@ -357,13 +360,13 @@ public:
|
|||
friend class Arr_segment_traits_2<Kernel>;
|
||||
|
||||
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.
|
||||
* \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.
|
||||
* \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.
|
||||
*/
|
||||
Comparison_result operator()(const Point_2& p,
|
||||
const X_monotone_curve_2& cv) const
|
||||
|
|
@ -387,7 +390,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
/*! Obtain 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(*this); }
|
||||
|
||||
|
|
@ -398,7 +401,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_y_at_x_left_2(const Traits& traits) : m_traits(traits) {}
|
||||
|
|
@ -406,15 +409,15 @@ public:
|
|||
friend class Arr_segment_traits_2<Kernel>;
|
||||
|
||||
public:
|
||||
/*! Compare 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 immediately to
|
||||
* the left of p: SMALLER, LARGER or EQUAL.
|
||||
* \return the relative position of `cv1` with respect to `cv2` immediately
|
||||
* to the left of `p`: `SMALLER`, `LARGER`, or `EQUAL`.
|
||||
*/
|
||||
Comparison_result operator()(const X_monotone_curve_2& cv1,
|
||||
const X_monotone_curve_2& cv2,
|
||||
|
|
@ -441,7 +444,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
/*! Obtain 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(*this); }
|
||||
|
||||
|
|
@ -452,7 +455,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_y_at_x_right_2(const Traits& traits) : m_traits(traits) {}
|
||||
|
|
@ -460,15 +463,15 @@ public:
|
|||
friend class Arr_segment_traits_2<Kernel>;
|
||||
|
||||
public:
|
||||
/*! Compare the y value of two x-monotone curves immediately to the right
|
||||
* of their intersection point.
|
||||
/*! compares the \f$y\f$-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.
|
||||
* \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 right.
|
||||
* \return the relative position of cv1 with respect to cv2 immediately to
|
||||
* the right of p: SMALLER, LARGER or EQUAL.
|
||||
* \return the relative position of `cv1` with respect to `cv2` immediately
|
||||
* to the right of `p`: `SMALLER`, `LARGER`, or `EQUAL`.
|
||||
*/
|
||||
Comparison_result operator()(const X_monotone_curve_2& cv1,
|
||||
const X_monotone_curve_2& cv2,
|
||||
|
|
@ -493,7 +496,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
/*! Obtain 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(*this); }
|
||||
|
||||
|
|
@ -504,7 +507,7 @@ public:
|
|||
/*! The traits (in case it has state) */
|
||||
const Traits& m_traits;
|
||||
|
||||
/*! Constructor
|
||||
/*! constructs
|
||||
* \param traits the traits (in case it has state)
|
||||
*/
|
||||
Equal_2(const Traits& traits) : m_traits(traits) {}
|
||||
|
|
@ -512,8 +515,8 @@ public:
|
|||
friend class Arr_segment_traits_2<Kernel>;
|
||||
|
||||
public:
|
||||
/*! Check whether the two x-monotone curves are the same (have the same
|
||||
* graph).
|
||||
/*! checks whether 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.
|
||||
|
|
@ -528,7 +531,7 @@ public:
|
|||
equal(cv1.right(), cv2.right()));
|
||||
}
|
||||
|
||||
/*! Determine whether the two points are the same.
|
||||
/*! determines whether 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.
|
||||
|
|
@ -540,7 +543,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
/*! Obtain an Equal_2 functor object. */
|
||||
/*! obtains an `Equal_2` functor object. */
|
||||
Equal_2 equal_2_object() const { return Equal_2(*this); }
|
||||
|
||||
//@}
|
||||
|
|
@ -549,13 +552,13 @@ public:
|
|||
//@{
|
||||
|
||||
/*! \class Make_x_monotone_2
|
||||
* 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 {
|
||||
public:
|
||||
/*! Subdivide a given curve into x-monotone subcurves and insert them into
|
||||
* a given output iterator. As segments are always x_monotone a single
|
||||
* object is inserted.
|
||||
/*! subdivides a given curve into \f$x\f$-monotone subcurves and insert them
|
||||
* into a given output iterator. As segments are always \f$x\f$_monotone a
|
||||
* single object is inserted.
|
||||
* \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
|
||||
|
|
@ -573,7 +576,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(); }
|
||||
|
||||
|
|
@ -584,7 +587,7 @@ public:
|
|||
/*! The traits (in case it has state) */
|
||||
const Traits& m_traits;
|
||||
|
||||
/*! Constructor
|
||||
/*! constructs
|
||||
* \param traits the traits (in case it has state)
|
||||
*/
|
||||
Split_2(const Traits& traits) : m_traits(traits) {}
|
||||
|
|
@ -592,12 +595,13 @@ public:
|
|||
friend class Arr_segment_traits_2<Kernel>;
|
||||
|
||||
public:
|
||||
/*! Split a given x-monotone curve at a given point into two sub-curves.
|
||||
/*! split 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 endpoints.
|
||||
* \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 endpoints.
|
||||
*/
|
||||
void operator()(const X_monotone_curve_2& cv, const Point_2& p,
|
||||
X_monotone_curve_2& c1, X_monotone_curve_2& c2) const
|
||||
|
|
@ -619,7 +623,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 {
|
||||
|
|
@ -629,7 +633,7 @@ public:
|
|||
/*! The traits (in case it has state) */
|
||||
const Traits& m_traits;
|
||||
|
||||
/*! Construct
|
||||
/*! constructs
|
||||
* \param traits the traits (in case it has state)
|
||||
*/
|
||||
Intersect_2(const Traits& traits) : m_traits(traits) {}
|
||||
|
|
@ -679,7 +683,7 @@ public:
|
|||
return false;
|
||||
}
|
||||
|
||||
/*! Determine whether the bounding boxes of two segments overlap
|
||||
/*! determines whether the bounding boxes of two segments overlap
|
||||
*/
|
||||
bool do_bboxes_overlap(const X_monotone_curve_2& cv1,
|
||||
const X_monotone_curve_2& cv2) const
|
||||
|
|
@ -692,7 +696,7 @@ public:
|
|||
}
|
||||
|
||||
public:
|
||||
/*! Find the intersections of the two given curves and insert them into the
|
||||
/*! finds the intersections of the two given curves and insert them into the
|
||||
* given output iterator. As two segments may intersect only once, only a
|
||||
* single intersection will be contained in the iterator.
|
||||
* \param cv1 the first curve.
|
||||
|
|
@ -778,7 +782,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 {
|
||||
|
|
@ -788,7 +792,7 @@ public:
|
|||
/*! The traits (in case it has state) */
|
||||
const Traits& m_traits;
|
||||
|
||||
/*! Constructor
|
||||
/*! constructs
|
||||
* \param traits the traits (in case it has state)
|
||||
*/
|
||||
Are_mergeable_2(const Traits& traits) : m_traits(traits) {}
|
||||
|
|
@ -796,12 +800,12 @@ public:
|
|||
friend class Arr_segment_traits_2<Kernel>;
|
||||
|
||||
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, that is, if they are
|
||||
* supported by the same line; (false) otherwise.
|
||||
* \pre cv1 and cv2 share a common endpoint.
|
||||
* \pre `cv1` and `cv2` share a common endpoint.
|
||||
*/
|
||||
bool operator()(const X_monotone_curve_2& cv1,
|
||||
const X_monotone_curve_2& cv2) const
|
||||
|
|
@ -819,12 +823,12 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
/*! 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); }
|
||||
|
||||
/*! \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 {
|
||||
protected:
|
||||
|
|
@ -833,7 +837,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) {}
|
||||
|
|
@ -841,7 +845,7 @@ public:
|
|||
friend class Arr_segment_traits_2<Kernel>;
|
||||
|
||||
public:
|
||||
/*! Merge two given x-monotone curves into a single curve (segment).
|
||||
/*! merges two given \f$x\f$-monotone curves into a single curve (segment).
|
||||
* \param cv1 the first curve.
|
||||
* \param cv2 the second curve.
|
||||
* \param c Output: the merged curve.
|
||||
|
|
@ -872,7 +876,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
/*! Obtain a Merge_2 functor object. */
|
||||
/*! obtains a `Merge_2` functor object. */
|
||||
Merge_2 merge_2_object() const { return Merge_2(*this); }
|
||||
//@}
|
||||
|
||||
|
|
@ -889,7 +893,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) {}
|
||||
|
|
@ -897,24 +901,24 @@ public:
|
|||
friend class Arr_segment_traits_2<Kernel>;
|
||||
|
||||
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 */,
|
||||
|
|
@ -933,7 +937,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
/*! Obtain an Approximate_2 functor object. */
|
||||
/*! obtains an `Approximate_2` functor object. */
|
||||
Approximate_2 approximate_2_object() const { return Approximate_2(*this); }
|
||||
|
||||
//! Functor
|
||||
|
|
@ -944,7 +948,7 @@ public:
|
|||
//! The traits (in case it has state).
|
||||
const Traits& m_traits;
|
||||
|
||||
/*! Constructor
|
||||
/*! constructs
|
||||
* \param traits the traits (in case it has state)
|
||||
*/
|
||||
Construct_x_monotone_curve_2(const Traits& traits) : m_traits(traits) {}
|
||||
|
|
@ -954,7 +958,7 @@ public:
|
|||
public:
|
||||
typedef typename Kernel::Segment_2 Segment_2;
|
||||
|
||||
/*! Obtain an x-monotone curve connecting two given endpoints.
|
||||
/*! obtains an \f$x\f$-monotone curve connecting two given endpoints.
|
||||
* \param source the first point.
|
||||
* \param target the second point.
|
||||
* \pre `source` and `target` must not be equal.
|
||||
|
|
@ -975,7 +979,7 @@ public:
|
|||
is_directed_right, is_vert, is_degen);
|
||||
}
|
||||
|
||||
/*! Obtain an \f$x\f$-monotone curve given a Kernel segment.
|
||||
/*! obtains an \f$x\f$-monotone curve given a Kernel segment.
|
||||
* \param seg the segment.
|
||||
* \return the \f$x\f$-monotone curve.
|
||||
* \pre the segment is not degenerate.
|
||||
|
|
@ -998,7 +1002,7 @@ public:
|
|||
is_directed_right, is_vert, is_degen);
|
||||
}
|
||||
|
||||
/*! Obtain an \f$x\f$-monotone curve given two endpoints and the supporting
|
||||
/*! obtains an \f$x\f$-monotone curve given two endpoints and the supporting
|
||||
* line.
|
||||
* \param line the supporting line.
|
||||
* \param the source point.
|
||||
|
|
@ -1026,7 +1030,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); }
|
||||
//@}
|
||||
|
|
@ -1037,7 +1041,7 @@ public:
|
|||
//! Functor
|
||||
typedef Construct_x_monotone_curve_2 Construct_curve_2;
|
||||
|
||||
/*! Obtain a Construct_curve_2 functor object. */
|
||||
/*! obtains a `Construct_curve_2` functor object. */
|
||||
Construct_curve_2 construct_curve_2_object() const
|
||||
{ return Construct_x_monotone_curve_2(*this); }
|
||||
//@}
|
||||
|
|
@ -1052,18 +1056,18 @@ 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_segment_traits_2<Kernel>;
|
||||
|
||||
/*! Obtain a trimmed version of a line.
|
||||
* \param xseg the x-monotone segment.
|
||||
/*! obtains a trimmed version of a line.
|
||||
* \param xseg the \f$x\f$-monotone segment.
|
||||
* \param src the new start endpoint.
|
||||
* \param tgt the new end endpoint.
|
||||
* \return the trimmed x-monotone segment.
|
||||
* \return the trimmed \f$x\f$-monotone segment.
|
||||
* \pre src != tgt
|
||||
* \pre both points must lie on segment
|
||||
*/
|
||||
|
|
@ -1094,12 +1098,12 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
/*! Obtain a Trim_2 functor object */
|
||||
/*! obtains a `Trim_2` functor object */
|
||||
Trim_2 trim_2_object() const { return Trim_2(*this); }
|
||||
|
||||
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;
|
||||
|
|
@ -1109,13 +1113,13 @@ public:
|
|||
{ return (cv.is_directed_right()) ? (SMALLER) : (LARGER); }
|
||||
};
|
||||
|
||||
/*! 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(); }
|
||||
|
||||
class Construct_opposite_2 {
|
||||
public:
|
||||
/*! Construct an opposite x-monotone (with swapped source and target).
|
||||
/*! Construct an opposite \f$x\f$-monotone (with swapped source and target).
|
||||
* \param cv the curve.
|
||||
* \return the opposite curve.
|
||||
*/
|
||||
|
|
@ -1123,7 +1127,7 @@ public:
|
|||
{ return (cv.flip()); }
|
||||
};
|
||||
|
||||
/*! 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(); }
|
||||
//@}
|
||||
|
|
@ -1146,7 +1150,7 @@ public:
|
|||
friend class Arr_segment_traits_2<Kernel>;
|
||||
|
||||
public:
|
||||
/*! Determine whether a given point is in the \f$x\f$-range of a given
|
||||
/*! determines whether a given point is in the \f$x\f$-range of a given
|
||||
* segment.
|
||||
* \param cv the segment.
|
||||
* \param p the point.
|
||||
|
|
@ -1166,7 +1170,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
/*! Obtain an Is_in_x_range_2 functor object */
|
||||
/*! obtains an `Is_in_x_range_2` functor object */
|
||||
Is_in_x_range_2 is_in_x_range_2_object() const
|
||||
{ return Is_in_x_range_2(*this); }
|
||||
|
||||
|
|
@ -1185,7 +1189,7 @@ public:
|
|||
friend class Arr_segment_traits_2<Kernel>;
|
||||
|
||||
public:
|
||||
/*! Determine whether a given point is in the \f$y\f$-range of a given
|
||||
/*! determines whether a given point is in the \f$y\f$-range of a given
|
||||
* segment.
|
||||
* \param cv the segment.
|
||||
* \param p the point.
|
||||
|
|
@ -1205,7 +1209,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
/*! Obtain an Is_in_y_range_2 functor object */
|
||||
/*! obtains an `Is_in_y_range_2` functor object */
|
||||
Is_in_y_range_2 is_in_y_range_2_object() const
|
||||
{ return Is_in_y_range_2(*this); }
|
||||
|
||||
|
|
@ -1367,7 +1371,7 @@ template <typename Kernel>
|
|||
bool Arr_segment_traits_2<Kernel>::_Segment_cached_2::is_directed_right() const
|
||||
{ return m_is_directed_right; }
|
||||
|
||||
//! \brief obtain the segment source.
|
||||
//! \brief obtains the segment source.
|
||||
template <typename Kernel>
|
||||
const typename Kernel::Point_2&
|
||||
Arr_segment_traits_2<Kernel>::_Segment_cached_2::source() const { return m_ps; }
|
||||
|
|
@ -1419,7 +1423,9 @@ void Arr_segment_traits_2<Kernel>::_Segment_cached_2::set_right(const Point_2& p
|
|||
else m_ps = p;
|
||||
}
|
||||
|
||||
//! \brief determines whether the given point is in the x-range of the segment.
|
||||
/*! \brief determines whether the given point is in the \f$x\f$-range of the
|
||||
* segment.
|
||||
*/
|
||||
template <typename Kernel>
|
||||
bool Arr_segment_traits_2<Kernel>::_Segment_cached_2::
|
||||
is_in_x_range(const Point_2& p) const
|
||||
|
|
@ -1435,7 +1441,9 @@ is_in_x_range(const Point_2& p) const
|
|||
return (res2 != LARGER);
|
||||
}
|
||||
|
||||
//! \brief determines whether the given point is in the y-range of the segment.
|
||||
/*! \brief determines whether the given point is in the \f$y\f$-range of the
|
||||
* segment.
|
||||
*/
|
||||
template <typename Kernel>
|
||||
bool Arr_segment_traits_2<Kernel>::_Segment_cached_2::
|
||||
is_in_y_range(const Point_2& p) const
|
||||
|
|
|
|||
|
|
@ -137,7 +137,7 @@ private:
|
|||
typedef typename Polyhedron::Vertex_handle
|
||||
Polyhedron_vertex_handle;
|
||||
|
||||
/*! Constructor */
|
||||
/*! constructs */
|
||||
Point_adder(Builder& B) : m_B(B) {}
|
||||
|
||||
Polyhedron_vertex_handle operator()(PointIterator pi)
|
||||
|
|
@ -158,7 +158,7 @@ private:
|
|||
typedef typename Polyhedron::Vertex_handle
|
||||
Polyhedron_vertex_handle;
|
||||
|
||||
/*! Constructor */
|
||||
/*! constructs */
|
||||
Point_adder(Builder& B) : m_B(B) {}
|
||||
|
||||
Polyhedron_vertex_handle operator()(Point_3* pi)
|
||||
|
|
@ -206,7 +206,7 @@ private:
|
|||
size_type m_marked_facet_index;
|
||||
|
||||
public:
|
||||
/*! Constructor */
|
||||
/*! constructs */
|
||||
Build_surface(const PointIterator& points_begin,
|
||||
const PointIterator& points_end,
|
||||
size_type num_points,
|
||||
|
|
@ -222,19 +222,19 @@ private:
|
|||
m_marked_facet_index(0)
|
||||
{}
|
||||
|
||||
/*! Destructor */
|
||||
/*! destructs */
|
||||
virtual ~Build_surface() {}
|
||||
|
||||
/*! Set the marked-vertex index */
|
||||
/*! sets the marked-vertex index */
|
||||
void set_marked_vertex_index(size_type id) {m_marked_vertex_index = id;}
|
||||
|
||||
/*! Set the marked-edge index */
|
||||
/*! sets the marked-edge index */
|
||||
void set_marked_edge_index(size_type id) {m_marked_edge_index = id;}
|
||||
|
||||
/*! Set the marked-face index */
|
||||
/*! sets the marked-face index */
|
||||
void set_marked_facet_index(size_type id) {m_marked_facet_index = id;}
|
||||
|
||||
/*! Add vertices to the current facet. */
|
||||
/*! adds vertices to the current facet. */
|
||||
template <typename Iterator, typename Builder>
|
||||
void add_vertices_to_facet(Iterator begin, Iterator end, Builder& B)
|
||||
{ for (Iterator it = begin; it != end; ++it) B.add_vertex_to_facet(*it); }
|
||||
|
|
@ -315,7 +315,7 @@ private:
|
|||
}
|
||||
}
|
||||
|
||||
/*! Update the polyhedron */
|
||||
/*! updates the polyhedron */
|
||||
template <typename PointIterator, typename CoordIndexIter>
|
||||
void update_polyhedron(Polyhedron& polyhedron,
|
||||
const PointIterator& points_begin,
|
||||
|
|
@ -348,17 +348,17 @@ private:
|
|||
}
|
||||
}
|
||||
|
||||
/*! Obtain the normal of a facet of a polyhedron that supports normals */
|
||||
/*! obtains the normal of a facet of a polyhedron that supports normals */
|
||||
template <typename Facet>
|
||||
const Vector_3& get_normal(const Facet& facet, std::true_type) const
|
||||
{ return facet->plane(); }
|
||||
|
||||
/*! Obtain the normal of a facet of a polyhedron that supports planes */
|
||||
/*! obtains the normal of a facet of a polyhedron that supports planes */
|
||||
template <typename Facet>
|
||||
Vector_3 get_normal(const Facet& facet, std::false_type) const
|
||||
{ return facet->plane().orthogonal_vector(); }
|
||||
|
||||
/*! Process a polyhedron vertex recursively constructing the Gaussian map
|
||||
/*! processes a polyhedron vertex recursively constructing the Gaussian map
|
||||
* of the polyhedron
|
||||
* \param src the polyhedron vertex currently processed
|
||||
* \param first_time true if the invocation to this function is the first
|
||||
|
|
@ -486,7 +486,7 @@ private:
|
|||
} while (hec != begin_hec);
|
||||
}
|
||||
|
||||
/*! Compute the spherical gaussian map of a convex polyhedron
|
||||
/*! computes the spherical gaussian map of a convex polyhedron
|
||||
* \param polyhedron the input polyhedron
|
||||
*/
|
||||
void compute_sgm(Polyhedron& polyhedron)
|
||||
|
|
@ -513,7 +513,7 @@ private:
|
|||
}
|
||||
|
||||
public:
|
||||
/*! Constructor */
|
||||
/*! constructs */
|
||||
Arr_polyhedral_sgm_initializer(PolyhedralSgm& sgm) :
|
||||
Base(sgm),
|
||||
m_visitor(nullptr),
|
||||
|
|
@ -522,10 +522,10 @@ public:
|
|||
m_marked_facet_index(0)
|
||||
{}
|
||||
|
||||
/*! Destructor */
|
||||
/*! destructs */
|
||||
virtual ~Arr_polyhedral_sgm_initializer() {}
|
||||
|
||||
/*! Initialize the Gaussian map
|
||||
/*! initializes the Gaussian map
|
||||
* \param polyhedron
|
||||
* \param visitor
|
||||
* \pre The polyhedron polyhedron does not have coplanar facets.
|
||||
|
|
@ -552,7 +552,7 @@ public:
|
|||
compute_sgm(polyhedron);
|
||||
}
|
||||
|
||||
/*! Initialize the Spherical Gaussian map */
|
||||
/*! initializes the Spherical Gaussian map */
|
||||
template <typename PointIterator, typename CoordIndexIter>
|
||||
void operator()(const PointIterator& points_begin,
|
||||
const PointIterator& points_end,
|
||||
|
|
@ -587,13 +587,13 @@ public:
|
|||
polyhedron.clear();
|
||||
}
|
||||
|
||||
/*! Set the marked-vertex index */
|
||||
/*! sets the marked-vertex index */
|
||||
void set_marked_vertex_index(size_type id) {m_marked_vertex_index = id;}
|
||||
|
||||
/*! Set the marked-edge index */
|
||||
/*! sets the marked-edge index */
|
||||
void set_marked_edge_index(size_type id) {m_marked_edge_index = id;}
|
||||
|
||||
/*! Set the marked-face index */
|
||||
/*! sets the marked-face index */
|
||||
void set_marked_facet_index(size_type id) {m_marked_facet_index = id;}
|
||||
};
|
||||
|
||||
|
|
@ -637,7 +637,7 @@ private:
|
|||
/*! Indicated whether the center has been calculated */
|
||||
bool m_dirty_center;
|
||||
|
||||
/*! Calculate the center of the polyhedron */
|
||||
/*! calculates the center of the polyhedron */
|
||||
void calculate_center()
|
||||
{
|
||||
// Count them:
|
||||
|
|
@ -656,13 +656,13 @@ private:
|
|||
}
|
||||
|
||||
public:
|
||||
/*! Parameter-less Constructor */
|
||||
/*! constructs default */
|
||||
Arr_polyhedral_sgm() : m_dirty_center(true) {}
|
||||
|
||||
/*! Copy Constructor */
|
||||
/*! constructs copy */
|
||||
Arr_polyhedral_sgm(const Self& sgm) { assign(sgm); }
|
||||
|
||||
/*! Assign a spherical Gaussian map to this */
|
||||
/*! assigns a spherical Gaussian map to this */
|
||||
void assign(const Self& sgm)
|
||||
{
|
||||
// Call the assign of the base class.
|
||||
|
|
@ -692,10 +692,10 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
/*! Destructor */
|
||||
/*! destructs */
|
||||
virtual ~Arr_polyhedral_sgm() { clear(); }
|
||||
|
||||
/*! Clear the internal representation and auxiliary data structures
|
||||
/*! clears the internal representation and auxiliary data structures
|
||||
*/
|
||||
void clear()
|
||||
{
|
||||
|
|
@ -703,7 +703,7 @@ public:
|
|||
Base::clear();
|
||||
}
|
||||
|
||||
// /*! Compute the minkowski sum of a range of objects of type
|
||||
// /*! computes the minkowski sum of a range of objects of type
|
||||
// * Arr_polyhedral_sgm
|
||||
// */
|
||||
// template <typename SgmIterator>
|
||||
|
|
@ -714,7 +714,7 @@ public:
|
|||
// minkowski_sum(sgm1, sgm2);
|
||||
// }
|
||||
|
||||
// /*! Compute the minkowski sum of a range of objects of type
|
||||
// /*! computes the minkowski sum of a range of objects of type
|
||||
// * Arr_polyhedral_sgm
|
||||
// */
|
||||
// template <typename SgmIterator, typename OverlayTraits>
|
||||
|
|
@ -726,7 +726,7 @@ public:
|
|||
// minkowski_sum(sgm1, sgm2, overlay_traits);
|
||||
// }
|
||||
|
||||
/*! Compute the Minkowski sum of 2 objects of type Arr_polyhedral_sgm
|
||||
/*! computes the Minkowski sum of 2 objects of type Arr_polyhedral_sgm
|
||||
* \param sgm1 the first Arr_polyhedral_sgm object
|
||||
* \param sgm2 the second Arr_polyhedral_sgm object
|
||||
*/
|
||||
|
|
@ -740,7 +740,7 @@ public:
|
|||
// print_stat();
|
||||
}
|
||||
|
||||
/*! Compute the Minkowski sum of 2 objects of type Arr_polyhedral_sgm
|
||||
/*! computes the Minkowski sum of 2 objects of type Arr_polyhedral_sgm
|
||||
* \param sgm1 the first Arr_polyhedral_sgm object
|
||||
* \param sgm2 the second Arr_polyhedral_sgm object
|
||||
*/
|
||||
|
|
@ -750,11 +750,11 @@ public:
|
|||
OverlayTraits& overlay_traits)
|
||||
{ CGAL::overlay(sgm1, sgm2, *this, overlay_traits); }
|
||||
|
||||
/*! Obtain the number of (primal) vertices */
|
||||
/*! obtains the number of (primal) vertices */
|
||||
size_type number_of_vertices() const
|
||||
{ return (static_cast<const Base*>(this))->number_of_faces(); }
|
||||
|
||||
/*! Obtain the number of (primal) edges
|
||||
/*! obtains the number of (primal) edges
|
||||
* \return the number of (primal) edges.
|
||||
* Edges that connect vertices of degree 2 are not counted, as they have
|
||||
* been introduced only to make non-x-monotone curves x-monotone.
|
||||
|
|
@ -769,7 +769,7 @@ public:
|
|||
return (static_cast<const Base*>(this))->number_of_edges() - size;
|
||||
}
|
||||
|
||||
/*! Obtain the number of (primal) facets
|
||||
/*! obtains the number of (primal) facets
|
||||
* \return the number of (primal) facets.
|
||||
* Vertices of degree 2 are not counted, as they have been introduced only
|
||||
* to make non-x-monotone curves x-monotone.
|
||||
|
|
@ -791,7 +791,7 @@ public:
|
|||
std::cout << "vertex of polyhedron = " << vit->point() << std::endl;
|
||||
}
|
||||
|
||||
/*! Print statistics */
|
||||
/*! prints statistics */
|
||||
void print_stat()
|
||||
{
|
||||
Base::print_stat();
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ namespace CGAL {
|
|||
template <class Point_2>
|
||||
class Arr_polyhedral_sgm_arr_vertex : public CGAL::Arr_vertex_base<Point_2> {
|
||||
public:
|
||||
/*! Constructor */
|
||||
/*! constructs */
|
||||
Arr_polyhedral_sgm_arr_vertex() {}
|
||||
};
|
||||
|
||||
|
|
@ -44,10 +44,10 @@ private:
|
|||
unsigned int m_arr_mask;
|
||||
|
||||
public:
|
||||
/*! Constructor */
|
||||
/*! constructs */
|
||||
Arr_polyhedral_sgm_arr_halfedge() : m_arr_mask(0x0) {}
|
||||
|
||||
/*! Add a arrangement to the mask of the original arrangements in the
|
||||
/*! adds a arrangement to the mask of the original arrangements in the
|
||||
* minkowski sum.
|
||||
* \param arr_id the id of the added arrangement
|
||||
*/
|
||||
|
|
@ -58,12 +58,12 @@ public:
|
|||
*/
|
||||
bool is_arr(unsigned int id) const { return m_arr_mask & (0x1 << id); }
|
||||
|
||||
/*! Obtain the mask of the ids of the original arrangements that contributed
|
||||
/*! obtains the mask of the ids of the original arrangements that contributed
|
||||
* the halfedge while performing the minkowski sum
|
||||
*/
|
||||
unsigned int arr_mask() const { return m_arr_mask; }
|
||||
|
||||
/*! Set the arr of an edge with a value.
|
||||
/*! sets the arr of an edge with a value.
|
||||
* \param arr_id the id to set to.
|
||||
*/
|
||||
void set_arr(unsigned int id) { m_arr_mask = id; }
|
||||
|
|
@ -80,23 +80,23 @@ private:
|
|||
bool m_is_set;
|
||||
|
||||
public:
|
||||
/*! Constructor */
|
||||
/*! constructs */
|
||||
Arr_polyhedral_sgm_arr_face() : m_is_set(false) { }
|
||||
|
||||
/*! Set the 3D point of the original polyhedron */
|
||||
/*! sets the 3D point of the original polyhedron */
|
||||
void set_point(const Point_3 & point)
|
||||
{
|
||||
m_point = point;
|
||||
m_is_set = true;
|
||||
}
|
||||
|
||||
/*! Obtain the 3D point of the original polyhedron */
|
||||
/*! obtains the 3D point of the original polyhedron */
|
||||
const Point_3 & point() const { return m_point; }
|
||||
|
||||
/*! \brief returns true iff the point has been set already */
|
||||
/*! returns true iff the point has been set already */
|
||||
bool is_set() const { return m_is_set; }
|
||||
|
||||
/*! \brief resets the flag */
|
||||
/*! resets the flag */
|
||||
void set_is_set(bool flag) { m_is_set = flag; }
|
||||
};
|
||||
|
||||
|
|
@ -108,7 +108,7 @@ class Arr_polyhedral_sgm_arr_dcel :
|
|||
Arr_polyhedral_sgm_arr_face<typename Traits::Point_3> >
|
||||
{
|
||||
public:
|
||||
/*! Constructor */
|
||||
/*! constructs */
|
||||
Arr_polyhedral_sgm_arr_dcel() {}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -62,30 +62,30 @@ private:
|
|||
public:
|
||||
using Point = typename Base::Point;
|
||||
|
||||
/*! Constructor */
|
||||
/*! constructs */
|
||||
Arr_polyhedral_sgm_polyhedron_3_vertex() :
|
||||
Base(), m_processed(false), m_marked(false) {}
|
||||
|
||||
/*! Constructor */
|
||||
/*! constructs */
|
||||
Arr_polyhedral_sgm_polyhedron_3_vertex(const Point & p) :
|
||||
Base(p), m_processed(false), m_marked(false) {}
|
||||
|
||||
/*! Obtain the mutable (geometrical) point. Delegate */
|
||||
/*! obtains the mutable (geometrical) point. Delegate */
|
||||
Point& point() { return Base::point(); }
|
||||
|
||||
/*! Obtain the constant (geometrical) point. Delegate */
|
||||
/*! obtains the constant (geometrical) point. Delegate */
|
||||
const Point& point () const { return Base::point(); }
|
||||
|
||||
/*! Set the flag */
|
||||
void set_processed(bool processed) { m_processed = processed; }
|
||||
|
||||
/*! Obtain the flag */
|
||||
/*! obtains the flag */
|
||||
bool processed() const { return m_processed; }
|
||||
|
||||
/*! Set the "marked" flag */
|
||||
void set_marked(bool marked) { m_marked = marked; }
|
||||
|
||||
/*! Obtain the "marked" flag */
|
||||
/*! obtains the "marked" flag */
|
||||
bool marked() const { return m_marked; }
|
||||
};
|
||||
|
||||
|
|
@ -101,20 +101,20 @@ private:
|
|||
bool m_marked;
|
||||
|
||||
public:
|
||||
/*! Constructor */
|
||||
/*! constructs */
|
||||
Arr_polyhedral_sgm_polyhedron_3_halfedge() :
|
||||
m_processed(false), m_marked(false) {}
|
||||
|
||||
/*! Set the flag */
|
||||
/*! sets the flag */
|
||||
void set_processed(bool processed) { m_processed = processed; }
|
||||
|
||||
/*! Obtain the flag */
|
||||
/*! obtains the flag */
|
||||
bool processed() const { return m_processed; }
|
||||
|
||||
/*! Set the "marked" flag */
|
||||
/*! sets the "marked" flag */
|
||||
void set_marked(bool marked) { m_marked = marked; }
|
||||
|
||||
/*! Obtain the "marked" flag */
|
||||
/*! obtains the "marked" flag */
|
||||
bool marked() const { return m_marked; }
|
||||
};
|
||||
|
||||
|
|
@ -136,25 +136,25 @@ private:
|
|||
public:
|
||||
using Plane = typename Base::Plane;
|
||||
|
||||
/*! Constructor */
|
||||
/*! constructs */
|
||||
Arr_polyhedral_sgm_polyhedron_3_face() : m_vertex(nullptr), m_marked(false) {}
|
||||
|
||||
/*! Obtain the mutable plane. Delegate */
|
||||
/*! obtains the mutable plane. Delegate */
|
||||
Plane& plane() { return Base::plane(); }
|
||||
|
||||
/*! Obtain the constant plane. Delegate */
|
||||
/*! obtains the constant plane. Delegate */
|
||||
const Plane& plane() const { return Base::plane(); }
|
||||
|
||||
/*! Obtain the vertex */
|
||||
/*! obtains the vertex */
|
||||
Arr_vertex_handle vertex() { return m_vertex; }
|
||||
|
||||
/*! Set the vertex */
|
||||
/*! sets the vertex */
|
||||
void set_vertex(Arr_vertex_handle vertex) { m_vertex = vertex; }
|
||||
|
||||
/*! Set the "marked" flag */
|
||||
/*! sets the "marked" flag */
|
||||
void set_marked(bool marked) { m_marked = marked; }
|
||||
|
||||
/*! Obtain the "marked" flag */
|
||||
/*! obtains the "marked" flag */
|
||||
bool marked() const { return m_marked; }
|
||||
};
|
||||
|
||||
|
|
@ -200,7 +200,7 @@ struct Arr_polyhedral_sgm_polyhedron_items : public Polyhedron_items_3 {
|
|||
template <class Sgm, class Traits>
|
||||
struct Arr_polyhedral_sgm_polyhedron_3 :
|
||||
public Polyhedron_3<Traits, Arr_polyhedral_sgm_polyhedron_items<Sgm>> {
|
||||
/*! Constructor */
|
||||
/*! constructs */
|
||||
Arr_polyhedral_sgm_polyhedron_3() {}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -113,10 +113,10 @@ public:
|
|||
private:
|
||||
//! A container of boundary vertices.
|
||||
struct Vertex_key_comparer {
|
||||
/*! Construct default */
|
||||
/*! constructs default */
|
||||
Vertex_key_comparer() : m_geom_traits(nullptr) {}
|
||||
|
||||
/*! Construct */
|
||||
/*! constructs */
|
||||
Vertex_key_comparer(const Gt_adaptor_2* geom_traits) :
|
||||
m_geom_traits(geom_traits)
|
||||
{}
|
||||
|
|
@ -165,18 +165,18 @@ public:
|
|||
///! \name Construction methods.
|
||||
//@{
|
||||
|
||||
/*! 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 Gt2* traits);
|
||||
|
||||
/*! Destructor */
|
||||
/*! destructs */
|
||||
~Arr_spherical_topology_traits_2();
|
||||
|
||||
/*! Assign the contents of another topology-traits class.
|
||||
/*! assigns the contents of another topology-traits class.
|
||||
* \param other the other spherical topology-traits.
|
||||
*/
|
||||
void assign(const Self& other);
|
||||
|
|
@ -185,65 +185,65 @@ public:
|
|||
///! \name Topology-traits methods.
|
||||
//@{
|
||||
|
||||
/*! Obtain the DCEL (const version). */
|
||||
/*! obtains the DCEL (const version). */
|
||||
const Dcel& dcel() const { return (m_dcel); }
|
||||
|
||||
/*! Obtain the DCEL (non-const version). */
|
||||
/*! obtains the DCEL (non-const version). */
|
||||
Dcel& dcel() { return m_dcel; }
|
||||
|
||||
/*! Determine whether the DCEL reprsenets an empty structure.
|
||||
/*! determines whether the DCEL reprsenets an empty structure.
|
||||
* \return true if the dcel reprsenets an empty structure; false otherwise.
|
||||
*/
|
||||
bool is_empty_dcel() const { return (m_dcel.size_of_vertices() == 0); }
|
||||
|
||||
/*! 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();
|
||||
|
||||
/*! Determine whether the given vertex is concrete.
|
||||
/*! determines whether the given vertex is concrete.
|
||||
* \param v the vertex.
|
||||
* \return true if v is mapped to a point on the discontinuity arc; false
|
||||
* otherwise.
|
||||
*/
|
||||
bool is_concrete_vertex(const Vertex* /* v */) const { return true; }
|
||||
|
||||
/*! Obtain the number of concrete vertices.
|
||||
/*! obtains the number of concrete vertices.
|
||||
* \return the number of concrete vertices.
|
||||
*/
|
||||
Size number_of_concrete_vertices() const
|
||||
{ return (m_dcel.size_of_vertices()); }
|
||||
|
||||
/*! Determine whether the given vertex is valid.
|
||||
/*! determines whether the given vertex is valid.
|
||||
* \param v the vertex.
|
||||
* \todo why is this needed, and where used?
|
||||
*/
|
||||
bool is_valid_vertex(const Vertex* /* v */) const { return true; }
|
||||
|
||||
/*! Obtain the number of valid vertices. */
|
||||
/*! obtains the number of valid vertices. */
|
||||
Size number_of_valid_vertices() const { return (m_dcel.size_of_vertices()); }
|
||||
|
||||
/*! Determine whether the given halfedge is valid. */
|
||||
/*! determines whether the given halfedge is valid. */
|
||||
bool is_valid_halfedge(const Halfedge* /* he */) const { return true; }
|
||||
|
||||
/*! Obtain the number of valid halfedges. */
|
||||
/*! obtains the number of valid halfedges. */
|
||||
Size number_of_valid_halfedges() const
|
||||
{ return (m_dcel.size_of_halfedges()); }
|
||||
|
||||
/*! Determine whether the given face is valid. */
|
||||
/*! determine whether the given face is valid. */
|
||||
bool is_valid_face(const Face* /* f */) const { return true; }
|
||||
|
||||
/*! Obtain the number of valid faces. */
|
||||
/*! obtains the number of valid faces. */
|
||||
Size number_of_valid_faces() const { return m_dcel.size_of_faces(); }
|
||||
|
||||
/*! Obtain the spherical face (const version). */
|
||||
/*! obtains the spherical face (const version). */
|
||||
const Face* spherical_face() const { return m_spherical_face; }
|
||||
|
||||
/*! Obtain the spherical face (non-const version). */
|
||||
/*! obtains the spherical face (non-const version). */
|
||||
Face* spherical_face() { return m_spherical_face; }
|
||||
|
||||
/*! Obtain the face containing the south pole (const version). */
|
||||
/*! obtains the face containing the south pole (const version). */
|
||||
const Face* south_face() const
|
||||
{
|
||||
if (m_boundary_vertices.empty()) return m_spherical_face;
|
||||
|
|
@ -251,7 +251,7 @@ public:
|
|||
return _face_below_vertex_on_discontinuity(it->second);
|
||||
}
|
||||
|
||||
/*! Obtain the face containing the south pole (non-const version). */
|
||||
/*! obtains the face containing the south pole (non-const version). */
|
||||
Face* south_face()
|
||||
{
|
||||
if (m_boundary_vertices.empty()) return m_spherical_face;
|
||||
|
|
@ -259,19 +259,19 @@ public:
|
|||
return _face_below_vertex_on_discontinuity(it->second);
|
||||
}
|
||||
|
||||
/*! Obtain the south pole (const version). */
|
||||
/*! obtains the south pole (const version). */
|
||||
const Vertex* south_pole() const { return m_south_pole; }
|
||||
|
||||
/*! Obtain the south pole (non-const version). */
|
||||
/*! obtains the south pole (non-const version). */
|
||||
Vertex* south_pole() { return m_south_pole; }
|
||||
|
||||
/*! Obtain the north pole (const version). */
|
||||
/*! obtains the north pole (const version). */
|
||||
const Vertex* north_pole() const { return m_north_pole; }
|
||||
|
||||
/*! Obtain the north pole (non-const version). */
|
||||
/*! obtains the north pole (non-const version). */
|
||||
Vertex* north_pole() { return m_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).
|
||||
*/
|
||||
Vertex* discontinuity_vertex(const Point_2& pt)
|
||||
|
|
@ -280,7 +280,7 @@ public:
|
|||
return (it != m_boundary_vertices.end()) ? it->second : nullptr;
|
||||
}
|
||||
|
||||
/*! 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
|
||||
|
|
@ -290,7 +290,7 @@ public:
|
|||
}
|
||||
|
||||
// TODO remove if all occurrences have been replaced with the new signature that queries for a point
|
||||
/*! Obtain a vertex on the line of discontinuity that corresponds to
|
||||
/*! obtains a vertex on the line of discontinuity that corresponds to
|
||||
* the given curve-end (or return NULL if no such vertex exists).
|
||||
*/
|
||||
Vertex* discontinuity_vertex(const X_monotone_curve_2& xc, Arr_curve_end ind)
|
||||
|
|
@ -404,7 +404,7 @@ public:
|
|||
///! \name Topology-traits methods.
|
||||
//@{
|
||||
|
||||
/*! Receive a notification on the creation of a new boundary vertex that
|
||||
/*! receives a notification on the creation of a new boundary vertex that
|
||||
* corresponds to a point.
|
||||
* \param v The new boundary vertex.
|
||||
* \param p The point.
|
||||
|
|
@ -416,7 +416,7 @@ public:
|
|||
Arr_parameter_space ps_x,
|
||||
Arr_parameter_space ps_y);
|
||||
|
||||
/*! Receive a notification on the creation of a new boundary vertex that
|
||||
/*! receives a notification on the creation of a new boundary vertex that
|
||||
* corresponds to a given curve end.
|
||||
* \param v The new boundary vertex.
|
||||
* \param xc The x-monotone curve.
|
||||
|
|
@ -430,7 +430,7 @@ public:
|
|||
Arr_parameter_space ps_x,
|
||||
Arr_parameter_space ps_y);
|
||||
|
||||
/*! Determines whether the function should decide on swapping the predecssor
|
||||
/*! determines whether the function should decide on swapping the predecssor
|
||||
* halfedges that imply two ccb (and whose signs are given here).
|
||||
* If true, swap_predecessors will be correctly set. If false,
|
||||
* generic way of searching for lexicographically minimal point and checking
|
||||
|
|
@ -445,8 +445,8 @@ public:
|
|||
bool& swap_predecessors) const;
|
||||
|
||||
|
||||
/*! Given signs of two ccbs that show up when splitting upon insertion of
|
||||
* curve into two, determine what happens to the face(s).
|
||||
/*! given signs of two ccbs that show up when splitting upon insertion of
|
||||
* curve into two, determines what happens to the face(s).
|
||||
* \param signs1 signs in x and y of the first implied ccb
|
||||
* \param signs2 signs in x and y of the secondd implied ccb
|
||||
* \return A pair indicating whether the insertion will cause the face
|
||||
|
|
@ -464,7 +464,7 @@ public:
|
|||
return (std::make_pair(true, true));
|
||||
}
|
||||
|
||||
/*! Determine whether a given point lies in the interior of a given face.
|
||||
/*! determines whether a given point lies in the interior of a given face.
|
||||
* \param f The face.
|
||||
* \param p The query point.
|
||||
* \param v The vertex associated with p (if exists).
|
||||
|
|
@ -473,7 +473,7 @@ public:
|
|||
*/
|
||||
bool is_in_face(const Face* f, const Point_2& p, const Vertex* v) const;
|
||||
|
||||
/*! Compare the relative y-position of a given point and a given edge.
|
||||
/*! compares the relative y-position of a given point and a given edge.
|
||||
* \param p The point.
|
||||
* \param he The edge (one of the pair of halfedges).
|
||||
* \pre p should lie in the x-range of the given edge.
|
||||
|
|
@ -482,7 +482,7 @@ public:
|
|||
Comparison_result compare_y_at_x(const Point_2& p,
|
||||
const Halfedge* he) const;
|
||||
|
||||
/*! Determine whether a given vertex is associated with a given curve end.
|
||||
/*! determines whether a given vertex is associated with a given curve end.
|
||||
* \param v The vertex.
|
||||
* \param xc The x-monotone curve.
|
||||
* \param ind The curve end.
|
||||
|
|
@ -495,8 +495,8 @@ public:
|
|||
const X_monotone_curve_2& xc, Arr_curve_end ind,
|
||||
Arr_parameter_space ps_x, Arr_parameter_space ps_y) const;
|
||||
|
||||
/*! 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 xc The x-monotone curve.
|
||||
|
|
@ -513,7 +513,7 @@ public:
|
|||
Arr_parameter_space ps_x,
|
||||
Arr_parameter_space ps_y);
|
||||
|
||||
/*! 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.
|
||||
|
|
@ -530,7 +530,7 @@ public:
|
|||
Arr_parameter_space ps_x,
|
||||
Arr_parameter_space ps_y) const;
|
||||
|
||||
/*! Locate a DCEL feature that contains the given curve end.
|
||||
/*! locates a DCEL feature that contains the given curve end.
|
||||
* \param xc The x-monotone curve.
|
||||
* \param ind The curve end.
|
||||
* \param ps_x The boundary condition of the curve end in x.
|
||||
|
|
@ -543,7 +543,7 @@ public:
|
|||
Arr_parameter_space ps_x,
|
||||
Arr_parameter_space ps_y);
|
||||
|
||||
/*! 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.
|
||||
|
|
@ -557,20 +557,20 @@ public:
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
/*! Determine whether the given face is unbounded.
|
||||
/*! determines whether the given face is unbounded.
|
||||
* \param f The face.
|
||||
* \return true if f is unbounded; false otherwise.
|
||||
* All faces on a sphere are bounded:
|
||||
*/
|
||||
bool is_unbounded(const Face* /* f */) const { return false; }
|
||||
|
||||
/*! 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.
|
||||
*/
|
||||
bool is_redundant(const Vertex* v) const;
|
||||
|
||||
/*! 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.
|
||||
|
|
@ -579,16 +579,17 @@ public:
|
|||
Halfedge* erase_redundant_vertex(Vertex* v);
|
||||
|
||||
//! 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.
|
||||
/*! 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 spherical_face(); }
|
||||
|
||||
//! reference_face (non-const version).
|
||||
/*! The function returns a reference face of the arrangement.
|
||||
/*! 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 spherical_face(); }
|
||||
|
|
@ -598,7 +599,7 @@ protected:
|
|||
/// \name Auxiliary functions.
|
||||
//@{
|
||||
|
||||
/*! Obtain the curve associated with a boundary vertex.
|
||||
/*! obtains the curve associated with a boundary vertex.
|
||||
* \param v The boundary vertex.
|
||||
* \param ind Output: ARR_MIN_END if the vertex is induced by the minimal end;
|
||||
* ARR_MAX_END if it is induced by the curve's maximal end.
|
||||
|
|
@ -607,7 +608,7 @@ protected:
|
|||
*/
|
||||
const X_monotone_curve_2& _curve(const Vertex* v, Arr_curve_end& ind) const;
|
||||
|
||||
/*! Return the halfedge, the target vertex of which is given, that is
|
||||
/*! returns the halfedge, the target vertex of which is given, that is
|
||||
* the predecessor of a halfedge, the curve of which is given, that is about
|
||||
* to be inserted into the dcel.
|
||||
*/
|
||||
|
|
@ -615,7 +616,7 @@ protected:
|
|||
const X_monotone_curve_2& xc,
|
||||
Arr_curve_end ind) const;
|
||||
|
||||
/*! Return the halfedge, the target vertex of which is a given pole,
|
||||
/*! returns the halfedge, the target vertex of which is a given pole,
|
||||
* that is the predecessor of a halfedge, the curve of which is given, that
|
||||
* is about to be inserted into the dcel.
|
||||
*/
|
||||
|
|
@ -623,7 +624,7 @@ protected:
|
|||
Arr_curve_end ind) const;
|
||||
|
||||
|
||||
/*! Return the face that lies below the given vertex, which lies
|
||||
/*! returns the face that lies below the given vertex, which lies
|
||||
* on the line of discontinuity.
|
||||
*/
|
||||
Face* _face_below_vertex_on_discontinuity(Vertex* v) const;
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ protected:
|
|||
Face_const_handle m_unb_face; // The unbounded arrangement face.
|
||||
|
||||
public:
|
||||
/*! Constructor.
|
||||
/*! constructs.
|
||||
* \param arr The arrangement.
|
||||
*/
|
||||
Arr_bounded_planar_batched_pl_helper(const Arrangement_2* arr) :
|
||||
|
|
@ -76,7 +76,7 @@ public:
|
|||
void after_handle_event(Event* /* event */) { return; }
|
||||
//@}
|
||||
|
||||
/*! Get the current top face. */
|
||||
/*! obtains the current top face. */
|
||||
Face_const_handle top_face() const { return (m_unb_face); }
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -85,12 +85,12 @@ protected:
|
|||
Indices_list m_emptylist;
|
||||
|
||||
public:
|
||||
/*! Constructor. */
|
||||
/*! constructs. */
|
||||
Arr_bounded_planar_construction_helper(Arrangement_2* arr) :
|
||||
m_top_traits(arr->topology_traits())
|
||||
{}
|
||||
|
||||
/*! Destructor. */
|
||||
/*! destructs. */
|
||||
virtual ~Arr_bounded_planar_construction_helper()
|
||||
{}
|
||||
|
||||
|
|
@ -115,20 +115,20 @@ public:
|
|||
|
||||
Indices_list& halfedge_indices_list() { return m_emptylist; }
|
||||
|
||||
/*! Collect a subcurve index that does not see any status-line from below. */
|
||||
/*! collects a subcurve index that does not see any status-line from below. */
|
||||
void add_subcurve_in_top_face(unsigned int /* index */) { return; }
|
||||
|
||||
/*! A notification invoked before the given event it deallocated. */
|
||||
void before_deallocate_event(Event* /* event */) { return; }
|
||||
//@}
|
||||
|
||||
/*! Set the map that maps each halfedge to the list of subcurve indices
|
||||
/*! sets the map that maps each halfedge to the list of subcurve indices
|
||||
* that "see" the halfedge from below.
|
||||
*/
|
||||
void set_halfedge_indices_map(Halfedge_indices_map& /* table */)
|
||||
{ return; }
|
||||
|
||||
/*! Determine if we should swap the order of predecessor halfedges when
|
||||
/*! determines if we should swap the order of predecessor halfedges when
|
||||
* calling insert_at_vertices_ex() .
|
||||
*/
|
||||
bool swap_predecessors(Event* /* event */) const
|
||||
|
|
@ -138,7 +138,7 @@ public:
|
|||
return false;
|
||||
}
|
||||
|
||||
/*! Get the current top face. */
|
||||
/*! obtains the current top face. */
|
||||
Face_handle top_face() const { return m_unb_face; }
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ protected:
|
|||
Face_handle_blue m_blue_ubf; // Blue unbounded face.
|
||||
|
||||
public:
|
||||
/*! Constructor, given the input red and blue arrangements. */
|
||||
/*! constructs, given the input red and blue arrangements. */
|
||||
Arr_bounded_planar_overlay_helper(const Ar2* red_arr, const Ab2* blue_arr) :
|
||||
m_red_top_traits (red_arr->topology_traits()),
|
||||
m_blue_top_traits (blue_arr->topology_traits())
|
||||
|
|
@ -98,10 +98,10 @@ public:
|
|||
void before_handle_event(Event* /* e */) {}
|
||||
//@}
|
||||
|
||||
/*! Obtain the current red top face. */
|
||||
/*! obtains the current red top face. */
|
||||
Face_handle_red red_top_face() const { return m_red_ubf; }
|
||||
|
||||
/*! Obtain the current blue top face. */
|
||||
/*! obtains the current blue top face. */
|
||||
Face_handle_blue blue_top_face() const { return m_blue_ubf; }
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ protected:
|
|||
Face_const_handle m_unb_face; // The unbounded arrangement face.
|
||||
|
||||
public:
|
||||
/*! Constructor.
|
||||
/*! constructs.
|
||||
* \param arr The arrangement.
|
||||
*/
|
||||
Arr_bounded_planar_vert_decomp_helper(const Arrangement_2* arr) :
|
||||
|
|
@ -80,10 +80,10 @@ public:
|
|||
void after_handle_event(Event* /* event */) { return; }
|
||||
//@}
|
||||
|
||||
/*! Get the current top object. */
|
||||
/*! obtains the current top object. */
|
||||
Vert_type top_object() const { return Vert_type(m_unb_face); }
|
||||
|
||||
/*! Get the current bottom object. */
|
||||
/*! obtains the current bottom object. */
|
||||
Vert_type bottom_object() const { return Vert_type(m_unb_face); }
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -82,20 +82,20 @@ public:
|
|||
///! \name Construction methods.
|
||||
//@{
|
||||
|
||||
/*! Default constructor. */
|
||||
/*! constructs defaults. */
|
||||
Arr_planar_topology_traits_base_2() :
|
||||
m_own_geom_traits(true)
|
||||
{ m_geom_traits = new Traits_adaptor_2; }
|
||||
|
||||
/*! Constructor with a geometry-traits class. */
|
||||
/*! constructs with a geometry-traits class. */
|
||||
Arr_planar_topology_traits_base_2 (const Geometry_traits_2* geom_traits) :
|
||||
m_own_geom_traits(false)
|
||||
{ m_geom_traits = static_cast<const Traits_adaptor_2*>(geom_traits); }
|
||||
|
||||
/*! Assign the contents of another topology-traits class. */
|
||||
/*! assigns the contents of another topology-traits class. */
|
||||
void assign(const Self& other);
|
||||
|
||||
/*! Destructor. */
|
||||
/*! destructs. */
|
||||
virtual ~Arr_planar_topology_traits_base_2()
|
||||
{
|
||||
// Clear the DCEL.
|
||||
|
|
@ -112,13 +112,13 @@ public:
|
|||
///! \name Common topology-traits methods.
|
||||
//@{
|
||||
|
||||
/*! Get the DCEL (const version). */
|
||||
/*! obtains the DCEL (const version). */
|
||||
const Dcel& dcel() const { return m_dcel; }
|
||||
|
||||
/*! Get the DCEL (non-const version). */
|
||||
/*! obtains the DCEL (non-const version). */
|
||||
Dcel& dcel() { return (m_dcel); }
|
||||
|
||||
/*! Receive a notification on the creation of a new boundary vertex that
|
||||
/*! receives a notification on the creation of a new boundary vertex that
|
||||
* corresponds to a given point.
|
||||
* \param v The new boundary vertex.
|
||||
* \param p The point.
|
||||
|
|
@ -134,7 +134,7 @@ public:
|
|||
return;
|
||||
}
|
||||
|
||||
/*! Receive a notification on the creation of a new boundary vertex that
|
||||
/*! receives a notification on the creation of a new boundary vertex that
|
||||
* corresponds to the given curve end.
|
||||
* \param v The new boundary vertex.
|
||||
* \param cv The x-monotone curve.
|
||||
|
|
@ -152,7 +152,7 @@ public:
|
|||
return;
|
||||
}
|
||||
|
||||
/*! Determines whether the function should decide on swapping the predecssor
|
||||
/*! determines whether the function should decide on swapping the predecssor
|
||||
* halfedges that imply two ccb (and whose signs are given here).
|
||||
* If true, swap_predecessors will be correctly set. If false,
|
||||
* generic way of searching for lexicographically minimal point and checking
|
||||
|
|
@ -171,8 +171,8 @@ public:
|
|||
return false;
|
||||
}
|
||||
|
||||
/*! Given signs of two ccbs that show up when splitting upon insertion of
|
||||
* curve into two, determine what happens to the face(s).
|
||||
/*! given signs of two ccbs that show up when splitting upon insertion of
|
||||
* curve into two, determines what happens to the face(s).
|
||||
* \param signs1 signs in x and y of the first implied ccb
|
||||
* \param signs2 signs in x and y of the secondd implied ccb
|
||||
* \return A pair indicating whether the insertion will cause the face
|
||||
|
|
@ -190,7 +190,7 @@ public:
|
|||
return std::make_pair(true, true);
|
||||
}
|
||||
|
||||
/*! Determine whether the given point lies in the interior of the given face.
|
||||
/*! determines whether the given point lies in the interior of the given face.
|
||||
* \param f The face.
|
||||
* \param p The query point.
|
||||
* \param v The vertex associated with p (if exists).
|
||||
|
|
@ -211,7 +211,7 @@ public:
|
|||
/// \name Additional predicates, specialized for this topology-traits class.
|
||||
//@{
|
||||
|
||||
/*! Compare the given vertex (which may lie at infinity) and the given point.
|
||||
/*! compares the given vertex (which may lie at infinity) 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.
|
||||
|
|
@ -219,7 +219,7 @@ public:
|
|||
virtual Comparison_result compare_x(const Point_2& p,
|
||||
const Vertex* v) const = 0;
|
||||
|
||||
/*! Compare the given vertex (which may lie at infinity) and the given point.
|
||||
/*! compares the given vertex (which may lie at infinity) and the given point.
|
||||
* \param p The point.
|
||||
* \param v The vertex.
|
||||
* \return The result of the xy-lexicographic comparison of p and v.
|
||||
|
|
@ -227,7 +227,7 @@ public:
|
|||
virtual Comparison_result compare_xy(const Point_2& p,
|
||||
const Vertex* v) const = 0;
|
||||
|
||||
/*! 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).
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ protected:
|
|||
Face_const_handle m_spherical_face;
|
||||
|
||||
public:
|
||||
/*! Constructor.
|
||||
/*! constructs.
|
||||
* \param arr The arrangement.
|
||||
*/
|
||||
Arr_spherical_batched_pl_helper(const Arrangement_2* arr) :
|
||||
|
|
@ -124,7 +124,7 @@ public:
|
|||
}
|
||||
//@}
|
||||
|
||||
/*! Obtain the current top face. */
|
||||
/*! obtains the current top face. */
|
||||
Face_const_handle top_face() const { return m_spherical_face; }
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -102,14 +102,14 @@ protected:
|
|||
Halfedge_indices_map* m_he_ind_map_p;
|
||||
|
||||
public:
|
||||
/*! Constructor. */
|
||||
/*! constructs. */
|
||||
Arr_spherical_construction_helper(Arrangement_2* arr) :
|
||||
m_top_traits(arr->topology_traits()),
|
||||
m_arr_access(*arr),
|
||||
m_he_ind_map_p(nullptr)
|
||||
{}
|
||||
|
||||
/*! Destructor. */
|
||||
/*! destructs. */
|
||||
virtual ~Arr_spherical_construction_helper() {}
|
||||
|
||||
/// \name Notification functions.
|
||||
|
|
@ -127,25 +127,25 @@ public:
|
|||
/*! A notification invoked when a new subcurve is created. */
|
||||
virtual void add_subcurve(Halfedge_handle , Subcurve* ) { return; }
|
||||
|
||||
/*! Collect a subcurve index that does not see any status-line from below.
|
||||
/*! collects a subcurve index that does not see any status-line from below.
|
||||
*/
|
||||
void add_subcurve_in_top_face(unsigned int index)
|
||||
{ m_subcurves_at_nf.push_back(index); }
|
||||
|
||||
/*! Obtain the indices of the halfedges that "see" the north. */
|
||||
/*! obtains the indices of the halfedges that "see" the north. */
|
||||
Indices_list& halfedge_indices_list() { return m_subcurves_at_nf; }
|
||||
|
||||
/*! A notification invoked before the given event it deallocated. */
|
||||
void before_deallocate_event(Event* /* event */) {}
|
||||
//@}
|
||||
|
||||
/*! Set the map that maps each halfedge to the list of subcurve indices
|
||||
/*! sets the map that maps each halfedge to the list of subcurve indices
|
||||
* that "see" the halfedge from below.
|
||||
*/
|
||||
void set_halfedge_indices_map(Halfedge_indices_map& table)
|
||||
{ m_he_ind_map_p = &table; }
|
||||
|
||||
/*! Determine if we should swap the order of predecessor halfedges when
|
||||
/*! determines if we should swap the order of predecessor halfedges when
|
||||
* calling insert_at_vertices_ex() .
|
||||
*/
|
||||
bool swap_predecessors(Event* event) const
|
||||
|
|
@ -157,10 +157,10 @@ public:
|
|||
event->parameter_space_in_y() == ARR_TOP_BOUNDARY);
|
||||
}
|
||||
|
||||
/*! Get the current top face. */
|
||||
/*! obtains the current top face. */
|
||||
virtual Face_handle top_face() const { return m_spherical_face; }
|
||||
|
||||
/*! Splice the indices list of the given halfedge, inserting the
|
||||
/*! splices the indices list of the given halfedge, inserting the
|
||||
* indices of the halfedges that "see" the north pole.
|
||||
*/
|
||||
void splice_indices_list(Halfedge_handle he)
|
||||
|
|
|
|||
|
|
@ -78,10 +78,10 @@ protected:
|
|||
Halfedge_handle m_spherical_halfedge;
|
||||
|
||||
public:
|
||||
/*! Constructor */
|
||||
/*! constructs */
|
||||
Arr_spherical_insertion_helper(Arrangement_2 *arr) : Base(arr) {}
|
||||
|
||||
/*! Destructor. */
|
||||
/*! destructs. */
|
||||
virtual ~Arr_spherical_insertion_helper() {}
|
||||
|
||||
/// \name Notification functions.
|
||||
|
|
@ -104,7 +104,7 @@ public:
|
|||
/*! A notification invoked when a new subcurve is created. */
|
||||
virtual void add_subcurve(Halfedge_handle he, Subcurve* sc);
|
||||
|
||||
/*! Get the current top face. */
|
||||
/*! obtains the current top face. */
|
||||
virtual Face_handle top_face() const;
|
||||
|
||||
private:
|
||||
|
|
@ -256,7 +256,7 @@ add_subcurve(Halfedge_handle he, Subcurve* /* sc */)
|
|||
}
|
||||
}
|
||||
|
||||
/*! Get the current top face. */
|
||||
/*! obtains the current top face. */
|
||||
template <typename Tr, typename Arr, typename Evnt, typename Sbcv>
|
||||
typename Arr_spherical_insertion_helper<Tr, Arr, Evnt, Sbcv>::Face_handle
|
||||
Arr_spherical_insertion_helper<Tr, Arr, Evnt, Sbcv>::top_face() const
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@ protected:
|
|||
Face_handle_blue m_blue_nf;
|
||||
|
||||
public:
|
||||
/*! Constructor, given the input red and blue arrangements. */
|
||||
/*! constructs, given the input red and blue arrangements. */
|
||||
Arr_spherical_overlay_helper(const Ar2* red_arr, const Ab2* blue_arr) :
|
||||
m_red_top_traits(red_arr->topology_traits()),
|
||||
m_blue_top_traits(blue_arr->topology_traits())
|
||||
|
|
@ -270,17 +270,17 @@ public:
|
|||
}
|
||||
//@}
|
||||
|
||||
/*! Get the current red top face. */
|
||||
/*! obtains the current red top face. */
|
||||
Face_handle_red red_top_face() const { return m_red_nf; }
|
||||
|
||||
/*! Get the current blue top face. */
|
||||
/*! obtains the current blue top face. */
|
||||
Face_handle_blue blue_top_face() const { return m_blue_nf; }
|
||||
|
||||
/*! Obtain the red topology traits. */
|
||||
/*! obtains the red topology traits. */
|
||||
const Topology_traits_red* red_topology_traits() const
|
||||
{ return m_red_top_traits; }
|
||||
|
||||
/*! Obtain the blue topology traits. */
|
||||
/*! obtains the blue topology traits. */
|
||||
const Topology_traits_blue* blue_topology_traits() const
|
||||
{ return m_blue_top_traits; }
|
||||
};
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ protected:
|
|||
Face_const_handle m_south_face; // Current south face.
|
||||
|
||||
public:
|
||||
/*! Constructor.
|
||||
/*! constructs.
|
||||
* \param arr The arrangement.
|
||||
*/
|
||||
Arr_spherical_vert_decomp_helper(const Arrangement_2* arr) :
|
||||
|
|
@ -84,14 +84,14 @@ public:
|
|||
void after_handle_event(Event * event);
|
||||
//@}
|
||||
|
||||
/*! Get the current top object. */
|
||||
/*! obtains the current top object. */
|
||||
Vert_type top_object () const
|
||||
{
|
||||
return (m_valid_north_pole) ?
|
||||
Vert_type(m_north_pole) : Vert_type(m_north_face);
|
||||
}
|
||||
|
||||
/*! Get the current bottom object. */
|
||||
/*! obtains the current bottom object. */
|
||||
Vert_type bottom_object () const
|
||||
{
|
||||
return (m_valid_south_pole) ?
|
||||
|
|
|
|||
|
|
@ -56,8 +56,7 @@ protected:
|
|||
Halfedge_const_handle m_top_fict; // The current top fictitious halfedge.
|
||||
|
||||
public:
|
||||
/*!
|
||||
* Constructor.
|
||||
/*! constructs.
|
||||
* \param arr The arrangement.
|
||||
*/
|
||||
Arr_unb_planar_batched_pl_helper(const Arrangement_2* arr) :
|
||||
|
|
@ -76,7 +75,7 @@ public:
|
|||
void after_handle_event(Event* event);
|
||||
//@}
|
||||
|
||||
/*! Get the current top face. */
|
||||
/*! obtains the current top face. */
|
||||
Face_const_handle top_face() const { return (m_top_fict->face()); }
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -103,7 +103,7 @@ protected:
|
|||
// (stored in the visitor class).
|
||||
|
||||
public:
|
||||
/*! Constructor. */
|
||||
/*! constructs. */
|
||||
Arr_unb_planar_construction_helper(Arrangement_2* arr) :
|
||||
m_top_traits(arr->topology_traits()),
|
||||
m_arr_access(*arr),
|
||||
|
|
@ -112,7 +112,7 @@ public:
|
|||
m_he_ind_map_p(nullptr)
|
||||
{}
|
||||
|
||||
/*! Destructor. */
|
||||
/*! destructs. */
|
||||
virtual ~Arr_unb_planar_construction_helper(){}
|
||||
|
||||
/// \name Notification functions.
|
||||
|
|
@ -121,8 +121,7 @@ public:
|
|||
/* A notification issued before the sweep process starts. */
|
||||
virtual void before_sweep();
|
||||
|
||||
/*!
|
||||
* A notification invoked before the sweep-line starts handling the given
|
||||
/*! A notification invoked before the sweep-line starts handling the given
|
||||
* event.
|
||||
*/
|
||||
virtual void before_handle_event(Event* event);
|
||||
|
|
@ -132,11 +131,11 @@ public:
|
|||
Subcurve* /* sc */)
|
||||
{}
|
||||
|
||||
/*! Collect a subcurve index that does not see any status-line from below. */
|
||||
/*! collects a subcurve index that does not see any status-line from below. */
|
||||
void add_subcurve_in_top_face(unsigned int index)
|
||||
{ m_subcurves_at_ubf.push_back(index); }
|
||||
|
||||
/*! Get the indices of the halfedges below the subcurve. */
|
||||
/*! obtains the indices of the halfedges below the subcurve. */
|
||||
Indices_list& halfedge_indices_list() { return (m_subcurves_at_ubf); }
|
||||
|
||||
|
||||
|
|
@ -150,15 +149,13 @@ public:
|
|||
}
|
||||
//@}
|
||||
|
||||
/*!
|
||||
* Set the map that maps each halfedge to the list of subcurve indices
|
||||
/*! sets the map that maps each halfedge to the list of subcurve indices
|
||||
* that "see" the halfedge from below.
|
||||
*/
|
||||
void set_halfedge_indices_map(Halfedge_indices_map& table)
|
||||
{ m_he_ind_map_p = &table; }
|
||||
|
||||
/*!
|
||||
* Determine if we should swap the order of predecessor halfedges when
|
||||
/*! determines if we should swap the order of predecessor halfedges when
|
||||
* calling insert_at_vertices_ex() .
|
||||
*/
|
||||
bool swap_predecessors(Event* event) const
|
||||
|
|
@ -170,7 +167,7 @@ public:
|
|||
(event->parameter_space_in_y() == ARR_TOP_BOUNDARY));
|
||||
}
|
||||
|
||||
/*! Get the current top face. */
|
||||
/*! obtains the current top face. */
|
||||
Face_handle top_face() const
|
||||
{ return (m_th->face()); }
|
||||
};
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ protected:
|
|||
Vertex_handle_blue v_blue_tl; // Blue top-left fictitious vertex.
|
||||
|
||||
public:
|
||||
/*! Constructor, given the input red and blue arrangements. */
|
||||
/*! constructs, given the input red and blue arrangements. */
|
||||
Arr_unb_planar_overlay_helper(const Ar2* red_arr, const Ab2* blue_arr) :
|
||||
m_red_top_traits(red_arr->topology_traits()),
|
||||
m_blue_top_traits(blue_arr->topology_traits())
|
||||
|
|
@ -99,10 +99,10 @@ public:
|
|||
void before_handle_event(Event* e);
|
||||
//@}
|
||||
|
||||
/*! Get the current red top face. */
|
||||
/*! obtains the current red top face. */
|
||||
Face_handle_red red_top_face() const { return (m_red_th->face()); }
|
||||
|
||||
/*! Get the current blue top face. */
|
||||
/*! obtains the current blue top face. */
|
||||
Face_handle_blue blue_top_face() const { return (m_blue_th->face()); }
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ protected:
|
|||
// halfedge.
|
||||
|
||||
public:
|
||||
/*! Constructor.
|
||||
/*! constructs.
|
||||
* \param arr The arrangement.
|
||||
*/
|
||||
Arr_unb_planar_vert_decomp_helper(const Arrangement_2* arr) :
|
||||
|
|
@ -79,10 +79,10 @@ public:
|
|||
void after_handle_event(Event* event);
|
||||
//@}
|
||||
|
||||
/*! Get the current top object. */
|
||||
/*! obtains the current top object. */
|
||||
Vert_type top_object() const { return Vert_type(m_top_fict); }
|
||||
|
||||
/*! Get the current bottom object. */
|
||||
/*! obtains the current bottom object. */
|
||||
Vert_type bottom_object() const { return Vert_type(m_bottom_fict); }
|
||||
};
|
||||
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -130,7 +130,7 @@ protected:
|
|||
inline Result_type default_result() const { return Result::default_result(); }
|
||||
|
||||
public:
|
||||
/*! Default constructor. */
|
||||
/*! constructs default. */
|
||||
Arr_trapezoid_ric_point_location
|
||||
(bool with_guarantees = true,
|
||||
double depth_thrs = CGAL_TD_DEFAULT_DEPTH_THRESHOLD,
|
||||
|
|
@ -141,7 +141,7 @@ public:
|
|||
td.size_threshold(size_thrs);
|
||||
}
|
||||
|
||||
/*! Constructor given an arrangement. */
|
||||
/*! constructs given an arrangement. */
|
||||
Arr_trapezoid_ric_point_location
|
||||
(const Base_aos& arr,
|
||||
bool with_guarantees = true,
|
||||
|
|
@ -157,7 +157,7 @@ public:
|
|||
_construct_td();
|
||||
}
|
||||
|
||||
/*! Destructor. */
|
||||
/*! destructs. */
|
||||
~Arr_trapezoid_ric_point_location() { }
|
||||
|
||||
/*! defines whether the underlying search structure guarantees logarithmic
|
||||
|
|
@ -190,7 +190,7 @@ public:
|
|||
void print_dag(std::ostream& out) const { td.print_dag(out); }
|
||||
#endif
|
||||
|
||||
/*! Locate the arrangement feature containing the given point.
|
||||
/*! locates the arrangement feature containing the given point.
|
||||
* \param p The query point.
|
||||
* \return An object representing the arrangement feature containing the
|
||||
* query point. This object is either a Face_const_handle or a
|
||||
|
|
@ -198,7 +198,7 @@ public:
|
|||
*/
|
||||
result_type locate(const Point_2& p) const;
|
||||
|
||||
/*! Locate the arrangement feature which a upward vertical ray emanating from
|
||||
/*! locates the arrangement feature which a upward vertical ray emanating from
|
||||
* the given point hits.
|
||||
* \param p The query point.
|
||||
* \return An object representing the arrangement feature the ray hits.
|
||||
|
|
@ -208,7 +208,7 @@ public:
|
|||
result_type ray_shoot_up(const Point_2& p) const
|
||||
{ return (_vertical_ray_shoot(p, true)); }
|
||||
|
||||
/*! Locate the arrangement feature which a downward vertical ray emanating
|
||||
/*! locates the arrangement feature which a downward vertical ray emanating
|
||||
* from the given point hits.
|
||||
* \param p The query point.
|
||||
* \return An object representing the arrangement feature the ray hits.
|
||||
|
|
@ -307,7 +307,7 @@ public:
|
|||
//#endif
|
||||
|
||||
protected:
|
||||
/*! Construct the trapezoidal decomposition. */
|
||||
/*! constructs the trapezoidal decomposition. */
|
||||
void _construct_td() {
|
||||
td.clear();
|
||||
|
||||
|
|
@ -322,7 +322,7 @@ protected:
|
|||
td.insert(he_container.begin(), he_container.end());
|
||||
}
|
||||
|
||||
/*! Obtain the unbounded face that contains the point when the trapezoid is
|
||||
/*! obtains the unbounded face that contains the point when the trapezoid is
|
||||
* unbounded
|
||||
* \param tr The unbounded trapezoid whose face we should get
|
||||
* \param p The query point.
|
||||
|
|
@ -334,7 +334,7 @@ protected:
|
|||
const Point_2& p,
|
||||
Arr_all_sides_oblivious_tag) const;
|
||||
|
||||
/*! Obtain the unbounded face that contains the point when the trapezoid is
|
||||
/*! obtains the unbounded face that contains the point when the trapezoid is
|
||||
* unbounded
|
||||
* \param tr The unbounded trapezoid whose face we should get
|
||||
* \param p The query point.
|
||||
|
|
@ -346,7 +346,7 @@ protected:
|
|||
const Point_2& p,
|
||||
Arr_not_all_sides_oblivious_tag) const;
|
||||
|
||||
/*! Locate the arrangement feature which a vertical ray emanating from the
|
||||
/*! locates the arrangement feature which a vertical ray emanating from the
|
||||
* given point hits, considering isolated vertices.
|
||||
* \param p The query point.
|
||||
* \param shoot_up Indicates whether the ray is directed upward or downward.
|
||||
|
|
@ -356,9 +356,8 @@ protected:
|
|||
*/
|
||||
result_type _vertical_ray_shoot(const Point_2& p, bool shoot_up) const;
|
||||
|
||||
/*! In vertical ray shoot, when the closest halfedge is found
|
||||
* (or unbounded face)
|
||||
* we check the isolated vertices inside the face to check whether there
|
||||
/*! in vertical ray shoot, when the closest halfedge is found (or unbounded
|
||||
* face) checks the isolated vertices inside the face to check whether there
|
||||
* is an isolated vertex right above/below the query point.
|
||||
*/
|
||||
result_type _check_isolated_for_vertical_ray_shoot
|
||||
|
|
|
|||
|
|
@ -124,20 +124,20 @@ public:
|
|||
///! \name Construction methods.
|
||||
//@{
|
||||
|
||||
/*! Construct Default. */
|
||||
/*! constructs Default. */
|
||||
Arr_unb_planar_topology_traits_2();
|
||||
|
||||
/*! Constructor with a geometry-traits class. */
|
||||
/*! constructs with a geometry-traits class. */
|
||||
Arr_unb_planar_topology_traits_2(const Gt2* tr);
|
||||
|
||||
/*! 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 arrangement contains just two four vertices at infinity
|
||||
|
|
@ -146,44 +146,44 @@ public:
|
|||
this->m_dcel.size_of_halfedges() == 8);
|
||||
}
|
||||
|
||||
/*! Check whether the given vertex is concrete (associated with a point). */
|
||||
/*! checks whether the given vertex is concrete (associated with a point). */
|
||||
bool is_concrete_vertex(const Vertex* v) const
|
||||
{ return (! v->has_null_point()); }
|
||||
|
||||
/*! Obtain the number of concrete vertices.
|
||||
/*! obtains the number of concrete vertices.
|
||||
* \return All vertices not lying at infinity are concrete.
|
||||
*/
|
||||
Size number_of_concrete_vertices() const
|
||||
{ return (this->m_dcel.size_of_vertices() - n_inf_verts); }
|
||||
|
||||
/*! Check if the given vertex is valid (not a fictitious one). */
|
||||
/*! checks if the given vertex is valid (not a fictitious one). */
|
||||
bool is_valid_vertex(const Vertex* v) const
|
||||
{
|
||||
return (! v->has_null_point() ||
|
||||
((v != v_bl) && (v != v_tl) && (v != v_br) && (v != v_tr)));
|
||||
}
|
||||
|
||||
/*! Obtain the number of valid vertices.
|
||||
/*! obtains the number of valid vertices.
|
||||
* \return All vertices, except the four fictitious one, are valid.
|
||||
*/
|
||||
Size number_of_valid_vertices() const
|
||||
{ return (this->m_dcel.size_of_vertices() - 4); }
|
||||
|
||||
/*! Check whether the given halfedge is valid (not a fictitious one). */
|
||||
/*! checks whether the given halfedge is valid (not a fictitious one). */
|
||||
bool is_valid_halfedge(const Halfedge* he) const
|
||||
{ return (! he->has_null_curve()); }
|
||||
|
||||
/*! Obtain the number of valid halfedges.
|
||||
/*! obtains the number of valid halfedges.
|
||||
* \return the number of valid halfedges, not including fictitious halfedges.
|
||||
* Note that each vertex at infinity induces two fictitious halfedges
|
||||
*/
|
||||
Size number_of_valid_halfedges() const
|
||||
{ return (this->m_dcel.size_of_halfedges() - 2*n_inf_verts); }
|
||||
|
||||
/*! Check whether the given face is valid (not a fictitious one). */
|
||||
/*! checks whether the given face is valid (not a fictitious one). */
|
||||
bool is_valid_face (const Face* f) const { return (! f->is_fictitious()); }
|
||||
|
||||
/*! Obtain the number of valid faces.
|
||||
/*! obtains the number of valid faces.
|
||||
* \return the number of valid faces, not including ficitious DCEL faces.
|
||||
*/
|
||||
Size number_of_valid_faces() const
|
||||
|
|
@ -259,15 +259,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.
|
||||
|
|
@ -280,8 +280,8 @@ public:
|
|||
const X_monotone_curve_2& cv, Arr_curve_end ind,
|
||||
Arr_parameter_space ps_x, Arr_parameter_space ps_y) const;
|
||||
|
||||
/*! 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
|
||||
/*! givens 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.
|
||||
|
|
@ -299,7 +299,7 @@ public:
|
|||
Arr_parameter_space ps_x,
|
||||
Arr_parameter_space ps_y);
|
||||
|
||||
/*! 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.
|
||||
|
|
@ -321,7 +321,7 @@ public:
|
|||
return (nullptr);
|
||||
}
|
||||
|
||||
/*! Locate a DCEL feature that contains the given unbounded curve end.
|
||||
/*! locates a DCEL feature that contains the given unbounded 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.
|
||||
|
|
@ -337,7 +337,7 @@ public:
|
|||
Arr_parameter_space ps_x,
|
||||
Arr_parameter_space ps_y);
|
||||
|
||||
/*! 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.
|
||||
|
|
@ -346,19 +346,19 @@ public:
|
|||
*/
|
||||
Halfedge* split_fictitious_edge(Halfedge* e, Vertex* v);
|
||||
|
||||
/*! Determine whether the given face is unbounded.
|
||||
/*! determines whether the given face is unbounded.
|
||||
* \param f The face.
|
||||
* \return Whether f is unbounded.
|
||||
*/
|
||||
bool is_unbounded(const Face* f) const;
|
||||
|
||||
/*! 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.
|
||||
*/
|
||||
bool is_redundant(const Vertex* v) const;
|
||||
|
||||
/*! 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.
|
||||
|
|
@ -367,10 +367,10 @@ public:
|
|||
Halfedge* erase_redundant_vertex(Vertex* v);
|
||||
|
||||
//! 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.
|
||||
/*! 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
|
||||
{
|
||||
|
|
@ -379,10 +379,10 @@ public:
|
|||
}
|
||||
|
||||
//! 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()
|
||||
{
|
||||
|
|
@ -398,41 +398,41 @@ public:
|
|||
/*! This function is used by the "walk" point-location strategy. */
|
||||
const Face* initial_face() const { return fict_face; }
|
||||
|
||||
/*! Obtain the fictitious face (const version). */
|
||||
/*! obtains the fictitious face (const version). */
|
||||
const Face* fictitious_face() const { return fict_face; }
|
||||
|
||||
/*! Obtain the fictitious face (non-const version). */
|
||||
/*! obtains the fictitious face (non-const version). */
|
||||
Face* fictitious_face() { return fict_face; }
|
||||
|
||||
/*! Obtain the bottom-left fictitious vertex (const version). */
|
||||
/*! obtains the bottom-left fictitious vertex (const version). */
|
||||
const Vertex* bottom_left_vertex() const { return (v_bl); }
|
||||
|
||||
/*! Obtain the bottom-left fictitious vertex (non-const version). */
|
||||
/*! obtains the bottom-left fictitious vertex (non-const version). */
|
||||
Vertex* bottom_left_vertex() { return (v_bl); }
|
||||
|
||||
/*! Obtain the top-left fictitious vertex (const version). */
|
||||
/*! obtains the top-left fictitious vertex (const version). */
|
||||
const Vertex* top_left_vertex() const { return (v_tl); }
|
||||
|
||||
/*! Obtain the top-left fictitious vertex (non-const version). */
|
||||
/*! obtains the top-left fictitious vertex (non-const version). */
|
||||
Vertex* top_left_vertex() { return (v_tl); }
|
||||
|
||||
/*! Obtain the bottom-right fictitious vertex (const version). */
|
||||
/*! obtains the bottom-right fictitious vertex (const version). */
|
||||
const Vertex* bottom_right_vertex() const { return (v_br); }
|
||||
|
||||
/*! Obtain the bottom-right fictitious vertex (non-const version). */
|
||||
/*! obtains the bottom-right fictitious vertex (non-const version). */
|
||||
Vertex* bottom_right_vertex() { return (v_br); }
|
||||
|
||||
/*! Obtain the top-right fictitious vertex (const version). */
|
||||
/*! obtains the top-right fictitious vertex (const version). */
|
||||
const Vertex* top_right_vertex() const { return (v_tr); }
|
||||
|
||||
/*! Obtain the top-right fictitious vertex (non-const version). */
|
||||
/*! obtains the top-right fictitious vertex (non-const version). */
|
||||
Vertex* top_right_vertex() { return (v_tr); }
|
||||
//@}
|
||||
|
||||
/// \name Additional predicates, specialized for this topology-traits class.
|
||||
//@{
|
||||
|
||||
/*! Compare the given vertex (which may lie at infinity) and the given point.
|
||||
/*! compares the given vertex (which may lie at infinity) 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.
|
||||
|
|
@ -440,7 +440,7 @@ public:
|
|||
virtual Comparison_result compare_x(const Point_2& p,
|
||||
const Vertex* v) const;
|
||||
|
||||
/*! Compare the given vertex (which may lie at infinity) and the given point.
|
||||
/*! compares the given vertex (which may lie at infinity) and the given point.
|
||||
* \param p The point.
|
||||
* \param v The vertex.
|
||||
* \return The result of the xy-lexicographic comparison of p and v.
|
||||
|
|
@ -448,7 +448,7 @@ public:
|
|||
virtual Comparison_result compare_xy(const Point_2& p,
|
||||
const Vertex* v) const;
|
||||
|
||||
/*! 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).
|
||||
|
|
@ -464,7 +464,7 @@ protected:
|
|||
/// \name Auxiliary functions.
|
||||
//@{
|
||||
|
||||
/*! Obtain the curve associated with a boundary vertex.
|
||||
/*! obtains the curve associated with a boundary vertex.
|
||||
* \param v The vertex as infinity.
|
||||
* \param ind Output: ARR_MIN_END if the vertex is induced by the minimal end;
|
||||
* ARR_MAX_END if it is induced by the curve's maximal end.
|
||||
|
|
@ -473,7 +473,7 @@ protected:
|
|||
*/
|
||||
const X_monotone_curve_2* _curve(const Vertex* v, Arr_curve_end& ind) const;
|
||||
|
||||
/*! Check whether the given infinite curve end lies on the given fictitious
|
||||
/*! checks whether the given infinite curve end lies on the given fictitious
|
||||
* halfedge.
|
||||
* \param cv The curve.
|
||||
* \param ind Whether we refer to the minimal or maximal end of cv.
|
||||
|
|
|
|||
|
|
@ -62,24 +62,24 @@ private:
|
|||
enum {MIN_REV_MAP_SIZE = 32};
|
||||
|
||||
public:
|
||||
/*! Default constructor. */
|
||||
/*! constructs default. */
|
||||
Arr_vertex_index_map() :
|
||||
Base(),
|
||||
n_vertices(0),
|
||||
rev_map(MIN_REV_MAP_SIZE)
|
||||
{}
|
||||
|
||||
/*! Constructor with an associated arrangement. */
|
||||
/*! constructs with an associated arrangement. */
|
||||
Arr_vertex_index_map(const Base_aos& arr) :
|
||||
Base(const_cast<Base_aos&>(arr))
|
||||
{ _init(); }
|
||||
|
||||
/*! Copy constructor. */
|
||||
/*! constructs copy. */
|
||||
Arr_vertex_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 vertex.
|
||||
/*! obtains the index of a given vertex.
|
||||
* \param v A handle to the vertex.
|
||||
* \pre v is a valid vertex in the arrangement.
|
||||
*/
|
||||
unsigned int operator[](Vertex_handle v) const { return index_map[v]; }
|
||||
|
||||
/*! Get the vertex given its index.
|
||||
/*! obtains the vertex given its index.
|
||||
* \param i The index of the vertex.
|
||||
* \pre i is less than the number of vertices in the graph.
|
||||
*/
|
||||
|
|
@ -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_vertices = 0;
|
||||
index_map.clear();
|
||||
}
|
||||
|
||||
/*! Update the mapping after the creation of a new vertex.
|
||||
/*! updates the mapping after the creation of a new vertex.
|
||||
* \param v A handle to the created vertex.
|
||||
*/
|
||||
virtual void after_create_vertex(Vertex_handle v) override {
|
||||
|
|
@ -142,7 +142,7 @@ public:
|
|||
rev_map[n_vertices - 1] = v;
|
||||
}
|
||||
|
||||
/*! Update the mapping after the creation of a new boundary vertex.
|
||||
/*! updates the mapping after the creation of a new boundary vertex.
|
||||
* \param v A handle to the created vertex.
|
||||
*/
|
||||
virtual void after_create_boundary_vertex(Vertex_handle v) override {
|
||||
|
|
@ -158,7 +158,7 @@ public:
|
|||
rev_map[n_vertices - 1] = v;
|
||||
}
|
||||
|
||||
/*! Update the mapping before the removal of a vertex.
|
||||
/*! updates the mapping before the removal of a vertex.
|
||||
* \param v A handle to the vertex to be removed.
|
||||
*/
|
||||
virtual void before_remove_vertex(Vertex_handle v) override {
|
||||
|
|
@ -189,7 +189,7 @@ public:
|
|||
//@}
|
||||
|
||||
private:
|
||||
/*! Initialize the map for the given arrangement. */
|
||||
/*! initializes the map for the given arrangement. */
|
||||
void _init() {
|
||||
// Get the number of vertices and allocate the reverse map accordingly.
|
||||
n_vertices =
|
||||
|
|
@ -215,7 +215,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_vertex_index_map above.
|
||||
* \param index_map The index map.
|
||||
* \param v A vertex handle.
|
||||
|
|
|
|||
|
|
@ -122,17 +122,17 @@ public:
|
|||
/// \name Constructors.
|
||||
//@{
|
||||
|
||||
/*! Default constructor. */
|
||||
/*! constructs default. */
|
||||
Arrangement_2 () :
|
||||
Base ()
|
||||
{}
|
||||
|
||||
/*! Copy constructor (from a base arrangement). */
|
||||
/*! constructs copy (from a base arrangement). */
|
||||
Arrangement_2 (const Base& base) :
|
||||
Base (base)
|
||||
{}
|
||||
|
||||
/*! Constructor given a traits object. */
|
||||
/*! constructs given a traits object. */
|
||||
Arrangement_2 (const Traits_2 *tr) :
|
||||
Base (tr)
|
||||
{}
|
||||
|
|
@ -141,14 +141,14 @@ public:
|
|||
/// \name Assignment functions.
|
||||
//@{
|
||||
|
||||
/*! Assignment operator (from a base arrangement). */
|
||||
/*! assigns (from a base arrangement). */
|
||||
Self& operator= (const Base& base)
|
||||
{
|
||||
Base::assign (base);
|
||||
return (*this);
|
||||
}
|
||||
|
||||
/*! Assign an arrangement. */
|
||||
/*! assign an arrangement. */
|
||||
void assign (const Base& base)
|
||||
{
|
||||
Base::assign (base);
|
||||
|
|
@ -159,13 +159,13 @@ public:
|
|||
///! \name Specialized access methods.
|
||||
//@{
|
||||
|
||||
/*! Obtain the geometry-traits class. */
|
||||
/*! obtains the geometry-traits class. */
|
||||
const Traits_2* traits() const
|
||||
{
|
||||
return (this->geometry_traits());
|
||||
}
|
||||
|
||||
/*! Obtain the number of vertices at infinity. */
|
||||
/*! obtains the number of vertices at infinity. */
|
||||
Size number_of_vertices_at_infinity() const
|
||||
{
|
||||
// The vertices at infinity are valid, but not concrete:
|
||||
|
|
@ -173,7 +173,7 @@ public:
|
|||
this->topology_traits()->number_of_concrete_vertices());
|
||||
}
|
||||
|
||||
/*! Obtain the unbounded face (non-const version). */
|
||||
/*! obtains the unbounded face (non-const version). */
|
||||
Face_handle unbounded_face ()
|
||||
{
|
||||
// The fictitious un_face contains all other valid faces in a single
|
||||
|
|
@ -193,7 +193,7 @@ public:
|
|||
return (Face_handle (p_oc->face()));
|
||||
}
|
||||
|
||||
/*! Get the unbounded face (const version). */
|
||||
/*! obtains the unbounded face (const version). */
|
||||
Face_const_handle unbounded_face () const
|
||||
{
|
||||
// The fictitious un_face contains all other valid faces in a single
|
||||
|
|
|
|||
|
|
@ -108,10 +108,10 @@ protected:
|
|||
public:
|
||||
/// \name Construction.
|
||||
//@{
|
||||
/*! Default constructor. */
|
||||
/*! constructs default. */
|
||||
Arr_traits_basic_adaptor_2() : Base() {}
|
||||
|
||||
/*! Constructor from a base-traits class. */
|
||||
/*! Constructs from a base-traits class. */
|
||||
Arr_traits_basic_adaptor_2(const Base& traits) : Base(traits) {}
|
||||
//@}
|
||||
|
||||
|
|
@ -132,7 +132,7 @@ 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.
|
||||
|
|
@ -151,7 +151,7 @@ public:
|
|||
//! The base traits.
|
||||
const Self& m_self;
|
||||
|
||||
/*! Constructor.
|
||||
/*! constructs.
|
||||
* \param base The base traits class. It must be passed, to handle non
|
||||
* stateless traits objects, (which stores data).
|
||||
* The constructor is declared private to allow only the functor
|
||||
|
|
@ -456,7 +456,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
/*! Obtain an Compare_y_at_x_2 function object. */
|
||||
/*! obtains an Compare_y_at_x_2 function object. */
|
||||
Compare_y_at_x_2 compare_y_at_x_2_object() const
|
||||
{ return Compare_y_at_x_2(*this); }
|
||||
|
||||
|
|
@ -465,8 +465,7 @@ public:
|
|||
*/
|
||||
class Compare_y_at_x_left_2 {
|
||||
public:
|
||||
/*!
|
||||
* Compare two curves immediately to the left of their intersection point.
|
||||
/*! compares two curves immediately to the left of their intersection point.
|
||||
* \param xcv1 The first curve.
|
||||
* \param xcv2 The second curve.
|
||||
* \param p The query point.
|
||||
|
|
@ -490,7 +489,7 @@ public:
|
|||
//! The base traits.
|
||||
const Self* m_self;
|
||||
|
||||
/*! Constructor.
|
||||
/*! constructs.
|
||||
* \param tr The base traits class. It must be passed, to handle non
|
||||
* stateless traits objects, (which stores data).
|
||||
* The constructor is declared private to allow only the functor
|
||||
|
|
@ -502,8 +501,7 @@ public:
|
|||
//! Allow its functor obtaining function calling the private constructor.
|
||||
friend class Arr_traits_basic_adaptor_2<Base>;
|
||||
|
||||
/*!
|
||||
* Implementation of the operator() in case the HasLeft tag is true.
|
||||
/*! Implementation of the operator() in case the HasLeft tag is true.
|
||||
*/
|
||||
Comparison_result _compare_y_at_x_left_imp(const X_monotone_curve_2& xcv1,
|
||||
const X_monotone_curve_2& xcv2,
|
||||
|
|
@ -514,8 +512,7 @@ public:
|
|||
return (base->compare_y_at_x_left_2_object()(xcv1, xcv2, p));
|
||||
}
|
||||
|
||||
/*!
|
||||
* Implementation of the operator() in case the HasLeft tag is false.
|
||||
/*! Implementation of the operator() in case the HasLeft tag is false.
|
||||
*/
|
||||
Comparison_result
|
||||
_compare_y_at_x_left_imp(const X_monotone_curve_2& xcv1,
|
||||
|
|
@ -584,7 +581,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
/*! Obtain a Compare_y_at_x_left_2 function object. */
|
||||
/*! obtains a Compare_y_at_x_left_2 function object. */
|
||||
Compare_y_at_x_left_2 compare_y_at_x_left_2_object() const
|
||||
{ return Compare_y_at_x_left_2(this); }
|
||||
|
||||
|
|
@ -592,8 +589,7 @@ public:
|
|||
*/
|
||||
class Do_intersect_2 {
|
||||
public:
|
||||
/*!
|
||||
* Determine whether two x-monotone curves intersect.
|
||||
/*! determines whether two x-monotone curves intersect.
|
||||
* \param xcv1 the first curve.
|
||||
* \param xcv2 the second curve.
|
||||
* \return true if xcv1 and xcv2 intersect false otherwise.
|
||||
|
|
@ -612,7 +608,7 @@ public:
|
|||
//! The base traits.
|
||||
const Self* m_self;
|
||||
|
||||
/*! Constructor.
|
||||
/*! constructs.
|
||||
* \param self The traits adaptor class. It must be passed, to handle
|
||||
* non stateless traits objects, (which stores data).
|
||||
* The constructor is declared private to allow only the functor
|
||||
|
|
@ -624,8 +620,7 @@ public:
|
|||
//! Allow its functor obtaining function calling the private constructor.
|
||||
friend class Arr_traits_basic_adaptor_2<Base>;
|
||||
|
||||
/*!
|
||||
* Implementation of the operator() in case the HasDoIntersect tag is true.
|
||||
/*! Implementation of the operator() in case the HasDoIntersect tag is true.
|
||||
*/
|
||||
bool _do_intersect_imp(const X_monotone_curve_2& xcv1,
|
||||
const X_monotone_curve_2& xcv2,
|
||||
|
|
@ -635,8 +630,7 @@ public:
|
|||
return (base->do_intersect_2_object()(xcv1, xcv2));
|
||||
}
|
||||
|
||||
/*!
|
||||
* Implementation of the operator() in case the HasDoIntersect tag is false.
|
||||
/*! Implementation of the operator() in case the HasDoIntersect tag is false.
|
||||
*/
|
||||
bool _do_intersect_imp(const X_monotone_curve_2& xcv1,
|
||||
const X_monotone_curve_2& xcv2,
|
||||
|
|
@ -651,7 +645,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
/*! Obtain a Compare_y_at_x_left_2 function object. */
|
||||
/*! obtains a Compare_y_at_x_left_2 function object. */
|
||||
Do_intersect_2 do_intersect_2_object() const { return Do_intersect_2(this); }
|
||||
|
||||
//@}
|
||||
|
|
@ -666,7 +660,7 @@ public:
|
|||
*/
|
||||
class Parameter_space_in_x_2 {
|
||||
public:
|
||||
/*! Obtain the location of the given curve end in x.
|
||||
/*! obtains the location of the given curve end in x.
|
||||
* \param xcv The curve.
|
||||
* \param ind ARR_MIN_END if we refer to xcv's minimal end,
|
||||
* ARR_MAX_END if we refer to its maximal end.
|
||||
|
|
@ -681,7 +675,7 @@ public:
|
|||
return parameter_space_in_x(xcv, ind, Left_or_right_sides_category());
|
||||
}
|
||||
|
||||
/*! Obtain the location of the given point end in x.
|
||||
/*! obtains the location of the given point end in x.
|
||||
* \param p The point.
|
||||
* \return The location of the point end in x direction.
|
||||
*/
|
||||
|
|
@ -697,7 +691,7 @@ public:
|
|||
//! The base traits.
|
||||
const Base* m_base;
|
||||
|
||||
/*! Constructor.
|
||||
/*! constructs.
|
||||
* \param base The base traits class. It must be passed, to handle non
|
||||
* stateless traits objects, (which stores data).
|
||||
* The constructor is declared private to allow only the functor
|
||||
|
|
@ -767,7 +761,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
/*! Obtain an Parameter_space_in_x_2 function object. */
|
||||
/*! obtains an Parameter_space_in_x_2 function object. */
|
||||
Parameter_space_in_x_2 parameter_space_in_x_2_object() const
|
||||
{ return Parameter_space_in_x_2(this); }
|
||||
|
||||
|
|
@ -779,7 +773,7 @@ public:
|
|||
//! The base traits.
|
||||
const Base* m_base;
|
||||
|
||||
/*! Constructor.
|
||||
/*! constructs.
|
||||
* \param base The base traits class. It must be passed, to handle non
|
||||
* stateless traits objects, (which stores data).
|
||||
* The constructor is declared private to allow only the functor
|
||||
|
|
@ -792,7 +786,7 @@ public:
|
|||
friend class Arr_traits_basic_adaptor_2<Base>;
|
||||
|
||||
public:
|
||||
/*! Determines whether a point lies on the vertical identification curve
|
||||
/*! determines whether a point lies on the vertical identification curve
|
||||
* \param p the point.
|
||||
* \return true if p lies on the vertical identification curve, and
|
||||
* false otherwise.
|
||||
|
|
@ -800,7 +794,7 @@ public:
|
|||
bool operator()(const Point_2& p) const
|
||||
{ return is_on_y_idn(p, Ioyi_2_point_tag()); }
|
||||
|
||||
/*! Determines whether an x-monotone curve coicide with the vertical
|
||||
/*! determines whether an x-monotone curve coicide with the vertical
|
||||
* identification curve
|
||||
* \param xcv the point.
|
||||
* \return true if xcv coincides with an identification curve,
|
||||
|
|
@ -823,7 +817,7 @@ public:
|
|||
{ CGAL_error(); return false; }
|
||||
};
|
||||
|
||||
/*! Obtain a Is_on_y_identification_2 function object. */
|
||||
/*! obtains a Is_on_y_identification_2 function object. */
|
||||
Is_on_y_identification_2 is_on_y_identification_2_object() const
|
||||
{
|
||||
return Is_on_y_identification_2(this);
|
||||
|
|
@ -837,7 +831,7 @@ public:
|
|||
//! The base traits.
|
||||
const Base* m_base;
|
||||
|
||||
/*! Constructor.
|
||||
/*! constructs.
|
||||
* \param base The base traits class. It must be passed, to handle non
|
||||
* stateless traits objects, (which stores data).
|
||||
* The constructor is declared private to allow only the functor
|
||||
|
|
@ -849,8 +843,7 @@ public:
|
|||
//! Allow its functor obtaining function calling the private constructor.
|
||||
friend class Arr_traits_basic_adaptor_2<Base>;
|
||||
|
||||
/*!
|
||||
* Implementation of the operator() in case the base should used.
|
||||
/*! Implementation of the operator() in case the base should used.
|
||||
*/
|
||||
Comparison_result comp_y_near_bnd(const X_monotone_curve_2& xcv1,
|
||||
const X_monotone_curve_2& xcv2,
|
||||
|
|
@ -858,8 +851,7 @@ public:
|
|||
Arr_use_traits_tag) const
|
||||
{ return m_base->compare_y_near_boundary_2_object()(xcv1, xcv2, ce); }
|
||||
|
||||
/*!
|
||||
* Implementation of the operator() in case the dummy should be used.
|
||||
/*! Implementation of the operator() in case the dummy should be used.
|
||||
*/
|
||||
Comparison_result comp_y_near_bnd(const X_monotone_curve_2&,
|
||||
const X_monotone_curve_2&,
|
||||
|
|
@ -867,8 +859,7 @@ public:
|
|||
{ CGAL_error(); return EQUAL; }
|
||||
|
||||
public:
|
||||
/*!
|
||||
* Compare the relative y-positions of two curve ends.
|
||||
/*! compares the relative y-positions of two curve ends.
|
||||
* \param xcv1 The first curve.
|
||||
* \param xcv2 The second curve.
|
||||
* \param ce The relevant end of xcv1 and xcv2.
|
||||
|
|
@ -888,7 +879,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
/*! Obtain a Compare_y_near_boundary_2 functor. */
|
||||
/*! obtains a Compare_y_near_boundary_2 functor. */
|
||||
Compare_y_near_boundary_2 compare_y_near_boundary_2_object() const
|
||||
{ return Compare_y_near_boundary_2(this); }
|
||||
|
||||
|
|
@ -900,7 +891,7 @@ public:
|
|||
//! The base traits.
|
||||
const Base* m_base;
|
||||
|
||||
/*! Constructor.
|
||||
/*! constructs.
|
||||
* \param base The base traits class. It must be passed, to handle non
|
||||
* stateless traits objects, (which stores data).
|
||||
* The constructor is declared private to allow only the functor
|
||||
|
|
@ -912,22 +903,20 @@ public:
|
|||
//! Allow its functor obtaining function calling the private constructor.
|
||||
friend class Arr_traits_basic_adaptor_2<Base>;
|
||||
|
||||
/*!
|
||||
* Implementation of the operator() in case the base should be used.
|
||||
/*! Implementation of the operator() in case the base should be used.
|
||||
*/
|
||||
Comparison_result comp_y_on_bnd(const Point_2& p1, const Point_2& p2,
|
||||
Arr_use_traits_tag) const
|
||||
{ return m_base->compare_y_on_boundary_2_object()(p1, p2); }
|
||||
|
||||
/*!
|
||||
* Implementation of the operator() in case the dummy should be used.
|
||||
/*! Implementation of the operator() in case the dummy should be used.
|
||||
*/
|
||||
Comparison_result comp_y_on_bnd(const Point_2&, const Point_2&,
|
||||
Arr_use_dummy_tag) const
|
||||
{ CGAL_error(); return SMALLER; }
|
||||
|
||||
public:
|
||||
/*! Compare the relative y-positions of two points.
|
||||
/*! compares the relative y-positions of two points.
|
||||
* \param p1 The first point.
|
||||
* \param p2 The second point.
|
||||
* \pre Both points lie on vertical boundaries.
|
||||
|
|
@ -944,7 +933,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
/*! Obtain a Compare_y_on_boundary_2 function object. */
|
||||
/*! obtains a Compare_y_on_boundary_2 function object. */
|
||||
Compare_y_on_boundary_2 compare_y_on_boundary_2_object() const
|
||||
{ return Compare_y_on_boundary_2(this); }
|
||||
|
||||
|
|
@ -955,7 +944,7 @@ public:
|
|||
*/
|
||||
class Parameter_space_in_y_2 {
|
||||
public:
|
||||
/*! Obtain the location of the given curve end in y.
|
||||
/*! obtains the location of the given curve end in y.
|
||||
* \param xcv The curve.
|
||||
* \param ind ARR_MIN_END if we refer to xcv's minimal end,
|
||||
* ARR_MAX_END if we refer to its maximal end.
|
||||
|
|
@ -970,7 +959,7 @@ public:
|
|||
return parameter_space_in_y(xcv, ind, Bottom_or_top_sides_category());
|
||||
}
|
||||
|
||||
/*! Obtain the location of the given point end in y.
|
||||
/*! obtains the location of the given point end in y.
|
||||
* \param p The point.
|
||||
* \return The location of the point end in y direction.
|
||||
*/
|
||||
|
|
@ -981,7 +970,7 @@ public:
|
|||
//! The base traits.
|
||||
const Base* m_base;
|
||||
|
||||
/*! Constructor.
|
||||
/*! constructs.
|
||||
* \param base The base traits class. It must be passed, to handle non
|
||||
* stateless traits objects, (which stores data).
|
||||
* The constructor is declared private to allow only the functor
|
||||
|
|
@ -1054,7 +1043,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
/*! Obtain an Parameter_space_in_y_2 function object. */
|
||||
/*! obtains an Parameter_space_in_y_2 function object. */
|
||||
Parameter_space_in_y_2 parameter_space_in_y_2_object() const
|
||||
{ return Parameter_space_in_y_2(this); }
|
||||
|
||||
|
|
@ -1066,7 +1055,7 @@ public:
|
|||
//! The base traits.
|
||||
const Base* m_base;
|
||||
|
||||
/*! Constructor.
|
||||
/*! constructs.
|
||||
* \param base The base traits class. It must be passed, to handle non
|
||||
* stateless traits objects, (which stores data).
|
||||
* The constructor is declared private to allow only the functor
|
||||
|
|
@ -1079,7 +1068,7 @@ public:
|
|||
friend class Arr_traits_basic_adaptor_2<Base>;
|
||||
|
||||
public:
|
||||
/*! Determines whether a point lies on the horizontal identification curve
|
||||
/*! determines whether a point lies on the horizontal identification curve
|
||||
* \param p the point.
|
||||
* \return true if p lies on the vertical identification curve, and
|
||||
* false otherwise.
|
||||
|
|
@ -1087,7 +1076,7 @@ public:
|
|||
bool operator()(const Point_2& p) const
|
||||
{ return is_on_idn(p, Ioxi_2_point_tag()); }
|
||||
|
||||
/*! Determines whether an x-monotone curve coicide with the horizontal
|
||||
/*! determines whether an x-monotone curve coicide with the horizontal
|
||||
* identification curve
|
||||
* \param xcv the point.
|
||||
* \return true if xcv coincides with an identification curve,
|
||||
|
|
@ -1110,7 +1099,7 @@ public:
|
|||
{ CGAL_error(); return false; }
|
||||
};
|
||||
|
||||
/*! Obtain a Is_on_x_identification_2 function object. */
|
||||
/*! obtains a Is_on_x_identification_2 function object. */
|
||||
Is_on_x_identification_2 is_on_x_identification_2_object() const
|
||||
{ return Is_on_x_identification_2(this); }
|
||||
|
||||
|
|
@ -1122,7 +1111,7 @@ public:
|
|||
//! The base traits.
|
||||
const Base* m_base;
|
||||
|
||||
/*! Constructor.
|
||||
/*! constructs.
|
||||
* \param base The base traits class. It must be passed, to handle non
|
||||
* stateless traits objects, (which stores data).
|
||||
* The constructor is declared private to allow only the functor
|
||||
|
|
@ -1135,7 +1124,7 @@ public:
|
|||
friend class Arr_traits_basic_adaptor_2<Base>;
|
||||
|
||||
public:
|
||||
/*! Compare the x-coordinate of two given points projected onto the
|
||||
/*! compares the x-coordinate of two given points projected onto the
|
||||
* horizontal boundaries
|
||||
* \param p1 the first point.
|
||||
* \param p2 the second point.
|
||||
|
|
@ -1145,7 +1134,7 @@ public:
|
|||
return comp_x_on_bnd(p1, p2, Bottom_side_category(), Top_side_category());
|
||||
}
|
||||
|
||||
/*! Compare the x-coordinate of a point and a curve-end projected onto the
|
||||
/*! compares the x-coordinate of a point and a curve-end projected onto the
|
||||
* horizontal boundaries
|
||||
* \param pt the point.
|
||||
* \param xcv the curve
|
||||
|
|
@ -1156,7 +1145,7 @@ public:
|
|||
Arr_curve_end ce) const
|
||||
{ return comp_x_on_bnd(pt, xcv, ce, Bottom_or_top_sides_category()); }
|
||||
|
||||
/*! Compare the x-coordinates of two curve-ends projected onto the horizontal
|
||||
/*! compares the x-coordinates of two curve-ends projected onto the horizontal
|
||||
* boundaries
|
||||
* \param xcv1 the curve
|
||||
* \param ce1 the curve-end
|
||||
|
|
@ -1234,7 +1223,7 @@ public:
|
|||
{ CGAL_error(); return SMALLER; }
|
||||
};
|
||||
|
||||
/*! Obtain a Compare_x_on_boundary_2 function object. */
|
||||
/*! obtains a Compare_x_on_boundary_2 function object. */
|
||||
Compare_x_on_boundary_2 compare_x_on_boundary_2_object() const
|
||||
{ return Compare_x_on_boundary_2(this); }
|
||||
|
||||
|
|
@ -1246,7 +1235,7 @@ public:
|
|||
//! The base traits.
|
||||
const Base* m_base;
|
||||
|
||||
/*! Constructor.
|
||||
/*! constructs.
|
||||
* \param base The base traits class. It must be passed, to handle non
|
||||
* stateless traits objects, (which stores data).
|
||||
* The constructor is declared private to allow only the functor
|
||||
|
|
@ -1273,7 +1262,7 @@ public:
|
|||
{ CGAL_error(); return EQUAL; }
|
||||
|
||||
public:
|
||||
/*! Compare the relative x-positions of two curve ends.
|
||||
/*! compares the relative x-positions of two curve ends.
|
||||
* \param xcv1 The first curve.
|
||||
* \param xcv2 The second curve.
|
||||
* \param ce ARR_MIN_END if we refer to the curves' minimal end;
|
||||
|
|
@ -1289,7 +1278,7 @@ public:
|
|||
{ return _compare_curves(xcv1, xcv2, ce, Cmp_x_nb_2_curve_ends_tag()); }
|
||||
};
|
||||
|
||||
/*! Obtain a Compare_x_near_boundary_2 function object. */
|
||||
/*! obtains a Compare_x_near_boundary_2 function object. */
|
||||
Compare_x_near_boundary_2 compare_x_near_boundary_2_object() const
|
||||
{ return Compare_x_near_boundary_2(this); }
|
||||
|
||||
|
|
@ -1305,7 +1294,7 @@ public:
|
|||
//! The base traits.
|
||||
const Self* m_self;
|
||||
|
||||
/*! Constructor.
|
||||
/*! constructs.
|
||||
* \param base The base traits class. It must be passed, to handle non
|
||||
* stateless traits objects, (which stores data).
|
||||
* The constructor is declared private to allow only the functor
|
||||
|
|
@ -1351,7 +1340,7 @@ public:
|
|||
{ CGAL_error(); return EQUAL; }
|
||||
|
||||
public:
|
||||
/*! Compare the relative y-positions of two curve ends.
|
||||
/*! compares the relative y-positions of two curve ends.
|
||||
* \param xcv1 The first curve.
|
||||
* \param ind1 ARR_MIN_END if we refer to xcv1's minimal end;
|
||||
* ARR_MAX_END if we refer to its maximal end.
|
||||
|
|
@ -1394,7 +1383,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
/*! Obtain a Compare_y_curve_ends_2 function object. */
|
||||
/*! obtains a Compare_y_curve_ends_2 function object. */
|
||||
Compare_y_curve_ends_2 compare_y_curve_ends_2_object() const
|
||||
{ return Compare_y_curve_ends_2(this); }
|
||||
|
||||
|
|
@ -1406,7 +1395,7 @@ public:
|
|||
//! The base traits.
|
||||
const Self* m_self;
|
||||
|
||||
/*! Constructor.
|
||||
/*! constructs.
|
||||
* \param base The base traits class. It must be passed, to handle non
|
||||
* stateless traits objects, (which stores data).
|
||||
* The constructor is declared private to allow only the functor
|
||||
|
|
@ -1473,7 +1462,7 @@ public:
|
|||
}
|
||||
|
||||
public:
|
||||
/*! Compare the relative x-positions of a point and a curve end.
|
||||
/*! compares the relative x-positions of a point and a curve end.
|
||||
* \param pt The point
|
||||
* \param xcv The curve.
|
||||
* \param ce ARR_MIN_END if we refer to xcv's minimal end;
|
||||
|
|
@ -1508,7 +1497,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
/*! Obtain a Compare_x_point_curve_end_2 function object. */
|
||||
/*! obtains a Compare_x_point_curve_end_2 function object. */
|
||||
Compare_x_point_curve_end_2 compare_x_point_curve_end_2_object() const
|
||||
{ return Compare_x_point_curve_end_2(this); }
|
||||
|
||||
|
|
@ -1520,7 +1509,7 @@ public:
|
|||
//! The base traits.
|
||||
const Self* m_self;
|
||||
|
||||
/*! Constructor.
|
||||
/*! constructs.
|
||||
* \param base The base traits class. It must be passed, to handle non
|
||||
* stateless traits objects, (which stores data).
|
||||
* The constructor is declared private to allow only the functor
|
||||
|
|
@ -1671,7 +1660,7 @@ public:
|
|||
{ CGAL_error(); return CGAL::EQUAL; }
|
||||
|
||||
public:
|
||||
/*! Compare the relative x-positions of two curve ends.
|
||||
/*! compares the relative x-positions of two curve ends.
|
||||
* \param xcv1 The first curve.
|
||||
* \param ind1 ARR_MIN_END if we refer to xcv1's minimal end;
|
||||
* ARR_MAX_END if we refer to its maximal end.
|
||||
|
|
@ -1714,7 +1703,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
/*! Obtain a Compare_x_curve_ends_2 function object. */
|
||||
/*! obtains a Compare_x_curve_ends_2 function object. */
|
||||
Compare_x_curve_ends_2 compare_x_curve_ends_2_object() const
|
||||
{ return Compare_x_curve_ends_2(this); }
|
||||
|
||||
|
|
@ -1723,7 +1712,7 @@ public:
|
|||
//! The base traits.
|
||||
const Self* m_self;
|
||||
|
||||
/*! Constructor.
|
||||
/*! constructs.
|
||||
* \param base The base traits class. It must be passed, to handle non
|
||||
* stateless traits objects, (which stores data).
|
||||
* The constructor is declared private to allow only the functor
|
||||
|
|
@ -1744,7 +1733,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
/*! Obtain a Construct_vertex_at_curve_end_2 function object. */
|
||||
/*! obtains a Construct_vertex_at_curve_end_2 function object. */
|
||||
Construct_vertex_at_curve_end_2 construct_vertex_at_curve_end_2_object() const
|
||||
{ return Construct_vertex_at_curve_end_2(this); }
|
||||
|
||||
|
|
@ -1754,7 +1743,7 @@ public:
|
|||
//! The self traits.
|
||||
const Self* m_self;
|
||||
|
||||
/*! Constructor.
|
||||
/*! constructs.
|
||||
* \param self The traits class itself. It must be passed, to handle non
|
||||
* stateless traits objects, (which stores data).
|
||||
* The constructor is declared private to allow only the functor
|
||||
|
|
@ -1797,7 +1786,7 @@ public:
|
|||
{ return _is_closed(xcv, ce); }
|
||||
};
|
||||
|
||||
/*! Obtain a Is_closed_2 function object. */
|
||||
/*! obtains a Is_closed_2 function object. */
|
||||
Is_closed_2 is_closed_2_object() const
|
||||
{ return Is_closed_2(this); }
|
||||
|
||||
|
|
@ -1807,7 +1796,7 @@ public:
|
|||
//@{
|
||||
class Is_in_x_range_2 {
|
||||
public:
|
||||
/*! Check whether a given point is in the x-range of the given x-monotone
|
||||
/*! checks whether a given point is in the x-range of the given x-monotone
|
||||
* curve.
|
||||
* \param xcv The x-monotone curve.
|
||||
* \param p The point.
|
||||
|
|
@ -1820,7 +1809,7 @@ public:
|
|||
Bottom_or_top_sides_category());
|
||||
}
|
||||
|
||||
/*! Check whether the x-ranges of the given x-monotone curves overlap.
|
||||
/*! checks whether the x-ranges of the given x-monotone curves overlap.
|
||||
* \param xcv1 The first x-monotone curve.
|
||||
* \param xcv2 The second x-monotone curve.
|
||||
* \return (true) if there is an overlap in the x-ranges of the given
|
||||
|
|
@ -1838,7 +1827,7 @@ public:
|
|||
//! The base traits.
|
||||
const Self* m_self;
|
||||
|
||||
/*! Constructor.
|
||||
/*! constructs.
|
||||
* \param base The base traits class. It must be passed, to handle non
|
||||
* stateless traits objects, (which stores data).
|
||||
* The constructor is declared private to allow only the functor
|
||||
|
|
@ -2153,14 +2142,13 @@ public:
|
|||
//@}
|
||||
};
|
||||
|
||||
/*! Obtain an Is_in_x_range_2 function object. */
|
||||
/*! obtains an Is_in_x_range_2 function object. */
|
||||
Is_in_x_range_2 is_in_x_range_2_object() const
|
||||
{ return Is_in_x_range_2(this); }
|
||||
|
||||
class Compare_y_position_2 {
|
||||
public:
|
||||
/*!
|
||||
* Obtain the relative of two x-monotone curves with overlapping x-ranges
|
||||
/*! obtains the relative of two x-monotone curves with overlapping x-ranges
|
||||
* that are disjoint in their interiors.
|
||||
* \param xcv1 The first x-monotone curve.
|
||||
* \param xcv2 The second x-monotone curve.
|
||||
|
|
@ -2331,7 +2319,7 @@ public:
|
|||
//! The base traits.
|
||||
const Self* m_self;
|
||||
|
||||
/*! Constructor.
|
||||
/*! constructs.
|
||||
* \param base The base traits class. It must be passed, to handle non
|
||||
* stateless traits objects, (which stores data).
|
||||
* The constructor is declared private to allow only the functor
|
||||
|
|
@ -2344,13 +2332,13 @@ public:
|
|||
friend class Arr_traits_basic_adaptor_2<Base>;
|
||||
};
|
||||
|
||||
/*! Obtain a Compare_y_position_2 function object. */
|
||||
/*! obtains a Compare_y_position_2 function object. */
|
||||
Compare_y_position_2 compare_y_position_2_object() const
|
||||
{ return Compare_y_position_2(this); }
|
||||
|
||||
class Is_between_cw_2 {
|
||||
public:
|
||||
/*! Check whether the given query curve is encountered when rotating the
|
||||
/*! checks whether the given query curve is encountered when rotating the
|
||||
* first curve in a clockwise direction around a given point until reaching
|
||||
* the second curve.
|
||||
* \param xcv The query curve.
|
||||
|
|
@ -2436,7 +2424,7 @@ public:
|
|||
//! The base traits.
|
||||
const Self* m_self;
|
||||
|
||||
/*! Constructor.
|
||||
/*! constructs.
|
||||
* \param base The base traits class. It must be passed, to handle non
|
||||
* stateless traits objects, (which stores data).
|
||||
* The constructor is declared private to allow only the functor
|
||||
|
|
@ -3229,14 +3217,13 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
/*! Obtain an Is_between_cw_2 function object. */
|
||||
/*! obtains an Is_between_cw_2 function object. */
|
||||
Is_between_cw_2 is_between_cw_2_object() const
|
||||
{ return Is_between_cw_2(this); }
|
||||
|
||||
class Compare_cw_around_point_2 {
|
||||
public:
|
||||
/*!
|
||||
* Compare the two interior disjoint x-monotone curves in a clockwise
|
||||
/*! compares the two interior disjoint x-monotone curves in a clockwise
|
||||
* order around their common endpoint.
|
||||
* \param xcv1 The first curve.
|
||||
* \param xcv1_to_right Is xcv1 directed from left to right.
|
||||
|
|
@ -3285,7 +3272,7 @@ public:
|
|||
//! The base traits.
|
||||
const Self* m_self;
|
||||
|
||||
/*! Constructor.
|
||||
/*! constructs.
|
||||
* \param base The base traits class. It must be passed, to handle non
|
||||
* stateless traits objects, (which stores data).
|
||||
* The constructor is declared private to allow only the functor
|
||||
|
|
@ -3298,7 +3285,7 @@ public:
|
|||
friend class Arr_traits_basic_adaptor_2<Base>;
|
||||
};
|
||||
|
||||
/*! Obtain a Compare_cw_around_point_2 function object. */
|
||||
/*! obtains a Compare_cw_around_point_2 function object. */
|
||||
Compare_cw_around_point_2 compare_cw_around_point_2_object() const
|
||||
{ return Compare_cw_around_point_2(this); }
|
||||
//@}
|
||||
|
|
@ -3337,10 +3324,10 @@ public:
|
|||
|
||||
/// \name Construction.
|
||||
//@{
|
||||
/*! Default constructor. */
|
||||
/*! constructs default. */
|
||||
Arr_traits_adaptor_2() : Base() {}
|
||||
|
||||
/*! Constructor from a base-traits class. */
|
||||
/*! constructs from a base-traits class. */
|
||||
Arr_traits_adaptor_2(const Base_traits_2& traits) : Base(traits) {}
|
||||
//@}
|
||||
|
||||
|
|
@ -3374,7 +3361,7 @@ public:
|
|||
Intersection_result;
|
||||
|
||||
public:
|
||||
/*! Compare 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 SMALLER - x(p1) < x(p2);
|
||||
|
|
@ -3391,7 +3378,7 @@ public:
|
|||
return base.compare_xy_2_object()(p1, p2);
|
||||
}
|
||||
|
||||
/*! Compare two x-monotone curves lexigoraphically.
|
||||
/*! compares two x-monotone curves lexigoraphically.
|
||||
* Input: C1, C2, intersections = empty
|
||||
* compare(C1, C2, intersections)
|
||||
* Compare the left-most points of C1 and C2.
|
||||
|
|
@ -3418,7 +3405,7 @@ public:
|
|||
//! The base traits.
|
||||
const Self& m_self;
|
||||
|
||||
/*! Constructor.
|
||||
/*! constructs.
|
||||
* \param trait The base traits class. It must be passed, to handle non
|
||||
* stateless traits objects, (which stores data).
|
||||
* The constructor is declared private to allow only the functor
|
||||
|
|
@ -3432,7 +3419,7 @@ public:
|
|||
|
||||
/// Point-curve
|
||||
//@{
|
||||
/*! Compare a point and a curve end.
|
||||
/*! compares a point and a curve end.
|
||||
* Dispatch calls to traits that handle open and close boundaries, resp.
|
||||
* The only reason for this dispatcher is the poor choice of different
|
||||
* names for the Traits functors that handle close and open boundaries:
|
||||
|
|
@ -3447,7 +3434,7 @@ public:
|
|||
|
||||
/// curve-curve
|
||||
//@{
|
||||
/*! Compare a curve end and a curve end.
|
||||
/*! compares a curve end and a curve end.
|
||||
* Dispatch calls to traits that handle open and close boundaries, resp.
|
||||
* The only reason for this dispatcher is the poor choice of different
|
||||
* names for the Traits functors that handle close and open boundaries:
|
||||
|
|
@ -3461,7 +3448,7 @@ public:
|
|||
{ return m_self.compare_x_on_boundary_2_object()(c1, ce1, c2, ce2); }
|
||||
//@}
|
||||
|
||||
/*! Compare the max end of two x-monotone curves lexigoraphically.
|
||||
/*! compares the max end of two x-monotone curves lexigoraphically.
|
||||
*/
|
||||
Comparison_result compare_max_end(const X_monotone_curve_2& c1,
|
||||
const X_monotone_curve_2& c2,
|
||||
|
|
@ -3475,7 +3462,7 @@ public:
|
|||
return operator()(p1, p2);
|
||||
}
|
||||
|
||||
/*! Compare the max (right) end of two x-monotone curves lexigoraphically.
|
||||
/*! compares the max (right) end of two x-monotone curves lexigoraphically.
|
||||
* \pre the curve overlap
|
||||
*/
|
||||
Comparison_result compare_max_end(const X_monotone_curve_2& c1,
|
||||
|
|
@ -3562,7 +3549,7 @@ public:
|
|||
return res;
|
||||
}
|
||||
|
||||
/*! Split 2 given curves that overlap and have a common sub-curve on their
|
||||
/*! splits 2 given curves that overlap and have a common sub-curve on their
|
||||
* right. Then compare the remaining portions of the curves, respectively.
|
||||
*/
|
||||
Comparison_result
|
||||
|
|
@ -3602,7 +3589,7 @@ public:
|
|||
Are_all_sides_oblivious_category());
|
||||
}
|
||||
|
||||
/*! Compare two x-monotone curves lexigoraphically.
|
||||
/*! compares two x-monotone curves lexigoraphically.
|
||||
*/
|
||||
Comparison_result operator()(const X_monotone_curve_2& c1,
|
||||
const X_monotone_curve_2& c2,
|
||||
|
|
@ -3623,7 +3610,7 @@ public:
|
|||
return compare_remainder(c1, c2, intersections);
|
||||
}
|
||||
|
||||
/*! Compare two x-monotone curves lexigoraphically.
|
||||
/*! compares two x-monotone curves lexigoraphically.
|
||||
*/
|
||||
Comparison_result operator()(const X_monotone_curve_2& c1,
|
||||
const X_monotone_curve_2& c2,
|
||||
|
|
@ -3765,14 +3752,13 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
/*! Obtain a Compare_xy_2 function object */
|
||||
/*! obtains a Compare_xy_2 function object */
|
||||
Compare_xy_2 compare_xy_2_object() const { return Compare_xy_2(*this); }
|
||||
|
||||
/*! A functor that tests whether two x-monotone curves can be merged. */
|
||||
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 xcv1 The first curve.
|
||||
* \param xcv2 The second curve.
|
||||
* \return (true) if the two curves are mergeable - if they are supported
|
||||
|
|
@ -3789,7 +3775,7 @@ public:
|
|||
//! The base traits.
|
||||
const Base* m_base;
|
||||
|
||||
/*! Constructor.
|
||||
/*! constructs.
|
||||
* \param base The base traits class. It must be passed, to handle non
|
||||
* stateless traits objects, (which stores data).
|
||||
* The constructor is declared private to allow only the functor
|
||||
|
|
@ -3815,15 +3801,14 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
/*! Obtain an Are_mergeable_2 function object. */
|
||||
/*! obtains an Are_mergeable_2 function object. */
|
||||
Are_mergeable_2 are_mergeable_2_object() const
|
||||
{ return Are_mergeable_2(this); }
|
||||
|
||||
/*! A functor that merges two x-monotone curves into one. */
|
||||
class Merge_2 {
|
||||
public:
|
||||
/*!
|
||||
* Merge two given x-monotone curves into a single curve.
|
||||
/*! merges two given x-monotone curves into a single curve.
|
||||
* \param xcv1 The first curve.
|
||||
* \param xcv2 The second curve.
|
||||
* \param c Output: The merged curve.
|
||||
|
|
@ -3842,7 +3827,7 @@ public:
|
|||
//! The base traits.
|
||||
const Base* m_base;
|
||||
|
||||
/*! Constructor.
|
||||
/*! constructs.
|
||||
* \param base The base traits class. It must be passed, to handle non
|
||||
* stateless traits objects, (which stores data).
|
||||
* The constructor is declared private to allow only the functor
|
||||
|
|
@ -3870,7 +3855,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
/*! Obtain a Merge_2 function object. */
|
||||
/*! obtains a Merge_2 function object. */
|
||||
Merge_2 merge_2_object() const { return Merge_2(this); }
|
||||
//@}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -88,10 +88,10 @@ protected:
|
|||
bool _end;
|
||||
|
||||
public:
|
||||
/*! Default constructor. */
|
||||
/*! constructs default. */
|
||||
Face_neighbor_iterator() : _end (true) {}
|
||||
|
||||
/*! Constructor.
|
||||
/*! constructs.
|
||||
* \param face The face (dual vertex).
|
||||
* \param out_edges Do we need the outgoing or the ingoing halfedges.
|
||||
* \param start Should we start traversing the edges.
|
||||
|
|
@ -167,7 +167,7 @@ protected:
|
|||
}
|
||||
|
||||
private:
|
||||
/*! Check two iterators for equality. */
|
||||
/*! checks two iterators for equality. */
|
||||
bool _equal(const Self& it) const
|
||||
{
|
||||
return (_out == it._out && _face == it._face && ((_end && it._end) ||
|
||||
|
|
@ -176,7 +176,7 @@ protected:
|
|||
_ccb_curr == it._ccb_curr)));
|
||||
}
|
||||
|
||||
/*! Dereference the current circulator. */
|
||||
/*! dereferences the current circulator. */
|
||||
Edge_handle _dereference() const
|
||||
{
|
||||
if (_out) return (_ccb_curr);
|
||||
|
|
@ -237,43 +237,43 @@ protected:
|
|||
public:
|
||||
typedef Face_neighbor_iterator Incident_edge_iterator;
|
||||
|
||||
/*! Default constructor. */
|
||||
/*! constructs default. */
|
||||
Dual_arrangement_on_surface() : p_arr(nullptr) {}
|
||||
|
||||
/*! Constructor from an arrangement. */
|
||||
/*! Constructs from an arrangement. */
|
||||
Dual_arrangement_on_surface(const Arrangement& arr) :
|
||||
p_arr(const_cast<Arrangement*>(&arr))
|
||||
{}
|
||||
|
||||
/*! Obtain the primal arrangement (const version). */
|
||||
/*! obtains the primal arrangement (const version). */
|
||||
const Arrangement* arrangement() const { return (p_arr); }
|
||||
|
||||
/*! Obtain the primal arrangement (non-const version). */
|
||||
/*! obtains the primal arrangement (non-const version). */
|
||||
Arrangement* arrangement() { return (p_arr); }
|
||||
|
||||
/*! Obtain the number of vertices (face of the primal arrangement). */
|
||||
/*! obtains the number of vertices (face of the primal arrangement). */
|
||||
Size number_of_vertices() const { return (p_arr->number_of_faces()); }
|
||||
|
||||
/*! Obtain the begin iterator of the vertices of the dual arrangement
|
||||
/*! obtains the begin iterator of the vertices of the dual arrangement
|
||||
* (faces of the primal arrangement).
|
||||
*/
|
||||
Vertex_iterator vertices_begin() const { return (p_arr->faces_begin()); }
|
||||
|
||||
/*! Obtain the pass-the-end iterator of the vertices of the dual arrangement
|
||||
/*! obtains the pass-the-end iterator of the vertices of the dual arrangement
|
||||
* (faces of the primal arrangement).
|
||||
*/
|
||||
Vertex_iterator vertices_end() const { return (p_arr->faces_end()); }
|
||||
|
||||
/*! Obtain the number of edges. */
|
||||
/*! obtains the number of edges. */
|
||||
Size number_of_edges () const { return (p_arr->number_of_halfedges()); }
|
||||
|
||||
/*! Obtain the begin iterator of the edges of the dual arrangement. */
|
||||
/*! obtains the begin iterator of the edges of the dual arrangement. */
|
||||
Edge_iterator edges_begin() const { return (p_arr->halfedges_begin()); }
|
||||
|
||||
/*! Obtain the pass-the-end iterator of the edges of the dual arrangement. */
|
||||
/*! obtains the pass-the-end iterator of the edges of the dual arrangement. */
|
||||
Edge_iterator edges_end() const { return (p_arr->halfedges_end()); }
|
||||
|
||||
/*! Obtain the dual vertex-degree (number of edges forming the face boundary).
|
||||
/*! obtains the dual vertex-degree (number of edges forming the face boundary).
|
||||
*/
|
||||
Size degree(Vertex_handle v) const
|
||||
{
|
||||
|
|
@ -289,14 +289,14 @@ public:
|
|||
return (deg);
|
||||
}
|
||||
|
||||
/*! Traverse the outgoing edges of a given vertex. */
|
||||
/*! traverses the outgoing edges of a given vertex. */
|
||||
Incident_edge_iterator out_edges_begin(Vertex_handle v) const
|
||||
{ return (Incident_edge_iterator (v, true, true)); }
|
||||
|
||||
Incident_edge_iterator out_edges_end(Vertex_handle v) const
|
||||
{ return (Incident_edge_iterator (v, true, false)); }
|
||||
|
||||
/*! Traverse the ingoing edges of a given vertex. */
|
||||
/*! traverses the ingoing edges of a given vertex. */
|
||||
Incident_edge_iterator in_edges_begin(Vertex_handle v) const
|
||||
{ return (Incident_edge_iterator (v, false, true)); }
|
||||
|
||||
|
|
@ -388,7 +388,7 @@ public:
|
|||
// Functions required by the IncidenceGraph concept:
|
||||
// -------------------------------------------------
|
||||
|
||||
/*! Obtain the out-degree of a vertex in a given dual arrangement.
|
||||
/*! obtains the out-degree of a vertex in a given dual arrangement.
|
||||
* \param v The vertex.
|
||||
* \param darr The dual arrangement.
|
||||
* \param Number of halfedges around the boundary of the primal face.
|
||||
|
|
@ -400,7 +400,7 @@ out_degree(typename boost::graph_traits<Dual<T<T1, T2> > >::vertex_descriptor v,
|
|||
const Dual<T<T1, T2> >& darr) \
|
||||
{ return darr.degree(v); }
|
||||
|
||||
/*! Return a range of the out-edges of a vertex given by its descriptor and the
|
||||
/*! returns a range of the out-edges of a vertex given by its descriptor and the
|
||||
* dual arrangement it belongs to.
|
||||
* \param v The vertex.
|
||||
* \param darr The dual arrangement.
|
||||
|
|
@ -414,7 +414,7 @@ out_edges(typename boost::graph_traits<Dual<T<T1, T2> > >::vertex_descriptor v,\
|
|||
const Dual<T<T1, T2> >& darr) \
|
||||
{ return std::make_pair(darr.out_edges_begin(v), darr.out_edges_end(v)); } \
|
||||
|
||||
/*! Obtain the source vertex of a dual arrangement edge.
|
||||
/*! obtains the source vertex of a dual arrangement edge.
|
||||
* \param e The edge.
|
||||
* \param darr The dual arrangement.
|
||||
* \return The incident face of e in the primal arrangement.
|
||||
|
|
@ -426,7 +426,7 @@ source(typename boost::graph_traits<Dual<T<T1, T2> > >::edge_descriptor e, \
|
|||
const Dual<T<T1, T2> >& /* darr */) \
|
||||
{ return e->face(); }
|
||||
|
||||
/*! Obtain the target vertex of a dual arrangement edge.
|
||||
/*! obtains the target vertex of a dual arrangement edge.
|
||||
* \param e The edge.
|
||||
* \param darr The dual arrangement.
|
||||
* \return The incident face of the twin of e in the primal arrangement.
|
||||
|
|
@ -441,7 +441,7 @@ target(typename boost::graph_traits<Dual<T<T1, T2> > >::edge_descriptor e, \
|
|||
// Functions required by the BidirectionalGraph concept:
|
||||
// -----------------------------------------------------
|
||||
|
||||
/*! Obtain the in-degree of a vertex in a given dual arrangement.
|
||||
/*! obtains the in-degree of a vertex in a given dual arrangement.
|
||||
* \param v The vertex.
|
||||
* \param darr The dual arrangement.
|
||||
* \param Number of halfedges around the boundary of the primal face.
|
||||
|
|
@ -453,7 +453,7 @@ in_degree(typename boost::graph_traits<Dual<T<T1, T2> > >::vertex_descriptor v,\
|
|||
const Dual<T<T1, T2> >& darr) \
|
||||
{ return darr.degree(v); }
|
||||
|
||||
/*! Return a range of the in-edges of a vertex given by its descriptor and the
|
||||
/*! returns a range of the in-edges of a vertex given by its descriptor and the
|
||||
* dual arrangement it belongs to.
|
||||
* \param v The vertex.
|
||||
* \param darr The dual arrangement.
|
||||
|
|
@ -467,7 +467,7 @@ in_edges(typename boost::graph_traits<Dual<T<T1, T2> > >::vertex_descriptor v,\
|
|||
const Dual<T<T1, T2> >& darr) \
|
||||
{ return std::make_pair(darr.in_edges_begin(v), darr.in_edges_end(v)); }
|
||||
|
||||
/*! Obtain the degree of a vertex in a given dual arrangement.
|
||||
/*! obtains the degree of a vertex in a given dual arrangement.
|
||||
* \param v The vertex.
|
||||
* \param darr The dual arrangement.
|
||||
* \param Number of ingoing and outgoing halfedges incident to v.
|
||||
|
|
@ -482,7 +482,7 @@ degree(typename boost::graph_traits<Dual<T<T1, T2> > >::vertex_descriptor v, \
|
|||
// Functions required by the VertexListGraph concept:
|
||||
// --------------------------------------------------
|
||||
|
||||
/*! Obtain the number of vertices in the given dual arrangement.
|
||||
/*! obtains the number of vertices in the given dual arrangement.
|
||||
* \param darr The dual arrangement.
|
||||
* \return Number of faces in the primal arrangement.
|
||||
*/
|
||||
|
|
@ -492,7 +492,7 @@ typename boost::graph_traits<Dual<T<T1, T2> > >::vertices_size_type \
|
|||
num_vertices(const Dual<T<T1, T2> >& darr) \
|
||||
{ return darr.number_of_vertices(); }
|
||||
|
||||
/*! Obtain the range of vertices of the given dual arrangement.
|
||||
/*! obtains the range of vertices of the given dual arrangement.
|
||||
* \param darr The dual arrangement.
|
||||
* \return A pair of vertex iterators.
|
||||
*/
|
||||
|
|
@ -506,7 +506,7 @@ vertices(const Dual<T<T1, T2> >& darr) \
|
|||
// Functions required by the EdgeListGraph concept:
|
||||
// ------------------------------------------------
|
||||
|
||||
/*! Obtain the number of edges in the given dual arrangement.
|
||||
/*! obtains the number of edges in the given dual arrangement.
|
||||
* \param darr The dual arrangement.
|
||||
* \return Number of halfedges in the primal arrangement.
|
||||
*/
|
||||
|
|
@ -516,7 +516,7 @@ typename boost::graph_traits<Dual<T<T1, T2> > >::edges_size_type \
|
|||
num_edges(const Dual<T<T1, T2> >& darr) \
|
||||
{ return darr.number_of_edges(); }
|
||||
|
||||
/*! Obtain the range of edges of the given dual arrangement.
|
||||
/*! obtains the range of edges of the given dual arrangement.
|
||||
* \param darr The dual arrangement.
|
||||
* \return A pair of edge iterators.
|
||||
*/
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -188,29 +188,29 @@ public:
|
|||
Halfedges_set m_halfedges;
|
||||
|
||||
public:
|
||||
/*! Default constructor. */
|
||||
/*! constructs default. */
|
||||
Curve_halfedges() {}
|
||||
|
||||
/*! Constructor from a given curve. */
|
||||
/*! constructs from a given curve. */
|
||||
Curve_halfedges(const Curve_2& curve) : Curve_2(curve) {}
|
||||
|
||||
using iterator = typename Halfedges_set::iterator;
|
||||
using const_iterator = typename Halfedges_set::const_iterator;
|
||||
|
||||
private:
|
||||
/*! Get the number of edges induced by the curve. */
|
||||
/*! obtains the number of edges induced by the curve. */
|
||||
Size size() const { return m_halfedges.size(); }
|
||||
|
||||
/*! Get an iterator for the first edge in the set (const version). */
|
||||
/*! obtains an iterator for the first edge in the set (const version). */
|
||||
const_iterator begin() const { return m_halfedges.begin(); }
|
||||
|
||||
/*! Get an iterator for the first edge in the set (non-const version). */
|
||||
/*! obtains an iterator for the first edge in the set (non-const version). */
|
||||
iterator begin() { return m_halfedges.begin(); }
|
||||
|
||||
/*! Get a past-the-end iterator for the set edges (const version). */
|
||||
/*! obtains a past-the-end iterator for the set edges (const version). */
|
||||
const_iterator end() const { return m_halfedges.end(); }
|
||||
|
||||
/*! Get a past-the-end iterator for the set edges (non-const version). */
|
||||
/*! obtains a past-the-end iterator for the set edges (non-const version). */
|
||||
iterator end() { return m_halfedges.end(); }
|
||||
|
||||
/*! Insert an edge to the set. */
|
||||
|
|
@ -220,17 +220,17 @@ public:
|
|||
return res.first;
|
||||
}
|
||||
|
||||
/*! Erase an edge, given by its position, from the set. */
|
||||
/*! erases an edge, given by its position, from the set. */
|
||||
void erase(iterator pos) { m_halfedges.erase(pos); }
|
||||
|
||||
/*! Erase an edge from the set. */
|
||||
/*! erases an edge from the set. */
|
||||
void _erase(Halfedge_handle he) {
|
||||
size_t res = m_halfedges.erase(he);
|
||||
if (res == 0) res = m_halfedges.erase(he->twin());
|
||||
CGAL_assertion(res != 0);
|
||||
}
|
||||
|
||||
/*! Cleat the edges set. */
|
||||
/*! cleats the edges set. */
|
||||
void clear() { m_halfedges.clear(); }
|
||||
};
|
||||
|
||||
|
|
@ -257,8 +257,7 @@ protected:
|
|||
virtual void after_create_edge(Halfedge_handle e) override
|
||||
{ _register_edge(e); }
|
||||
|
||||
/*!
|
||||
* Notification before the modification of an existing edge.
|
||||
/*! Notification before the modification of an existing edge.
|
||||
* \param e A handle to one of the twin halfedges to be updated.
|
||||
* \param c The x-monotone curve to be associated with the edge.
|
||||
*/
|
||||
|
|
@ -318,7 +317,7 @@ protected:
|
|||
|
||||
private:
|
||||
|
||||
/*! Register the given halfedge in the set(s) associated with its curve.
|
||||
/*! registers the given halfedge in the set(s) associated with its curve.
|
||||
*/
|
||||
void _register_edge(Halfedge_handle e) {
|
||||
for (auto di = e->curve().data().begin(); di != e->curve().data().end();
|
||||
|
|
@ -328,8 +327,7 @@ protected:
|
|||
}
|
||||
}
|
||||
|
||||
/*!
|
||||
* Unregister the given halfedge from the set(s) associated with its curve.
|
||||
/*! unregisters the given halfedge from the set(s) associated with its curve.
|
||||
*/
|
||||
void _unregister_edge(Halfedge_handle e) {
|
||||
for (auto di = e->curve().data().begin(); di != e->curve().data().end();
|
||||
|
|
@ -356,49 +354,49 @@ public:
|
|||
/// \name Constructors.
|
||||
//@{
|
||||
|
||||
/*! Default constructor. */
|
||||
/*! constructs default. */
|
||||
Arrangement_on_surface_with_history_2 ();
|
||||
|
||||
/*! Copy constructor. */
|
||||
/*! constructs copy. */
|
||||
Arrangement_on_surface_with_history_2 (const Self& arr);
|
||||
|
||||
/*! Constructor given a traits object. */
|
||||
/*! constructs from a traits object. */
|
||||
Arrangement_on_surface_with_history_2 (const Geometry_traits_2 *tr);
|
||||
//@}
|
||||
|
||||
/// \name Assignment functions.
|
||||
//@{
|
||||
|
||||
/*! Assignment operator. */
|
||||
/*! assigns. */
|
||||
Self& operator= (const Self& arr);
|
||||
|
||||
/*! Assign an arrangement with history. */
|
||||
/*! assigns an arrangement with history. */
|
||||
void assign (const Self& arr);
|
||||
//@}
|
||||
|
||||
/// \name Destruction functions.
|
||||
//@{
|
||||
|
||||
/*! Destructor. */
|
||||
/*! destructs. */
|
||||
virtual ~Arrangement_on_surface_with_history_2 ();
|
||||
|
||||
/*! Clear the arrangement. */
|
||||
/*! clears the arrangement. */
|
||||
virtual void clear ();
|
||||
//@}
|
||||
|
||||
/*! Access the geometry-traits object (const version). */
|
||||
/*! accesses the geometry-traits object (const version). */
|
||||
inline const Geometry_traits_2 * geometry_traits () const
|
||||
{
|
||||
return (this->m_geom_traits);
|
||||
}
|
||||
|
||||
/*! Access the topology-traits object (non-const version). */
|
||||
/*! accesses the topology-traits object (non-const version). */
|
||||
inline Topology_traits * topology_traits ()
|
||||
{
|
||||
return (&(this->m_topol_traits));
|
||||
}
|
||||
|
||||
/*! Access the topology-traits object (const version). */
|
||||
/*! accesses the topology-traits object (const version). */
|
||||
inline const Topology_traits* topology_traits () const
|
||||
{
|
||||
return (&(this->m_topol_traits));
|
||||
|
|
@ -488,8 +486,7 @@ public:
|
|||
/// \name Manipulating edges.
|
||||
//@{
|
||||
|
||||
/*!
|
||||
* Split a given edge into two at the given split point.
|
||||
/*! splits a given edge into two at the given split point.
|
||||
* \param e The edge to split (one of the pair of twin halfedges).
|
||||
* \param p The split point.
|
||||
* \pre p lies in the interior of the curve associated with e.
|
||||
|
|
@ -498,8 +495,7 @@ public:
|
|||
*/
|
||||
Halfedge_handle split_edge (Halfedge_handle e, const Point_2& p);
|
||||
|
||||
/*!
|
||||
* Merge two edges to form a single edge.
|
||||
/*! merges two edges to form a single edge.
|
||||
* \param e1 The first edge to merge (one of the pair of twin halfedges).
|
||||
* \param e2 The second edge to merge (one of the pair of twin halfedges).
|
||||
* \pre e1 and e2 must have a common end-vertex of degree 2 and must
|
||||
|
|
@ -508,8 +504,7 @@ public:
|
|||
*/
|
||||
Halfedge_handle merge_edge (Halfedge_handle e1, Halfedge_handle e2);
|
||||
|
||||
/*!
|
||||
* Check if two edges can be merged to a single edge.
|
||||
/*! checks if two edges can be merged to a single edge.
|
||||
* \param e1 The first edge (one of the pair of twin halfedges).
|
||||
* \param e2 The second edge (one of the pair of twin halfedges).
|
||||
* \return true iff e1 and e2 are mergeable.
|
||||
|
|
@ -521,8 +516,7 @@ protected:
|
|||
/// \name Curve insertion and deletion.
|
||||
//@{
|
||||
|
||||
/*!
|
||||
* Insert a curve into the arrangement.
|
||||
/*! inserts a curve into the arrangement.
|
||||
* \param cv The curve to be inserted.
|
||||
* \param pl a point-location object.
|
||||
* \return A handle to the inserted curve.
|
||||
|
|
@ -550,8 +544,7 @@ protected:
|
|||
return (--ch);
|
||||
}
|
||||
|
||||
/*!
|
||||
* Insert a curve into the arrangement, using the default point-location
|
||||
/*! inserts a curve into the arrangement, using the default point-location
|
||||
* strategy.
|
||||
* \param cv The curve to be inserted.
|
||||
* \return A handle to the inserted curve.
|
||||
|
|
@ -579,8 +572,7 @@ protected:
|
|||
return (--ch);
|
||||
}
|
||||
|
||||
/*!
|
||||
* Insert a range of curves into the arrangement.
|
||||
/*! inserts a range of curves into the arrangement.
|
||||
* \param begin An iterator pointing to the first curve in the range.
|
||||
* \param end A past-the-end iterator for the last curve in the range.
|
||||
*/
|
||||
|
|
@ -606,8 +598,7 @@ protected:
|
|||
CGAL::insert (base_arr, data_curves.begin(), data_curves.end());
|
||||
}
|
||||
|
||||
/*!
|
||||
* Remove a curve from the arrangement (remove all the edges it induces).
|
||||
/*! removes a curve from the arrangement (remove all the edges it induces).
|
||||
* \param ch A handle to the curve to be removed.
|
||||
* \return The number of removed edges.
|
||||
*/
|
||||
|
|
@ -650,8 +641,7 @@ protected:
|
|||
|
||||
public:
|
||||
|
||||
/*!
|
||||
* Set our arrangement to be the overlay the two given arrangements.
|
||||
/*! sets our arrangement to be the overlay the two given arrangements.
|
||||
* \param arr1 The first arrangement.
|
||||
* \param arr2 The second arrangement.
|
||||
* \param overlay_tr An overlay-traits class.
|
||||
|
|
@ -770,8 +760,7 @@ public:
|
|||
// Global insertion, removal and overlay functions.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
/*!
|
||||
* Insert a curve into the arrangement (incremental insertion).
|
||||
/*! inserts a curve into the arrangement (incremental insertion).
|
||||
* The inserted curve may not necessarily be x-monotone and may intersect the
|
||||
* existing arrangement.
|
||||
* \param arr The arrangement-with-history object.
|
||||
|
|
@ -793,8 +782,7 @@ insert (Arrangement_on_surface_with_history_2<GeomTraits,TopTraits>& arr,
|
|||
return (arr_access.insert_curve (c, pl));
|
||||
}
|
||||
|
||||
/*!
|
||||
* Insert a curve into the arrangement (incremental insertion).
|
||||
/*! inserts a curve into the arrangement (incremental insertion).
|
||||
* The inserted curve may not necessarily be x-monotone and may intersect the
|
||||
* existing arrangement. The default "walk" point-location strategy is used
|
||||
* for inserting the curve.
|
||||
|
|
@ -816,8 +804,7 @@ insert (Arrangement_on_surface_with_history_2<GeomTraits,TopTraits>& arr,
|
|||
}
|
||||
|
||||
|
||||
/*!
|
||||
* Insert a range of curves into the arrangement (aggregated insertion).
|
||||
/*! inserts a range of curves into the arrangement (aggregated insertion).
|
||||
* The inserted curves may intersect one another and may also intersect the
|
||||
* existing arrangement.
|
||||
* \param arr The arrangement-with-history object.
|
||||
|
|
@ -836,8 +823,7 @@ void insert (Arrangement_on_surface_with_history_2<GeomTraits, TopTraits>& arr,
|
|||
arr_access.insert_curves (begin, end);
|
||||
}
|
||||
|
||||
/*!
|
||||
* Remove a curve from the arrangement (remove all the edges it induces).
|
||||
/*! removes a curve from the arrangement (remove all the edges it induces).
|
||||
* \param ch A handle to the curve to be removed.
|
||||
* \return The number of removed edges.
|
||||
*/
|
||||
|
|
@ -855,8 +841,7 @@ remove_curve(Arrangement_on_surface_with_history_2<GeomTraits, TopTraits>& arr,
|
|||
return (arr_access.remove_curve (ch));
|
||||
}
|
||||
|
||||
/*!
|
||||
* Compute the overlay of two input arrangement.
|
||||
/*! computes the overlay of two input arrangement.
|
||||
* \param arr1 The first arrangement.
|
||||
* \param arr2 The second arrangement.
|
||||
* \param res Output: The resulting arrangement.
|
||||
|
|
@ -880,8 +865,7 @@ overlay (const Arrangement_on_surface_with_history_2<GeomTraits, TopTraits1>&
|
|||
res._overlay (arr1, arr2, ovl_traits);
|
||||
}
|
||||
|
||||
/*!
|
||||
* Compute the overlay of two input arrangement.
|
||||
/*! computes the overlay of two input arrangement.
|
||||
* \param arr1 The first arrangement.
|
||||
* \param arr2 The second arrangement.
|
||||
* \param res Output: The resulting arrangement.
|
||||
|
|
|
|||
|
|
@ -128,17 +128,17 @@ public:
|
|||
/// \name Constructors.
|
||||
//@{
|
||||
|
||||
/*! Default constructor. */
|
||||
/*! constructs default. */
|
||||
Arrangement_with_history_2 () :
|
||||
Base ()
|
||||
{}
|
||||
|
||||
/*! Copy constructor (from a base arrangement). */
|
||||
/*! constructs copy (from a base arrangement). */
|
||||
Arrangement_with_history_2 (const Base & base) :
|
||||
Base (base)
|
||||
{}
|
||||
|
||||
/*! Constructor given a traits object. */
|
||||
/*! constructs from a traits object. */
|
||||
Arrangement_with_history_2 (const Traits_2 * tr) :
|
||||
Base (tr)
|
||||
{}
|
||||
|
|
@ -147,14 +147,14 @@ public:
|
|||
/// \name Assignment functions.
|
||||
//@{
|
||||
|
||||
/*! Assignment operator (from a base arrangement). */
|
||||
/*! assigns (from a base arrangement). */
|
||||
Self& operator= (const Base & base)
|
||||
{
|
||||
Base::assign (base);
|
||||
return (*this);
|
||||
}
|
||||
|
||||
/*! Assign an arrangement. */
|
||||
/*! assigns an arrangement. */
|
||||
void assign (const Base & base)
|
||||
{
|
||||
Base::assign (base);
|
||||
|
|
@ -165,13 +165,13 @@ public:
|
|||
///! \name Specialized access methods.
|
||||
//@{
|
||||
|
||||
/*! Get the geometry-traits class (for backward compatibility). */
|
||||
/*! obtains the geometry-traits class (for backward compatibility). */
|
||||
const Traits_2 * traits () const
|
||||
{
|
||||
return (this->geometry_traits());
|
||||
}
|
||||
|
||||
/*! Get the number of vertices at infinity. */
|
||||
/*! obtains the number of vertices at infinity. */
|
||||
Size number_of_vertices_at_infinity () const
|
||||
{
|
||||
// The vertices at infinity are valid, but not concrete:
|
||||
|
|
@ -179,7 +179,7 @@ public:
|
|||
this->topology_traits()->number_of_concrete_vertices());
|
||||
}
|
||||
|
||||
/*! Get the number of unbounded faces. */
|
||||
/*! obtains the number of unbounded faces. */
|
||||
Size number_of_unbounded_faces () const
|
||||
{
|
||||
typename Base::Face_const_iterator fit = this->faces_begin();
|
||||
|
|
@ -196,7 +196,7 @@ public:
|
|||
return (n_unb);
|
||||
}
|
||||
|
||||
/*! Get the unbounded face (non-const version). */
|
||||
/*! obtains the unbounded face (non-const version). */
|
||||
Face_handle unbounded_face ()
|
||||
{
|
||||
// The fictitious un_face contains all other valid faces in a single
|
||||
|
|
@ -216,7 +216,7 @@ public:
|
|||
return (Face_handle (p_oc->face()));
|
||||
}
|
||||
|
||||
/*! Get the unbounded face (const version). */
|
||||
/*! obtains the unbounded face (const version). */
|
||||
Face_const_handle unbounded_face () const
|
||||
{
|
||||
// The fictitious un_face contains all other valid faces in a single
|
||||
|
|
|
|||
|
|
@ -173,7 +173,7 @@ protected:
|
|||
X_monotone_curve_2 m_sub_cv2; // Auxiliary variable (for curve split).
|
||||
|
||||
public:
|
||||
/*! Constructor.
|
||||
/*! constructs.
|
||||
* \param _arr The arrangement for which we compute the zone.
|
||||
* \param _visitor A pointer to a zone-visitor object.
|
||||
*/
|
||||
|
|
@ -191,7 +191,7 @@ public:
|
|||
visitor->init(&arr);
|
||||
}
|
||||
|
||||
/*! Initialize the zone-computation process with a given curve.
|
||||
/*! initializes the zone-computation process with a given curve.
|
||||
* \param _cv The query curve.
|
||||
* \param pl A point-location object associated with the arrangement.
|
||||
*/
|
||||
|
|
@ -242,7 +242,7 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
/*! Initialize the zone-computation process with a given curve and an object
|
||||
/*! initializes the zone-computation process with a given curve and an object
|
||||
* that wraps the location of the curve's left end.
|
||||
* \param cv The query curve.
|
||||
* \param obj An object that represents the location of the left end of the
|
||||
|
|
@ -250,13 +250,13 @@ public:
|
|||
*/
|
||||
void init_with_hint(const X_monotone_curve_2& cv, Pl_result_type obj);
|
||||
|
||||
/*! Compute the zone of the given curve and issue the appropriate
|
||||
/*! computes the zone of the given curve and issue the appropriate
|
||||
* notifications for the visitor.
|
||||
*/
|
||||
void compute_zone();
|
||||
|
||||
private:
|
||||
/*! Check whether two curves with a common endpoint overlap.
|
||||
/*! checks whether two curves with a common endpoint overlap.
|
||||
* \pre p == min_point(cv1)
|
||||
* \pre p == min_point(cv2)
|
||||
* \todo move this function to a more accessible place so that it can be reused
|
||||
|
|
@ -265,7 +265,7 @@ private:
|
|||
const Point_2& p) const
|
||||
{ return do_overlap_impl(cv1, cv2, p, Are_all_sides_oblivious_category()); }
|
||||
|
||||
/*! Check whether two curves with a common min endpoint overlap.
|
||||
/*! checks whether two curves with a common min endpoint overlap.
|
||||
*/
|
||||
bool do_overlap_impl(const X_monotone_curve_2& cv1,
|
||||
const X_monotone_curve_2& cv2,
|
||||
|
|
@ -273,13 +273,13 @@ private:
|
|||
return m_geom_traits->compare_y_at_x_right_2_object()(cv1, cv2, p) == EQUAL;
|
||||
}
|
||||
|
||||
/*! Check whether two curves with a common min endpoint overlap.
|
||||
/*! checks whether two curves with a common min endpoint overlap.
|
||||
*/
|
||||
bool do_overlap_impl(const X_monotone_curve_2& cv1,
|
||||
const X_monotone_curve_2& cv2,
|
||||
const Point_2& p, Arr_not_all_sides_oblivious_tag) const;
|
||||
|
||||
/*! Find a face containing the query curve m_cv around the given vertex.
|
||||
/*! finds a face containing the query curve m_cv around the given vertex.
|
||||
* In case an overlap occurs, sets m_intersect_he to be the overlapping edge.
|
||||
* \param v The query vertex.
|
||||
* \param he Output: The predecessor of m_cv around the vertex.
|
||||
|
|
@ -288,7 +288,7 @@ private:
|
|||
*/
|
||||
bool _find_prev_around_vertex(Vertex_handle v, Halfedge_handle& he);
|
||||
|
||||
/*! Direct the halfedge for the location of the given subcurve around a split
|
||||
/*! directs the halfedge for the location of the given subcurve around a split
|
||||
* point that occurs in the interior of a given edge, when the subcurve lies
|
||||
* to the right of the split point.
|
||||
* In case of overlaps, it sets also m_found_overlap and m_intersect_he.
|
||||
|
|
@ -306,7 +306,7 @@ private:
|
|||
const Point_2& cv_left_pt,
|
||||
Halfedge_handle query_he);
|
||||
|
||||
/*! Direct the halfedge for the location of the given subcurve around a split
|
||||
/*! directs the halfedge for the location of the given subcurve around a split
|
||||
* point that occurs in the interior of a given edge, when the subcurve lies
|
||||
* to the left of the split point.
|
||||
* \param cv_ins The curve to be inserted, whose right endpoint coincides
|
||||
|
|
@ -321,7 +321,7 @@ private:
|
|||
_direct_intersecting_edge_to_left(const X_monotone_curve_2& cv_ins,
|
||||
Halfedge_handle query_he);
|
||||
|
||||
/*! Get the next intersection of m_cv with the given halfedge.
|
||||
/*! obtains the next intersection of m_cv with the given halfedge.
|
||||
* \param he A handle to the halfedge.
|
||||
* \param skip_first_point Should we skip the first intersection point.
|
||||
* \param intersect_on_right_boundary Output: If an intersetion point is
|
||||
|
|
@ -339,14 +339,14 @@ private:
|
|||
bool skip_first_point,
|
||||
Arr_parameter_space& intersection_location);
|
||||
|
||||
/*! Remove the next intersection of m_cv with the given halfedge from the map.
|
||||
/*! removes the next intersection of m_cv with the given halfedge from the map.
|
||||
* \param he A handle to the halfedge.
|
||||
* \pre The list of intersections with the curve of he has already been
|
||||
* computed, and it is not empty.
|
||||
*/
|
||||
void _remove_next_intersection(Halfedge_handle he);
|
||||
|
||||
/*! Check whether the given point lies completely to the left of the given
|
||||
/*! checks whether the given point lies completely to the left of the given
|
||||
* edge.
|
||||
* \param p The point.
|
||||
* \param he The halfedge.
|
||||
|
|
@ -370,7 +370,7 @@ private:
|
|||
bool _is_to_left_impl(const Point_2& p, Halfedge_handle he,
|
||||
Arr_not_all_sides_oblivious_tag) const;
|
||||
|
||||
/*! Check whether the given point lies completely to the right of the given
|
||||
/*! checks whether the given point lies completely to the right of the given
|
||||
* edge.
|
||||
* \param p The point.
|
||||
* \param he The halfedge.
|
||||
|
|
@ -394,7 +394,7 @@ private:
|
|||
bool _is_to_right_impl(const Point_2& p, Halfedge_handle he,
|
||||
Arr_not_all_sides_oblivious_tag) const;
|
||||
|
||||
/*! Check whether an intersection point is valid. A valid intersection point
|
||||
/*! checks whether an intersection point is valid. A valid intersection point
|
||||
* must be to the left of the left end of the curve involved.
|
||||
*/
|
||||
bool is_intersection_valid(const Point_2& ip,
|
||||
|
|
@ -415,14 +415,14 @@ private:
|
|||
Arr_parameter_space& intersection_location,
|
||||
Arr_boundary_cond_tag) const;
|
||||
|
||||
/*! Compute the (lexicographically) leftmost intersection of the query
|
||||
/*! computes the (lexicographically) leftmost intersection of the query
|
||||
* curve with a given halfedge on the boundary of a face in the arrangement.
|
||||
*/
|
||||
void
|
||||
_leftmost_intersection(Ccb_halfedge_circulator he_curr, bool on_boundary,
|
||||
Arr_parameter_space& leftmost_location);
|
||||
|
||||
/*! Compute the (lexicographically) leftmost intersection of the query
|
||||
/*! computes the (lexicographically) leftmost intersection of the query
|
||||
* curve with the boundary of a given face in the arrangement.
|
||||
* The function computes sets m_intersect_p, m_intersect_he (or alternatively
|
||||
* m_overlap_cv and m_intersect_he) and set the flags m_found_intersect and
|
||||
|
|
@ -434,7 +434,7 @@ private:
|
|||
void _leftmost_intersection_with_face_boundary(Face_handle face,
|
||||
bool on_boundary);
|
||||
|
||||
/*! Compute the zone of an x-monotone curve in a given arrangement face.
|
||||
/*! computes the zone of an x-monotone curve in a given arrangement face.
|
||||
* The left endpoint of the curve either lies in the face interior or on
|
||||
* the boundary of the face.
|
||||
* This function updates m_cv and its left endpoint and also sets m_left_v
|
||||
|
|
@ -451,7 +451,7 @@ private:
|
|||
*/
|
||||
bool _zone_in_face(Face_handle face, bool on_boundary);
|
||||
|
||||
/*! Compute the zone of an overlapping subcurve m_overlap_cv of m_cv and the
|
||||
/*! computes the zone of an overlapping subcurve m_overlap_cv of m_cv and the
|
||||
* curve currently associated with m_intersect_he.
|
||||
* This function updates m_cv and its left endpoint and also sets m_left_v
|
||||
* and m_left_he for the remaining portion of the curve.
|
||||
|
|
|
|||
|
|
@ -65,48 +65,48 @@ protected:
|
|||
|
||||
public:
|
||||
|
||||
/*! Default constructor.*/
|
||||
/*! constructs default.*/
|
||||
Arr_text_formatter():
|
||||
m_out(nullptr),
|
||||
m_in(nullptr)
|
||||
{}
|
||||
|
||||
/*! Construct an output formatter. */
|
||||
/*! constructs an output formatter. */
|
||||
Arr_text_formatter(std::ostream& os) :
|
||||
m_out(&os),
|
||||
m_in(nullptr)
|
||||
{}
|
||||
|
||||
/*! Construct an input formatter. */
|
||||
/*! constructs an input formatter. */
|
||||
Arr_text_formatter(std::istream& is) :
|
||||
m_out(nullptr),
|
||||
m_in(&is)
|
||||
{}
|
||||
|
||||
/*! Destructor. */
|
||||
/*! destructs. */
|
||||
virtual ~Arr_text_formatter()
|
||||
{}
|
||||
|
||||
/*! Set the output stream. */
|
||||
/*! sets the output stream. */
|
||||
void set_out(std::ostream& os)
|
||||
{
|
||||
m_out = &os;
|
||||
}
|
||||
|
||||
/*! Set the input stream. */
|
||||
/*! sets the input stream. */
|
||||
void set_in(std::istream& is)
|
||||
{
|
||||
m_in = &is;
|
||||
}
|
||||
|
||||
/*! Get the output stream. */
|
||||
/*! obtains the output stream. */
|
||||
inline std::ostream& out()
|
||||
{
|
||||
CGAL_assertion(m_out != nullptr);
|
||||
return (*m_out);
|
||||
}
|
||||
|
||||
/*! Get the input stream. */
|
||||
/*! obtains the input stream. */
|
||||
inline std::istream& in()
|
||||
{
|
||||
CGAL_assertion(m_in != nullptr);
|
||||
|
|
@ -116,7 +116,7 @@ public:
|
|||
/// \name Global write functions.
|
||||
//@{
|
||||
|
||||
/*! Write a begin-arrangement comment. */
|
||||
/*! writes a begin-arrangement comment. */
|
||||
void write_arrangement_begin()
|
||||
{
|
||||
CGAL_assertion(m_out != nullptr);
|
||||
|
|
@ -125,51 +125,51 @@ public:
|
|||
_write_comment("BEGIN ARRANGEMENT");
|
||||
}
|
||||
|
||||
/*! Write an end-arrangement comment. */
|
||||
/*! writes an end-arrangement comment. */
|
||||
void write_arrangement_end()
|
||||
{
|
||||
_write_comment("END ARRANGEMENT");
|
||||
set_mode(*m_out, m_old_out_mode);
|
||||
}
|
||||
|
||||
/*! Write a labeled size value. */
|
||||
/*! writes a labeled size value. */
|
||||
void write_size(const char *label, Size size)
|
||||
{
|
||||
_write_comment(label);
|
||||
out() << size << '\n';
|
||||
}
|
||||
|
||||
/*! Write a begin-vertices comment. */
|
||||
/*! writes a begin-vertices comment. */
|
||||
void write_vertices_begin()
|
||||
{
|
||||
_write_comment("BEGIN VERTICES");
|
||||
}
|
||||
|
||||
/*! Write an end-vertices comment. */
|
||||
/*! writes an end-vertices comment. */
|
||||
void write_vertices_end()
|
||||
{
|
||||
_write_comment("END VERTICES");
|
||||
}
|
||||
|
||||
/*! Write a begin-edges comment. */
|
||||
/*! writes a begin-edges comment. */
|
||||
void write_edges_begin()
|
||||
{
|
||||
_write_comment("BEGIN EDGES");
|
||||
}
|
||||
|
||||
/*! Write an end-edges comment. */
|
||||
/*! writes an end-edges comment. */
|
||||
void write_edges_end()
|
||||
{
|
||||
_write_comment("END EDGES");
|
||||
}
|
||||
|
||||
/*! Write a begin-faces comment. */
|
||||
/*! writes a begin-faces comment. */
|
||||
void write_faces_begin()
|
||||
{
|
||||
_write_comment("BEGIN FACES");
|
||||
}
|
||||
|
||||
/*! Write an end-faces comment. */
|
||||
/*! writes an end-faces comment. */
|
||||
void write_faces_end()
|
||||
{
|
||||
_write_comment("END FACES");
|
||||
|
|
@ -273,7 +273,7 @@ public:
|
|||
/// \name Global read functions.
|
||||
//@{
|
||||
|
||||
/*! Start reading an arrangement. */
|
||||
/*! starts reading an arrangement. */
|
||||
void read_arrangement_begin()
|
||||
{
|
||||
CGAL_assertion(m_in != nullptr);
|
||||
|
|
@ -282,14 +282,14 @@ public:
|
|||
_skip_comments();
|
||||
}
|
||||
|
||||
/*! Read the arrangement edge. */
|
||||
/*! reads the arrangement edge. */
|
||||
void read_arrangement_end()
|
||||
{
|
||||
_skip_comments();
|
||||
set_mode(*m_in, m_old_in_mode);
|
||||
}
|
||||
|
||||
/*! Read a size value (with a label comment line before it). */
|
||||
/*! reads a size value (with a label comment line before it). */
|
||||
Size read_size(const char* /* title */ = nullptr)
|
||||
{
|
||||
std::size_t val;
|
||||
|
|
@ -301,7 +301,7 @@ public:
|
|||
return (val);
|
||||
}
|
||||
|
||||
/*! Reading the arrangement vertices. */
|
||||
/*! reads the arrangement vertices. */
|
||||
void read_vertices_begin()
|
||||
{
|
||||
_skip_comments();
|
||||
|
|
@ -312,7 +312,7 @@ public:
|
|||
_skip_comments();
|
||||
}
|
||||
|
||||
/*! Reading the arrangement edges. */
|
||||
/*! reads the arrangement edges. */
|
||||
void read_edges_begin()
|
||||
{
|
||||
_skip_comments();
|
||||
|
|
@ -323,7 +323,7 @@ public:
|
|||
_skip_comments();
|
||||
}
|
||||
|
||||
/*! Reading the arrangement faces. */
|
||||
/*! reads the arrangement faces. */
|
||||
void read_faces_begin()
|
||||
{
|
||||
_skip_comments();
|
||||
|
|
@ -431,13 +431,13 @@ public:
|
|||
|
||||
protected:
|
||||
|
||||
/*! Write a comment line. */
|
||||
/*! writes a comment line. */
|
||||
void _write_comment(const char *str)
|
||||
{
|
||||
out() << "# " << str << std::endl;
|
||||
}
|
||||
|
||||
/*! Skip until end of line. */
|
||||
/*! skips until end of line. */
|
||||
void _skip_until_EOL()
|
||||
{
|
||||
CGAL_assertion(m_in != nullptr);
|
||||
|
|
@ -446,7 +446,7 @@ protected:
|
|||
while ((c = m_in->get()) != EOF && c != '\n') {};
|
||||
}
|
||||
|
||||
/*! Skip comment lines. */
|
||||
/*! skips comment lines. */
|
||||
void _skip_comments()
|
||||
{
|
||||
CGAL_assertion(m_in != nullptr);
|
||||
|
|
@ -492,28 +492,28 @@ public:
|
|||
typedef typename Base::Halfedge_const_handle Halfedge_const_handle;
|
||||
typedef typename Base::Face_const_handle Face_const_handle;
|
||||
|
||||
/*! Default constructor.*/
|
||||
/*! constructs default.*/
|
||||
Arr_face_extended_text_formatter() :
|
||||
Base()
|
||||
{}
|
||||
|
||||
/*! Construct an output formatter. */
|
||||
/*! constructs an output formatter. */
|
||||
Arr_face_extended_text_formatter(std::ostream& os) :
|
||||
Base(os)
|
||||
{}
|
||||
|
||||
/*! Construct an input formatter. */
|
||||
/*! constructs an input formatter. */
|
||||
Arr_face_extended_text_formatter(std::istream& is) :
|
||||
Base(is)
|
||||
{}
|
||||
|
||||
/*! Write the auxiliary data associated with the given face. */
|
||||
/*! writes the auxiliary data associated with the given face. */
|
||||
virtual void write_face_data(Face_const_handle f)
|
||||
{
|
||||
this->out() << f->data() << '\n';
|
||||
}
|
||||
|
||||
/*! Read a face-data object and attach it to the given face. */
|
||||
/*! reads a face-data object and attach it to the given face. */
|
||||
virtual void read_face_data(Face_handle f)
|
||||
{
|
||||
this->in() >> f->data();
|
||||
|
|
@ -548,20 +548,20 @@ public:
|
|||
typedef typename Base::Halfedge_const_handle Halfedge_const_handle;
|
||||
typedef typename Base::Face_const_handle Face_const_handle;
|
||||
|
||||
/*! Default constructor.*/
|
||||
/*! constructs default.*/
|
||||
Arr_extended_dcel_text_formatter() : Base() {}
|
||||
|
||||
/*! Construct an output formatter. */
|
||||
/*! constructs an output formatter. */
|
||||
Arr_extended_dcel_text_formatter(std::ostream& os) : Base(os) {}
|
||||
|
||||
/*! Construct an input formatter. */
|
||||
/*! constructs an input formatter. */
|
||||
Arr_extended_dcel_text_formatter(std::istream& is) : Base(is) {}
|
||||
|
||||
/*! Write the auxiliary data associated with the given vertex. */
|
||||
/*! write the auxiliary data associated with the given vertex. */
|
||||
virtual void write_vertex_data(Vertex_const_handle v)
|
||||
{ this->out() << '\n' << v->data(); }
|
||||
|
||||
/*! Read a vertex-data object and attach it to the given vertex. */
|
||||
/*! reads a vertex-data object and attach it to the given vertex. */
|
||||
virtual void read_vertex_data(Vertex_handle v) {
|
||||
using Vertex = typename Arrangement_2::Vertex;
|
||||
using Type = decltype(std::declval<Vertex>().data());
|
||||
|
|
@ -572,11 +572,11 @@ public:
|
|||
this->_skip_until_EOL();
|
||||
}
|
||||
|
||||
/*! Write the auxiliary data associated with the given halfedge. */
|
||||
/*! writes the auxiliary data associated with the given halfedge. */
|
||||
virtual void write_halfedge_data(Halfedge_const_handle he)
|
||||
{ this->out() << '\n' << he->data(); }
|
||||
|
||||
/*! Read a halfedge-data object and attach it to the given halfedge. */
|
||||
/*! reads a halfedge-data object and attach it to the given halfedge. */
|
||||
virtual void read_halfedge_data(Halfedge_handle he) {
|
||||
using Halfedge = typename Arrangement_2::Halfedge;
|
||||
using Type = decltype(std::declval<Halfedge>().data());
|
||||
|
|
@ -587,11 +587,11 @@ public:
|
|||
this->_skip_until_EOL();
|
||||
}
|
||||
|
||||
/*! Write the auxiliary data associated with the given face. */
|
||||
/*! writes the auxiliary data associated with the given face. */
|
||||
virtual void write_face_data(Face_const_handle f)
|
||||
{ this->out() << f->data() << '\n'; }
|
||||
|
||||
/*! Read a face-data object and attach it to the given face. */
|
||||
/*! reads a face-data object and attach it to the given face. */
|
||||
virtual void read_face_data(Face_handle f) {
|
||||
using Face = typename Arrangement_2::Face;
|
||||
using Type = decltype(std::declval<Face>().data());
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue