Merge remote-tracking branch 'cgal/master' into Kernel_23-Fix_dangling_ref_in_CC3-GF

This commit is contained in:
Mael Rouxel-Labbé 2025-03-27 12:28:35 +01:00
commit 0c35489bbe
245 changed files with 8836 additions and 7095 deletions

View File

@ -23,26 +23,25 @@ namespace CGAL {
template <typename Arrangement>
class Aos_observer {
public:
/// \name Types
/// @{
//! the type of the associated arrangement.
/// the type of the associated arrangement.
typedef unspecified_type Arrangement_2;
//! the point type.
/// the point type.
typedef typename Arrangement_2::Point_2 Point_2;
//! the \f$x\f$-monotone curve type.
/// the \f$x\f$-monotone curve type.
typedef typename Arrangement_2::X_monotone_curve_2 X_monotone_curve_2;
//! the type of a handle to an arrangement vertex.
/// the type of a handle to an arrangement vertex.
typedef typename Arrangement_2::Vertex_handle Vertex_handle;
//! the type of a handle to an arrangement halfedge.
/// the type of a handle to an arrangement halfedge.
typedef typename Arrangement_2::Halfedge_handle Halfedge_handle;
//! the type of a handle to an arrangement face.
/// the type of a handle to an arrangement face.
typedef typename Arrangement_2::Face_handle Face_handle;
/*! represents a connected component of the boundary (CCB), either an outer
@ -77,11 +76,11 @@ public:
/// \name Notifications on Global Arrangement Operations
/// @{
/*! issued just before the attached arrangement is assigned with the contents of another
* arrangement.
* \param arr The other arrangement. Notice that the arrangement type is the type used to
* instantiate the observer, which is conveniently defined as
* `Arrangement_2::Base_aos`.
/*! issued just before the attached arrangement is assigned with the contents
* of another arrangement.
* \param arr The other arrangement. Notice that the arrangement type is the
* type used to instantiate the observer, which is conveniently
* defined as `Arrangement_2::Base_aos`.
*/
virtual void before_assign(const typename Arrangement_2::Base_aos& arr);
@ -419,6 +418,6 @@ public:
virtual void after_remove_inner_ccb(Face_handle f);
/// @}
}; /* end Aos_observer */
} /* end namespace CGAL */

View File

@ -1,303 +1,265 @@
namespace CGAL {
/*!
\ingroup PkgArrangementOnSurface2TraitsClasses
/*! \ingroup PkgArrangementOnSurface2TraitsClasses
*
* The traits class `Arr_Bezier_curve_traits_2` is a model of the `AosTraits_2`
* concept that handles planar B&eacute;zier curves. A planar <I>B&eacute;zier
* curve</I> \f$B\f$ is a parametric curve defined by a sequence of <I>control
* points</I> \f$p_0, \ldots, p_n\f$ as follows:
The traits class `Arr_Bezier_curve_traits_2` is a model of the `ArrangementTraits_2`
concept that handles planar B&eacute;zier curves. A planar <I>B&eacute;zier curve</I>
\f$ B\f$ is a parametric curve defined by a sequence of <I>control points</I>
\f$ p_0, \ldots, p_n\f$ as follows:
\f{eqnarray*}{
B(t) = \left(X(t), Y(t)\right)
= \ccSum{k=0}{n}{p_k \cdot \frac{n!}{k! (n-k)!} \cdot
t^k (1-t)^{n-k}}\ .
* \f{eqnarray*}{
* B(t) = \left(X(t), Y(t)\right) = \ccSum{k=0}{n}{p_k \cdot \frac{n!}{k! (n-k)!} \cdot t^k (1-t)^{n-k}}\ ,
\f}
where \f$ t \in [0, 1]\f$. The degree of the curve is therefore \f$ n\f$ -
namely, \f$ X(t)\f$ and \f$ Y(t)\f$ are polynomials of degree \f$ n\f$. B&eacute;zier curves
have numerous applications in computer graphics and solid modelling. They
are used, for example, in free-form sketches and for defining the true-type
fonts.
* where \f$t \in [0, 1]\f$. The degree of the curve is therefore \f$n\f$,
* namely, \f$X(t)\f$ and \f$Y(t)\f$ are polynomials of degree \f$n\f$.
* B&eacute;zier curves have numerous applications in computer graphics and
* solid modelling. They are used, for example, in free-form sketches and for
* defining the true-type fonts.
In our representation, we assume that the coordinates of all control
points are rational numbers (namely they are given as objects of the
`RatKernel::Point_2` type), so both \f$ X(t)\f$ and \f$ Y(t)\f$ are polynomials
with rational coefficients. The intersection points between curves are
however algebraic numbers, and their exact computation is time-consuming.
The traits class therefore contains a layer of geometric filtering that
performs all computation in an approximate manner whenever possible, and
it resorts to exact computations only when the approximate computation
fails to produce an unambiguous result.
* In our representation, we assume that the coordinates of all control points
* are rational numbers (namely they are given as objects of the
* `RatKernel::Point_2` type), so both \f$X(t)\f$ and \f$Y(t)\f$ are
* polynomials with rational coefficients. The intersection points between
* curves are however algebraic numbers, and their exact computation is
* time-consuming. The traits class therefore contains a layer of geometric
* filtering that performs all computation in an approximate manner whenever
* possible, and it resorts to exact computations only when the approximate
* computation fails to produce an unambiguous result.
We therefore require separate representations of the control points and
the intersection points. The `NtTraits` should be instantiated with a class
that defines nested `Integer`, `Rational` and `Algebraic` number
types and supports various operations on them, yielding certified computation
results (for example, in can convert rational numbers to algebraic numbers
and can compute roots of polynomials with integer coefficients).
The other template parameters, `RatKernel` and `AlgKernel` should be
geometric kernels templated with the `NtTraits::Rational` and
`NtTraits::Algebraic` number types, respectively. It is recommended to
instantiate the `CORE_algebraic_number_traits` class as the `NtTraits`
parameter, with `Cartesian<NtTraits::Rational>` and
`Cartesian<NtTraits::Algebraic>` instantiating the two kernel types,
respectively. The number types in this case are provided by the \core
library, with its ability to exactly represent simple algebraic numbers.
* We therefore require separate representations of the control points and the
* intersection points. The `NtTraits` should be instantiated with a class that
* defines nested `Integer`, `Rational` and `Algebraic` number types and
* supports various operations on them, yielding certified computation results
* (for example, in can convert rational numbers to algebraic numbers and can
* compute roots of polynomials with integer coefficients). The other template
* parameters, `RatKernel` and `AlgKernel` should be geometric kernels templated
* with the `NtTraits::Rational` and `NtTraits::Algebraic` number types,
* respectively. It is recommended to instantiate the
* `CORE_algebraic_number_traits` class as the `NtTraits` parameter, with
* `Cartesian<NtTraits::Rational>` and `Cartesian<NtTraits::Algebraic>`
* instantiating the two kernel types, respectively. The number types in this
* case are provided by the \core library, with its ability to exactly represent
* simple algebraic numbers.
While `Arr_Bezier_curve_traits_2` models the concept
`ArrangementDirectionalXMonotoneTraits_2`, the implementation of
the `Are_mergeable_2` operation does not enforce the input curves
to have the same direction as a precondition. Moreover, `Arr_Bezier_curve_traits_2`
supports the merging of curves of opposite directions.
\cgalModels{ArrangementTraits_2,ArrangementDirectionalXMonotoneTraits_2}
*/
template< typename RatKernel, typename AlgKernel, typename NtTraits >
* While `Arr_Bezier_curve_traits_2` models the concept
* `AosDirectionalXMonotoneTraits_2`, the implementation of the
* `Are_mergeable_2` operation does not enforce the input curves to have the
* same direction as a precondition. Moreover, `Arr_Bezier_curve_traits_2`
* supports the merging of curves of opposite directions.
*
* \cgalModels{AosTraits_2,AosDirectionalXMonotoneTraits_2}
*/
template <typename RatKernel, typename AlgKernel, typename NtTraits>
class Arr_Bezier_curve_traits_2 {
public:
/// \name Types
/// @{
/// \name Types
/// @{
/*!
the `NtTraits::Rational` type
(and also the `RatKernel::FT` type).
*/
typedef unspecified_type Rational;
/*! the `NtTraits::Rational` type (and also the `RatKernel::FT` type).
*/
typedef unspecified_type Rational;
/*!
the `NtTraits::Algebraic` type
(and also the `AlgKernel::FT` type).
*/
typedef unspecified_type Algebraic;
/*! the `NtTraits::Algebraic` type (and also the `AlgKernel::FT` type).
*/
typedef unspecified_type Algebraic;
/// @}
/// @}
/*! The `Curve_2` class nested within the B&eacute;zier traits class is used
* to represent a B&eacute;zier curve of arbitrary degree, which is defined by
* a sequence of rational control points. In addition to the methods listed
* below, the I/O operators \link PkgArrangementOnSurface2op_left_shift
* `operator<<` \endlink and \link PkgArrangementOnSurface2op_right_shift
* `operator>>` \endlink for standard output-streams are also supported. The
* copy constructor and assignment operator are supported as well.
*/
class Curve_2 {
public:
/*!
/// \name Creation
/// @{
/*! default constructor.
*/
Curve_2();
The `Curve_2` class nested within the B&eacute;zier traits class is used
to represent a B&eacute;zier curve of arbitrary degree, which is defined by a
sequence of rational control points. In addition to the methods listed
below, the I/O operators \link PkgArrangementOnSurface2op_left_shift `operator<<` \endlink and \link PkgArrangementOnSurface2op_right_shift `operator>>` \endlink for
standard output-streams are also supported. The copy constructor and
assignment operator are supported as well.
/*! constructs a B&eacute;zier curve as defined by the given range of
* control points. The value-type of `InputIterator` is
* `RatKernel::Point_2`.
*
* \pre The input range must contain at least two control points.
*/
template <typename InputIterator>
Curve_2(InputIterator pts_begin, InputIterator pts_end);
*/
class Curve_2 {
public:
/// @}
/// \name Creation
/// @{
/// \name Access Functions
/// @{
/*!
default constructor.
*/
Curve_2 ();
/*! returns the number of control points that define `B`.
*/
std::size_t number_of_control_points() const;
/*!
constructs a B&eacute;zier curve as defined by the given range of control
points. The value-type of `InputIterator` is `RatKernel::Point_2`.
\pre The input range must contain at least two control points.
/*! returns the \f$k\f$th control point. Note that the first control point
* equals the curve source, while the last control point equals its
* target. The rest of the control points do not lie on the curve.
*
* \pre \f$k\f$ is smaller than the number of control points.
*/
typename RatKernel::Point_2 control_point(std::size_t k) const;
*/
template <class InputIterator>
Curve_2 (InputIterator pts_begin, InputIterator pts_end);
/*! returns the point \f$B(t)\f$ on the curve that corresponds to the given
* rational parameter value.
*/
typename RatKernel::Point_2 operator()(const Rational& t) const;
/// @}
/*! returns the point \f$B(t)\f$ on the curve that corresponds to the given
* algebraic parameter value.
*/
typename AlgKernel::Point_2 operator()(const Algebraic& t) const;
/// \name Access Functions
/// @{
/// @}
/*!
returns the number of control points that define `B`.
*/
size_t number_of_control_points () const;
}; /* end Arr_Bezier_curve_traits_2::Curve_2 */
/*!
returns the \f$ k\f$th control point. Note that the first control point equals
the curve source, while the last control point equals its target. The rest
of the control points do not lie on the curve.
\pre \f$ k\f$ is smaller than the number of control points.
*/
typename RatKernel::Point_2 control_point (size_t k) const;
/*! The `Point_2` class nested within the B&eacute;zier traits class is used
* to represent: (i) an endpoint of a B&eacute;zier curve, (ii) a vertical
* tangency point of a curve, used to subdivide it into \f$x\f$-monotone
* subcurve, and (iii) an intersection point between two curves. While, points
* of type (i) have rational coordinates and are given as part of the input,
* points of the two latter types have algebraic coordinates. However, to
* speed up the arrangement construction, such point are not computed in an
* exact manner, and instead are given in an approximate representation. Note
* that the exact coordinates of a point may only be accessed if it is exactly
* computed.
/*!
returns the point \f$ B(t)\f$ on the curve that corresponds to the given
rational parameter value.
*/
typename RatKernel::Point_2 operator() (const Rational& t) const;
* In addition to the methods listed below, the copy constructor and assignment
* operator for `Point_2` objects are also supported.
*/
class Point_2 {
public:
/*!
returns the point \f$ B(t)\f$ on the curve that corresponds to the given
algebraic parameter value.
*/
typename AlgKernel::Point_2 operator() (const Algebraic& t) const;
/// \name Creation
/// @{
/// @}
/*!
default constructor.
*/
Point_2();
}; /* end Arr_Bezier_curve_traits_2::Curve_2 */
/*!
constructs the point \f$B(t_0)\f$ on the given curve. As \f$t_0\f$ is an
algebraic number, the point has algebraic coordinates.
*/
Point_2(const Curve_2& B, const Algebraic& t_0);
/*!
constructs the point \f$B(t_0)\f$ on the given curve. As \f$t_0\f$ is a
rational number, the point has rational coordinates.
*/
Point_2(const Curve_2& B, const Rational& t_0);
/*!
/// @}
The `Point_2` class nested within the B&eacute;zier traits class is used
to represent: (i) an endpoint of a B&eacute;zier curve, (ii) a vertical tangency
point of a curve, used to subdivide it into \f$ x\f$-monotone subcurve, and
(iii) an intersection point between two curves. While, points of type (i) have
rational coordinates and are given as part of the input, points of the two
latter types have algebraic coordinates. However, to speed up the arrangement
construction, such point are not computed in an exact manner, and instead
are given in an approximate representation. Note that the exact coordinates
of a point may only be accessed if it is exactly computed.
/// \name Access Functions
/// @{
In addition to the methods listed below, the copy constructor and assignment
operator for `Point_2` objects are also supported.
/*! returns the approximated coordinates of `p`.
*/
std::pair<double, double> approximate() const;
*/
class Point_2 {
public:
/*! returns whether the coordinates of `p` are computed in an exact manner.
*/
bool is_exact() const;
/// \name Creation
/// @{
/*! returns the \f$x\f$-coordinate of `p`.
*
* \pre `p` is exactly computed.
*/
Algebraic x() const;
/*!
default constructor.
*/
Point_2 ();
/*! returns the \f$y\f$-coordinate of `p`.
*
* \pre `p` is exactly computed.
*/
Algebraic y() const;
/*!
constructs the point \f$ B(t_0)\f$ on the given curve. As \f$ t_0\f$ is an
algebraic number, the point has algebraic coordinates.
*/
Point_2 (const Curve_2& B, const Algebraic& t_0);
/*! returns whether the coordinates of `p` are rational numbers.
*/
bool is_rational() const;
/*!
constructs the point \f$ B(t_0)\f$ on the given curve. As \f$ t_0\f$ is a
rational number, the point has rational coordinates.
*/
Point_2 (const Curve_2& B, const Rational& t_0);
/*! casts `p` to a point with rational coordinates.
* \pre `p` has rational coordinates.
*/
operator typename RatKernel::Point_2() const;
/// @}
/// @}
/// \name Access Functions
/// @{
}; /* end Arr_Bezier_curve_traits_2::Point_2 */
/*!
returns the approximated coordinates of `p`.
*/
std::pair<double, double> approximate () const;
/*! The `X_monotone_curve_2` class nested within the B&eacute;zier traits is
* used to represent \f$x\f$-monotone subcurves of B&eacute;zier curves. The
* subcurve is defined by a supporting B&eacute;zier curve \f$B(t)\f$ and a
* range of definition in the parameter space \f$[t_1, t_2] \subseteq [0,1]\f$,
* where \f$B(t_1)\f$ is the subcurve source and \f$B(t_2)\f$ is its target.
* Note that as the point endpoints may only be approximated, the parameter
* range defining the subcurve may only be approximately known.
*
* It is not possible to construct \f$x\f$-monotone subcurves directly.
* Instead, use the `Make_x_monotone_2` functor supplied by the traits class to
* subdivide a `Curve_2` object into \f$x\f$-monotone subcurves.
*/
class X_monotone_curve_2 {
public:
/*!
returns whether the coordinates of `p` are computed in an exact manner.
*/
bool is_exact () const;
/// \name Access Functions
/// @{
/*!
returns the \f$ x\f$-coordinate of `p`.
\pre `p` is exactly computed.
*/
Algebraic x () const;
/*! returns the supporting B&eacute;zier curve of `b`.
*/
Curve_2 supporting_curve() const;
/*!
returns the \f$ y\f$-coordinate of `p`.
\pre `p` is exactly computed.
*/
Algebraic y () const;
/*! returns the source point of `b`.
*/
Point_2 source() const;
/*!
returns whether the coordinates of `p` are rational numbers.
*/
bool is_rational () const;
/*! returns the target point of `b`.
*/
Point_2 target() const;
/*!
casts `p` to a point with rational coordinates.
\pre `p` has rational coordinates.
*/
operator typename RatKernel::Point_2 () const;
/*! returns the left (\f$xy\f$-lexicographically smaller) endpoint of `b`.
*/
Point_2 left() const;
/// @}
/*! returns the right (\f$xy\f$-lexicographically smaller) endpoint of `b`.
*/
Point_2 right() const;
}; /* end Arr_Bezier_curve_traits_2::Point_2 */
/*! return the approximate parameter range defining the subcurve `b`.
*/
std::pair<double, double> parameter_range() const;
/*!
/// @}
}; /* end Arr_Bezier_curve_traits_2::X_monotone_curve_2 */
The `X_monotone_curve_2` class nested within the B&eacute;zier traits is
used to represent \f$ x\f$-monotone subcurves of B&eacute;zier curves. The subcurve is
defined by a supporting B&eacute;zier curve \f$ B(t)\f$ and a range of definition in
the parameter space \f$ [t_1, t_2] \subseteq [0, 1]\f$, where \f$ B(t_1)\f$ is the
subcurve source and \f$ B(t_2)\f$ is its target. Note that as the point endpoints
may only be approximated, the parameter range defining the subcurve may
only be approximately known.
class Trim_2 {
public:
/// \name Creation
/// @{
It is not possible to construct \f$ x\f$-monotone subcurves directly. Instead,
use the `Make_x_monotone_2` functor supplied by the traits class to
subdivide a `Curve_2` object into \f$ x\f$-monotone subcurves.
/*! Trims the given \f$x\f$-monotone curve to an from `src` to `tgt`.
*
* \ pre `src` and `tgt` lies on the curve
*/
X_monotone_curve_2(const X_monotone_curve_2& xcv,
const Point_2& src, const Point_2& tgt) const
*/
class X_monotone_curve_2 {
public:
/// @}
/// \name Access Functions
/// @{
/*!
returns the supporting B&eacute;zier curve of `b`.
*/
Curve_2 supporting_curve () const;
/*!
returns the source point of `b`.
*/
Point_2 source () const;
/*!
returns the target point of `b`.
*/
Point_2 target () const;
/*!
returns the left (\f$ xy\f$-lexicographically smaller) endpoint of `b`.
*/
Point_2 left () const;
/*!
returns the right (\f$ xy\f$-lexicographically smaller) endpoint of `b`.
*/
Point_2 right () const;
/*!
return the approximate parameter range defining the subcurve `b`.
*/
std::pair<double, double> parameter_range () const;
/// @}
}; /* end Arr_Bezier_curve_traits_2::X_monotone_curve_2 */
class Trim_2{
public:
/// \name Creation
/// @{
/*!
Trims the given x-monotone curve to an from src to tgt.
\ pre `src` and `tgt` lies on the curve
*/
X_monotone_curve_2(const X_monotone_curve_2& xcv,
const Point_2& src,
const Point_2& tgt)const
/// @}
}/* end Arr_Bezier_curve_traits_2::Trim_2 */
} /* end Arr_Bezier_curve_traits_2::Trim_2 */
}; /* end Arr_Bezier_curve_traits_2 */
} /* end namespace CGAL */

View File

@ -18,122 +18,123 @@ namespace CGAL {
template <typename Arrangement>
class Arr_accessor {
public:
/// \name Types
/// @{
/// \name Types
/// @{
/*! the type of the associated arrangement. */
typedef unspecified_type Arrangement_2;
/*! the type of the associated arrangement. */
typedef unspecified_type Arrangement_2;
/*! the point type. */
typedef typename Arrangement_2::Point_2 Point_2;
/*! the point type. */
typedef typename Arrangement_2::Point_2 Point_2;
/*! the \f$x\f$-monotone curve type. */
typedef typename Arrangement_2::X_monotone_curve_2 X_monotone_curve_2;
/*! the \f$ x\f$-monotone curve type. */
/*! */
typedef typename Arrangement_2::Vertex_handle Vertex_handle;
typedef typename Arrangement_2::X_monotone_curve_2 X_monotone_curve_2;
/*! */
typedef typename Arrangement_2::Halfedge_handle Halfedge_handle;
/*! */
typedef typename Arrangement_2::Vertex_handle Vertex_handle;
/*! */
typedef typename Arrangement_2::Face_handle Face_handle;
/*! */
typedef typename Arrangement_2::Halfedge_handle Halfedge_handle;
/*! represents the boundary of a connected component (CCB). */
typedef typename Arrangement_2::Ccb_halfedge_circulator Ccb_halfedge_circulator;
/*! */
typedef typename Arrangement_2::Face_handle Face_handle;
/// @}
/*! represents the boundary of a connected component (CCB). */
typedef typename Arrangement_2::Ccb_halfedge_circulator Ccb_halfedge_circulator;
/// \name Creation
/// @{
/// @}
/*! constructs an accessor attached to the given arrangement `arr`. */
Arr_accessor(Arrangement_2& arr);
/// \name Creation
/// @{
/// @}
/*! constructs an accessor attached to the given arrangement `arr`. */
Arr_accessor(Arrangement_2& arr);
/// \name Accessing the Notification Functions
/// @}
/// @{
/// \name Accessing the Notification Functions
/*! notifies the arrangement observer that a global change is going to take
* place (for the usage of the global functions that operate on arrangements).
*/
void notify_before_global_change();
/// @{
/*! notifies the arrangement observer that a global change has taken place
* (for the usage of the global functions that operate on arrangements).
*/
void notify_after_global_change();
/*! notifies the arrangement observer that a global change is going to take
* place (for the usage of the global functions that operate on arrangements).
*/
void notify_before_global_change();
/// @}
/*! notifies the arrangement observer that a global change has taken place (for
* the usage of the global functions that operate on arrangements).
*/
void notify_after_global_change();
/// \name Arrangement Predicates
/// @{
/// @}
/*! locates a place for the curve `c` around the vertex `v` and returns a
* halfedge whose target is `v`, where c should be inserted between this
* halfedge and the next halfedge around `v` in a clockwise order.
*/
Halfedge_handle
locate_around_vertex(Vertex_handle v, const X_monotone_curve_2& c) const;
/// \name Arrangement Predicates
/// @{
/*! counts the number of edges along the path from `e1` to `e2`. In case the
* two halfedges do not belong to the same connected component, the function
* returns (-1).
*/
int halfedge_distance(Halfedge_const_handle e1,
Halfedge_const_handle e2) const;
/*! locates a place for the curve `c` around the vertex `v` and returns a
* halfedge whose target is `v`, where c should be inserted between this
* halfedge and the next halfedge around `v` in a clockwise order.
*/
Halfedge_handle
locate_around_vertex(Vertex_handle v, const X_monotone_curve_2& c) const;
/*! determines whether a new halfedge we are about to create, which is to be
* associated with the curve `c` and directed from `pred1->target()` to
* `pred2->target()`, lies on the inner CCB of the new face that will be
* created, introducing this new edge.
*
* \pre `pred1->target()` and `pred2->target()` are associated with `c`'s
* endpoints.
*
* \pre `pred1` and `pred2` belong to the same connected component, such that
* a new face is created by connecting `pred1->target()` and
* `pred2->target()`.
*/
bool is_inside_new_face(Halfedge_handle pred1,
Halfedge_handle pred2,
const X_monotone_curve_2& c) const;
/*! counts the number of edges along the path from `e1` to `e2`. In case the
* two halfedges do not belong to the same connected component, the function
* returns (-1).
*/
int halfedge_distance(Halfedge_const_handle e1, Halfedge_const_handle e2) const;
/*! determines whether a given point lies within the region bounded by a
* boundary of the connected component that `he` belongs to. Note that if the
* function returns `true`, then `p` is contained within `he->face()` (but not
* on its boundary), or inside one of the inner CCBs of this face, or it may
* coincide with an isolated vertex in this face.
*/
bool point_is_in(const Point_2& p, Halfedge_const_handle he) const;
/*! determines whether a new halfedge we are about to create, which is to be
* associated with the curve `c` and directed from `pred1->target()` to
* `pred2->target()`, lies on the inner CCB of the new face that will be
* created, introducing this new edge.
*
* \pre `pred1->target()` and `pred2->target()` are associated with `c`'s
* endpoints.
*
* \pre `pred1` and `pred2` belong to the same connected component, such that a
* new face is created by connecting `pred1->target()` and `pred2->target()`.
*/
bool is_inside_new_face(Halfedge_handle pred1,
Halfedge_handle pred2,
const X_monotone_curve_2& c) const;
/*! determines whether `he` lies on the outer boundary of its incident face.
*/
bool is_on_outer_boundary(Halfedge_const_handle he) const;
/*! determines whether a given point lies within the region bounded by a
* boundary of the connected component that `he` belongs to. Note that if the
* function returns `true`, then `p` is contained within `he->face()` (but not
* on its boundary), or inside one of the inner CCBs of this face, or it may
* coincide with an isolated vertex in this face.
*/
bool point_is_in(const Point_2& p, Halfedge_const_handle he) const;
/*! determines whether `he` lies on the inner boundary of its incident face
* (that is, whether it lies on the boundary of one of the inner CCBs of this
* face).
*/
bool is_on_inner_boundary(Halfedge_const_handle he) const;
/*! determines whether `he` lies on the outer boundary of its incident face. */
bool is_on_outer_boundary(Halfedge_const_handle he) const;
/// @}
/*! determines whether `he` lies on the inner boundary of its incident face
* (that is, whether it lies on the boundary of one of the inner CCBs of this
* face).
*/
bool is_on_inner_boundary(Halfedge_const_handle he) const;
/// \name Arrangement Modifiers
/// @{
/// @}
/// \name Arrangement Modifiers
/// @{
/*! creates a new vertex an associates it with the point `p`.
*
* \pre There is no existing vertex already associated with `p`.
*/
Vertex_handle create_vertex(const Point_2& p);
/*! creates a new vertex an associates it with the point `p`.
*
* \pre There is no existing vertex already associated with `p`.
*/
Vertex_handle create_vertex(const Point_2& p);
/*! inserts the curve `c` as a new inner CCBs (hole) of the face `f`,
* connecting the two isolated vertices `v1` and `v2`. `res` is the comparison
* result between these two end-vertices. The function returns a handle for one
* of the new halfedges corresponding to the inserted curve, directed from `v1`
* to `v2`.
* one of the new halfedges corresponding to the inserted curve, directed from
* `v1` to `v2`.
*
* \pre `v1` and `v2` are associated with `c`'s endpoints, that they lie of
* `f`'s interior and that and that they have no incident edges.
@ -160,121 +161,122 @@ Halfedge_handle insert_from_vertex_ex(const X_monotone_curve_2& c,
Vertex_handle v,
Comparison_result res);
/*! inserts the curve `c` into the arrangement, such that both `c`'s endpoints
* correspond to existing arrangement vertices, given by `pred1->target()` and
* `pred2->target()`. `res` is the comparison result between these two
* end-vertices. The function creates a new halfedge pair that connects the two
* vertices (with `pred1` and `pred2` indicate the exact place for these
* halfedges around the two target vertices) and returns a handle for the
* halfedge directed from `pred1->target()` to `pred2->target()`. The output
* flag `new_face` indicates whether a new face has been created following the
* insertion of the new curve.
*
* \pre `pred1->target()` and `pred2->target()` are associated with `c`'s
* endpoints and that if a new face is created, then `is_inside_new_face (pred1,
* pred2, c)` is `true`.
*/
Halfedge_handle insert_at_vertices_ex(const X_monotone_curve_2& c,
Halfedge_handle pred1,
Halfedge_handle pred2,
Comparison_result res, bool& new_face);
/*! inserts the curve `c` into the arrangement, such that both `c`'s endpoints
* correspond to existing arrangement vertices, given by `pred1->target()` and
* `pred2->target()`. `res` is the comparison result between these two
* end-vertices. The function creates a new halfedge pair that connects the
* two vertices (with `pred1` and `pred2` indicate the exact place for these
* halfedges around the two target vertices) and returns a handle for the
* halfedge directed from `pred1->target()` to `pred2->target()`. The output
* flag `new_face` indicates whether a new face has been created following the
* insertion of the new curve.
*
* \pre `pred1->target()` and `pred2->target()` are associated with `c`'s
* endpoints and that if a new face is created, then
* `is_inside_new_face(pred1, pred2, c)` is `true`.
*/
Halfedge_handle insert_at_vertices_ex(const X_monotone_curve_2& c,
Halfedge_handle pred1,
Halfedge_handle pred2,
Comparison_result res, bool& new_face);
/*! inserts `v` as an isolated vertex inside `f`.
*
* \pre `v->point()` is contained in the interior of the given face.
*/
void insert_isolated_vertex(Face_handle f, Vertex_handle v);
/*! inserts `v` as an isolated vertex inside `f`.
*
* \pre `v->point()` is contained in the interior of the given face.
*/
void insert_isolated_vertex(Face_handle f, Vertex_handle v);
/*! moves the given hole (inner CCB) from the interior of the face `f1` to the
* face `f2`.
*
* \pre `hole` is currently contained in `f1` and should be moved to `f2`.
*/
void move_hole(Face_handle f1, Face_handle f2, Ccb_halfedge_circulator hole);
/*! moves the given hole (inner CCB) from the interior of the face `f1` to the
* face `f2`.
*
* \pre `hole` is currently contained in `f1` and should be moved to `f2`.
*/
void move_hole(Face_handle f1, Face_handle f2, Ccb_halfedge_circulator hole);
/*! moves the given isolated vertex from the interior of the face `f1`
* inside the face `f2`.
*
* \pre `v` is indeed an isolated vertex currently contained in `f1` and should
* be moved to `f2`.
*/
bool move_isolated_vertex(Face_handle f1, Face_handle f2, Vertex_handle v);
/*! moves the given isolated vertex from the interior of the face `f1`
* inside the face `f2`.
*
* \pre `v` is indeed an isolated vertex currently contained in `f1` and
* should be moved to `f2`.
*/
bool move_isolated_vertex(Face_handle f1, Face_handle f2, Vertex_handle v);
/*! relocates all inner ccbs and isolated vertices to their proper position
* immediately after a face has split due to the insertion of a new halfedge,
* namely after `insert_at_vertices_ex()` was invoked and indicated that a new
* face has been created. `he` is the halfedge returned by
* `insert_at_vertices_ex()`, such that `he->twin()->face` is the face that has
* just been split and `he->face()` is the newly created face.
*/
void relocate_in_new_face(Halfedge_handle he);
/*! relocates all inner ccbs and isolated vertices to their proper position
* immediately after a face has split due to the insertion of a new halfedge,
* namely after `insert_at_vertices_ex()` was invoked and indicated that a new
* face has been created. `he` is the halfedge returned by
* `insert_at_vertices_ex()`, such that `he->twin()->face` is the face that
* has just been split and `he->face()` is the newly created face.
*/
void relocate_in_new_face(Halfedge_handle he);
/*! relocates all inner ccbs in a new face, as detailed above. */
void relocate_holes_in_new_face(Halfedge_handle he);
/*! relocates all inner ccbs in a new face, as detailed above. */
void relocate_holes_in_new_face(Halfedge_handle he);
/*! relocates all isolated vertices in a new face, as detailed above. */
void relocate_isolated_vertices_in_new_face(Halfedge_handle he);
/*! relocates all isolated vertices in a new face, as detailed above. */
void relocate_isolated_vertices_in_new_face(Halfedge_handle he);
/*! modifies the point associated with the vertex `v` (the point may be
* geometrically different than the one currently associated with `v`). The
* function returns a handle to the modified vertex (same as `v`).
*
* \pre No other arrangement vertex is already associated with `p`.
*
* \pre The topology of the arrangement does not change after the vertex point
* is modified.
*/
Vertex_handle modify_vertex_ex(Vertex_handle v, const Point_2& p);
/*! modifies the point associated with the vertex `v` (the point may be
* geometrically different than the one currently associated with `v`). The
* function returns a handle to the modified vertex (same as `v`).
*
* \pre No other arrangement vertex is already associated with `p`.
*
* \pre The topology of the arrangement does not change after the vertex point
* is modified.
*/
Vertex_handle modify_vertex_ex(Vertex_handle v, const Point_2& p);
/*! modifies the \f$ x\f$-monotone curve associated with the edge `e` (the curve
* `c` may be geometrically different than the one currently associated with
* `e`). The function returns a handle to the modified edge (same as `e`).
*
* \pre The interior of `c` is disjoint from all existing arrangement vertices
* and edges.
*/
Halfedge_handle modify_edge_ex(Halfedge_handle e, const X_monotone_curve_2& c);
/*! modifies the \f$x\f$-monotone curve associated with the edge `e` (the
* curve `c` may be geometrically different than the one currently associated
* with `e`). The function returns a handle to the modified edge (same as
* `e`).
*
* \pre The interior of `c` is disjoint from all existing arrangement vertices
* and edges.
*/
Halfedge_handle modify_edge_ex(Halfedge_handle e, const X_monotone_curve_2& c);
/*! splits a given edge into two at the split point `p`, and associate the
* x-monotone curves `c1` and `c2` with the resulting edges, such that `c1`
* connects `he->source()` with `p` and `c2` connects `p` with
* `he->target()`. The function return a handle to the split halfedge directed
* from `he->source()` to the split point `p`.
*
* \pre The endpoints of `c1` and `c2` correspond to `p` and to `he`'s
* end-vertices, as indicated above.
*/
Halfedge_handle split_edge_ex(Halfedge_handle he, const Point_2& p,
const X_monotone_curve_2& c1,
const X_monotone_curve_2& c2);
/*! splits a given edge into two at the split point `p`, and associate the
* \f$x\f$-monotone curves `c1` and `c2` with the resulting edges, such that
* `c1` connects `he->source()` with `p` and `c2` connects `p` with
* `he->target()`. The function return a handle to the split halfedge directed
* from `he->source()` to the split point `p`.
*
* \pre The endpoints of `c1` and `c2` correspond to `p` and to `he`'s
* end-vertices, as indicated above.
*/
Halfedge_handle split_edge_ex(Halfedge_handle he, const Point_2& p,
const X_monotone_curve_2& c1,
const X_monotone_curve_2& c2);
/*! splits a given edge into two at by the vertex `v`, and associate the
* x-monotone curves `c1` and `c2` with the resulting edges, such that `c1`
* connects `he->source()` with `v` and `c2` connects `v` with
* `he->target()`. The function return a handle to the split halfedge directed
* from `he->source()` to `v`.
*
* \pre The endpoints of `c1` and `c2` correspond to `v` and to `he`'s
* end-vertices, as indicated above. It is also assumed that `v` has no incident
* edges.
*/
Halfedge_handle split_edge_ex(Halfedge_handle he, Vertex_handle v,
const X_monotone_curve_2& c1,
const X_monotone_curve_2& c2);
/*! splits a given edge into two at by the vertex `v`, and associate the
* \f$x\f$-monotone curves `c1` and `c2` with the resulting edges, such that
* `c1` connects `he->source()` with `v` and `c2` connects `v` with
* `he->target()`. The function return a handle to the split halfedge directed
* from `he->source()` to `v`.
*
* \pre The endpoints of `c1` and `c2` correspond to `v` and to `he`'s
* end-vertices, as indicated above. It is also assumed that `v` has no
* incident edges.
*/
Halfedge_handle split_edge_ex(Halfedge_handle he, Vertex_handle v,
const X_monotone_curve_2& c1,
const X_monotone_curve_2& c2);
/*! removes the edge `he` from the arrangement, such that if the edge removal
* causes the creation of a new hole (inner CCB), `he->target()` lies on the
* boundary of this hole. The flags `remove_source` and `remove_target`
* indicate whether the end-vertices of `he` should be removed as well, in case
* they have no other incident edges. If the operation causes two faces to
* merge, the merged face is returned. Otherwise, the face to which the edge
* was incident is returned.
*/
Face_handle remove_edge_ex(Halfedge_handle he,
bool remove_source = true,
bool remove_target = true);
/// @}
/*! removes the edge `he` from the arrangement, such that if the edge removal
* causes the creation of a new hole (inner CCB), `he->target()` lies on the
* boundary of this hole. The flags `remove_source` and `remove_target`
* indicate whether the end-vertices of `he` should be removed as well, in
* case they have no other incident edges. If the operation causes two faces
* to merge, the merged face is returned. Otherwise, the face to which the
* edge was incident is returned.
*/
Face_handle remove_edge_ex(Halfedge_handle he,
bool remove_source = true,
bool remove_target = true);
/// @}
}; /* end Arr_accessor */
} /* end namespace CGAL */

View File

@ -3,22 +3,22 @@ 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.
* `AosTraits_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
* 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}
* \cgalModels{AosTraits_2}
*/
template <typename Coefficient>
@ -50,8 +50,7 @@ public:
*/
typedef unspecified_type Algebraic_real_1;
/*! Typedef from `Algebraic_kernel_1::Bound`
*/
/// Typedef from `Algebraic_kernel_1::Bound`
typedef unspecified_type Bound;
/// @}
@ -77,7 +76,6 @@ public:
*/
class Construct_curve_2 {
public:
/// \name Object Creation Functors
/// @{
@ -102,40 +100,41 @@ public:
*/
class Construct_point_2 {
public:
/// \name Object Creation Functors
/// @{
/*! returns a `Point_2` object that represents the `arcno`-th
* point in the fiber of `cv` at \f$ x\f$-coordinate `x`,
* point in the fiber of `cv` at \f$x\f$-coordinate `x`,
* counted from the bottom, starting with zero.
*
* \pre (`cv` must not have a vertical line at `x`,
* and \f$ 0\leq arcno < c\f$, where \f$ c\f$ is the number of points
* and \f$0\leq arcno < c\f$, where \f$c\f$ is the number of points
* in the fiber of `cv` at `x`.)
*/
Point_2 operator() (Algebraic_real_1 x, Curve_2 cv, int arcno);
Point_2 operator()(Algebraic_real_1 x, Curve_2 cv, int arcno);
/*! returns a `Point_2` object that represents the
* point on `xcv` at \f$ x\f$-coordinate `x`
* \pre (`x` is in the \f$ x\f$-range of `xcv`.)
* point 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);
Point_2 operator()(Algebraic_real_1 x, X_monotone_curve_2 xcv);
/*! returns a `Point_2` object that represents (x,y)
*/
Point_2 operator() (Algebraic_real_1 x, Algebraic_real_1 y);
Point_2 operator()(Algebraic_real_1 x, Algebraic_real_1 y);
/*! returns a `Point_2` object that represents (x,y)
*/
Point_2 operator() (Coefficient x, Coefficient y);
Point_2 operator()(Coefficient x, Coefficient y);
/*! returns a `Point_2` object that represents (x,y)
*/
Point_2 operator() (Bound x, Bound y);
Point_2 operator()(Bound x, Bound y);
/*! returns a `Point_2` object that represents (x,y)
*/
Point_2 operator() (int x, int y);
Point_2 operator()(int x, int y);
/// @}
@ -145,7 +144,6 @@ public:
*/
class Construct_x_monotone_segment_2 {
public:
/// \name Object Creation Functors
/// @{
@ -162,54 +160,56 @@ public:
*
* \pre `end_min` must have a unique \f$x\f$-monotone segment to its right, or
* `end_max` must have a unique \f$x\f$-monotone segment to its left.
* Furthermore, `end_min` and `end_max` must be connected by an
* \f$x\f$-monotone segment of `cv`)
* Furthermore, `end_min` and `end_max` must be connected by an
* \f$x\f$-monotone segment of `cv`)
*/
template <typename OutputIterator>
OutputIterator operator() (Curve_2 cv, Point_2 end_min, Point_2 end_max,
OutputIterator oi);
OutputIterator operator()(Curve_2 cv, Point_2 end_min, Point_2 end_max,
OutputIterator oi);
/*! inserts a sequence of `X_monotone_curve_2` objects into an output container
* given through an output iterator. These segments form an \f$x\f$-monotone
* (or vertical) segment of the curve `cv`.
*
* If `site_of_p==POINT_IN_INTERIOR`, the maximal segment is
* returned that contains `p` in its interior.
* If `site_of_p` == `POINT_IN_INTERIOR`, the maximal segment that contains
* `p` in its interior is returned .
*
* returned that contains `p` as its left endpoint.
* If `site_of_p` == `MIN_ENDPOINT`, the segment that contains
* `p` as its left endpoint returned .
*
* returned that contains `p` as its left endpoint.
* If `site_of_p` == `MAX_ENDPOINT`, the segment that contains
* `p` as its right endpoint returned .
*
* \pre (If `site_of_p==POINT_IN_INTERIOR`, `p`
* must be an interior point of an \f$x\f$-monotone or a vertical
* segment.
* must either have a unique \f$x\f$-monotone segment to the right,
* or a vertical segment from `p` upwards.
* must either have a unique \f$x\f$-monotone segment to the left,
* or a vertical segment from `p` downwards.)
* \pre If `site_of_p` == `POINT_IN_INTERIOR`, `p` must be an interior point
* of an \f$x\f$-monotone or a vertical segment.
*
* \pre If `site_of_p` == `MIN_ENDPOINT`, `p` must either have a unique
* \f$x\f$-monotone segment to the right, or a vertical segment from `p` upwards.
*
* \pre If `site_of_p` == `MAX_ENDPOINT`, `p` must either have a unique
* \f$x\f$-monotone segment to the left, or a vertical segment from `p` downwards.
*/
template <typename OutputIterator>
OutputIterator operator() (Curve_2 cv, Point_2 p, Site_of_point site_of_p,
OutputIterator out);
OutputIterator operator()(Curve_2 cv, Point_2 p, Site_of_point site_of_p,
OutputIterator out);
/*! inserts a sequence of `X_monotone_curve_2` objects into an output container
* given through an output iterator. These segments form a straight-line
* segment connecting the points `p` and `q`. If `p` and `q` share the same
* \f$x\f$-coordinate, the constructed vertical segment consists of only one
* `X_monotone_curve_2` object and can be computed efficiently. In the
* non-vertical case, the construction is only possible if `p` and `q` have both
* rational x- and y-coordinates.
/*! inserts a sequence of `X_monotone_curve_2` objects into an output
* container given through an output iterator. These segments form a
* straight-line segment connecting the points `p` and `q`. If `p` and `q`
* share the same \f$x\f$-coordinate, the constructed vertical segment
* consists of only one `X_monotone_curve_2` object and can be computed
* efficiently. In the non-vertical case, the construction is only possible
* if `p` and `q` have both rational \f$x\f$- and \f$y\f$-coordinates.
*
* \pre (`p` must not be equal to `q`.)
* \pre `p` must not be equal to `q`.
*/
template <typename OutputIterator>
OutputIterator operator() (Point_2 p, Point_2 q, OutputIterator out);
OutputIterator operator()(Point_2 p, Point_2 q, OutputIterator out);
/// @}
}; /* end Arr_algebraic_segment_traits_2::Construct_x_monotone_segment_2 */
/*! A model of the the `ArrangementTraits_2::Curve_2` concept.
/*! A model of the the `AosTraits_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
@ -223,25 +223,25 @@ public:
/*! returns the defining polynomial of the curve.
*/
Polynomial_2 polynomial () const;
Polynomial_2 polynomial() const;
/// @}
}; /* end Arr_algebraic_segment_traits_2::Curve_2 */
/*! A model of the `ArrangementBasicTraits_2::Point_2` concept.
* Represents points in \f$ \mathbb{R}^2\f$. Intersection points of algebraic
/*! A model of the `AosBasicTraits_2::Point_2` concept.
* Represents points in \f$\mathbb{R}^2\f$. Intersection points of algebraic
* curves are in general non-rational, so we need a data structure that is
* capable of representing arbitrary points with algebraic coordinates.
*
* The traits class represents algebraic coordinates by the type
* `Algebraic_real_1`, which is a model of the `AlgebraicReal_1` concept.
* A point \f$ p\f$ is stored by a triple \f$ (x,cv,arcno)\f$,
* where \f$ x\f$ is the \f$ x\f$-coordinate of a point, \f$ cv\f$ is an instance
* of `Curve_2` that contains the point, (and has no vertical line at \f$ x\f$),
* and \f$ arcno\f$ is an `int`, denoting that \f$ p\f$ is met as the
* \f$arcno\f$-th point when shooting a vertical ray at \f$ x\f$, starting from
* \f$-\infty\f$ (where counting starts with \f$ 0\f$).
* `Algebraic_real_1`, which is a model of the `AlgebraicReal_1` concept. A
* point \f$p\f$ is stored by a triple \f$(x,cv,arcno)\f$, where \f$x\f$ is
* the \f$x\f$-coordinate of a point, \f$cv\f$ is an instance of `Curve_2`
* that contains the point, (and has no vertical line at \f$x\f$), and
* \f$arcno\f$ is an `int`, denoting that \f$p\f$ is met as the \f$arcno\f$-th
* point when shooting a vertical ray at \f$x\f$, starting from \f$-\infty\f$
* (where counting starts with \f$0\f$).
*
* In addition to the methods listed below, the copy constructor and assignment
* operator for `Point_2` objects are also supported.
@ -251,53 +251,52 @@ public:
class Point_2 {
public:
/// \name Modifiers
/// @{
/*! returns the \f$ x\f$-coordinate of `p`.
/*! returns the \f$x\f$-coordinate of `p`.
*/
Algebraic_real_1 x () const;
Algebraic_real_1 x() const;
/*! returns the \f$ y\f$-coordinates of `p`.
/*! returns the \f$y\f$-coordinates of `p`.
*
* <B>Attention:</B> As described above, points are not stored
* by their \f$ y\f$-coordinate in `Algebraic_real_1` representation. In fact,
* <B>Attention:</B> As described above, points are not stored by their
* \f$y\f$-coordinate in `Algebraic_real_1` representation. In fact,
* this representation must be computed on demand, and might become quite
* costly for points defined by high-degree polynomials. Therefore, it is
* recommended to avoid to call this function as much as possible.
*/
Algebraic_real_1 y () const;
Algebraic_real_1 y() const;
/*! returns a `Curve_2` instance that `p`is part of.
*/
Curve_2 curve () const;
Curve_2 curve() const;
/*! returns the arc number of `p`.
*/
int arcno () const;
int arcno() const;
/*! returns double-approximations of the \f$ x\f$- and \f$ y\f$-coordinates.
/*! returns double-approximations of the \f$x\f$- and \f$y\f$-coordinates.
*/
std::pair<double,double> to_double () const;
std::pair<double,double> to_double() const;
/// @}
}; /* end Arr_algebraic_segment_traits_2::Point_2 */
/*! A model of the `ArrangementBasicTraits_2::X_monotone_curve_2` concept.
/*! A model of the `AosBasicTraits_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
* segments or \f$x\f$-monotone segments with no critical \f$x\f$-coordinate
* in the interior of their \f$x\f$-range. Terminal segments might either be
* bounded or unbounded. By definition, each interior point of a non-vertical
* segment has the same arc number (see the documentation of type `Point_2`
* above, which is called the <I>arc number</I> of the segment (note the arc
* number at the endpoints might differ). Such segments are represented
* internally by a 4-tuple \f$ (p,q,cv,arcno)\f$, where \f$ p\f$ and \f$ q\f$
* are the endpoints, \f$ cv\f$ is the <I>supporting curve</I> that the segment
* belongs to, and arcno is the arc number of the segment.
* internally by a 4-tuple \f$(p,q,cv,arcno)\f$, where \f$p\f$ and \f$q\f$
* are the endpoints, \f$cv\f$ is the <I>supporting curve</I> that the
* segment belongs to, and arcno is the arc number of the segment.
*
* Arbitrary (weakly) \f$ x\f$-monotone segments are presented by a range
* Arbitrary (weakly) \f$x\f$-monotone segments are presented by a range
* of `X_monotone_curve_2` instances, whose union equals the segment.
* The functor `Construct_x_monotone_segment_2` allows their construction.
* To construct all (maximal) terminal segments of a curve,
@ -311,34 +310,34 @@ public:
/*! returns the supporting algebraic curve of `s`.
*/
Curve_2 curve () const;
Curve_2 curve() const;
/*! returns whether `s` is a vertical segment.
*/
bool is_vertical () const;
bool is_vertical() const;
/*! returns whether `s` has a finite endpoint on the left
*/
bool is_finite (CGAL::Arr_curve_end ce) const;
bool is_finite(CGAL::Arr_curve_end ce) const;
/*! \pre (The corresponding curve end is finite)
*/
Point_2 curve_end (CGAL::Arr_curve_end ce) const;
Point_2 curve_end(CGAL::Arr_curve_end ce) const;
/*! returns the arc number of the segment.
* \pre (The segment is non-vertical)
*/
int arcno () const;
int arcno() const;
/*! returns the \f$ x\f$-coordinate of a vertical segment.
/*! returns the \f$x\f$-coordinate of a vertical segment.
*
* \pre (The segment is vertical)
*/
Algebraic_real_1 x () const;
Algebraic_real_1 x() const;
/// @}
}; /* end Arr_algebraic_segment_traits_2::X_monotone_curve_2 */
}; /* end Arr_algebraic_segment_traits_2 */
} /* end namespace CGAL */

View File

@ -30,9 +30,8 @@ namespace CGAL {
*/
template <typename Traits, typename Dcel,
typename InputIterator, typename OutputIterator>
OutputIterator locate (const Arrangement_2<Traits, Dcel>& arr,
InputIterator begin,
InputIterator end,
OutputIterator oi);
OutputIterator locate(const Arrangement_2<Traits, Dcel>& arr,
InputIterator begin, InputIterator end,
OutputIterator oi);
} /* namespace CGAL */

View File

@ -10,18 +10,18 @@ namespace CGAL {
* The `Arr_bounded_planar_topology_traits_2` template has two parameters:
* <UL>
* <LI>The `GeometryTraits_2` template-parameter should be substituted by
* a model of the `ArrangementBasicTraits_2` concept. The traits
* a model of the `AosBasicTraits_2` concept. The traits
* class defines the types of \f$x\f$-monotone curves and two-dimensional
* points, namely `ArrangementBasicTraits_2::X_monotone_curve_2` and
* `ArrangementBasicTraits_2::Point_2`,
* points, namely `AosBasicTraits_2::X_monotone_curve_2` and
* `AosBasicTraits_2::Point_2`,
* respectively, and supports basic geometric predicates on them.
* <LI>The `Dcel` template-parameter should be substituted by
* a class that is a model of the `ArrangementDcel` concept. The
* a class that is a model of the `AosDcel` concept. The
* value of this parameter is by default
* `Arr_default_dcel<Traits>`.
* </UL>
*
* \cgalModels{ArrangementBasicTopologyTraits}
* \cgalModels{AosBasicTopologyTraits}
*
* \sa `Arr_default_dcel<Traits>`
* \sa `CGAL::Arr_geodesic_arc_on_sphere_traits_2<Kernel,x,y>`
@ -62,10 +62,10 @@ public:
/// \name Accessors
/// @{
/*! obtains the DCEL (const version). */
/*! obtains the \dcel (const version). */
const Dcel& dcel() const;
/*! obtains the DCEL (non-const version). */
/*! obtains the \dcel (non-const version). */
Dcel& dcel();
/*! obtains the unbounded face (const version). */

View File

@ -3,7 +3,7 @@ namespace CGAL {
/*! \ingroup PkgArrangementOnSurface2TraitsClasses
*
* The class `Arr_circle_segment_traits_2` is a model of the
* `ArrangementTraits_2` concept and can be used to construct and maintain
* `AosTraits_2` concept and can be used to construct and maintain
* arrangements of circular arcs and line segments.
*
* The traits class must be instantiated with a geometric kernel, such that the
@ -11,34 +11,33 @@ namespace CGAL {
* the supporting lines of the line segments are of type `Kernel::Line_2`.
* Thus, the coordinates of the center of supporting circles, and its squared
* radius are of type `Kernel::FT`, which should be an exact rational
* number-type; similarly, the coefficients of each supporting line \f$ ax + by
* + c = 0\f$ are also of type `Kernel::FT`. Note however that the intersection
* point between two such arcs do not have rational coordinates in general. For
* this reason, we do not require the endpoints of the input arcs and segments
* to have rational coordinates.
* number-type; similarly, the coefficients of each supporting line
* \f$ax + by + c = 0\f$ are also of type `Kernel::FT`. Note however that the
* intersection point between two such arcs do not have rational coordinates in
* general. For this reason, we do not require the endpoints of the input arcs
* and segments to have rational coordinates.
*
* The nested `Point_2` type defined by the traits class is therefore
* <I>different</I> than the `Kernel::Point_2` type. Its coordinates are of type
* `CoordNT`, which an instantiation of `Sqrt_extension<NT,ROOT>` where `NT =
* ROOT = Kernel::FT`. Moreover, the third and fourth (hidden) template
* parameters of `Sqrt_extension<NT,ROOT>` are set to `CGAL::Tag_true`, which
* enables efficient comparison among different extensions.
* `CoordNT`, which an instantiation of `Sqrt_extension<NT,ROOT>` where
* `NT` = `ROOT` = `Kernel::FT`. Moreover, the third and fourth (hidden)
* template parameters of `Sqrt_extension<NT,ROOT>` are set to `CGAL::Tag_true`,
* which enables efficient comparison among different extensions.
*
* For more details see the documentation of `Sqrt_extension<NT,ROOT>`.
*
* While `Arr_circle_segment_traits_2` models the concept
* `ArrangementDirectionalXMonotoneTraits_2`, the implementation of the
* `AosDirectionalXMonotoneTraits_2`, the implementation of the
* `Are_mergeable_2` operation does not enforce the input curves to have the
* same direction as a precondition. Moreover, `Arr_circle_segment_traits_2`
* supports the merging of curves of opposite directions.
*
* \cgalModels{ArrangementTraits_2,ArrangementDirectionalXMonotoneTraits_2}
* \cgalModels{AosTraits_2,AosApproximateTraits_2,AosDirectionalXMonotoneTraits_2}
*
*/
template <typename Kernel>
class Arr_circle_segment_traits_2 {
public:
/*! The `Curve_2` class nested within the traits class can represent
* arbitrary circular arcs, full circles and line segments and support their
* construction in various ways. The copy and default constructor as well as
@ -88,7 +87,7 @@ public:
* center point with rational coordinates and whose <I>squared</I> radius is
* rational, with the given endpoints. The orientation of the arc is the
* same as the orientation of `circ`.
*
* \pre Both endpoints must lie on the given supporting circle.
*/
Curve_2(const typename Kernel::Circle_2& circ,
@ -111,9 +110,9 @@ public:
*
* \pre The three points must not be collinear.
*/
Curve_2 (const typename Kernel::Point_2& source,
const typename Kernel::Point_2& mid,
const typename Kernel::Point_2& target);
Curve_2(const typename Kernel::Point_2& source,
const typename Kernel::Point_2& mid,
const typename Kernel::Point_2& target);
/// @}
@ -162,7 +161,6 @@ public:
typename Kernel::Circle_2 supporting_circle() const;
/// @}
}; /* end Arr_circle_segment_traits_2::Curve_2 */
@ -172,16 +170,13 @@ public:
*/
class Point_2 {
public:
/// \name Types
/// @{
/*! the `Kernel::FT` type.
*/
/// the `Kernel::FT` type.
typedef unspecified_type Rational;
/*! the algebraic number-type.
*/
/// the algebraic number-type.
typedef unspecified_type CoordNT;
/// @}
@ -193,11 +188,11 @@ public:
*/
Point_2();
/*! creates the point \f$ (x,y)\f$.
/*! creates the point \f$(x,y)\f$.
*/
Point_2(const Rational& x, const Rational& y);
/*! creates the point \f$ (x,y)\f$.
/*! creates the point \f$(x,y)\f$.
*/
Point_2(const CoordNT& x, const CoordNT& y);
@ -206,36 +201,34 @@ public:
/// \name Access Functions
/// @{
/*! returns the \f$ x\f$-coordinate.
/*! returns the \f$x\f$-coordinate.
*/
CoordNT x() const;
/*! returns the \f$ y\f$-coordinate.
/*! returns the \f$y\f$-coordinate.
*/
CoordNT y() const;
/// @}
}; /* end Arr_circle_segment_traits_2::Point_2 */
/*! The `X_monotone_curve_2` class nested within the traits class can
* represent \f$ x\f$-monotone and line segments (which are always weakly
* represent \f$x\f$-monotone and line segments (which are always weakly
* \f$x\f$-monotone). The copy and default constructor as well as the
* assignment operator are provided. In addition, an `operator<<` for the
* curves is defined for standard output streams.
*/
class X_monotone_curve_2 {
public:
/// \name Creation
/// @{
/*! constructs an curve corresponding to the line segment directed
* from `source` to `target`, both having rational coordinates.
*/
X_monotone_curve_2 (const typename Kernel::Point_2& source,
const typename Kernel::Point_2& target);
X_monotone_curve_2(const typename Kernel::Point_2& source,
const typename Kernel::Point_2& target);
/*! constructs an curve corresponding to the line segment supported by
* the given line, directed from `source` to `target`. Note that the two
@ -254,7 +247,7 @@ public:
*
* \pre Both endpoints must lie on the given supporting circle.
*
* \pre The circular arc is \f$ x\f$-monotone.
* \pre The circular arc is \f$x\f$-monotone.
*/
X_monotone_curve_2(const typename Kernel::Circle_2& circ,
const Point_2& source, const Point_2& target,
@ -275,7 +268,7 @@ public:
/*! returns true if `xcv` is directed right, false otherwise.
*/
bool is_directed_right () const;
bool is_directed_right() const;
/*! returns the left (lexicographically smaller) endpoint of `xcv`.
*/
@ -292,11 +285,11 @@ public:
/*! determines whether `xcv` is a line segment.
*/
bool is_linear () const;
bool is_linear() const;
/*! determines whether `xcv` is a circular arc.
*/
bool is_circular () const;
bool is_circular() const;
/*! returns the supporting line of `xcv`.
*
@ -315,7 +308,6 @@ public:
Bbox_2 bbox() const;
/// @}
}; /* end Arr_circle_segment_traits_2::X_monotone_curve_2 */
class Trim_2 {
@ -323,16 +315,15 @@ public:
/// \name Creation
/// @{
/*! trims the given x-monotone curve to an from src to tgt.
/*! trims the given \f$x\f$-monotone curve to an from `src` to `tgt`.
* \ pre `src` and `tgt` lies on the curve
*/
X_monotone_curve_2(const X_monotone_curve_2& xcv,
const Point_2& src,
const Point_2& tgt) const
/// @}
} /* end Arr_circle_segment_traits_2::Trim_2 */
}; /* end Arr_circle_segment_traits_2 */
} /* end namespace CGAL */

View File

@ -1,19 +1,14 @@
namespace CGAL {
/*!
\ingroup PkgArrangementOnSurface2TraitsClasses
/*! \ingroup PkgArrangementOnSurface2TraitsClasses
*
* This class is a traits class for \cgal arrangements, built on top of a model
* of concept `CircularKernel`.
* It provides curves of type `CGAL::Circular_arc_2<CircularKernel>`.
*
* \cgalModels{AosTraits_2}
*/
template <typename CircularKernel>
class Arr_circular_arc_traits_2 {};
This class is a traits class for \cgal arrangements, built on top of a model of
concept `CircularKernel`.
It provides curves of type `CGAL::Circular_arc_2<CircularKernel>`.
\cgalModels{ArrangementTraits_2}
*/
template< typename CircularKernel >
class Arr_circular_arc_traits_2 {
public:
}; /* end Arr_circular_arc_traits_2 */
} /* end namespace CGAL */

View File

@ -1,23 +1,17 @@
namespace CGAL {
/*!
\ingroup PkgArrangementOnSurface2TraitsClasses
/*! \ingroup PkgArrangementOnSurface2TraitsClasses
*
* This class is a traits class for \cgal arrangements, built on top of a model
* of concept `CircularKernel`. It provides curves that can be of both types
* `CGAL::Line_arc_2<CircularKernel>` or `CGAL::Circular_arc_2<CircularKernel>`.
*
* It uses the
* <A HREF="https://www.boost.org/doc/html/variant.html">std::variant</A>.
*
* \cgalModels{AosTraits_2}
*/
template <typename CircularKernel>
class Arr_circular_line_arc_traits_2 {};
This class is a traits class for \cgal arrangements, built on top of a
model of concept `CircularKernel`. It provides curves that can be
of both types
`CGAL::Line_arc_2<CircularKernel>` or
`CGAL::Circular_arc_2<CircularKernel>`.
It uses the <A HREF="https://www.boost.org/doc/html/variant.html">std::variant</A>.
\cgalModels{ArrangementTraits_2}
*/
template< typename CircularKernel >
class Arr_circular_line_arc_traits_2 {
public:
}; /* end Arr_circular_line_arc_traits_2 */
} /* end namespace CGAL */

View File

@ -2,7 +2,7 @@ namespace CGAL {
/*! \ingroup PkgArrangementOnSurface2TraitsClasses
*
* The class `Arr_conic_traits_2` is a model of the `ArrangementTraits_2`
* The class `Arr_conic_traits_2` is a model of the `AosTraits_2`
* concept and can be used to construct and maintain arrangements of bounded
* segments of algebraic curves of degree \f$2\f$ at most, also known as
* <I>conic curves</I>.
@ -13,13 +13,13 @@ namespace CGAL {
*
* <UL>
* <LI>If \f$4 r s - t^2 > 0\f$, \f$ C\f$ is an ellipse. A special case occurs
* when \f$r = s\f$ and \f$ t = 0\f$, when \f$ C\f$ becomes a circle.
* <LI>If \f$4 r s - t^2 > 0\f$, \f$C\f$ is an ellipse. A special case occurs
* when \f$r = s\f$ and \f$t = 0\f$, when \f$C\f$ becomes a circle.
*
* <LI>If \f$4 r s - t^2 < 0\f$, \f$ C\f$ is a hyperbola.
* <LI>If \f$4 r s - t^2 < 0\f$, \f$C\f$ is a hyperbola.
*
* <LI>If \f$4 r s - t^2 = 0\f$, \f$ C\f$ is a parabola. A degenerate case
* occurs when \f$r = s = t = 0\f$, when \f$ C\f$ is a line.
* <LI>If \f$4 r s - t^2 = 0\f$, \f$C\f$ is a parabola. A degenerate case
* occurs when \f$r = s = t = 0\f$, when \f$C\f$ is a line.
*
* </UL>
*
@ -27,15 +27,15 @@ namespace CGAL {
*
* <UL>
*
* <LI>A full ellipse (or a circle) \f$ C\f$.
* <LI>A full ellipse (or a circle) \f$C\f$.
*
* <LI>The tuple \f$ \langle C, p_s, p_t, o \rangle\f$, where \f$ C\f$ is the
* supporting conic curve, with the arc endpoints being \f$ p_s\f$ and \f$
* p_t\f$ (the source and target points, respectively). The orientation \f$ o\f$
* indicates whether we proceed from \f$ p_s\f$ to \f$ p_t\f$ in a clockwise or
* in a counterclockwise direction. Note that \f$ C\f$ may also correspond to a
* line or to pair of lines---in this case \f$ o\f$ may specify a `COLLINEAR`
* orientation.
* <LI>The tuple \f$\langle C, p_s, p_t, o \rangle\f$, where \f$C\f$ is the
* supporting conic curve, with the arc endpoints being \f$p_s\f$ and
* \f$p_t\f$ (the source and target points, respectively). The orientation
* \f$o\f$ indicates whether we proceed from \f$p_s\f$ to \f$p_t\f$ in a
* clockwise or in a counterclockwise direction. Note that \f$C\f$ may also
* correspond to a line or to pair of lines---in this case \f$o\f$ may specify a
* `COLLINEAR` orientation.
*
* </UL>
*
@ -54,7 +54,7 @@ namespace CGAL {
* must be rational numbers. This guarantees that the coordinates of all
* arrangement vertices (in particular, those representing intersection points)
* are algebraic numbers of degree \f$4\f$ (a real number \f$\alpha\f$ is an
* algebraic number of degree \f$d\f$ if there exist a polynomial \f$ p\f$ with
* algebraic number of degree \f$d\f$ if there exist a polynomial \f$p\f$ with
* <I>integer</I> coefficient of degree \f$d\f$ such that \f$p(\alpha) = 0\f$).
* We therefore require separate representations of the curve
* coefficients and the point coordinates. The `NtTraits` should be substituted
@ -75,34 +75,31 @@ namespace CGAL {
* and defines a curve and \f$x\f$-monotone curve types, as detailed below.
*
* While the `Arr_conic_traits_2` models the concept
* `ArrangementDirectionalXMonotoneTraits_2`, the implementation of
* `AosDirectionalXMonotoneTraits_2`, the implementation of
* the `Are_mergeable_2` operation does not enforce the input curves
* to have the same direction as a precondition. Moreover, `Arr_conic_traits_2`
* supports the merging of curves of opposite directions.
*
* \cgalModels{ArrangementTraits_2,ArrangementLandmarkTraits_2,ArrangementDirectionalXMonotoneTraits_2}
* \cgalModels{AosTraits_2,AosLandmarkTraits_2,AosApproximateTraits_2,AosDirectionalXMonotoneTraits_2}
*
* \cgalHeading{Types}
*/
template <typename RatKernel, typename AlgKernel, typename NtTraits>
class Arr_conic_traits_2 {
public:
/// \name Types
/// @{
/*! the `NtTraits::Rational` type (and also the `RatKernel::FT` type).
*/
/// the `NtTraits::Rational` type (and also the `RatKernel::FT` type).
typedef unspecified_type Rational;
/*! the `NtTraits::Algebraic` type (and also the `AlgKernel::FT` type).
*/
/// the `NtTraits::Algebraic` type (and also the `AlgKernel::FT` type).
typedef unspecified_type Algebraic;
/// @}
/*! The `Curve_2` class nested within the conic-arc traits can represent
* arbitrary conic arcs and support their construction in various ways. The
* arbitrary conic arcs and support their construction in various ways. The
* copy and default constructor as well as the assignment operator are
* provided for conic arcs. In addition, an `operator<<` for the curves is
* defined for standard output streams.
@ -211,7 +208,6 @@ public:
void set_target(const Point_2 & pt);
/// @}
}; /* end Arr_conic_traits_2::Curve_2 */
/*! \class X_monotone_curve_2
@ -227,7 +223,6 @@ public:
*/
class X_monotone_curve_2 {
public:
/// \name Creation
/// @{
@ -249,7 +244,6 @@ public:
const Point_2& right() const;
/// @}
}; /* end Arr_conic_traits_2::X_monotone_curve_2 */
/*! The `Point_2` class nested within the conic-arc traits is
@ -366,7 +360,8 @@ public:
* respectively) is available, and their exact locations are given
* implicitly, specified by the intersections of the supporting conic curve
* with \f$r_1 x^2 + s_1 y^2 + t_1 x y + u_1 x + v_1 y + w_1 = 0\f$ and
* \f$r_2 x^2 + s_2 y^2 + t_2 x y + u_2 x + v_2 y + w_2 = 0\f$, respectively.
* \f$r_2 x^2 + s_2 y^2 + t_2 x y + u_2 x + v_2 y + w_2 = 0\f$,
* respectively.
*
* \pre The two auxiliary curves specifying the endpoints really intersect
* with the supporting conic curve, such that the arc endpoints define a
@ -407,11 +402,13 @@ public:
* \pre `source` and `target` must not be the same.
* \return A segment connecting `source` and `target`.
*/
X_monotone_curve_2 operator()(const Point_2& source, const Point_2& target) const;
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
* endpoints.
* \param a, b, c The coefficients of the supporting line (\f$ax + by + c = 0\f$).
* \param a, b, c The coefficients of the supporting line
* (\f$ax + by + c = 0\f$).
* \param source The source point.
* \param target The target point.
* \pre `source` and `target` must not be the same.
@ -419,7 +416,8 @@ public:
*/
X_monotone_curve_2 operator()(const Algebraic& a, const Algebraic& b,
const Algebraic& c,
const Point_2& source, const Point_2& target) const;
const Point_2& source,
const Point_2& target) const;
};
/*! \class Construct_bbox_2
@ -440,57 +438,14 @@ public:
Bbox_2 operator()(const X_monotone_curve_2& xcv) const { return bbox(xcv); }
};
/*! \name Auxiliary Functor definitions, used gor, e.g., the landmarks \
/*! \name Auxiliary Functor definitions, used for, e.g., the landmarks \
* point-location strategy and the drawing function.
*/
//@{
/// @{
typedef double Approximate_number_type;
typedef CGAL::Cartesian<Approximate_number_type> Approximate_kernel;
typedef Approximate_kernel::Point_2 Approximate_point_2;
//@}
/*! \class Approximate_2
* A functor that approximates a point and an \f$x\f$-monotone curve.
*/
class Approximate_2 {
public:
/*! 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 \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;
/*! obtains an approximation of a point.
* \param p The exact point.
*/
Approximate_point_2 operator()(const Point_2& p) const;
/*! approximates a given \f$x\f$-monotone curve. It computes a sequence of
* approximate points that represent an approximate polyline, and inserts
* them into an output container given through an output iterator. The
* first and last points in the sequence are always approximations of the
* endpoints of the given arc.
*
* \param oi An output iterator for the output container.
* \param error The error bound of the polyline approximation. This is the
* Hausdorff distance between the arc and the polyline that
* approximates the arc.
* \param xcv The exact \f$x\f$-monotone arc.
* \param l2r A Boolean flag that indicates whether the arc direction is
* left to right.
* \return The past-the-end iterator of the output container.
*
* \pre Dereferencing `oi` must yield an object of type
* `Arr_conic_traits_2::Approximate_point_2`.
*/
template <typename OutputIterator>
OutputIterator operator()(OutputIterator oi, double error,
const X_monotone_curve_2& xcv,
bool l2r = true) const;
};
/// @}
/*! \class Trim_2
* A functor that trims a conic arc.
@ -523,11 +478,7 @@ public:
/*! obtains a `Trim_2` functor. */
Trim_2 trim_2_object() const;
/*! obtains an `Approximate_2` functor. */
Approximate_2 approximate_2_object() const;
/// @}
}; /* end Arr_conic_traits_2 */
} /* end namespace CGAL */

View File

@ -1,10 +1,9 @@
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
* `AosTraits_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
@ -12,24 +11,21 @@ namespace CGAL {
*
* 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
* 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
* 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.
* 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}
* \cgalModels{AosTraits_2}
*/
template <typename Traits, typename Data>
class Arr_consolidated_curve_data_traits_2
: public Arr_curve_data_traits_2<Traits, _Unique_list<Data>,
_Consolidate_unique_lists<Data>,
Data>
{
class Arr_consolidated_curve_data_traits_2 :
public Arr_curve_data_traits_2<Traits, _Unique_list<Data>,
_Consolidate_unique_lists<Data>, Data> {
public:
/// \name Types
/// @{
@ -39,10 +35,10 @@ public:
//! 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.
@ -59,14 +55,15 @@ public:
*/
class Data_container {
public:
/// \name Creation
/// @{
/*! constructs default */
/*! constructs default.
*/
Data_container();
/*! constructs set containing a single `data` object. */
/*! constructs set containing a single `data` object.
*/
Data_container(const Data& data);
/// @}
@ -74,22 +71,27 @@ public:
/// \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$.
*
* \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$.
*
* \pre The number of data objects is not \f$0\f$.
*/
const Data& back() const;
@ -123,13 +125,12 @@ public:
*/
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 */

View File

@ -2,10 +2,10 @@ namespace CGAL {
/*! \ingroup PkgArrangementOnSurface2TraitsClasses
*
* The class `Arr_curve_data_traits_2` is a model of the `ArrangementTraits_2`
* The class `Arr_curve_data_traits_2` is a model of the `AosTraits_2`
* concept and serves as a decorator class that allows the extension of the
* curves defined by the base traits-class (the `Tr` parameter), which serves as
* a geometric traits-class (a model of the `ArrangementTraits_2` concept), with
* curves defined by the base traits-class (the `Tr` parameter), which serves
* as a geometric traits-class (a model of the `AosTraits_2` concept), with
* extraneous (non-geometric) data fields.
*
* The traits class inherits its point type from `Traits::Point_2`, and defines
@ -13,7 +13,7 @@ namespace CGAL {
*
* Each `Curve_2` object is associated with a single data field of type `CData`,
* and each `X_monotone_curve_2` object is associated with a single data field
* of type `XData`. When a curve is subdivided into \f$ x\f$-monotone subcurves,
* of type `XData`. When a curve is subdivided into \f$x\f$-monotone subcurves,
* its data field is converted using the conversion functor, which is specified
* by the `Cnv` template-parameter, and the resulting objects is copied to all
* `X_monotone_curve_2` objects induced by this curve. The conversion functor
@ -24,21 +24,18 @@ namespace CGAL {
* By default, the two data types are the same, so the conversion operator
* is trivial:
*
* <TABLE><TR><TD>
* `CData` =
* </TD>
* <TD>
* `XData`
* </TD></TR>
* <TR><TD>
* `Cnv` =
* </TD>
* <TD>
* `_Default_convert_functor<CData,XData>`
* </TD></TR>
* <TABLE>
* <TR>
* <TD>`CData` = </TD>
* <TD>`XData`</TD>
* </TR>
* <TR>
* <TD>`Cnv` =</TD>
* <TD>`_Default_convert_functor<CData,XData>`</TD>
* </TR>
* </TABLE>
*
* In case two (or more) \f$ x\f$-monotone curves overlap, their data fields are
* In case two (or more) \f$x\f$-monotone curves overlap, their data fields are
* merged to a single field, using the merge functor functor, which is specified
* by the `Mrg` template-parameter. This functor should provide an operator with
* the following prototype:
@ -46,48 +43,39 @@ namespace CGAL {
* `XData operator() (const XData& d1, const XData& d2) const;`
*
* which returns a single data object that represents the merged data field of
* `d1` and `d2`. The \f$ x\f$-monotone curve that represents the overlap is
* `d1` and `d2`. The \f$x\f$-monotone curve that represents the overlap is
* associated with the output of this functor.
*
* \cgalModels{ArrangementTraits_2}
* \cgalModels{AosTraits_2}
*/
template <typename Tr, typename XData, typename Mrg, typename CData, typename Cnv>
class Arr_curve_data_traits_2 : public Tr {
public:
/// \name Types
/// @{
/*! the base traits-class.
*/
/// the base traits-class.
typedef Tr 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;
/*! the point type.
*/
/// the point type.
typedef typename Base_traits_2::Point_2 Point_2;
/*! the merge functor.
*/
/// the merge functor.
typedef Mrg Merge;
/*! the conversion functor.
*/
/// the conversion functor.
typedef Cnv Convert;
/*! the type of data associated with curves.
*/
/// the type of data associated with curves.
typedef CData Curve_data;
/*! the type of data associated with \f$ x\f$-monotone curves.
*/
/// the type of data associated with \f$x\f$-monotone curves.
typedef XData X_monotone_curve_data;
/// @}
@ -97,7 +85,6 @@ public:
*/
class Curve_2 : public Base_curve_2 {
public:
/// \name Creation
/// @{
@ -129,7 +116,6 @@ public:
void set_data(const Curve_data& data);
/// @}
}; /* end Arr_curve_data_traits_2::Curve_2 */
/*! The `X_monotone_curve_2` class nested within the curve-data traits extends
@ -137,20 +123,19 @@ public:
*/
class X_monotone_curve_2 : public Base_x_monotone_curve_2 {
public:
/// \name Creation
/// @{
/*! constructs default */
X_monotone_curve_2();
/*! constructs an \f$ x\f$-monotone curve from the given `base` curve with
/*! constructs an \f$x\f$-monotone curve from the given `base` curve with
* uninitialized data field.
*/
X_monotone_curve_2(const Base_x_monotone_curve_2& base);
/*! constructs an \f$ x\f$-monotone curve from the given `base` \f$
* x\f$-monotone curve with an attached `data` field.
/*! constructs an \f$x\f$-monotone curve from the given `base`
* \f$x\f$-monotone curve with an attached `data` field.
*/
X_monotone_curve_2(const Base_x_monotone_curve_2& base,
const X_monotone_curve_data& data);
@ -170,9 +155,7 @@ public:
void set_data(const X_monotone_curve_data& data);
/// @}
}; /* end Arr_curve_data_traits_2::X_monotone_curve_2 */
}; /* end Arr_curve_data_traits_2 */
} /* end namespace CGAL */

View File

@ -7,8 +7,8 @@ namespace CGAL {
* class templates and other templates. It is parameterized by a geometry
* traits type and optionally by a vertex, halfedge, or face types. By default,
* the `Arr_dcel` class template uses the \link
* ArrangementBasicTraits_2::Point_2 `Point_2`\endlink and \link
* ArrangementBasicTraits_2::X_monotone_curve_2 `X_monotone_curve_2`\endlink
* AosBasicTraits_2::Point_2 `Point_2`\endlink and \link
* AosBasicTraits_2::X_monotone_curve_2 `X_monotone_curve_2`\endlink
* types nested in the traits type to instantiate the vertex and base halfedge
* types, respectively. Thus, by default the \dcel only stores the topological
* incidence relations and the geometric data attached to vertices and
@ -16,15 +16,15 @@ namespace CGAL {
* overridden. Notice that if the vertex and halfedge types are overridden, the
* traits type is ignored.
*
* \cgalModels{ArrangementDcelWithRebind}
* \cgalModels{AosDcelWithRebind}
*
* \tparam Traits a geometry traits type, which is a model of the
* `ArrangementBasicTraits_2` concept.
* \tparam V the vertex type, which is a model of the `ArrangementDcelVertex`
* `AosBasicTraits_2` concept.
* \tparam V the vertex type, which is a model of the `AosDcelVertex`
* concept.
* \tparam H the halfedge type, which is a model of the
* `ArrangementDcelHalfedge` concept.
* \tparam F the face type, which is a model of the `ArrangementDcelFace`
* `AosDcelHalfedge` concept.
* \tparam F the face type, which is a model of the `AosDcelFace`
* concept.
*
* \sa `Arr_dcel_base<V, H, F>`
@ -33,7 +33,6 @@ template <typename Traits,
typename V = Arr_vertex_base<typename Traits::Point_2>,
typename H = Arr_halfedge_base<typename Traits::X_monotone_curve_2>,
typename F = Arr_face_base>
class Arr_dcel : public Arr_dcel_base<V, H, F> {
};
class Arr_dcel : public Arr_dcel_base<V, H, F> {};
} /* end namespace CGAL */

View File

@ -1,71 +1,46 @@
namespace CGAL {
/*!
\ingroup PkgArrangementOnSurface2DCEL
\anchor arr_refarr_dcel_base
The `Arr_dcel_base` class is an important ingredient in the
definition of \dcel data structures. It serves as a basis class for
any instance of the `Dcel` template parameter of the
`Arrangement_2` template. In particular it is the basis class of
the default `Dcel` template parameter, and the basis class of any
extended \dcel. The template parameters `V`, `H`, and `F`
must be instantiated with models of the concepts
`ArrangementDcelVertex`, `ArrangementDcelHalfedge`,
and `ArrangementDcelFace` respectively.
\cgalModels{ArrangementDcel}
*/
template< typename V, typename H, typename F >
/*! \ingroup PkgArrangementOnSurface2DCEL
*
* \anchor arr_refarr_dcel_base
*
* The `Arr_dcel_base` class is an important ingredient in the definition of
* \dcel data structures. It serves as a basis class for any instance of the
* `Dcel` template parameter of the `Arrangement_2` template. In particular it
* is the basis class of the default `Dcel` template parameter, and the basis
* class of any extended \dcel. The template parameters `V`, `H`, and `F` must
* be instantiated with models of the concepts `AosVertex`, `AosHalfedge`, and
* `AosFace` respectively.
*
* \cgalModels{Aos}
*/
template <typename V, typename H, typename F>
class Arr_dcel_base {
public:
/*! The basic \dcel face type. Serves as a basis class for an extended
* face record with auxiliary data fields.
*
* \cgalModels{AosFace}
*/
class Arr_face_base {};
/*! The basic \dcel halfedge type. Serves as a basis class for an extended
* halfedge record with auxiliary data fields. The `Curve` parameter is the
* type of \f$x\f$-monotone curves associated with the vertices.
*
* \cgalModels{AosHalfedge}
*/
template <typename Curve>
class Arr_halfedge_base {};
/*!
The basic \dcel face type. Serves as a basis class for an extended
face record with auxiliary data fields.
\cgalModels{ArrangementDcelFace}
*/
class Arr_face_base {
}; /* end Arr_dcel_base::Arr_face_base */
/*!
The basic \dcel halfedge type. Serves as a basis class for an
extended halfedge record with auxiliary data fields. The `Curve`
parameter is the type of \f$ x\f$-monotone curves associated with the vertices.
\cgalModels{ArrangementDcelHalfedge}
*/
template< typename Curve >
class Arr_halfedge_base {
}; /* end Arr_dcel_base::Arr_halfedge_base */
/*!
The basic \dcel vertex type. Serves as a basis class for an extended
vertex record with auxiliary data fields. The `Point` parameter is
the type of points associated with the vertices.
\cgalModels{ArrangementDcelVertex}
*/
template< typename Point >
class Arr_vertex_base {
}; /* end Arr_dcel_base::Arr_vertex_base */
/*! The basic \dcel vertex type. Serves as a basis class for an extended
* vertex record with auxiliary data fields. The `Point` parameter is the
* type of points associated with the vertices.
*
* \cgalModels{AosVertex}
*/
template <typename Point>
class Arr_vertex_base {};
}; /* end Arr_dcel_base */
} /* end namespace CGAL */

View File

@ -5,17 +5,17 @@ namespace CGAL {
* The default \dcel class used by the `Arrangement_2`,
* `Arr_bounded_planar_topology_traits_2`, `Arr_unb_planar_topology_traits_2`
* class templates and other templates. It is parameterized by a geometry
* traits type. It uses the \link ArrangementBasicTraits_2::Point_2
* `Point_2`\endlink and \link ArrangementBasicTraits_2::X_monotone_curve_2
* traits type. It uses the \link AosBasicTraits_2::Point_2
* `Point_2`\endlink and \link AosBasicTraits_2::X_monotone_curve_2
* `X_monotone_curve_2`\endlink types nested in the traits type to instantiate
* the vertex and base halfedge types, respectively. Thus, by default the \dcel
* only stores the topological incidence relations and the geometric data
* attached to vertices and edges.
*
* \cgalModels{ArrangementDcelWithRebind}
* \cgalModels{AosDcelWithRebind}
*
* \tparam Traits a geometry traits type, which is a model of the
* `ArrangementBasicTraits_2` concept.
* `AosBasicTraits_2` concept.
*
* \sa `Arr_dcel<Traits, V, H, F>`
* \sa `Arr_dcel_base<V, H, F>`

View File

@ -1,57 +1,45 @@
namespace CGAL {
/*!
\ingroup PkgArrangementOnSurface2TraitsClasses
\ingroup PkgArrangementOnSurface2Overlay
/*! \ingroup PkgArrangementOnSurface2TraitsClasses
* \ingroup PkgArrangementOnSurface2Overlay
*
* An instance of `Arr_default_overlay_traits` should be used for overlaying two
* arrangements of type `Arrangement` that store no auxiliary data with their
* \dcel records, where the resulting overlaid arrangement stores no auxiliary
* \dcel data as well. This class simply gives empty implementation for all
* traits-class functions.
*
* \cgalModels{OverlayTraits}
*
* \sa `overlay`
*/
template <typename Arrangement>
class Arr_default_overlay_traits {};
An instance of `Arr_default_overlay_traits` should be used for overlaying two arrangements
of type `Arrangement` that store no auxiliary data with their \dcel records, where the resulting overlaid arrangement stores no auxiliary
\dcel data as well. This class simply gives empty implementation for all
traits-class functions.
/*! \ingroup PkgArrangementOnSurface2TraitsClasses
* \ingroup PkgArrangementOnSurface2Overlay
*
* An instance of `Arr_face_overlay_traits` should be used for overlaying two
* arrangements of types `Arr_A` and `Arr_B`, which are instantiated using the
* same geometric traits-class and with the \dcel classes `Dcel_A` and `Dcel_B`
* respectively, in order to store their overlay in an arrangement of type
* `Arr_R`, which is instantiated using a third \dcel class `Dcel_R`. All three
* \dcel classes are assumed to be instantiations of the
* `Arr_face_extended_dcel` template with types `FaceData_A`, `FaceData_B` and
* `FaceData_R`, respectively.
*
* This class gives empty implementation for all overlay traits-class functions,
* except the function that computes the overlay of two faces. In this case, it
* uses the functor `OvlFaceData`, which accepts a `FaceData_A` object and a
* `FaceData_B` object and computes a corresponding `FaceData_R` object, in
* order to set the auxiliary data of the overlay face.
*
* \cgalModels{OverlayTraits}
*
* \sa `overlay`
* \sa `CGAL::Arr_face_extended_dcel<Traits,FData,V,H,F>`
*/
template <typename Arr_A, typename Arr_B, typename Arr_R, typename OvlFaceData>
class Arr_face_overlay_traits {};
\cgalModels{OverlayTraits}
\sa `overlay`
*/
template< typename Arrangement >
class Arr_default_overlay_traits {
public:
}; /* end Arr_default_overlay_traits */
} /* end namespace CGAL */
namespace CGAL {
/*!
\ingroup PkgArrangementOnSurface2TraitsClasses
\ingroup PkgArrangementOnSurface2Overlay
An instance of `Arr_face_overlay_traits` should be used for overlaying two arrangements
of types `Arr_A` and `Arr_B`, which are instantiated using the same
geometric traits-class and with the \dcel classes `Dcel_A` and
`Dcel_B` respectively, in order to store their overlay in an arrangement
of type `Arr_R`, which is instantiated using a third \dcel class
`Dcel_R`. All three \dcel classes are assumed to be instantiations of the
`Arr_face_extended_dcel` template with types `FaceData_A`,
`FaceData_B` and `FaceData_R`, respectively.
This class gives empty implementation for all overlay traits-class functions,
except the function that computes the overlay of two faces. In this case,
it uses the functor `OvlFaceData`, which accepts a `FaceData_A` object
and a `FaceData_B` object and computes a corresponding `FaceData_R`
object, in order to set the auxiliary data of the overlay face.
\cgalModels{OverlayTraits}
\sa `overlay`
\sa `CGAL::Arr_face_extended_dcel<Traits,FData,V,H,F>`
*/
template< typename Arr_A, typename Arr_B, typename Arr_R, typename OvlFaceData >
class Arr_face_overlay_traits {
public:
}; /* end Arr_face_overlay_traits */
} /* end namespace CGAL */

View File

@ -6,7 +6,7 @@ namespace CGAL {
* \f$x\f$-monotone curve. It is used by models geometry traits concept that
* handle boundary conditions.
*
* \sa `ArrangementOpenBoundaryTraits_2`
* \sa `AosOpenBoundaryTraits_2`
*/
enum Arr_curve_end { ARR_MIN_END, ARR_MAX_END };

View File

@ -1,246 +1,208 @@
namespace CGAL {
/*!
\ingroup PkgArrangementOnSurface2DCEL
/*! \ingroup PkgArrangementOnSurface2DCEL
*
* The `Arr_extended_dcel` class-template extends the topological-features of
* the \dcel namely the vertex, halfedge, and face types. While it is possible
* to maintain extra (non-geometric) data with the curves or points of the
* arrangement by extending their types respectively, it is also possible to
* extend the vertex, halfedge, or face types of the \dcel through
* inheritance. As the technique to extend these types is somewhat cumbersome
* and difficult for inexperienced users, the `Arr_extended_dcel` class-template
* provides a convenient way to do that. Each one of the three features is
* extended with a corresponding data type provided as parameters. This class
* template is also parameterized with a traits class used to extract default
* values for the vertex, halfedge, and face base classes, which are the
* remaining three template parameters respectively. The default values follow:
*
* <TABLE><TR><TD ALIGN=LEFT VALIGN=TOP NOWRAP>
*
* `V` =
* <TD ALIGN=LEFT VALIGN=TOP NOWRAP>
* `Arr_vertex_base<typename Traits::Point_2>`
* <TR><TD ALIGN=LEFT VALIGN=TOP NOWRAP>
* `H` =
* <TD ALIGN=LEFT VALIGN=TOP NOWRAP>
* `Arr_halfedge_base<typename Traits::X_monotone_curve_2>`
* <TR><TD ALIGN=LEFT VALIGN=TOP NOWRAP>
* `F` =
* <TD ALIGN=LEFT VALIGN=TOP NOWRAP>
* `Arr_face_base`
*
* </TABLE>
*
* \cgalModels{AosDcelWithRebind}
*
* \sa `Arr_dcel_base<V,H,F>`
*/
template <typename Traits, typename VData, typename HData, typename FData,
typename V, typename H, typename F>
class Arr_extended_dcel : public Arr_dcel_base<Arr_extended_vertex<V, VData>,
Arr_extended_halfedge<H, HData>,
Arr_extended_face<F, FData>>
{};
The `Arr_extended_dcel` class-template extends the topological-features of the \dcel
namely the vertex, halfedge, and face types. While it is possible to maintain
extra (non-geometric) data with the curves or points of the arrangement by
extending their types respectively, it is also possible to extend the vertex,
halfedge, or face types of the \dcel through inheritance. As the technique to
extend these types is somewhat cumbersome and difficult for inexperienced
users, the `Arr_extended_dcel` class-template provides a convenient way to do that.
Each one of the three features is extended with a corresponding data type
provided as parameters. This class template is also parameterized with a
traits class used to extract default values for the vertex, halfedge, and face
base classes, which are the remaining three template parameters respectively.
The default values follow:
<TABLE><TR><TD ALIGN=LEFT VALIGN=TOP NOWRAP>
`V` =
<TD ALIGN=LEFT VALIGN=TOP NOWRAP>
`Arr_vertex_base<typename Traits::Point_2>`
<TR><TD ALIGN=LEFT VALIGN=TOP NOWRAP>
`H` =
<TD ALIGN=LEFT VALIGN=TOP NOWRAP>
`Arr_halfedge_base<typename Traits::X_monotone_curve_2>`
<TR><TD ALIGN=LEFT VALIGN=TOP NOWRAP>
`F` =
<TD ALIGN=LEFT VALIGN=TOP NOWRAP>
`Arr_face_base`
</TABLE>
\cgalModels{ArrangementDcelWithRebind}
\sa `Arr_dcel_base<V,H,F>`
*/
template< typename Traits, typename VData, typename HData, typename FData, typename V, typename H, typename F >
class Arr_extended_dcel
: public Arr_dcel_base<Arr_extended_vertex<V, VData>,
Arr_extended_halfedge<H, HData>,
Arr_extended_face<F, FData> >
{
}; /* end Arr_extended_dcel */
} /* end namespace CGAL */
namespace CGAL {
/*!
\ingroup PkgArrangementOnSurface2DCEL
The `Arr_extended_face` class-template extends the face topological-features of the
\dcel. It is parameterized by a face base-type `FaceBase` and a data type
`FData` used to extend the face base-type.
\cgalModels{ArrangementDcelFace}
\sa `Arr_dcel_base<V,H,F>`
*/
template< typename FaceBase, typename FData >
/*! \ingroup PkgArrangementOnSurface2DCEL
*
* The `Arr_extended_face` class-template extends the face topological-features
* of the \dcel. It is parameterized by a face base-type `FaceBase` and a data
* type `FData` used to extend the face base-type.
*
* \cgalModels{AosDcelFace}
*
* \sa `Arr_dcel_base<V,H,F>`
*/
template <typename FaceBase, typename FData>
class Arr_extended_face : FaceBase {
public:
/// \name Creation
/// @{
/// \name Creation
/// @{
/*! assigns `f` with the contents of the `other` vertex.
*/
void assign(const Self & other);
/*!
assigns `f` with the contents of the `other` vertex.
*/
void assign (const Self & other);
/// @}
/// @}
/// \name Access Functions
/// @{
/// \name Access Functions
/// @{
/*! obtains the auxiliary data (a non-const version, returning a reference
* to a mutable data object is also available).
*/
const FData & data() const;
/*!
obtains the auxiliary data (a non-const version, returning a reference
to a mutable data object is also available).
*/
const FData & data () const;
/// @}
/// @}
/// \name Modifiers
/// @{
/// \name Modifiers
/// @{
/*!
sets the auxiliary data.
*/
void set_data (const FData & data);
/// @}
/*! sets the auxiliary data.
*/
void set_data(const FData & data);
/// @}
}; /* end Arr_extended_face */
} /* end namespace CGAL */
namespace CGAL {
/*!
\ingroup PkgArrangementOnSurface2DCEL
The `Arr_extended_halfedge` class-template extends the halfedge topological-features of
the \dcel. It is parameterized by a halfedge base-type `HalfedgeBase`
and a data type `HData` used to extend the halfedge base-type.
\cgalModels{ArrangementDcelHalfedge}
\sa `Arr_dcel_base<V,H,F>`
*/
template< typename HalfedgeBase, typename HData >
/*! \ingroup PkgArrangementOnSurface2DCEL
*
* The `Arr_extended_halfedge` class-template extends the halfedge
* topological-features of the \dcel. It is parameterized by a halfedge
* base-type `HalfedgeBase` and a data type `HData` used to extend the halfedge
* base-type.
*
* \cgalModels{AosDcelHalfedge}
*
* \sa `Arr_dcel_base<V,H,F>`
*/
template <typename HalfedgeBase, typename HData>
class Arr_extended_halfedge : public HalfedgeBase {
public:
/// \name Creation
/// @{
/// \name Creation
/// @{
/*! assigns `he` with the contents of the `other` vertex.
*/
void assign(const Self & other);
/*!
assigns `he` with the contents of the `other` vertex.
*/
void assign (const Self & other);
/// @}
/// @}
/// \name Access Functions
/// @{
/// \name Access Functions
/// @{
/*! obtains the auxiliary data (a non-const version, returning a reference
* to a mutable data object is also available).
*/
const HData & data() const;
/*!
obtains the auxiliary data (a non-const version, returning a reference
to a mutable data object is also available).
*/
const HData & data () const;
/// @}
/// @}
/// \name Modifiers
/// @{
/// \name Modifiers
/// @{
/*!
sets the auxiliary data.
*/
void set_data (const HData & data);
/// @}
/*! sets the auxiliary data.
*/
void set_data(const HData & data);
/// @}
}; /* end Arr_extended_halfedge */
} /* end namespace CGAL */
namespace CGAL {
/*!
\ingroup PkgArrangementOnSurface2DCEL
The `Arr_extended_vertex` class-template extends the vertex
topological-features of the \dcel. It is parameterized by a
vertex base-type `VertexBase` and a data type `VData` used to extend
the vertex base-type.
\cgalModels{ArrangementDcelVertex}
\sa `Arr_dcel_base<V,H,F>`
*/
template< typename VertexBase, typename VData >
/*! \ingroup PkgArrangementOnSurface2DCEL
*
* The `Arr_extended_vertex` class-template extends the vertex
* topological-features of the \dcel. It is parameterized by a
* vertex base-type `VertexBase` and a data type `VData` used to extend
* the vertex base-type.
*
* \cgalModels{AosDcelVertex}
*
* \sa `Arr_dcel_base<V,H,F>`
*/
template <typename VertexBase, typename VData>
class Arr_extended_vertex : public VertexBase {
public:
/// \name Creation
/// @{
/// \name Creation
/// @{
/*! assigns `v` with the contents of the `other` vertex.
*/
void assign(const Self & other);
/*!
assigns `v` with the contents of the `other` vertex.
*/
void assign (const Self & other);
/// @}
/// @}
/// \name Access Functions
/// @{
/// \name Access Functions
/// @{
/*! obtains the auxiliary data (a non-const version, returning a reference
* to a mutable data object is also available).
*/
const VData & data() const;
/*!
obtains the auxiliary data (a non-const version, returning a reference
to a mutable data object is also available).
*/
const VData & data () const;
/// @}
/// @}
/// \name Modifiers
/// @{
/// \name Modifiers
/// @{
/*!
sets the auxiliary data.
*/
void set_data (const VData & data);
/// @}
/*! sets the auxiliary data.
*/
void set_data(const VData & data);
/// @}
}; /* end Arr_extended_vertex */
} /* end namespace CGAL */
namespace CGAL {
/*!
\ingroup PkgArrangementOnSurface2DCEL
The `Arr_face_extended_dcel` class-template extends the \dcel face-records, making it
possible to store extra (non-geometric) data with the arrangement faces.
The class should be instantiated by an `FData` type which represents the
extra data stored with each face.
Note that all types of \dcel features (namely vertex, halfedge and face)
are provided as template parameters. However, by default they are defined
as follows:
<TABLE><TR><TD ALIGN=LEFT VALIGN=TOP NOWRAP>
`V` =
<TD ALIGN=LEFT VALIGN=TOP NOWRAP>
`Arr_vertex_base<typename Traits::Point_2>`
<TR><TD ALIGN=LEFT VALIGN=TOP NOWRAP>
`H` =
<TD ALIGN=LEFT VALIGN=TOP NOWRAP>
`Arr_halfedge_base<typename Traits::X_monotone_curve_2>`
<TR><TD ALIGN=LEFT VALIGN=TOP NOWRAP>
`F` =
<TD ALIGN=LEFT VALIGN=TOP NOWRAP>
`Arr_face_base`
</TABLE>
\cgalModels{ArrangementDcelWithRebind}
\sa `Arr_dcel_base<V,H,F>`
*/
template< typename Traits, typename FData, typename V, typename H, typename F >
class Arr_face_extended_dcel : public Arr_dcel_base<V, H, Arr_extended_face<F, FData> > {
}; /* end Arr_face_extended_dcel */
/*! \ingroup PkgArrangementOnSurface2DCEL
*
* The `Arr_face_extended_dcel` class-template extends the \dcel face-records,
* making it possible to store extra (non-geometric) data with the arrangement
* faces. The class should be instantiated by an `FData` type which represents
* the extra data stored with each face.
*
* Note that all types of \dcel features (namely vertex, halfedge and face)
* are provided as template parameters. However, by default they are defined
* as follows:
*
* <TABLE><TR><TD ALIGN=LEFT VALIGN=TOP NOWRAP>
*
* `V` =
* <TD ALIGN=LEFT VALIGN=TOP NOWRAP>
* `Arr_vertex_base<typename Traits::Point_2>`
* <TR><TD ALIGN=LEFT VALIGN=TOP NOWRAP>
* `H` =
* <TD ALIGN=LEFT VALIGN=TOP NOWRAP>
* `Arr_halfedge_base<typename Traits::X_monotone_curve_2>`
* <TR><TD ALIGN=LEFT VALIGN=TOP NOWRAP>
* `F` =
* <TD ALIGN=LEFT VALIGN=TOP NOWRAP>
* `Arr_face_base`
*
* </TABLE>
*
* \cgalModels{AosDcelWithRebind}
*
* \sa `Arr_dcel_base<V,H,F>`
*/
template <typename Traits, typename FData, typename V, typename H, typename F>
class Arr_face_extended_dcel :
public Arr_dcel_base<V, H, Arr_extended_face<F, FData>> {};
} /* end namespace CGAL */

View File

@ -1,69 +1,64 @@
namespace CGAL {
/*! \ingroup PkgArrangementOnSurface2Ref
*
* `Arr_face_index_map` maintains a mapping of face handles of an attached
* arrangement object to indices (of type `unsigned int`). This class template
* is a model of the concept `ReadablePropertyMap`. A mapping between face
* handles and indices enables convenient usage of property-map classes supplied
* by `boost`. For example, the property-map class templates
* `boost::vector_property_map`, which is based on `std::vector`, and
* `boost::iterator_property_map`, which can be used to implement a property map
* based on a native \CC array, require the user to supply a mapping such as
* `Arr_face_index_map`.
*
* As new faces might be inserted into the attached arrangement, and
* existing faces might be removed, the notification mechanism is used
* to dynamically maintain the mapping of face handles to indices.
*
* \cgalModels{DefaultConstructible,CopyConstructible,Assignable,ReadablePropertyMap}
*
* \sa `Arr_vertex_index_map<Arrangement>`
/*! \ingroup PkgArrangementOnSurface2Ref
*
* `Arr_face_index_map` maintains a mapping of face handles of an attached
* arrangement object to indices (of type `unsigned int`). This class template
* is a model of the concept `ReadablePropertyMap`. A mapping between face
* handles and indices enables convenient usage of property-map classes supplied
* by `boost`. For example, the property-map class templates
* `boost::vector_property_map`, which is based on `std::vector`, and
* `boost::iterator_property_map`, which can be used to implement a property map
* based on a native \CC array, require the user to supply a mapping such as
* `Arr_face_index_map`.
*
* As new faces might be inserted into the attached arrangement, and
* existing faces might be removed, the notification mechanism is used
* to dynamically maintain the mapping of face handles to indices.
*
* \cgalModels{DefaultConstructible,CopyConstructible,Assignable,ReadablePropertyMap}
*
* \sa `Arr_vertex_index_map<Arrangement>`
*/
template <typename Arrangement_>
class Arr_face_index_map: public Arrangement_::Observer {
public:
/// \name Types
/// @{
/// the type of the attached arrangement.
typedef Arrangement_ Arrangement_2;
typedef typename Arrangement_2::Base_aos Base_aos;
typedef boost::readable_property_map_tag category;
typedef unsigned int value_type;
typedef unsigned int reference;
typedef Face_handle key_type;
/// The face handle type.
typedef typename Base_aos::Face_handle Face_handle;
/// The type of mapping of faces to indices.
typedef Unique_hash_map<Face_handle, value_type> Index_map;
/// @}
/// \name Creation
/// @{
/*! constructs a map that is unattached to any arrangement instance.
*/
Arr_face_index_map();
template <typename Arrangement_>
class Arr_face_index_map: public Arrangement_::Observer {
public:
/*! constructs a map and attaches it to the given arrangement `arr`.
*/
Arr_face_index_map(Base_aos& arr);
/// \name Types
/// @{
/*! the type of the attached arrangement.
*/
typedef Arrangement_ Arrangement_2;
typedef typename Arrangement_2::Base_aos Base_aos;
typedef boost::readable_property_map_tag category;
typedef unsigned int value_type;
typedef unsigned int reference;
typedef Face_handle key_type;
/*! The face handle type.
*/
typedef typename Base_aos::Face_handle Face_handle;
/*! The type of mapping of faces to indices.
*/
typedef Unique_hash_map<Face_handle, value_type> Index_map;
/// @}
/// \name Creation
/// @{
/*! constructs a map that is unattached to any arrangement instance.
*/
Arr_face_index_map();
/*! constructs a map and attaches it to the given arrangement `arr`.
*/
Arr_face_index_map(Base_aos& arr);
/// @}
}; /* end Arr_accessor */
/// @}
}; /* end Arr_accessor */
} /* end namespace CGAL */

View File

@ -1,451 +1,452 @@
namespace CGAL {
/*! \ingroup PkgArrangementOnSurface2TraitsClasses
*
* The traits class `Arr_geodesic_arc_on_sphere_traits_2` is a model of the
* `ArrangementTraits_2` concept. It enables the construction and
* maintenance of arrangements of arcs of great circles (also known as
* geodesic arcs) that lie on the sphere (centered at the origin). Almost
* all operations on arrangements require a kernel that supports exact
* predicates. Most operations also require a kernel that supports exact
* constructions. However, all operations on such arrangements can be
* computed efficiently, since all calculations are performed with
* rational arithmetic.
*
* There is an analogy between this class of arrangements and the class of
* planar arrangements induced by linear curves (i.e., segments, rays, and
* lines), as properties of linear curves in the plane often, but not always,
* hold for geodesic arcs on the sphere. For example, given any two
* non-antipodal points on the sphere there exists a unique great circle
* connecting the two points.
*
* We use the following parameterization of the unit sphere \f$S =
* \phi_S(\Phi)\f$: \f$\Phi = [\alpha, 2\pi + \alpha] \times [-\frac{\pi}{2},
* \frac{\pi}{2}]\f$, \f$\phi_S(x, y) = (\cos y \cos x, \sin y \cos x, \sin
* x)\f$, where \f$\alpha = \arctan(X, Y)\f$. By default, \f$X = -1, Y = 0\f$,
* which implies \f$\alpha = \pi\f$, and a default parameterization \f$\Phi =
* [-\pi, \pi] \times [-\frac{\pi}{2}, \frac{\pi}{2}]\f$. The equator curve,
* for example, is given by \f$\gamma(t) = (\pi(2t - 1) + \alpha, 0)\f$, for
* \f$t \in [0,1]\f$. This parameterization induces two contraction points
* \f$p_s = (0, 0, -1) = \phi_S(y,-\frac{\pi}{2})\f$ and \f$p_n = (0, 0, 1) =
* \phi_S(y,\frac{\pi}{2})\f$, referred to as the south and north poles,
* respectively, and an identification curve \f$\{\phi_S(\pi +
* \alpha,x)\,|\,-\frac{\pi}{2} \leq v \leq \frac{\pi}{2}\}\f$, as
* \f$\phi_S(-\pi + \alpha,v) = \phi_S(+\pi + \alpha,v)\f$ for all \f$x\f$
* (which coincides with the opposite Prime (Greenwich) Meridian when
* \f$\alpha = \pi\f$). The elements that substitutes the template parameters
* `X` and `Y` when `Arr_geodesic_arc_on_sphere_traits_2<Kernel, X, Y>` is
* instantiated must be integral values that define a not necessarily
* normalized vector \f$(x,y)\f$ in the \f$xy\f$-plane that bisects the
* identification curve.
/*! \ingroup PkgArrangementOnSurface2TraitsClasses
*
* The traits class `Arr_geodesic_arc_on_sphere_traits_2` is a model of the
* `AosTraits_2` concept. It enables the construction and
* maintenance of arrangements of arcs of great circles (also known as
* geodesic arcs) that lie on the sphere (centered at the origin). Almost
* all operations on arrangements require a kernel that supports exact
* predicates. Most operations also require a kernel that supports exact
* constructions. However, all operations on such arrangements can be
* computed efficiently, since all calculations are performed with
* rational arithmetic.
*
* There is an analogy between this class of arrangements and the class of
* planar arrangements induced by linear curves (i.e., segments, rays, and
* lines), as properties of linear curves in the plane often, but not always,
* hold for geodesic arcs on the sphere. For example, given any two
* non-antipodal points on the sphere there exists a unique great circle
* connecting the two points.
*
* We use the following parameterization of the unit sphere \f$S =
* \phi_S(\Phi)\f$: \f$\Phi = [\alpha, 2\pi + \alpha] \times [-\frac{\pi}{2},
* \frac{\pi}{2}]\f$, \f$\phi_S(x, y) = (\cos y \cos x, \sin y \cos x, \sin
* x)\f$, where \f$\alpha = \arctan(X, Y)\f$. By default, \f$X = -1, Y = 0\f$,
* which implies \f$\alpha = \pi\f$, and a default parameterization \f$\Phi =
* [-\pi, \pi] \times [-\frac{\pi}{2}, \frac{\pi}{2}]\f$. The equator curve,
* for example, is given by \f$\gamma(t) = (\pi(2t - 1) + \alpha, 0)\f$, for
* \f$t \in [0,1]\f$. This parameterization induces two contraction points
* \f$p_s = (0, 0, -1) = \phi_S(y,-\frac{\pi}{2})\f$ and \f$p_n = (0, 0, 1) =
* \phi_S(y,\frac{\pi}{2})\f$, referred to as the south and north poles,
* respectively, and an identification curve \f$\{\phi_S(\pi +
* \alpha,x)\,|\,-\frac{\pi}{2} \leq v \leq \frac{\pi}{2}\}\f$, as
* \f$\phi_S(-\pi + \alpha,v) = \phi_S(+\pi + \alpha,v)\f$ for all \f$x\f$
* (which coincides with the opposite Prime (Greenwich) Meridian when
* \f$\alpha = \pi\f$). The elements that substitutes the template parameters
* `X` and `Y` when `Arr_geodesic_arc_on_sphere_traits_2<Kernel, X, Y>` is
* instantiated must be integral values that define a not necessarily
* normalized vector \f$(x,y)\f$ in the \f$xy\f$-plane that bisects the
* identification curve.
* \cgalModels{ArrangementTraits_2,ArrangementLandmarkTraits_2,ArrangementSphericalBoundaryTraits_2}
* \cgalModels{AosTraits_2,AosLandmarkTraits_2,AosApproximateTraits_2,AosSphericalBoundaryTraits_2}
*/
template <typename Kernel, typename X, typename Y>
class Arr_geodesic_arc_on_sphere_traits_2 {
public:
/*! The `Point_2` class nested within the traits is used to represent a
* point on a sphere centered at the origin. The point is in fact a
* not-necessarily normalized 3D direction extended with information that
* specifies the location of the point pre-image in the parameter space.
*
* \cgalModels{Assignable,DefaultConstructible,CopyConstructible}
*/
template <typename Kernel, typename X, typename Y>
class Arr_geodesic_arc_on_sphere_traits_2 {
class Point_2 {
public:
/*! The `Point_2` class nested within the traits is used to represent a
* point on a sphere centered at the origin. The point is in fact a
* not-necessarily normalized 3D direction extended with information that
* specifies the location of the point pre-image in the parameter space.
*
* \cgalModels{Assignable,DefaultConstructible,CopyConstructible}
/// \name Enumeration types
/// @{
/*! The location type indicates a location in the parameter space.
*/
class Point_2 {
public:
/// \name Enumeration types
/// @{
enum Location_type {
/// Internal to the parameter space.
NO_BOUNDARY_LOC = 0,
/*! The location type indicates a location in the parameter space.
*/
enum Location_type {
/// Internal to the parameter space.
NO_BOUNDARY_LOC = 0,
/// The bottom side boundary of the parameter space (the south pole).
MIN_BOUNDARY_LOC,
/// The bottom side boundary of the parameter space (the south pole).
MIN_BOUNDARY_LOC,
/// The identified left and right side boundaries of the parameter space.
MID_BOUNDARY_LOC,
/// The identified left and right side boundaries of the parameter space.
MID_BOUNDARY_LOC,
/// The top side boundary of the parameter space (the north pole).
MAX_BOUNDARY_LOC
};
/// @}
/// \name Types
/// @{
typedef Kernel::Direction_3 Direction_3;
/// @}
/// \name Creation
/// @{
/*! 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.
*/
Point_2(const Direction_3& dir, Location_type location);
/// @}
/// \name Operations
/// @{
/*! 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);
/*! obtains the location of the point.
* \return the location of the point pre-image in the parameter space.
*/
Location_type location() const;
/// @}
/// The top side boundary of the parameter space (the north pole).
MAX_BOUNDARY_LOC
};
/// @}
/*! The `X_monotone_curve_2` class nested within the traits is used to
* represent an \f$x\f$-monotone geodesic arc on the a sphere centered at
* the origin. The pre-image of an \f$x\f$-monotone geodesic arc does not
* intersect the identified left and right sides of the boundary of the
* parameter space.
*
* \cgalModels{Assignable,DefaultConstructible,CopyConstructible}
/// \name Types
/// @{
typedef Kernel::Direction_3 Direction_3;
/// @}
/// \name Creation
/// @{
/*! 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.
*/
class X_monotone_curve_2 {
public:
/// \name Types
/// @{
typedef Arr_geodesic_arc_on_sphere_traits_2<Kernel, X, Y>::Point_2 Point_2;
/// @}
Point_2(const Direction_3& dir, Location_type location);
/// \name Creation
/// @{
/// @}
/*! 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.
* \param[in] is_vertical is the arc vertical ?
* \param[in] is_directed_right is the arc directed from left to right?
* \param[in] is_full is the arc a full great circle?
* \param[in] is_degenerate is the arc degenerate (single point)?
* \param[in] is_empty is the arc empty?
* \pre Both endpoints lie on the given plane.
*/
X_monotone_curve_2(const Point_2& source,
const Point_2& target,
const Direction_3& normal,
bool is_vertical,
bool is_directed_right,
bool is_full = false,
bool is_degenerate = false,
bool is_empty = false);
/// \name Operations
/// @{
/*! 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.
* \pre Both endpoints lie on the given plane.
*/
X_monotone_curve_2(const Point_2& source,
const Point_2& target,
const Direction_3& normal);
/*! 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.
* \pre the point pre-image lies on the identified left and right sides
* of the boundary of the parameter space.
*/
X_monotone_curve_2(const Point_2& point,
const Direction_3& normal);
/// @}
/// \name Operations
/// @{
/*! sets the source endpoint.
* \param[in] source the updated source endpoint.
*/
void set_source(const Point_2& source);
/*! 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.
* \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.
* \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
* 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.
* \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.
* \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.
* \param[in] flag indicates whether the arc is empty.
*/
void set_is_empty(bool flag);
/*! obtains the source point.
*/
const Point_2& source() const;
/*! obtains the target point.
*/
const Point_2& target() const;
/*! obtains the normal to the containing plane.
*/
const Direction_3& normal() const;
/*! obtains the (lexicographically) left endpoint direction.
*/
const Point_2& left() const;
/*! obtains the (lexicographically) right endpoint.
*/
const Point_2& right() const;
/*! determines whether the arc is vertical.
*/
bool is_vertical() const;
/*! determines whether the arc is directed lexicographically from left to
* right.
*/
bool is_directed_right() const;
/*! determines whether the arc is a great circle.
*/
bool is_full() const;
/*! determines whether the arc is degenerate.
*/
bool is_degenerate() const;
/*! determines whether the arc is empty. */
bool is_empty() const;
/*! determines whether the arc is a meridian.
*/
bool is_meridian() const;
/// @}
};
/*!
/*! 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.
*/
class Curve_2 {
public:
/// \name Types
/// @{
typedef Arr_geodesic_arc_on_sphere_traits_2<Kernel, X, Y>::Point_2 Point_2;
/// @}
void set_location(Location_type location);
/// \name Creation
/// @{
/// @}
/// \name Operations
/// @{
/// @}
};
/*! Construction functor of a point.
*
* \cgalModels{Assignable,CopyConstructible,AdaptableUnaryFunction,AdaptableTernaryFunction}
/*! obtains the location of the point.
* \return the location of the point pre-image in the parameter space.
*/
Location_type location() const;
/*!
*/
class Construct_point_2 {
public:
/// \name Types
/// @{
typedef Arr_geodesic_arc_on_sphere_traits_2<Kernel, X, Y>::Point_2 result_type;
typedef typename Kernel::FT FT;
typedef typename Kernel::Direction_3 Direction_3;
/// @}
/// \name Operations
/// @{
/*! 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
* \param[in] z the z coordinate
*/
Point_2 operator()(const FT& x, const FT& y, const FT& z);
/*! constructs a point on the sphere from a (not necessarily normalized)
* direction.
* \param other the other direction
*/
Point_2 operator()(const Direction_3& other);
/// @}
};
/*! Construction functor of \f$x\f$-monotone geodesic arcs.
*
* \cgalModels{Assignable,CopyConstructible,AdaptableUnaryFunction,AdaptableBinaryFunction,AdaptableTernaryFunction}
*/
class Construct_x_monotone_curve_2 {
public:
/// \name Types
/// @{
typedef Arr_geodesic_arc_on_sphere_traits_2<Kernel, X, Y>::Point_2 Point_2;
typedef Arr_geodesic_arc_on_sphere_traits_2<Kernel, X, Y>::X_monotone_curve_2 result_type;
typedef Kernel::Direction_3 Direction_3;
typedef Direction_3 argument_type;
/// @}
/// \name Operations
/// @{
/*! 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.
* 2. If it is x-monotone,
* 2.1 Find out whether it is vertical, and
* 2.2 whether the target is larger than the source (directed right).
*
* An arc is vertical, iff
* 1. one of its endpoint direction pierces a pole, or
* 2. the projections of the endpoint directions onto the xy-plane coincide.
* \param[in] p the first endpoint.
* \param[in] q the second endpoint.
* \pre p and q must not coincide.
* \pre p and q cannot be antipodal.
* \pre The constructed minor arc does not intersect the identification
* curve in its interior.
*/
X_monotone_curve_2 operator()(const Point_2& p, const Point_2& q);
/*! 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.
* \param normal the normal to the plane containing the great circle.
* \pre the plane is not vertical.
*/
X_monotone_curve_2 operator()(const Direction_3& normal);
/*! 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
* to select the appropriate normal.
* \param[in] p the first endpoint.
* \param[in] q the second endpoint.
* \param[in] normal the normal to the oriented plane containing the arc.
* \pre Both endpoints lie on the given oriented plane.
* \pre The constructed arc does not intersect the identification curve
* in its interior.
*/
X_monotone_curve_2 operator()(const Point_2& p, const Point_2& q,
const Direction_3& normal);
/// @} /* end of operations */
};
/*! Construction functor of geodesic arcs.
*
* \cgalModels{Assignable,CopyConstructible,AdaptableUnaryFunction,AdaptableBinaryFunction,AdaptableTernaryFunction}
*/
class Construct_curve_2 {
public:
/// \name Types
/// @{
typedef Arr_geodesic_arc_on_sphere_traits_2<Kernel, X, Y>::Point_2 Point_2;
typedef Arr_geodesic_arc_on_sphere_traits_2<Kernel, X, Y>::Curve_2 result_type;
typedef Kernel::Direction_3 Direction_3;
typedef Direction_3 argument_type;
/// @}
/// \name Operations
/// @{
/*! 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);
/*! 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.
* 2. If it is x-monotone,
* 1. Find out whether it is vertical, and
* 2. whether the target is larger than the source (directed right).
*
* An arc is vertical, iff
* 1. one of its endpoint direction pierces a pole, or
* 2. the projections of the endpoint directions onto the xy-plane coincide.
*
* \param[in] p the first endpoint.
* \param[in] q the second endpoint.
* \pre p and q must not coincide.
* \pre p and q cannot be antipodal.
*/
Curve_2 operator()(const Point_2& p, const Point_2& q);
/*! 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
* to select the appropriate normal.
* \param[in] p the first endpoint.
* \param[in] q the second endpoint.
* \param[in] normal the normal to the oriented plane containing the arc.
* \pre Both endpoints lie on the given oriented plane.
*/
Curve_2 operator()(const Point_2& p, const Point_2& q,
const Direction_3& normal);
/// @}
};
/*! returns an instance of `Construct_point_2`.
*/
Construct_point_2 construct_point_2_object() const;
/*! 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`.
*/
Construct_curve_2 construct_curve_2_object() const;
/// @}
};
/*! The `X_monotone_curve_2` class nested within the traits is used to
* represent an \f$x\f$-monotone geodesic arc on the a sphere centered at
* the origin. The pre-image of an \f$x\f$-monotone geodesic arc does not
* intersect the identified left and right sides of the boundary of the
* parameter space.
*
* \cgalModels{Assignable,DefaultConstructible,CopyConstructible}
*/
class X_monotone_curve_2 {
public:
/// \name Types
/// @{
typedef Arr_geodesic_arc_on_sphere_traits_2<Kernel, X, Y>::Point_2 Point_2;
/// @}
/// \name Creation
/// @{
/*! 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.
* \param[in] is_vertical is the arc vertical ?
* \param[in] is_directed_right is the arc directed from left to right?
* \param[in] is_full is the arc a full great circle?
* \param[in] is_degenerate is the arc degenerate (single point)?
* \param[in] is_empty is the arc empty?
*
* \pre Both endpoints lie on the given plane.
*/
X_monotone_curve_2(const Point_2& source,
const Point_2& target,
const Direction_3& normal,
bool is_vertical,
bool is_directed_right,
bool is_full = false,
bool is_degenerate = false,
bool is_empty = false);
/*! constructs 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.
*
* \pre Both endpoints lie on the given plane.
*/
X_monotone_curve_2(const Point_2& source,
const Point_2& target,
const Direction_3& normal);
/*! constructs 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.
* \pre the point pre-image lies on the identified left and right sides
* of the boundary of the parameter space.
*/
X_monotone_curve_2(const Point_2& point,
const Direction_3& normal);
/// @}
/// \name Operations
/// @{
/*! sets the source endpoint.
* \param[in] source the updated source endpoint.
*/
void set_source(const Point_2& source);
/*! 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.
* \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.
* \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
* 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.
* \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.
* \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.
* \param[in] flag indicates whether the arc is empty.
*/
void set_is_empty(bool flag);
/*! obtains the source point.
*/
const Point_2& source() const;
/*! obtains the target point.
*/
const Point_2& target() const;
/*! obtains the normal to the containing plane.
*/
const Direction_3& normal() const;
/*! obtains the (lexicographically) left endpoint direction.
*/
const Point_2& left() const;
/*! obtains the (lexicographically) right endpoint.
*/
const Point_2& right() const;
/*! Determines whether the arc is vertical.
*/
bool is_vertical() const;
/*! determines whether the arc is directed lexicographically from left to right.
*/
bool is_directed_right() const;
/*! determines whether the arc is a great circle.
*/
bool is_full() const;
/*! determines whether the arc is degenerate.
*/
bool is_degenerate() const;
/*! determines whether the arc is empty. */
bool is_empty() const;
/*! determines whether the arc is a meridian.
*/
bool is_meridian() const;
/// @}
};
/*!
*/
class Curve_2 {
public:
/// \name Types
/// @{
typedef Arr_geodesic_arc_on_sphere_traits_2<Kernel, X, Y>::Point_2 Point_2;
/// @}
/// \name Creation
/// @{
/// @}
/// \name Operations
/// @{
/// @}
};
/*! Construction functor of a point.
*
* \cgalModels{Assignable,CopyConstructible,AdaptableUnaryFunction,AdaptableTernaryFunction}
*/
/*!
*/
class Construct_point_2 {
public:
/// \name Types
/// @{
typedef Arr_geodesic_arc_on_sphere_traits_2<Kernel, X, Y>::Point_2 result_type;
typedef typename Kernel::FT FT;
typedef typename Kernel::Direction_3 Direction_3;
/// @}
/// \name Operations
/// @{
/*! 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
* \param[in] z the z coordinate
*/
Point_2 operator()(const FT& x, const FT& y, const FT& z);
/*! constructs a point on the sphere from a (not necessarily normalized)
* direction.
* \param other the other direction
*/
Point_2 operator()(const Direction_3& other);
/// @}
};
/*! Construction functor of \f$x\f$-monotone geodesic arcs.
*
* \cgalModels{Assignable,CopyConstructible,AdaptableUnaryFunction,AdaptableBinaryFunction,AdaptableTernaryFunction}
*/
class Construct_x_monotone_curve_2 {
public:
/// \name Types
/// @{
typedef Arr_geodesic_arc_on_sphere_traits_2<Kernel, X, Y>::Point_2 Point_2;
typedef Arr_geodesic_arc_on_sphere_traits_2<Kernel, X, Y>::X_monotone_curve_2 result_type;
typedef Kernel::Direction_3 Direction_3;
typedef Direction_3 argument_type;
/// @}
/// \name Operations
/// @{
/*! 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 \f$x\f$-monotone.
* 2. If it is \f$x\f$-monotone,
* 2.1 Find out whether it is vertical, and
* 2.2 whether the target is larger than the source (directed right).
*
* An arc is vertical, iff
* 1. one of its endpoint direction pierces a pole, or
* 2. the projections of the endpoint directions onto the \f$xy\f$-plane coincide.
* \param[in] p the first endpoint.
* \param[in] q the second endpoint.
* \pre p and q must not coincide.
* \pre p and q cannot be antipodal.
* \pre The constructed minor arc does not intersect the identification
* curve in its interior.
*/
X_monotone_curve_2 operator()(const Point_2& p, const Point_2& q);
/*! 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.
* \param normal the normal to the plane containing the great circle.
* \pre the plane is not vertical.
*/
X_monotone_curve_2 operator()(const Direction_3& normal);
/*! 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
* to select the appropriate normal.
* \param[in] p the first endpoint.
* \param[in] q the second endpoint.
* \param[in] normal the normal to the oriented plane containing the arc.
* \pre Both endpoints lie on the given oriented plane.
* \pre The constructed arc does not intersect the identification curve
* in its interior.
*/
X_monotone_curve_2 operator()(const Point_2& p, const Point_2& q,
const Direction_3& normal);
/// @} /* end of operations */
};
/*! Construction functor of geodesic arcs.
*
* \cgalModels{Assignable,CopyConstructible,AdaptableUnaryFunction,AdaptableBinaryFunction,AdaptableTernaryFunction}
*/
class Construct_curve_2 {
public:
/// \name Types
/// @{
typedef Arr_geodesic_arc_on_sphere_traits_2<Kernel, X, Y>::Point_2 Point_2;
typedef Arr_geodesic_arc_on_sphere_traits_2<Kernel, X, Y>::Curve_2 result_type;
typedef Kernel::Direction_3 Direction_3;
typedef Direction_3 argument_type;
/// @}
/// \name Operations
/// @{
/*! 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);
/*! 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 \f$x\f$-monotone.
* 2. If it is \f$x\f$-monotone,
* 1. Find out whether it is vertical, and
* 2. whether the target is larger than the source (directed right).
*
* An arc is vertical, iff
* 1. one of its endpoint direction pierces a pole, or
* 2. the projections of the endpoint directions onto the \f$xy\f$-plane coincide.
*
* \param[in] p the first endpoint.
* \param[in] q the second endpoint.
* \pre p and q must not coincide.
* \pre p and q cannot be antipodal.
*/
Curve_2 operator()(const Point_2& p, const Point_2& q);
/*! 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
* to select the appropriate normal.
* \param[in] p the first endpoint.
* \param[in] q the second endpoint.
* \param[in] normal the normal to the oriented plane containing the arc.
*
* \pre Both endpoints lie on the given oriented plane.
*/
Curve_2 operator()(const Point_2& p, const Point_2& q,
const Direction_3& normal);
/// @}
};
/*! returns an instance of `Construct_point_2`.
*/
Construct_point_2 construct_point_2_object() const;
/*! 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`.
*/
Construct_curve_2 construct_curve_2_object() const;
};
} /* end namespace CGAL */

View File

@ -1,62 +1,58 @@
namespace CGAL {
/*!
\ingroup PkgArrangementOnSurface2PointLocation
/*! \ingroup PkgArrangementOnSurface2PointLocation
*
* \anchor arr_reflm_pl
*
* The `Arr_landmarks_point_location` class implements a Jump & Walk algorithm,
* where special points, referred to as "landmarks", are chosen in a
* preprocessing stage, their place in the arrangement is found, and they are
* inserted into a data-structure that enables efficient nearest-neighbor search
* (a <span class="textsc">Kd</span>-tree). Given a query point, the nearest
* landmark is located and a "walk" strategy is applied from the landmark to the
* query point.
*
* There are various strategies to select the landmark set in the
* arrangement, where the strategy is determined by the
* `Generator` template parameter. The following landmark-generator
* classes are available:
* <DL>
* <DT><B>`Arr_landmarks_vertices_generator`</B><DD>
* The arrangement vertices are used as the landmarks set.
*
* <DT><B>`Arr_random_landmarks_generator`</B><DD>
* \f$n\f$ random points in the bounding box of the arrangement are chosen
* as the landmarks set.
*
* <DT><B>`Arr_halton_landmarks_generator`</B><DD>
* \f$n\f$ Halton points in the bounding box of the arrangement are chosen
* as the landmarks set.
*
* <DT><B>`Arr_middle_edges_landmarks_generator`</B><DD>
* The midpoint of each arrangement edge is computed, and the resulting
* set of points is used as the landmarks set. This generator can be applied
* only for arrangements of line segments.
*
* <DT><B>`Arr_grid_landmarks_generator`</B><DD>
* A set of \f$n\f$ landmarks are chosen on a
* \f$\lceil \sqrt{n} \rceil \times \lceil \sqrt{n} \rceil\f$
* grid that covers the bounding box of the arrangement.
* </DL>
* The `Arr_landmarks_vertices_generator` class is the default generator
* and used if no `Generator` parameter is specified.
*
* It is recommended to use the landmarks point-location strategy
* when the application frequently issues point-location queries on a
* rather static arrangement that the changes applied to it are mainly
* insertions of curves and not deletions of them.
*
* \cgalModels{AosPointLocation_2,AosVerticalRayShoot_2}
*
* \sa `AosPointLocation_2`
* \sa `AosVerticalRayShoot_2`
* \sa `CGAL::Arr_point_location_result<Arrangement>`
*/
template <typename Arrangement, typename Generator>
class Arr_landmarks_point_location {};
\anchor arr_reflm_pl
The `Arr_landmarks_point_location` class implements a Jump & Walk algorithm, where special
points, referred to as "landmarks", are chosen in a preprocessing stage,
their place in the arrangement is found, and they are inserted into a
data-structure that enables efficient nearest-neighbor search (a
<span class="textsc">Kd</span>-tree). Given a query point, the nearest landmark is located and a
"walk" strategy is applied from the landmark to the query point.
There are various strategies to select the landmark set in the
arrangement, where the strategy is determined by the
`Generator` template parameter. The following landmark-generator
classes are available:
<DL>
<DT><B>`Arr_landmarks_vertices_generator` - </B><DD>
The arrangement vertices are used as the landmarks set.
<DT><B>`Arr_random_landmarks_generator` - </B><DD>
\f$ n\f$ random points in the bounding box of the arrangement are chosen
as the landmarks set.
<DT><B>`Arr_halton_landmarks_generator` - </B><DD>
\f$ n\f$ Halton points in the bounding box of the arrangement are chosen
as the landmarks set.
<DT><B>`Arr_middle_edges_landmarks_generator` - </B><DD>
The midpoint of each arrangement edge is computed, and the resulting
set of points is used as the landmarks set. This generator can be applied
only for arrangements of line segments.
<DT><B>`Arr_grid_landmarks_generator` - </B><DD>
A set of \f$ n\f$ landmarks are chosen on a
\f$ \lceil \sqrt{n} \rceil \times \lceil \sqrt{n} \rceil\f$
grid that covers the bounding box of the arrangement.
</DL>
The `Arr_landmarks_vertices_generator` class is the default generator
and used if no `Generator` parameter is specified.
It is recommended to use the landmarks point-location strategy
when the application frequently issues point-location queries on a
rather static arrangement that the changes applied to it are mainly
insertions of curves and not deletions of them.
\cgalModels{ArrangementPointLocation_2,ArrangementVerticalRayShoot_2}
\sa `ArrangementPointLocation_2`
\sa `ArrangementVerticalRayShoot_2`
\sa `CGAL::Arr_point_location_result<Arrangement>`
*/
template< typename Arrangement, typename Generator >
class Arr_landmarks_point_location {
public:
}; /* end Arr_landmarks_point_location */
} /* end namespace CGAL */

View File

@ -1,19 +1,14 @@
namespace CGAL {
/*!
\ingroup PkgArrangementOnSurface2TraitsClasses
/*! \ingroup PkgArrangementOnSurface2TraitsClasses
*
* This class is a traits class for \cgal arrangements, built on top of a
* model of concept `CircularKernel`. It provides curves of type
* `CGAL::Line_arc_2<CircularKernel>`.
*
* \cgalModels{AosTraits_2}
*/
template <typename CircularKernel>
class Arr_line_arc_traits_2 {};
This class is a traits class for \cgal arrangements, built on top of a
model of concept `CircularKernel`. It provides curves of type
`CGAL::Line_arc_2<CircularKernel>`.
\cgalModels{ArrangementTraits_2}
*/
template< typename CircularKernel >
class Arr_line_arc_traits_2 {
public:
}; /* end Arr_line_arc_traits_2 */
} /* end namespace CGAL */

View File

@ -3,10 +3,10 @@ namespace CGAL {
/*! \ingroup PkgArrangementOnSurface2TraitsClasses
*
* The traits class `Arr_linear_traits_2` is a model of the
* `ArrangementTraits_2` concept, which enables the construction and maintenance
* `AosTraits_2` concept, which enables the construction and maintenance
* of arrangements of linear objects. The linear objects may be bounded (line
* segments) or unbounded (rays and lines). Thus, it is also a model of the
* concept `ArrangementOpenBoundaryTraits_2`. The traits class is parameterized
* concept `AosOpenBoundaryTraits_2`. The traits class is parameterized
* parameterized with a \cgal-kernel model; see the reference page of
* `Arr_segment_traits_2<Kernel>` for further explanations and recommendations
* on choosing a kernel.
@ -14,35 +14,34 @@ namespace CGAL {
* `Arr_linear_traits_2` defines `Kernel::Point_2` as its point type. The nested
* `X_monotone_curve_2` and `Curve_2` types defined by the traits class (as is
* the case with the various segment-traits classes, both types refer to the
* same class, as <I>every</I> linear object is (weakly) \f$ x\f$-monotone), are
* same class, as <I>every</I> linear object is (weakly) \f$x\f$-monotone), are
* constructible from a point, a line segment, a ray and from a line (objects of
* types `Kernel::Point_2`, `Kernel::Segment_2`, `Kernel::Ray_2` and
* `Kernel::Line_2`, respectively). On the other hand, when we are given a curve
* we can find out its actual type and convert it to the respective kernel
* object (say, to a `Kernel::Ray_2`).
*
* \cgalModels{ArrangementTraits_2,ArrangementLandmarkTraits_2,ArrangementOpenBoundaryTraits_2}
* \cgalModels{AosTraits_2,AosLandmarkTraits_2,AosOpenBoundaryTraits_2}
*/
template <typename Kernel>
class Arr_linear_traits_2 {
public:
/// \name Types
/// @{
//!
///
typedef typename Kernel::Segment_2 Segment_2;
//!
///
typedef typename Kernel::Ray_2 Ray_2;
//!
///
typedef typename Kernel::Line_2 Line_2;
//!
///
typedef typename Kernel::Point_2 Point_2;
//!
///
typedef typename X_monotone_curve_2 Curve_2;
/// @}
@ -57,20 +56,19 @@ public:
*/
class X_monotone_curve_2 {
public:
/// \name Types
/// @{
//!
///
typedef typename Kernel::Point_2 Point_2;
//!
///
typedef typename Kernel::Segment_2 Segment_2;
//!
///
typedef typename Kernel::Ray_2 Ray_2;
//!
///
typedef typename Kernel::Line_2 Line_2;
/// @}
@ -139,7 +137,6 @@ public:
Point_2 target() const;
/// @}
}; /* end Arr_linear_traits_2::X_monotone_curve_2 */
class Trim_2 {
@ -147,7 +144,7 @@ public:
/// \name Creation
/// @{
/*! trims the given x-monotone curve to an from src to tgt.
/*! trims the given \f$x\f$-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,
@ -157,7 +154,6 @@ public:
} /* end Arr_linear_traits_2::Trim_2 */
Trim_2 trim_2_object() const;
}; /* end Arr_linear_traits_2 */
} /* end namespace CGAL */

View File

@ -1,28 +1,22 @@
namespace CGAL {
/*!
\ingroup PkgArrangementOnSurface2PointLocation
/*! \ingroup PkgArrangementOnSurface2PointLocation
*
* \anchor arr_refnaive_pl
*
* The `Arr_naive_point_location` class implements a naive algorithm that
* traverses all the vertices and halfedges in the arrangement in search for an
* answer to a point-location query. The query time is therefore linear in the
* complexity of the arrangement. Naturally, this point-location strategy could
* turn into a heavy time-consuming process when applied to dense arrangements.
*
* \cgalModels{AosPointLocation_2,AosVerticalRayShoot_2}
*
* \sa `AosPointLocation_2`
* \sa `AosVerticalRayShoot_2`
* \sa `CGAL::Arr_point_location_result<Arrangement>`
*/
template <typename Arrangement>
class Arr_naive_point_location {};
\anchor arr_refnaive_pl
The `Arr_naive_point_location` class implements a naive algorithm that traverses
all the vertices and halfedges in the arrangement in search for an
answer to a point-location query.
The query time is therefore linear in the complexity of the arrangement.
Naturally, this point-location strategy could turn into a heavy
time-consuming process when applied to dense arrangements.
\cgalModels{ArrangementPointLocation_2,ArrangementVerticalRayShoot_2}
\sa `ArrangementPointLocation_2`
\sa `ArrangementVerticalRayShoot_2`
\sa `CGAL::Arr_point_location_result<Arrangement>`
*/
template< typename Arrangement >
class Arr_naive_point_location {
public:
}; /* end Arr_naive_point_location */
} /* end namespace CGAL */

View File

@ -1,32 +1,26 @@
namespace CGAL {
/*!
\ingroup PkgArrangementOnSurface2TraitsClasses
/*! \ingroup PkgArrangementOnSurface2TraitsClasses
*
* The traits class `Arr_non_caching_segment_basic_traits_2` is a model of the
* `AosTraits_2` concept that allow the construction and maintenance of
* arrangements of sets of pairwise interior-disjoint line segments. It is
* templated with a \cgal-Kernel model, and it is derived from it. This traits
* class is a thin layer above the parameterized kernel. It inherits the
* `Point_2` from the kernel and its `X_monotone_curve_2` type is defined as
* `Kernel::Segment_2`. Most traits-class functor are inherited from the kernel
* functor, and the traits class only supplies the necessary functors that are
* not provided by the kernel. The kernel is parameterized with a number type,
* which should support the arithmetic operations \f$+\f$, \f$-\f$ and
* \f$\times\f$ in an exact manner in order to avoid robustness problems. Using
* `Cartesian<MP_Float>` or `Cartesian<Gmpz>` are possible substitutions for the
* kernel. Using other (inexact) number types (for example, instantiating the
* template with `Simple_cartesian<double>`) is also possible, at the user's own
* risk.
*
* \cgalModels{AosLandmarkTraits_2}
*/
template <typename Kernel>
class Arr_non_caching_segment_basic_traits_2 {};
The traits class `Arr_non_caching_segment_basic_traits_2` is a model of the `ArrangementTraits_2`
concept that allow the construction and maintenance of arrangements of
sets of pairwise interior-disjoint line segments. It is templated with a
\cgal-Kernel model, and it is derived from it. This traits class is a
thin layer above the parameterized kernel. It inherits the `Point_2`
from the kernel and its `X_monotone_curve_2` type is defined as
`Kernel::Segment_2`. Most traits-class functor are inherited from the
kernel functor, and the traits class only supplies the necessary functors
that are not provided by the kernel. The kernel is parameterized with a
number type, which should support the arithmetic operations \f$ +\f$, \f$ -\f$ and
\f$ \times\f$ in an exact manner in order to avoid robustness problems.
Using `Cartesian<MP_Float>` or `Cartesian<Gmpz>` are possible
substitutions for the kernel. Using other (inexact) number types
(for example, instantiating the template with
`Simple_cartesian<double>`) is also possible, at the user's own
risk.
\cgalModels{ArrangementLandmarkTraits_2}
*/
template< typename Kernel >
class Arr_non_caching_segment_basic_traits_2 {
public:
}; /* end Arr_non_caching_segment_basic_traits_2 */
} /* end namespace CGAL */

View File

@ -1,47 +1,41 @@
namespace CGAL {
/*!
\ingroup PkgArrangementOnSurface2TraitsClasses
/*! \ingroup PkgArrangementOnSurface2TraitsClasses
*
* The traits class `Arr_non_caching_segment_traits_2` is a model of the
* `AosTraits_2` concept that allows the construction and maintenance of
* arrangements of line segments. It is parameterized with a \cgal-Kernel type,
* and it is derived from it. This traits class is a thin layer above the
* parameterized kernel. It inherits the `Point_2` from the kernel and its
* `X_monotone_curve_2` and `Curve_2` types are both defined as
* `Kernel::Segment_2`. Most traits-class functor are inherited from the kernel
* functor, and the traits class only supplies the necessary functors that are
* not provided by the kernel. The kernel is parameterized with a number type,
* which should support exact rational arithmetic in order to avoid robustness
* problems, although other number types could be used at the user's own risk.
*
* The traits-class implementation is very simple, yet may lead to a cascaded
* representation of intersection points with exponentially long bit-lengths,
* especially if the kernel is parameterized with a number type that does not
* perform normalization (e.g. `Quotient<MP_Float>`). The
* `Arr_segment_traits_2` traits class avoids this cascading problem, and should
* be the default choice for implementing arrangements of line segments. It is
* recommended to use `Arr_non_caching_segment_traits_2` only for very sparse
* arrangements of huge sets of input segments.
*
* While `Arr_non_caching_segment_traits_2` models the concept
* `AosDirectionalXMonotoneTraits_2`, the implementation of the
* `Are_mergeable_2` operation does not enforce the input curves to have the
* same direction as a precondition. Moreover,
* `Arr_non_caching_segment_traits_2` supports the merging of curves of opposite
* directions.
*
* \cgalModels{AosTraits_2,AosLandmarkTraits_2,AosDirectionalXMonotoneTraits_2}
*
* \sa `Arr_segment_traits_2<Kernel>`
*/
template <typename Kernel>
class Arr_non_caching_segment_traits_2 :
public Arr_non_caching_segment_basic_traits_2<Kernel> {};
The traits class `Arr_non_caching_segment_traits_2` is a model of the `ArrangementTraits_2`
concept that allows the construction and maintenance of arrangements of
line segments. It is parameterized with a \cgal-Kernel type, and it
is derived from it. This traits class is a thin layer above the
parameterized kernel. It inherits the `Point_2` from the kernel and its
`X_monotone_curve_2` and `Curve_2` types are both defined as
`Kernel::Segment_2`. Most traits-class functor are inherited from the
kernel functor, and the traits class only supplies the necessary functors
that are not provided by the kernel. The kernel is parameterized with a
number type, which should support exact rational arithmetic in order to
avoid robustness problems, although other number types could be used at the
user's own risk.
The traits-class implementation is very simple, yet may lead to
a cascaded representation of intersection points with exponentially long
bit-lengths, especially if the kernel is parameterized with a number type
that does not perform normalization (e.g. `Quotient<MP_Float>`).
The `Arr_segment_traits_2` traits class avoids this cascading
problem, and should be the default choice for implementing arrangements of
line segments. It is recommended to use `Arr_non_caching_segment_traits_2` only for very sparse
arrangements of huge sets of input segments.
While `Arr_non_caching_segment_traits_2` models the concept
`ArrangementDirectionalXMonotoneTraits_2`, the implementation of
the `Are_mergeable_2` operation does not enforce the input curves
to have the same direction as a precondition. Moreover, `Arr_non_caching_segment_traits_2`
supports the merging of curves of opposite directions.
\cgalModels{ArrangementTraits_2,ArrangementLandmarkTraits_2,ArrangementDirectionalXMonotoneTraits_2}
\sa `Arr_segment_traits_2<Kernel>`
*/
template< typename Kernel >
class Arr_non_caching_segment_traits_2
: public Arr_non_caching_segment_basic_traits_2<Kernel>
{
public:
}; /* end Arr_non_caching_segment_traits_2 */
} /* end namespace CGAL */

View File

@ -1,75 +1,72 @@
namespace CGAL {
/*!
\ingroup PkgArrangementOnSurface2Funcs
\brief Computes the overlay of two arrangements `arr1` and `arr2`, and sets
the output arrangement `res` to represent the overlaid arrangement.
/*! \ingroup PkgArrangementOnSurface2Funcs
* \brief Computes the overlay of two arrangements `arr1` and `arr2`, and sets
* the output arrangement `res` to represent the overlaid arrangement.
*
* \details
* Computes the overlay of two input arrangement
* objects, and returns the overlaid arrangement. All three arrangements
* can be instantiated with different geometric traits classes and different
* \dcel classes (encapsulated in the various topology-traits classes).
* The geometry traits of the resulting arrangement is used to construct the
* resulting arrangement. This means that all the types (e.g.,
* `Traits::Point_2`, `Traits::Curve_2`, and `Traits::Point_2`)
* of both input arrangements have to be convertible to the types in the
* resulting arrangement. A given overlay-traits object is used to properly
* construct the overlaid \dcel that represents the resulting arrangement.
*
* \pre `res` does not refer to either `arr1` or `arr2` (that is,
* "self overlay" is not supported).
*
* \pre The overlay-traits object `ovl_tr` must model the `OverlayTraits`
* concept, which is able to construct records of the `ResDcel` class on
* the basis of the `Dcel1` and `Dcel2` records that induce them.
*
* \sa `OverlayTraits`
*/
template <typename GeomTraitsA, typename GeomTraitsB,
typename GeomTraitsRes, typename TopTraitsA,
typename TopTraitsB, typename TopTraitsRes,
typename OverlayTraits>
void overlay(const Arrangement_2<GeomTraitsA, TopTraitsA>& arr1,
const Arrangement_2<GeomTraitsB, TopTraitsB>& arr2,
Arrangement_2<GeomTraitsRes, TopTraitsRes>& arr_res,
OverlayTraits& ovl_tr);
\details
Computes the overlay of two input arrangement
objects, and returns the overlaid arrangement. All three arrangements
can be instantiated with different geometric traits classes and different
\dcel classes (encapsulated in the various topology-traits classes).
The geometry traits of the resulting arrangement is used to construct the
resulting arrangement. This means that all the types (e.g.,
`Traits::Point_2`, `Traits::Curve_2`, and `Traits::Point_2`)
of both input arrangements have to be convertible to the types in the
resulting arrangement. A given overlay-traits object is used to properly
construct the overlaid \dcel that represents the resulting arrangement.
\pre `res` does not refer to either `arr1` or `arr2` (that is, "self overlay" is not supported).
\pre The overlay-traits object `ovl_tr` must model the `OverlayTraits`
concept, which is able to construct records of the `ResDcel` class on
the basis of the `Dcel1` and `Dcel2` records that induce them.
\sa `OverlayTraits`
*/
template <class GeomTraitsA, class GeomTraitsB,
class GeomTraitsRes, class TopTraitsA,
class TopTraitsB, class TopTraitsRes,
class OverlayTraits>
void overlay (const Arrangement_2<GeomTraitsA, TopTraitsA>& arr1,
const Arrangement_2<GeomTraitsB, TopTraitsB>& arr2,
Arrangement_2<GeomTraitsRes, TopTraitsRes>& arr_res,
OverlayTraits& ovl_tr);
/*!
\ingroup PkgArrangementOnSurface2Funcs
\brief Computes the overlay of two arrangements with history `arr1` and
`arr2`, and sets the output arrangement with history `res` to
represent the overlaid arrangement. The function also constructs a
consolidated set of curves that induce `res`.
\details
Computes the overlay of two input arrangement
objects, and returns the overlaid arrangement. All three arrangements
can be instantiated with different geometric traits classes and different
\dcel classes (encapsulated in the various topology-traits classes).
The geometry traits of the resulting arrangement is used to construct the
resulting arrangement. This means that all the types (e.g.,
`Traits::Point_2`, `Traits::Curve_2`, and `Traits::Point_2`)
of both input arrangements have to be convertible to the types in the
resulting arrangement. A given overlay-traits object is used to properly
construct the overlaid \dcel that represents the resulting arrangement.
\pre `res` does not refer to either `arr1` or `arr2` (that is, "self overlay" is not supported).
\pre The overlay-traits object `ovl_tr` must model the `OverlayTraits`
concept, which is able to construct records of the `ResDcel` class on
the basis of the `Dcel1` and `Dcel2` records that induce them.
\sa `OverlayTraits`
*/
template<typename Traits, typename Dcel1, typename Dcel2,
/*! \ingroup PkgArrangementOnSurface2Funcs
* \brief
* Computes the overlay of two arrangements with history `arr1` and
* `arr2`, and sets the output arrangement with history `res` to
* represent the overlaid arrangement. The function also constructs a
* consolidated set of curves that induce `res`.
*
* \details
* Computes the overlay of two input arrangement
* objects, and returns the overlaid arrangement. All three arrangements
* can be instantiated with different geometric traits classes and different
* \dcel classes (encapsulated in the various topology-traits classes).
* The geometry traits of the resulting arrangement is used to construct the
* resulting arrangement. This means that all the types (e.g.,
* `Traits::Point_2`, `Traits::Curve_2`, and `Traits::Point_2`)
* of both input arrangements have to be convertible to the types in the
* resulting arrangement. A given overlay-traits object is used to properly
* construct the overlaid \dcel that represents the resulting arrangement.
*
* \pre `res` does not refer to either `arr1` or `arr2` (that is,
* "self overlay" is not supported).
*
* \pre The overlay-traits object `ovl_tr` must model the `OverlayTraits`
* concept, which is able to construct records of the `ResDcel` class on
* the basis of the `Dcel1` and `Dcel2` records that induce them.
*
* \sa `OverlayTraits`
*/
template <typename Traits, typename Dcel1, typename Dcel2,
typename ResDcel, typename OverlayTraits>
void overlay (const Arrangement_with_history_2<Traits,Dcel1>& arr1,
const Arrangement_with_history_2<Traits,Dcel2>& arr2,
Arrangement_with_history_2<Traits,ResDcel>& res,
OverlayTraits& ovl_tr);
void overlay(const Arrangement_with_history_2<Traits,Dcel1>& arr1,
const Arrangement_with_history_2<Traits,Dcel2>& arr2,
Arrangement_with_history_2<Traits,ResDcel>& res,
OverlayTraits& ovl_tr);
} /* end namespace CGAL */

View File

@ -8,16 +8,15 @@ namespace CGAL {
* \tparam Arrangement must be an instance of the
* `CGAL::Arrangement_on_surface_2<GeometryTraits,Topology>` class template.
*
* \sa `ArrangementPointLocation_2`
* \sa `ArrangementVerticalRayShoot_2`
* \sa `AosPointLocation_2`
* \sa `AosVerticalRayShoot_2`
* \sa `CGAL::Arr_naive_point_location<Arrangement>`
* \sa `CGAL::Arr_walk_along_line_point_location<Arrangement>`
* \sa `CGAL::Arr_landmarks_point_location<Arrangement,Generator>`
* \sa `CGAL::Arr_trapezoid_ric_point_location<Arrangement>`
*/
template <typename Arrangement>
struct Arr_point_location_result
{
struct Arr_point_location_result {
/*! The type of the arrangement feature that is the result of a
* point-location query or a vertical ray-shoot query, namely,
* `std::variant<Arrangement_on_surface_2::Vertex_const_handle, Arrangement_on_surface_2::Halfedge_const_handle, Arrangement_on_surface_2::Face_const_handle>`

View File

@ -30,15 +30,15 @@ namespace CGAL {
* The type substituting the template parameter `SegmentTraits_2` when
* the template Arr_polyline_traits_2 is instantiated must be a model
* of the concepts
* - `ArrangementTraits_2`,
* - `ArrangementDirectionalXMonotoneTraits_2`,
* - `ArrangementConstructXMonotoneCurveTraits_2`,
* - `ArrangementConstructCurveTraits_2`.
* - `AosTraits_2`,
* - `AosDirectionalXMonotoneTraits_2`,
* - `AosConstructXMonotoneCurveTraits_2`,
* - `AosConstructCurveTraits_2`.
*
* If, in addition, the GeometryTraits_2 models the concept
* `ArrangementApproximateTraits_2` then `Arr_polycurve_traits_2` models
* this concept as well. The same holds for the concept
* `ArrangementOpenBoundaryTraits_2`. If no type is provided, then
* `AosApproximateTraits_2` (or `AosApproximatePointTraits_2`) then
* `Arr_polycurve_traits_2` models this concept as well. The same holds for the
* concept `AosOpenBoundaryTraits_2`. If no type is provided, then
* `Arr_segment_traits_2` (instantiated with
* `Exact_predicates_exact_constructions_kernel` as the kernel) is used.
* Otherwise,
@ -52,17 +52,17 @@ namespace CGAL {
*
* The number type used by the injected segment traits should support exact
* rational arithmetic (that is, the number type should support the arithmetic
* operations \f$ +\f$, \f$ -\f$, \f$ \times\f$ and \f$ \div\f$ carried out
* operations \f$+\f$, \f$-\f$, \f$\times\f$ and \f$\div\f$ carried out
* without loss of precision), in order to avoid robustness problems, although
* other inexact number types could be used at the user's own risk.
*
* A polyline that comprises \f$n > 0\f$ segments has \f$ n+1 \f$ points, and
* they are represented as objects of type `SegmentTraits_2::Point_2`. Since the
* notion of a \a vertex is reserved to 0-dimensional elements of an
* A polyline that comprises \f$n > 0\f$ segments has \f$n+1\f$ points, and
* they are represented as objects of type `SegmentTraits_2::Point_2`. Since
* the notion of a \a vertex is reserved to 0-dimensional elements of an
* arrangement, we use, in this context, the notion of \a points in order to
* refer to the vertices of a polyline. For example, an arrangement induced by a
* single non-self intersecting polyline has exactly two vertices regardless of
* the number of points. Finally, the types `Segment_2` and
* refer to the vertices of a polyline. For example, an arrangement induced by
* a single non-self intersecting polyline has exactly two vertices regardless
* of the number of points. Finally, the types `Segment_2` and
* `X_monotone_segment_2` nested in `Arr_polyline_traits_2` are nothing but
* `SegmentTraits_2::Curve_2` and `SegmentTraits_2::X_monotone_curve_2`,
* respectively.
@ -77,9 +77,9 @@ namespace CGAL {
* the macro `CGAL_ALWAYS_LEFT_TO_RIGHT` to 1 before any \cgal header is
* included.
*
* \cgalModels{ArrangementTraits_2,ArrangementDirectionalXMonotoneTraits_2,`ArrangementConstructXMonotoneCurveTraits_2`
* ArrangementConstructCurveTraits_2,ArrangementApproximateTraits_2 (if the type that substitutes
* the template parameter `SegmentTraits_2` models the concept as well)}
* \cgalModels{AosTraits_2,AosDirectionalXMonotoneTraits_2,AosConstructXMonotoneCurveTraits_2,AosConstructCurveTraits_2,AosApproximateTraits_2
* (if the type that substitutes the template parameter `SegmentTraits_2`
* models the concept as well)}
*
* \sa `Arr_polycurve_traits_2<SubcurveTraits_2>`
* \sa `Arr_Bezier_curve_traits_2<RatKernel, AlgKernel, NtTraits>`
@ -91,22 +91,23 @@ namespace CGAL {
* \sa `CGAL_ALWAYS_LEFT_TO_RIGHT`
*/
template <typename SegmentTraits_2>
class Arr_polyline_traits_2 : public Arr_polycurve_traits_2<SegmentTraits_2>{
class Arr_polyline_traits_2 : public Arr_polycurve_traits_2<SegmentTraits_2> {
public:
/// \name Types
/// @{
/*!
*/
///
typedef SegmentTraits_2 Segment_traits_2;
// TODO: Have to turn these into links, so whenever I mention Point_2 it
// will point here and *not* to Kernel::Point_2 for instance.
///
typedef SegmentTraits_2::Point_2 Point_2;
/*!
*/
///
typedef SegmentTraits_2::Curve_2 Segment_2;
///
typedef SegmentTraits_2::X_monotone_curve_2 X_monotone_segment_2;
/// @}
/*! The `Curve_2` type nested within the traits class respresnts
@ -114,18 +115,18 @@ public:
*/
class Curve_2 {
public:
//! Const iterator of subcurves.
/// Const iterator of subcurves.
typedef std::vector<X_monotone_segment_2>::const_iterator
Segment_const_iterator;
//! Reverse const iterator of subcurves.
/// Reverse const iterator of subcurves.
typedef std::reverse_iterator<Segment_const_iterator>
Segment_const_reverse_iterator;
//! constructs default.
/// constructs default.
Curve_2();
//! constructs from a subcurve.
/// constructs from a subcurve.
Curve_2(const Segment_2& seg);
/*! constructs a polyline from a range of subcurves.
@ -137,16 +138,16 @@ public:
template <typename InputIterator>
void Curve_2(InputIterator begin, InputIterator end);
//! obtains an iterator for the polycurve subcurves.
/// obtains an iterator for the polycurve subcurves.
Segment_const_iterator begin_segments() const;
//! obtains 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;
//! obtains the first reverse iterator of the polyline subcurves.
/// obtains the first reverse iterator of the polyline subcurves.
Segment_const_reverse_iterator rbegin_segments() const;
//! obtains 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;
/*! obtains the number of subcurves that comprise the poyline.
@ -161,11 +162,11 @@ public:
class X_monotone_curve_2 {
public:
//! Const iterator of subcurves.
/// Const iterator of subcurves.
typedef std::vector<X_monotone_segment_2>::const_iterator
Segment_const_iterator;
//! Reverse const iterator of subcurves.
/// Reverse const iterator of subcurves.
typedef std::reverse_iterator<Segment_const_iterator>
Segment_const_reverse_iterator;
@ -177,8 +178,8 @@ public:
/*! 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.
* backwards compatibility we have to keep an implementation of
* construction from a range of points. DO NOT USE THIS CONSTRUCTION.
*/
template <typename InputIterator>
X_monotone_curve_2(InputIterator begin, InputIterator end);
@ -222,15 +223,15 @@ public:
/*! obtains a polyline connecting the two given endpoints.
* \param p The first point.
* \param q The second point.
* \pre `p` and `q` are distinct.
* \return A segment connecting `p` and `q`.
* \pre `p` and `q` are distinct.
*/
Curve_2 operator()(const Point_2& p, const Point_2& q) const;
/*! 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`.
* \pre `seg` is not degenerated (not tested)
*/
Curve_2 operator()(const Segment_2& seg) const;
@ -239,10 +240,10 @@ public:
*
* \param begin iterator pointing to the first element in the range.
* \param end iterator pointing to the past-the-end element in the range.
* \return A polyline using the corresponding construction implementation.
* \pre The given range form a continuous and well-oriented polyline
* (not tested).
* \pre Contains no degenerated segments (not tested)
* \return A polyline using the corresponding construction implementation.
*/
template <typename ForwardIterator>
Curve_2 operator()(ForwardIterator begin, ForwardIterator end) const;
@ -272,7 +273,7 @@ public:
/*! 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.
* \f$x\f$-monotone.
* \param p a point to be appended to `cv` at the back.
* \pre `cv` contains at least one segment.
*/
@ -322,7 +323,7 @@ public:
/*! 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.
* \f$x\f$-monotone.
* \param p a point to be appended to `cv` at the back.
* \pre `cv` contains at least one segment.
*/
@ -382,7 +383,6 @@ public:
Push_front_2 push_front_2_object() const;
/// @} /* End Accessing Functor Objects */
}; /* end Arr_polyline_traits_2 */
} /* end namespace CGAL */

View File

@ -1,30 +1,28 @@
namespace CGAL {
/*! \ingroup PkgArrangementOnSurface2TraitsClasses
*
* The traits class `Arr_rational_function_traits_2` is a model of the
* `ArrangementTraits_2` concept. It handles bounded and unbounded arcs of
* `AosTraits_2` concept. It handles bounded and unbounded arcs of
* rational functions, referred to as <i>rational arcs</i> (in particular, such
* an arc may correspond to the entire graph of a rational function). It
* supports bounded and unbounded arcs. Thus, it is also a model of the concept
* `ArrangementOpenBoundaryTraits_2`. The traits class enables the construction
* `AosOpenBoundaryTraits_2`. The traits class enables the construction
* and maintenance of arrangements of such arcs.
*
* A rational function \f$y = \frac{P(x)}{Q(x)}\f$ is defined by two polynomials
* \f$P\f$ and \f$Q\f$ of arbitrary degrees. If \f$Q(x) = 1\f$ then the
* function is a simple polynomial function. Usually the domain is
* \f$\mathbb{R}\f$ but the function may also be restricted to a bounded
* interval \f$[x_{\rm min}, x_{\rm max}]\f$ or defined over a ray \f$(-\infty,
* x_{\rm max}]\f$ or over \f$[x_{\rm min}, \infty)\f$. Rational functions are
* represented by the nested type `Curve_2`. Note that a rational function may
* be not continuous since roots of \f$Q\f$ induce vertical asymptotes, which
* would contradict the notion of an \f$x\f$-monotone curve as it is introduced
* by the `ArrangementTraits_2` concept. Thus, continuous portions of rational
* functions are represented by the nested type `X_monotone_curve_2`, which is
* different from `Curve_2`. Constructors for both classes are provided by the
* traits. A `Curve_2` may be split up into several `X_monotone_curve_2` using
* `Make_x_monotone_2`.
* interval \f$[x_{\rm min}, x_{\rm max}]\f$ or defined over a ray
* \f$(-\infty,x_{\rm max}]\f$ or over \f$[x_{\rm min}, \infty)\f$. Rational
* functions are represented by the nested type `Curve_2`. Note that a rational
* function may be not continuous since roots of \f$Q\f$ induce vertical asymptotes,
* which would contradict the notion of an \f$x\f$-monotone curve as it is introduced
* by the `AosTraits_2` concept. Thus, continuous portions of rational functions are
* represented by the nested type `X_monotone_curve_2`, which is different from
* `Curve_2`. Constructors for both classes are provided by the traits. A `Curve_2`
* may be split up into several `X_monotone_curve_2` using `Make_x_monotone_2`.
*
* The template parameter of the traits must be a model of the concept
* `AlgebraicKernel_d_1`. A rational function is then represented by two
@ -44,12 +42,12 @@ namespace CGAL {
* cleans up the cache on demand.
*
* While `Arr_rational_function_traits_2` models the concept
* `ArrangementDirectionalXMonotoneTraits_2`, the implementation of the
* `AosDirectionalXMonotoneTraits_2`, the implementation of the
* `Are_mergeable_2` operation does not enforce the input curves to have the
* same direction as a precondition. Moreover, `Arr_rational_function_traits_2`
* supports the merging of curves of opposite directions.
*
* \cgalModels{ArrangementTraits_2,ArrangementDirectionalXMonotoneTraits_2,ArrangementOpenBoundaryTraits_2}
* \cgalModels{AosTraits_2,AosDirectionalXMonotoneTraits_2,AosOpenBoundaryTraits_2}
*/
template <typename AlgebraicKernel_d_1>
class Arr_rational_function_traits_2 {
@ -57,24 +55,19 @@ public:
/// \name Types
/// @{
/*!
*/
///
typedef AlgebraicKernel_d_1 Algebraic_kernel_d_1;
/*!
*/
///
typedef AlgebraicKernel_d_1::Coefficient Coefficient;
/*!
*/
///
typedef AlgebraicKernel_d_1::Polynomial_1 Polynomial_1;
/*!
*/
///
typedef AlgebraicKernel_d_1::Algebraic_real_1 Algebraic_real_1;
/*!
*/
///
typedef AlgebraicKernel_d_1::Bound Bound;
/// @}
@ -83,7 +76,7 @@ public:
/// @{
/*! constructs an empty traits that uses the kernel pointed by `kernel`
* for performing algebraic operations.
* for performing algebraic operations.
*/
Arr_rational_function_traits_2<AlgebraicKernel_d_1>(const Algebraic_kernel_d_1* kernel);
@ -116,34 +109,27 @@ public:
*
* \cgalModels{Assignable,CopyConstructible,AdaptableBinaryFunction,AdaptableUnaryFunction}
*/
class Construct_curve_2 {
public:
/// \name Types
/// @{
/*!
*/
///
typedef AlgebraicKernel_d_1::Polynomial_1 Polynomial_1;
/*!
*/
///
typedef AlgebraicKernel_d_1::Algebraic_real_1 Algebraic_real_1;
/*!
*/
///
typedef Arr_rational_function_traits_2<AlgebraicKernel_d_1>::Curve_2 result_type;
/*!
*/
///
typedef Polynomial_1 argument_type;
/*!
*/
///
typedef Polynomial_1 first_argument_type;
/*!
*/
///
typedef Polynomial_1 second_argument_type;
/// @}
@ -156,7 +142,7 @@ public:
Curve_2 operator()(Polynomial_1 P) const;
/*! constructs a curve representing the polynomial function \f$y = P(x)\f$.
* The function is defined over the interval \f$[x,+\infty)\f$ if \f$ right\f$
* The function is defined over the interval \f$[x,+\infty)\f$ if \f$right\f$
* is true and \f$(-\infty,x]\f$ otherwise.
*/
Curve_2 operator()(Polynomial_1 P, const Algebraic_real_1& x,
@ -174,8 +160,8 @@ public:
/*! constructs a curve representing the rational function \f$y = P(x)/Q(x)\f$.
* The function is defined over the interval
* \f$ I=[x,+\infty)\f$ if \f$ right\f$ is true and
* \f$ I=(-\infty,x]\f$ otherwise.
* \f$I=[x,+\infty)\f$ if \f$right\f$ is true and
* \f$I=(-\infty,x]\f$ otherwise.
*/
Curve_2 operator()(Polynomial_1 P, Polynomial_1 Q,
const Algebraic_real_1& x, bool right) const;
@ -196,8 +182,7 @@ public:
/*! constructs a curve representing the polynomial function \f$y = P(x)\f$,
* where the coefficients of \f$P\f$ are given in the range `[begin,end)`.
* The function is defined over the interval
* \f$[x,+\infty)\f$ if \f$ right\f$ is true and \f$(-\infty,x]\f$
* otherwise.
* \f$[x,+\infty)\f$ if \f$right\f$ is true and \f$(-\infty,x]\f$ otherwise.
*/
template <typename InputIterator>
Curve_2 operator()(InputIterator begin, InputIterator end,
@ -221,7 +206,7 @@ public:
InputIterator begin_denom, InputIterator end_denom) const;
/*! constructs a curve representing the rational function \f$y = P(x)/Q(x)\f$,
* where the coefficients of \f$P\f$ and \f$ Q\f$ are given in the ranges
* where the coefficients of \f$P\f$ and \f$Q\f$ are given in the ranges
* `[begin_numer,end_numer)` and `[begin_denom,end_denom)`, respectively.
* The function is defined over the interval \f$I=[x,+\infty)\f$
* if \f$right\f$ is true and \f$I=(-\infty,x]\f$ otherwise.
@ -243,7 +228,6 @@ public:
const Algebraic_real_1& upper) const;
/// @}
}; /* end Arr_rational_function_traits_2::Construct_curve_2 */
/*! Functor to construct a `X_monotone_curve_2`. To enable caching the class is
@ -254,32 +238,25 @@ public:
*/
class Construct_x_monotone_curve_2 {
public:
/// \name Types
/// @{
/*!
*/
///
typedef AlgebraicKernel_d_1::Polynomial_1 Polynomial_1;
/*!
*/
///
typedef AlgebraicKernel_d_1::Algebraic_real_1 Algebraic_real_1;
/*!
*/
///
typedef Arr_rational_function_traits_2<AlgebraicKernel_d_1>::X_monotone_curve_2 result_type;
/*!
*/
///
typedef Polynomial_1 argument_type;
/*!
*/
///
typedef Polynomial_1 first_argument_type;
/*!
*/
///
typedef Polynomial_1 second_argument_type;
/// @}
@ -287,14 +264,14 @@ public:
/// \name Operations
/// @{
/*! constructs an \f$ x\f$-monotone curve supported by the polynomial function
* \f$ y = P(x)\f$.
/*! constructs an \f$x\f$-monotone curve supported by the polynomial function
* \f$y = P(x)\f$.
*/
X_monotone_curve_2 operator()(Polynomial_1 P) const;
/*! constructs an \f$x\f$-monotone curve supported by the polynomial function
* \f$y = P(x)\f$. The function is defined over the interval
* \f$[x,+\infty)\f$ if \f$ right\f$ is true and \f$(-\infty,x]\f$
* \f$[x,+\infty)\f$ if \f$right\f$ is true and \f$(-\infty,x]\f$
* otherwise.
*/
X_monotone_curve_2 operator()(Polynomial_1 P,
@ -311,14 +288,16 @@ public:
/*! constructs an \f$x\f$-monotone curve supported by the rational function
* \f$y = P(x)/Q(x)\f$.
*
* \pre \f$Q\f$ has no real roots.
*/
X_monotone_curve_2 operator()(Polynomial_1 P, Polynomial_1 Q) const;
/*! constructs an \f$x\f$-monotone curve supported by the rational function
* \f$y = P(x)/Q(x)\f$. The function is defined over the interval
* \f$I=[x,+\infty)\f$ if \f$ right\f$ is true and \f$I=(-\infty,x]\f$
* \f$I=[x,+\infty)\f$ if \f$right\f$ is true and \f$I=(-\infty,x]\f$
* otherwise.
*
* \pre \f$Q\f$ has no real roots in the interior of \f$I\f$.
*/
X_monotone_curve_2 operator()(Polynomial_1 P, Polynomial_1 Q,
@ -334,8 +313,8 @@ public:
const Algebraic_real_1& lower,
const Algebraic_real_1& upper) const;
/*! constructs an \f$ x\f$-monotone curve supported by the polynomial function
* \f$ y = P(x)\f$, where the coefficients of \f$P\f$ are given in the range
/*! constructs an \f$x\f$-monotone curve supported by the polynomial function
* \f$y = P(x)\f$, where the coefficients of \f$P\f$ are given in the range
* `[begin,end)`.
*/
template <typename InputIterator>
@ -376,9 +355,10 @@ public:
* \f$y = P(x)/Q(x)\f$, where the coefficients of \f$P\f$ and \f$Q\f$ are
* given in the ranges `[begin_numer,end_numer)` and
* `[begin_denom,end_denom)`, respectively. The function is defined over the
* interval \f$ I=[x,+\infty)\f$ if \f$ right\f$ is true and
* \f$ I=(-\infty,x]\f$ otherwise.
* \pre \f$ Q\f$ has no real roots in the interior of \f$ I\f$.
* interval \f$I=[x,+\infty)\f$ if \f$right\f$ is true and
* \f$I=(-\infty,x]\f$ otherwise.
*
* \pre \f$Q\f$ has no real roots in the interior of \f$I\f$.
*/
template <typename InputIterator>
X_monotone_curve_2 operator()(InputIterator begin_numer,
@ -388,7 +368,7 @@ public:
const Algebraic_real_1& x, bool right) const;
/*! constructs an \f$x\f$-monotone curve supported by the rational function
* \f$y = P(x)/Q(x)\f$, where the coefficients of \f$ P\f$ and \f$Q\f$ are
* \f$y = P(x)/Q(x)\f$, where the coefficients of \f$P\f$ and \f$Q\f$ are
* given in the ranges `[begin_numer,end_numer)` and
* `[begin_denom,end_denom)`, respectively. The function is defined over the
* interval \f$I=[lower,upper]\f$.
@ -403,7 +383,6 @@ public:
const Algebraic_real_1& upper) const;
/// @}
}; /* end Arr_rational_function_traits_2::Construct_x_monotone_curve_2 */
/*! The `Curve_2` class nested within the traits is used to represent rational
@ -413,16 +392,13 @@ public:
*/
class Curve_2 {
public:
/// \name Types
/// @{
/*!
*/
///
typedef AlgebraicKernel_d_1::Polynomial_1 Polynomial_1;
/*!
*/
///
typedef AlgebraicKernel_d_1::Algebraic_real_1 Algebraic_real_1;
/// @}
@ -432,11 +408,11 @@ public:
/*! returns the numerator of the supporting rational function.
*/
const Polynomial_1& numerator () const;
const Polynomial_1& numerator() const;
/*! returns the denominator of the supporting rational function.
*/
const Polynomial_1& denominator () const;
const Polynomial_1& denominator() const;
/*! returns whether &ccedil;urve is continuous, namely whether it does not
* contains any vertical asymptotes in its interior.
@ -446,19 +422,21 @@ public:
/*! returns whether the \f$x\f$-coordinate of &ccedil;urve's left end is
* finite or whether it is \f$\pm\infty\f$.
*/
Arr_parameter_space left_parameter_space_in_x () const;
Arr_parameter_space left_parameter_space_in_x() const;
/*! returns whether the \f$x\f$-coordinate of &ccedil;urve's right end is
* finite or whether it is \f$\pm\infty\f$.
*/
Arr_parameter_space right_parameter_space_in_x () const;
Arr_parameter_space right_parameter_space_in_x() const;
/*! returns the \f$x\f$-coordinate of the left end.
*
* \pre `left_boundary_in_x()` == `ARR_INTERIOR`
*/
Algebraic_real_1 left_x() const;
/*! returns the \f$x\f$-coordinate of the right end.
*
* \pre `right_boundary_in_x()` == `ARR_INTERIOR`
*/
Algebraic_real_1 right_x() const;
@ -475,16 +453,13 @@ public:
/// \name Types
/// @{
/*!
*/
///
typedef AlgebraicKernel_d_1::Polynomial_1 Polynomial_1;
/*!
*/
///
typedef AlgebraicKernel_d_1::Algebraic_real_1 Algebraic_real_1;
/*!
*/
///
typedef AlgebraicKernel_d_1::Bound Bound;
/// @}
@ -494,22 +469,22 @@ public:
/*! returns the numerator of the supporting rational function.
*/
Polynomial_1 numerator () const;
Polynomial_1 numerator() const;
/*! returns the denominator of the supporting rational function.
*/
Polynomial_1 denominator () const;
Polynomial_1 denominator() const;
/*! returns double-approximations of the x- and y-coordinates.
*/
std::pair<double,double> to_double() const;
/*! returns the \f$ x\f$-coordinate of the point.
/*! returns the \f$x\f$-coordinate of the point.
*/
Algebraic_real_1 x() const;
/*! obtains the \f$y\f$-coordinates of the point. <B>Attention:</B> As
* described above, points are not stored by their y-coordinate in
* described above, points are not stored by their \f$y\f$-coordinate in
* `Algebraic_real_1` representation. In fact, this representation must be
* computed on demand, and might become quite costly for points defined by
* high-degree polynomials. Therefore, it is recommended to avoid calls to
@ -519,27 +494,31 @@ public:
/*! Computes a pair \f$p\f$ approximating the \f$x\f$-coordinate with
* respect to the given absolute precision \f$a\f$.
*
* \post \f$p.first \leq x \leq p.second\f$
* \post \f$p.second - p.first \leq2^{-a}\f$
* \post \f$p.second - p.first \leq 2^{-a}\f$
*/
std::pair<Bound,Bound> approximate_absolute_x(int a) const;
/*! Computes a pair \f$p\f$ approximating the \f$y\f$-coordinate with
* respect to the given absolute precision \f$a\f$.
*
* \post \f$p.first \leq y \leq p.second\f$
* \post \f$p.second - p.first \leq2^{-a}\f$
* \post \f$p.second - p.first \leq 2^{-a}\f$
*/
std::pair<Bound,Bound> approximate_absolute_y(int a) const;
/*! Computes a pair \f$p\f$ approximating the \f$x\f$-coordinate with
* respect to the given relative precision \f$r\f$.
*
* \post \f$p.first \leq x \leq p.second\f$
* \post \f$p.second - p.first \leq2^{-r}|x|\f$
*/
std::pair<Bound,Bound> approximate_relative_x(int r) const;
/*! Computes a pair \f$p\f$ approximating the \f$ y\f$-coordinate with
/*! computes a pair \f$p\f$ approximating the \f$y\f$-coordinate with
* respect to the given relative precision \f$r\f$.
*
* \post \f$p.first \leq y \leq p.second\f$
* \post \f$p.second - p.first \leq2^{-r}|y|\f$
*/
@ -550,7 +529,7 @@ public:
}; /* end Arr_rational_function_traits_2::Point_2 */
/*! The `X_monotone_curve_2` class nested within the traits is used to represent
* \f$ x\f$-monotone parts of rational functions. In particular, such an
* \f$x\f$-monotone parts of rational functions. In particular, such as
* \f$x\f$-monotone curve may not contain a vertical asymptote in its interior
* \f$x\f$-range.
*
@ -558,20 +537,16 @@ public:
*/
class X_monotone_curve_2 {
public:
/// \name Types
/// @{
/*!
*/
///
typedef AlgebraicKernel_d_1::Polynomial_1 Polynomial_1;
/*!
*/
///
typedef AlgebraicKernel_d_1::Algebraic_real_1 Algebraic_real_1;
/*!
*/
///
typedef Arr_rational_function_traits_2<AlgebraicKernel_d_1>::Point_2 Point_2;
/// @}
@ -581,21 +556,21 @@ public:
/*! returns the numerator of the supporting rational function.
*/
const Polynomial_1& numerator () const;
const Polynomial_1& numerator() const;
/*! returns the denominator of the supporting rational function.
*/
const Polynomial_1& denominator () const;
const Polynomial_1& denominator() const;
/*! returns whether the \f$x\f$-coordinate of the source is finite or
* whether it is \f$\pm\infty\f$.
*/
Arr_parameter_space source_parameter_space_in_x () const;
Arr_parameter_space source_parameter_space_in_x() const;
/*! returns whether the \f$y\f$-coordinate of the source is finite or
* whether it is \f$\pm\infty\f$.
*/
Arr_parameter_space source_parameter_space_in_y () const;
Arr_parameter_space source_parameter_space_in_y() const;
/*! returns the source point of the arc.
* \pre Both the \f$x\f$- and \f$y\f$-coordinates of the source point is
@ -604,6 +579,7 @@ public:
const Point_2& source() const;
/*! returns the \f$x\f$-coordinate of the source point.
*
* \pre The \f$x\f$-coordinate of the source point is finite.
*/
Algebraic_real_1 source_x() const;
@ -611,12 +587,12 @@ public:
/*! returns whether the \f$x\f$-coordinate of the target is finite or
* whether it is \f$\pm\infty\f$.
*/
Arr_parameter_space target_parameter_space_in_x () const;
Arr_parameter_space target_parameter_space_in_x() const;
/*! returns whether the \f$y\f$-coordinate of the target is finite or
* whether it is \f$\pm\infty\f$.
*/
Arr_parameter_space target_parameter_space_in_y () const;
Arr_parameter_space target_parameter_space_in_y() const;
/*! returns the target point of the arc.
* \pre Both the \f$x\f$- and \f$y\f$-coordinates of the target point is
@ -625,6 +601,7 @@ public:
const Point_2& target() const;
/*! returns the \f$x\f$-coordinate of the target point.
*
* \pre The \f$x\f$-coordinate of the target point is finite.
*/
Algebraic_real_1 target_x() const;
@ -632,19 +609,21 @@ public:
/*! returns whether the \f$x\f$-coordinate of the left curve end is finite or
* whether it is \f$\pm\infty\f$.
*/
Arr_parameter_space left_parameter_space_in_x () const;
Arr_parameter_space left_parameter_space_in_x() const;
/*! returns whether the \f$y\f$-coordinate of the left curve end is finite or
* whether it is \f$\pm\infty\f$.
*/
Arr_parameter_space left_parameter_space_in_y () const;
Arr_parameter_space left_parameter_space_in_y() const;
/*! returns the left point of the arc.
*
* \pre Both the \f$x\f$- and \f$y\f$-coordinates of the left point is finite.
*/
const Point_2& left() const;
/*! returns the \f$x\f$-coordinate of the left point.
*
* \pre The \f$x\f$-coordinate of the left point is finite.
*/
Algebraic_real_1 left_x() const;
@ -666,18 +645,18 @@ public:
const Point_2& right() const;
/*! returns the \f$x\f$-coordinate of the right point.
*
* \pre The \f$x\f$-coordinate of the right point is finite.
*/
Algebraic_real_1 right_x() const;
/*! returns whether the curve is oriented from left to right.
*/
bool is_left_to_right () const;
bool is_left_to_right() const;
/// @}
}; /* end Arr_rational_function_traits_2::X_monotone_curve_2 */
}; /* end Arr_rational_function_traits_2 */
} /* end namespace CGAL */

View File

@ -3,12 +3,12 @@ namespace CGAL {
/*! \ingroup PkgArrangementOnSurface2TraitsClasses
*
* The traits class `Arr_segment_traits_2` is a model of the
* `ArrangementTraits_2` concept, which allows the construction and maintenance
* `AosTraits_2` concept, which allows the construction and maintenance
* of arrangements of line segments. It is parameterized with a
* \cgal-kernel model that is templated in turn with a number type. To avoid
* numerical errors and robustness problems, the number type should support
* exact rational arithmetic; that is, the number type should support the
* arithmetic operations \f$ +\f$, \f$ -\f$, \f$ \times\f$ and \f$ \div\f$
* arithmetic operations \f$+\f$, \f$-\f$, \f$\times\f$ and \f$\div\f$
* carried out without loss of precision.
*
* For example, instantiating the traits template with kernels that support
@ -30,7 +30,7 @@ namespace CGAL {
* endpoints only, while the traits class needs to store extra data with its
* segments, in order to efficiently operate on them. Nevertheless, the nested
* `X_monotone_curve_2` and `Curve_2` types (in this case both types refer to
* the same class, as <I>every</I> line segment is (weakly) \f$ x\f$-monotone)
* the same class, as <I>every</I> line segment is (weakly) \f$x\f$-monotone)
* can however be converted to the type `Kernel::Segment_2`.
*
* `Arr_segment_traits_2` achieves faster running times than the
@ -47,75 +47,75 @@ namespace CGAL {
* `Arr_non_caching_segment_traits_2` traits-class.
*
* While `Arr_segment_traits_2` models the concept
* `ArrangementDirectionalXMonotoneTraits_2`, the implementation of the
* `AosDirectionalXMonotoneTraits_2`, the implementation of the
* `Are_mergeable_2` operation does not enforce the input curves to have the
* same direction as a precondition. Moreover, `Arr_segment_traits_2` supports
* the merging of curves of opposite directions.
*
* \cgalModels{ArrangementTraits_2,ArrangementLandmarkTraits_2,ArrangementDirectionalXMonotoneTraits_2}
* \cgalModels{AosTraits_2,AosLandmarkTraits_2,AosApproximateTraits_2,AosDirectionalXMonotoneTraits_2}
*/
template <typename Kernel>
class Arr_segment_traits_2 : public Kernel {
public:
/// \name Types
/// @{
//! \name Types
//! @{
//! the segment type.
/// the segment type.
typedef typename Kernel::Segment_2 Segment_2;
//! the line type.
/// the line type.
typedef typename Kernel::Line_2 Line_2;
//! the point type.
/// the point type.
typedef typename Kernel::Point_2 Point_2;
//! @}
/// @}
/*! The `X_monotone_curve_2` class nested within the traits class is
* used to represent segments.
*/
class X_monotone_curve_2 {
public:
//! \name Creation
//! @{
/// \name Creation
/// @{
/*! constructs default. */
X_monotone_curve_2();
//! @}
/// @}
//! \name Access Functions
//! @{
/// \name Access Functions
/// @{
//! obtains the (lexicographically) left endpoint.
/// obtains the (lexicographically) left endpoint.
const Point_2& left() const;
//! obtains the (lexicographically) right endpoint.
/// obtains the (lexicographically) right endpoint.
const Point_2& right() const;
//! obtains the supporting line.
/// obtains the supporting line.
const Line_2& line() const;
//! determines whether the curve is vertical.
/// determines whether the curve is vertical.
bool is_vertical() const;
//! determines whether the curve is directed lexicographic from left to right
/// determines whether the curve is directed lexicographic from left to right
bool is_directed_right() const;
//! @}
/// @}
};
//! The curve type.
/// The curve type.
typedef X_monotone_curve_2 Curve_2;
//! A functor that trims curves.
/// A functor that trims curves.
class Trim_2 {
public:
//! \name Creation
//! @{
/// \name Creation
/// @{
/*! trims the given x-monotone curve to an from src to tgt.
/*! trims the given \f$x\f$-monotone curve to an from `src` to `tgt`.
*
* \ pre `src` and `tgt` lies on the curve
*/
X_monotone_curve_2(const X_monotone_curve_2& xcv,
@ -123,6 +123,6 @@ public:
//! @}
} /* end Arr_segment_traits_2::Trim_2 */
}; /* end Arr_segment_traits_2 */
} /* end namespace CGAL */

View File

@ -10,18 +10,18 @@ namespace CGAL {
* The `Arr_spherical_topology_traits_2` template has two parameters:
* <UL>
* <LI>The `GeometryTraits_2` template-parameter should be substituted by
* a model of the `ArrangementBasicTraits_2` concept. The traits
* a model of the `AosBasicTraits_2` concept. The traits
* class defines the types of \f$x\f$-monotone curves and two-dimensional
* points, namely `ArrangementBasicTraits_2::X_monotone_curve_2` and
* `ArrangementBasicTraits_2::Point_2`,
* points, namely `AosBasicTraits_2::X_monotone_curve_2` and
* `AosBasicTraits_2::Point_2`,
* respectively, and supports basic geometric predicates on them.
* <LI>The `Dcel` template-parameter should be substituted by
* a class that is a model of the `ArrangementDcel` concept. The
* a class that is a model of the `AosDcel` concept. The
* value of this parameter is by default
* `Arr_default_dcel<Traits>`.
* </UL>
*
* \cgalModels{ArrangementBasicTopologyTraits}
* \cgalModels{AosBasicTopologyTraits}
*
* \sa `Arr_default_dcel<Traits>`
* \sa `CGAL::Arr_geodesic_arc_on_sphere_traits_2<Kernel,x,y>`
@ -62,10 +62,10 @@ public:
/// \name Accessors
/// @{
/*! obtains the DCEL (const version). */
/*! obtains the \dcel (const version). */
const Dcel& dcel() const;
/*! obtains the DCEL (non-const version). */
/*! obtains the \dcel (non-const version). */
Dcel& dcel();
/*! obtains the spherical face (const version). */

View File

@ -17,14 +17,10 @@ namespace CGAL {
* \sa `Arr_closed_side_tag`
* \sa `Arr_contracted_side_tag`
* \sa `Arr_identified_side_tag`
* \sa `ArrangementBasicTraits_2`
* \sa `AosBasicTraits_2`
*/
struct Arr_oblivious_side_tag {};
}
namespace CGAL {
/*! \ingroup PkgArrangementOnSurface2Tags
*
* This type tag is used to indicate that a side of the parameter space, either
@ -35,7 +31,7 @@ namespace CGAL {
* `Bottom_side_category`, and `Top_side_category`, nested in every geometry
* traits class, must be convertible to the type `Arr_open_side_tag`. For
* example, all categories above, nested in every model of the
* `ArrangementOpenBoundaryTraits_2` concept, must be convertible to
* `AosOpenBoundaryTraits_2` concept, must be convertible to
* `Arr_open_side_tag`, as curves are expected to approach all the four boundary
* sides of the parameter space (i.e., left, right, bottom, and top).
*
@ -46,14 +42,10 @@ namespace CGAL {
* \sa `Arr_closed_side_tag`
* \sa `Arr_contracted_side_tag`
* \sa `Arr_identified_side_tag`
* \sa `ArrangementOpenBoundaryTraits_2`
* \sa `AosOpenBoundaryTraits_2`
*/
struct Arr_open_side_tag : {};
}
namespace CGAL {
/*! \ingroup PkgArrangementOnSurface2Tags
*
* This type tag is used to indicate that a side of the parameter space, either
@ -73,14 +65,10 @@ namespace CGAL {
* \sa `Arr_open_side_tag`
* \sa `Arr_contracted_side_tag`
* \sa `Arr_identified_side_tag`
* \sa `ArrangementOpenBoundaryTraits_2`
* \sa `AosOpenBoundaryTraits_2`
*/
struct Arr_closed_side_tag {};
}
namespace CGAL {
/*! \ingroup PkgArrangementOnSurface2Tags
*
* This type tag is used to indicate that a side of the parameter space, either
@ -92,7 +80,7 @@ namespace CGAL {
* nested in every geometry traits class, must be convertible to the type
* `Arr_contracted_side_tag`. For example, the `Bottom_side_category` and
* `Top_side_category` category types, nested in every model of the
* `ArrangementSphericalBoundaryTraits_2 concept` (such as any instance of the
* `AosSphericalBoundaryTraits_2 concept` (such as any instance of the
* `Arr_geodesic_arc_on_sphere_traits_2` class template) must be convertible to
* `Arr_contracted_side_tag`
*
@ -103,14 +91,10 @@ namespace CGAL {
* \sa `Arr_open_side_tag`
* \sa `Arr_closed_side_tag`
* \sa `Arr_identified_side_tag`
* \sa `ArrangementOpenBoundaryTraits_2`
* \sa `AosOpenBoundaryTraits_2`
*/
struct Arr_contracted_side_tag {};
}
namespace CGAL {
/*! \ingroup PkgArrangementOnSurface2Tags
*
* This type tag is used to indicate that a side of the parameter space, either
@ -122,7 +106,7 @@ namespace CGAL {
* nested in every geometry traits class, must be convertible to the type
* `Arr_identified_side_tag`. For example, the `Left_side_category` and
* `Right_side_category` category types, nested in every model of the
* `ArrangementSphericalBoundaryTraits_2 concept` (such as any instance of the
* `AosSphericalBoundaryTraits_2 concept` (such as any instance of the
* `Arr_geodesic_arc_on_sphere_traits_2` class template) must be convertible to
* `Arr_identified_side_tag`
*
@ -133,7 +117,7 @@ namespace CGAL {
* \sa `Arr_open_side_tag`
* \sa `Arr_closed_side_tag`
* \sa `Arr_contracted_side_tag`
* \sa `ArrangementOpenBoundaryTraits_2`
* \sa `AosOpenBoundaryTraits_2`
*/
struct Arr_identified_side_tag {};

View File

@ -1,66 +1,69 @@
namespace CGAL {
/*!
\ingroup PkgArrangementOnSurface2PointLocation
\anchor arr_reftrap_pl
The `Arr_trapezoid_ric_point_location` class implements the incremental randomized algorithm
introduced by Mulmuley \cgalCite{m-fppa-90} as presented by
Seidel \cgalCite{s-sfira-91} (see also [\cgalCite{bkos-cgaa-00} Chapter 6).
It subdivides each arrangement face to pseudo-trapezoidal cells, each
of constant complexity, and constructs and maintains a linear-size search
structure on top of these cells, such that each query can be answered
in \cgalBigO{\log n} time, where \f$ n\f$ is the complexity of the arrangement.
Constructing the search structures takes \cgalBigO{n \log n} expected time
and may require a small number of rebuilds \cgalCite{hkh-iiplgtds-12}. Therefore
attaching a trapezoidal point-location object to an existing arrangement
may incur some overhead in running times. In addition, the point-location
object needs to keep its auxiliary data structures up-to-date as the
arrangement goes through structural changes. It is therefore recommended
to use this point-location strategy for static arrangements (or arrangement
that do not alter frequently), and when the number of issued queries
is relatively large.
This strategy supports arbitrary subdivisions, including unbounded ones.
\cgalModels{ArrangementPointLocation_2,ArrangementVerticalRayShoot_2}
\sa `ArrangementPointLocation_2`
\sa `ArrangementVerticalRayShoot_2`
\sa `CGAL::Arr_point_location_result<Arrangement>`
/*! \ingroup PkgArrangementOnSurface2PointLocation
*
* \anchor arr_reftrap_pl
*
* The `Arr_trapezoid_ric_point_location` class implements the incremental
* randomized algorithm introduced by Mulmuley \cgalCite{m-fppa-90} as presented
* by Seidel \cgalCite{s-sfira-91} (see also [\cgalCite{bkos-cgaa-00} Chapter
* 6). It subdivides each arrangement face to pseudo-trapezoidal cells, each of
* constant complexity, and constructs and maintains a linear-size search
* structure on top of these cells, such that each query can be answered in
* \cgalBigO{\log n} time, where \f$n\f$ is the complexity of the arrangement.
*
* Constructing the search structures takes \cgalBigO{n \log n} expected time
* and may require a small number of rebuilds
* \cgalCite{hkh-iiplgtds-12}. Therefore attaching a trapezoidal point-location
* object to an existing arrangement may incur some overhead in running
* times. In addition, the point-location object needs to keep its auxiliary
* data structures up-to-date as the arrangement goes through structural
* changes. It is therefore recommended to use this point-location strategy for
* static arrangements (or arrangement that do not alter frequently), and when
* the number of issued queries is relatively large.
*
* This strategy supports arbitrary subdivisions, including unbounded ones.
*
* \cgalModels{AosPointLocation_2,AosVerticalRayShoot_2}
*
* \sa `AosPointLocation_2`
* \sa `AosVerticalRayShoot_2`
* \sa `CGAL::Arr_point_location_result<Arrangement>`
*/
template< typename Arrangement >
template <typename Arrangement>
class Arr_trapezoid_ric_point_location {
public:
/// \name Creation
/// @{
/// \name Creation
/// @{
/*! If `with_guarantees` is set to true, the construction performs rebuilds in
* order to guarantee a resulting structure with linear size and logarithmic
* query time. Otherwise the structure has expected linear size and expected
* logarithmic query time.
*/
Arr_trapezoid_ric_point_location(bool with_guarantees = true);
/*!
If with_guarantees is set to true, the construction performs rebuilds in order to guarantee a resulting structure with linear size and logarithmic query time. Otherwise the structure has expected linear size and expected logarithmic query time.
*/
Arr_trapezoid_ric_point_location (bool with_guarantees = true);
/*! constructs a point location search structure for the given arrangement.
* If with_guarantees is set to true, the construction performs rebuilds in
* order to guarantee a resulting structure with linear size and logarithmic
* query time. Otherwise the structure has expected linear size and expected
* logarithmic query time.
*/
Arr_trapezoid_ric_point_location(const Arrangement& arr,
bool with_guarantees = true);
/*!
Constructs a point location search structure for the given arrangement. If with_guarantees is set to true, the construction performs rebuilds in order to guarantee a resulting structure with linear size and logarithmic query time. Otherwise the structure has expected linear size and expected logarithmic query time.
*/
Arr_trapezoid_ric_point_location (const Arrangement& arr, bool with_guarantees = true);
/// @}
/// @}
/// \name Modifiers
/// @{
/// \name Modifiers
/// @{
/*!
If with_guarantees is set to true, the structure will guarantee linear size and logarithmic query time, that is, this function may cause a reconstruction of the data structure.
*/
void with_guarantees (bool with_guarantees);
/// @}
/*! If with_guarantees is set to true, the structure will guarantee linear
* size and logarithmic query time, that is, this function may cause a
* reconstruction of the data structure.
*/
void with_guarantees(bool with_guarantees);
/// @}
}; /* end Arr_trapezoid_ric_point_location */
} /* end namespace CGAL */

View File

@ -14,13 +14,12 @@ namespace CGAL {
* (especially when the number of modifications applied to the arrangement is
* high) and provided only for educational purposes.
*
* \cgalModels{ArrangementPointLocation_2,ArrangementVerticalRayShoot_2}
* \cgalModels{AosPointLocation_2,AosVerticalRayShoot_2}
*
* \sa `ArrangementPointLocation_2`
* \sa `ArrangementVerticalRayShoot_2`
* \sa `AosPointLocation_2`
* \sa `AosVerticalRayShoot_2`
* \sa `CGAL::Arr_point_location_result<Arrangement>`
*/
template <typename Arrangement_>
class Arr_triangulation_point_location : public Arrangement_::Observer {}

View File

@ -10,24 +10,24 @@ namespace CGAL {
* The `Arr_unb_planar_topology_traits_2` template has two parameters:
* <UL>
* <LI>The `GeometryTraits_2` template-parameter should be substituted by
* a model of the `ArrangementBasicTraits_2` concept. The traits
* a model of the `AosBasicTraits_2` concept. The traits
* class defines the types of \f$x\f$-monotone curves and two-dimensional
* points, namely `ArrangementBasicTraits_2::X_monotone_curve_2` and
* `ArrangementBasicTraits_2::Point_2`,
* points, namely `AosBasicTraits_2::X_monotone_curve_2` and
* `AosBasicTraits_2::Point_2`,
* respectively, and supports basic geometric predicates on them.
* <LI>The `Dcel` template-parameter should be substituted by
* a class that is a model of the `ArrangementDcel` concept. The
* a class that is a model of the `AosDcel` concept. The
* value of this parameter is by default
* `Arr_default_dcel<Traits>`.
* </UL>
*
* \cgalModels{ArrangementBasicTopologyTraits}
* \cgalModels{AosBasicTopologyTraits}
*
* \sa `Arr_default_dcel<Traits>`
* \sa `CGAL::Arr_geodesic_arc_on_sphere_traits_2<Kernel,x,y>`
*/
template <typename GeometryTraits_2,
typename Dcel = Arr_default_dcel<GeometryTraits_2> >
typename Dcel = Arr_default_dcel<GeometryTraits_2>>
class Arr_unb_planar_topology_traits_2 {
public:
/// \name Types
@ -62,10 +62,10 @@ public:
/// \name Accessors
/// @{
/*! obtains the DCEL (const version). */
/*! obtains the \dcel (const version). */
const Dcel& dcel() const;
/*! obtains the DCEL (non-const version). */
/*! obtains the \dcel (non-const version). */
Dcel& dcel();
/*! obtains the unbounded face (const version). */

View File

@ -1,69 +1,64 @@
namespace CGAL {
/*! \ingroup PkgArrangementOnSurface2Ref
*
* `Arr_vertex_index_map` maintains a mapping of vertex handles of an attached
* arrangement object to indices (of type `unsigned int`). This class template
* is a model of the concept `ReadablePropertyMap`. A mapping between vertex
* handles and indices enables convenient usage of property-map classes supplied
* by `boost`. For example, the property-map class templates
* `boost::vector_property_map`, which is based on `std::vector`, and
* `boost::iterator_property_map`, which can be used to implement a property map
* based on a native \CC array, require the user to supply a mapping such as
* `Arr_vertex_index_map`.
*
* As new vertices might be inserted into the attached arrangement, and
* existing vertices might be removed, the notification mechanism is used
* to dynamically maintain the mapping of vertex handles to indices.
*
* \cgalModels{DefaultConstructible,CopyConstructible,Assignable,ReadablePropertyMap}
*
* \sa `Arr_face_index_map<Arrangement>`
/*! \ingroup PkgArrangementOnSurface2Ref
*
* `Arr_vertex_index_map` maintains a mapping of vertex handles of an attached
* arrangement object to indices (of type `unsigned int`). This class template
* is a model of the concept `ReadablePropertyMap`. A mapping between vertex
* handles and indices enables convenient usage of property-map classes supplied
* by `boost`. For example, the property-map class templates
* `boost::vector_property_map`, which is based on `std::vector`, and
* `boost::iterator_property_map`, which can be used to implement a property map
* based on a native \CC array, require the user to supply a mapping such as
* `Arr_vertex_index_map`.
*
* As new vertices might be inserted into the attached arrangement, and
* existing vertices might be removed, the notification mechanism is used
* to dynamically maintain the mapping of vertex handles to indices.
*
* \cgalModels{DefaultConstructible,CopyConstructible,Assignable,ReadablePropertyMap}
*
* \sa `Arr_face_index_map<Arrangement>`
*/
template <typename Arrangement_>
class Arr_vertex_index_map: public Arrangement_::Observer {
public:
/// \name Types
/// @{
/// the type of the attached arrangement.
typedef Arrangement_ Arrangement_2;
typedef typename Arrangement_2::Base_aos Base_aos;
typedef boost::readable_property_map_tag category;
typedef unsigned int value_type;
typedef unsigned int reference;
typedef Vertex_handle key_type;
/// The vertex handle type.
typedef typename Base_aos::Vertex_handle Vertex_handle;
/// The type of mapping of vertices to indices.
typedef Unique_hash_map<Vertex_handle, value_type> Index_map;
/// @}
/// \name Creation
/// @{
/*! constructs a map that is unattached to any arrangement instance.
*/
Arr_vertex_index_map();
template< typename Arrangement_>
class Arr_vertex_index_map: public Arrangement_::Observer {
public:
/*! constructs a map and attaches it to the given arrangement `arr`.
*/
Arr_vertex_index_map(Base_aos& arr);
/// \name Types
/// @{
/*! the type of the attached arrangement.
*/
typedef Arrangement_ Arrangement_2;
typedef typename Arrangement_2::Base_aos Base_aos;
typedef boost::readable_property_map_tag category;
typedef unsigned int value_type;
typedef unsigned int reference;
typedef Vertex_handle key_type;
/*! The vertex handle type.
*/
typedef typename Base_aos::Vertex_handle Vertex_handle;
/*! The type of mapping of vertices to indices.
*/
typedef Unique_hash_map<Vertex_handle, value_type> Index_map;
/// @}
/// \name Creation
/// @{
/*! constructs a map that is unattached to any arrangement instance.
*/
Arr_vertex_index_map();
/*! constructs a map and attaches it to the given arrangement `arr`.
*/
Arr_vertex_index_map(Base_aos& arr);
/// @}
}; /* end Arr_accessor */
/// @}
}; /* end Arr_accessor */
} /* end namespace CGAL */

View File

@ -1,38 +1,31 @@
namespace CGAL {
/*!
\ingroup PkgArrangementOnSurface2PointLocation
/*! \ingroup PkgArrangementOnSurface2PointLocation
*
* \anchor arr_refwalk_pl
*
* The `Arr_walk_along_line_point_location` class implements a very simple
* point-location (and vertical ray-shooting) strategy that improves the naive
* one. The algorithm considers an imaginary vertical ray emanating from the
* query point, and simulates a walk along the zone of this ray, starting from
* the unbounded face until reaching the query point. In dense arrangements
* this walk can considerably reduce the number of traversed arrangement edges,
* with respect to the na&iuml;ve algorithm.
*
* The walk-along-a-line point-location object (just like the na&iuml;ve one)
* does not use any auxiliary data structures. Thus, attaching it to an existing
* arrangement takes constant time, and any ongoing updates to this arrangement
* do not affect the point-location object. It is therefore recommended to use
* the "walk" point-location strategy for arrangements that are constantly
* changing, especially if the number of issued queries is not large.
*
* \cgalModels{AosPointLocation_2,AosVerticalRayShoot_2}
*
* \sa `AosPointLocation_2`
* \sa `AosVerticalRayShoot_2`
* \sa `CGAL::Arr_point_location_result<Arrangement>`
*/
template <typename Arrangement>
class Arr_walk_along_line_point_location {};
\anchor arr_refwalk_pl
The `Arr_walk_along_line_point_location` class implements a very simple point-location (and
vertical ray-shooting) strategy that improves the naive one.
The algorithm considers an imaginary vertical ray emanating from the
query point, and simulates a walk along the zone of this ray, starting
from the unbounded face until reaching the query point.
In dense arrangements this walk can considerably reduce the number
of traversed arrangement edges, with respect to the na&iuml;ve
algorithm.
The walk-along-a-line point-location object (just like the na&iuml;ve one)
does not use any auxiliary data structures. Thus, attaching it to an
existing arrangement takes constant time, and any ongoing updates to
this arrangement do not affect the point-location object.
It is therefore recommended to use the "walk" point-location strategy
for arrangements that are constantly changing, especially if the number
of issued queries is not large.
\cgalModels{ArrangementPointLocation_2,ArrangementVerticalRayShoot_2}
\sa `ArrangementPointLocation_2`
\sa `ArrangementVerticalRayShoot_2`
\sa `CGAL::Arr_point_location_result<Arrangement>`
*/
template< typename Arrangement >
class Arr_walk_along_line_point_location {
public:
}; /* end Arr_walk_along_line_point_location */
} /* end namespace CGAL */

View File

@ -5,7 +5,7 @@ namespace CGAL {
* \anchor arr_refarr
*
* An object `arr` of the class `Arrangement_2` represents the planar
* subdivision induced by a set of \f$ x\f$-monotone curves and isolated points
* subdivision induced by a set of \f$x\f$-monotone curves and isolated points
* into maximally connected cells. The arrangement is represented as a
* doubly-connected edge-list (\dcel) such that each \dcel vertex is associated
* with a point of the plane and each edge is associated with an \f$
@ -16,13 +16,13 @@ namespace CGAL {
* The `Arrangement_2` template has two parameters:
* <UL>
* <LI>The `Traits` template-parameter should be instantiated with
* a model of the `ArrangementBasicTraits_2` concept. The traits
* class defines the types of \f$ x\f$-monotone curves and two-dimensional
* points, namely `ArrangementBasicTraits_2::X_monotone_curve_2` and
* `ArrangementBasicTraits_2::Point_2`,
* a model of the `AosBasicTraits_2` concept. The traits
* class defines the types of \f$x\f$-monotone curves and two-dimensional
* points, namely `AosBasicTraits_2::X_monotone_curve_2` and
* `AosBasicTraits_2::Point_2`,
* respectively, and supports basic geometric predicates on them.
* <LI>The `Dcel` template-parameter should be instantiated with
* a class that is a model of the `ArrangementDcel` concept. The
* a class that is a model of the `AosDcel` concept. The
* value of this parameter is by default
* `Arr_default_dcel<Traits>`.
* </UL>
@ -30,9 +30,9 @@ namespace CGAL {
* The available traits classes and \dcel classes are
* described below.
*
* \sa `ArrangementDcel`
* \sa `AosDcel`
* \sa `Arr_default_dcel<Traits>`
* \sa `ArrangementBasicTraits_2`
* \sa `AosBasicTraits_2`
* \sa `CGAL::overlay()`
* \sa `CGAL::is_valid()`
*
@ -156,41 +156,42 @@ public:
/// @}
}; /* end Arrangement_2 */
} /* end namespace CGAL */
namespace CGAL {
/*! \ingroup PkgArrangementOnSurface2Insert
* The function `%insert` inserts one or more curves or \f$ x\f$-monotone curves
* The function `%insert` inserts one or more curves or \f$x\f$-monotone curves
* into a given arrangement, where no restrictions are imposed on the inserted
* curves. If an inserted curve is not \f$ x\f$-monotone curve, it is subdivided
* into \f$ x\f$-monotone subcurves (and perhaps isolated points), which are
* curves. If an inserted curve is not \f$x\f$-monotone curve, it is subdivided
* into \f$x\f$-monotone subcurves (and perhaps isolated points), which are
* inserted into the arrangement.
*
* \cgalHeading{Requirements}
*
* <UL>
* <LI>If the curve is \f$ x\f$-monotone curve then The instantiated
* `Traits` class must model the `ArrangementXMonotoneTraits_2`
* concept. In case that the curve is not \f$ x\f$-monotone then the
* <LI>If the curve is \f$x\f$-monotone curve then The instantiated
* `Traits` class must model the `AosXMonotoneTraits_2`
* concept. In case that the curve is not \f$x\f$-monotone then the
* instantiated `Traits` class must model the
* `ArrangementTraits_2` concept. That is, it should define the
* `Curve_2` type, and support its subdivision into \f$ x\f$-monotone
* `ArrtTraits_2` concept. That is, it should define the
* `Curve_2` type, and support its subdivision into \f$x\f$-monotone
* subcurves (and perhaps isolated points).
* <LI>The point-location object `pl`, must model the
* `ArrangementPointLocation_2` concept.
* `AosPointLocation_2` concept.
* </UL>
*/
/// @{
/*! Inserts the given curve `c` into the arrangement `arr`.
* `c` is subdivided into \f$ x\f$-monotone subcurves (and perhaps isolated
* `c` is subdivided into \f$x\f$-monotone subcurves (and perhaps isolated
* points). Each subcurve is in turn inserted into the arrangement by locating
* its left endpoint and computing its zone until reaching the right endpoint.
*
* The given point-location object `pl` is used to locate the left
* endpoints of the \f$ x\f$-monotone curves. By default, the function uses the
* endpoints of the \f$x\f$-monotone curves. By default, the function uses the
* "walk along line" point-location strategy - namely an instance of
* the class `Arr_walk_along_line_point_location<Arrangement_2<Traits,Dcel> >`.
*
@ -200,7 +201,7 @@ template <typename Traits, typename Dcel, typename Curve, typename PointLocation
void insert(Arrangement_2<Traits,Dcel>& arr, const Curve& c,
const PointLocation& pl = walk_pl);
/*! Inserts the<I>\f$ x\f$-monotone (only)</I> curve `xc` into the arrangement
/*! Inserts the<I>\f$x\f$-monotone (only)</I> curve `xc` into the arrangement
* `arr`. The object `obj`, which wraps a `Vertex_const_handle`, a
* `Halfedge_const_handle`, or a `Face_const_handle`, represents the location of
* `xc`'s left endpoint in the arrangement. The zone of `xc` is computed
@ -213,7 +214,7 @@ void insert(Arrangement_2<Traits, Dcel>& arr,
const typename Traits::X_monotone_curve_2& xc,
typename Arr_point_location_result<Arrangement_2<Traits, Dcel> >::type obj);
/*! Aggregately inserts the curves or \f$ x\f$-monotone curves in the range
/*! Aggregately inserts the curves or \f$x\f$-monotone curves in the range
* `[first,last)` into the arrangement `arr` using the sweep-line framework.
* \param arr the target arrangement.
* \param first the iterator to the first element in the range of curves.
@ -227,7 +228,7 @@ void insert(Arrangement_2<Traits, Dcel>& arr,
/*! \ingroup PkgArrangementOnSurface2Funcs
*
* Inserts a given \f$ x\f$-monotone curve into a given arrangement, where the
* Inserts a given \f$x\f$-monotone curve into a given arrangement, where the
* interior of the given curve is disjoint from all existing arrangement
* vertices and edges. Under this assumption, it is possible to locate the
* endpoints of the given curve in the arrangement, and use one of the
@ -247,9 +248,9 @@ void insert(Arrangement_2<Traits, Dcel>& arr,
*
* <UL>
* <LI>The instantiated `Traits` class must model the restricted
* `ArrangementBasicTraits_2` concept, as no intersections are computed.
* `AosBasicTraits_2` concept, as no intersections are computed.
* <LI>The point-location object `pl` must model the
* `ArrangementPointLocation_2` concept.
* `AosPointLocation_2` concept.
* </UL>
*/
template <typename Traits, typename Dcel,typename PointLocation>
@ -260,7 +261,7 @@ insert_non_intersecting_curve(Arrangement_2<Traits,Dcel>& arr,
/*! \ingroup PkgArrangementOnSurface2Funcs
*
* Inserts a set of \f$ x\f$-monotone curves in a given range into a given
* Inserts a set of \f$x\f$-monotone curves in a given range into a given
* arrangement. The insertion is performed in an aggregated manner, using the
* sweep-line algorithm. The input curves should be pairwise disjoint in their
* interior and pairwise interior-disjoint from all existing arrangement
@ -270,7 +271,7 @@ insert_non_intersecting_curve(Arrangement_2<Traits,Dcel>& arr,
*
* <UL>
* <LI>The instantiated `Traits` class must model the
* `ArrangementBasicTraits_2` concept, as no intersections are computed.
* `AosBasicTraits_2` concept, as no intersections are computed.
* <LI>`InputIterator::value_type` must be `Traits::X_monotone_curve_2`
* </UL>
*/
@ -296,14 +297,14 @@ void insert_non_intersecting_curves(Arrangement_2<Traits,Dcel>& arr,
*
* <UL>
* <LI>The instantiated `Traits` class must model the
* `ArrangementXMonotoneTraits_2` concept. Not all expressions listed
* `AosXMonotoneTraits_2` concept. Not all expressions listed
* by this concept are required. In fact the traits class must model the
* `ArrangementBasicTraits_2` concept, and support the splitting functionality.
* `AosBasicTraits_2` concept, and support the splitting functionality.
* <LI>The point-location object `pl`, must model the
* `ArrangementPointLocation_2` concept.
* `AosPointLocation_2` concept.
* </UL>
*/
template<typename Traits, typename Dcel, typename PointLocation>
template <typename Traits, typename Dcel, typename PointLocation>
typename Arrangement_2<Traits,Dcel>::Vertex_handle
insert_point(Arrangement_2<Traits,Dcel>& arr,
const typename Traits::Point_2& p,
@ -315,7 +316,7 @@ insert_point(Arrangement_2<Traits,Dcel>& arr,
*
* Invokes the member function `arr.is_valid()` to verify the topological
* correctness of the arrangement. Then it performs additional validity
* tests. It checks that all \f$ x\f$-monotone curves associated with
* tests. It checks that all \f$x\f$-monotone curves associated with
* arrangement edges are pairwise disjoint in their interior. Then it makes sure
* that all holes and all isolated vertices are located within the proper
* arrangement faces. Note that the test carried out by this function may take a
@ -327,7 +328,7 @@ insert_point(Arrangement_2<Traits,Dcel>& arr,
* The instantiated traits class must model the concept
* `ArranagmentXMonotoneTraits_2`.
*/
template<typename Traits, typename Dcel>
template <typename Traits, typename Dcel>
bool is_valid(const Arrangement_2<Traits, Dcel>& arr);
/*! \ingroup PkgArrangementOnSurface2Funcs
@ -337,8 +338,8 @@ bool is_valid(const Arrangement_2<Traits, Dcel>& arr);
* its endpoints become isolated, they are removed as well. The call
* `remove_edge(arr, e)` is equivalent to the call `arr.remove_edge (e, true,
* true)`. However, this free function requires that `Traits` be a model of the
* refined concept `ArrangementXMonotoneTraits_2`, which requires merge
* operations on \f$ x\f$-monotone curves. If one of the end-vertices of the
* refined concept `AosXMonotoneTraits_2`, which requires merge
* operations on \f$x\f$-monotone curves. If one of the end-vertices of the
* given edge becomes redundant after the edge is removed (see `remove_vertex()`
* for the definition of a redundant vertex), it is removed, and its incident
* edges are merged. If the edge-removal operation causes two faces to merge,
@ -349,7 +350,7 @@ bool is_valid(const Arrangement_2<Traits, Dcel>& arr);
*
* <UL>
* <LI>The instantiated traits class must model the concept
* `ArrangementXMonotoneTraits_2`.
* `AosXMonotoneTraits_2`.
* </UL>
*/
template <typename Traits, typename Dcel>
@ -362,17 +363,17 @@ remove_edge(Arrangement_2<Traits,Dcel>& arr,
* Attempts to removed a given vertex from a given arrangement. The vertex can
* be removed if it is either an isolated vertex, (and has no incident edge,) or
* if it is a <I>redundant</I> vertex. That is, it has exactly two incident
* edges, whose associated curves can be merged to form a single \f$
* x\f$-monotone curve. The function returns a boolean value that indicates
* edges, whose associated curves can be merged to form a single \f$x\f$-monotone
* curve. The function returns a boolean value that indicates
* whether it succeeded removing the vertex from the arrangement.
*
* \cgalHeading{Requirements}
*
* <UL>
* <LI>The instantiated `Traits` class must model the
* `ArrangementXMonotoneTraits_2` concept. Not all expressions listed
* `AosXMonotoneTraits_2` concept. Not all expressions listed
* by this concept are required. In fact the traits class must model the
* `ArrangementBasicTraits_2` concept and support the merging functionality.
* `AosBasicTraits_2` concept and support the merging functionality.
* </UL>
*/
template <typename Traits, typename Dcel>

View File

@ -5,11 +5,11 @@ namespace CGAL {
* \anchor arr_refaos
*
* An object `aos` of the class `Arrangement_on_surface_2` represents the
* subdivision induced by a set of \f$ x\f$-monotone curves and isolated points
* subdivision induced by a set of \f$x\f$-monotone curves and isolated points
* into maximally connected cells. The arrangement is represented as a
* doubly-connected edge-list (<span class="textsc">Dcel</span>) such that each
* <span class="textsc">Dcel</span> vertex is associated with a point of the
* plane and each edge is associated with an \f$ x\f$-monotone curve whose
* plane and each edge is associated with an \f$x\f$-monotone curve whose
* interior is disjoint from all other edges and vertices. Recall that an
* arrangement edge is always comprised of a pair of twin <span
* class="textsc">Dcel</span> halfedges.
@ -18,21 +18,21 @@ namespace CGAL {
* <UL>
* <LI>The `GeometryTraits` template-parameter should be substituted by
* a model of a geometry traits. The minimal requirements are defined by the
* `ArrangementBasicTraits_2` concept. A model of this concept defines
* the types of \f$ x\f$-monotone curves and two-dimensional points, namely
* `ArrangementBasicTraits_2::X_monotone_curve_2` and
* `ArrangementBasicTraits_2::Point_2`, respectively, and supports basic
* `AosBasicTraits_2` concept. A model of this concept defines
* the types of \f$x\f$-monotone curves and two-dimensional points, namely
* `AosBasicTraits_2::X_monotone_curve_2` and
* `AosBasicTraits_2::Point_2`, respectively, and supports basic
* geometric predicates on them.
* <LI>The `TopologyTraits` template-parameter should be substituted by a
* class that is a model of the `ArrangementTopologyTraits` concept.
* class that is a model of the `AosTopologyTraits` concept.
* </UL>
*
* The available traits classes and <span class="textsc">Dcel</span> classes are
* described below.
* \sa `ArrangementDcel`
* \sa `AosDcel`
* \sa `Arr_default_dcel<Traits>`
* \sa `ArrangementBasicTraits_2`
* \sa `AosBasicTraits_2`
* \sa `CGAL::overlay()`
* Insertion Functions
@ -62,10 +62,10 @@ public:
/// \name Types
/// @{
/*! the geometry traits class in use. */
/// the geometry traits class in use.
typedef GeometryTraits Geometry_traits_2;
/*! the topology traits class in use. */
/// the topology traits class in use.
typedef TopologyTraits Topology_traits;
/*! a private type used as an abbreviation of the
@ -78,18 +78,18 @@ public:
*/
typedef typename Topology_traits::Dcel Dcel;
/*! the point type, as defined by the traits class. */
/// the point type, as defined by the traits class.
typedef typename Geometry_traits_2::Point_2 Point_2;
/*! the \f$ x\f$-monotone curve type, as defined by the traits class. */
/// the \f$x\f$-monotone curve type, as defined by the traits class.
typedef typename Geometry_traits_2::X_monotone_curve_2 X_monotone_curve_2;
/*! the size type (equivalent to `size_t`). */
/// the size type (equivalent to `std::size_t`).
typedef typename Dcel::Size Size;
/*! \ingroup PkgArrangementOnSurface2DCEL
* An object \f$ v\f$ of the class `Vertex` represents an arrangement vertex,
* that is a \f$ 0\f$-dimensional cell, associated with a point on the
* An object \f$v\f$ of the class `Vertex` represents an arrangement vertex,
* that is a \f$0\f$-dimensional cell, associated with a point on the
* ambient surface.
*/
class Vertex : public typename Dcel::Vertex {
@ -137,14 +137,14 @@ public:
*/
const typename Traits::Point_2& point() const;
/*! obtains the placement of the \f$ x\f$-coordinate in the parameter space,
/*! obtains the placement of the \f$x\f$-coordinate in the parameter space,
* that is, either the left boundary-side, the interior, or the right
* boundary-side. If the vertex lies on an identified vertical side, the
* return value is non-deterministic.
*/
Arr_parameter_space parameter_space_in_x() const;
/*! obtains the placement of the \f$ y\f$-coordinate in the parameter space,
/*! obtains the placement of the \f$y\f$-coordinate in the parameter space,
* that is, either the bottom boundary-side, the interior, or the top
* boundary-side. If the vertex lies on an identified horizontal side, the
* return value is non-deterministic.
@ -152,17 +152,16 @@ public:
Arr_parameter_space parameter_space_in_y() const;
/// @}
}; /* end Vertex */
/*! \ingroup PkgArrangementOnSurface2DCEL
* An object \f$ e\f$ of the class `Halfedge` represents a halfedge in the
* An object \f$e\f$ of the class `Halfedge` represents a halfedge in the
* arrangement. A halfedge is directed from its <I>source</I> vertex
* to its <I>target</I> vertex, and has an <I>incident face</I> lying to
* its left. Each halfedge has a <I>twin</I> halfedge directed in the
* opposite direction, where the pair of twin halfedges form together
* an arrangement edge, that is, a \f$ 1\f$-dimensional cell, associated
* with planar \f$ x\f$-monotone curve.
* an arrangement edge, that is, a \f$1\f$-dimensional cell, associated
* with planar \f$x\f$-monotone curve.
*
* Halfedges are stored in doubly-connected lists and form chains. These
* chains define the inner and outer boundaries of connected components.
@ -221,7 +220,7 @@ public:
*/
Ccb_halfedge_circulator ccb();
/*! obtains the \f$ x\f$-monotone curve associated with `e`.
/*! obtains the \f$x\f$-monotone curve associated with `e`.
* \pre `e` is not a fictitious halfedge.
*/
const typename Traits::X_monotone_curve_2& curve() const;
@ -372,7 +371,7 @@ public:
/// Mutable
/// @{
/*! a handle to an arrangement vertex. */
/// a handle to an arrangement vertex.
typedef unspecified_type Vertex_handle;
/*! a handle to a halfedge.
@ -380,7 +379,7 @@ public:
*/
typedef unspecified_type Halfedge_handle;
/*! a handle to an arrangement face. */
/// a handle to an arrangement face.
typedef unspecified_type Face_handle;
/*! a bidirectional iterator over the
@ -458,7 +457,7 @@ public:
*/
typedef unspecified_type Halfedge_const_handle;
/*! a handle to an arrangement face. */
/// a handle to an arrangement face.
typedef unspecified_type Face_const_handle;
/*! a bidirectional iterator over the
@ -791,7 +790,7 @@ public:
* \pre `c` must not be an unbounded curve.
* \pre `v1` and `v2` are associated with `c`'s endpoints.
* \pre If `v1` and `v2` are already connected by an edge, this edge
* represents an \f$ x\f$-monotone curve that is interior-disjoint from `c`).
* represents an \f$x\f$-monotone curve that is interior-disjoint from `c`).
*/
Halfedge_handle insert_at_vertices(const X_monotone_curve_2& c,
Vertex_handle v1,
@ -878,12 +877,17 @@ public:
* fictitious halfedge that should contain the vertex at infinity that
* corresponds to the unbounded left end of `c`. The function returns a
* handle for one of the new halfedges directed (lexicographically) from right
* to left. \pre The interior of `c` is disjoint from all existing
* arrangement vertices and edges. `c` must have a bounded right endpoint and
* an unbounded left end. \pre `pred->target()` is associated with the right
* endpoint of `c`, and `c` should be inserted after `pred` in a clockwise
* order around this vertex. \pre `fict_pred` is a fictitious halfedge that
* contains the unbounded left end of `c`.
* to left.
*
* \pre The interior of `c` is disjoint from all existing arrangement vertices
* and edges. `c` must have a bounded right endpoint and an unbounded left
* end.
*
* \pre `pred->target()` is associated with the right endpoint of `c`, and `c`
* should be inserted after `pred` in a clockwise order around this vertex.
*
* \pre `fict_pred` is a fictitious halfedge that contains the unbounded left
* end of `c`.
*/
Halfedge_handle insert_from_right_vertex(const X_monotone_curve_2& c,
Halfedge_handle pred,
@ -899,7 +903,7 @@ public:
* vertices and edges.
* \pre `pred1->target()` and `v2` are associated with `c`'s endpoints.
* \pre If `pred1->target` and `v2` are already connected by an edge, this
* edge represents an \f$ x\f$-monotone curve that is interior-disjoint from
* edge represents an \f$x\f$-monotone curve that is interior-disjoint from
* `c`).
*/
Halfedge_handle insert_at_vertices(const X_monotone_curve_2& c,
@ -918,7 +922,7 @@ public:
* \pre `pred1->target()` and `pred2->target()` are associated with `c`'s
* endpoints.
* \pre If `pred1->target` and `pred2->target()` are already connected by an
* edge, this edge represents an \f$ x\f$-monotone curve that is
* edge, this edge represents an \f$x\f$-monotone curve that is
* interior-disjoint from `c`).
*/
Halfedge_handle insert_at_vertices(const X_monotone_curve_2& c,
@ -943,7 +947,7 @@ public:
*/
Face_handle remove_isolated_vertex(Vertex_handle v);
/*! sets `c` to be the \f$ x\f$-monotone curve associated with the edge `e`.
/*! sets `c` to be the \f$x\f$-monotone curve associated with the edge `e`.
* The function obtains a handle for the modified edge (same as `e`).
* \pre `c` is geometrically equivalent to the curve currently associated
* with `e`.
@ -967,10 +971,11 @@ public:
/*! merges the edges represented by `e1` and `e2` into
* a single edge, associated with the given merged curve `c`. Denote `e1`'s
* end-vertices as \f$ u_1\f$ and \f$ v\f$, while `e2`'s end-vertices are
* denoted \f$ u_2\f$ and \f$ v\f$. The function removes the common vertex \f$
* v\f$ returns a handle for one of the merged halfedges, directed from \f$
* u_1\f$ to \f$ u_2\f$.
* end-vertices as \f$u_1\f$ and \f$v\f$, while `e2`'s end-vertices are
* denoted \f$u_2\f$ and \f$v\f$. The function removes the common vertex
* \f$v\f$ returns a handle for one of the merged halfedges, directed from
* \f$u_1\f$ to \f$u_2\f$.
*
* \pre `e1` and `e2` share a common end-vertex, such that the two other
* end-vertices of the two edges are associated with `c`'s endpoints.
* \pre `e1` and `e2` have the same direction.
@ -986,7 +991,7 @@ public:
* whether they should be left as isolated vertices in the arrangement.
* If the operation causes two faces to merge, the merged face is returned.
* Otherwise, the face to which the edge was incident is returned.
*/
*/
Face_handle remove_edge(Halfedge_handle e,
bool remove_source = true,
bool remove_target = true);
@ -1008,43 +1013,43 @@ public:
bool is_valid() const;
/// @}
}; /* end Arrangement_on_surface_2 */
} /* end namespace CGAL */
namespace CGAL {
/*! \ingroup PkgArrangementOnSurface2Insert
* The function `%insert` inserts one or more curves or \f$ x\f$-monotone
* The function `%insert` inserts one or more curves or \f$x\f$-monotone
* curves into a given arrangement, where no restrictions are imposed on the
* inserted curves. If an inserted curve is not \f$ x\f$-monotone curve, it is
* subdivided into \f$ x\f$-monotone subcurves (and perhaps isolated points),
* inserted curves. If an inserted curve is not \f$x\f$-monotone curve, it is
* subdivided into \f$x\f$-monotone subcurves (and perhaps isolated points),
* which are inserted into the arrangement.
*
* \cgalHeading{Requirements}
*
* <UL>
* <LI>If the curve is \f$ x\f$-monotone curve then The instantiated
* `Traits` class must model the `ArrangementXMonotoneTraits_2`
* concept. In case that the curve is not \f$ x\f$-monotone then the
* <LI>If the curve is \f$x\f$-monotone curve then The instantiated
* `Traits` class must model the `AosXMonotoneTraits_2`
* concept. In case that the curve is not \f$x\f$-monotone then the
* instantiated `Traits` class must model the
* `ArrangementTraits_2` concept. That is, it should define the
* `Curve_2` type, and support its subdivision into \f$ x\f$-monotone
* `AosTraits_2` concept. That is, it should define the
* `Curve_2` type, and support its subdivision into \f$x\f$-monotone
* subcurves (and perhaps isolated points).
* <LI>The point-location object `pl`, must model the
* `ArrangementPointLocation_2` concept.
* `AosPointLocation_2` concept.
* </UL>
*/
/// @{
/*! Inserts the given curve `c` into the arrangement `arr`. `c` is subdivided
* into \f$ x\f$-monotone subcurves (and perhaps isolated points). Each subcurve
* into \f$x\f$-monotone subcurves (and perhaps isolated points). Each subcurve
* is in turn inserted into the arrangement by locating its left endpoint and
* computing its zone until reaching the right endpoint.
*
* The given point-location object `pl` is used to locate the left endpoints of
* the \f$ x\f$-monotone curves. By default, the function uses the "walk along
* the \f$x\f$-monotone curves. By default, the function uses the "walk along
* line" point-location strategy - namely an instance of the class
* `Arr_walk_along_line_point_location<Arrangement_on_surface_2<GeometryTraits, TopologyTraits> >`.
*
@ -1070,7 +1075,7 @@ void insert(Arrangement_on_surface_2<GeometryTraits, TopologyTraits>& arr,
typename Arr_point_location_result<Arrangement_on_surface_2<GeometryTraits, TopologyTraits> >::type obj);
/*! Aggregately inserts the curves or \f$ x\f$-monotone curves in the range
/*! Aggregately inserts the curves or \f$x\f$-monotone curves in the range
* `[first,last)` into the arrangement `arr` using the sweep-line framework.
* \param arr the target arrangement.
* \param first the iterator to the first element in the range of curves.
@ -1090,7 +1095,7 @@ void insert(Arrangement_on_surface_2<GeometryTraits, TopologyTraits>& arr,
* arrangement's edges or vertices.
*
* If the give curve is not an \f$x\f$-monotone curve then the function
* subdivides the given curve into \f$ x\f$-monotone subcurves and isolated
* subdivides the given curve into \f$x\f$-monotone subcurves and isolated
* vertices . Each subcurve is in turn checked for intersection. The function
* uses the zone algorithm to check if the curve intersects the
* arrangement. First, the curve's left endpoint is located. Then, its zone is
@ -1104,7 +1109,7 @@ void insert(Arrangement_on_surface_2<GeometryTraits, TopologyTraits>& arr,
* `Arr_walk_along_line_point_location<Arrangement_on_surface_2<GeometryTraits,
* TopologyTraits> >`.
*
* Checks if the given curve or \f$ x\f$-monotone curve `c` intersects
* Checks if the given curve or \f$x\f$-monotone curve `c` intersects
* edges or vertices of the existing arrangement `arr`.
*
* \pre If provided, `pl` must be attached to the given arrangement `arr`.
@ -1112,14 +1117,14 @@ void insert(Arrangement_on_surface_2<GeometryTraits, TopologyTraits>& arr,
* \cgalHeading{Requirements}
*
* <UL>
* <LI>If `c` is \f$ x\f$-monotone then the instantiated `GeometryTraits`
* class must model the `ArrangementXMonotoneTraits_2` concept. If
* <LI>If `c` is \f$x\f$-monotone then the instantiated `GeometryTraits`
* class must model the `AosXMonotoneTraits_2` concept. If
* `c` is a curve then the instantiated `GeometryTraits` class must
* model the `ArrangementTraits_2` concept. That is, it should
* model the `AosTraits_2` concept. That is, it should
* define the `Curve_2` type, and support its subdivision into
* \f$ x\f$-monotone subcurves (and perhaps isolated points).
* \f$x\f$-monotone subcurves (and perhaps isolated points).
* <LI>The point-location object `pl`, must model the
* `ArrangementPointLocation_2` concept.
* `AosPointLocation_2` concept.
* </UL>
*/
template <typename GeometryTraits, typename TopologyTraits, typename Curve,
@ -1129,7 +1134,7 @@ bool do_intersect(Arrangement_on_surface_2<GeometryTraits, TopologyTraits>& arr,
/*! \ingroup PkgArrangementOnSurface2Funcs
*
* Inserts a given \f$ x\f$-monotone curve into a given arrangement, where the
* Inserts a given \f$x\f$-monotone curve into a given arrangement, where the
* given curve and the existing arrangement edges (more precisely, the curves
* geometric mappings of the edges) must be pairwise disjoint in their
* interiors, and the interior of the input curve must not contain existing
@ -1153,9 +1158,9 @@ bool do_intersect(Arrangement_on_surface_2<GeometryTraits, TopologyTraits>& arr,
*
* <UL>
* <LI>The instantiated `Traits` class must model the restricted
* `ArrangementBasicTraits_2` concept, as no intersections are computed.
* `AosBasicTraits_2` concept, as no intersections are computed.
* <LI>The point-location object `pl` must model the
* `ArrangementPointLocation_2` concept.
* `AosPointLocation_2` concept.
* </UL>
*/
template <typename GeometryTraits, typename TopologyTraits,
@ -1168,7 +1173,7 @@ insert_non_intersecting_curve
/*! \ingroup PkgArrangementOnSurface2Funcs
*
* Inserts a set of \f$ x\f$-monotone curves in a given range into a given
* Inserts a set of \f$x\f$-monotone curves in a given range into a given
* arrangement. The insertion is performed in an aggregated manner using the
* sweep-line algorithm. The input curves and the existing arrangement edges
* (more precisely, the curves geometric mappings of the edges) must be pairwise
@ -1181,7 +1186,7 @@ insert_non_intersecting_curve
*
* <UL>
* <LI>The instantiated `Traits` class must model the
* `ArrangementBasicTraits_2` concept, as no intersections are computed.
* `AosBasicTraits_2` concept, as no intersections are computed.
* <LI>`InputIterator::value_type` must be `Traits::X_monotone_curve_2`
* </UL>
*/
@ -1210,12 +1215,12 @@ void insert_non_intersecting_curves
*
* <UL>
* <LI>The instantiated `Traits` class must model the
* `ArrangementXMonotoneTraits_2` concept. Not all expressions listed
* `AosXMonotoneTraits_2` concept. Not all expressions listed
* by this concept are required. In fact the traits class must model the
* `ArrangementBasicTraits_2` concept, and support the splitting
* `AosBasicTraits_2` concept, and support the splitting
* functionality.
* <LI>The point-location object `pl`, must model the
* `ArrangementPointLocation_2` concept.
* `AosPointLocation_2` concept.
* </UL>
*/
template <typename GeometryTraits, typename TopologyTraits,
@ -1231,7 +1236,7 @@ insert_point(Arrangement_on_surface_2<GeometryTraits, TopologyTraits>& arr,
*
* Invokes the member function `arr.is_valid()` to verify the topological
* correctness of the arrangement. Then it performs additional validity
* tests. It checks that all \f$ x\f$-monotone curves associated with
* tests. It checks that all \f$x\f$-monotone curves associated with
* arrangement edges are pairwise disjoint in their interior. Then it makes sure
* that all holes and all isolated vertices are located within the proper
* arrangement faces. Note that the test carried out by this function may take a
@ -1254,8 +1259,8 @@ bool is_valid
* its endpoints become isolated, they are removed as well. The call
* `remove_edge(arr, e)` is equivalent to the call `arr.remove_edge (e, true,
* true)`. However, this free function requires that `Traits` be a model of the
* refined concept `ArrangementXMonotoneTraits_2`, which requires merge
* operations on \f$ x\f$-monotone curves. If one of the end-vertices of the
* refined concept `AosXMonotoneTraits_2`, which requires merge
* operations on \f$x\f$-monotone curves. If one of the end-vertices of the
* given edge becomes redundant after the edge is removed (see `remove_vertex()`
* for the definition of a redundant vertex), it is removed, and its incident
* edges are merged. If the edge-removal operation causes two faces to merge,
@ -1266,10 +1271,10 @@ bool is_valid
*
* <UL>
* <LI>The instantiated traits class must model the concept
* `ArrangementXMonotoneTraits_2`.
* `AosXMonotoneTraits_2`.
* </UL>
*/
template<typename GeometryTraits, typename TopologyTraits>
template <typename GeometryTraits, typename TopologyTraits>
typename Arrangement_on_surface_2<GeometryTraits, TopologyTraits>::Face_handle
remove_edge
(Arrangement_on_surface_2<GeometryTraits, TopologyTraits>& arr,
@ -1288,9 +1293,9 @@ remove_edge
*
* <UL>
* <LI>The instantiated `Traits` class must model the
* `ArrangementXMonotoneTraits_2` concept. Not all expressions listed
* `AosXMonotoneTraits_2` concept. Not all expressions listed
* by this concept are required. In fact the traits class must model the
* `ArrangementBasicTraits_2` concept and support the merging
* `AosBasicTraits_2` concept and support the merging
* functionality.
* </UL>
*/
@ -1324,9 +1329,9 @@ bool remove_vertex
*
* \pre If provided, `pl` must be attached to the given arrangement `arr`.
* \pre The instantiated `GeometryTraits` class must model the
* `ArrangementXMonotoneTraits_2` concept.
* `AosXMonotoneTraits_2` concept.
* \pre The point-location object `pl`, must model the
* `ArrangementPointLocation_2` concept.
* `AosPointLocation_2` concept.
* \pre Dereferencing `oi` must yield a polymorphic object of type
* `std::variant<Arrangement_on_surface_2::Vertex_handle, Arrangement_on_surface_2::Halfedge_handle, Arrangement_on_surface_2::Face_handle>`.
*

View File

@ -5,18 +5,18 @@ namespace CGAL {
* \anchor arr_refaos_with_hist
*
* An object `arr` of the class `Arrangement_on_surface_with_history_2`
* represents the planar subdivision induced by a set of input curves \f$ \cal
* C\f$. The arrangement is represented as a doubly-connected edge-list (<span
* class="textsc">Dcel</span>). As is the case for the
* represents the planar subdivision induced by a set of input curves
* \f$\cal C\f$. The arrangement is represented as a doubly-connected edge-list
* (<span class="textsc">Dcel</span>). As is the case for the
* `Arrangement_2<Traits,Dcel>`, each <span class="textsc">Dcel</span> vertex is
* associated with a point and each edge is associated with an \f$ x\f$-monotone
* associated with a point and each edge is associated with an \f$x\f$-monotone
* curve whose interior is disjoint from all other edges and vertices. Each such
* \f$ x\f$-monotone curve is a subcurve of some \f$ C \in \cal C\f$ - or may
* represent an overlap among several curves in \f$ \cal C\f$.
* \f$x\f$-monotone curve is a subcurve of some \f$C \in \cal C\f$ - or may
* represent an overlap among several curves in \f$\cal C\f$.
*
* The `Arrangement_on_surface_with_history_2` class-template extends the
* `Arrangement_2` class-template by keeping an additional container of input
* curves representing \f$ \cal C\f$, and by maintaining a cross-mapping between
* curves representing \f$\cal C\f$, and by maintaining a cross-mapping between
* these curves and the arrangement edges they induce. This way it is possible
* to determine the inducing curve(s) of each arrangement edge. This mapping
* also allows the traversal of input curves, and the traversal of edges induced
@ -26,33 +26,32 @@ namespace CGAL {
*
* <UL>
* <LI>The `GeometryTraits` template-parameter should be substituted by a
* model of the `ArrangementTraits_2` concept. The traits class defines the
* model of the `AosTraits_2` concept. The traits class defines the
* `Curve_2` type, which represents an input curve. It also defines the types
* of \f$ x\f$-monotone curves and two-dimensional points, namely
* `ArrangementTraits_2::X_monotone_curve_2` and
* `ArrangementTraits_2::Point_2`, respectively, and supports basic
* of \f$x\f$-monotone curves and two-dimensional points, namely
* `AosTraits_2::X_monotone_curve_2` and
* `AosTraits_2::Point_2`, respectively, and supports basic
* geometric predicates on them.
* <LI>The `TopologyTraits` template-parameter should be substituted by a
* class that is a model of the `ArrangementTopologyTraits` concept.
* class that is a model of the `AosTopologyTraits` concept.
* </UL>
*
* \sa `Arrangement_with_history_2<GeometryTraits,Dcel>`
* \sa `Arrangement_on_surface_2<GeometryTraits,TopologyTraits>`
* \sa `ArrangementTraits_2`
* \sa `ArrangementTopologyTraits`
* \sa `AosTraits_2`
* \sa `AosTopologyTraits`
*/
template <typename GeometryTraits, typename TopologyTraits>
class Arrangement_on_surface_with_history_2 :
public Arrangement_on_surface_2<GeometryTraits, TopologyTraits>
{
public Arrangement_on_surface_2<GeometryTraits, TopologyTraits> {
public:
/// \name Types
/// @{
//! the geometry traits class in use.
/// the geometry traits class in use.
typedef GeometryTraits Geometry_traits_2;
//! the topology traits class in use.
/// the topology traits class in use.
typedef TopologyTraits Topology_traits;
/*! a private type used as an abbreviation of the
@ -61,16 +60,16 @@ public:
typedef Arrangement_on_surface_with_history_2<Geometry_traits_2,
TopologyTraits> Self;
//! the <span class="textsc">Dcel</span> representation of the arrangement.
/// the <span class="textsc">Dcel</span> representation of the arrangement.
typedef typename Topology_traits::Dcel Dcel;
//! the point type, as defined by the traits class.
/// the point type, as defined by the traits class.
typedef typename Geometry_traits_2::Point_2 Point_2;
//! the \f$ x\f$-monotone curve type, as defined by the traits class.
/// the \f$x\f$-monotone curve type, as defined by the traits class.
typedef typename Geometry_traits_2::X_monotone_curve_2 X_monotone_curve_2;
//! the curve type, as defined by the traits class.
/// the curve type, as defined by the traits class.
typedef typename Geometry_traits_2::Curve_2 Curve_2;
/// @}
@ -82,7 +81,7 @@ public:
*/
/// @{
//! a handle for an input curve.
/// a handle for an input curve.
typedef unspecified_type Curve_handle;
/*! a bidirectional iterator over the curves that induce the arrangement.
@ -123,13 +122,13 @@ public:
/// \name Assignment Methods
/// @{
//! assignment operator.
/// assignment operator.
Self& operator=(other);
//! assigns the contents of another arrangement.
/// assigns the contents of another arrangement.
void assign(const Self& other);
//! clears the arrangement.
/// clears the arrangement.
void clear ();
/// @}
@ -140,31 +139,31 @@ public:
/// @{
//! returns the number of input curves that induce the arrangement.
/// returns the number of input curves that induce the arrangement.
Size number_of_curves() const;
//! returns the begin-iterator of the curves inducing the arrangement.
/// returns the begin-iterator of the curves inducing the arrangement.
Curve_iterator curves_begin();
//! returns the past-the-end iterator of the curves inducing the arrangement.
Curve_iterator curves_end();
//! returns the number of arrangement edges induced by the curve `ch`.
/// returns the number of arrangement edges induced by the curve `ch`.
Size number_of_induced_edges(Curve_handle ch) const;
//! returns the begin-iterator of the edges induced by the curve `ch`.
/// returns the begin-iterator of the edges induced by the curve `ch`.
Induced_edge_iterator induced_edges_begin(Curve_handle ch) const;
//! returns the past-the-end iterator of the edges induced by the curve `ch`.
/// returns the past-the-end iterator of the edges induced by the curve `ch`.
Induced_edge_iterator induced_edges_end(Curve_handle ch) const;
//! returns the number of input curves that originate the edge `e`.
/// returns the number of input curves that originate the edge `e`.
Size number_of_originating_curves(Halfedge_handle e) const;
//! returns the begin-iterator of the curves originating the edge `e`.
/// returns the begin-iterator of the curves originating the edge `e`.
Originating_curve_iterator originating_curves_begin(Halfedge_handle e) const;
//! returns the past-the-end iterator of the curves originating the edge `e`.
/// returns the past-the-end iterator of the curves originating the edge `e`.
Originating_curve_iterator originating_curves_end(Halfedge_handle e) const;
/// @}
@ -192,9 +191,9 @@ public:
/*! merges the edges represented by `e1` and `e2` into a single edge. The
* function returns a handle for one of the merged halfedges.
*
* \pre `e1` and `e2` share a common end-vertex, of degree \f$ 2\f$, and the
* \f$ x\f$-monotone curves associated with `e1` and `e2` are mergeable
* into a single \f$ x\f$-monotone curves.
* \pre `e1` and `e2` share a common end-vertex, of degree \f$2\f$, and the
* \f$x\f$-monotone curves associated with `e1` and `e2` are mergeable
* into a single \f$x\f$-monotone curves.
*/
Halfedge_handle merge_edge(Halfedge_handle e1, Halfedge_handle e2);
@ -210,7 +209,6 @@ public:
bool remove_target = true);
/// @}
}; /* end Arrangement_on_surface_with_history_2 */
/*! \ingroup PkgArrangementOnSurface2Insert
@ -222,14 +220,14 @@ public:
* computing its zone until reaching the right endpoint.
*
* The given point-location object `pl` is used to locate the left endpoints of
* the \f$ x\f$-monotone curves. By default, the function uses the "walk along
* the \f$x\f$-monotone curves. By default, the function uses the "walk along
* line" point-location strategy - namely an instance of the class
* `Arr_walk_along_line_point_location<Arrangement_2<Traits,Dcel> >`.
*
* \pre If provided, `pl` is attached to the given arrangement `arr`.
*/
template<typename GeometryTraits, typename TopologyTraits,
typename PointLocation>
template <typename GeometryTraits, typename TopologyTraits,
typename PointLocation>
typename Arrangement_on_surface_with_history_2<GeometryTraits, TopologyTraits>::Curve_handle
insert
(Arrangement_on_surface_with_history_2<GeometryTraits, TopologyTraits>& arr,
@ -261,7 +259,6 @@ Size remove_curve
(Arrangement_on_surface_with_history_2<GeometryTraits, TopologyTraits>& arr,
typename Arrangement_on_surface_with_history_2<GeometryTraits, TopologyTraits>::Curve_handle ch);
/*! \addtogroup PkgArrangementOnSurface2Overlay
*
* Computes the overlay of two arrangements with history `arr1` and `arr2`, and
@ -281,17 +278,16 @@ void overlay
Arrangement_on_surface_with_history_2<GeometryTraits, ResTopologyTraits>& res,
OverlayTraits& ovl_tr);
/*! \addtogroup PkgArrangementOnSurface2Overlay
*
* Computes the (simple) overlay of two arrangements with history `arr1` and
*`arr2`, and sets the output arrangement with history `res` to represent the
*overlaid arrangement. The function also constructs a consolidated set of
*curves that induce `res`. It employs the default overlay-traits, which
*practically does nothing.
* `arr2`, and sets the output arrangement with history `res` to represent the
* overlaid arrangement. The function also constructs a consolidated set of
* curves that induce `res`. It employs the default overlay-traits, which
* practically does nothing.
*
* \pre `res` does not refer to either `arr1` or `arr2` (that is, "self overlay"
*is not supported).
* is not supported).
*/
template <typename GeometryTraits, typename TopologyTraits1,
typename TopologyTraits2, typename ResTopologyTraits>

View File

@ -5,17 +5,17 @@ namespace CGAL {
* \anchor arr_refarr_with_hist
*
* An object `arr` of the class `Arrangement_with_history_2` represents the
* planar subdivision induced by a set of input curves \f$ \cal C\f$. The
* planar subdivision induced by a set of input curves \f$\cal C\f$. The
* arrangement is represented as a doubly-connected edge-list (\dcel). As is
* the case for the `Arrangement_2<Traits,Dcel>`, each \dcel vertex is
* associated with a point and each edge is associated with an \f$ x\f$-monotone
* associated with a point and each edge is associated with an \f$x\f$-monotone
* curve whose interior is disjoint from all other curves and points. Each such
* \f$ x\f$-monotone curve is a subcurve of some \f$ C \in \cal C\f$, or may
* represent an overlap among several curves in \f$ \cal C\f$.
* \f$x\f$-monotone curve is a subcurve of some \f$C \in \cal C\f$, or may
* represent an overlap among several curves in \f$\cal C\f$.
*
* The `Arrangement_with_history_2` class-template extends the `Arrangement_2`
* class-template by keeping an additional container of input curves
* representing \f$ \cal C\f$, and by maintaining a cross-mapping between these
* representing \f$\cal C\f$, and by maintaining a cross-mapping between these
* curves and the arrangement edges they induce. This way it is possible to
* determine the inducing curve(s) of each arrangement edge. This mapping also
* allows the traversal of input curves, and the traversal of edges induced by
@ -24,39 +24,39 @@ namespace CGAL {
* The `Arrangement_with_history_2` template has two parameters:
* <UL>
* <LI>The `Traits` template-parameter should be substituted by a model of
* the `ArrangementTraits_2` concept. The traits class defines the `Curve_2`
* the `AosTraits_2` concept. The traits class defines the `Curve_2`
* type, which represents an input curve. It also defines the types of \f$
* x\f$-monotone curves and two-dimensional points, namely
* `ArrangementTraits_2::X_monotone_curve_2` and `ArrangementTraits_2::Point_2`,
* `AosTraits_2::X_monotone_curve_2` and `AosTraits_2::Point_2`,
* respectively, and supports basic geometric predicates on them.
* <LI>The `Dcel` template-parameter should be substituted by a class that is
* a model of the `ArrangementDcelWithRebind` concept. The value of this
* a model of the `AosDcelWithRebind` concept. The value of this
* parameter is by default `Arr_default_dcel<Traits>`.
* </UL>
*
* \sa `ArrangementDcel`
* \sa `AosDcel`
* \sa `Arr_default_dcel<Traits>`
* \sa `ArrangementTraits_2`
* \sa `AosTraits_2`
* \sa `Arrangement_2<Traits,Dcel>`
* \sa `insertion functions`
* \sa `removal functions`
* \sa `overlaying arrangements`
*/
template <typename Traits, typename Dcel>
class Arrangement_with_history_2 : public Arrangement_on_surface_with_history_2<Traits, typename Default_planar_topology<Traits, Dcel>::Traits> {
class Arrangement_with_history_2 :
public Arrangement_on_surface_with_history_2<Traits, typename Default_planar_topology<Traits, Dcel>::Traits> {
public:
/// \name Types
/// @{
//! the geometry traits class.
/// the geometry traits class.
typedef Traits Geometry_traits;
//! The topology traits.
/// The topology traits.
typedef typename Default_planar_topology<Geometry_traits, Dcel>::Traits
Topology_traits;
//! The base arrangement on surface type.
/// The base arrangement on surface type.
typedef Arrangement_on_surface_with_history_2<Geometry_traits, Topology_traits>
Base;
@ -129,13 +129,13 @@ public:
* computing its zone until reaching the right endpoint.
*
* The given point-location object `pl` is used to locate the left endpoints of
* the \f$ x\f$-monotone curves. By default, the function uses the "walk along
* the \f$x\f$-monotone curves. By default, the function uses the "walk along
* line" point-location strategy - namely an instance of the class
* `Arr_walk_along_line_point_location<Arrangement_2<Traits,Dcel> >`.
*
* \pre If provided, `pl` is attached to the given arrangement `arr`.
*/
template<typename Traits, typename Dcel, typename PointLocation>
template <typename Traits, typename Dcel, typename PointLocation>
typename Arrangement_with_history_2<Traits, Dcel>::Curve_handle
insert(Arrangement_with_history_2<Traits, Dcel>& arr,
const typename Traits::Curve_2& c,
@ -161,7 +161,6 @@ template <typename Traits, typename Dcel>
Size remove_curve(Arrangement_with_history_2<Traits,Dcel>& arr,
typename Arrangement_with_history_2<Traits,Dcel>::Curve_handle ch);
/*! \addtogroup PkgArrangementOnSurface2Overlay
* Computes the overlay of two arrangements with history `arr1` and `arr2`, and
* sets the output arrangement with history `res` to represent the overlaid
@ -170,14 +169,13 @@ Size remove_curve(Arrangement_with_history_2<Traits,Dcel>& arr,
*
* \pre `res` does not refer to either `arr1` or `arr2`.
*/
template<typename Traits, typename Dcel1, typename Dcel2,
typename ResDcel, typename OverlayTraits>
template <typename Traits, typename Dcel1, typename Dcel2,
typename ResDcel, typename OverlayTraits>
void overlay(const Arrangement_with_history_2<Traits,Dcel1>& arr1,
const Arrangement_with_history_2<Traits,Dcel2>& arr2,
Arrangement_with_history_2<Traits,ResDcel>& res,
OverlayTraits& ovl_tr);
/*! \addtogroup PkgArrangementOnSurface2Overlay
*
* Computes the (simple) overlay of two arrangements with history `arr1` and
@ -189,8 +187,7 @@ void overlay(const Arrangement_with_history_2<Traits,Dcel1>& arr1,
* \pre `res` does not refer to either `arr1` or `arr2` (that is, "self overlay"
* is not supported).
*/
template<typename Traits, typename Dcel1, typename Dcel2,
typename ResDcel>
template <typename Traits, typename Dcel1, typename Dcel2, typename ResDcel>
void overlay(const Arrangement_with_history_2<Traits,Dcel1>& arr1,
const Arrangement_with_history_2<Traits,Dcel2>& arr2,
Arrangement_with_history_2<Traits,ResDcel>& res);

View File

@ -12,16 +12,16 @@ public:
/// \name Types
/// @{
//! The integer number type.
/// The integer number type.
typedef CORE::BigInt Integer;
//! The rational number type.
/// The rational number type.
typedef CORE::BigRat Rational;
//! The polynomial type.
/// The polynomial type.
typedef CORE::Polynomial<Integer> Polynomial;
//! The algebraic number type.
/// The algebraic number type.
typedef CORE::Expr Algebraic;
/// @}

View File

@ -2,100 +2,89 @@ namespace CGAL {
namespace IO {
/*!
\defgroup PkgArrangementOnSurface2Read CGAL::IO::read()
\ingroup PkgArrangementOnSurface2IO
/*! \defgroup PkgArrangementOnSurface2Read CGAL::IO::read()
* \ingroup PkgArrangementOnSurface2IO
*
* Reads a given arrangement from a given input stream
* using a specific input format.
*
* \cgalHeading{Requirements}
*
* <UL>
* <LI>The instantiated `Formatter` class must model the
* `AosInputFormatter` concept.
* <LI>The instantiated `WithHistoryFormatter` class must model the
* `AosWithHistoryInputFormatter` concept.
* </UL>
*
* \sa `PkgArrangementOnSurface2Write`
* \sa `PkgArrangementOnSurface2op_left_shift`
* \sa `PkgArrangementOnSurface2op_right_shift`
*/
Reads a given arrangement from a given input stream
using a specific input format.
\cgalHeading{Requirements}
<UL>
<LI>The instantiated `Formatter` class must model the
`ArrangementInputFormatter` concept.
<LI>The instantiated `WithHistoryFormatter` class must model the
`ArrangementWithHistoryInputFormatter` concept.
</UL>
\sa `PkgArrangementOnSurface2Write`
\sa `PkgArrangementOnSurface2op_left_shift`
\sa `PkgArrangementOnSurface2op_right_shift`
*/
/// @{
/*!
Reads the arrangement object `arr` from the given input stream `is`
using a specific input format defined by \"formatter\".
*/
template<typename Traits, typename Dcel, typename Formatter>
std::istream& read (Arrangement_2<Traits,Dcel>& arr,
std::istream& is,
Formatter& formatter);
/*! Reads the arrangement object `arr` from the given input stream `is`
* using a specific input format defined by \"formatter\".
*/
template <typename Traits, typename Dcel, typename Formatter>
std::istream& read(Arrangement_2<Traits,Dcel>& arr,
std::istream& is, Formatter& formatter);
/// @}
/*!
\defgroup PkgArrangementOnSurface2Write CGAL::IO::write()
\ingroup PkgArrangementOnSurface2IO
/*! \defgroup PkgArrangementOnSurface2Write CGAL::IO::write()
* \ingroup PkgArrangementOnSurface2IO
*
* Writes a given arrangement into a given output stream
* using a specific output format.
*
* \cgalHeading{Requirements}
*
* <UL>
* <LI>The instantiated `Formatter` class must model the
* `AosOutputFormatter` concept.
* <LI>The instantiated `WithHistoryFormatter` class must model the
* `AosWithHistoryOutputFormatter` concept.
* </UL>
*
* \sa `PkgArrangementOnSurface2Read`
* \sa `PkgArrangementOnSurface2op_left_shift`
* \sa `PkgArrangementOnSurface2op_right_shift`
*/
Writes a given arrangement into a given output stream
using a specific output format.
\cgalHeading{Requirements}
<UL>
<LI>The instantiated `Formatter` class must model the
`ArrangementOutputFormatter` concept.
<LI>The instantiated `WithHistoryFormatter` class must model the
`ArrangementWithHistoryOutputFormatter` concept.
</UL>
\sa `PkgArrangementOnSurface2Read`
\sa `PkgArrangementOnSurface2op_left_shift`
\sa `PkgArrangementOnSurface2op_right_shift`
*/
/// @{
/*!
Writes the arrangement object `arr` into the given output stream
`os` using a specific output format defined by `formatter`.
*/
template<typename Traits, typename Dcel, typename Formatter>
std::ostream& write (const Arrangement_2<Traits,Dcel>& arr,
std::ostream& os,
Formatter& formatter);
/*! Writes the arrangement object `arr` into the given output stream
* `os` using a specific output format defined by `formatter`.
*/
template <typename Traits, typename Dcel, typename Formatter>
std::ostream& write(const Arrangement_2<Traits,Dcel>& arr,
std::ostream& os, Formatter& formatter);
/// @}
} // namespace IO
/*!
\ingroup PkgArrangementOnSurface2op_left_shift
Inserts the arrangement object `arr` into the output stream
`os` using the output format defined by the
`Arr_text_formatter` class. Only the basic geometric and
topological features of the arrangement are inserted. Auxiliary data
that may be attached to the \dcel features is ignored.
*/
template<typename Traits, typename Dcel>
std::ostream& operator<< (std::ostream& os,
const Arrangement_2<Traits,Dcel>& arr);
/*! \ingroup PkgArrangementOnSurface2op_left_shift
* Inserts the arrangement object `arr` into the output stream
* `os` using the output format defined by the
* `Arr_text_formatter` class. Only the basic geometric and
* topological features of the arrangement are inserted. Auxiliary data
* that may be attached to the \dcel features is ignored.
*/
template <typename Traits, typename Dcel>
std::ostream& operator<<(std::ostream& os,
const Arrangement_2<Traits, Dcel>& arr);
/*!
\ingroup PkgArrangementOnSurface2op_right_shift
Extracts an arrangement from a given input stream using the input
format defined by the `Arr_text_formatter` class - that is, only the
basic geometric and topological features of the arrangement are read
and no auxiliary data is attached to the Dcel features.
*/
template<class Traits, class Dcel>
std::istream& operator>>(std::istream& is, Arrangement_2<Traits,Dcel>& arr);
/*! \ingroup PkgArrangementOnSurface2op_right_shift
* Extracts an arrangement from a given input stream using the input
* format defined by the `Arr_text_formatter` class - that is, only the
* basic geometric and topological features of the arrangement are read
* and no auxiliary data is attached to the Dcel features.
*/
template <typename Traits, typename Dcel>
std::istream& operator>>(std::istream& is, Arrangement_2<Traits, Dcel>& arr);
} /* end namespace CGAL::IO*/

View File

@ -1,93 +1,83 @@
namespace CGAL {
/*!
\ingroup PkgArrangementOnSurface2IO
/*! \ingroup PkgArrangementOnSurface2IO
*
* `Arr_extended_dcel_text_formatter` defines the format of an arrangement in an
* input or output stream (typically a file stream), thus enabling reading and
* writing an `Arrangement` instance using a simple text format. The
* `Arrangement` class should be instantiated with a \dcel class which in turn
* instantiates the `Arr_extended_dcel` template with the `VertexData`,
* `HalfedgeData` and `FaceData` types. The formatter supports reading and
* writing the data objects attached to the arrangement vertices, halfedges and
* faces.
*
* The `Arr_extended_dcel_text_formatter` class assumes that the nested
* `Point_2` and the `Curve_2` types defined by the `Arrangement`
* template-parameter, as well as the `VertexData`, `HalfedgeData` and
* `FaceData` types, can all be written to an input stream using the `<<`
* operator and read from an input stream using the `>>` operator.
*
* \cgalModels{AosInputFormatter,AosOutputFormatter}
*
* \sa `PkgArrangementOnSurface2Read`
* \sa `PkgArrangementOnSurface2Write`
* \sa `Arr_extended_dcel<Traits,VData,HData,FData,V,H,F>`
*/
template <typename Arrangement>
class Arr_extended_dcel_text_formatter {};
`Arr_extended_dcel_text_formatter` defines the format of an arrangement in an input or output stream
(typically a file stream), thus enabling reading and writing an `Arrangement`
instance using a simple text format. The `Arrangement` class should be
instantiated with a \dcel class which in turn instantiates the
`Arr_extended_dcel` template with the `VertexData`, `HalfedgeData` and
`FaceData` types.
The formatter supports reading and writing the data objects attached to the
arrangement vertices, halfedges and faces.
The `Arr_extended_dcel_text_formatter` class assumes that the nested `Point_2` and the `Curve_2` types
defined by the `Arrangement` template-parameter, as well as the `VertexData`,
`HalfedgeData` and `FaceData` types, can all be written to an input stream using
the `<<` operator and read from an input stream using the `>>` operator.
\cgalModels{ArrangementInputFormatter,ArrangementOutputFormatter}
\sa `PkgArrangementOnSurface2Read`
\sa `PkgArrangementOnSurface2Write`
\sa `Arr_extended_dcel<Traits,VData,HData,FData,V,H,F>`
*/
template< typename Arrangement >
class Arr_extended_dcel_text_formatter {
public:
}; /* end Arr_extended_dcel_text_formatter */
} /* end namespace CGAL */
namespace CGAL {
/*!
\ingroup PkgArrangementOnSurface2IO
/*! \ingroup PkgArrangementOnSurface2IO
*
* `Arr_face_extended_text_formatter` defines the format of an arrangement in an
* input or output stream (typically a file stream), thus enabling reading and
* writing an `Arrangement` instance using a simple text format. The
* `Arrangement` class should be instantiated with a \dcel class which in turn
* instantiates the `Arr_face_extended_dcel` template with a `FaceData` type.
* The formatter supports reading and writing the data objects attached to the
* arrangement faces as well.
*
* The `Arr_face_extended_text_formatter` class assumes that the nested
* `Point_2` and the `Curve_2` types defined by the `Arrangement`
* template-parameter and that the `FaceData` type can all be written to an
* input stream using the `<<` operator and read from an input stream using the
* `>>` operator.
*
* \cgalModels{AosInputFormatter,AosOutputFormatter}
*
* \sa `PkgArrangementOnSurface2Read`
* \sa `PkgArrangementOnSurface2Write`
* \sa `Arr_face_extended_dcel<Traits,FData,V,H,F>`
*/
template <typename Arrangement>
class Arr_face_extended_text_formatter {};
`Arr_face_extended_text_formatter` defines the format of an arrangement in an input or output stream
(typically a file stream), thus enabling reading and writing an `Arrangement`
instance using a simple text format. The `Arrangement` class should be
instantiated with a \dcel class which in turn instantiates the
`Arr_face_extended_dcel` template with a `FaceData` type.
The formatter supports reading and writing the data objects attached to the
arrangement faces as well.
The `Arr_face_extended_text_formatter` class assumes that the nested `Point_2` and the `Curve_2` types
defined by the `Arrangement` template-parameter and that the `FaceData` type
can all be written to an input stream using the `<<` operator and read from an input stream using the `>>` operator.
\cgalModels{ArrangementInputFormatter,ArrangementOutputFormatter}
\sa `PkgArrangementOnSurface2Read`
\sa `PkgArrangementOnSurface2Write`
\sa `Arr_face_extended_dcel<Traits,FData,V,H,F>`
*/
template< typename Arrangement >
class Arr_face_extended_text_formatter {
public:
}; /* end Arr_face_extended_text_formatter */
} /* end namespace CGAL */
namespace CGAL {
/*!
\ingroup PkgArrangementOnSurface2IO
/*! \ingroup PkgArrangementOnSurface2IO
*
* `Arr_text_formatter` defines the format of an arrangement in an input or
* output stream (typically a file stream), thus enabling reading and writing an
* `Arrangement` instance using a simple text format. The arrangement is assumed
* to store no auxiliary data with its \dcel records (and if there are such
* records they will not be written or read by the formatter).
*
* The `Arr_text_formatter` class assumes that the nested `Point_2` and the
* `Curve_2` types defined by the `Arrangement` template-parameter can both be
* written to an input stream using the `<<` operator and read from an input
* stream using the `>>` operator.
*
* \cgalModels{AosInputFormatter,AosOutputFormatter}
*
* \sa `PkgArrangementOnSurface2Read`
* \sa `PkgArrangementOnSurface2Write`
*/
template <typename Arrangement>
class Arr_text_formatter {};
`Arr_text_formatter` defines the format of an arrangement in an input or output stream
(typically a file stream), thus enabling reading and writing an `Arrangement`
instance using a simple text format. The arrangement is assumed to store no auxiliary
data with its \dcel records (and if there are such records they will not be written
or read by the formatter).
The `Arr_text_formatter` class assumes that the nested `Point_2` and the `Curve_2` types
defined by the `Arrangement` template-parameter can both be written to an input
stream using the `<<` operator and read from an input stream using the `>>`
operator.
\cgalModels{ArrangementInputFormatter,ArrangementOutputFormatter}
\sa `PkgArrangementOnSurface2Read`
\sa `PkgArrangementOnSurface2Write`
*/
template< typename Arrangement >
class Arr_text_formatter {
public:
}; /* end Arr_text_formatter */
} /* end namespace CGAL */

View File

@ -2,51 +2,46 @@ namespace CGAL {
namespace IO {
/*!
\ingroup PkgArrangementOnSurface2Read
Reads the arrangement-with-history object `arr` from the given
input stream `is` using a specific input format defined by
\"formatter\".
*/
template<typename Traits, typename Dcel,
/*! \ingroup PkgArrangementOnSurface2Read
*
* reads the arrangement-with-history object `arr` from the given
* input stream `is` using a specific input format defined by
* \"formatter\".
*/
template <typename Traits, typename Dcel,
typename WithHistoryFormatter>
std::istream& read (Arrangement_with_history_2<Traits,Dcel>& arr,
std::istream& is,
WithHistoryFormatter& formatter);
std::istream& read(Arrangement_with_history_2<Traits,Dcel>& arr,
std::istream& is, WithHistoryFormatter& formatter);
/*!
\ingroup PkgArrangementOnSurface2Write
Writes the arrangement-with-history object `arr` into the given
output stream `os` using a specific output format defined by
`formatter`.
*/
template<typename Traits, typename Dcel,
/*! \ingroup PkgArrangementOnSurface2Write
* writes the arrangement-with-history object `arr` into the given
* output stream `os` using a specific output format defined by
* `formatter`.
*/
template <typename Traits, typename Dcel,
typename WithHistoryFormatter>
std::ostream& write (const Arrangement_with_history_2<Traits,Dcel>& arr,
std::ostream& os,
WithHistoryFormatter& formatter);
std::ostream& write(const Arrangement_with_history_2<Traits,Dcel>& arr,
std::ostream& os, WithHistoryFormatter& formatter);
} // namespace IO
/*!
\ingroup PkgArrangementOnSurface2op_left_shift
Inserts the arrangement-with-history object `arr` into the output
stream `os` using the output format defined by the
`Arr_with_history_text_formatter` class. Only the basic geometric
and topological features of the arrangement are inserted. Auxiliary
data that may be attached to the \dcel features is ignored.
*/
template<typename Traits, typename Dcel>
std::ostream& operator<< (std::ostream& os,
const Arrangement_with_history_2<Traits,Dcel>& arr);
/*! \ingroup PkgArrangementOnSurface2op_left_shift
* inserts the arrangement-with-history object `arr` into the output
* stream `os` using the output format defined by the
* `Arr_with_history_text_formatter` class. Only the basic geometric
* and topological features of the arrangement are inserted. Auxiliary
* data that may be attached to the \dcel features is ignored.
*/
template <typename Traits, typename Dcel>
std::ostream& operator<<(std::ostream& os,
const Arrangement_with_history_2<Traits,Dcel>& arr);
/*! \ingroup PkgArrangementOnSurface2op_right_shift
* extracts an arrangement-with-history from a given input stream using
* the default input format.
*/
template <typename Traits, typename Dcel>
std::istream& operator>>(std::istream& is,
Arrangement_with_history_2<Traits,Dcel>& arr);
/*!
\ingroup PkgArrangementOnSurface2op_right_shift
Extracts an arrangement-with-history from a given input stream using
the default input format.
*/
template<class Traits, class Dcel>
std::istream& operator>>(std::istream& is, Arrangement_with_history_2<Traits,Dcel>& arr);
}

View File

@ -1,29 +1,24 @@
namespace CGAL {
/*!
\ingroup PkgArrangementOnSurface2IO
/*! \ingroup PkgArrangementOnSurface2IO
*
* `Arr_with_history_text_formatter` defines the format of an arrangement in an
* input or output stream (typically a file stream), thus enabling reading and
* writing an arrangement-with-history instance using a simple text format.
*
* The `ArrFormatter` parameter servers as a base class for
* `Arr_with_history_text_formatter` and must be a model of the
* `AosInputFormatter` and the `AosOutputFormatter` concepts. It is used to read
* or write the base arrangement, while the derived class is responsible for
* reading and writing the set of curves inducing the arrangement and
* maintaining the relations between these curves and the edges they induce.
*
* \cgalModels{AosWithHistoryInputFormatter,AosWithHistoryOutputFormatter}
*
* \sa `PkgArrangementOnSurface2Read`
* \sa `PkgArrangementOnSurface2Write`
*/
template <typename ArrFormatter>
class Arr_with_history_text_formatter {};
`Arr_with_history_text_formatter` defines the format of an arrangement in an input or output stream
(typically a file stream), thus enabling reading and writing an
arrangement-with-history instance using a simple text format.
The `ArrFormatter` parameter servers as a base class for
`Arr_with_history_text_formatter` and must be a model of the `ArrangementInputFormatter`
and the `ArrangementOutputFormatter` concepts. It is used to read or write
the base arrangement, while the derived class is responsible for reading and
writing the set of curves inducing the arrangement and maintaining the
relations between these curves and the edges they induce.
\cgalModels{ArrangementWithHistoryInputFormatter,ArrangementWithHistoryOutputFormatter}
\sa `PkgArrangementOnSurface2Read`
\sa `PkgArrangementOnSurface2Write`
*/
template< typename ArrFormatter >
class Arr_with_history_text_formatter {
public:
}; /* end Arr_with_history_text_formatter */
} /* end namespace CGAL */

View File

@ -25,51 +25,63 @@ namespace CGAL {
/*! \ingroup PkgArrangementOnSurface2Draw
opens a new window and draws `arr`, an instance of the `CGAL::Arrangement_2` class template. Parameters of the drawing are taken from the optional graphics scene options parameter.
A call to this function blocks the execution of the program until the drawing window is closed. This function requires `CGAL_Qt6`, and is only available if the macro `CGAL_USE_BASIC_VIEWER` is defined.
Linking with the cmake target `CGAL::CGAL_Basic_viewer` will link with `CGAL_Qt6` and add the definition `CGAL_USE_BASIC_VIEWER`.
\tparam GeometryTraits_2 a geometry traits type, a model of a 2D arrangement traits concept. At this point it must be an instance of either `CGAL::Arr_segment_traits_2` or `CGAL::Arr_conic_traits_2`.
\tparam Dcel the \dcel type, a model of the `ArrangementDcel` concept.
\tparam GSOptions a model of `GraphicsSceneOptions` concept.
\param arr the 2D arrangement to draw.
\param gso the graphics scene options parameter.
\sa `ArrangementDcel`
\sa `ArrangementTraits_2`
*/
* The function opens a new window and draws `arr`, an instance of the
* `CGAL::Arrangement_2` class template. Parameters of the drawing are taken
* from the optional graphics scene options parameter.
*
* A call to this function blocks the execution of the program until the drawing
* window is closed. This function requires `CGAL_Qt6`, and is only available if
* the macro `CGAL_USE_BASIC_VIEWER` is defined. Linking with the cmake target
* `CGAL::CGAL_Basic_viewer` will link with `CGAL_Qt6` and add the definition
* `CGAL_USE_BASIC_VIEWER`.
*
* \tparam GeometryTraits_2 a geometry traits type, a model of a 2D arrangement
* traits concept. At this point it must be an instance of either
* `CGAL::Arr_segment_traits_2` or `CGAL::Arr_conic_traits_2`.
* \tparam Dcel the \dcel type, a model of the `AosDcel` concept.
* \tparam GSOptions a model of `GraphicsSceneOptions` concept.
*
* \param arr the 2D arrangement to draw.
* \param gso the graphics scene options parameter.
*
* \sa `AosDcel`
* \sa `AosTraits_2`
*/
template <typename GeometryTraits_2, typename Dcel, typename GSOptions>
void draw(const Arrangement_2<GeometryTraits_2, Dcel>& arr, const GSOptions& gso);
void draw(const Arrangement_2<GeometryTraits_2, Dcel>& arr,
const GSOptions& gso);
/*! \ingroup PkgArrangementOnSurface2Draw
A shortcut to `CGAL::draw(arr, Graphics_scene_options{})`.
*/
*
* A shortcut to `CGAL::draw(arr, Graphics_scene_options{})`.
*/
template <typename GeometryTraits_2, typename Dcel>
void draw(const Arrangement_2<GeometryTraits_2, Dcel>& arr);
/*! \ingroup PkgArrangementOnSurface2Draw
adds the vertices, edges and faces of `arr` into the given graphic scene `gs`. Parameters of the cells are taken from the optional graphics scene options parameter `gso`. Note that `gs` is not cleared before being filled (to enable to draw several data structures in the same basic viewer).
\tparam GeometryTraits_2 a geometry traits type, a model of a 2D arrangement traits concept. At this point it must be an instance of either `CGAL::Arr_segment_traits_2` or `CGAL::Arr_conic_traits_2`.
\tparam Dcel the \dcel type, a model of the `ArrangementDcel` concept.
\tparam GSOptions a model of `GraphicsSceneOptions` concept.
\param arr the 2D arrangement to draw.
\param gs the graphic scene to fill.
\param gso the graphics scene options parameter.
*
* adds the vertices, edges and faces of `arr` into the given graphic scene
* `gs`. Parameters of the cells are taken from the optional graphics scene
* options parameter `gso`. Note that `gs` is not cleared before being filled
* (to enable to draw several data structures in the same basic viewer).
*
* \tparam GeometryTraits_2 a geometry traits type, a model of a 2D arrangement
* traits concept. At this point it must be an instance of either
* `CGAL::Arr_segment_traits_2` or `CGAL::Arr_conic_traits_2`.
* \tparam Dcel the \dcel type, a model of the `AosDcel` concept.
* \tparam GSOptions a model of `GraphicsSceneOptions` concept.
*
* \param arr the 2D arrangement to draw.
* \param gs the graphic scene to fill.
* \param gso the graphics scene options parameter.
*/
template <typename GeometryTraits_2, typename Dcel, typename GSOptions>
void add_to_graphics_scene(const Arrangement_2<GeometryTraits_2, Dcel>& arr,
CGAL::Graphics_scene& gs, const GSOptions& gso);
/*! \ingroup PkgArrangementOnSurface2Draw
A shortcut to `CGAL::add_to_graphics_scene(arr, gs, Graphics_scene_options{})`.
* A shortcut to `CGAL::add_to_graphics_scene(arr, gs,
* Graphics_scene_options{})`.
*/
template <typename GeometryTraits_2, typename Dcel>
void add_to_graphics_scene(const Arrangement_2<GeometryTraits_2, Dcel>& arr,

View File

@ -0,0 +1,50 @@
/*! \ingroup PkgArrangementOnSurface2ConceptsTraits
* \cgalConcept
*
* The concept `AosApproximatePointTraits_2` refines the basic traits concept
* `AosBasicTraits_2`. A model of this concept is able to approximate a point.
*
* \cgalRefines{AosBasicTraits_2}
*
* \cgalHasModelsBegin
* \cgalHasModels{CGAL::Arr_circle_segment_traits_2<Kernel>}
* \cgalHasModels{CGAL::Arr_conic_traits_2<RatKernel,AlgKernel,NtTraits>}
* \cgalHasModels{CGAL::Arr_geodesic_arc_on_sphere_traits_2}
* \cgalHasModels{CGAL::Arr_linear_traits_2<Kernel>}
* \cgalHasModels{CGAL::Arr_non_caching_segment_traits_2<Kernel>}
* \cgalHasModels{CGAL::Arr_segment_traits_2<Kernel>}
* \cgalHasModels{CGAL::Arr_polycurve_traits_2<GeometryTraits_2>}
* \cgalHasModels{CGAL::Arr_polyline_traits_2<SegmentTraits_2>}
* \cgalHasModels{CGAL::Arr_rational_function_traits_2<AlgebraicKernel_d_1>}
* \cgalHasModelsEnd
*
* \sa `AosConstructXMonotoneCurveTraits_2`
* \sa `AosXMonotoneTraits_2`
* \sa `AosTraits_2`
*/
class AosApproximatePointTraits_2 {
public:
/// \name Types
/// @{
//! the number type used to approximate point coordinates, e.g., double.
typedef unspecified_type Approximate_number_type;
/// @}
/// \name Functor Types
/// @{
/// models the concept `AosTraits::Approximate_2`.
typedef unspecified_type Approximate_2;
/// @}
/// \name Accessing Functor Objects
/// @{
///
Approximate_2 approximate_2_object() const;
/// @}
}

View File

@ -0,0 +1,47 @@
/*! \ingroup PkgArrangementOnSurface2ConceptsTraits
* \cgalConcept
*
* The concept `AosApproximateTraits_2` refines the concept
* `AosApproximatePointTraits_2`. A model of this concept is able to
* approximate a point and a curve (in addition to the ability to approximate the
* coordinates of a point).
*
* \cgalRefines{AosApproximatePointTraits_2}
*
* \cgalHasModelsBegin
* \cgalHasModels{CGAL::Arr_circle_segment_traits_2<Kernel>}
* \cgalHasModels{CGAL::Arr_conic_traits_2<RatKernel,AlgKernel,NtTraits>}
* \cgalHasModels{CGAL::Arr_geodesic_arc_on_sphere_traits_2}
* \cgalHasModels{CGAL::Arr_polyline_traits_2<SegmentTraits_2>}
* \cgalHasModels{CGAL::Arr_segment_traits_2<Kernel>}
* \cgalHasModelsEnd
*
* \sa `AosApproximatePointTraits_2`
* \sa `draw()`
*/
class AosApproximateTraits_2 {
public:
/// \name Types
/// @{
//! the approximate point.
typedef unspecified_type Approximate_point_2;
/// @}
/// \name Functor Types
/// @{
/// models the concept `AosTraits::Approximate_2`.
typedef unspecified_type Approximate_2;
/// @}
/// \name Accessing Functor Objects
/// @{
///
Approximate_2 approximate_2_object() const;
/// @}
}

View File

@ -1,7 +1,7 @@
/*! \ingroup PkgArrangementOnSurface2ConceptsTopologyTraits
* \cgalConcept
*
* The concept `ArrangementBasicTopologyTraits` defines the minimal
* The concept `AosBasicTopologyTraits` defines the minimal
* functionality needed for a model of a topology traits, which can substitutes
* the `TopolTraits` template parameters when the class template
* `Arrangement_on_surface_2<GeomTraits, TopolTraits>` is instantiated. In
@ -13,19 +13,18 @@
* \cgalHasModels{CGAL::Arr_spherical_topology_traits_2<GeometryTraits_2, Dcel>}
* \cgalHasModelsEnd
*/
class ArrangementBasicTopologyTraits {
class AosBasicTopologyTraits {
public:
/// \name Types
/// @{
//! models the concept `ArrTraits::Point_2`.
/// models the concept `AosTraits::Point_2`.
typedef unspecified_type Point_2;
//! models the concept `ArrTraits::XMonotoneCurve_2`.
/// models the concept `AosTraits::XMonotoneCurve_2`.
typedef unspecified_type X_monotone_curve_2;
//! models the concept `ArrangementDcel`.
/// models the concept `AosDcel`.
typedef unspecified_type Dcel;
/// @}
@ -38,10 +37,10 @@ public:
/// \name Access Functions
/// @{
/*! obtains the DCEL (const version). */
/*! obtains the \dcel (const version). */
const Dcel& dcel() const;
/*! obtains the DCEL (non-const version). */
/*! obtains the \dcel (non-const version). */
Dcel& dcel();
/// @}
@ -49,5 +48,4 @@ public:
/// \name Modifiers
/// @{
/// @}
};

View File

@ -1,23 +1,23 @@
/*! \ingroup PkgArrangementOnSurface2ConceptsTraits
* \cgalConcept
*
* The concept `ArrangementBasicTraits_2` defines the minimal set of geometric
* The concept `AosBasicTraits_2` defines the minimal set of geometric
* predicates needed for the construction and maintenance of objects of the
* class `Arrangement_2`, as well as performing simple queries (such as
* point-location queries) on such arrangements.
*
* A model of this concept must define nested `Point_2` and `X_monotone_curve_2`
* types, which represent planar points and continuous \f$ x\f$-monotone curves
* types, which represent planar points and continuous \f$x\f$-monotone curves
* (a vertical segment is also considered to be <I>weakly</I> \f$
* x\f$-monotone), respectively. The \f$ x\f$-monotone curves are assumed to be
* x\f$-monotone), respectively. The \f$x\f$-monotone curves are assumed to be
* pairwise disjoint in their interiors, so they do not intersect except at
* their endpoints.
*
* The `X_monotone_curve_2` curves of an arrangement are confined to an
* iso-rectangular area called the parameter space. The iso-rectangule can be
* unbounded, open, or closed. The set of predicates provided by a model the
* concept `ArrangementBasicTraits_2` is sufficient for constructing
* arrangements of \f$ x\f$-monotone curves that do not reach or approach the
* concept `AosBasicTraits_2` is sufficient for constructing
* arrangements of \f$x\f$-monotone curves that do not reach or approach the
* boundary of the parameter space. The nature of the input curves, whether they
* are expected to reach or approach the left, right, bottom, or top side of the
* boundary of the parameter space, are conveyed through the definition of four
@ -45,19 +45,15 @@
* \cgalHasModels{CGAL::Arr_consolidated_curve_data_traits_2<Traits,Data>}
* \cgalHasModelsEnd
*/
class ArrangementBasicTraits_2 {
class AosBasicTraits_2 {
public:
/// \name Types
/// @{
/*! models the concept `ArrTraits::Point_2`.
*/
/// models the concept `AosTraits::Point_2`.
typedef unspecified_type Point_2;
/*! models the concept `ArrTraits::XMonotoneCurve_2`.
*/
/// models the concept `AosTraits::XMonotoneCurve_2`.
typedef unspecified_type X_monotone_curve_2;
/// @}
@ -65,24 +61,19 @@ public:
/// \name Categories
/// @{
/*! indicates whether the nested functor `Compare_at_x_left_2` is provided.
*/
/// indicates whether the nested functor `Compare_at_x_left_2` is provided.
typedef unspecified_type Has_left_category;
/*! Must be convertible to `CGAL::Arr_oblivious_side_tag`.
*/
/// Must be convertible to `CGAL::Arr_oblivious_side_tag`.
typedef unspecified_type Left_side_category;
/*! Must be convertible to `CGAL::Arr_oblivious_side_tag`.
*/
/// Must be convertible to `CGAL::Arr_oblivious_side_tag`.
typedef unspecified_type Bottom_side_category;
/*! Must be convertible to `CGAL::Arr_oblivious_side_tag`.
*/
/// Must be convertible to `CGAL::Arr_oblivious_side_tag`.
typedef unspecified_type Top_side_category;
/*!Must be convertible to `CGAL::Arr_oblivious_side_tag`.
*/
/// Must be convertible to `CGAL::Arr_oblivious_side_tag`.
typedef unspecified_type Right_side_category;
/// @}
@ -90,40 +81,35 @@ public:
/// \name Functor Types
/// @{
/*! models the concept `ArrTraits::CompareX_2`.
*/
/// models the concept `AosTraits::CompareX_2`.
typedef unspecified_type Compare_x_2;
/*! models the concept `ArrTraits::CompareXy_2`.
*/
/// models the concept `AosTraits::CompareXy_2`.
typedef unspecified_type Compare_xy_2;
/*! models the concept `ArrTraits::ConstructMinVertex_2`.
*/typedef unspecified_type Construct_min_vertex_2;
/// models the concept `AosTraits::ConstructMinVertex_2`.
typedef unspecified_type Construct_min_vertex_2;
/*! models the concept `ArrTraits::ConstructMaxVertex_2`.
*/
/// models the concept `AosTraits::ConstructMaxVertex_2`.
typedef unspecified_type Construct_max_vertex_2;
/*! models the concept `ArrTraits::IsVertical_2`.
/*! models the concept `AosTraits::IsVertical_2`.
*/
typedef unspecified_type Is_vertical_2;
/*! models the concept `ArrTraits::CompareYAtX_2`.
/*! models the concept `AosTraits::CompareYAtX_2`.
*/
typedef unspecified_type Compare_y_at_x_2;
/*! models the concept `ArrTraits::CompareYAtXLeft_2`. Required only if the
/*! models the concept `AosTraits::CompareYAtXLeft_2`. Required only if the
* `Has_left_category` category is convertible to `Tag_true`.
*/
typedef unspecified_type Compare_y_at_x_left_2;
/*! models the concept `ArrTraits::CompareYAtXRight_2`.
*/
/// models the concept `AosTraits::CompareYAtXRight_2`.
typedef unspecified_type Compare_y_at_x_right_2;
/*! models the concept `ArrTraits::Equal_2`.
*/
/// models the concept `AosTraits::Equal_2`.
typedef unspecified_type Equal_2;
/// @}
@ -131,33 +117,32 @@ public:
/// \name Accessing Functor Objects
/// @{
//!
///
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;
//!
///
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;
//!
///
Equal_2 equal_2_object() const;
/// @}
}; /* end ArrangementBasicTraits_2 */
}; /* end AosBasicTraits_2 */

View File

@ -1,8 +1,7 @@
/*!
* \ingroup PkgArrangementOnSurface2ConceptsTraits
/*! \ingroup PkgArrangementOnSurface2ConceptsTraits
* \cgalConcept
*
* `ArrangementBottomSideTraits_2` is an abstract concept. It generalizes all
* `AosBottomSideTraits_2` is an abstract concept. It generalizes all
* concepts that handle curves that either reach or approach the bottom boundary
* side of the parameter space. (An "abstract" concept is a concept that is
* useless on its own.) Only a combination of this concept and additional
@ -10,14 +9,13 @@
* boundary sides (that is, left, right, and top) are purposeful, and can have
* models.
*
* \cgalRefines{ArrangementHorizontalSideTraits_2}
* \cgalRefines{AosHorizontalSideTraits_2}
*
* \sa `ArrangementLeftSideTraits_2`,
* `ArrangementRightSideTraits_2`, and
* `ArrangementTopSideTraits_2`
* \sa `AosLeftSideTraits_2`
* \sa `AosRightSideTraits_2`
* \sa `AosTopSideTraits_2`
*/
class ArrangementBottomSideTraits_2 {
class AosBottomSideTraits_2 {
public:
/// \name Categories
/// @{

View File

@ -1,24 +1,22 @@
/*!
* \ingroup PkgArrangementOnSurface2ConceptsTraits
/*! \ingroup PkgArrangementOnSurface2ConceptsTraits
* \cgalConcept
*
* A model of the concept `ArrangementClosedBottomTraits_2` must be used when
* A model of the concept `AosClosedBottomTraits_2` must be used when
* the parameter space of the surface, the arrangement is embedded on, is closed
* on the left side and curves inserted into the arrangement are expected to
* reach this boundary side. A model of this concept can handle curves that
* reach the left boundary side when it is closed.
*
* \cgalRefines{ArrangementBottomSideTraits_2}
* \cgalRefines{AosBottomSideTraits_2}
*
* \sa `ArrangementClosedLeftTraits_2`,
* `ArrangementClosedRightTraits_2`,
* `ArrangementClosedTopTraits_2`,
* `ArrangementOpenBottomTraits_2`,
* `ArrangementContractedBottomTraits_2`, and
* `ArrangementIdentifiedHorizontalTraits_2`
* \sa `AosClosedLeftTraits_2`
* \sa `AosClosedRightTraits_2`
* \sa `AosClosedTopTraits_2`
* \sa `AosOpenBottomTraits_2`
* \sa `AosContractedBottomTraits_2`
* \sa `AosIdentifiedHorizontalTraits_2`
*/
class ArrangementClosedBottomTraits_2 {
class AosClosedBottomTraits_2 {
public:
/// \name Categories
/// @{
@ -34,7 +32,7 @@ public:
/// \name Functor Types
/// @{
/// models the concept `ArrTraits::CompareXOnBoundary_2`.
/// models the concept `AosTraits::CompareXOnBoundary_2`.
typedef unspecified_type Compare_x_on_boundary_2;
/// @}

View File

@ -1,30 +1,28 @@
/*!
* \ingroup PkgArrangementOnSurface2ConceptsTraits
/*! \ingroup PkgArrangementOnSurface2ConceptsTraits
* \cgalConcept
*
* A model of the concept `ArrangementClosedLeftTraits_2` must be used when the
* A model of the concept `AosClosedLeftTraits_2` must be used when the
* parameter space of the surface, the arrangement is embedded on, is closed on
* the left side and curves inserted into the arrangement are expected to reach
* this boundary side. A model of this concept can handle curves that reach the
* left boundary side when it is closed.
* \cgalRefines{ArrangementLeftSideTraits_2}
\sa `ArrangementClosedRightTraits_2`,
`ArrangementClosedBottomTraits_2`,
`ArrangementClosedTopTraits_2`,
`ArrangementOpenLeftTraits_2`,
`ArrangementContractedLeftTraits_2`, and
`ArrangementIdentifiedVerticalTraits_2`,
*/
class ArrangementClosedLeftTraits_2 {
*
* \cgalRefines{AosLeftSideTraits_2}
*
* \sa `AosClosedRightTraits_2`
* \sa `AosClosedBottomTraits_2`
* \sa `AosClosedTopTraits_2`
* \sa `AosOpenLeftTraits_2`
* \sa `AosContractedLeftTraits_2`
* \sa `AosIdentifiedVerticalTraits_2`
*/
class AosClosedLeftTraits_2 {
public:
/// \name Categories
/// @{
/*! Must be convertible to `CGAL::Arr_closed_side_tag`.
*/
*/
typedef unspecified_type Left_side_category;
/// @}
@ -35,7 +33,7 @@ public:
/// \name Functor Types
/// @{
/// models the concept `ArrTraits::CompareYOnBoundary_2`.
/// models the concept `AosTraits::CompareYOnBoundary_2`.
typedef unspecified_type Compare_y_on_boundary_2;
/// @}

View File

@ -1,24 +1,22 @@
/*!
* \ingroup PkgArrangementOnSurface2ConceptsTraits
/*! \ingroup PkgArrangementOnSurface2ConceptsTraits
* \cgalConcept
*
* A model of the concept `ArrangementClosedRightTraits_2` must be used when the
* A model of the concept `AosClosedRightTraits_2` must be used when the
* parameter space of the surface, the arrangement is embedded on, is closed on
* the right side and curves inserted into the arrangement are expected to reach
* this boundary side. A model of this concept can handle curves that reach the
* right boundary side when it is closed.
*
* \cgalRefines{ArrangementRightSideTraits_2}
* \cgalRefines{AosRightSideTraits_2}
*
* \sa `ArrangementClosedLeftTraits_2`,
* `ArrangementClosedBottomTraits_2`,
* `ArrangementClosedTopTraits_2`,
* `ArrangementOpenRightTraits_2`,
* `ArrangementContractedRightTraits_2`, and
* `ArrangementIdentifiedVerticalTraits_2`,
* \sa `AosClosedLeftTraits_2`
* \sa `AosClosedBottomTraits_2`
* \sa `AosClosedTopTraits_2`
* \sa `AosOpenRightTraits_2`
* \sa `AosContractedRightTraits_2`
* \sa `AosIdentifiedVerticalTraits_2`
*/
class ArrangementClosedRightTraits_2 {
class AosClosedRightTraits_2 {
public:
/// \name Categories
/// @{
@ -34,7 +32,7 @@ public:
/// \name Functor Types
/// @{
/// models the concept `ArrTraits::CompareYOnBoundary_2`.
/// models the concept `AosTraits::CompareYOnBoundary_2`.
typedef unspecified_type Compare_y_on_boundary_2;
/// @}

View File

@ -1,24 +1,22 @@
/*!
* \ingroup PkgArrangementOnSurface2ConceptsTraits
/*! \ingroup PkgArrangementOnSurface2ConceptsTraits
* \cgalConcept
*
* A model of the concept `ArrangementClosedTopTraits_2` must be used when the
* A model of the concept `AosClosedTopTraits_2` must be used when the
* parameter space of the surface, the arrangement is embedded on, is closed on
* the top side and curves inserted into the arrangement are expected to reach
* this boundary side. A model of this concept can handle curves that reach the
* top boundary side when it is closed.
*
* \cgalRefines{ArrangementTopSideTraits_2}
* \cgalRefines{AosTopSideTraits_2}
*
* \sa `ArrangementClosedLeftTraits_2`,
* `ArrangementClosedRightTraits_2`,
* `ArrangementClosedBottomTraits_2`,
* `ArrangementOpenTopTraits_2`,
* `ArrangementContractedTopTraits_2`, and
* `ArrangementIdentifiedHorizontalTraits_2`
* \sa `AosClosedLeftTraits_2`
* \sa `AosClosedRightTraits_2`
* \sa `AosClosedBottomTraits_2`
* \sa `AosOpenTopTraits_2`
* \sa `AosContractedTopTraits_2`
* \sa `AosIdentifiedHorizontalTraits_2`
*/
class ArrangementClosedTopTraits_2 {
class AosClosedTopTraits_2 {
public:
/// \name Categories
/// @{
@ -34,7 +32,7 @@ public:
/// \name Functor Types
/// @{
/// models the concept `ArrTraits::CompareXOnBoundary_2`.
/// models the concept `AosTraits::CompareXOnBoundary_2`.
typedef unspecified_type Compare_x_on_boundary_2;
/// @}

View File

@ -1,11 +1,11 @@
/*! \ingroup PkgArrangementOnSurface2ConceptsTraits
* \cgalConcept
*
* The concept `ArrangementConstructCurveTraits_2` refines the basic
* traits concept `ArrangementBasicTraits_2`. A model of this concept is able
* The concept `AosConstructCurveTraits_2` refines the basic
* traits concept `AosBasicTraits_2`. A model of this concept is able
* to construct a curve from two points.
*
* \cgalRefines{ArrangementTraits_2}
* \cgalRefines{AosTraits_2}
*
* \cgalHasModelsBegin
* \cgalHasModels{CGAL::Arr_conic_traits_2<RatKernel,AlgKernel,NtTraits>}
@ -17,15 +17,15 @@
* \cgalHasModels{CGAL::Arr_rational_function_traits_2<AlgebraicKernel_d_1>}
* \cgalHasModelsEnd
*
* \sa `ArrangementConstructXMonotoneCurveTraits_2`, and
* `ArrangementTraits_2`
* \sa `AosConstructXMonotoneCurveTraits_2`
* \sa `AosTraits_2`
*/
class ArrangementConstructCurveTraits_2 {
class AosConstructCurveTraits_2 {
public:
/// \name Functor Types
/// @{
/*! models the concept `ArrTraits::ConstructCurve_2`.
/*! models the concept `AosTraits::ConstructCurve_2`.
*/
typedef unspecified_type Construct_curve_2;

View File

@ -1,11 +1,11 @@
/*! \ingroup PkgArrangementOnSurface2ConceptsTraits
* \cgalConcept
*
* The concept `ArrangementConstructXMonotoneCurveTraits_2` refines the basic
* traits concept `ArrangementBasicTraits_2`. A model of this concept is able to
* construct an \f$ x\f$-monotone curve from two points.
* The concept `AosConstructXMonotoneCurveTraits_2` refines the basic
* traits concept `AosBasicTraits_2`. A model of this concept is able to
* construct an \f$x\f$-monotone curve from two points.
*
* \cgalRefines{ArrangementBasicTraits_2}
* \cgalRefines{AosBasicTraits_2}
*
* \cgalHasModelsBegin
* \cgalHasModels{CGAL::Arr_conic_traits_2<RatKernel,AlgKernel,NtTraits>}
@ -17,17 +17,17 @@
* \cgalHasModels{CGAL::Arr_rational_function_traits_2<AlgebraicKernel_d_1>}
* \cgalHasModelsEnd
*
* \sa `ArrangementApproximateTraits_2`,
* `ArrangementXMonotoneTraits_2`
* `ArrangementTraits_2`, and
* `ArrangementConstructCurveTraits_2`.
* \sa `AosApproximatePointTraits_2`
* \sa `AosXMonotoneTraits_2`
* \sa `AosTraits_2`
* \sa `AosConstructCurveTraits_2`
*/
class ArrangementConstructXMonotoneCurveTraits_2 {
class AosConstructXMonotoneCurveTraits_2 {
public:
/// \name Functor Types
/// @{
/*! models the concept `ArrTraits::ConstructXMonotoneCurve_2`.
/*! models the concept `AosTraits::ConstructXMonotoneCurve_2`.
*/
typedef unspecified_type Construct_x_monotone_curve_2;
@ -36,8 +36,7 @@ public:
/// \name Accessing Functor Objects
/// @{
/*!
*/
///
Construct_x_monotone_curve_2 construct_x_monotone_curve_2_object() const;
/// @}

View File

@ -1,24 +1,22 @@
/*!
* \ingroup PkgArrangementOnSurface2ConceptsTraits
/*! \ingroup PkgArrangementOnSurface2ConceptsTraits
* \cgalConcept
*
* A model of the concept `ArrangementContractedBottomTraits_2` must be used
* A model of the concept `AosContractedBottomTraits_2` must be used
* when the parameter space of the surface, the arrangement is embedded on, is
* contracted on the bottom side and curves inserted into the arrangement are
* expected to reach this boundary side. A model of this concept can handle
* curves that reach the bottom boundary side when it is contracted.
*
* \cgalRefines{ArrangementBottomSideTraits_2}
* \cgalRefines{AosBottomSideTraits_2}
*
* \sa `ArrangementContractedLeftTraits_2`,
* `ArrangementContractedRightTraits_2`,
* `ArrangementContractedTopTraits_2`,
* `ArrangementClosedBottomTraits_2`,
* `ArrangementContractedBottomTraits_2`, and
* `ArrangementIdentifiedHorizontalTraits_2`
* \sa `AosContractedLeftTraits_2`
* \sa `AosContractedRightTraits_2`
* \sa `AosContractedTopTraits_2`
* \sa `AosClosedBottomTraits_2`
* \sa `AosContractedBottomTraits_2`
* \sa `AosIdentifiedHorizontalTraits_2`
*/
class ArrangementContractedBottomTraits_2 {
class AosContractedBottomTraits_2 {
public:
/// \name Categories
/// @{

View File

@ -1,24 +1,22 @@
/*!
* \ingroup PkgArrangementOnSurface2ConceptsTraits
/*! \ingroup PkgArrangementOnSurface2ConceptsTraits
* \cgalConcept
*
* A model of the concept `ArrangementContractedLeftTraits_2` must be used when
* A model of the concept `AosContractedLeftTraits_2` must be used when
* the parameter space of the surface, the arrangement is embedded on, is
* contracted on the left side and curves inserted into the arrangement are
* expected to reach this boundary side. A model of this concept can handle
* curves that reach the left boundary side when it is contracted.
*
* \cgalRefines{ArrangementLeftSideTraits_2}
* \cgalRefines{AosLeftSideTraits_2}
*
* \sa `ArrangementContractedRightTraits_2`,
* `ArrangementContractedBottomTraits_2`,
* `ArrangementContractedTopTraits_2`,
* `ArrangementOpenLeftTraits_2`,
* `ArrangementClosedLeftTraits_2`, and
* `ArrangementIdentifiedVerticalTraits_2`
* \sa `AosContractedRightTraits_2`
* \sa `AosContractedBottomTraits_2`
* \sa `AosContractedTopTraits_2`
* \sa `AosOpenLeftTraits_2`
* \sa `AosClosedLeftTraits_2`
* \sa `AosIdentifiedVerticalTraits_2`
*/
class ArrangementContractedLeftTraits_2 {
class AosContractedLeftTraits_2 {
public:
/// \name Categories
/// @{

View File

@ -1,24 +1,22 @@
/*!
* \ingroup PkgArrangementOnSurface2ConceptsTraits
/*! \ingroup PkgArrangementOnSurface2ConceptsTraits
* \cgalConcept
*
* A model of the concept `ArrangementContractedRightTraits_2` must be used when
* A model of the concept `AosContractedRightTraits_2` must be used when
* the parameter space of the surface, the arrangement is embedded on, is
* contracted on the right side and curves inserted into the arrangement are
* expected to reach this boundary side. A model of this concept can handle
* curves that reach the right boundary side when it is contracted.
*
* \cgalRefines{ArrangementRightSideTraits_2}
* \cgalRefines{AosRightSideTraits_2}
*
* \sa `ArrangementContractedLeftTraits_2`,
* `ArrangementContractedBottomTraits_2`,
* `ArrangementContractedTopTraits_2`,
* `ArrangementOpenRightTraits_2`,
* `ArrangementClosedRightTraits_2`, and
* `ArrangementIdentifiedVerticalTraits_2`
* \sa `AosContractedLeftTraits_2`
* \sa `AosContractedBottomTraits_2`
* \sa `AosContractedTopTraits_2`
* \sa `AosOpenRightTraits_2`
* \sa `AosClosedRightTraits_2`
* \sa `AosIdentifiedVerticalTraits_2`
*/
class ArrangementContractedRightTraits_2 {
class AosContractedRightTraits_2 {
public:
/// \name Categories
/// @{

View File

@ -1,24 +1,22 @@
/*!
* \ingroup PkgArrangementOnSurface2ConceptsTraits
/*! \ingroup PkgArrangementOnSurface2ConceptsTraits
* \cgalConcept
*
* A model of the concept `ArrangementContractedTopTraits_2` must be used when
* A model of the concept `AosContractedTopTraits_2` must be used when
* the parameter space of the surface, the arrangement is embedded on, is
* contracted on the top side and curves inserted into the arrangement are
* expected to reach this boundary side. A model of this concept can handle
* curves that reach the top boundary side when it is contracted.
*
* \cgalRefines{ArrangementTopSideTraits_2}
* \cgalRefines{AosTopSideTraits_2}
*
* \sa `ArrangementContractedLeftTraits_2`,
* `ArrangementContractedRightTraits_2`,
* `ArrangementContractedBottomTraits_2`,
* `ArrangementOpenTopTraits_2`,
* `ArrangementSlosedTopTraits_2`, and
* `ArrangementIdentifiedHorizontalTraits_2`
* \sa `AosContractedLeftTraits_2`
* \sa `AosContractedRightTraits_2`
* \sa `AosContractedBottomTraits_2`
* \sa `AosOpenTopTraits_2`
* \sa `AosSlosedTopTraits_2`
* \sa `AosIdentifiedHorizontalTraits_2`
*/
class ArrangementContractedTopTraits_2 {
class AosContractedTopTraits_2 {
public:
/// \name Categories
/// @{

View File

@ -0,0 +1,232 @@
/*! \ingroup PkgArrangementOnSurface2ConceptsDCEL
* \cgalConcept
*
* A doubly-connected edge-list (\dcel for short) data-structure. It consists of
* three containers of records: vertices \f$V\f$, halfedges \f$E\f$, and faces
* \f$F\f$. It maintains the incidence relation among them. The halfedges are
* ordered in pairs sometimes referred to as twins, such that each halfedge pair
* represent an edge.
*
* A model of the `AosDcel` concept must provide the following types and
* operations. (In addition to the requirements here, the local types
* `Vertex`,`Halfedge`, `Face`, `Outer_ccb`, `Inner_ccb`, and `Isolated_vertex`
* must be models of the concepts `AosDcelVertex`,
* `AosDcelHalfedge`, `AosDcelFace`, `AosDcelOuterCcb`,
* `AosDcelInnerCcb`, and `AosDcelIsolatedVertex` respectively.)
*
* \cgalHasModelsBegin
* \cgalHasModels{CGAL::Arr_dcel_base<V,H,F>}
* \cgalHasModels{CGAL::Arr_default_dcel<Traits>}
* \cgalHasModels{CGAL::Arr_face_extended_dcel<Traits,FData,V,H,F>}
* \cgalHasModels{CGAL::Arr_extended_dcel<Traits,VData,HData,FData,V,H,F>}
* \cgalHasModelsEnd
*
* \sa `AosDcelVertex`
* \sa `AosDcelHalfedge`
* \sa `AosDcelFace`
* \sa `AosDcelOuterCcb`
* \sa `AosDcelInnerCcb`
* \sa `AosDcelIsolatedVertex`
*/
class AosDcel {
public:
/// \name Types
/// @{
/// the vertex type.
typedef unspecified_type Vertex;
/// the halfedge type.
typedef unspecified_type Halfedge;
/// the face type.
typedef unspecified_type Face;
/// the Outer CCB type.
typedef unspecified_type Outer_ccb;
/// the Inner CCB type.
typedef unspecified_type Inner_ccb;
/// the hole (i.e., Inner_ccb) type.
typedef unspecified_type Hole;
/// the isolated vertex type.
typedef unspecified_type Isolated_vertex;
/// used to represent size values (e.g., `std::size_t`).
typedef unspecified_type Size;
/// a bidirectional iterator over the vertices. Its value-type is `Vertex`.
typedef unspecified_type Vertex_iterator;
/// a bidirectional iterator over the vertices. Its value-type is `Vertex`.
typedef unspecified_type Vertex_const_iterator;
/// a bidirectional iterator over the halfedges. Its value-type is `Halfedge`.
typedef unspecified_type Halfedge_iterator;
/// a bidirectional iterator over the halfedges. Its value-type is `Halfedge`.
typedef unspecified_type Halfedge_const_iterator;
/// a bidirectional iterator over the faces. Its value-type is `Face`.
typedef unspecified_type Face_iterator;
/// a bidirectional iterator over the faces. Its value-type is `Face`.
typedef unspecified_type Face_const_iterator;
/// @}
/// \name Creation
/// @{
/*! constructs an empty \dcel with one unbounded face.
*/
Arr_dcel();
/*! assigns the contents of the `other` \dcel whose unbounded face is given by
* `uf`, to `dcel`. The function returns a pointer to the unbounded face of
* `dcel` after the assignment.
*/
Face* assign(const Self& other, const Face *uf);
/// @}
/// \name Access Functions
/// @{
/*! obtains the number of vertices. */
Size size_of_vertices() const;
/*! obtains the number of halfedges (always even). */
Size size_of_halfedges() const;
/*! obtains the number of faces. */
Size size_of_faces() const;
/*! obtains the number of outer CCBs. */
Size size_of_outer_ccbs() const;
/*! obtains the number of inner CCBs. */
Size size_of_inner_ccbs() const;
/*! obtains the number of holes (i.e., inner CCBs). */
Size size_of_holes() const;
/*! obtains the number of isolated vertices. */
Size size_of_isolated_vertices() const;
/*! obtains a begin-iterator of the vertices in `dcel`. */
Vertex_iterator vertices_begin();
/*! obtains a past-the-end iterator of the vertices in `dcel`. */
Vertex_iterator vertices_end();
/*! obtains a range over handles of the vertices in `dcel`. */
unspecified_type vertex_handles();
/*! obtains a begin-iterator of the vertices in `dcel`. */
Vertex_const_iterator vertices_begin() const;
/*! obtains a past-the-end iterator of the vertices in `dcel`. */
Vertex_const_iterator vertices_end() const;
/*! obtains a const range (model of `ConstRange`) over handles of the vertices
* in `dcel`.
*/
unspecified_type vertex_handles() const;
/*! obtains a begin-iterator of the halfedges in `dcel`. */
Halfedge_iterator halfedges_begin();
/*! obtains a past-the-end iterator of the halfedges in `dcel`. */
Halfedge_iterator halfedges_end();
/*! obtains a range over handles of the halfedges in `dcel`. */
unspecified_type halfedge_handles();
/*! obtains a begin-iterator of the halfedges in `dcel`. */
Halfedge_const_iterator halfedges_begin() const;
/*! obtains a past-the-end iterator of the halfedges in `dcel`. */
Halfedge_const_iterator halfedges_end() const;
/*! obtains a const range (model of `ConstRange`) over handles of the halfedges
* in `dcel`.
*/
unspecified_type halfedge_handles() const;
/*! obtains a begin-iterator of the faces in `dcel`. */
Face_iterator faces_begin();
/*! obtains a past-the-end iterator of the faces in `dcel`. */
Face_iterator faces_end();
/*! obtains a range over handles of the faces in `dcel`. */
unspecified_type face_handles();
/*! obtains a begin-iterator of the faces in `dcel`. */
Face_const_iterator faces_begin() const;
/*! obtains a past-the-end iterator of the faces in `dcel`. */
Face_const_iterator faces_end() const;
/*! obtains a const range (model of `ConstRange`) over handles of the faces in
* `dcel`.
*/
unspecified_type face_handles() const;
/// @}
/// \name Modifiers
/// The following operations allocate a new element of the respective
/// type. Halfedges are always allocated in pairs of opposite
/// halfedges. The halfedges and their opposite pointers are
/// automatically set.
/// @{
/*! creates a new vertex. */
Vertex* new_vertex();
/*! creates a new pair of twin halfedges. */
Halfedge* new_edge();
/*! creates a new face. */
Face* new_face();
/*! creates a new outer CCB record. */
Hole* new_outer_ccb();
/*! creates a new inner CCB record. */
Hole* new_inner_ccb();
/*! creates a new hole (i.e., inner CCB) record. */
Hole* new_hole();
/*! creates a new isolated vertex record. */
Isolated_vertex* new_isolated_vertex();
/*! deletes a given vertex `v`. */
void delete_vertex(Vertex* v);
/*! deletes a given halfedge `e` as well as its twin. */
void delete_edge(Halfedge* e);
/*! deletes a given face `f`. */
void delete_face(Face* f);
/*! deletes a given outer CCB `oc`. */
void delete_outer_ccb(Outer_ccb* oc);
/*! deletes a given inner CCB `ic`. */
void delete_inner_ccb(Inner_ccb* oc);
/*! deletes a given hole (i.e., inner CCB) `ho`. */
void delete_hole(Hole* ho);
/*! deletes a given isolated vertex `iv`. */
void delete_isolated_vertex(Isolated_vertex* iv);
/// @}
}; /* end AosDcel */

View File

@ -0,0 +1,152 @@
/*! \ingroup PkgArrangementOnSurface2ConceptsDCEL
* \cgalConcept
*
* A face record in a \dcel data structure. A face represents a region, which
* may have outer and inner boundaries. A boundary conists of a chain of
* incident halfedges, referred to as a Connected Component of the Boundary
* (CCB). A face may be unbounded. Otherwise, it has one or more outer CCBs. A
* face may also be bounded by inner CCBs, and it may contain isolated vertices
* in its interior. A planar face may have only one outer CCBs and its inner
* CCBs are referred to as holes.
*
* \sa `AosDcel`
* \sa `AosDcelVertex`
* \sa `AosDcelHalfedge`
*/
class AosDcelFace {
public:
/// \name Types
/// The non-mutable iterators `Outer_ccb_const_iterator`,
/// `Inner_ccb_const_iterator`, `Hole_const_iterator`, and
/// `Isolated_vertex_const_iterator` are also defined.
/// @{
//! the corresponding \dcel vertex type.
typedef unspecified_type Vertex;
//! the corresponding \dcel halfedge type.
typedef unspecified_type Halfedge;
/*! a bidirectional iterator over the outer CCBs of the face. Its value-type
* is `Halfedge*`.
*/
typedef unspecified_type Outer_ccb_iterator;
/*! a bidirectional iterator over the inner CCBs of the face. Its value-type
* is `Halfedge*`.
*/
typedef unspecified_type Inner_ccb_iterator;
/*! a bidirectional iterator over the holes (i.e., inner CCBs) of the face. Its
* value-type is `Halfedge*`.
*/
typedef unspecified_type Hole_iterator;
/*! a bidirectional iterator over the isolated vertices in inside the face.
* Its value-type is `Vertex*`.
*/
typedef unspecified_type Isolated_vertex_iterator;
/// @}
/// \name Creation
/// @{
/*! default constructor. */
Arr_dcel_face();
/*! assigns `f` with the contents of the `other` face. */
void assign(const Self& other);
/// @}
/// \name Access Functions
/// All functions below also have `const` counterparts, returning
/// non-mutable pointers or iterators:
/// @{
/*! determines whether the face is unbounded. */
bool is_unbounded() const;
/*! obtains an incident halfedge along the outer boundaries of the face. If
* `f` has no outer boundary, the function returns `nullptr`.
*/
Halfedge* halfedge();
/*! obtains the number of outer CCBs of `f`. In case of planar arrangement
* this is either 0 or 1.
*/
std::size_t number_of_outer_ccbs() const;
/*! obtains a begin iterator for the outer CCBs of `f`. */
Outer_ccb_iterator outer_ccbs_begin();
/*! obtains a past-the-end iterator for the outer CCBs of `f`. */
Outer_ccb_iterator outer_ccbs_end();
/*! obtains the number of inner CCBs of `f`. */
std::size_t number_of_inner_ccbs() const;
/*! obtains a begin iterator for the inner CCBs of `f`. */
Inner_ccb_iterator inner_ccbs_begin();
/*! obtains a past-the-end iterator for the inner CCBs of `f`. */
Inner_ccb_iterator inner_ccbs_end();
/*! obtains the number of holes (i.e., inner CCBs) inside `f`. */
std::size_t number_of_holes() const;
/*! obtains a begin-iterator for the holes (i.e., inner CCBs) of `f`. */
Hole_iterator holes_begin();
/*! obtains a past-the-end iterator for the holes (i.e., inner CCBs) of `f`. */
Hole_iterator holes_end();
/*! obtains the number of isolated vertices inside `f`. */
std::size_t number_of_isolated_vertices() const;
/*! obtains a begin-iterator for the isolated vertices inside `f`. */
Isolated_vertex_iterator isolated_vertices_begin();
/*! obtains a past-the-end iterator for the isolated vertices inside `f`. */
Isolated_vertex_iterator isolated_vertices_end();
/// @}
/// \name Modifiers
/// @{
/*! sets the face as unbounded (if `flag` is `true`), or as a bounded face
* (if it is `false`).
*/
void set_unbounded(bool flag);
/*! sets the incident halfedge. */
void set_halfedge(Halfedge* e);
/*! adds `e` as an outer CCB of `f`. */
void add_outer_ccb(Halfedge* e);
/*! removes the outer CCB that `it` points to from `f`. */
void erase_outer_ccb(Outer_ccb_iterator it);
/*! adds `e` as an inner CCB of `f`. */
void add_inner_ccb(Halfedge* e);
/*! removes the inner CCB that `it` points to from `f`. */
void erase_inner_ccb(Inner_ccb_iterator it);
/*! adds `e` as a hole (i.e., inner CCB) of `f`. */
void add_hole(Halfedge* e);
/*! removes the hole (i.e., inner CCB) that `it` points to from `f`. */
void erase_hole(Hole_iterator it);
/*! adds `v` as an isolated vertex inside `f`. */
void add_isolated_vertex(Vertex* v);
/*! removes the isolated vertex that `it` points to from inside `f`. */
void erase_isolated_vertex(Isolated_vertex_iterator it);
/// @}
}; /* end AosDcelFace */

View File

@ -0,0 +1,157 @@
/*! \ingroup PkgArrangementOnSurface2ConceptsDCEL
* \cgalConcept
*
* A halfedge record in a \dcel data structure. Two halfedges with opposite
* directions always form an edge (a halfedge pair). The halfedges form together
* chains, defining the boundaries of connected components, such that all
* halfedges along a chain have the same incident face. Note that the chain the
* halfedge belongs to may form the outer boundary of a bounded face (an outer
* CCB) or the boundary of a hole inside a face (an inner CCB).
*
* An edge is always associated with a curve, but the halfedge records only
* store a pointer to the associated curve, and the actual curve objects are
* stored elsewhere. Two opposite halfedges are always associated with the same
* curve.
*
* \sa `AosDcel`
* \sa `AosDcelVertex`
* \sa `AosDcelFace`
* \sa `AosDcelOuterCcb`
* \sa `AosDcelInnerCcb`
*/
class AosDcelHalfedge {
public:
/// \name Types
/// @{
//! the corresponding \dcel vertex type.
typedef unspecified_type Vertex;
//! the corresponding \dcel face type.
typedef unspecified_type Face;
//! the corresponding \dcel hole type.
typedef unspecified_type Hole;
//! the curve type associated with the edge.
typedef unspecified_type X_monotone_curve;
/// @}
/// \name Creation
/// @{
/*! default constructor.
*/
Arr_dcel_halfedge();
/*! assigns `e` with the contents of the `other` halfedge.
*/
void assign(const Self& other);
/// @}
/// \name Access Functions
/// @{
/*! returns `ARR_LEFT_TO_RIGHT` if `e`'s source vertex is
* lexicographically smaller than it target, and
* `ARR_RIGHT_TO_LEFT` if it is lexicographically larger than the target.
*/
Arr_halfedge_direction direction() const;
/*! determines whether the `e` lies on an outer CCB of a bounded face,
* or on an inner CCB (a hole inside a face). The function returns `true`
* if `e` lies on a hole.
*/
bool is_on_hole() const;
/// @}
/// \name
/// All functions below also have `const` counterparts, returning non-mutable
/// pointers or references:
/// @{
/*! returns the twin halfedge.
*/
Halfedge* opposite();
/*! returns the previous halfedge along the chain.
*/
Halfedge* prev();
/*! returns the next halfedge along the chain.
*/
Halfedge* next();
/*! returns the target vertex.
*/
Vertex* vertex();
/*! returns the incident face.
*
* \pre `e` lies on the outer boundary of this face.
*/
Face* face();
/*! returns the hole (inner CCB) `e` belongs to.
*
* \pre `e` lies on a hole inside its incident face.
*/
Hole* hole();
/*! returns whether the vertex is not associated with a valid curve.
*/
bool has_null_curve() const;
/*! returns the associated curve.
* \pre `e` is associated with a valid curve.
*/
X_monotone_curve& curve();
/// @}
/// \name Modifiers
/// @{
/*! sets the opposite halfedge.
*/
void set_opposite(Halfedge* opp);
/*! sets the lexicographical order between `e`'s source and target
* vertices to be `dir`. The direction of the opposite halfedge is also set
* to the opposite direction.
*/
void set_direction(Arr_halfedge_direction dir);
/*! sets the previous halfedge of `e` along the chain,
* and updates the cross-pointer `prev->next()`.
*/
void set_prev(Halfedge* prev);
/*! sets the next halfedge of `e` along the chain,
* and updates the cross-pointer `next->prev()`.
*/
void set_next(Halfedge* next);
/*! sets the target vertex.
*/
void set_vertex(Vertex* v);
/*! sets the incident face, marking that `e` lies on the outer CCB
* of the face `f`.
*/
void set_face(Face* f);
/*! sets the incident hole, marking that `e` lies on an inner CCB.
*/
void set_hole(Hole* ho);
/*! sets the associated curve of `e` and its opposite halfedge.
*/
void set_curve(X_monotone_curve* c);
/// @}
}; /* end AosDcelHalfedge */

View File

@ -0,0 +1,56 @@
/*! \ingroup PkgArrangementOnSurface2ConceptsDCEL
* \cgalConcept
*
* A hole record in a <span class="textsc">Dcel</span> data structure, which
* stores the face that contains the hole in its interior, along with an
* iterator for the hole in the holes' container of this face.
*
* \sa `AosDcel`
* \sa `AosDcelFace`
*/
class AosDcelInnerCcb {
public:
/// \name Types
/// @{
/*! the corresponding <span class="textsc">Dcel</span> face type. */
typedef unspecified_type Face;
/*!
*/
typedef Face::InnerCcb_iterator InnerCcb_iterator;
/// @}
/// \name Creation
/// @{
/*! default constructor. */
Arr_dcel_hole();
/// @}
/// \name Access Functions
/// All functions below also have `const` counterparts, returning non-mutable pointers or iterators:
/// @{
/*! returns the incident face, which contains `ho` in its interior. */
Face* face();
/*! returns an iterator for the hole. */
InnerCcb_iterator iterator();
/// @}
/// \name Modifiers
/// @{
/*! sets the incident face. */
void set_face(Face* f);
/*! sets the hole iterator. */
void set_iterator(InnerCcb_iterator it);
/// @}
}; /* end AosDcelInnerCcb */

View File

@ -0,0 +1,62 @@
/*! \ingroup PkgArrangementOnSurface2ConceptsDCEL
* \cgalConcept
*
* An isolated vertex-information record in a \dcel data structure, which stores
* the face that contains the isolated vertex in its interior, along with an
* iterator for the isolated vertex in the isolated vertices' container of this
* face.
*
* \sa `AosDcel`
* \sa `AosDcelFace`
*/
class AosDcelIsolatedVertex {
public:
/// \name Types
/// @{
/// the corresponding \dcel face type.
typedef unspecified_type Face;
///
typedef Face::Isolated_vertex_iterator Isolated_vertex_iterator;
/// @}
/// \name Creation
/// @{
/*! default constructor.
*/
Arr_dcel_isolated_vertex();
/// @}
/// \name Access Functions
/// All functions below also have `const` counterparts, returning
/// non-mutable pointers or iterators:
/// @{
/*! returns the incident face, which contains `iv` in its interior.
*/
Face* face();
/*! returns an iterator for the isolated vertex.
*/
Isolated_vertex_iterator iterator();
/// @}
/// \name Modifiers
/// @{
/*! sets the incident face.
*/
void set_face(Face* f);
/*! sets the isolated vertex iterator.
*/
void set_iterator(Isolated_vertex_iterator it);
/// @}
}; /* end AosDcelIsolatedVertex */

View File

@ -0,0 +1,59 @@
/*! \ingroup PkgArrangementOnSurface2ConceptsDCEL
* \cgalConcept
*
* A hole record in a \dcel data structure, which stores the face that contains
* the hole in its interior, along with an iterator for the hole in the holes'
* container of this face.
*
* \sa `AosDcel`
* \sa `AosDcelFace`
*/
class AosDcelOuterCcb {
public:
/// \name Types
/// @{
/// the corresponding \dcel face type.
typedef unspecified_type Face;
///
typedef Face::OuterCcb_iterator OuterCcb_iterator;
/// @}
/// \name Creation
/// @{
/*! default constructor.
*/
Arr_dcel_hole();
/// @}
/// \name Access Functions
/// All functions below also have `const` counterparts, returning non-mutable pointers or iterators:
/// @{
/*! returns the incident face, which contains `ho` in its interior.
*/
Face* face();
/*! returns an iterator for the hole.
*/
OuterCcb_iterator iterator();
/// @}
/// \name Modifiers
/// @{
/*! sets the incident face.
*/
void set_face(Face* f);
/*! sets the hole iterator.
*/
void set_iterator(OuterCcb_iterator it);
/// @}
}; /* end AosDcelOuterCcb */

View File

@ -0,0 +1,117 @@
/*! \ingroup PkgArrangementOnSurface2ConceptsDCEL
* \cgalConcept
*
* A vertex record in a \dcel data structure. A vertex is always associated
* with a point. However, the vertex record only stores a pointer to the
* associated point, and the actual `Point` object is stored elsewhere.
*
* A vertex usually has several halfedges incident to it, such that it is
* possible to access one of these halfedges directly and to traverse all
* incident halfedges around the vertex. However, the \dcel may also contain
* isolated vertices that have no incident halfedges. In this case, the vertex
* stores an isolated vertex-information record, indicating the face that
* contains this vertex in its interior.
*
* \sa `AosDcel`
* \sa `AosDcelHalfedge`
* \sa `AosDcelIsolatedVertex`
*/
class AosDcelVertex {
public:
/// \name Types
/// @{
/// the corresponding \dcel halfedge type.
typedef unspecified_type Halfedge;
/// the corresponding \dcel isolated vertex-information type.
typedef unspecified_type Isolated_vertex;
/// the point type associated with the vertex.
typedef unspecified_type Point;
/// @}
/// \name Creation
/// @{
/*! default constructor.
*/
Arr_dcel_vertex();
/*! assigns `v` with the contents of the `other` vertex.
*/
void assign(const Self& other);
/// @}
/// \name Access Functions
/// All functions below also have `const` counterparts, returning
/// non-mutable pointers or references:
/// @{
/*! returns whether the vertex is isolated (has no incident halfedges).
*/
bool is_isolated() const;
/*! returns an incident halfedge that has `v` as its target.
*
* \pre `v` is <I>not</I> an isolated vertex.
*/
Halfedge* halfedge();
/*! returns the isolated vertex-information record.
*
* \pre `v` is an isolated vertex.
*/
Isolated_vertex* isolated_vertex();
/*! returns whether the vertex is not associated with a valid point
* (i.e.\ it lies at infinity).
*/
bool has_null_point() const;
/*! returns the associated point.
*
* \pre `v`() is associated with a valid point.
*/
Point& point();
/*! returns the placement of the \f$x\f$-coordinate in the parameter space,
* that is, either the left boundary-side, the interior, or the right
* boundary-side.
*/
Arr_parameter_space parameter_space_in_x() const;
/*! returns the placement of the \f$y\f$-coordinate in the parameter space,
* that is, either the bottom boundary-side, the interior, or the top
* boundary-side.
*/
Arr_parameter_space parameter_space_in_y() const;
/// @}
/// \name Modifiers
/// @{
/*! sets the incident halfedge, marking `v` as a regular vertex.
*/
void set_halfedge(Halfedge* e);
/*! sets the isolated vertex-information record, marking `v`
* as an isolated vertex.
*/
void set_isolated_vertex(Isolated_vertex* iv);
/*! sets the associated point.
*/
void set_point(Point* p);
/*! sets `v` as a vertex on a boundary side.
*
* \pre Either `inf_x` or `inf_y` is not `ARR_INTERIOR`.
*/
void set_boundary(Arr_parameter_space inf_x, Arr_parameter_space inf_y);
/// @}
}; /* end AosDcelVertex */

View File

@ -0,0 +1,44 @@
/*! \ingroup PkgArrangementOnSurface2ConceptsDCEL
* \cgalConcept
*
* The concept `AosDcelWithRebind` refines the `AosDcel` concept by adding
* a policy clone idiom in form of a rebind struct-template.
*
* Instantiate a \dcel class with many different possible types without ad-hoc
* limitations on type of the \dcel classes.
*
* \cgalRefines{AosDcel}
*
* \cgalHasModelsBegin
* \cgalHasModels{CGAL::Arr_default_dcel<Traits>}
* \cgalHasModels{CGAL::Arr_dcel<Traits,V,H,F>}
* \cgalHasModels{CGAL::Arr_face_extended_dcel<Traits,FData,V,H,F>}
* \cgalHasModels{CGAL::Arr_extended_dcel<Traits,VData,HData,FData,V,H,F>}
* \cgalHasModelsEnd
*/
class AosDcelWithRebind {
public:
/// \name Types
/// @{
/*! allows the instantiation of a model of the base concept
* `AosDcel` with a different possible geometry-traits
class without ad-hoc limitations on it.
*
* Following the standard clone policy, the rebind struct-template must
* have a nested type named `other` that defines the type of the
* model replica.
*/
typedef unspecified_type template <class T> rebind;
/// @}
/// \name Creation
/// @{
/*! constructs an empty \dcel with one unbounded face.
*/
Arr_dcel();
/// @}
}; /* end AosDcelWithRebind */

View File

@ -1,7 +1,7 @@
/*! \ingroup PkgArrangementOnSurface2ConceptsTraits
* \cgalConcept
*
* `ArrangementHorizontalSideTraits_2` is an abstract concept. It generalizes
* `AosHorizontalSideTraits_2` is an abstract concept. It generalizes
* all concepts that handle curves that either reach or approach either the
* bottom or top sizeds of the boundary of the parameter space. (An "abstract"
* concept is a concept that is useless on its own.) Only a combination of this
@ -9,7 +9,7 @@
* approach the remaining boundary sides (that is, left and right) are
* purposeful, and can have models.
*
* \cgalRefines{ArrangementBasicTraits_2}
* \cgalRefines{AosBasicTraits_2}
*
* \cgalHasModelsBegin
* \cgalHasModels{CGAL::Arr_linear_traits_2<Kernel>}
@ -18,12 +18,10 @@
* \cgalHasModels{CGAL::Arr_geodesic_arc_on_sphere_traits_2<Kernel, X, Y>}
* \cgalHasModelsEnd
*
* \sa `ArrangementVerticalSideTraits_2`
* \sa `AosVerticalSideTraits_2`
*/
class ArrangementHorizontalSideTraits_2 {
class AosHorizontalSideTraits_2 {
public:
/// \name Categories
/// @{
/// @}
@ -35,13 +33,13 @@ public:
/// \name Functor Types
/// @{
/// models the concept `ArrTraits::ParameterSpaceInY_2`.
/// models the concept `AosTraits::ParameterSpaceInY_2`.
typedef unspecified_type Parameter_space_in_y_2;
/// models the concept `ArrTraits::CompareXOnBoundaryOfCurveEnd_2`.
/// models the concept `AosTraits::CompareXOnBoundaryOfCurveEnd_2`.
typedef unspecified_type Compare_x_on_boundary_2;
/// models the concept `ArrTraits::CompareXNearBoundary_2`.
/// models the concept `AosTraits::CompareXNearBoundary_2`.
typedef unspecified_type Compare_x_near_boundary_2;
/// @}
@ -53,4 +51,4 @@ public:
Compare_x_near_boundary_2 compare_x_near_boundary_2_object() const;
/// @}
}; /* end ArrangementHorizontalSideTraits_2 */
}; /* end AosHorizontalSideTraits_2 */

View File

@ -1,23 +1,22 @@
/*! \ingroup PkgArrangementOnSurface2ConceptsTraits
* \cgalConcept
*
* A model of the concept `ArrangementIdentifiedHorizontalTraits_2` must be used
* A model of the concept `AosIdentifiedHorizontalTraits_2` must be used
* when the parameter space of the surface, the arrangement is embedded on, is
* identified on the bottom and top sides and curves inserted into the
* arrangement are expected to reach these boundary sides.
*
* \cgalRefines{ArrangementBasicTraits_2}
* \cgalRefines{AosBasicTraits_2}
*
* \sa `ArrangementIdentifiedVerticalTraits_2`,
* `ArrangementOpenBottomTraits_2`,
* `ArrangementClosedBottomTraits_2`, and
* `ArrangementContractedBottomTraits_2`
* `ArrangementOpenTopTraits_2`,
* `ArrangementClosedTopTraits_2`, and
* `ArrangementContractedTopTraits_2`
* \sa `AosIdentifiedVerticalTraits_2`
* \sa `AosOpenBottomTraits_2`
* \sa `AosClosedBottomTraits_2`
* \sa `AosContractedBottomTraits_2`
* \sa `AosOpenTopTraits_2`
* \sa `AosClosedTopTraits_2`
* \sa `AosContractedTopTraits_2`
*/
class ArrangementIdentifiedHorizontalTraits_2 {
class AosIdentifiedHorizontalTraits_2 {
public:
/// \name Categories
/// @{
@ -34,10 +33,10 @@ public:
/// \name Functor Types
/// @{
/// models the concept `ArrTraits::CompareXOnBoundary_2`.
/// models the concept `AosTraits::CompareXOnBoundary_2`.
typedef unspecified_type Compare_x_on_boundary_2;
/// models the concept `ArrTraits::IsOnXIdentification_2`.
/// models the concept `AosTraits::IsOnXIdentification_2`.
typedef unspecified_type Is_on_x_identification_2;
/// @}

View File

@ -1,23 +1,22 @@
/*! \ingroup PkgArrangementOnSurface2ConceptsTraits
* \cgalConcept
*
* A model of the concept `ArrangementIdentifiedVerticalTraits_2` must be used
* when the parameter space of the surface, the arrangement is embedded on, is
* identified on the left and right sides and curves inserted into the
* A model of the concept `AosIdentifiedVerticalTraits_2` must be used
* when the parameter space of the surface, the arrangement is embedded on,
* is identified on the left and right sides and curves inserted into the
* arrangement are expected to reach these boundary sides.
*
* \cgalRefines{ArrangementBasicTraits_2}
* \cgalRefines{AosBasicTraits_2}
*
* \sa `ArrangementIdentifiedHorizontalTraits_2`,
* `ArrangementOpenLeftTraits_2`,
* `ArrangementClosedLeftTraits_2`, and
* `ArrangementContractedLeftTraits_2`
* `ArrangementOpenRightTraits_2`,
* `ArrangementClosedRightTraits_2`, and
* `ArrangementContractedRightTraits_2`
* \sa `AosIdentifiedHorizontalTraits_2`
* \sa `AosOpenLeftTraits_2`
* \sa `AosClosedLeftTraits_2`
* \sa `AosContractedLeftTraits_2`
* \sa `AosOpenRightTraits_2`
* \sa `AosClosedRightTraits_2`
* \sa `AosContractedRightTraits_2`
*/
class ArrangementIdentifiedVerticalTraits_2 {
class AosIdentifiedVerticalTraits_2 {
public:
/// \name Categories
/// @{
@ -34,10 +33,10 @@ public:
/// \name Functor Types
/// @{
/// models the concept `ArrTraits::CompareYOnBoundary_2`.
/// models the concept `AosTraits::CompareYOnBoundary_2`.
typedef unspecified_type Compare_y_on_boundary_2;
/// models the concept `ArrTraits::IsOnYIdentification_2`.
/// models the concept `AosTraits::IsOnYIdentification_2`.
typedef unspecified_type Is_on_y_identification_2;
/// @}

View File

@ -0,0 +1,202 @@
/*! \ingroup PkgArrangementOnSurface2Concepts
* \cgalConcept
*
* A model for the `AosInputFormatter` concept supports a set of
* functions that enable reading an arrangement from an input stream using a
* specific format.
*
* \cgalHasModelsBegin
* \cgalHasModels{CGAL::Arr_text_formatter<Arrangement>}
* \cgalHasModels{CGAL::Arr_face_extended_text_formatter<Arrangement>}
* \cgalHasModels{CGAL::Arr_extended_dcel_text_formatter<Arrangement>}
* \cgalHasModelsEnd
*/
class AosInputFormatter {
public:
/// \name Types
/// @{
/// the type of arrangement to input.
typedef unspecified_type Arrangement_2;
/// the point type.
typedef typename Arrangement_2::Point_2 Point_2;
/// the \f$x\f$-monotone curve type.
typedef typename Arrangement_2::X_monotone_curve_2 X_monotone_curve_2;
///
typedef typename Arrangement_2::Size Size;
///
typedef typename Arrangement_2::Vertex_handle Vertex_handle;
///
typedef typename Arrangement_2::Halfedge_handle Halfedge_handle;
///
typedef typename Arrangement_2::Face_handle Face_handle;
/// @}
/// \name Creation
/// @{
/*! default constructor.
*/
Arr_in_formatter();
/*! constructs a formatter that reads from `is`.
*/
Arr_in_formatter(std::istream& is);
/*! directs `inf` to read from `is`.
*/
void set_in(std::istream& is);
/// @}
/// \name Access Functions
/// @{
/*! returns the stream that `inf` reads from.
* \pre `inf` is directed to a valid output stream.
*/
std::istream& in();
/// @}
/// \name Formatted Input Functions
/// @{
/*! reads a message indicating the beginning of the arrangement. */
void read_arrangement_begin();
/*! reads a message indicating the end of the arrangement. */
void read_arrangement_end();
/*! reads a size value, which is supposed to be preceded by the given label.
*/
Size read_size(const char *label = nullptr);
/*! reads a message indicating the beginning of the vertex records. */
void read_vertices_begin();
/*! reads a message indicating the end of the vertex records. */
void read_vertices_end();
/*! reads a message indicating the beginning of the edge records. */
void read_edges_begin();
/*! reads a message indicating the end of the edge records. */
void read_edges_end();
/*! reads a message indicating the beginning of the face records. */
void read_faces_begin();
/*! reads a message indicating the end of the face records. */
void read_faces_end();
/*! reads a message indicating the beginning of a single vertex record. */
void read_vertex_begin();
/*! reads a message indicating the end of a single vertex record. */
void read_vertex_end();
/*! reads and returns a vertex index. */
std::size_t read_vertex_index();
/*! reads a point. */
void read_point(Point_2& p);
/*! reads an auxiliary vertex-data object and associates it with the vertex
* `v`.
*/
void read_vertex_data(Vertex_handle v);
/*! reads a message indicating the beginning of a single edge record. */
void read_edge_begin();
/*! reads a message indicating the end of a single edge record. */
void read_edge_end();
/*! reads and returns halfedge index. */
std::size_t read_halfedge_index();
/*! reads an \f$x\f$-monotone curve. */
void read_x_monotone_curve(X_monotone_curve_2& c);
/*! reads an auxiliary halfedge-data object and associates it with the
* halfedge `he`.
*/
void read_halfedge_data(Halfedge_handle he);
/*! reads a message indicating the beginning of a single face record. */
void read_face_begin();
/*! reads a message indicating the end of a single face record. */
void read_face_end();
/*! reads a message indicating the beginning of the container of outer CCBs of
* the current face.
*/
void read_outer_ccbs_begin();
/*! reads a message indicating the end of of the container of outer CCBs of
* the current face.
*/
void read_outer_ccbs_end();
/*! reads a message indicating the beginning of the container of inner CCBs of
* the current face.
*/
void read_inner_ccbs_begin();
/*! reads a message indicating the end of of the container of inner CCBs of the
* current face.
*/
void read_inner_ccbs_end();
/*! reads a message indicating the beginning of the container of outer CCBs of
* the current face.
*/
void read_outer_ccb_begin();
/*! reads a message indicating the end of the outer CCB of the current face.
*/
void read_outer_ccb_end();
/*! reads a message indicating the beginning of the container of holes inside
* the current face.
*/
void read_holes_begin();
/*! reads a message indicating the end of the container of holes inside the
* current face.
*/
void read_holes_end();
/*! reads a message indicating the beginning a connected component boundary.
*/
void read_ccb_halfedges_begin();
/*! reads a message indicating the end of a connected component boundary.
*/
void read_ccb_halfedges_end();
/*! reads a message indicating the beginning of the container of isolated
* vertices inside the current face.
*/
void read_isolated_vertices_begin();
/*! reads a message indicating the end of the container of isolated vertices
* inside the current face.
*/
void read_isolated_vertices_end();
/*! reads an auxiliary face-data object and associates it with the face `f`.
*/
void read_face_data(Face_handle f);
/// @}
}; /* end AosInputFormatter */

View File

@ -1,15 +1,15 @@
/*! \ingroup PkgArrangementOnSurface2ConceptsTraits
* \cgalConcept
*
* The concept `ArrangementLandmarkTraits_2` refines the traits concepts
* `ArrangementApproximateTraits_2` and
* `ArrangementConstructXMonotoneCurveTraits_2`. The type of an arrangement
* The concept `AosLandmarkTraits_2` refines the traits concepts
* `AosApproximatePointTraits_2` and
* `AosConstructXMonotoneCurveTraits_2`. The type of an arrangement
* associated with the landmark point-location strategy (see
* `CGAL::Arr_landmarks_point_location`) must be an instance of the
* `CGAL::Arrangement_2<Traits,Dcel>` class template, where the Traits parameter
* is substituted by a model of this concept.
*
* \cgalRefines{ArrangementApproximateTraits_2,ArrangementConstructXMonotoneCurveTraits_2}
* \cgalRefines{AosApproximatePointTraits_2,AosConstructXMonotoneCurveTraits_2}
*
* \cgalHasModelsBegin
* \cgalHasModels{CGAL::Arr_conic_traits_2<RatKernel,AlgKernel,NtTraits>}
@ -22,12 +22,11 @@
* \cgalHasModels{CGAL::Arr_rational_function_traits_2}
* \cgalHasModelsEnd
*
* \sa `ArrangementXMonotoneTraits_2` and
* `ArrangementTraits_2<AlgebraicKernel_d_1>`
* \sa `AosXMonotoneTraits_2`
* \sa `AosTraits_2<AlgebraicKernel_d_1>`
*/
class ArrangementLandmarkTraits_2 {
class AosLandmarkTraits_2 {
public:
/// \name Types
/// @{
/// @}
@ -39,5 +38,4 @@ public:
/// \name Accessing Functor Objects
/// @{
/// @}
};

View File

@ -1,8 +1,7 @@
/*!
* \ingroup PkgArrangementOnSurface2ConceptsTraits
/*! \ingroup PkgArrangementOnSurface2ConceptsTraits
* \cgalConcept
*
* `ArrangementLeftSideTraits_2` is an abstract concept. It generalizes all
* `AosLeftSideTraits_2` is an abstract concept. It generalizes all
* concepts that handle curves that either reach or approach the left boundary
* side of the parameter space. (An "abstract" concept is a concept that is
* useless on its own.) Only a combination of this concept and additional
@ -10,14 +9,14 @@
* boundary sides (that is, right, bottom, and top) are purposeful, and can have
* models.
*
* \cgalRefines{ArrangementVerticalSideTraits_2}
* \cgalRefines{AosVerticalSideTraits_2}
*
* \sa `ArrangementRightSideTraits_2`,
* `ArrangementBottomSideTraits_2`, and
* `ArrangementTopSideTraits_2`
* \sa `AosRightSideTraits_2`,
* `AosBottomSideTraits_2`, and
* `AosTopSideTraits_2`
*/
class ArrangementLeftSideTraits_2 {
class AosLeftSideTraits_2 {
public:
/// \name Categories
/// @{

View File

@ -1,24 +1,23 @@
/*!
* \ingroup PkgArrangementOnSurface2ConceptsTraits
/*! \ingroup PkgArrangementOnSurface2ConceptsTraits
* \cgalConcept
*
* A model of the concept `ArrangementOpenBottomTraits_2` must be used when the
* A model of the concept `AosOpenBottomTraits_2` must be used when the
* parameter space of the surface, the arrangement is embedded on, is open on
* the bottom side and curves inserted into the arrangement are expected to
* reach this boundary side. A model of this concept can handle curves that
* reach the bottom boundary side when it is open.
*
* \cgalRefines{ArrangementBottomSideTraits_2}
* \cgalRefines{AosBottomSideTraits_2}
*
* \sa `ArrangementOpenLeftTraits_2`,
* `ArrangementOpenRightTraits_2`,
* `ArrangementOpenTopTraits_2`,
* `ArrangementClosedBottomTraits_2`,
* `ArrangementContractedBottomTraits_2`, and
* `ArrangementIdentifiedHorizontalTraits_2`
* \sa `AosOpenLeftTraits_2`,
* `AosOpenRightTraits_2`,
* `AosOpenTopTraits_2`,
* `AosClosedBottomTraits_2`,
* `AosContractedBottomTraits_2`, and
* `AosIdentifiedHorizontalTraits_2`
*/
class ArrangementOpenBottomTraits_2 {
class AosOpenBottomTraits_2 {
public:
/// \name Categories
/// @{

View File

@ -1,43 +1,41 @@
/*! \ingroup PkgArrangementOnSurface2ConceptsTraits
* \cgalConcept
*
* Several predicates are required to handle \f$ x\f$-monotone curves that
* Several predicates are required to handle \f$x\f$-monotone curves that
* approach infinity and thus approach the boundary of the parameter
* space. These predicates are sufficient to handle not only curves embedded in
* an unbounded parameter space, but also curves embedded in a bounded parameter
* space with open boundaries. Models of the concept
* `ArrangementOpenBoundaryTraits_2` handle curves that approach the boundary of
* a parameter space. This concept refines the concept
* `ArrangementBasicTraits_2`. The arrangement template instantiated with a
* traits class that models this concept can handle \f$ x\f$-monotone curves
* that are unbounded in any direction. The concept
* `ArrangementOpenBoundaryTraits_2`, nonetheless, also supports planar \f$
* x\f$-monotone curves that reach the boundary of an open yet bounded parameter
* space.
* space with open boundaries. Models of the concept `AosOpenBoundaryTraits_2`
* handle curves that approach the boundary of a parameter space. This concept
* refines the concept `AosBasicTraits_2`. The arrangement template instantiated
* with a traits class that models this concept can handle \f$x\f$-monotone
* curves that are unbounded in any direction. The concept
* `AosOpenBoundaryTraits_2`, nonetheless, also supports planar \f$x\f$-monotone
* curves that reach the boundary of an open yet bounded parameter space.
*
* An \f$ x\f$-monotone curve may be <I>closed</I>, in which case its endpoints
* An \f$x\f$-monotone curve may be <I>closed</I>, in which case its endpoints
* are representable as `Point_2` objects, or <I>open</I> at the boundary of the
* parameter space. It can have one open end and one closed end (e.g., a
* ray). The nature of the \f$ x\f$-monotone curves, whether they are expected
* ray). The nature of the \f$x\f$-monotone curves, whether they are expected
* to be closed or not at any one of the four boundary-sides, is conveyed
* through the definition of the four nested types `Left_side_category`,
* `Right_side_category`, `Bottom_side_category`, and `Top_side_category`. If
* some curves handled by a model of the concept
* `ArrangementOpenBoundaryTraits_2` are expected to be open on the left, the
* `AosOpenBoundaryTraits_2` are expected to be open on the left, the
* nested type `Left_side_category` must be convertible to
* `CGAL::Arr_open_side_tag`. Similarly, if some curves handled by the concept
* are expected to be open on the right, open at the bottom, or open at the top,
* the corresponding nested type must be convertible to
* `CGAL::Arr_open_side_tag`. A model of the concept
* `ArrangementOpenBoundaryTraits_2` must have all the four categories
* `AosOpenBoundaryTraits_2` must have all the four categories
* convertible to `CGAL::Arr_open_side_tag`.\cgalFootnote{We intend to introduce
* more concepts that require only a subset of the categories to be convertible
* to \cgalFootnoteCode{CGAL::Arr_open_side_tag}.} In this case the \dcel of the arrangement
* instantiated with the model is initialized with an implicit bounding
* rectangle. When the parameter space is bounded, it is the exact geometric
* embedding of the implicit bounding rectangle.
* to \cgalFootnoteCode{CGAL::Arr_open_side_tag}.} In this case the \dcel of the
* arrangement instantiated with the model is initialized with an implicit
* bounding rectangle. When the parameter space is bounded, it is the exact
* geometric embedding of the implicit bounding rectangle.
*
* \cgalRefines{ArrangementBasicTraits_2}
* \cgalRefines{AosBasicTraits_2}
*
* \cgalHasModelsBegin
* \cgalHasModels{CGAL::Arr_linear_traits_2<Kernel>}
@ -47,27 +45,26 @@
* \cgalHasModels{CGAL::Arr_consolidated_curve_data_traits_2<Traits,Data>}
* \cgalHasModelsEnd
*
* \sa `ArrangementBasicTraits_2`
* \sa `ArrangementXMonotoneTraits_2`
* \sa `ArrangementLandmarkTraits_2`
* \sa `ArrangementTraits_2`
* \sa `AosBasicTraits_2`
* \sa `AosXMonotoneTraits_2`
* \sa `AosLandmarkTraits_2`
* \sa `AosTraits_2`
*/
class ArrangementOpenBoundaryTraits_2 {
class AosOpenBoundaryTraits_2 {
public:
/// \name Categories
/// @{
//! Must be convertible to `CGAL::Arr_open_side_tag`.
/// Must be convertible to `CGAL::Arr_open_side_tag`.
typedef unspecified_type Left_side_category;
//! Must be convertible to `CGAL::Arr_open_side_tag`.
/// Must be convertible to `CGAL::Arr_open_side_tag`.
typedef unspecified_type Bottom_side_category;
//! Must be convertible to `CGAL::Arr_open_side_tag`.
/// Must be convertible to `CGAL::Arr_open_side_tag`.
typedef unspecified_type Top_side_category;
//! Must be convertible to `CGAL::Arr_open_side_tag`.
/// Must be convertible to `CGAL::Arr_open_side_tag`.
typedef unspecified_type Right_side_category;
/// @}
@ -75,14 +72,14 @@ public:
/// \name Functor Types
/// @{
/*! models the concept `ArrTraits::ParameterSpaceInX_2`. Required only if the
/*! models the concept `AosTraits::ParameterSpaceInX_2`. Required only if the
* traits class supports unbounded curves that approach the left or the right
* sides (the `Left_side_category` or the `Right_side_category` categories are
* convertible to `CGAL::Arr_open_side_tag`).
*/
typedef unspecified_type Parameter_space_in_x_2;
/*! models the concept `ArrTraits::CompareYNearBoundary_2`.
/*! models the concept `AosTraits::CompareYNearBoundary_2`.
* Required only if the traits class supports unbounded curves that approach
* the left or the right sides (the `Left_side_category` or the
* `Right_side_category` categories are convertible to
@ -90,7 +87,7 @@ public:
*/
typedef unspecified_type Compare_y_near_boundary_2;
/*! models the concept `ArrTraits::ParameterSpaceInY_2`.
/*! models the concept `AosTraits::ParameterSpaceInY_2`.
* Required only if the traits class supports unbounded curves that approach
* the bottom or the top sides (the `Bottom_side_category` or the
* `Top_side_category` categories are convertible to
@ -98,14 +95,14 @@ public:
*/
typedef unspecified_type Parameter_space_in_y_2;
/*! models the concept `ArrTraits::CompareXOnBoundaryOfCurveEnd_2`. Required
/*! models the concept `AosTraits::CompareXOnBoundaryOfCurveEnd_2`. Required
* only if the traits class supports unbounded curves that approach the bottom
* or the top sides (the `Bottom_side_category` or the `Top_side_category`
* categories are convertible to `CGAL::Arr_open_side_tag`).
*/
typedef unspecified_type Compare_x_on_boundary_2;
/*! models the concept `ArrTraits::CompareXNearBoundary_2`. Required only if
/*! models the concept `AosTraits::CompareXNearBoundary_2`. Required only if
* the traits class supports unbounded curves that approach the bottom or the
* top sides (the `Bottom_side_category` or the `Top_side_category` categories
* are convertible to `CGAL::Arr_open_side_tag`).
@ -117,21 +114,20 @@ public:
/// \name Accessing Functor Objects
/// @{
/*! */
///
Parameter_space_in_x_2 parameter_space_in_x_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;
/*! */
///
Compare_x_on_boundary_2 compare_x_on_boundary_2_object() const;
/*! */
///
Compare_x_near_boundary_2 compare_x_near_boundary_2_object() const;
/// @}
}; /* end ArrangementOpenBoundaryTraits_2 */
}; /* end AosOpenBoundaryTraits_2 */

View File

@ -1,24 +1,23 @@
/*!
* \ingroup PkgArrangementOnSurface2ConceptsTraits
/*! \ingroup PkgArrangementOnSurface2ConceptsTraits
* \cgalConcept
*
* A model of the concept `ArrangementOpenLeftTraits_2` must be used when the
* A model of the concept `AosOpenLeftTraits_2` must be used when the
* parameter space of the surface, the arrangement is embedded on, is open on
* the left side and curves inserted into the arrangement are expected to reach
* this boundary side. A model of this concept can handle curves that reach the
* left boundary side when it is open.
*
* \cgalRefines{ArrangementLeftSideTraits_2}
* \cgalRefines{AosLeftSideTraits_2}
*
* \sa `ArrangementOpenRightTraits_2`,
* `ArrangementOpenBottomTraits_2`,
* `ArrangementOpenTopTraits_2`,
* `ArrangementClosedLeftTraits_2`,
* `ArrangementContractedLeftTraits_2`, and
* `ArrangementIdentifiedVerticalTraits_2`
* \sa `AosOpenRightTraits_2`,
* `AosOpenBottomTraits_2`,
* `AosOpenTopTraits_2`,
* `AosClosedLeftTraits_2`,
* `AosContractedLeftTraits_2`, and
* `AosIdentifiedVerticalTraits_2`
*/
class ArrangementOpenLeftTraits_2 {
class AosOpenLeftTraits_2 {
public:
/// \name Categories
/// @{

View File

@ -1,24 +1,23 @@
/*!
* \ingroup PkgArrangementOnSurface2ConceptsTraits
/*! \ingroup PkgArrangementOnSurface2ConceptsTraits
* \cgalConcept
*
* A model of the concept `ArrangementOpenRightTraits_2` must be used when the
* A model of the concept `AosOpenRightTraits_2` must be used when the
* parameter space of the surface, the arrangement is embedded on, is open on
* the right side and curves inserted into the arrangement are expected to reach
* this boundary side. A model of this concept can handle curves that reach the
* right boundary side when it is open.
*
* \cgalRefines{ArrangementRightSideTraits_2}
* \cgalRefines{AosRightSideTraits_2}
*
* \sa `ArrangementOpenLeftTraits_2`,
* `ArrangementOpenBottomTraits_2`,
* `ArrangementOpenTopTraits_2`,
* `ArrangementClosedRightTraits_2`,
* `ArrangementContractedRightTraits_2`, and
* `ArrangementIdentifiedVerticalTraits_2`
* \sa `AosOpenLeftTraits_2`,
* `AosOpenBottomTraits_2`,
* `AosOpenTopTraits_2`,
* `AosClosedRightTraits_2`,
* `AosContractedRightTraits_2`, and
* `AosIdentifiedVerticalTraits_2`
*/
class ArrangementOpenRightTraits_2 {
class AosOpenRightTraits_2 {
public:
/// \name Categories
/// @{

View File

@ -1,24 +1,23 @@
/*!
* \ingroup PkgArrangementOnSurface2ConceptsTraits
/*! \ingroup PkgArrangementOnSurface2ConceptsTraits
* \cgalConcept
*
* A model of the concept `ArrangementOpenTopTraits_2` must be used when the
* A model of the concept `AosOpenTopTraits_2` must be used when the
* parameter space of the surface, the arrangement is embedded on, is open on
* the top side and curves inserted into the arrangement are expected to reach
* this boundary side. A model of this concept can handle curves that reach the
* top boundary side when it is open.
*
* \cgalRefines{ArrangementTopSideTraits_2}
* \cgalRefines{AosTopSideTraits_2}
*
* \sa `ArrangementOpenLeftTraits_2`,
* `ArrangementOpenRightTraits_2`,
* `ArrangementOpenBottomTraits_2`,
* `ArrangementClosedTopTraits_2`,
* `ArrangementContractedTopTraits_2`, and
* `ArrangementIdentifiedHorizontalTraits_2`
* \sa `AosOpenLeftTraits_2`,
* `AosOpenRightTraits_2`,
* `AosOpenBottomTraits_2`,
* `AosClosedTopTraits_2`,
* `AosContractedTopTraits_2`, and
* `AosIdentifiedHorizontalTraits_2`
*/
class ArrangementOpenTopTraits_2 {
class AosOpenTopTraits_2 {
public:
/// \name Categories
/// @{

View File

@ -0,0 +1,193 @@
/*! \ingroup PkgArrangementOnSurface2Concepts
* \cgalConcept
*
* A model for the `AosOutputFormatter` concept supports a set of functions that
* enable writing an arrangement to an output stream using a specific format.
*
* \cgalHasModelsBegin
* \cgalHasModels{CGAL::Arr_text_formatter<Arrangement>}
* \cgalHasModels{CGAL::Arr_face_extended_text_formatter<Arrangement>}
* \cgalHasModels{CGAL::Arr_extended_dcel_text_formatter<Arrangement>}
* \cgalHasModelsEnd
*/
class AosOutputFormatter {
public:
/// \name Types
/// @{
/// the type of arrangement to output.
typedef unspecified_type Arrangement_2;
/// the point type.
typedef typename Arrangement_2::Point_2 Point_2;
/// the \f$x\f$-monotone curve type.
typedef typename Arrangement_2::X_monotone_curve_2 X_monotone_curve_2;
///
typedef typename Arrangement_2::Size Size;
///
typedef typename Arrangement_2::Vertex_const_handle Vertex_const_handle;
///
typedef typename Arrangement_2::Halfedge_const_handle Halfedge_const_handle;
///
typedef typename Arrangement_2::Face_const_handle Face_const_handle;
/// @}
/// \name Creation
/// @{
/*! default constructor. */
Arr_out_formatter();
/*! constructs a formatter that writes to `os`. */
Arr_out_formatter(std::ostream& os);
/*! directs `outf` to write to `os`. */
void set_out(std::ostream& os);
/// @}
/// \name Access Functions
/// @{
/*!
returns the stream that `outf` writes to.
\pre `outf` is directed to a valid output stream.
*/
std::ostream& out();
/// @}
/// \name Formatted Output Functions
/// @{
/*! writes a message indicating the beginning of the arrangement. */
void write_arrangement_begin();
/*! writes a message indicating the end of the arrangement. */
void write_arrangement_end();
/*! writes a size value, preceded by a given label. */
void write_size(const char *label, Size size);
/*! writes a message indicating the beginning of the vertex records. */
void write_vertices_begin();
/*! writes a message indicating the end of the vertex records. */
void write_vertices_end();
/*! writes a message indicating the beginning of the edge records. */
void write_edges_begin();
/*! writes a message indicating the end of the edge records. */
void write_edges_end();
/*! writes a message indicating the beginning of the face records. */
void write_faces_begin();
/*! writes a message indicating the end of the face records. */
void write_faces_end();
/*! writes a message indicating the beginning of a single vertex record. */
void write_vertex_begin();
/*! writes a message indicating the end of a single vertex record. */
void write_vertex_end();
/*! writes a vertex index. */
void write_vertex_index(std::size_t idx);
/*! writes a point. */
void write_point(const Point_2& p);
/*! writes the auxiliary data associated with the vertex. */
void write_vertex_data(Vertex_const_handle v);
/*! writes a message indicating the beginning of a single edge record. */
void write_edge_begin();
/*! writes a message indicating the end of a single edge record. */
void write_edge_end();
/*! writes a halfedge index. */
void write_halfedge_index(std::size_t idx);
/*! writes an \f$x\f$-monotone curve. */
void write_x_monotone_curve(const X_monotone_curve_2& c);
/*! writes the auxiliary data associated with the halfedge. */
void write_halfedge_data(Halfedge_const_handle he);
/*! writes a message indicating the beginning of a single face record. */
void write_face_begin();
/*! writes a message indicating the end of a single face record. */
void write_face_end();
/*! writes a message indicating the beginning of the container of outer CCBs
* of the current face.
*/
void write_outer_ccbs_begin();
/*! writes a message indicating the end of the container of outer ccbs of the
* current face.
*/
void write_outer_ccbs_end();
/*! writes a message indicating the beginning of the container of inner CCBs
* of the current face.
*/
void write_inner_ccbs_begin();
/*! writes a message indicating the end of the container of inner ccbs of the
* current face.
*/
void write_inner_ccbs_end();
/*! writes a message indicating the beginning of the outer CCB of the current
* face.
*/
void write_outer_ccb_begin();
/*! writes a message indicating the end of the outer CCB of the current face.
*/
void write_outer_ccb_end();
/*! writes a message indicating the beginning of the container of holes inside
* the current face.
*/
void write_holes_begin();
/*! writes a message indicating the end of the container of holes inside the
* current face.
*/
void write_holes_end();
/*! writes a message indicating the beginning a connected component's boundary.
*/
void write_ccb_halfedges_begin();
/*! writes a message indicating the end of a connected component's boundary.
*/
void write_ccb_halfedges_end();
/*! writes a message indicating the beginning of the container of isolated
* vertices inside the current face.
*/
void write_isolated_vertices_begin();
/*! writes a message indicating the end of the container of isolated vertices
* inside the current face.
*/
void write_isolated_vertices_end();
/*! writes the auxiliary data associated with the face. */
void write_face_data(Face_const_handle f);
/// @}
}; /* end AosOutputFormatter */

View File

@ -0,0 +1,84 @@
/*! \ingroup PkgArrangementOnSurface2Concepts
* \cgalConcept
*
* A model of the `AosPointLocation_2` concept can answer point-location queries
* on an arrangement attached to it. Namely, given a `Arrangement_2::Point_2`
* object, representing a point in the plane, it returns the arrangement cell
* containing it. In the general case, the query point is contained inside an
* arrangement face, but in degenerate situations it may lie on an edge or
* coincide with an arrangement vertex.
*
* \cgalHasModelsBegin
* \cgalHasModels{CGAL::Arr_naive_point_location<Arrangement>}
* \cgalHasModels{CGAL::Arr_walk_along_line_point_location<Arrangement>}
* \cgalHasModels{CGAL::Arr_trapezoid_ric_point_location<Arrangement>}
* \cgalHasModels{CGAL::Arr_landmarks_point_location<Arrangement,Generator>}
* \cgalHasModelsEnd
*
* \sa `CGAL::Arr_naive_point_location<Arrangement>`
* \sa `CGAL::Arr_walk_along_line_point_location<Arrangement>`
* \sa `CGAL::Arr_trapezoid_ric_point_location<Arrangement>`
* \sa `CGAL::Arr_landmarks_point_location<Arrangement,Generator>`
* \sa `CGAL::Arr_point_location_result<Arrangement>`
*/
class AosPointLocation_2 {
public:
/// \name Types
/// @{
//! the associated arrangement type.
typedef unspecified_type Arrangement_2;
//! equivalent to `Arrangement_2::Point_2`.
typedef unspecified_type Point_2;
/// @}
/// \name Creation
/// @{
/*! default constructor.
*/
AosPointLocation_2();
/*! constructs a point-location object `pl` attached to the given
* arrangement `arr`.
*/
AosPointLocation_2 (const Arrangement_2& arr);
/// @}
/// \name Query Functions
/// @{
/*! locates the arrangement cell that contains the query point `q`
* and returns a discriminated union container of the following bounded
* types:
*
* <UL>
* <LI>`Arrangement_2::Face_const_handle`, in case `q` is
* contained inside an arrangement face;
* <LI>`Arrangement_2::Halfedge_const_handle`, in case `q` lies
* on an arrangement edge;
* <LI>`Arrangement_2::Vertex_const_handle`, in case `q` coincides
* with an arrangement vertex.
* </UL>
* \pre `pl` is attached to a valid arrangement object.
*/
Arr_point_location_result<Arrangement_2>::Type locate(const Point_2& q) const;
/// @}
/// \name Operations
/// @{
/*! attaches `pl` to the given arrangement `arr`.
*/
void attach (const Arrangement_2& arr);
/*! detaches `pl` from the arrangement it is currently attached to.
*/
void detach ();
/// @}
}; /* end AosPointLocation_2 */

View File

@ -1,8 +1,7 @@
/*!
* \ingroup PkgArrangementOnSurface2ConceptsTraits
/*! \ingroup PkgArrangementOnSurface2ConceptsTraits
* \cgalConcept
*
* `ArrangementRightSideTraits_2` is an abstract concept. It generalizes all
* `AosRightSideTraits_2` is an abstract concept. It generalizes all
* concepts that handle curves that either reach or approach the right boundary
* side of the parameter space. (An "abstract" concept is a concept that is
* useless on its own.) Only a combination of this concept and additional
@ -10,14 +9,13 @@
* boundary sides (that is, left, bottom, and top) are purposeful, and can have
* models.
*
* \cgalRefines{ArrangementVerticalSideTraits_2}
* \cgalRefines{AosVerticalSideTraits_2}
*
* \sa `ArrangementLeftSideTraits_2`,
* `ArrangementBottomSideTraits_2`, and
* `ArrangementTopSideTraits_2`
* \sa `AosLeftSideTraits_2`
* \sa `AosBottomSideTraits_2`
* \sa `AosTopSideTraits_2`
*/
class ArrangementRightSideTraits_2 {
class AosRightSideTraits_2 {
public:
/// \name Categories
/// @{

View File

@ -1,45 +1,42 @@
/*!
* \ingroup PkgArrangementOnSurface2ConceptsTraits
/*! \ingroup PkgArrangementOnSurface2ConceptsTraits
* \cgalConcept
*
* Models of the concept `ArrangementSphericalBoundaryTraits_2` handle curves on
* Models of the concept `AosSphericalBoundaryTraits_2` handle curves on
* a sphere or a surface that is topological equivalent to a sphere. The sphere
* is oriented in such a way that the boundary of the rectangular parameter
* space, the sphere is the mapping of which, is identified on the left and
* right sides and contracted at the top and bottom sides.
*
* \cgalRefines{ArrangementBasicTraits_2,ArrangementIdentifiedVerticalTraits_2,
* ArrangementContractedBottomTraits_2,ArrangementContractedTopTraits_2}
* \cgalRefines{AosBasicTraits_2,AosIdentifiedVerticalTraits_2,
* AosContractedBottomTraits_2,AosContractedTopTraits_2}
*
* \cgalHasModelsBegin
* \cgalHasModels{CGAL::Arr_geodesic_arc_on_sphere_traits_2<Kernel, X, Y>}
* \cgalHasModelsEnd
*
* \sa `ArrangementOpenBoundaryTraits_2`
* \sa `ArrangementBasicTraits_2`
* \sa `ArrangementIdentifiedVerticalTraits_2`
* \sa `ArrangementContractedBottomTraits_2`
* \sa `ArrangementContractedTopTraits_2`
* \sa `ArrangementHorizontalSideTraits_2`
* \sa `ArrangementVerticalSideTraits_2`
* \sa `AosOpenBoundaryTraits_2`
* \sa `AosBasicTraits_2`
* \sa `AosIdentifiedVerticalTraits_2`
* \sa `AosContractedBottomTraits_2`
* \sa `AosContractedTopTraits_2`
* \sa `AosHorizontalSideTraits_2`
* \sa `AosVerticalSideTraits_2`
*/
class ArrangementSphericalBoundaryTraits_2 {
class AosSphericalBoundaryTraits_2 {
public:
/// \name Categories
/// @{
//! Must be convertible to `CGAL::Arr_identified_side_tag`.
/// Must be convertible to `CGAL::Arr_identified_side_tag`.
typedef unspecified_type Left_side_category;
//! Must be convertible to `CGAL::Arr_identified_side_tag`.
/// Must be convertible to `CGAL::Arr_identified_side_tag`.
typedef unspecified_type Bottom_side_category;
//! Must be convertible to `CGAL::Arr_contracted_side_tag`.
/// Must be convertible to `CGAL::Arr_contracted_side_tag`.
typedef unspecified_type Top_side_category;
//! Must be convertible to `CGAL::Arr_contracted_side_tag`.
/// Must be convertible to `CGAL::Arr_contracted_side_tag`.
typedef unspecified_type Right_side_category;
/// @}
@ -47,25 +44,25 @@ public:
/// \name Functor Types
/// @{
/// models the concept `ArrTraits::ParameterSpaceInX_2`.
/// models the concept `AosTraits::ParameterSpaceInX_2`.
typedef unspecified_type Parameter_space_in_x_2;
/// models the concept `ArrTraits::CompareXOnBoundaryOfCurveEnd_2`.
/// models the concept `AosTraits::CompareXOnBoundaryOfCurveEnd_2`.
typedef unspecified_type Compare_x_on_boundary_2;
/// models the concept `ArrTraits::CompareXNearBoundary_2`.
/// models the concept `AosTraits::CompareXNearBoundary_2`.
typedef unspecified_type Compare_x_near_boundary_2;
/// models the concept `ArrTraits::ParameterSpaceInY_2`.
/// models the concept `AosTraits::ParameterSpaceInY_2`.
typedef unspecified_type Parameter_space_in_y_2;
/// models the concept `ArrTraits::CompareYOnBoundary_2`.
/// models the concept `AosTraits::CompareYOnBoundary_2`.
typedef unspecified_type Compare_y_on_boundary_2;
/// models the concept `ArrTraits::CompareYNearBoundary_2`.
/// models the concept `AosTraits::CompareYNearBoundary_2`.
typedef unspecified_type Compare_y_near_boundary_2;
/// models the concept `ArrTraits::IsOnYIdentification_2`.
/// models the concept `AosTraits::IsOnYIdentification_2`.
typedef unspecified_type Is_on_y_identification_2;
/// @}
@ -73,26 +70,26 @@ public:
/// \name Accessing Functor Objects
/// @{
/*! */
///
Parameter_space_in_x_2 parameter_space_in_x_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;
/*! */
///
Compare_x_on_boundary_2 compare_x_on_boundary_2_object() const;
/*! */
///
Compare_x_near_boundary_2 compare_x_near_boundary_2_object() const;
/*! */
///
Is_on_y_identification_2 is_on_y_identification_2_object() const;
/// @}
}; /* end ArrangementSphericalBoundaryTraits_2 */
/// @}
}; /* end AosSphericalBoundaryTraits_2 */

View File

@ -1,8 +1,7 @@
/*!
* \ingroup PkgArrangementOnSurface2ConceptsTraits
/*! \ingroup PkgArrangementOnSurface2ConceptsTraits
* \cgalConcept
*
* `ArrangementTopSideTraits_2` is an abstract concept. It generalizes all
* `AosTopSideTraits_2` is an abstract concept. It generalizes all
* concepts that handle curves that either reach or approach the top boundary
* side of the parameter space. (An "abstract" concept is a concept that is
* useless on its own.) Only a combination of this concept and additional
@ -10,14 +9,13 @@
* boundary sides (that is, left, right, and bottom) are purposeful, and can
* have models.
*
* \cgalRefines{ArrangementHorizontalSideTraits_2}
* \cgalRefines{AosHorizontalSideTraits_2}
*
* \sa `ArrangementLeftSideTraits_2`,
* `ArrangementRightSideTraits_2`, and
* `ArrangementBottomSideTraits_2`
* \sa `AosLeftSideTraits_2`
* \sa `AosRightSideTraits_2`
* \sa `AosBottomSideTraits_2`
*/
class ArrangementTopSideTraits_2 {
class AosTopSideTraits_2 {
public:
/// \name Categories
/// @{

View File

@ -29,16 +29,15 @@
* \sa `Arrangement_on_surface_2<GeometryTraits_2,TopologyTraits>`
*/
class ArrangementTopologyTraits {
class AosTopologyTraits {
public:
/// \name Types
/// @{
/*! */
///
typedef unspecified_type Geometry_traits_2;
/*! */
///
typedef unspecified_type Dcel;
/// @}

View File

@ -0,0 +1,54 @@
namespace AosTraits {
/*! \ingroup PkgArrangementOnSurface2ConceptsFunctionObjects
* \cgalConcept
*
* \cgalRefines{Functor}
*
* \cgalHasModelsBegin
* \cgalHasModels{AosApproximatePointTraits_2::Approximate_2}
* \cgalHasModels{AosApproximateTraits_2::Approximate_2}
* \cgalHasModelsEnd
*/
class Approximate_2 {
public:
/// \name Operations
/// 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`).
* \pre `i` is either 0 or 1.
*/
CGAL::Approximate_number_type operator()(AosTraits::Point_2 p, int i);
/*! obtains an approximation of `p`.
*/
CGAL::Approximate_point_2 operator()(AosTraits::Point_2 p);
/*! approximates a given \f$x\f$-monotone curve. It computes a sequence of
* approximate points that represent an approximate polyline, and inserts
* them into an output container given through an output iterator. The
* first and last points in the sequence are always approximations of the
* endpoints of the given curve.
*
* \param xcv The exact \f$x\f$-monotone curve.
* \param error The error bound of the polyline approximation. This is the
* Hausdorff distance between the curve and the polyline that
* approximates the curve.
* \param oi An output iterator for the output container.
* \param l2r A Boolean flag that indicates whether the curve direction is
* left to right.
* \return The past-the-end iterator of the output container.
*
* \pre Dereferencing `oi` must yield an object of type
* `Arr_conic_traits_2::Approximate_point_2`.
*/
template <typename OutputIterator>
OutputIterator operator()(const X_monotone_curve_2& xcv, double error,
OutputIterator oi, bool l2r = true) const;
/// @}
}; /* end AosTraits::Approximate_2 */
}

View File

@ -1,4 +1,4 @@
namespace ArrTraits {
namespace AosTraits {
/*! \ingroup PkgArrangementOnSurface2ConceptsFunctionObjects
* \cgalConcept
@ -6,12 +6,11 @@ namespace ArrTraits {
* \cgalRefines{Functor}
*
* \cgalHasModelsBegin
* \cgalHasModels{ArrangementXMonotoneTraits_2::Are_mergeable_2}
* \cgalHasModels{AosXMonotoneTraits_2::Are_mergeable_2}
* \cgalHasModelsEnd
*/
class AreMergeable_2 {
public:
/// \name Operations
/// A model of this concept must provide:
/// @{
@ -22,11 +21,10 @@ public:
* share a common endpoint, and they do not bend to form a
* non-\f$x\f$-monotone curve.
*/
bool operator()(ArrTraits::X_monotone_curve_2 xc1,
ArrTraits::X_monotone_curve_2 xc2);
bool operator()(AosTraits::X_monotone_curve_2 xc1,
AosTraits::X_monotone_curve_2 xc2);
/// @}
}; /* end ArrTraits::AreMergeable_2 */
}; /* end AosTraits::AreMergeable_2 */
}

View File

@ -1,4 +1,4 @@
namespace ArrTraits {
namespace AosTraits {
/*! \ingroup PkgArrangementOnSurface2ConceptsFunctionObjects
* \cgalConcept
@ -6,12 +6,11 @@ namespace ArrTraits {
* \cgalRefines{AdaptableTernaryFunction}
*
* \cgalHasModelsBegin
* \cgalHasModels{ArrangementOpenBoundaryTraits_2::Compare_x_near_boundary_}
* \cgalHasModels{AosOpenBoundaryTraits_2::Compare_x_near_boundary_}
* \cgalHasModelsEnd
*/
class CompareXNearBoundary_2 {
public:
/// \name Operations
/// A model of this concept must provide:
/// @{
@ -24,26 +23,29 @@ public:
* precisely, compares the \f$x\f$-coordinates of the horizontal projection
* of a point \f$p\f$ onto `xcv1` and `xcv2`. If `xcv1` and `xcv2` approach
* the bottom boundary-side, \f$p\f$ is located far to the bottom, such that
* the result is invariant under a translation of \f$ p\f$ farther to the
* the result is invariant under a translation of \f$p\f$ farther to the
* bottom. If `xcv1` and `xcv2` approach the top boundary-side, \f$p\f$ is
* located far to the top in a similar manner.
*
* \pre The \f$x\f$-coordinates of the limits of the curves at their
* respective ends are equal. That is, `compare_x_on_boundary_2`(`xcv1`,
* `xcv2`, `ce`) = `CGAL::EQUAL`.
* \pre The \f$x\f$-coordinates of the boundary of the curves at their
* respective ends are equal. That is,
* \link AosHorizontalSideTraits_2::Compare_x_on_boundary_2
* `compare_x_on_boundary_2`\endlink(`xcv1`, `xcv2`, `ce`) = `CGAL::EQUAL`.
*
* \pre \link ArrangementHorizontalSideTraits_2::Parameter_space_in_y_2 `parameter_space_in_y_2`\endlink(`xcv1`, `ce`) =
* \link ArrangementHorizontalSideTraits_2::Parameter_space_in_y_2 `parameter_space_in_y_2`\endlink(`xcv2`, `ce`).
* \pre \link AosHorizontalSideTraits_2::Parameter_space_in_y_2
* `parameter_space_in_y_2`\endlink(`xcv1`, `ce`) =
* \link AosHorizontalSideTraits_2::Parameter_space_in_y_2
* `parameter_space_in_y_2`\endlink(`xcv2`, `ce`).
*
* \pre \link ArrangementHorizontalSideTraits_2::Parameter_space_in_y_2 `parameter_space_in_y_2`\endlink(`xcv1`, `ce`) \f$ \neq\f$
* \pre \link AosHorizontalSideTraits_2::Parameter_space_in_y_2
* `parameter_space_in_y_2`\endlink(`xcv1`, `ce`) \f$\neq\f$
* `CGAL::ARR_INTERIOR`.
*/
Comparison_result operator()(const ArrTraits::X_monotone_curve_2& xcv1,
const ArrTraits::X_monotone_curve_2& xcv2,
Comparison_result operator()(const AosTraits::X_monotone_curve_2& xcv1,
const AosTraits::X_monotone_curve_2& xcv2,
CGAL::Arr_curve_end ce);
/// @}
}; /* end ArrTraits::CompareXNearBoundary_2 */
}; /* end AosTraits::CompareXNearBoundary_2 */
}

View File

@ -0,0 +1,74 @@
namespace AosTraits {
/*! \ingroup PkgArrangementOnSurface2ConceptsFunctionObjects
* \cgalConcept
*
* \cgalRefines{AdaptableFunctor}
*
* \cgalHasModelsBegin
* \cgalHasModels{AosHorizontalSideTraits_2::Compare_x_on_boundary_2}
* \cgalHasModels{AosOpenBoundaryTraits_2::Compare_x_on_boundary_2}
* \cgalHasModels{AosSphericalBoundaryTraits_2::Compare_x_on_boundary_2}
* \cgalHasModelsEnd
*/
class CompareXOnBoundaryOfCurveEnd_2 {
public:
/// \name Operations
/// A model of this concept must provide:
/// @{
/*! Given a point `p`, an \f$x\f$-monotone curve `xcv`, and an
* enumeration `ce` that specifies either the minimum or the maximum end of
* the curve where the curve has a vertical asymptote, compares the
* \f$x\f$-coordinate of `p` and the \f$x\f$-coordinate of the limit of the
* curve at its specified end. The variable `xcv` identifies the parametric
* curve \f$c(t) = (x(t), y(t))\f$ defined over an open or half-open interval
* with endpoints \f$0\f$ and \f$1\f$. The enumeration `ce` identifies an
* open end \f$d \in\{0,1\}\f$ of \f$c\f$. Formally, compares the
* \f$x\f$-coordinate of `p` and \f$\lim_{t \rightarrow d} x(t)\f$. Returns
* `CGAL::SMALLER`, `CGAL::EQUAL`, or `CGAL::LARGER` accordingly.
*
* \pre \link AosHorizontalSideTraits_2::Parameter_space_in_y_2 `Parameter_space_in_y_2`\endlink(`xcv`, `ce`) \f$\neq\f$ `CGAL::ARR_INTERIOR`.
*
* \pre If the parameter space is unbounded, \f$c\f$ has a vertical asymptote
* at its \f$d\f$-end; that is,
* \link AosVerticalSideTraits_2::Parameter_space_in_x_2 `Parameter_space_in_x_2`\endlink(`xcv`, `ce`) = `CGAL::ARR_INTERIOR`.
*/
Comparison_result operator()(const AosTraits::Point_2& p,
const AosTraits::X_monotone_curve_2& xcv,
CGAL::Arr_curve_end ce);
/*! Given two \f$x\f$-monotone curves `xcv1` and `xcv2` and two indices `ce1`
* and `ce2` that specify either the minimum or the maximum ends of `xcv1` and
* `xcv2`, respectively, where the curves have vertical asymptotes, compares
* the \f$x\f$-coordinates of the limits of the curves at their specified
* ends. The variables `xcv1` and `xcv2` identify the parametric curves
* \f$c_1(t) = (x_1(t),y_1(t))\f$ and \f$c_2(t) = (x_2(t),y_2(t))\f$,
* respectively, defined over open or half-open intervals with endpoints
* \f$0\f$ and \f$1\f$. The indices `ce1` and `ce2` identify open ends
* \f$d_1\in\{0,1\}\f$ and \f$d_2 \in\{0,1\}\f$ of \f$c_1\f$ and \f$c_2\f$,
* respectively. Formally, compares \f$\lim_{t \rightarrow d_1} x_1(t)\f$ and
* \f$\lim_{t \rightarrow d_2} x_2(t)\f$. Returns `CGAL::SMALLER`,
* `CGAL::EQUAL`, or `CGAL::LARGER` accordingly.
*
* \pre \link AosHorizontalSideTraits_2::Parameter_space_in_y_2 `Parameter_space_in_y_2`\endlink(`xcv1`, `ce1`) \f$\neq\f$ `CGAL::ARR_INTERIOR`.
*
* \pre \link AosHorizontalSideTraits_2::Parameter_space_in_y_2 `Parameter_space_in_y_2`\endlink(`xcv2`, `ce2`) \f$\neq\f$ `CGAL::ARR_INTERIOR`.
*
* \pre If the parameter space is unbounded, \f$c_1\f$ has a vertical
* asymptote at its respective end; that is,
* \link AosVerticalSideTraits_2::Parameter_space_in_x_2 `Parameter_space_in_x_2`\endlink(`xcv1`, `ce1`) = `CGAL::ARR_INTERIOR`.
*
* \pre If the parameter space is unbounded, \f$c_2\f$ has a vertical asymptote
* at its respective end; that is,
* \link AosVerticalSideTraits_2::Parameter_space_in_x_2 `Parameter_space_in_x_2`\endlink(`xcv2`, `ce2`) = `CGAL::ARR_INTERIOR`.
*/
Comparison_result operator()(const AosTraits::X_monotone_curve_2& xcv1,
CGAL::Arr_curve_end ce1,
const AosTraits::X_monotone_curve_2& xcv2,
CGAL::Arr_curve_end ce2);
/// @}
}; /* end AosTraits::CompareXOnBoundaryOfCurveEnd_2 */
}

View File

@ -1,4 +1,4 @@
namespace ArrTraits {
namespace AosTraits {
/*! \ingroup PkgArrangementOnSurface2ConceptsFunctionObjects
* \cgalConcept
@ -6,9 +6,9 @@ namespace ArrTraits {
* \cgalRefines{AdaptableFunctor}
*
* \cgalHasModelsBegin
* \cgalHasModels{ArrangementClosedBottomTraits_2::Compare_x_on_boundary_2}
* \cgalHasModels{ArrangementClosedTopTraits_2::Compare_x_on_boundary_2}
* \cgalHasModels{ArrangementIdentifiedHorizontalTraits_2::Compare_x_on_boundary_2}
* \cgalHasModels{AosClosedBottomTraits_2::Compare_x_on_boundary_2}
* \cgalHasModels{AosClosedTopTraits_2::Compare_x_on_boundary_2}
* \cgalHasModels{AosIdentifiedHorizontalTraits_2::Compare_x_on_boundary_2}
* \cgalHasModelsEnd
*/
class CompareXOnBoundary_2 {
@ -23,16 +23,16 @@ public:
* x\f$-coordinate of `p1` and the \f$x\f$-coordinate of `p2`. Returns
* `CGAL::SMALLER`, `CGAL::EQUAL`, or `CGAL::LARGER` accordingly.
*
* \pre \link ArrangementHorizontalSideTraits_2::Parameter_space_in_y_2
* \pre \link AosHorizontalSideTraits_2::Parameter_space_in_y_2
* `Parameter_space_in_y_2`\endlink (`p1`) \f$\neq\f$ `CGAL::ARR_INTERIOR` or
* \link ArrangementHorizontalSideTraits_2::Parameter_space_in_y_2
* \link AosHorizontalSideTraits_2::Parameter_space_in_y_2
* `Parameter_space_in_y_2`\endlink (`p2`) \f$\neq\f$ `CGAL::ARR_INTERIOR`.
*/
Comparison_result operator()(const ArrTraits::Point_2& p1,
const ArrTraits::Point_2& p2);
Comparison_result operator()(const AosTraits::Point_2& p1,
const AosTraits::Point_2& p2);
/// @}
}; /* end ArrTraits::CompareXOnBoundaryOfCurveEnd_2 */
}; /* end AosTraits::CompareXOnBoundaryOfCurveEnd_2 */
}

View File

@ -1,16 +1,16 @@
namespace ArrTraits {
namespace AosTraits {
/*! \ingroup PkgArrangementOnSurface2ConceptsFunctionObjects
* \cgalConcept
*
* \cgalRefines{AdaptableBinaryFunction}
*
* \cgalHasModelsBegin
* \cgalHasModels{ArrangementBasicTraits_2::Compare_x_2}
* \cgalHasModels{AosBasicTraits_2::Compare_x_2}
* \cgalHasModelsEnd
*/
class CompareX_2 {
public:
/// \name Operations
/// A model of this concept must provide:
/// @{
@ -18,10 +18,9 @@ public:
/*! returns `CGAL::SMALLER`, `CGAL::EQUAL`, or `CGAL::LARGER` according to the
* \f$x\f$-ordering of points `p1` and `p2`.
*/
Comparison_result operator()(ArrTraits::Point_2 p1, ArrTraits::Point_2 p2);
Comparison_result operator()(AosTraits::Point_2 p1, AosTraits::Point_2 p2);
/// @}
}; /* end ArrTraits::CompareX_2 */
}; /* end AosTraits::CompareX_2 */
}

View File

@ -1,4 +1,4 @@
namespace ArrTraits {
namespace AosTraits {
/*! \ingroup PkgArrangementOnSurface2ConceptsFunctionObjects
* \cgalConcept
@ -6,12 +6,11 @@ namespace ArrTraits {
* \cgalRefines{AdaptableBinaryFunction}
*
* \cgalHasModelsBegin
* \cgalHasModels{ArrangementBasicTraits_2::Compare_xy_2}
* \cgalHasModels{AosBasicTraits_2::Compare_xy_2}
* \cgalHasModelsEnd
*/
class CompareXy_2 {
public:
/// \name Operations
/// A model of this concept must provide:
/// @{
@ -19,10 +18,9 @@ public:
/*! returns `CGAL::SMALLER`, `CGAL::EQUAL`, or `CGAL::LARGER` according
* to the lexicographic \f$xy\f$-order of the points `p1` and `p2`.
*/
Comparison_result operator()(ArrTraits::Point_2 p1, ArrTraits::Point_2 p2);
Comparison_result operator()(AosTraits::Point_2 p1, AosTraits::Point_2 p2);
/// @}
}; /* end ArrTraits::CompareXy_2 */
}; /* end AosTraits::CompareXy_2 */
}

View File

@ -1,4 +1,4 @@
namespace ArrTraits {
namespace AosTraits {
/*! \ingroup PkgArrangementOnSurface2ConceptsFunctionObjects
* \cgalConcept
@ -6,29 +6,27 @@ namespace ArrTraits {
* \cgalRefines{AdaptableTernaryFunction}
*
* \cgalHasModelsBegin
* \cgalHasModels{ArrangementBasicTraits_2::Compare_y_at_x_left_2}
* \cgalHasModels{AosBasicTraits_2::Compare_y_at_x_left_2}
* \cgalHasModelsEnd
*/
class CompareYAtXLeft_2 {
public:
/// \name Operations
/// A model of this concept must provide:
/// @{
/*! accepts two \f$x\f$-monotone curves `xc1` and `xc2` that have a common
* right endpoint `p`, and returns `CGAL::SMALLER, CGAL::EQUAL` or
* right endpoint `p`, and returns `CGAL::SMALLER`, `CGAL::EQUAL` or
* `CGAL::LARGER` according to the relative position of the two curves
* immediately to the left of \f$p\f$. Note that in case one of the
* \f$x\f$-monotone curves is a vertical segment (emanating downward from
* `p`), it is always considered to be <I>below</I> the other curve.
*/
Comparison_result operator()(ArrTraits::X_monotone_curve_2 xc1,
ArrTraits::X_monotone_curve_2 xc2,
ArrTraits::Point_2 p);
Comparison_result operator()(AosTraits::X_monotone_curve_2 xc1,
AosTraits::X_monotone_curve_2 xc2,
AosTraits::Point_2 p);
/// @}
}; /* end ArrTraits::CompareYAtXLeft_2 */
}; /* end AosTraits::CompareYAtXLeft_2 */
}

View File

@ -1,4 +1,4 @@
namespace ArrTraits {
namespace AosTraits {
/*! \ingroup PkgArrangementOnSurface2ConceptsFunctionObjects
* \cgalConcept
@ -6,29 +6,27 @@ namespace ArrTraits {
* \cgalRefines{AdaptableTernaryFunction}
*
* \cgalHasModelsBegin
* \cgalHasModels{ArrangementBasicTraits_2::Compare_y_at_x_right_2}
* \cgalHasModels{AosBasicTraits_2::Compare_y_at_x_right_2}
* \cgalHasModelsEnd
*/
class CompareYAtXRight_2 {
public:
/// \name Operations
/// A model of this concept must provide:
/// @{
/*! accepts two \f$x\f$-monotone curves `xc1` and `xc2`
* that have a common left endpoint `p`, and returns `CGAL::SMALLER,
* CGAL::EQUAL` or `CGAL::LARGER` according to the relative position of the
* that have a common left endpoint `p`, and returns `CGAL::SMALLER`,
* `CGAL::EQUAL` or `CGAL::LARGER` according to the relative position of the
* two curves immediately to the right of \f$p\f$. Note that in case one of
* the \f$x\f$-monotone curves is a vertical segment emanating upward from
* `p`, it is always considered to be <I>above</I> the other curve.
*/
Comparison_result operator()(ArrTraits::X_monotone_curve_2 xc1,
ArrTraits::X_monotone_curve_2 xc2,
ArrTraits::Point_2 p);
Comparison_result operator()(AosTraits::X_monotone_curve_2 xc1,
AosTraits::X_monotone_curve_2 xc2,
AosTraits::Point_2 p);
/// @}
}; /* end ArrTraits::CompareYAtXRight_2 */
}; /* end AosTraits::CompareYAtXRight_2 */
}

View File

@ -1,4 +1,4 @@
namespace ArrTraits {
namespace AosTraits {
/*! \ingroup PkgArrangementOnSurface2ConceptsFunctionObjects
* \cgalConcept
@ -6,12 +6,11 @@ namespace ArrTraits {
* \cgalRefines{AdaptableBinaryFunction}
*
* \cgalHasModelsBegin
* \cgalHasModels{ArrangementBasicTraits_2::Compare_y_at_x_2}
* \cgalHasModels{AosBasicTraits_2::Compare_y_at_x_2}
* \cgalHasModelsEnd
*/
class CompareYAtX_2 {
public:
/// \name Operations
/// A model of this concept must provide:
/// @{
@ -20,11 +19,10 @@ public:
* of `p` on `xc`, and returns `CGAL::SMALLER`, `CGAL::EQUAL`, or
* `CGAL::LARGER` according to the result.
*/
Comparison_result operator()(ArrTraits::Point_2 p,
ArrTraits::X_monotone_curve_2 xc);
Comparison_result operator()(AosTraits::Point_2 p,
AosTraits::X_monotone_curve_2 xc);
/// @}
}; /* end ArrTraits::CompareYAtX_2 */
}; /* end AosTraits::CompareYAtX_2 */
}

Some files were not shown because too many files have changed in this diff Show More