mirror of https://github.com/CGAL/cgal
Fixed tense on manual of functions
This commit is contained in:
parent
85667b524d
commit
462532edab
File diff suppressed because it is too large
Load Diff
|
|
@ -63,7 +63,7 @@ public:
|
||||||
Algebraic x; // The x-coordinate.
|
Algebraic x; // The x-coordinate.
|
||||||
Algebraic y; // The y-coordinate.
|
Algebraic y; // The y-coordinate.
|
||||||
|
|
||||||
/*! Constructor. */
|
/*! constructs. */
|
||||||
Intersection_point (const Algebraic& _s, const Algebraic& _t,
|
Intersection_point (const Algebraic& _s, const Algebraic& _t,
|
||||||
const Algebraic& _x, const Algebraic& _y) :
|
const Algebraic& _x, const Algebraic& _y) :
|
||||||
s(_s), t(_t),
|
s(_s), t(_t),
|
||||||
|
|
@ -124,7 +124,7 @@ private:
|
||||||
app_y (0)
|
app_y (0)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
/*! Constructor. */
|
/*! constructs. */
|
||||||
My_point_2 (typename Parameter_list::const_iterator it,
|
My_point_2 (typename Parameter_list::const_iterator it,
|
||||||
const Algebraic& _x, const Algebraic& _y) :
|
const Algebraic& _x, const Algebraic& _y) :
|
||||||
prm_it (it),
|
prm_it (it),
|
||||||
|
|
@ -134,7 +134,7 @@ private:
|
||||||
app_y (CGAL::to_double(_y))
|
app_y (CGAL::to_double(_y))
|
||||||
{}
|
{}
|
||||||
|
|
||||||
/*! Get the parameter value. */
|
/*! obtains the parameter value. */
|
||||||
const Algebraic& parameter () const
|
const Algebraic& parameter () const
|
||||||
{
|
{
|
||||||
return (*prm_it);
|
return (*prm_it);
|
||||||
|
|
@ -177,7 +177,7 @@ private:
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
/*! Constructor. */
|
/*! constructs. */
|
||||||
_Bezier_cache ()
|
_Bezier_cache ()
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
@ -869,6 +869,6 @@ _Bezier_cache<NtTraits>::_compute_resultant
|
||||||
return (det);
|
return (det);
|
||||||
}
|
}
|
||||||
|
|
||||||
} //namespace CGAL
|
} // namespace CGAL
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -95,7 +95,7 @@ private:
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
/*! Constructor, given an exact algebraic representation. */
|
/*! constructs, given an exact algebraic representation. */
|
||||||
Originator (const Curve_2& c, const Algebraic& t) :
|
Originator (const Curve_2& c, const Algebraic& t) :
|
||||||
_curve (c),
|
_curve (c),
|
||||||
_xid (0),
|
_xid (0),
|
||||||
|
|
@ -104,7 +104,7 @@ private:
|
||||||
set_parameter (t);
|
set_parameter (t);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Constructor, given an exact algebraic representation. */
|
/*! constructs, given an exact algebraic representation. */
|
||||||
Originator (const Curve_2& c, unsigned int xid,
|
Originator (const Curve_2& c, unsigned int xid,
|
||||||
const Algebraic& t) :
|
const Algebraic& t) :
|
||||||
_curve (c),
|
_curve (c),
|
||||||
|
|
@ -114,7 +114,7 @@ private:
|
||||||
set_parameter (t);
|
set_parameter (t);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Constructor with bounding information and no exact representation. */
|
/*! constructs with bounding information and no exact representation. */
|
||||||
Originator (const Curve_2& c, const Bez_point_bound& bpb) :
|
Originator (const Curve_2& c, const Bez_point_bound& bpb) :
|
||||||
_curve (c),
|
_curve (c),
|
||||||
_xid (0),
|
_xid (0),
|
||||||
|
|
@ -122,7 +122,7 @@ private:
|
||||||
p_t (nullptr)
|
p_t (nullptr)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
/*! Constructor with bounding information and no exact representation. */
|
/*! constructs with bounding information and no exact representation. */
|
||||||
Originator (const Curve_2& c, unsigned int xid,
|
Originator (const Curve_2& c, unsigned int xid,
|
||||||
const Bez_point_bound& bpb) :
|
const Bez_point_bound& bpb) :
|
||||||
_curve (c),
|
_curve (c),
|
||||||
|
|
@ -174,19 +174,19 @@ private:
|
||||||
return (*this);
|
return (*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Get the originating curve. */
|
/*! obtains the originating curve. */
|
||||||
const Curve_2& curve () const
|
const Curve_2& curve () const
|
||||||
{
|
{
|
||||||
return (_curve);
|
return (_curve);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Get the serial number of the originating x-monotone curve. */
|
/*! obtains the serial number of the originating x-monotone curve. */
|
||||||
unsigned int xid () const
|
unsigned int xid () const
|
||||||
{
|
{
|
||||||
return (_xid);
|
return (_xid);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Get the bounding information. */
|
/*! obtains the bounding information. */
|
||||||
const Bez_point_bound& point_bound () const
|
const Bez_point_bound& point_bound () const
|
||||||
{
|
{
|
||||||
return (_bpb);
|
return (_bpb);
|
||||||
|
|
@ -264,7 +264,7 @@ private:
|
||||||
BoundNT t_min; /*!< Minimal parameter value. */
|
BoundNT t_min; /*!< Minimal parameter value. */
|
||||||
BoundNT t_max; /*!< Maximal parameter value. */
|
BoundNT t_max; /*!< Maximal parameter value. */
|
||||||
|
|
||||||
/*! Constructor given control points an a t-range. */
|
/*! constructs given control points an a t-range. */
|
||||||
Subcurve (const Control_points& _ctrl,
|
Subcurve (const Control_points& _ctrl,
|
||||||
const BoundNT& _tmin,
|
const BoundNT& _tmin,
|
||||||
const BoundNT& _tmax) :
|
const BoundNT& _tmax) :
|
||||||
|
|
@ -273,7 +273,7 @@ private:
|
||||||
t_max (_tmax)
|
t_max (_tmax)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
/*! Constructor given a t-range. */
|
/*! constructs given a t-range. */
|
||||||
Subcurve (const BoundNT& _tmin,
|
Subcurve (const BoundNT& _tmin,
|
||||||
const BoundNT& _tmax) :
|
const BoundNT& _tmax) :
|
||||||
t_min (_tmin),
|
t_min (_tmin),
|
||||||
|
|
@ -924,7 +924,7 @@ public:
|
||||||
_rep()._bbox = bbox;
|
_rep()._bbox = bbox;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Get the bounding box of the point. */
|
/*! obtains the bounding box of the point. */
|
||||||
void get_bbox (typename Bounding_traits::NT& min_x,
|
void get_bbox (typename Bounding_traits::NT& min_x,
|
||||||
typename Bounding_traits::NT& min_y,
|
typename Bounding_traits::NT& min_y,
|
||||||
typename Bounding_traits::NT& max_x,
|
typename Bounding_traits::NT& max_x,
|
||||||
|
|
@ -938,13 +938,13 @@ public:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
/*! Get the representation (const version). */
|
/*! obtains the representation (const version). */
|
||||||
inline const Bpt_rep& _rep () const
|
inline const Bpt_rep& _rep () const
|
||||||
{
|
{
|
||||||
return (*(this->ptr()));
|
return (*(this->ptr()));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Get the representation (non-const version). */
|
/*! obtains the representation (non-const version). */
|
||||||
inline Bpt_rep& _rep ()
|
inline Bpt_rep& _rep ()
|
||||||
{
|
{
|
||||||
return (*(this->ptr()));
|
return (*(this->ptr()));
|
||||||
|
|
@ -1701,6 +1701,6 @@ void _Bezier_point_2_rep<RatKer, AlgKer, NtTrt, BndTrt>::_make_exact
|
||||||
CGAL_error();
|
CGAL_error();
|
||||||
}
|
}
|
||||||
|
|
||||||
} //namespace CGAL
|
} // namespace CGAL
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -130,7 +130,7 @@ private:
|
||||||
Rational t_min;
|
Rational t_min;
|
||||||
Rational t_max;
|
Rational t_max;
|
||||||
|
|
||||||
/*! Get the rational bounding box of the subcurve. */
|
/*! obtains the rational bounding box of the subcurve. */
|
||||||
void bbox(Rational& x_min, Rational& y_min,
|
void bbox(Rational& x_min, Rational& y_min,
|
||||||
Rational& x_max, Rational& y_max) const
|
Rational& x_max, Rational& y_max) const
|
||||||
{
|
{
|
||||||
|
|
@ -464,7 +464,7 @@ private:
|
||||||
const Point_2& p,
|
const Point_2& p,
|
||||||
Bezier_cache& cache) const;
|
Bezier_cache& cache) const;
|
||||||
|
|
||||||
/*! Get the range of t-value over which the subcurve is defined.
|
/*! obtains the range of t-value over which the subcurve is defined.
|
||||||
* \param cache Caches the vertical tangency points and intersection points.
|
* \param cache Caches the vertical tangency points and intersection points.
|
||||||
* \return A pair comprised of the t-value for the source point and the
|
* \return A pair comprised of the t-value for the source point and the
|
||||||
* t-value for the target point.
|
* t-value for the target point.
|
||||||
|
|
@ -2585,6 +2585,6 @@ _exact_vertical_position(const Point_2& p,
|
||||||
return EQUAL;
|
return EQUAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
} //namespace CGAL
|
} // namespace CGAL
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -50,13 +50,13 @@ private:
|
||||||
CoordNT _y;
|
CoordNT _y;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/*! Default constructor. */
|
/*! constructs default. */
|
||||||
_One_root_point_2_rep() :
|
_One_root_point_2_rep() :
|
||||||
_x(0),
|
_x(0),
|
||||||
_y(0)
|
_y(0)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
/*! Constructor of a point with one-root coefficients.
|
/*! constructs a point with one-root coefficients.
|
||||||
This constructor of a point can also be used with rational coefficients
|
This constructor of a point can also be used with rational coefficients
|
||||||
thanks to convertor of CoordNT. */
|
thanks to convertor of CoordNT. */
|
||||||
_One_root_point_2_rep(const CoordNT& x, const CoordNT& y) :
|
_One_root_point_2_rep(const CoordNT& x, const CoordNT& y) :
|
||||||
|
|
@ -83,28 +83,29 @@ private:
|
||||||
public:
|
public:
|
||||||
typedef typename Point_rep::CoordNT CoordNT;
|
typedef typename Point_rep::CoordNT CoordNT;
|
||||||
|
|
||||||
/*! Default constructor. */
|
/*! constructs default. */
|
||||||
_One_root_point_2() : Point_handle(Point_rep()) {}
|
_One_root_point_2() : Point_handle(Point_rep()) {}
|
||||||
|
|
||||||
/*! Copy constructor. */
|
/*! constructs copy. */
|
||||||
_One_root_point_2(const Self& p) : Point_handle(p) {}
|
_One_root_point_2(const Self& p) : Point_handle(p) {}
|
||||||
|
|
||||||
_One_root_point_2& operator=(const _One_root_point_2&)=default;
|
_One_root_point_2& operator=(const _One_root_point_2&)=default;
|
||||||
|
|
||||||
/*! Constructor of a point with one-root coefficients.
|
/*! constructs a point with one-root coefficients.
|
||||||
This constructor of a point can also be used with rational coefficients
|
* This constructor of a point can also be used with rational coefficients
|
||||||
thanks to convertor of CoordNT. */
|
* thanks to convertor of CoordNT.
|
||||||
|
*/
|
||||||
_One_root_point_2(const CoordNT& x, const CoordNT& y) :
|
_One_root_point_2(const CoordNT& x, const CoordNT& y) :
|
||||||
Point_handle(Point_rep(x, y))
|
Point_handle(Point_rep(x, y))
|
||||||
{}
|
{}
|
||||||
|
|
||||||
/*! Get the x-coordinate. */
|
/*! obtains the x-coordinate. */
|
||||||
const CoordNT& x() const { return (this->ptr()->_x); }
|
const CoordNT& x() const { return (this->ptr()->_x); }
|
||||||
|
|
||||||
/*! Get the y-coordinate. */
|
/*! obtains the y-coordinate. */
|
||||||
const CoordNT& y() const { return (this->ptr()->_y); }
|
const CoordNT& y() const { return (this->ptr()->_y); }
|
||||||
|
|
||||||
/*! Check for equality. */
|
/*! checks for equality. */
|
||||||
bool equals(const Self& p) const
|
bool equals(const Self& p) const
|
||||||
{
|
{
|
||||||
if (this->identical(p)) return (true);
|
if (this->identical(p)) return (true);
|
||||||
|
|
@ -117,7 +118,7 @@ public:
|
||||||
|
|
||||||
bool operator == (const Self& p) const { return equals(p); }
|
bool operator == (const Self& p) const { return equals(p); }
|
||||||
|
|
||||||
/*! Set the point coordinates. */
|
/*! sets the point coordinates. */
|
||||||
void set(const NT& x, const NT& y)
|
void set(const NT& x, const NT& y)
|
||||||
{
|
{
|
||||||
this->copy_on_write();
|
this->copy_on_write();
|
||||||
|
|
@ -126,7 +127,7 @@ public:
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Set the point coordinates. */
|
/*! sets the point coordinates. */
|
||||||
void set(const CoordNT& x, const CoordNT& y)
|
void set(const CoordNT& x, const CoordNT& y)
|
||||||
{
|
{
|
||||||
this->copy_on_write();
|
this->copy_on_write();
|
||||||
|
|
@ -136,8 +137,7 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/*!
|
/*! exports a conic arc.
|
||||||
* Exporter for conic arcs.
|
|
||||||
*/
|
*/
|
||||||
template <typename NT, bool Filter>
|
template <typename NT, bool Filter>
|
||||||
std::ostream& operator<<(std::ostream& os,
|
std::ostream& operator<<(std::ostream& os,
|
||||||
|
|
@ -187,14 +187,14 @@ protected:
|
||||||
Orientation m_orient; // The orientation (COLLINEAR for line segments).
|
Orientation m_orient; // The orientation (COLLINEAR for line segments).
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/*! Default constructor. */
|
/*! constructs default. */
|
||||||
_Circle_segment_2() :
|
_Circle_segment_2() :
|
||||||
m_is_full(false),
|
m_is_full(false),
|
||||||
m_has_radius(false),
|
m_has_radius(false),
|
||||||
m_orient(COLLINEAR)
|
m_orient(COLLINEAR)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
/*! Constructor from a line segment.
|
/*! constructs from a line segment.
|
||||||
* \param seg The segment.
|
* \param seg The segment.
|
||||||
*/
|
*/
|
||||||
_Circle_segment_2(const Segment_2& seg) :
|
_Circle_segment_2(const Segment_2& seg) :
|
||||||
|
|
@ -206,7 +206,7 @@ public:
|
||||||
m_orient(COLLINEAR)
|
m_orient(COLLINEAR)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
/*! Constructor from of a line segment.
|
/*! constructs from of a line segment.
|
||||||
* \param ps The source point.
|
* \param ps The source point.
|
||||||
* \param pt The target point.
|
* \param pt The target point.
|
||||||
*/
|
*/
|
||||||
|
|
@ -220,7 +220,7 @@ public:
|
||||||
m_orient(COLLINEAR)
|
m_orient(COLLINEAR)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
/*! Constructor of a segment, given a supporting line and two endpoints,
|
/*! constructs a segment, given a supporting line and two endpoints,
|
||||||
* which need not necessarily have rational coordinates.
|
* which need not necessarily have rational coordinates.
|
||||||
* \param line The supporting line.
|
* \param line The supporting line.
|
||||||
* \param source The source point.
|
* \param source The source point.
|
||||||
|
|
@ -243,7 +243,7 @@ public:
|
||||||
-target.y() * line.b()) == EQUAL);
|
-target.y() * line.b()) == EQUAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Constructor from a circle.
|
/*! constructs from a circle.
|
||||||
* \param circ The circle.
|
* \param circ The circle.
|
||||||
*/
|
*/
|
||||||
_Circle_segment_2(const Circle_2& circ) :
|
_Circle_segment_2(const Circle_2& circ) :
|
||||||
|
|
@ -253,7 +253,7 @@ public:
|
||||||
m_orient(circ.orientation())
|
m_orient(circ.orientation())
|
||||||
{ CGAL_assertion(m_orient != COLLINEAR); }
|
{ CGAL_assertion(m_orient != COLLINEAR); }
|
||||||
|
|
||||||
/*! Constructor from a circle.
|
/*! constructs from a circle.
|
||||||
* \param c The circle center.
|
* \param c The circle center.
|
||||||
* \param r The radius.
|
* \param r The radius.
|
||||||
* \param orient The orientation of the circle.
|
* \param orient The orientation of the circle.
|
||||||
|
|
@ -267,7 +267,7 @@ public:
|
||||||
m_orient(orient)
|
m_orient(orient)
|
||||||
{ CGAL_assertion (orient != COLLINEAR); }
|
{ CGAL_assertion (orient != COLLINEAR); }
|
||||||
|
|
||||||
/*! Constructor of a circular arc, given a supporting circle and two
|
/*! constructs a circular arc, given a supporting circle and two
|
||||||
* endpoints, which need not necessarily have rational coordinates.
|
* endpoints, which need not necessarily have rational coordinates.
|
||||||
* The orientation of the circle determines the orientation of the arc.
|
* The orientation of the circle determines the orientation of the arc.
|
||||||
* \param circ The supporting circle.
|
* \param circ The supporting circle.
|
||||||
|
|
@ -297,7 +297,7 @@ public:
|
||||||
CGAL::square(target.y() - circ.center().y())) == EQUAL);
|
CGAL::square(target.y() - circ.center().y())) == EQUAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Constructor of a circular arc, given a supporting circle and two
|
/*! constructs a circular arc, given a supporting circle and two
|
||||||
* endpoints, which need not necessarily have rational coordinates.
|
* endpoints, which need not necessarily have rational coordinates.
|
||||||
* \param c The circle center.
|
* \param c The circle center.
|
||||||
* \param r The radius.
|
* \param r The radius.
|
||||||
|
|
@ -330,7 +330,7 @@ public:
|
||||||
CGAL::square(target.y() - c.y())) == EQUAL);
|
CGAL::square(target.y() - c.y())) == EQUAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Constructor of a circular arc, from the given three points, in case of
|
/*! constructs a circular arc, from the given three points, in case of
|
||||||
* three collinear points, a segment will be constructed.
|
* three collinear points, a segment will be constructed.
|
||||||
* \param p1 The arc source.
|
* \param p1 The arc source.
|
||||||
* \param p2 A point in the interior of the arc.
|
* \param p2 A point in the interior of the arc.
|
||||||
|
|
@ -408,19 +408,19 @@ public:
|
||||||
m_circ = Circle_2(circ_center, sqr_rad, m_orient);
|
m_circ = Circle_2(circ_center, sqr_rad, m_orient);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Get the orientation of the curve.
|
/*! obtains the orientation of the curve.
|
||||||
* \return COLLINEAR in case of a line segment,
|
* \return COLLINEAR in case of a line segment,
|
||||||
* CLOCKWISE or COUNTERCLOCKWISE for circular curves.
|
* CLOCKWISE or COUNTERCLOCKWISE for circular curves.
|
||||||
*/
|
*/
|
||||||
inline Orientation orientation() const { return (m_orient); }
|
inline Orientation orientation() const { return (m_orient); }
|
||||||
|
|
||||||
/*! Check if the arc is linear. */
|
/*! checks if the arc is linear. */
|
||||||
inline bool is_linear() const { return (m_orient == COLLINEAR); }
|
inline bool is_linear() const { return (m_orient == COLLINEAR); }
|
||||||
|
|
||||||
/*! Check if the arc is circular. */
|
/*! checks if the arc is circular. */
|
||||||
inline bool is_circular() const { return (m_orient != COLLINEAR); }
|
inline bool is_circular() const { return (m_orient != COLLINEAR); }
|
||||||
|
|
||||||
/*! Obtain the supporting line.
|
/*! obtains the supporting line.
|
||||||
* \pre The curve orientation is COLLINEAR.
|
* \pre The curve orientation is COLLINEAR.
|
||||||
*/
|
*/
|
||||||
const Line_2& supporting_line() const
|
const Line_2& supporting_line() const
|
||||||
|
|
@ -429,7 +429,7 @@ public:
|
||||||
return m_line;
|
return m_line;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Obtain the supporting circle.
|
/*! obtains the supporting circle.
|
||||||
* \pre The curve orientation is not COLLINEAR.
|
* \pre The curve orientation is not COLLINEAR.
|
||||||
*/
|
*/
|
||||||
const Circle_2& supporting_circle() const
|
const Circle_2& supporting_circle() const
|
||||||
|
|
@ -438,11 +438,10 @@ public:
|
||||||
return m_circ;
|
return m_circ;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Check if the curve is a full circle. */
|
/*! checks if the curve is a full circle. */
|
||||||
bool is_full() const { return (m_is_full); }
|
bool is_full() const { return (m_is_full); }
|
||||||
|
|
||||||
/*!
|
/*! obtains the source point.
|
||||||
* Get the source point.
|
|
||||||
* \pre The curve is not a full circle.
|
* \pre The curve is not a full circle.
|
||||||
*/
|
*/
|
||||||
const Point_2& source() const
|
const Point_2& source() const
|
||||||
|
|
@ -451,8 +450,7 @@ public:
|
||||||
return (m_source);
|
return (m_source);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*! obtains the target point.
|
||||||
* Get the target point.
|
|
||||||
* \pre The curve is not a full circle.
|
* \pre The curve is not a full circle.
|
||||||
*/
|
*/
|
||||||
const Point_2& target() const
|
const Point_2& target() const
|
||||||
|
|
@ -461,7 +459,7 @@ public:
|
||||||
return (m_target);
|
return (m_target);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Get the vertical tangency points the arc contains.
|
/*! obtains the vertical tangency points the arc contains.
|
||||||
* \param vpts Output: The vertical tangency points.
|
* \param vpts Output: The vertical tangency points.
|
||||||
* \pre The curve is circular.
|
* \pre The curve is circular.
|
||||||
* \return The number of points (0, 1, or 2).
|
* \return The number of points (0, 1, or 2).
|
||||||
|
|
@ -514,7 +512,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/*! Obtain the vertical tangency points the arc contains, assuming it is
|
/*! obtains the vertical tangency points the arc contains, assuming it is
|
||||||
* counterclockwise oriented.
|
* counterclockwise oriented.
|
||||||
* \param vpts Output: The vertical tangency points.
|
* \param vpts Output: The vertical tangency points.
|
||||||
* \return The number of points (0, 1, or 2).
|
* \return The number of points (0, 1, or 2).
|
||||||
|
|
@ -580,7 +578,7 @@ private:
|
||||||
return (n_vpts);
|
return (n_vpts);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Obtain the index of the quarter-plane containing the given point,
|
/*! obtains the index of the quarter-plane containing the given point,
|
||||||
* where the circle center is considered to be the origin.
|
* where the circle center is considered to be the origin.
|
||||||
*/
|
*/
|
||||||
int _quart_index(const Point_2& p) const
|
int _quart_index(const Point_2& p) const
|
||||||
|
|
@ -606,7 +604,7 @@ private:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/*! Exporter for line segments and circular arcs.
|
/*! exports a line segments or a circular arc.
|
||||||
*/
|
*/
|
||||||
template <typename Kernel, bool Filter>
|
template <typename Kernel, bool Filter>
|
||||||
std::ostream&
|
std::ostream&
|
||||||
|
|
@ -648,8 +646,7 @@ public:
|
||||||
typedef std::pair<Point_2, Multiplicity> Intersection_point;
|
typedef std::pair<Point_2, Multiplicity> Intersection_point;
|
||||||
typedef std::list<Intersection_point> Intersection_list;
|
typedef std::list<Intersection_point> Intersection_list;
|
||||||
|
|
||||||
/*!
|
/*! \struct Less functor for Curve_id_pair.
|
||||||
* \struct Less functor for Curve_id_pair.
|
|
||||||
*/
|
*/
|
||||||
struct Less_id_pair {
|
struct Less_id_pair {
|
||||||
bool operator()(const Curve_id_pair& ip1, const Curve_id_pair& ip2) const
|
bool operator()(const Curve_id_pair& ip1, const Curve_id_pair& ip2) const
|
||||||
|
|
@ -692,7 +689,7 @@ protected:
|
||||||
// The rest of the bits represent the curve index.
|
// The rest of the bits represent the curve index.
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/*! Default constructor.
|
/*! constructs default.
|
||||||
*/
|
*/
|
||||||
_X_monotone_circle_segment_2() :
|
_X_monotone_circle_segment_2() :
|
||||||
m_first(),
|
m_first(),
|
||||||
|
|
@ -703,7 +700,7 @@ public:
|
||||||
m_info(0)
|
m_info(0)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
/*! Construct an arc from a line segment.
|
/*! constructs an arc from a line segment.
|
||||||
* \param line The supporting line.
|
* \param line The supporting line.
|
||||||
* \param source The source point.
|
* \param source The source point.
|
||||||
* \param target The target point.
|
* \param target The target point.
|
||||||
|
|
@ -734,7 +731,7 @@ public:
|
||||||
if (res == SMALLER) m_info = (m_info | IS_DIRECTED_RIGHT_MASK);
|
if (res == SMALLER) m_info = (m_info | IS_DIRECTED_RIGHT_MASK);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Construct a segment arc from two kernel points
|
/*! constructs a segment arc from two kernel points
|
||||||
* \param source the source point.
|
* \param source the source point.
|
||||||
* \ param target the target point.
|
* \ param target the target point.
|
||||||
* \pre source and target are not equal.
|
* \pre source and target are not equal.
|
||||||
|
|
@ -766,7 +763,7 @@ public:
|
||||||
if (res == SMALLER) m_info = (m_info | IS_DIRECTED_RIGHT_MASK);
|
if (res == SMALLER) m_info = (m_info | IS_DIRECTED_RIGHT_MASK);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Construct a circular arc.
|
/*! constructs a circular arc.
|
||||||
* \param line The supporting line.
|
* \param line The supporting line.
|
||||||
* \param source The source point.
|
* \param source The source point.
|
||||||
* \param target The target point.
|
* \param target The target point.
|
||||||
|
|
@ -795,14 +792,14 @@ public:
|
||||||
else m_info = (m_info | CLOCKWISE_CODE);
|
else m_info = (m_info | CLOCKWISE_CODE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Check if the arc is linear. */
|
/*! checks if the arc is linear. */
|
||||||
inline bool is_linear () const { return ((m_info & ORIENTATION_MASK) == 0); }
|
inline bool is_linear () const { return ((m_info & ORIENTATION_MASK) == 0); }
|
||||||
|
|
||||||
/*! Check if the arc is circular. */
|
/*! checks if the arc is circular. */
|
||||||
inline bool is_circular () const
|
inline bool is_circular () const
|
||||||
{ return ((m_info & ORIENTATION_MASK) != 0); }
|
{ return ((m_info & ORIENTATION_MASK) != 0); }
|
||||||
|
|
||||||
/*! Obtain the supporting line.
|
/*! obtains the supporting line.
|
||||||
* \pre The arc is linear (a line segment).
|
* \pre The arc is linear (a line segment).
|
||||||
*/
|
*/
|
||||||
Line_2 supporting_line() const
|
Line_2 supporting_line() const
|
||||||
|
|
@ -811,7 +808,7 @@ public:
|
||||||
return (Line_2 (a(), b(), c()));
|
return (Line_2 (a(), b(), c()));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Obtain the supporting circle.
|
/*! obtains the supporting circle.
|
||||||
* \pre The arc is circular.
|
* \pre The arc is circular.
|
||||||
*/
|
*/
|
||||||
Circle_2 supporting_circle() const
|
Circle_2 supporting_circle() const
|
||||||
|
|
@ -822,13 +819,13 @@ public:
|
||||||
return (Circle_2(center , sqr_r(), orientation()));
|
return (Circle_2(center , sqr_r(), orientation()));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Get the source point. */
|
/*! obtains the source point. */
|
||||||
inline const Point_2& source() const { return (m_source); }
|
inline const Point_2& source() const { return (m_source); }
|
||||||
|
|
||||||
/*! Get the target point. */
|
/*! obtains the target point. */
|
||||||
inline const Point_2& target() const { return (m_target); }
|
inline const Point_2& target() const { return (m_target); }
|
||||||
|
|
||||||
/*! True if the arc is directed right, false otherwise. */
|
/*! returns true if the arc is directed right, false otherwise. */
|
||||||
bool is_directed_right() const
|
bool is_directed_right() const
|
||||||
{ return ((m_info & IS_DIRECTED_RIGHT_MASK) != 0); }
|
{ return ((m_info & IS_DIRECTED_RIGHT_MASK) != 0); }
|
||||||
|
|
||||||
|
|
@ -836,15 +833,15 @@ public:
|
||||||
|
|
||||||
bool has_right() const { return true; }
|
bool has_right() const { return true; }
|
||||||
|
|
||||||
/*! Get the left endpoint of the arc. */
|
/*! obtains the left endpoint of the arc. */
|
||||||
inline const Point_2& left() const
|
inline const Point_2& left() const
|
||||||
{ return (((m_info & IS_DIRECTED_RIGHT_MASK) != 0) ? m_source : m_target); }
|
{ return (((m_info & IS_DIRECTED_RIGHT_MASK) != 0) ? m_source : m_target); }
|
||||||
|
|
||||||
/*! Get the right endpoint of the arc. */
|
/*! obtains the right endpoint of the arc. */
|
||||||
inline const Point_2& right() const
|
inline const Point_2& right() const
|
||||||
{ return (((m_info & IS_DIRECTED_RIGHT_MASK) != 0) ? m_target : m_source); }
|
{ return (((m_info & IS_DIRECTED_RIGHT_MASK) != 0) ? m_target : m_source); }
|
||||||
|
|
||||||
/*! Check whether the given point is in the x-range of the arc.
|
/*! checks whether the given point is in the x-range of the arc.
|
||||||
*/
|
*/
|
||||||
bool is_in_x_range(const Point_2& p) const
|
bool is_in_x_range(const Point_2& p) const
|
||||||
{
|
{
|
||||||
|
|
@ -856,11 +853,11 @@ public:
|
||||||
return (CGAL::compare (p.x(), right().x()) != LARGER);
|
return (CGAL::compare (p.x(), right().x()) != LARGER);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Check if the arc is a vertical segment. */
|
/*! checks if the arc is a vertical segment. */
|
||||||
inline bool is_vertical() const
|
inline bool is_vertical() const
|
||||||
{ return ((m_info & IS_VERTICAL_SEGMENT_MASK) != 0); }
|
{ return ((m_info & IS_VERTICAL_SEGMENT_MASK) != 0); }
|
||||||
|
|
||||||
/*! Get the orientation of the arc. */
|
/*! obtains the orientation of the arc. */
|
||||||
inline Orientation orientation() const
|
inline Orientation orientation() const
|
||||||
{
|
{
|
||||||
unsigned int or_ = (m_info & ORIENTATION_MASK);
|
unsigned int or_ = (m_info & ORIENTATION_MASK);
|
||||||
|
|
@ -871,7 +868,7 @@ public:
|
||||||
return (CGAL::COLLINEAR);
|
return (CGAL::COLLINEAR);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Check the position of a given point with respect to the arc.
|
/*! checks the position of a given point with respect to the arc.
|
||||||
*/
|
*/
|
||||||
Comparison_result point_position(const Point_2& p) const
|
Comparison_result point_position(const Point_2& p) const
|
||||||
{
|
{
|
||||||
|
|
@ -879,7 +876,7 @@ public:
|
||||||
else return (_circ_point_position (p));
|
else return (_circ_point_position (p));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Compare the two arcs to the right of their intersection point.
|
/*! compares the two arcs to the right of their intersection point.
|
||||||
*/
|
*/
|
||||||
Comparison_result compare_to_right(const Self& cv, const Point_2& p) const
|
Comparison_result compare_to_right(const Self& cv, const Point_2& p) const
|
||||||
{
|
{
|
||||||
|
|
@ -895,7 +892,7 @@ public:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Compare the two arcs to the left of their intersection point.
|
/*! compares the two arcs to the left of their intersection point.
|
||||||
*/
|
*/
|
||||||
Comparison_result compare_to_left(const Self& cv, const Point_2& p) const
|
Comparison_result compare_to_left(const Self& cv, const Point_2& p) const
|
||||||
{
|
{
|
||||||
|
|
@ -911,7 +908,7 @@ public:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Check whether the two arcs have the same supporting curve.
|
/*! checks whether the two arcs have the same supporting curve.
|
||||||
*/
|
*/
|
||||||
bool has_same_supporting_curve(const Self& cv) const
|
bool has_same_supporting_curve(const Self& cv) const
|
||||||
{
|
{
|
||||||
|
|
@ -951,7 +948,7 @@ public:
|
||||||
CGAL::compare(fact2*c(), fact1*cv.c()) == EQUAL);
|
CGAL::compare(fact2*c(), fact1*cv.c()) == EQUAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Check whether the two curves are equal.
|
/*! checks whether the two curves are equal.
|
||||||
*/
|
*/
|
||||||
bool equals(const Self& cv) const
|
bool equals(const Self& cv) const
|
||||||
{
|
{
|
||||||
|
|
@ -970,7 +967,7 @@ public:
|
||||||
m_source.equals(cv.m_target) && m_target.equals(cv.m_source)));
|
m_source.equals(cv.m_target) && m_target.equals(cv.m_source)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Split the curve at a given point into two sub-arcs.
|
/*! splits the curve at a given point into two sub-arcs.
|
||||||
*/
|
*/
|
||||||
void split(const Point_2& p, Self& c1, Self& c2) const
|
void split(const Point_2& p, Self& c1, Self& c2) const
|
||||||
{
|
{
|
||||||
|
|
@ -989,7 +986,7 @@ public:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Compute the intersections between the two arcs or segments.
|
/*! computes the intersections between the two arcs or segments.
|
||||||
*/
|
*/
|
||||||
template <typename OutputIterator>
|
template <typename OutputIterator>
|
||||||
OutputIterator intersect(const Self& cv, OutputIterator oi,
|
OutputIterator intersect(const Self& cv, OutputIterator oi,
|
||||||
|
|
@ -1076,7 +1073,7 @@ public:
|
||||||
return oi;
|
return oi;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Check whether it is possible to merge our arc with the given arc.
|
/*! checks whether it is possible to merge our arc with the given arc.
|
||||||
*/
|
*/
|
||||||
bool can_merge_with(const Self& cv) const
|
bool can_merge_with(const Self& cv) const
|
||||||
{
|
{
|
||||||
|
|
@ -1089,7 +1086,7 @@ public:
|
||||||
return (right().equals(cv.left()) || left().equals(cv.right()));
|
return (right().equals(cv.left()) || left().equals(cv.right()));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Merge our arc with the given arc.
|
/*! merges our arc with the given arc.
|
||||||
* \pre The two arcs are mergeable.
|
* \pre The two arcs are mergeable.
|
||||||
*/
|
*/
|
||||||
void merge(const Self& cv)
|
void merge(const Self& cv)
|
||||||
|
|
@ -1111,7 +1108,7 @@ public:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! construct an opposite arc. */
|
/*! constructs an opposite arc. */
|
||||||
Self construct_opposite() const
|
Self construct_opposite() const
|
||||||
{
|
{
|
||||||
Self opp_cv;
|
Self opp_cv;
|
||||||
|
|
@ -1153,23 +1150,22 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
/*! Get the curve index. */
|
/*! obtains the curve index. */
|
||||||
inline unsigned int _index() const { return (m_info >> INDEX_SHIFT_BITS); }
|
inline unsigned int _index() const { return (m_info >> INDEX_SHIFT_BITS); }
|
||||||
|
|
||||||
/// \name Accessors for circular arcs.
|
/// \name Accessors for circular arcs.
|
||||||
//@{
|
//@{
|
||||||
|
|
||||||
/*! Get the x-coordinate of the center of the supporting circle. */
|
/*! obtains the x-coordinate of the center of the supporting circle. */
|
||||||
inline const NT& x0() const { return (m_first); }
|
inline const NT& x0() const { return (m_first); }
|
||||||
|
|
||||||
/*! Get the y-coordinate of the center of the supporting circle. */
|
/*! obtains the y-coordinate of the center of the supporting circle. */
|
||||||
inline const NT& y0() const { return (m_second); }
|
inline const NT& y0() const { return (m_second); }
|
||||||
|
|
||||||
/*! Get the squared radius of the supporting circle. */
|
/*! obtains the squared radius of the supporting circle. */
|
||||||
inline const NT& sqr_r() const { return (m_third); }
|
inline const NT& sqr_r() const { return (m_third); }
|
||||||
|
|
||||||
/*!
|
/*! checks if the circular arc lies on the upper half of the supporting circle.
|
||||||
* Check if the circular arc lies on the upper half of the supporting circle.
|
|
||||||
*/
|
*/
|
||||||
inline bool _is_upper() const
|
inline bool _is_upper() const
|
||||||
{
|
{
|
||||||
|
|
@ -1186,21 +1182,20 @@ protected:
|
||||||
/// \name Accessors for line segments.
|
/// \name Accessors for line segments.
|
||||||
//@{
|
//@{
|
||||||
|
|
||||||
/*! Get the coefficient of x in the equation of the supporting line. */
|
/*! obtains the coefficient of x in the equation of the supporting line. */
|
||||||
inline const NT& a() const { return (m_first); }
|
inline const NT& a() const { return (m_first); }
|
||||||
|
|
||||||
/*! Get the coefficient of y in the equation of the supporting line. */
|
/*! obtains the coefficient of y in the equation of the supporting line. */
|
||||||
inline const NT& b() const { return (m_second); }
|
inline const NT& b() const { return (m_second); }
|
||||||
|
|
||||||
/*! Get the free coefficient in the equation of the supporting line. */
|
/*! obtains the free coefficient in the equation of the supporting line. */
|
||||||
inline const NT& c() const { return (m_third); }
|
inline const NT& c() const { return (m_third); }
|
||||||
//@}
|
//@}
|
||||||
|
|
||||||
/// \name Auxiliary functions for the point_position predicate.
|
/// \name Auxiliary functions for the point_position predicate.
|
||||||
//@{
|
//@{
|
||||||
|
|
||||||
/*!
|
/*! checks the position of a given point with respect to a line segment.
|
||||||
* Check the position of a given point with respect to a line segment.
|
|
||||||
*/
|
*/
|
||||||
Comparison_result _line_point_position(const Point_2& p) const
|
Comparison_result _line_point_position(const Point_2& p) const
|
||||||
{
|
{
|
||||||
|
|
@ -1232,8 +1227,7 @@ protected:
|
||||||
return (CGAL::compare (p.y(), y_proj));
|
return (CGAL::compare (p.y(), y_proj));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*! checks the position of a given point with respect to a circular arc.
|
||||||
* Check the position of a given point with respect to a circular arc.
|
|
||||||
*/
|
*/
|
||||||
Comparison_result _circ_point_position(const Point_2& p) const
|
Comparison_result _circ_point_position(const Point_2& p) const
|
||||||
{
|
{
|
||||||
|
|
@ -1274,8 +1268,7 @@ protected:
|
||||||
/// \name Auxiliary functions for the compare_to_right predicate.
|
/// \name Auxiliary functions for the compare_to_right predicate.
|
||||||
//@{
|
//@{
|
||||||
|
|
||||||
/*!
|
/*! compares two line segments to the right of their intersection point.
|
||||||
* Compare two line segments to the right of their intersection point.
|
|
||||||
*/
|
*/
|
||||||
Comparison_result _lines_compare_to_right(const Self& cv,
|
Comparison_result _lines_compare_to_right(const Self& cv,
|
||||||
const Point_2& /* p */) const
|
const Point_2& /* p */) const
|
||||||
|
|
@ -1295,8 +1288,7 @@ protected:
|
||||||
return (CGAL::compare (cv.a()/cv.b(), a()/b()));
|
return (CGAL::compare (cv.a()/cv.b(), a()/b()));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*! compares a circular arcs (this) and a line segment (cv) to the right of
|
||||||
* Compare a circular arcs (this) and a line segment (cv) to the right of
|
|
||||||
* their intersection point.
|
* their intersection point.
|
||||||
*/
|
*/
|
||||||
Comparison_result _circ_line_compare_to_right(const Self& cv,
|
Comparison_result _circ_line_compare_to_right(const Self& cv,
|
||||||
|
|
@ -1339,7 +1331,7 @@ protected:
|
||||||
return (_is_upper() ? SMALLER : LARGER);
|
return (_is_upper() ? SMALLER : LARGER);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Compare two circular arcs to the right of their intersection point.
|
/*! compares two circular arcs to the right of their intersection point.
|
||||||
*/
|
*/
|
||||||
Comparison_result _circs_compare_to_right(const Self& cv,
|
Comparison_result _circs_compare_to_right(const Self& cv,
|
||||||
const Point_2& p) const
|
const Point_2& p) const
|
||||||
|
|
@ -1471,8 +1463,7 @@ protected:
|
||||||
/// \name Auxiliary functions for the compare_to_left predicate.
|
/// \name Auxiliary functions for the compare_to_left predicate.
|
||||||
//@{
|
//@{
|
||||||
|
|
||||||
/*!
|
/*! compares two line segments to the left of their intersection point.
|
||||||
* Compare two line segments to the left of their intersection point.
|
|
||||||
*/
|
*/
|
||||||
Comparison_result _lines_compare_to_left(const Self& cv,
|
Comparison_result _lines_compare_to_left(const Self& cv,
|
||||||
const Point_2& ) const
|
const Point_2& ) const
|
||||||
|
|
@ -1494,7 +1485,7 @@ protected:
|
||||||
return (CGAL::compare (a()/b(), cv.a()/cv.b()));
|
return (CGAL::compare (a()/b(), cv.a()/cv.b()));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Compare a circular arcs (this) and a line segment (cv) to the left of
|
/*! compares a circular arcs (this) and a line segment (cv) to the left of
|
||||||
* their intersection point.
|
* their intersection point.
|
||||||
*/
|
*/
|
||||||
Comparison_result _circ_line_compare_to_left(const Self& cv,
|
Comparison_result _circ_line_compare_to_left(const Self& cv,
|
||||||
|
|
@ -1540,8 +1531,7 @@ protected:
|
||||||
return (_is_upper() ? SMALLER : LARGER);
|
return (_is_upper() ? SMALLER : LARGER);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*! compares the two arcs to the left of their intersection point.
|
||||||
* Compare the two arcs to the left of their intersection point.
|
|
||||||
*/
|
*/
|
||||||
Comparison_result _circs_compare_to_left(const Self& cv,
|
Comparison_result _circs_compare_to_left(const Self& cv,
|
||||||
const Point_2& p) const
|
const Point_2& p) const
|
||||||
|
|
@ -1675,7 +1665,7 @@ protected:
|
||||||
/// \name Auxiliary functions for computing intersections.
|
/// \name Auxiliary functions for computing intersections.
|
||||||
//@{
|
//@{
|
||||||
|
|
||||||
/*! Compute the intersections between two line segments.
|
/*! computes the intersections between two line segments.
|
||||||
*/
|
*/
|
||||||
void _lines_intersect(const Self& cv,
|
void _lines_intersect(const Self& cv,
|
||||||
Intersection_list& inter_list) const
|
Intersection_list& inter_list) const
|
||||||
|
|
@ -1701,7 +1691,7 @@ protected:
|
||||||
inter_list.push_back(Intersection_point(p, mult));
|
inter_list.push_back(Intersection_point(p, mult));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Compute the intersections between the supporting circle of (*this) and
|
/*! computes the intersections between the supporting circle of (*this) and
|
||||||
* the supporting line of the segment cv.
|
* the supporting line of the segment cv.
|
||||||
*/
|
*/
|
||||||
void _circ_line_intersect(const Self& cv,
|
void _circ_line_intersect(const Self& cv,
|
||||||
|
|
@ -1826,7 +1816,7 @@ protected:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Compute the intersections between two circles.
|
/*! computes the intersections between two circles.
|
||||||
*/
|
*/
|
||||||
void _circs_intersect(const Self& cv, Intersection_list& inter_list) const
|
void _circs_intersect(const Self& cv, Intersection_list& inter_list) const
|
||||||
{
|
{
|
||||||
|
|
@ -1891,7 +1881,7 @@ protected:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Check if the given point lies on the arc.
|
/*! checks if the given point lies on the arc.
|
||||||
* \pre p lies on the supporting curve.
|
* \pre p lies on the supporting curve.
|
||||||
*/
|
*/
|
||||||
bool _is_between_endpoints(const Point_2& p) const
|
bool _is_between_endpoints(const Point_2& p) const
|
||||||
|
|
@ -1928,7 +1918,7 @@ protected:
|
||||||
return (this->is_in_x_range(p));
|
return (this->is_in_x_range(p));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Check whether the given point lies in the interior of the arc.
|
/*! checks whether the given point lies in the interior of the arc.
|
||||||
* \pre p lies on the supporting curve.
|
* \pre p lies on the supporting curve.
|
||||||
*/
|
*/
|
||||||
bool _is_strictly_between_endpoints(const Point_2& p) const
|
bool _is_strictly_between_endpoints(const Point_2& p) const
|
||||||
|
|
@ -1937,7 +1927,7 @@ protected:
|
||||||
return (_is_between_endpoints(p));
|
return (_is_between_endpoints(p));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Compute the overlap with a given arc having the same supporting curve.
|
/*! computes the overlap with a given arc having the same supporting curve.
|
||||||
* \param cv The given arc.
|
* \param cv The given arc.
|
||||||
* \param overlap Output: The overlapping arc (if any).
|
* \param overlap Output: The overlapping arc (if any).
|
||||||
* \return Whether we found an overlap.
|
* \return Whether we found an overlap.
|
||||||
|
|
@ -2048,7 +2038,7 @@ protected:
|
||||||
*oi++ = std::make_pair(x_right, y_right); // The right point.
|
*oi++ = std::make_pair(x_right, y_right); // The right point.
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Trim the arc given its new endpoints.
|
/*! trims the arc given its new endpoints.
|
||||||
* \param ps The new source point.
|
* \param ps The new source point.
|
||||||
* \param pt The new target point.
|
* \param pt The new target point.
|
||||||
* \return The new trimmed arc.
|
* \return The new trimmed arc.
|
||||||
|
|
@ -2068,7 +2058,7 @@ protected:
|
||||||
//@}
|
//@}
|
||||||
};
|
};
|
||||||
|
|
||||||
/*! Exporter for circular arcs (or line segments).
|
/*! exports a circular arcs or a line segment
|
||||||
*/
|
*/
|
||||||
template <class Kernel, bool Filter>
|
template <class Kernel, bool Filter>
|
||||||
std::ostream&
|
std::ostream&
|
||||||
|
|
@ -2082,6 +2072,6 @@ operator<<(std::ostream& os,
|
||||||
return (os);
|
return (os);
|
||||||
}
|
}
|
||||||
|
|
||||||
} //namespace CGAL
|
} // namespace CGAL
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -105,7 +105,7 @@ public:
|
||||||
/// \name Deprecated Constructions.
|
/// \name Deprecated Constructions.
|
||||||
//@{
|
//@{
|
||||||
|
|
||||||
/*!Construct a conic arc which is the full conic:
|
/*! constructs a conic arc which is the full conic:
|
||||||
* C: r*x^2 + s*y^2 + t*xy + u*x + v*y + w = 0
|
* C: r*x^2 + s*y^2 + t*xy + u*x + v*y + w = 0
|
||||||
* \pre The conic C must be an ellipse (so 4rs - t^2 > 0).
|
* \pre The conic C must be an ellipse (so 4rs - t^2 > 0).
|
||||||
*/
|
*/
|
||||||
|
|
@ -129,7 +129,7 @@ public:
|
||||||
_set_full(rat_coeffs, true);
|
_set_full(rat_coeffs, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Construct a conic arc which lies on the conic:
|
/*! constructs a conic arc which lies on the conic:
|
||||||
* C: r*x^2 + s*y^2 + t*xy + u*x + v*y + w = 0
|
* C: r*x^2 + s*y^2 + t*xy + u*x + v*y + w = 0
|
||||||
* \param orient The orientation of the arc (clockwise or counterclockwise).
|
* \param orient The orientation of the arc (clockwise or counterclockwise).
|
||||||
* \param source The source point.
|
* \param source The source point.
|
||||||
|
|
@ -156,7 +156,7 @@ public:
|
||||||
_set(rat_coeffs);
|
_set(rat_coeffs);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Construct a segment conic arc from two endpoints.
|
/*! constructs a segment conic arc from two endpoints.
|
||||||
* \param source the source point with rational coordinates.
|
* \param source the source point with rational coordinates.
|
||||||
*/
|
*/
|
||||||
CGAL_DEPRECATED Conic_arc_2(const Point_2& source, const Point_2& target) :
|
CGAL_DEPRECATED Conic_arc_2(const Point_2& source, const Point_2& target) :
|
||||||
|
|
@ -186,7 +186,7 @@ public:
|
||||||
m_extra_data->side = ZERO;
|
m_extra_data->side = ZERO;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Construct a conic arc from the given line segment.
|
/*! constructs a conic arc from the given line segment.
|
||||||
* \param seg The line segment with rational endpoints.
|
* \param seg The line segment with rational endpoints.
|
||||||
*/
|
*/
|
||||||
CGAL_DEPRECATED Conic_arc_2 (const Rat_segment_2& seg) :
|
CGAL_DEPRECATED Conic_arc_2 (const Rat_segment_2& seg) :
|
||||||
|
|
@ -241,7 +241,7 @@ public:
|
||||||
_set(rat_coeffs);
|
_set(rat_coeffs);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Set a circular arc that corresponds to a full circle.
|
/*! sets a circular arc that corresponds to a full circle.
|
||||||
* \param circ The circle (with rational center and rational squared radius).
|
* \param circ The circle (with rational center and rational squared radius).
|
||||||
*/
|
*/
|
||||||
CGAL_DEPRECATED Conic_arc_2(const Rat_circle_2& circ) :
|
CGAL_DEPRECATED Conic_arc_2(const Rat_circle_2& circ) :
|
||||||
|
|
@ -277,7 +277,7 @@ public:
|
||||||
_set_full(rat_coeffs, false);
|
_set_full(rat_coeffs, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Set a circular arc that lies on the given circle:
|
/*! sets a circular arc that lies on the given circle:
|
||||||
* C: (x - x0)^2 + (y - y0)^2 = R^2
|
* C: (x - x0)^2 + (y - y0)^2 = R^2
|
||||||
* \param orient The orientation of the circle.
|
* \param orient The orientation of the circle.
|
||||||
* \param source The source point.
|
* \param source The source point.
|
||||||
|
|
@ -342,7 +342,7 @@ public:
|
||||||
_set(rat_coeffs);
|
_set(rat_coeffs);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Construct a circular arc from the given three points.
|
/*! constructs a circular arc from the given three points.
|
||||||
* \param p1 The arc source.
|
* \param p1 The arc source.
|
||||||
* \param p2 A point in the interior of the arc.
|
* \param p2 A point in the interior of the arc.
|
||||||
* \param p3 The arc target.
|
* \param p3 The arc target.
|
||||||
|
|
@ -424,7 +424,7 @@ public:
|
||||||
_set(rat_coeffs);
|
_set(rat_coeffs);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Construct a conic arc from the given five points, specified by the
|
/*! constructs a conic arc from the given five points, specified by the
|
||||||
* points p1, p2, p3, p4 and p5.
|
* points p1, p2, p3, p4 and p5.
|
||||||
* \param p1 The source point of the given arc.
|
* \param p1 The source point of the given arc.
|
||||||
* \param p2,p3,p4 Points lying on the conic arc, between p1 and p5.
|
* \param p2,p3,p4 Points lying on the conic arc, between p1 and p5.
|
||||||
|
|
@ -515,7 +515,7 @@ public:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Construct a conic arc which lies on the conic:
|
/*! constructs a conic arc which lies on the conic:
|
||||||
* C: r*x^2 + s*y^2 + t*xy + u*x + v*y + w = 0
|
* C: r*x^2 + s*y^2 + t*xy + u*x + v*y + w = 0
|
||||||
* The source and the target are specified by the intersection of the
|
* The source and the target are specified by the intersection of the
|
||||||
* conic with:
|
* conic with:
|
||||||
|
|
@ -684,7 +684,7 @@ public:
|
||||||
_set(rat_coeffs);
|
_set(rat_coeffs);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Get a bounding box for the conic arc.
|
/*! obtains a bounding box for the conic arc.
|
||||||
* \return The bounding box.
|
* \return The bounding box.
|
||||||
*/
|
*/
|
||||||
CGAL_DEPRECATED Bbox_2 bbox() const {
|
CGAL_DEPRECATED Bbox_2 bbox() const {
|
||||||
|
|
@ -769,7 +769,7 @@ public:
|
||||||
//@}
|
//@}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
/*! Calculate the vertical tangency points of the arc.
|
/*! calculates the vertical tangency points of the arc.
|
||||||
* \param vpts The vertical tangency points.
|
* \param vpts The vertical tangency points.
|
||||||
* \pre The vpts vector should be allocated at the size of 2.
|
* \pre The vpts vector should be allocated at the size of 2.
|
||||||
* \return The number of vertical tangency points.
|
* \return The number of vertical tangency points.
|
||||||
|
|
@ -797,7 +797,7 @@ protected:
|
||||||
return m;
|
return m;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Calculate the horizontal tangency points of the arc.
|
/*! calculates the horizontal tangency points of the arc.
|
||||||
* \param hpts The horizontal tangency points.
|
* \param hpts The horizontal tangency points.
|
||||||
* \pre The hpts vector should be allocated at the size of 2.
|
* \pre The hpts vector should be allocated at the size of 2.
|
||||||
* \return The number of horizontal tangency points.
|
* \return The number of horizontal tangency points.
|
||||||
|
|
@ -825,7 +825,7 @@ protected:
|
||||||
return m;
|
return m;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Check whether the given point is strictly between the source and the
|
/*! checks whether the given point is strictly between the source and the
|
||||||
* target (but not any of them).
|
* target (but not any of them).
|
||||||
* The point is assumed to be on the conic's boundary.
|
* The point is assumed to be on the conic's boundary.
|
||||||
* \param p The query point.
|
* \param p The query point.
|
||||||
|
|
@ -892,7 +892,7 @@ protected:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Find the vertical tangency points of the underlying conic.
|
/*! finds the vertical tangency points of the underlying conic.
|
||||||
* \param ps The output points of vertical tangency.
|
* \param ps The output points of vertical tangency.
|
||||||
* This area must be allocated at the size of 2.
|
* This area must be allocated at the size of 2.
|
||||||
* \return The number of vertical tangency points.
|
* \return The number of vertical tangency points.
|
||||||
|
|
@ -970,7 +970,7 @@ protected:
|
||||||
return n;
|
return n;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Find the horizontal tangency points of the underlying conic.
|
/*! finds the horizontal tangency points of the underlying conic.
|
||||||
* \param ps The output points of horizontal tangency.
|
* \param ps The output points of horizontal tangency.
|
||||||
* This area must be allocated at the size of 2.
|
* This area must be allocated at the size of 2.
|
||||||
* \return The number of horizontal tangency points.
|
* \return The number of horizontal tangency points.
|
||||||
|
|
@ -1020,7 +1020,7 @@ protected:
|
||||||
return n;
|
return n;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Set the properties of a conic arc that is really a full curve
|
/*! sets the properties of a conic arc that is really a full curve
|
||||||
* (that is, an ellipse).
|
* (that is, an ellipse).
|
||||||
* \param rat_coeffs A vector of size 6, storing the rational coefficients
|
* \param rat_coeffs A vector of size 6, storing the rational coefficients
|
||||||
* of x^2, y^2, xy, x, y and the free coefficient resp.
|
* of x^2, y^2, xy, x, y and the free coefficient resp.
|
||||||
|
|
@ -1074,7 +1074,7 @@ protected:
|
||||||
else reset_flags(); // invalid arc
|
else reset_flags(); // invalid arc
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Check whether the given point lies on the supporting conic of the arc.
|
/*! checks whether the given point lies on the supporting conic of the arc.
|
||||||
* \param p The query point.
|
* \param p The query point.
|
||||||
* \return (true) if p lies on the supporting conic; (false) otherwise.
|
* \return (true) if p lies on the supporting conic; (false) otherwise.
|
||||||
*/
|
*/
|
||||||
|
|
@ -1093,7 +1093,7 @@ protected:
|
||||||
return (CGAL::sign(val) == ZERO);
|
return (CGAL::sign(val) == ZERO);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Build the data for hyperbolic arc, containing the characterization of the
|
/*! builds the data for hyperbolic arc, containing the characterization of the
|
||||||
* hyperbolic branch the arc is placed on.
|
* hyperbolic branch the arc is placed on.
|
||||||
*/
|
*/
|
||||||
CGAL_DEPRECATED void _build_hyperbolic_arc_data() {
|
CGAL_DEPRECATED void _build_hyperbolic_arc_data() {
|
||||||
|
|
@ -1189,7 +1189,7 @@ protected:
|
||||||
sign_of_extra_data(m_target.x(), m_target.y()));
|
sign_of_extra_data(m_target.x(), m_target.y()));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Check whether the given point is between the source and the target.
|
/*! checks whether the given point is between the source and the target.
|
||||||
* The point is assumed to be on the conic's boundary.
|
* The point is assumed to be on the conic's boundary.
|
||||||
* \param p The query point.
|
* \param p The query point.
|
||||||
* \return (true) if the point is between the two endpoints,
|
* \return (true) if the point is between the two endpoints,
|
||||||
|
|
@ -1206,7 +1206,7 @@ protected:
|
||||||
else return _is_strictly_between_endpoints(p);
|
else return _is_strictly_between_endpoints(p);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Find the y coordinates of the underlying conic at a given x coordinate.
|
/*! finds the y coordinates of the underlying conic at a given x coordinate.
|
||||||
* \param x The x coordinate.
|
* \param x The x coordinate.
|
||||||
* \param ys The output y coordinates.
|
* \param ys The output y coordinates.
|
||||||
* \pre The vector ys must be allocated at the size of 2.
|
* \pre The vector ys must be allocated at the size of 2.
|
||||||
|
|
@ -1224,7 +1224,7 @@ protected:
|
||||||
return (_solve_quadratic_equation(A, B, C, ys[0], ys[1]));
|
return (_solve_quadratic_equation(A, B, C, ys[0], ys[1]));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Find all points on the arc with a given x-coordinate.
|
/*! finds all points on the arc with a given x-coordinate.
|
||||||
* \param p A placeholder for the x-coordinate.
|
* \param p A placeholder for the x-coordinate.
|
||||||
* \param ps The point on the arc at x(p).
|
* \param ps The point on the arc at x(p).
|
||||||
* \pre The vector ps should be allocated at the size of 2.
|
* \pre The vector ps should be allocated at the size of 2.
|
||||||
|
|
@ -1248,7 +1248,7 @@ protected:
|
||||||
return m;
|
return m;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Solve the given quadratic equation: Ax^2 + B*x + C = 0.
|
/*! solves the given quadratic equation: Ax^2 + B*x + C = 0.
|
||||||
* \param x_minus The root obtained from taking -sqrt(discriminant).
|
* \param x_minus The root obtained from taking -sqrt(discriminant).
|
||||||
* \param x_plus The root obtained from taking -sqrt(discriminant).
|
* \param x_plus The root obtained from taking -sqrt(discriminant).
|
||||||
* \return The number of disticnt solutions to the equation.
|
* \return The number of disticnt solutions to the equation.
|
||||||
|
|
@ -1289,7 +1289,7 @@ protected:
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Find the x coordinates of the underlying conic at a given y coordinate.
|
/*! finds the x coordinates of the underlying conic at a given y coordinate.
|
||||||
* \param y The y coordinate.
|
* \param y The y coordinate.
|
||||||
* \param xs The output x coordinates.
|
* \param xs The output x coordinates.
|
||||||
* \pre The vector xs must be allocated at the size of 2.
|
* \pre The vector xs must be allocated at the size of 2.
|
||||||
|
|
@ -1308,7 +1308,7 @@ protected:
|
||||||
return (_solve_quadratic_equation(A, B, C, xs[0], xs[1]));
|
return (_solve_quadratic_equation(A, B, C, xs[0], xs[1]));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Find all points on the arc with a given y-coordinate.
|
/*! finds all points on the arc with a given y-coordinate.
|
||||||
* \param p A placeholder for the y-coordinate.
|
* \param p A placeholder for the y-coordinate.
|
||||||
* \param ps The point on the arc at x(p).
|
* \param ps The point on the arc at x(p).
|
||||||
* \pre The vector ps should be allocated at the size of 2.
|
* \pre The vector ps should be allocated at the size of 2.
|
||||||
|
|
@ -1332,7 +1332,7 @@ protected:
|
||||||
return m;
|
return m;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Set the properties of a conic arc (for the usage of the constructors).
|
/*! sets the properties of a conic arc (for the usage of the constructors).
|
||||||
* \param rat_coeffs A vector of size 6, storing the rational coefficients
|
* \param rat_coeffs A vector of size 6, storing the rational coefficients
|
||||||
* of x^2, y^2, xy, x, y and the free coefficient resp.
|
* of x^2, y^2, xy, x, y and the free coefficient resp.
|
||||||
*/
|
*/
|
||||||
|
|
@ -1454,7 +1454,7 @@ public:
|
||||||
/// \name Construction and destruction functions.
|
/// \name Construction and destruction functions.
|
||||||
//@{
|
//@{
|
||||||
|
|
||||||
/*! Default constructor.
|
/*! constructs default.
|
||||||
*/
|
*/
|
||||||
Conic_arc_2() :
|
Conic_arc_2() :
|
||||||
m_r(0), m_s(0), m_t(0), m_u(0), m_v(0), m_w(0),
|
m_r(0), m_s(0), m_t(0), m_u(0), m_v(0), m_w(0),
|
||||||
|
|
@ -1463,7 +1463,7 @@ public:
|
||||||
m_extra_data(nullptr)
|
m_extra_data(nullptr)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
/*! Copy constructor.
|
/*! constructs copy.
|
||||||
* \param arc The copied arc.
|
* \param arc The copied arc.
|
||||||
*/
|
*/
|
||||||
Conic_arc_2(const Self& arc) :
|
Conic_arc_2(const Self& arc) :
|
||||||
|
|
@ -1478,11 +1478,11 @@ public:
|
||||||
new Extra_data(*(arc.m_extra_data)) : nullptr;
|
new Extra_data(*(arc.m_extra_data)) : nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Destructor.
|
/*! destructs.
|
||||||
*/
|
*/
|
||||||
virtual ~Conic_arc_2() { if (m_extra_data != nullptr) delete m_extra_data; }
|
virtual ~Conic_arc_2() { if (m_extra_data != nullptr) delete m_extra_data; }
|
||||||
|
|
||||||
/*! Assignment operator.
|
/*! assigns.
|
||||||
* \param arc The copied arc.
|
* \param arc The copied arc.
|
||||||
*/
|
*/
|
||||||
const Self& operator=(const Self& arc) {
|
const Self& operator=(const Self& arc) {
|
||||||
|
|
@ -1515,15 +1515,15 @@ public:
|
||||||
/// \name Get the arc properties.
|
/// \name Get the arc properties.
|
||||||
//@{
|
//@{
|
||||||
|
|
||||||
/*! Determine whether the arc is valid.
|
/*! determines whether the arc is valid.
|
||||||
*/
|
*/
|
||||||
bool is_valid() const { return test_flag(IS_VALID); }
|
bool is_valid() const { return test_flag(IS_VALID); }
|
||||||
|
|
||||||
/*! Determine whether the arc represents a full conic curve.
|
/*! determines whether the arc represents a full conic curve.
|
||||||
*/
|
*/
|
||||||
bool is_full_conic() const { return test_flag(IS_FULL_CONIC); }
|
bool is_full_conic() const { return test_flag(IS_FULL_CONIC); }
|
||||||
|
|
||||||
/*! Obtain the coefficients of the underlying conic.
|
/*! obtains the coefficients of the underlying conic.
|
||||||
*/
|
*/
|
||||||
const Integer& r() const { return (m_r); }
|
const Integer& r() const { return (m_r); }
|
||||||
const Integer& s() const { return (m_s); }
|
const Integer& s() const { return (m_s); }
|
||||||
|
|
@ -1532,7 +1532,7 @@ public:
|
||||||
const Integer& v() const { return (m_v); }
|
const Integer& v() const { return (m_v); }
|
||||||
const Integer& w() const { return (m_w); }
|
const Integer& w() const { return (m_w); }
|
||||||
|
|
||||||
/*! Obtain the arc's source.
|
/*! obtains the arc's source.
|
||||||
* \return The source point.
|
* \return The source point.
|
||||||
* \pre The arc does not represent a full conic curve.
|
* \pre The arc does not represent a full conic curve.
|
||||||
*/
|
*/
|
||||||
|
|
@ -1541,14 +1541,14 @@ public:
|
||||||
return m_source;
|
return m_source;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Obtain the non const reference to the curve source point.
|
/*! obtains the non const reference to the curve source point.
|
||||||
*/
|
*/
|
||||||
Point_2& source() {
|
Point_2& source() {
|
||||||
CGAL_precondition(! is_full_conic());
|
CGAL_precondition(! is_full_conic());
|
||||||
return (this->m_source);
|
return (this->m_source);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Obtain the arc's target.
|
/*! obtains the arc's target.
|
||||||
* \return The target point.
|
* \return The target point.
|
||||||
* \pre The arc does not represent a full conic curve.
|
* \pre The arc does not represent a full conic curve.
|
||||||
*/
|
*/
|
||||||
|
|
@ -1557,19 +1557,19 @@ public:
|
||||||
return m_target;
|
return m_target;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Obtain the non const reference to the curve source point.
|
/*! obtains the non const reference to the curve source point.
|
||||||
*/
|
*/
|
||||||
Point_2& target() {
|
Point_2& target() {
|
||||||
CGAL_precondition(! is_full_conic());
|
CGAL_precondition(! is_full_conic());
|
||||||
return this->m_target;
|
return this->m_target;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Obtain the orientation of the arc.
|
/*! obtains the orientation of the arc.
|
||||||
* \return The orientation.
|
* \return The orientation.
|
||||||
*/
|
*/
|
||||||
Orientation orientation() const { return m_orient; }
|
Orientation orientation() const { return m_orient; }
|
||||||
|
|
||||||
/*! Obtain the extra data.
|
/*! obtains the extra data.
|
||||||
*/
|
*/
|
||||||
const Extra_data* extra_data() const { return m_extra_data; }
|
const Extra_data* extra_data() const { return m_extra_data; }
|
||||||
//@}
|
//@}
|
||||||
|
|
@ -1603,17 +1603,17 @@ public:
|
||||||
// only friends have the privilege to use.
|
// only friends have the privilege to use.
|
||||||
//@{
|
//@{
|
||||||
|
|
||||||
/*! Set the source point of the conic arc.
|
/*! sets the source point of the conic arc.
|
||||||
* \param ps The new source point.
|
* \param ps The new source point.
|
||||||
*/
|
*/
|
||||||
void set_source(const Point_2& ps) { m_source = ps; }
|
void set_source(const Point_2& ps) { m_source = ps; }
|
||||||
|
|
||||||
/*! Set the target point of the conic arc.
|
/*! sets the target point of the conic arc.
|
||||||
* \param pt The new source point.
|
* \param pt The new source point.
|
||||||
*/
|
*/
|
||||||
void set_target(const Point_2& pt) { m_target = pt; }
|
void set_target(const Point_2& pt) { m_target = pt; }
|
||||||
|
|
||||||
/*! Set the coefficients.
|
/*! sets the coefficients.
|
||||||
*/
|
*/
|
||||||
void set_coefficients(Integer r, Integer s, Integer t,
|
void set_coefficients(Integer r, Integer s, Integer t,
|
||||||
Integer u, Integer v, Integer w) {
|
Integer u, Integer v, Integer w) {
|
||||||
|
|
@ -1625,22 +1625,22 @@ public:
|
||||||
m_w = w;
|
m_w = w;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Set the orientation.
|
/*! sets the orientation.
|
||||||
*/
|
*/
|
||||||
void set_orientation(Orientation orient) { m_orient = orient; }
|
void set_orientation(Orientation orient) { m_orient = orient; }
|
||||||
|
|
||||||
/*! Set the endpoints.
|
/*! sets the endpoints.
|
||||||
*/
|
*/
|
||||||
void set_endpoints(const Point_2& source, const Point_2& target) {
|
void set_endpoints(const Point_2& source, const Point_2& target) {
|
||||||
m_source = source;
|
m_source = source;
|
||||||
m_target = target;
|
m_target = target;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Set the extra data field.
|
/*! sets the extra data field.
|
||||||
*/
|
*/
|
||||||
void set_extra_data(Extra_data* extra_data) { m_extra_data = extra_data; }
|
void set_extra_data(Extra_data* extra_data) { m_extra_data = extra_data; }
|
||||||
|
|
||||||
/*! Set the extra data field.
|
/*! sets the extra data field.
|
||||||
*/
|
*/
|
||||||
void set_extra_data(const Algebraic& a, const Algebraic& b,
|
void set_extra_data(const Algebraic& a, const Algebraic& b,
|
||||||
const Algebraic& c, Sign side)
|
const Algebraic& c, Sign side)
|
||||||
|
|
@ -1652,7 +1652,7 @@ public:
|
||||||
m_extra_data->side = side;
|
m_extra_data->side = side;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Update the extra data field.
|
/*! updates the extra data field.
|
||||||
*/
|
*/
|
||||||
void update_extra_data() {
|
void update_extra_data() {
|
||||||
const Algebraic x1 = source().x();
|
const Algebraic x1 = source().x();
|
||||||
|
|
@ -1675,7 +1675,7 @@ public:
|
||||||
/// \name Auxiliary functions.
|
/// \name Auxiliary functions.
|
||||||
//@{
|
//@{
|
||||||
|
|
||||||
/*! Evaluate the sign of (a*x + b*y + c) stored with the extra data field
|
/*! evaluates the sign of (a*x + b*y + c) stored with the extra data field
|
||||||
* at a given point.
|
* at a given point.
|
||||||
* \param px The x-coordinate of query point.
|
* \param px The x-coordinate of query point.
|
||||||
* \param py The y-coordinate of query point.
|
* \param py The y-coordinate of query point.
|
||||||
|
|
@ -1691,7 +1691,7 @@ public:
|
||||||
//@}
|
//@}
|
||||||
};
|
};
|
||||||
|
|
||||||
/*! Exporter for conic arcs.
|
/*! exports a conic arc.
|
||||||
*/
|
*/
|
||||||
template <typename Rat_kernel, typename Alg_kernel, typename Nt_traits>
|
template <typename Rat_kernel, typename Alg_kernel, typename Nt_traits>
|
||||||
std::ostream&
|
std::ostream&
|
||||||
|
|
@ -1721,6 +1721,6 @@ operator<< (std::ostream& os,
|
||||||
return os;
|
return os;
|
||||||
}
|
}
|
||||||
|
|
||||||
} //namespace CGAL
|
} // namespace CGAL
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -88,7 +88,7 @@ public:
|
||||||
/// \name Deprecated Constructions.
|
/// \name Deprecated Constructions.
|
||||||
//@{
|
//@{
|
||||||
|
|
||||||
// /*! Construct an x-monotone arc from a conic arc.
|
// /*! constructs an x-monotone arc from a conic arc.
|
||||||
// * \param arc The given (base) arc.
|
// * \param arc The given (base) arc.
|
||||||
// * \param id The ID of the base arc.
|
// * \param id The ID of the base arc.
|
||||||
// */
|
// */
|
||||||
|
|
@ -100,7 +100,7 @@ public:
|
||||||
// _set();
|
// _set();
|
||||||
// }
|
// }
|
||||||
|
|
||||||
/*! Construct an x-monotone sub-arc from a conic arc.
|
/*! constructs an x-monotone sub-arc from a conic arc.
|
||||||
* \param arc The given (base) arc.
|
* \param arc The given (base) arc.
|
||||||
* \param source The source point.
|
* \param source The source point.
|
||||||
* \param target The target point.
|
* \param target The target point.
|
||||||
|
|
@ -118,7 +118,7 @@ public:
|
||||||
_set();
|
_set();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Construct a special segment connecting to given endpoints (for the usage
|
/*! constructs a special segment connecting to given endpoints (for the usage
|
||||||
* of the landmarks point-location strategy).
|
* of the landmarks point-location strategy).
|
||||||
* \param source The source point.
|
* \param source The source point.
|
||||||
* \param target The target point.
|
* \param target The target point.
|
||||||
|
|
@ -141,7 +141,7 @@ public:
|
||||||
set_flag(IS_SPECIAL_SEGMENT);
|
set_flag(IS_SPECIAL_SEGMENT);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Construct a special segment of a given line connecting to given
|
/*! constructs a special segment of a given line connecting to given
|
||||||
* endpoints.
|
* endpoints.
|
||||||
* \param a, b, c The coefficients of the supporting line (ax + by + c = 0).
|
* \param a, b, c The coefficients of the supporting line (ax + by + c = 0).
|
||||||
* \param source The source point.
|
* \param source The source point.
|
||||||
|
|
@ -200,7 +200,7 @@ public:
|
||||||
//@}
|
//@}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/*! Set the properties of the x-monotone conic arc (for the usage of the
|
/*! sets the properties of the x-monotone conic arc (for the usage of the
|
||||||
* constructors).
|
* constructors).
|
||||||
*/
|
*/
|
||||||
CGAL_DEPRECATED void _set() {
|
CGAL_DEPRECATED void _set() {
|
||||||
|
|
@ -304,11 +304,11 @@ public:
|
||||||
/// \name Public constructors, assignment operators, and destructors.
|
/// \name Public constructors, assignment operators, and destructors.
|
||||||
//@{
|
//@{
|
||||||
|
|
||||||
/*! Default constructor.
|
/*! constructs default.
|
||||||
*/
|
*/
|
||||||
Conic_x_monotone_arc_2() : Base(), m_id() {}
|
Conic_x_monotone_arc_2() : Base(), m_id() {}
|
||||||
|
|
||||||
/*! Copy constructor.
|
/*! constructs copy.
|
||||||
* \param arc The copied arc.
|
* \param arc The copied arc.
|
||||||
*/
|
*/
|
||||||
Conic_x_monotone_arc_2(const Self& arc) :
|
Conic_x_monotone_arc_2(const Self& arc) :
|
||||||
|
|
@ -322,7 +322,7 @@ public:
|
||||||
m_id(arc.m_id)
|
m_id(arc.m_id)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
/*! Assignment operator.
|
/*! assigns.
|
||||||
* \param arc The copied arc.
|
* \param arc The copied arc.
|
||||||
*/
|
*/
|
||||||
const Self& operator=(const Self& arc) {
|
const Self& operator=(const Self& arc) {
|
||||||
|
|
@ -353,13 +353,13 @@ private:
|
||||||
/// \name private constructors to be used only by the traits class template.
|
/// \name private constructors to be used only by the traits class template.
|
||||||
//@{
|
//@{
|
||||||
|
|
||||||
/*! Construct an x-monotone arc from a conic arc.
|
/*! constructs an x-monotone arc from a conic arc.
|
||||||
* \param arc The given (base) arc.
|
* \param arc The given (base) arc.
|
||||||
* \pre The given arc is x-monotone.
|
* \pre The given arc is x-monotone.
|
||||||
*/
|
*/
|
||||||
Conic_x_monotone_arc_2(const Base& arc) : Base(arc), m_id() {}
|
Conic_x_monotone_arc_2(const Base& arc) : Base(arc), m_id() {}
|
||||||
|
|
||||||
/*! Construct an x-monotone arc from a conic arc.
|
/*! constructs an x-monotone arc from a conic arc.
|
||||||
* \param arc The given (base) arc.
|
* \param arc The given (base) arc.
|
||||||
* \param id The ID of the base arc.
|
* \param id The ID of the base arc.
|
||||||
*/
|
*/
|
||||||
|
|
@ -373,15 +373,15 @@ public:
|
||||||
/// \name Accessing the arc properties.
|
/// \name Accessing the arc properties.
|
||||||
//@{
|
//@{
|
||||||
|
|
||||||
/*! Obtain the facing mask.
|
/*! obtains the facing mask.
|
||||||
*/
|
*/
|
||||||
size_t facing_mask() const { return this->m_info & FACING_MASK; }
|
size_t facing_mask() const { return this->m_info & FACING_MASK; }
|
||||||
|
|
||||||
/*! Obtain the degree mask.
|
/*! obtains the degree mask.
|
||||||
*/
|
*/
|
||||||
size_t degree_mask() const { return this->m_info & DEGREE_MASK; }
|
size_t degree_mask() const { return this->m_info & DEGREE_MASK; }
|
||||||
|
|
||||||
/*! Obtain the coefficients of the underlying conic.
|
/*! obtains the coefficients of the underlying conic.
|
||||||
*/
|
*/
|
||||||
const Integer& r() const { return ( this->m_r); }
|
const Integer& r() const { return ( this->m_r); }
|
||||||
const Integer& s() const { return ( this->m_s); }
|
const Integer& s() const { return ( this->m_s); }
|
||||||
|
|
@ -390,50 +390,50 @@ public:
|
||||||
const Integer& v() const { return ( this->m_v); }
|
const Integer& v() const { return ( this->m_v); }
|
||||||
const Integer& w() const { return ( this->m_w); }
|
const Integer& w() const { return ( this->m_w); }
|
||||||
|
|
||||||
/*! Obtain the left endpoint of the arc.
|
/*! obtains the left endpoint of the arc.
|
||||||
*/
|
*/
|
||||||
const Point_2& left() const {
|
const Point_2& left() const {
|
||||||
if (this->test_flag(IS_DIRECTED_RIGHT)) return this->source();
|
if (this->test_flag(IS_DIRECTED_RIGHT)) return this->source();
|
||||||
else return this->target();
|
else return this->target();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Obtain the right endpoint of the arc.
|
/*! obtains the right endpoint of the arc.
|
||||||
*/
|
*/
|
||||||
const Point_2& right() const {
|
const Point_2& right() const {
|
||||||
if (this->test_flag(IS_DIRECTED_RIGHT)) return this->target();
|
if (this->test_flag(IS_DIRECTED_RIGHT)) return this->target();
|
||||||
else return this->source();
|
else return this->source();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Determine whether the conic arc is directed iexicographically right.
|
/*! determines whether the conic arc is directed iexicographically right.
|
||||||
*/
|
*/
|
||||||
bool is_directed_right() const { return this->test_flag(IS_DIRECTED_RIGHT); }
|
bool is_directed_right() const { return this->test_flag(IS_DIRECTED_RIGHT); }
|
||||||
|
|
||||||
/*! Determine whether the conic arc is a vertical segment.
|
/*! determines whether the conic arc is a vertical segment.
|
||||||
*/
|
*/
|
||||||
bool is_vertical() const { return this->test_flag(IS_VERTICAL_SEGMENT); }
|
bool is_vertical() const { return this->test_flag(IS_VERTICAL_SEGMENT); }
|
||||||
|
|
||||||
/*! Determine whether the conic arc is a facing up.
|
/*! determines whether the conic arc is a facing up.
|
||||||
*/
|
*/
|
||||||
bool is_upper() const { return this->test_flag(FACING_UP); }
|
bool is_upper() const { return this->test_flag(FACING_UP); }
|
||||||
|
|
||||||
/*! Determine whether the conic arc is a facing down.
|
/*! determines whether the conic arc is a facing down.
|
||||||
*/
|
*/
|
||||||
bool is_lower() const { return this->test_flag(FACING_DOWN); }
|
bool is_lower() const { return this->test_flag(FACING_DOWN); }
|
||||||
|
|
||||||
/*! Check whether the arc is a special segment connecting two algebraic
|
/*! checks whether the arc is a special segment connecting two algebraic
|
||||||
* endpoints (and has no underlying integer conic coefficients).
|
* endpoints (and has no underlying integer conic coefficients).
|
||||||
*/
|
*/
|
||||||
bool is_special_segment() const { return this->test_flag(IS_SPECIAL_SEGMENT); }
|
bool is_special_segment() const { return this->test_flag(IS_SPECIAL_SEGMENT); }
|
||||||
|
|
||||||
/*! Obtain the mask of the DEGREE_1 flag.
|
/*! obtains the mask of the DEGREE_1 flag.
|
||||||
*/
|
*/
|
||||||
static constexpr size_t degree_1_mask() { return flag_mask(DEGREE_1); }
|
static constexpr size_t degree_1_mask() { return flag_mask(DEGREE_1); }
|
||||||
|
|
||||||
/*! Obtain the mask of the DEGREE_1 flag.
|
/*! obtains the mask of the DEGREE_1 flag.
|
||||||
*/
|
*/
|
||||||
static constexpr size_t degree_2_mask() { return flag_mask(DEGREE_2); }
|
static constexpr size_t degree_2_mask() { return flag_mask(DEGREE_2); }
|
||||||
|
|
||||||
/*! Obtain the algebraic coefficients.
|
/*! obtains the algebraic coefficients.
|
||||||
*/
|
*/
|
||||||
Algebraic alg_r() const { return m_alg_r; }
|
Algebraic alg_r() const { return m_alg_r; }
|
||||||
Algebraic alg_s() const { return m_alg_s; }
|
Algebraic alg_s() const { return m_alg_s; }
|
||||||
|
|
@ -442,11 +442,11 @@ public:
|
||||||
Algebraic alg_v() const { return m_alg_v; }
|
Algebraic alg_v() const { return m_alg_v; }
|
||||||
Algebraic alg_w() const { return m_alg_w; }
|
Algebraic alg_w() const { return m_alg_w; }
|
||||||
|
|
||||||
/*! Obtain the conic id.
|
/*! obtains the conic id.
|
||||||
*/
|
*/
|
||||||
Conic_id id() const { return m_id; }
|
Conic_id id() const { return m_id; }
|
||||||
|
|
||||||
/*! Check whether the given point lies on the arc.
|
/*! checks whether the given point lies on the arc.
|
||||||
* \param p The query point.
|
* \param p The query point.
|
||||||
* \param (true) if p lies on the arc; (false) otherwise.
|
* \param (true) if p lies on the arc; (false) otherwise.
|
||||||
*/
|
*/
|
||||||
|
|
@ -474,7 +474,7 @@ public:
|
||||||
return _is_between_endpoints(p);
|
return _is_between_endpoints(p);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Obtain a bounding box for the conic arc.
|
/*! obtains a bounding box for the conic arc.
|
||||||
* \return The bounding box.
|
* \return The bounding box.
|
||||||
*/
|
*/
|
||||||
CGAL_DEPRECATED Bbox_2 bbox() const { return Base::bbox(); }
|
CGAL_DEPRECATED Bbox_2 bbox() const { return Base::bbox(); }
|
||||||
|
|
@ -483,7 +483,7 @@ public:
|
||||||
// Setters
|
// Setters
|
||||||
//@{
|
//@{
|
||||||
|
|
||||||
/*! Set the algebraic coefficients.
|
/*! sets the algebraic coefficients.
|
||||||
*/
|
*/
|
||||||
void set_alg_coefficients(const Algebraic& alg_r, const Algebraic& alg_s,
|
void set_alg_coefficients(const Algebraic& alg_r, const Algebraic& alg_s,
|
||||||
const Algebraic& alg_t, const Algebraic& alg_u,
|
const Algebraic& alg_t, const Algebraic& alg_u,
|
||||||
|
|
@ -497,7 +497,7 @@ public:
|
||||||
m_alg_w = alg_w;
|
m_alg_w = alg_w;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Add a generating conic ID.
|
/*! adds a generating conic ID.
|
||||||
*/
|
*/
|
||||||
void set_generating_conic(const Conic_id& id) {
|
void set_generating_conic(const Conic_id& id) {
|
||||||
this->m_source.set_generating_conic(id);
|
this->m_source.set_generating_conic(id);
|
||||||
|
|
@ -505,7 +505,7 @@ public:
|
||||||
}
|
}
|
||||||
//@}
|
//@}
|
||||||
|
|
||||||
/*! Compute a point on an arc with the same \f$x\f$-coordiante as the given
|
/*! computes a point on an arc with the same \f$x\f$-coordiante as the given
|
||||||
* point.
|
* point.
|
||||||
* \param p The given point.
|
* \param p The given point.
|
||||||
* \pre The arc is not vertical and `p` is in the \f$x\f$-range of the arc.
|
* \pre The arc is not vertical and `p` is in the \f$x\f$-range of the arc.
|
||||||
|
|
@ -590,7 +590,7 @@ public:
|
||||||
/// \name Constructing points on the arc.
|
/// \name Constructing points on the arc.
|
||||||
//@{
|
//@{
|
||||||
|
|
||||||
/*! Obtain a polyline approximating the conic arc.
|
/*! obtains a polyline approximating the conic arc.
|
||||||
* \param n The maximal number of sample points.
|
* \param n The maximal number of sample points.
|
||||||
* \param oi An output iterator, whose value-type is pair<double,double>
|
* \param oi An output iterator, whose value-type is pair<double,double>
|
||||||
* (representing an approximated point).
|
* (representing an approximated point).
|
||||||
|
|
@ -659,7 +659,7 @@ public:
|
||||||
/// \name Constructing x-monotone arcs.
|
/// \name Constructing x-monotone arcs.
|
||||||
//@{
|
//@{
|
||||||
|
|
||||||
/*! Flip the arc.
|
/*! flips the arc.
|
||||||
* \return An arc with swapped source and target and a reverse orientation.
|
* \return An arc with swapped source and target and a reverse orientation.
|
||||||
*/
|
*/
|
||||||
Self flip() const {
|
Self flip() const {
|
||||||
|
|
@ -680,7 +680,7 @@ public:
|
||||||
return arc;
|
return arc;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Trim the arc given its new endpoints.
|
/*! trims the arc given its new endpoints.
|
||||||
* \param ps The new source point.
|
* \param ps The new source point.
|
||||||
* \param pt The new target point.
|
* \param pt The new target point.
|
||||||
* \return The new trimmed arc.
|
* \return The new trimmed arc.
|
||||||
|
|
@ -730,7 +730,7 @@ public:
|
||||||
|
|
||||||
//@}
|
//@}
|
||||||
|
|
||||||
/*! Compare two arcs immediately to the leftt of their intersection point.
|
/*! compares two arcs immediately to the leftt of their intersection point.
|
||||||
* \param xcv1 The first compared arc.
|
* \param xcv1 The first compared arc.
|
||||||
* \param xcv2 The second compared arc.
|
* \param xcv2 The second compared arc.
|
||||||
* \param p The reference intersection point.
|
* \param p The reference intersection point.
|
||||||
|
|
@ -855,7 +855,7 @@ public:
|
||||||
return slope_res;
|
return slope_res;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Compare two arcs immediately to the right of their intersection point.
|
/*! compares two arcs immediately to the right of their intersection point.
|
||||||
* \param xcv1 The first compared arc.
|
* \param xcv1 The first compared arc.
|
||||||
* \param xcv2 The second compared arc.
|
* \param xcv2 The second compared arc.
|
||||||
* \param p The reference intersection point.
|
* \param p The reference intersection point.
|
||||||
|
|
@ -972,7 +972,7 @@ public:
|
||||||
return slope_res; // both are facing down
|
return slope_res; // both are facing down
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Check whether two arcs are equal (have the same graph).
|
/*! checks whether two arcs are equal (have the same graph).
|
||||||
* \param xcv1 The first compared arc.
|
* \param xcv1 The first compared arc.
|
||||||
* \param xcv2 The second compared arc.
|
* \param xcv2 The second compared arc.
|
||||||
* \return `true` if the two arcs have the same graph; `false` otherwise.
|
* \return `true` if the two arcs have the same graph; `false` otherwise.
|
||||||
|
|
@ -1007,7 +1007,7 @@ public:
|
||||||
eq(xcv1.target(), xcv2.source()));
|
eq(xcv1.target(), xcv2.source()));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Check whether it is possible to merge the arc with the given arc.
|
/*! checks whether it is possible to merge the arc with the given arc.
|
||||||
* \param xcv1 The first arc.
|
* \param xcv1 The first arc.
|
||||||
* \param xcv2 The second arc.
|
* \param xcv2 The second arc.
|
||||||
* \return `true` if it is possible to merge the two arcs;
|
* \return `true` if it is possible to merge the two arcs;
|
||||||
|
|
@ -1028,7 +1028,7 @@ public:
|
||||||
return (eq(xcv1.right(), xcv2.left()) || eq(xcv1.left(), xcv2.right()));
|
return (eq(xcv1.right(), xcv2.left()) || eq(xcv1.left(), xcv2.right()));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Merge the current arc with the given arc.
|
/*! merges the current arc with the given arc.
|
||||||
* \param xcv1 The first arc to merge with.
|
* \param xcv1 The first arc to merge with.
|
||||||
* \param xcv2 The second arc to merge with.
|
* \param xcv2 The second arc to merge with.
|
||||||
* \pre The two arcs are mergeable.
|
* \pre The two arcs are mergeable.
|
||||||
|
|
@ -1060,7 +1060,7 @@ private:
|
||||||
/// \name Auxiliary (private) functions.
|
/// \name Auxiliary (private) functions.
|
||||||
//@{
|
//@{
|
||||||
|
|
||||||
/*! Check whether the given point lies on the supporting conic of the arc.
|
/*! checks whether the given point lies on the supporting conic of the arc.
|
||||||
* \param px The x-coordinate of query point.
|
* \param px The x-coordinate of query point.
|
||||||
* \param py The y-coordinate of query point.
|
* \param py The y-coordinate of query point.
|
||||||
* \return (true) if p lies on the supporting conic; (false) otherwise.
|
* \return (true) if p lies on the supporting conic; (false) otherwise.
|
||||||
|
|
@ -1078,7 +1078,7 @@ private:
|
||||||
}
|
}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/*! Obtain the i'th order derivative by x of the conic at the point p=(x,y).
|
/*! obtains the i'th order derivative by x of the conic at the point p=(x,y).
|
||||||
* \param p The point where we derive.
|
* \param p The point where we derive.
|
||||||
* \param i The order of the derivatives (either 1, 2 or 3).
|
* \param i The order of the derivatives (either 1, 2 or 3).
|
||||||
* \param slope_numer The numerator of the slope.
|
* \param slope_numer The numerator of the slope.
|
||||||
|
|
@ -1187,7 +1187,7 @@ public:
|
||||||
CGAL_error();
|
CGAL_error();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Obtain the i'th order derivative by y of the conic at the point p=(x,y).
|
/*! obtains the i'th order derivative by y of the conic at the point p=(x,y).
|
||||||
* \param p The point where we derive.
|
* \param p The point where we derive.
|
||||||
* \param i The order of the derivatives (either 1, 2 or 3).
|
* \param i The order of the derivatives (either 1, 2 or 3).
|
||||||
* \param slope_numer The numerator of the slope.
|
* \param slope_numer The numerator of the slope.
|
||||||
|
|
@ -1297,7 +1297,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/*! Compute the multiplicity of an intersection point.
|
/*! computes the multiplicity of an intersection point.
|
||||||
* \param arc The arc to intersect with.
|
* \param arc The arc to intersect with.
|
||||||
* \param p The intersection point.
|
* \param p The intersection point.
|
||||||
* \return The multiplicity of the intersection point.
|
* \return The multiplicity of the intersection point.
|
||||||
|
|
@ -1348,7 +1348,7 @@ private:
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/*! Exporter for x-monotone conic arcs.
|
/*! exports an x-monotone conic arc.
|
||||||
*/
|
*/
|
||||||
template <typename Conic_arc_2>
|
template <typename Conic_arc_2>
|
||||||
std::ostream& operator<<(std::ostream& os,
|
std::ostream& operator<<(std::ostream& os,
|
||||||
|
|
|
||||||
|
|
@ -42,19 +42,19 @@ private:
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
/*! Default constructor. */
|
/*! constructs default. */
|
||||||
_Unique_list () :
|
_Unique_list () :
|
||||||
m_list()
|
m_list()
|
||||||
{}
|
{}
|
||||||
|
|
||||||
/*! Construct a singleton list. */
|
/*! constructs a singleton list. */
|
||||||
_Unique_list (const Data& data) :
|
_Unique_list (const Data& data) :
|
||||||
m_list ()
|
m_list ()
|
||||||
{
|
{
|
||||||
m_list.push_back (data);
|
m_list.push_back (data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Go over the data objects in list. */
|
/*! traverses the data objects in list. */
|
||||||
const_iterator begin () const
|
const_iterator begin () const
|
||||||
{
|
{
|
||||||
return (m_list.begin());
|
return (m_list.begin());
|
||||||
|
|
@ -65,13 +65,13 @@ public:
|
||||||
return (m_list.end());
|
return (m_list.end());
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Get the list size. */
|
/*! obtains the list size. */
|
||||||
std::size_t size () const
|
std::size_t size () const
|
||||||
{
|
{
|
||||||
return (m_list.size());
|
return (m_list.size());
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Get the first (or last) data object. */
|
/*! obtains the first (or last) data object. */
|
||||||
const Data& front () const
|
const Data& front () const
|
||||||
{
|
{
|
||||||
return (m_list.front());
|
return (m_list.front());
|
||||||
|
|
@ -105,8 +105,7 @@ public:
|
||||||
return (true);
|
return (true);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*! finds the given data object is contained in the list.
|
||||||
* Find the given data object is contained in the list.
|
|
||||||
* \param data The data object.
|
* \param data The data object.
|
||||||
* \return An iterator for the data object, or end() if it is not found.
|
* \return An iterator for the data object, or end() if it is not found.
|
||||||
*/
|
*/
|
||||||
|
|
@ -123,8 +122,7 @@ public:
|
||||||
return (iter);
|
return (iter);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*! inserts an object into the list.
|
||||||
* Insert an object into the list.
|
|
||||||
* \param data The data object.
|
* \param data The data object.
|
||||||
* \return (true) if the data object has been successfully inserted;
|
* \return (true) if the data object has been successfully inserted;
|
||||||
* (false) otherwise (if it already exists).
|
* (false) otherwise (if it already exists).
|
||||||
|
|
@ -138,8 +136,7 @@ public:
|
||||||
return (true);
|
return (true);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*! erases an object from the list.
|
||||||
* Erase an object from the list.
|
|
||||||
* \param data The data object.
|
* \param data The data object.
|
||||||
* \return (true) if the data object has been successfully erased;
|
* \return (true) if the data object has been successfully erased;
|
||||||
* (false) otherwise (if it is not in the list).
|
* (false) otherwise (if it is not in the list).
|
||||||
|
|
@ -163,7 +160,7 @@ public:
|
||||||
return (false);
|
return (false);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Clear the list. */
|
/*! clears the list. */
|
||||||
void clear ()
|
void clear ()
|
||||||
{
|
{
|
||||||
m_list.clear();
|
m_list.clear();
|
||||||
|
|
|
||||||
|
|
@ -53,10 +53,10 @@ public:
|
||||||
typedef typename Subcurves_container::size_type Size;
|
typedef typename Subcurves_container::size_type Size;
|
||||||
typedef typename Subcurves_container::size_type size_type;
|
typedef typename Subcurves_container::size_type size_type;
|
||||||
|
|
||||||
/*! Construct default. */
|
/*! constructs default. */
|
||||||
Polycurve_2() : m_subcurves() {}
|
Polycurve_2() : m_subcurves() {}
|
||||||
|
|
||||||
/*! Construct from a subcurve. */
|
/*! constructs from a subcurve. */
|
||||||
Polycurve_2(const Subcurve_type_2& seg) : m_subcurves()
|
Polycurve_2(const Subcurve_type_2& seg) : m_subcurves()
|
||||||
{ m_subcurves.push_back(seg); }
|
{ m_subcurves.push_back(seg); }
|
||||||
|
|
||||||
|
|
@ -70,7 +70,7 @@ public:
|
||||||
* this class.
|
* this class.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*! Construct from a range. The range can be either:
|
/*! constructs from a range. The range can be either:
|
||||||
*
|
*
|
||||||
* For the sake of backwards compatibility we have to keep the possibility
|
* For the sake of backwards compatibility we have to keep the possibility
|
||||||
* of construction from a range of points. Therefore, we have to test the
|
* of construction from a range of points. Therefore, we have to test the
|
||||||
|
|
@ -100,7 +100,7 @@ public:
|
||||||
construct_polycurve(begin, end, Is_point());
|
construct_polycurve(begin, end, Is_point());
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Construct a polycurve from a range of subcurves.
|
/*! constructs a polycurve from a range of subcurves.
|
||||||
* \param begin An iterator pointing to the first subcurve in the range.
|
* \param begin An iterator pointing to the first subcurve in the range.
|
||||||
* \param end An iterator pointing after the past-the-end subcurve
|
* \param end An iterator pointing after the past-the-end subcurve
|
||||||
* in the range.
|
* in the range.
|
||||||
|
|
@ -111,7 +111,7 @@ public:
|
||||||
std::false_type)
|
std::false_type)
|
||||||
{ m_subcurves.assign(begin, end); }
|
{ m_subcurves.assign(begin, end); }
|
||||||
|
|
||||||
/*! Construct a polycurve from a range of points.
|
/*! constructs a polycurve from a range of points.
|
||||||
* \param begin An iterator pointing to the first point in the range.
|
* \param begin An iterator pointing to the first point in the range.
|
||||||
* \param end An iterator pointing after the last point in the range.
|
* \param end An iterator pointing after the last point in the range.
|
||||||
* \pre There are at least 2 points in the range.
|
* \pre There are at least 2 points in the range.
|
||||||
|
|
@ -150,7 +150,7 @@ public:
|
||||||
* becomes friendly...)
|
* becomes friendly...)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*! Append a subcurve to the (x-monotone) polycurve.
|
/*! appends a subcurve to the (x-monotone) polycurve.
|
||||||
* Warning: This is a risky function! Don't use it! Prefer the
|
* Warning: This is a risky function! Don't use it! Prefer the
|
||||||
* provided implementation in the traits class.
|
* provided implementation in the traits class.
|
||||||
* \param seg The new subcurve to be appended to the polycurve.
|
* \param seg The new subcurve to be appended to the polycurve.
|
||||||
|
|
@ -160,7 +160,7 @@ public:
|
||||||
inline void push_back(const Subcurve_type_2& seg)
|
inline void push_back(const Subcurve_type_2& seg)
|
||||||
{ this->m_subcurves.push_back(seg); }
|
{ this->m_subcurves.push_back(seg); }
|
||||||
|
|
||||||
/*! Append a subcurve to the (x-monotone) polycurve.
|
/*! appends a subcurve to the (x-monotone) polycurve.
|
||||||
* Warning: This is a risky function! Don't use it! Prefer the
|
* Warning: This is a risky function! Don't use it! Prefer the
|
||||||
* provided implementation in the traits class.
|
* provided implementation in the traits class.
|
||||||
* \param seg The new subcurve to be appended to the polycurve.
|
* \param seg The new subcurve to be appended to the polycurve.
|
||||||
|
|
@ -170,7 +170,7 @@ public:
|
||||||
inline void push_front(const Subcurve_type_2& seg)
|
inline void push_front(const Subcurve_type_2& seg)
|
||||||
{ this->m_subcurves.insert(this->m_subcurves.begin(), seg); }
|
{ this->m_subcurves.insert(this->m_subcurves.begin(), seg); }
|
||||||
|
|
||||||
/*! Append a point to the polycurve.
|
/*! appends a point to the polycurve.
|
||||||
* To properly implemented this function the traits class is needed,
|
* To properly implemented this function the traits class is needed,
|
||||||
* thus it is deprecated.
|
* thus it is deprecated.
|
||||||
*/
|
*/
|
||||||
|
|
@ -182,7 +182,7 @@ public:
|
||||||
m_subcurves.push_back(Subcurve_type_2(ps, pt));
|
m_subcurves.push_back(Subcurve_type_2(ps, pt));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Compute the bounding box of the polycurve.
|
/*! computes the bounding box of the polycurve.
|
||||||
* \return The bounding-box.
|
* \return The bounding-box.
|
||||||
*/
|
*/
|
||||||
Bbox_2 bbox() const
|
Bbox_2 bbox() const
|
||||||
|
|
@ -235,14 +235,14 @@ public:
|
||||||
{ return m_index != std::numeric_limits<size_type>::max BOOST_PREVENT_MACRO_SUBSTITUTION (); }
|
{ return m_index != std::numeric_limits<size_type>::max BOOST_PREVENT_MACRO_SUBSTITUTION (); }
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/*! Default constructor. */
|
/*! constructs default. */
|
||||||
Point_const_iterator() :
|
Point_const_iterator() :
|
||||||
m_cvP(nullptr),
|
m_cvP(nullptr),
|
||||||
m_num_pts(0),
|
m_num_pts(0),
|
||||||
m_index(std::numeric_limits<size_type>::max BOOST_PREVENT_MACRO_SUBSTITUTION ())
|
m_index(std::numeric_limits<size_type>::max BOOST_PREVENT_MACRO_SUBSTITUTION ())
|
||||||
{}
|
{}
|
||||||
|
|
||||||
/*! Dereference operator.
|
/*! dereferences.
|
||||||
* \return The current point.
|
* \return The current point.
|
||||||
*/
|
*/
|
||||||
const Point_type_2& operator*() const
|
const Point_type_2& operator*() const
|
||||||
|
|
@ -275,7 +275,7 @@ public:
|
||||||
return temp;
|
return temp;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Decrement operators. */
|
/*! decrements. */
|
||||||
Point_const_iterator& operator--()
|
Point_const_iterator& operator--()
|
||||||
{
|
{
|
||||||
if ((m_cvP != nullptr) && (is_index_valid())) --m_index;
|
if ((m_cvP != nullptr) && (is_index_valid())) --m_index;
|
||||||
|
|
@ -303,39 +303,39 @@ public:
|
||||||
typedef Point_const_iterator const_iterator;
|
typedef Point_const_iterator const_iterator;
|
||||||
typedef Point_const_reverse_iterator const_reverse_iterator;
|
typedef Point_const_reverse_iterator const_reverse_iterator;
|
||||||
|
|
||||||
/*! Obtain an iterator for the polycurve points.*/
|
/*! obtains an iterator for the polycurve points.*/
|
||||||
Point_const_iterator points_begin() const
|
Point_const_iterator points_begin() const
|
||||||
{
|
{
|
||||||
if (number_of_subcurves() == 0) return (Point_const_iterator());
|
if (number_of_subcurves() == 0) return (Point_const_iterator());
|
||||||
else return (Point_const_iterator(this, 0));
|
else return (Point_const_iterator(this, 0));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Obtain an iterator for the polycurve points.*/
|
/*! obtains an iterator for the polycurve points.*/
|
||||||
CGAL_DEPRECATED Point_const_iterator begin() const { return points_begin(); }
|
CGAL_DEPRECATED Point_const_iterator begin() const { return points_begin(); }
|
||||||
|
|
||||||
/*! Obtain a past-the-end iterator for the polycurve points.*/
|
/*! obtains a past-the-end iterator for the polycurve points.*/
|
||||||
Point_const_iterator points_end() const
|
Point_const_iterator points_end() const
|
||||||
{
|
{
|
||||||
if (number_of_subcurves() == 0) return (Point_const_iterator());
|
if (number_of_subcurves() == 0) return (Point_const_iterator());
|
||||||
else return (Point_const_iterator(this, number_of_subcurves() + 1));
|
else return (Point_const_iterator(this, number_of_subcurves() + 1));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Obtain a past-the-end iterator for the polycurve points.*/
|
/*! obtains a past-the-end iterator for the polycurve points.*/
|
||||||
CGAL_DEPRECATED Point_const_iterator end() const { return points_end(); }
|
CGAL_DEPRECATED Point_const_iterator end() const { return points_end(); }
|
||||||
|
|
||||||
/*! Obtain a reverse iterator for the polycurve points. */
|
/*! obtains a reverse iterator for the polycurve points. */
|
||||||
Point_const_reverse_iterator points_rbegin() const
|
Point_const_reverse_iterator points_rbegin() const
|
||||||
{ return Point_const_reverse_iterator(points_end()); }
|
{ return Point_const_reverse_iterator(points_end()); }
|
||||||
|
|
||||||
/*! Obtain a reverse iterator for the polycurve points. */
|
/*! obtains a reverse iterator for the polycurve points. */
|
||||||
CGAL_DEPRECATED Point_const_reverse_iterator rbegin() const
|
CGAL_DEPRECATED Point_const_reverse_iterator rbegin() const
|
||||||
{ return points_rbegin(); }
|
{ return points_rbegin(); }
|
||||||
|
|
||||||
/*! Obtain a reverse past-the-end iterator for the polycurve points. */
|
/*! obtains a reverse past-the-end iterator for the polycurve points. */
|
||||||
Point_const_reverse_iterator points_rend() const
|
Point_const_reverse_iterator points_rend() const
|
||||||
{ return Point_const_reverse_iterator(points_begin()); }
|
{ return Point_const_reverse_iterator(points_begin()); }
|
||||||
|
|
||||||
/*! Obtain a reverse past-the-end iterator for the polycurve points. */
|
/*! obtains a reverse past-the-end iterator for the polycurve points. */
|
||||||
CGAL_DEPRECATED Point_const_reverse_iterator rend() const
|
CGAL_DEPRECATED Point_const_reverse_iterator rend() const
|
||||||
{ return points_rend(); }
|
{ return points_rend(); }
|
||||||
|
|
||||||
|
|
@ -345,7 +345,7 @@ public:
|
||||||
typedef typename std::reverse_iterator<Subcurve_const_iterator>
|
typedef typename std::reverse_iterator<Subcurve_const_iterator>
|
||||||
Subcurve_const_reverse_iterator;
|
Subcurve_const_reverse_iterator;
|
||||||
|
|
||||||
/*! Obtain an iterator for the polycurve subcurves. */
|
/*! obtains an iterator for the polycurve subcurves. */
|
||||||
Subcurve_const_iterator subcurves_begin() const
|
Subcurve_const_iterator subcurves_begin() const
|
||||||
{ return m_subcurves.begin(); }
|
{ return m_subcurves.begin(); }
|
||||||
|
|
||||||
|
|
@ -353,7 +353,7 @@ public:
|
||||||
CGAL_DEPRECATED Subcurve_const_iterator begin_subcurves() const
|
CGAL_DEPRECATED Subcurve_const_iterator begin_subcurves() const
|
||||||
{ return subcurves_begin(); }
|
{ return subcurves_begin(); }
|
||||||
|
|
||||||
/*! Obtain a past-the-end iterator for the polycurve subcurves. */
|
/*! obtains a past-the-end iterator for the polycurve subcurves. */
|
||||||
Subcurve_const_iterator subcurves_end() const
|
Subcurve_const_iterator subcurves_end() const
|
||||||
{ return m_subcurves.end(); }
|
{ return m_subcurves.end(); }
|
||||||
|
|
||||||
|
|
@ -361,11 +361,11 @@ public:
|
||||||
CGAL_DEPRECATED Subcurve_const_iterator end_subcurves() const
|
CGAL_DEPRECATED Subcurve_const_iterator end_subcurves() const
|
||||||
{ return subcurves_end(); }
|
{ return subcurves_end(); }
|
||||||
|
|
||||||
/*! Obtain a reverse iterator for the polycurve subcurves. */
|
/*! obtains a reverse iterator for the polycurve subcurves. */
|
||||||
Subcurve_const_reverse_iterator subcurves_rbegin() const
|
Subcurve_const_reverse_iterator subcurves_rbegin() const
|
||||||
{ return (Subcurve_const_reverse_iterator(subcurves_end())); }
|
{ return (Subcurve_const_reverse_iterator(subcurves_end())); }
|
||||||
|
|
||||||
/*! Obtain a reverse past-the-end iterator for the polycurve points. */
|
/*! obtains a reverse past-the-end iterator for the polycurve points. */
|
||||||
Subcurve_const_reverse_iterator subcurves_rend() const
|
Subcurve_const_reverse_iterator subcurves_rend() const
|
||||||
{ return (Subcurve_const_reverse_iterator(subcurves_begin())); }
|
{ return (Subcurve_const_reverse_iterator(subcurves_begin())); }
|
||||||
|
|
||||||
|
|
@ -379,7 +379,7 @@ public:
|
||||||
CGAL_DEPRECATED std::size_t points() const
|
CGAL_DEPRECATED std::size_t points() const
|
||||||
{ return (number_of_subcurves() == 0) ? 0 : number_of_subcurves() + 1; }
|
{ return (number_of_subcurves() == 0) ? 0 : number_of_subcurves() + 1; }
|
||||||
|
|
||||||
/*! Obtain the number of subcurves that comprise the poyline.
|
/*! obtains the number of subcurves that comprise the poyline.
|
||||||
* \return The number of subcurves.
|
* \return The number of subcurves.
|
||||||
*/
|
*/
|
||||||
size_type number_of_subcurves() const
|
size_type number_of_subcurves() const
|
||||||
|
|
@ -388,7 +388,7 @@ public:
|
||||||
/*! Deprecated! Replaced by number_of_subcurves(). */
|
/*! Deprecated! Replaced by number_of_subcurves(). */
|
||||||
CGAL_DEPRECATED size_type size() const { return number_of_subcurves(); }
|
CGAL_DEPRECATED size_type size() const { return number_of_subcurves(); }
|
||||||
|
|
||||||
/*! Obtain the ith subcurve of the polycurve.
|
/*! obtains the ith subcurve of the polycurve.
|
||||||
* \param[in] i The subcurve index(from 0 to size()-1).
|
* \param[in] i The subcurve index(from 0 to size()-1).
|
||||||
* \return A const reference to the subcurve.
|
* \return A const reference to the subcurve.
|
||||||
*/
|
*/
|
||||||
|
|
@ -398,7 +398,7 @@ public:
|
||||||
return (m_subcurves[i]);
|
return (m_subcurves[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Clear the polycurve. */
|
/*! clears the polycurve. */
|
||||||
inline void clear() { m_subcurves.clear(); }
|
inline void clear() { m_subcurves.clear(); }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -416,13 +416,13 @@ public:
|
||||||
|
|
||||||
typedef Polycurve_2<Subcurve_type_2, Point_type_2> Base;
|
typedef Polycurve_2<Subcurve_type_2, Point_type_2> Base;
|
||||||
|
|
||||||
/*! Construct default. */
|
/*! constructs default. */
|
||||||
X_monotone_polycurve_2() : Base() {}
|
X_monotone_polycurve_2() : Base() {}
|
||||||
|
|
||||||
/*! Construct from a subcurve. */
|
/*! constructs from a subcurve. */
|
||||||
X_monotone_polycurve_2(Subcurve_type_2 seg) : Base(seg) {}
|
X_monotone_polycurve_2(Subcurve_type_2 seg) : Base(seg) {}
|
||||||
|
|
||||||
/*! Construct from a range.
|
/*! constructs from a range.
|
||||||
* Similar to the constructor of a general polycurve.
|
* Similar to the constructor of a general polycurve.
|
||||||
* Like in the case of general polycurve, for the sake of backwards
|
* Like in the case of general polycurve, for the sake of backwards
|
||||||
* compatibility we have to keep an implementation of construction
|
* compatibility we have to keep an implementation of construction
|
||||||
|
|
@ -437,7 +437,7 @@ public:
|
||||||
construct_x_monotone_polycurve(begin, end, Is_point());
|
construct_x_monotone_polycurve(begin, end, Is_point());
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Construct from a range of subcurves.
|
/*! constructs from a range of subcurves.
|
||||||
* This constructor is expected to be called only from the
|
* This constructor is expected to be called only from the
|
||||||
* traits class, after the input was verified there.
|
* traits class, after the input was verified there.
|
||||||
* \pre The range of subcurves form an x-monotone polycurve.
|
* \pre The range of subcurves form an x-monotone polycurve.
|
||||||
|
|
@ -447,7 +447,7 @@ public:
|
||||||
std::false_type)
|
std::false_type)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
/*! Construct from a range of points, defining the endpoints of the
|
/*! constructs from a range of points, defining the endpoints of the
|
||||||
* polycurve subcurves.
|
* polycurve subcurves.
|
||||||
*/
|
*/
|
||||||
template <typename InputIterator>
|
template <typename InputIterator>
|
||||||
|
|
@ -458,6 +458,7 @@ public:
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace polycurve
|
} // namespace polycurve
|
||||||
|
|
||||||
} //namespace CGAL
|
} //namespace CGAL
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -47,33 +47,33 @@ public:
|
||||||
typedef typename Base::Subcurve_const_reverse_iterator
|
typedef typename Base::Subcurve_const_reverse_iterator
|
||||||
Segment_const_reverse_iterator;
|
Segment_const_reverse_iterator;
|
||||||
|
|
||||||
/*! Construct default. */
|
/*! constructs default. */
|
||||||
Polyline_2() : Base() {}
|
Polyline_2() : Base() {}
|
||||||
|
|
||||||
/*! Construct from a subcurve. */
|
/*! constructs from a subcurve. */
|
||||||
Polyline_2(const Subcurve_type_2& subcurve) : Base(subcurve) {}
|
Polyline_2(const Subcurve_type_2& subcurve) : Base(subcurve) {}
|
||||||
|
|
||||||
/*! Construct from a range. */
|
/*! constructs from a range. */
|
||||||
template <typename InputIterator>
|
template <typename InputIterator>
|
||||||
Polyline_2(InputIterator begin, InputIterator end) : Base(begin, end) {}
|
Polyline_2(InputIterator begin, InputIterator end) : Base(begin, end) {}
|
||||||
|
|
||||||
/*! Obtain an iterator for the polycurve subcurves. */
|
/*! obtains an iterator for the polycurve subcurves. */
|
||||||
Segment_const_iterator begin_segments() const
|
Segment_const_iterator begin_segments() const
|
||||||
{ return this->subcurves_begin(); }
|
{ return this->subcurves_begin(); }
|
||||||
|
|
||||||
/*! Obtain a past-the-end iterator for the polycurve subcurves. */
|
/*! obtains a past-the-end iterator for the polycurve subcurves. */
|
||||||
Segment_const_iterator end_segments() const
|
Segment_const_iterator end_segments() const
|
||||||
{ return this->subcurves_end(); }
|
{ return this->subcurves_end(); }
|
||||||
|
|
||||||
/*! Obtain a reverse iterator for the polycurve subcurves. */
|
/*! obtains a reverse iterator for the polycurve subcurves. */
|
||||||
Segment_const_reverse_iterator rbegin_segments() const
|
Segment_const_reverse_iterator rbegin_segments() const
|
||||||
{ return this->subcurves_rbegin(); }
|
{ return this->subcurves_rbegin(); }
|
||||||
|
|
||||||
/*! Obtain a reverse past-the-end iterator for the polycurve points. */
|
/*! obtains a reverse past-the-end iterator for the polycurve points. */
|
||||||
Segment_const_reverse_iterator rend_segments() const
|
Segment_const_reverse_iterator rend_segments() const
|
||||||
{ return this->subcurves_rend() ; }
|
{ return this->subcurves_rend() ; }
|
||||||
|
|
||||||
/*! Obtain the number of subcurves that comprise the poyline.
|
/*! obtains the number of subcurves that comprise the poyline.
|
||||||
* \return The number of subcurves.
|
* \return The number of subcurves.
|
||||||
*/
|
*/
|
||||||
Segments_size_type number_of_segments() const
|
Segments_size_type number_of_segments() const
|
||||||
|
|
@ -96,13 +96,13 @@ public:
|
||||||
typedef typename Base::Subcurve_const_reverse_iterator
|
typedef typename Base::Subcurve_const_reverse_iterator
|
||||||
Segment_const_reverse_iterator;
|
Segment_const_reverse_iterator;
|
||||||
|
|
||||||
/*! Construct default. */
|
/*! constructs default. */
|
||||||
X_monotone_polyline_2() : Base() {}
|
X_monotone_polyline_2() : Base() {}
|
||||||
|
|
||||||
/*! Construct from a subcurve. */
|
/*! constructs from a subcurve. */
|
||||||
X_monotone_polyline_2(Subcurve_type_2 seg) : Base(seg) {}
|
X_monotone_polyline_2(Subcurve_type_2 seg) : Base(seg) {}
|
||||||
|
|
||||||
/*! Construct from a range.
|
/*! constructs from a range.
|
||||||
* Similar to the constructor of a general polycurve.
|
* Similar to the constructor of a general polycurve.
|
||||||
* Like in the case of general polycurve, for the sake of backwards
|
* Like in the case of general polycurve, for the sake of backwards
|
||||||
* compatibility we have to keep an implementation of construction
|
* compatibility we have to keep an implementation of construction
|
||||||
|
|
@ -113,23 +113,23 @@ public:
|
||||||
Base(begin, end)
|
Base(begin, end)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
/*! Obtain an iterator for the polycurve subcurves. */
|
/*! obtains an iterator for the polycurve subcurves. */
|
||||||
Segment_const_iterator begin_segments() const
|
Segment_const_iterator begin_segments() const
|
||||||
{ return this->subcurves_begin(); }
|
{ return this->subcurves_begin(); }
|
||||||
|
|
||||||
/*! Obtain a past-the-end iterator for the polycurve subcurves. */
|
/*! obtains a past-the-end iterator for the polycurve subcurves. */
|
||||||
Segment_const_iterator end_segments() const
|
Segment_const_iterator end_segments() const
|
||||||
{ return this->subcurves_end(); }
|
{ return this->subcurves_end(); }
|
||||||
|
|
||||||
/*! Obtain a reverse iterator for the polycurve subcurves. */
|
/*! obtains a reverse iterator for the polycurve subcurves. */
|
||||||
Segment_const_reverse_iterator rbegin_segments() const
|
Segment_const_reverse_iterator rbegin_segments() const
|
||||||
{ return this->subcurves_rbegin(); }
|
{ return this->subcurves_rbegin(); }
|
||||||
|
|
||||||
/*! Obtain a reverse past-the-end iterator for the polycurve points. */
|
/*! obtains a reverse past-the-end iterator for the polycurve points. */
|
||||||
Segment_const_reverse_iterator rend_segments() const
|
Segment_const_reverse_iterator rend_segments() const
|
||||||
{ return this->subcurves_rend() ; }
|
{ return this->subcurves_rend() ; }
|
||||||
|
|
||||||
/*! Obtain the number of subcurves that comprise the poyline.
|
/*! obtains the number of subcurves that comprise the poyline.
|
||||||
* \return The number of subcurves.
|
* \return The number of subcurves.
|
||||||
*/
|
*/
|
||||||
Segments_size_type number_of_segments() const
|
Segments_size_type number_of_segments() const
|
||||||
|
|
|
||||||
|
|
@ -98,15 +98,13 @@ public:
|
||||||
/// \name Construction methods.
|
/// \name Construction methods.
|
||||||
//@{
|
//@{
|
||||||
|
|
||||||
/*!
|
/*! constructs default.
|
||||||
* Default constructor.
|
|
||||||
*/
|
*/
|
||||||
_Base_rational_arc_2 () :
|
_Base_rational_arc_2 () :
|
||||||
_info (0)
|
_info (0)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
/*!
|
/*! constructs a whole polynomial curve.
|
||||||
* Constructor of a whole polynomial curve.
|
|
||||||
* \param pcoeffs The rational coefficients of the polynomial p(x).
|
* \param pcoeffs The rational coefficients of the polynomial p(x).
|
||||||
*/
|
*/
|
||||||
_Base_rational_arc_2 (const Rat_vector& pcoeffs) :
|
_Base_rational_arc_2 (const Rat_vector& pcoeffs) :
|
||||||
|
|
@ -178,8 +176,7 @@ public:
|
||||||
_info = (_info | IS_VALID);
|
_info = (_info | IS_VALID);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*! constructs a polynomial ray, defined by y = p(x), for x_s <= x if the
|
||||||
* Constructor of a polynomial ray, defined by y = p(x), for x_s <= x if the
|
|
||||||
* ray is directed to the right, or for x_s >= x if it is directed to the
|
* ray is directed to the right, or for x_s >= x if it is directed to the
|
||||||
* left.
|
* left.
|
||||||
* \param pcoeffs The rational coefficients of the polynomial p(x).
|
* \param pcoeffs The rational coefficients of the polynomial p(x).
|
||||||
|
|
@ -266,8 +263,7 @@ public:
|
||||||
_info = (_info | IS_VALID);
|
_info = (_info | IS_VALID);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*! constructs a polynomial arc, defined by y = p(x), x_min <= x <= x_max.
|
||||||
* Constructor of a polynomial arc, defined by y = p(x), x_min <= x <= x_max.
|
|
||||||
* \param pcoeffs The rational coefficients of the polynomial p(x).
|
* \param pcoeffs The rational coefficients of the polynomial p(x).
|
||||||
* \param x_s The x-coordinate of the source point.
|
* \param x_s The x-coordinate of the source point.
|
||||||
* \param x_t The x-coordinate of the target point.
|
* \param x_t The x-coordinate of the target point.
|
||||||
|
|
@ -313,8 +309,7 @@ public:
|
||||||
_info = (_info | IS_VALID);
|
_info = (_info | IS_VALID);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*! constructs a polynomial function, defined by y = p(x)/q(x) for any x.
|
||||||
* Constructor of a polynomial function, defined by y = p(x)/q(x) for any x.
|
|
||||||
* \param pcoeffs The rational coefficients of the polynomial p(x).
|
* \param pcoeffs The rational coefficients of the polynomial p(x).
|
||||||
* \param qcoeffs The rational coefficients of the polynomial q(x).
|
* \param qcoeffs The rational coefficients of the polynomial q(x).
|
||||||
*/
|
*/
|
||||||
|
|
@ -368,8 +363,7 @@ public:
|
||||||
(IS_CONTINUOUS | IS_VALID) : IS_VALID ) );
|
(IS_CONTINUOUS | IS_VALID) : IS_VALID ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*! constructs a ray of a rational function, defined by y = p(x)/q(x),
|
||||||
* Constructor of a ray of a rational function, defined by y = p(x)/q(x),
|
|
||||||
* for x_s <= x if the ray is directed to the right, or for x_s >= x if it
|
* for x_s <= x if the ray is directed to the right, or for x_s >= x if it
|
||||||
* is directed to the left.
|
* is directed to the left.
|
||||||
* \param pcoeffs The rational coefficients of the polynomial p(x).
|
* \param pcoeffs The rational coefficients of the polynomial p(x).
|
||||||
|
|
@ -461,8 +455,7 @@ public:
|
||||||
(IS_CONTINUOUS | IS_VALID) : IS_VALID ) );
|
(IS_CONTINUOUS | IS_VALID) : IS_VALID ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*! constructs a bounded rational arc, defined by y = p(x)/q(x),
|
||||||
* Constructor of a bounded rational arc, defined by y = p(x)/q(x),
|
|
||||||
* where: x_min <= x <= x_max.
|
* where: x_min <= x <= x_max.
|
||||||
* \param pcoeffs The rational coefficients of the polynomial p(x).
|
* \param pcoeffs The rational coefficients of the polynomial p(x).
|
||||||
* \param qcoeffs The rational coefficients of the polynomial q(x).
|
* \param qcoeffs The rational coefficients of the polynomial q(x).
|
||||||
|
|
@ -550,19 +543,19 @@ public:
|
||||||
/// \name Accessing the arc properties.
|
/// \name Accessing the arc properties.
|
||||||
//@{
|
//@{
|
||||||
|
|
||||||
/*! Get the numerator polynomial of the underlying rational function. */
|
/*! obtains the numerator polynomial of the underlying rational function. */
|
||||||
const Polynomial& numerator () const
|
const Polynomial& numerator () const
|
||||||
{
|
{
|
||||||
return (_numer);
|
return (_numer);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Get the denominator polynomial of the underlying rational function. */
|
/*! obtains the denominator polynomial of the underlying rational function. */
|
||||||
const Polynomial& denominator () const
|
const Polynomial& denominator () const
|
||||||
{
|
{
|
||||||
return (_denom);
|
return (_denom);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Check if the x-coordinate of the source point is infinite. */
|
/*! checks if the x-coordinate of the source point is infinite. */
|
||||||
Arr_parameter_space source_infinite_in_x () const
|
Arr_parameter_space source_infinite_in_x () const
|
||||||
{
|
{
|
||||||
return
|
return
|
||||||
|
|
@ -571,7 +564,7 @@ public:
|
||||||
ARR_INTERIOR;
|
ARR_INTERIOR;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Check if the y-coordinate of the source point is infinite. */
|
/*! checks if the y-coordinate of the source point is infinite. */
|
||||||
Arr_parameter_space source_infinite_in_y () const
|
Arr_parameter_space source_infinite_in_y () const
|
||||||
{
|
{
|
||||||
return
|
return
|
||||||
|
|
@ -580,7 +573,7 @@ public:
|
||||||
ARR_INTERIOR;
|
ARR_INTERIOR;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Check if the x-coordinate of the target point is infinite. */
|
/*! checks if the x-coordinate of the target point is infinite. */
|
||||||
Arr_parameter_space target_infinite_in_x () const
|
Arr_parameter_space target_infinite_in_x () const
|
||||||
{
|
{
|
||||||
return
|
return
|
||||||
|
|
@ -589,7 +582,7 @@ public:
|
||||||
ARR_INTERIOR;
|
ARR_INTERIOR;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Check if the y-coordinate of the target point is infinite. */
|
/*! checks if the y-coordinate of the target point is infinite. */
|
||||||
Arr_parameter_space target_infinite_in_y () const
|
Arr_parameter_space target_infinite_in_y () const
|
||||||
{
|
{
|
||||||
return
|
return
|
||||||
|
|
@ -598,7 +591,7 @@ public:
|
||||||
ARR_INTERIOR;
|
ARR_INTERIOR;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Get the source point. */
|
/*! obtains the source point. */
|
||||||
const Point_2& source () const
|
const Point_2& source () const
|
||||||
{
|
{
|
||||||
CGAL_precondition ((_info & IS_VALID) != 0 &&
|
CGAL_precondition ((_info & IS_VALID) != 0 &&
|
||||||
|
|
@ -607,7 +600,7 @@ public:
|
||||||
return (_ps);
|
return (_ps);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Get the x-coordinate of the source point. */
|
/*! obtains the x-coordinate of the source point. */
|
||||||
Algebraic source_x () const
|
Algebraic source_x () const
|
||||||
{
|
{
|
||||||
CGAL_precondition ((_info & IS_VALID) != 0 &&
|
CGAL_precondition ((_info & IS_VALID) != 0 &&
|
||||||
|
|
@ -615,7 +608,7 @@ public:
|
||||||
return (_ps.x());
|
return (_ps.x());
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Get the y-coordinate of the source point. */
|
/*! obtains the y-coordinate of the source point. */
|
||||||
Algebraic source_y () const
|
Algebraic source_y () const
|
||||||
{
|
{
|
||||||
CGAL_precondition ((_info & IS_VALID) != 0 &&
|
CGAL_precondition ((_info & IS_VALID) != 0 &&
|
||||||
|
|
@ -623,7 +616,7 @@ public:
|
||||||
return (_ps.y());
|
return (_ps.y());
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Get the target point. */
|
/*! obtains the target point. */
|
||||||
const Point_2& target () const
|
const Point_2& target () const
|
||||||
{
|
{
|
||||||
CGAL_precondition ((_info & IS_VALID) != 0 &&
|
CGAL_precondition ((_info & IS_VALID) != 0 &&
|
||||||
|
|
@ -632,7 +625,7 @@ public:
|
||||||
return (_pt);
|
return (_pt);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Get the x-coordinate of the target point. */
|
/*! obtains the x-coordinate of the target point. */
|
||||||
Algebraic target_x () const
|
Algebraic target_x () const
|
||||||
{
|
{
|
||||||
CGAL_precondition ((_info & IS_VALID) != 0 &&
|
CGAL_precondition ((_info & IS_VALID) != 0 &&
|
||||||
|
|
@ -640,7 +633,7 @@ public:
|
||||||
return (_pt.x());
|
return (_pt.x());
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Get the y-coordinate of the target point. */
|
/*! obtains the y-coordinate of the target point. */
|
||||||
Algebraic target_y () const
|
Algebraic target_y () const
|
||||||
{
|
{
|
||||||
CGAL_precondition ((_info & IS_VALID) != 0 &&
|
CGAL_precondition ((_info & IS_VALID) != 0 &&
|
||||||
|
|
@ -648,35 +641,35 @@ public:
|
||||||
return (_pt.y());
|
return (_pt.y());
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Check if the x-coordinate of the left point is infinite. */
|
/*! checks if the x-coordinate of the left point is infinite. */
|
||||||
Arr_parameter_space left_infinite_in_x () const
|
Arr_parameter_space left_infinite_in_x () const
|
||||||
{
|
{
|
||||||
return ((_info & IS_DIRECTED_RIGHT) != 0) ?
|
return ((_info & IS_DIRECTED_RIGHT) != 0) ?
|
||||||
source_infinite_in_x() : target_infinite_in_x();
|
source_infinite_in_x() : target_infinite_in_x();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Check if the y-coordinate of the left point is infinite. */
|
/*! checks if the y-coordinate of the left point is infinite. */
|
||||||
Arr_parameter_space left_infinite_in_y () const
|
Arr_parameter_space left_infinite_in_y () const
|
||||||
{
|
{
|
||||||
return ((_info & IS_DIRECTED_RIGHT) != 0) ?
|
return ((_info & IS_DIRECTED_RIGHT) != 0) ?
|
||||||
source_infinite_in_y() : target_infinite_in_y();
|
source_infinite_in_y() : target_infinite_in_y();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Check if the x-coordinate of the right point is infinite. */
|
/*! checks if the x-coordinate of the right point is infinite. */
|
||||||
Arr_parameter_space right_infinite_in_x () const
|
Arr_parameter_space right_infinite_in_x () const
|
||||||
{
|
{
|
||||||
return ((_info & IS_DIRECTED_RIGHT) != 0) ?
|
return ((_info & IS_DIRECTED_RIGHT) != 0) ?
|
||||||
target_infinite_in_x() : source_infinite_in_x();
|
target_infinite_in_x() : source_infinite_in_x();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Check if the y-coordinate of the right point is infinite. */
|
/*! checks if the y-coordinate of the right point is infinite. */
|
||||||
Arr_parameter_space right_infinite_in_y () const
|
Arr_parameter_space right_infinite_in_y () const
|
||||||
{
|
{
|
||||||
return ((_info & IS_DIRECTED_RIGHT) != 0) ?
|
return ((_info & IS_DIRECTED_RIGHT) != 0) ?
|
||||||
target_infinite_in_y() : source_infinite_in_y();
|
target_infinite_in_y() : source_infinite_in_y();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Get the left endpoint. */
|
/*! obtains the left endpoint. */
|
||||||
const Point_2& left () const
|
const Point_2& left () const
|
||||||
{
|
{
|
||||||
CGAL_precondition (left_infinite_in_x() == ARR_INTERIOR &&
|
CGAL_precondition (left_infinite_in_x() == ARR_INTERIOR &&
|
||||||
|
|
@ -684,7 +677,7 @@ public:
|
||||||
return ((_info & IS_DIRECTED_RIGHT) ? _ps : _pt);
|
return ((_info & IS_DIRECTED_RIGHT) ? _ps : _pt);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Get the right endpoint. */
|
/*! obtains the right endpoint. */
|
||||||
const Point_2& right () const
|
const Point_2& right () const
|
||||||
{
|
{
|
||||||
CGAL_precondition (right_infinite_in_x() == ARR_INTERIOR &&
|
CGAL_precondition (right_infinite_in_x() == ARR_INTERIOR &&
|
||||||
|
|
@ -692,19 +685,19 @@ public:
|
||||||
return ((_info & IS_DIRECTED_RIGHT) ? _pt : _ps);
|
return ((_info & IS_DIRECTED_RIGHT) ? _pt : _ps);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Check if the arc is valid. */
|
/*! checks if the arc is valid. */
|
||||||
bool is_valid () const
|
bool is_valid () const
|
||||||
{
|
{
|
||||||
return ((_info & IS_VALID) != 0);
|
return ((_info & IS_VALID) != 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Check if the arc is continuous. */
|
/*! checks if the arc is continuous. */
|
||||||
bool is_continuous () const
|
bool is_continuous () const
|
||||||
{
|
{
|
||||||
return ((_info & IS_CONTINUOUS) != 0);
|
return ((_info & IS_CONTINUOUS) != 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Check if the arc is directed right. */
|
/*! checks if the arc is directed right. */
|
||||||
bool is_directed_right () const
|
bool is_directed_right () const
|
||||||
{
|
{
|
||||||
return ((_info & IS_DIRECTED_RIGHT) != 0);
|
return ((_info & IS_DIRECTED_RIGHT) != 0);
|
||||||
|
|
@ -714,20 +707,19 @@ public:
|
||||||
/// \name Modifiers.
|
/// \name Modifiers.
|
||||||
//@{
|
//@{
|
||||||
|
|
||||||
/*! Mark the arc as being continuous. */
|
/*! marks the arc as being continuous. */
|
||||||
void set_continuous ()
|
void set_continuous ()
|
||||||
{
|
{
|
||||||
_info = (_info | IS_CONTINUOUS);
|
_info = (_info | IS_CONTINUOUS);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Mark the arc as being invalid. */
|
/*! marks the arc as being invalid. */
|
||||||
void set_invalid ()
|
void set_invalid ()
|
||||||
{
|
{
|
||||||
_info = (_info & ~IS_VALID);
|
_info = (_info & ~IS_VALID);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*! splits the arc into two at a given pole. The function returns the sub-arc
|
||||||
* Split the arc into two at a given pole. The function returns the sub-arc
|
|
||||||
* to the left of the pole and sets (*this) to be the right sub-arc.
|
* to the left of the pole and sets (*this) to be the right sub-arc.
|
||||||
* \param x0 The x-coordinate of the pole.
|
* \param x0 The x-coordinate of the pole.
|
||||||
* \pre x0 lies in the interior of the arc.
|
* \pre x0 lies in the interior of the arc.
|
||||||
|
|
@ -791,8 +783,7 @@ public:
|
||||||
/// \name Predicates.
|
/// \name Predicates.
|
||||||
//@{
|
//@{
|
||||||
|
|
||||||
/*!
|
/*! obtains the relative position of the point with respect to the rational arc.
|
||||||
* Get the relative position of the point with respect to the rational arc.
|
|
||||||
* \param p The query point.
|
* \param p The query point.
|
||||||
* \pre p is in the x-range of the arc.
|
* \pre p is in the x-range of the arc.
|
||||||
* \return SMALLER if the point is below the arc;
|
* \return SMALLER if the point is below the arc;
|
||||||
|
|
@ -816,8 +807,7 @@ public:
|
||||||
return (CGAL::compare (p.y(), y));
|
return (CGAL::compare (p.y(), y));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*! compares the x-coordinate of a vertical asymptote of the arc (one of its
|
||||||
* Compare the x-coordinate of a vertical asymptote of the arc (one of its
|
|
||||||
* ends) and the given point.
|
* ends) and the given point.
|
||||||
*/
|
*/
|
||||||
Comparison_result compare_end (const Point_2& p,
|
Comparison_result compare_end (const Point_2& p,
|
||||||
|
|
@ -852,8 +842,7 @@ public:
|
||||||
return ((ce == ARR_MIN_END) ? SMALLER : LARGER);
|
return ((ce == ARR_MIN_END) ? SMALLER : LARGER);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*! compares the x-coordinate of a vertical asymptotes of the two arcs.
|
||||||
* Compare the x-coordinate of a vertical asymptotes of the two arcs.
|
|
||||||
*/
|
*/
|
||||||
Comparison_result compare_ends (Arr_curve_end ind1,
|
Comparison_result compare_ends (Arr_curve_end ind1,
|
||||||
const Self& arc, Arr_curve_end ind2) const
|
const Self& arc, Arr_curve_end ind2) const
|
||||||
|
|
@ -1021,8 +1010,7 @@ public:
|
||||||
return (val_res);
|
return (val_res);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*! compares the slopes of the arc with another given arc at their given
|
||||||
* Compare the slopes of the arc with another given arc at their given
|
|
||||||
* intersection point.
|
* intersection point.
|
||||||
* \param cv The given arc.
|
* \param cv The given arc.
|
||||||
* \param p The intersection point.
|
* \param p The intersection point.
|
||||||
|
|
@ -1106,8 +1094,7 @@ public:
|
||||||
return (EQUAL);
|
return (EQUAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*! compares the two arcs at x = -oo.
|
||||||
* Compare the two arcs at x = -oo.
|
|
||||||
* \param arc The given arc.
|
* \param arc The given arc.
|
||||||
* \pre Both arcs have a left end which is unbounded in x.
|
* \pre Both arcs have a left end which is unbounded in x.
|
||||||
* \return SMALLER if (*this) lies below the other arc;
|
* \return SMALLER if (*this) lies below the other arc;
|
||||||
|
|
@ -1162,8 +1149,7 @@ public:
|
||||||
return (flip_res ? SMALLER : LARGER);
|
return (flip_res ? SMALLER : LARGER);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*! compares the two arcs at x = +oo.
|
||||||
* Compare the two arcs at x = +oo.
|
|
||||||
* \param arc The given arc.
|
* \param arc The given arc.
|
||||||
* \pre Both arcs are have a right end which is unbounded in x.
|
* \pre Both arcs are have a right end which is unbounded in x.
|
||||||
* \return SMALLER if (*this) lies below the other arc;
|
* \return SMALLER if (*this) lies below the other arc;
|
||||||
|
|
@ -1218,8 +1204,7 @@ public:
|
||||||
return (flip_res ? SMALLER : LARGER);
|
return (flip_res ? SMALLER : LARGER);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*! checks whether the two arcs are equal (have the same graph).
|
||||||
* Check whether the two arcs are equal (have the same graph).
|
|
||||||
* \param arc The compared arc.
|
* \param arc The compared arc.
|
||||||
* \return (true) if the two arcs have the same graph; (false) otherwise.
|
* \return (true) if the two arcs have the same graph; (false) otherwise.
|
||||||
*/
|
*/
|
||||||
|
|
@ -1276,8 +1261,7 @@ public:
|
||||||
return (true);
|
return (true);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*! checks whether it is possible to merge the arc with the given arc.
|
||||||
* Check whether it is possible to merge the arc with the given arc.
|
|
||||||
* \param arc The query arc.
|
* \param arc The query arc.
|
||||||
* \return (true) if it is possible to merge the two arcs;
|
* \return (true) if it is possible to merge the two arcs;
|
||||||
* (false) otherwise.
|
* (false) otherwise.
|
||||||
|
|
@ -1311,8 +1295,7 @@ public:
|
||||||
/// \name Constructions of points and curves.
|
/// \name Constructions of points and curves.
|
||||||
//@{
|
//@{
|
||||||
|
|
||||||
/*!
|
/*! flips the arc (swap its source and target).
|
||||||
* Flip the arc (swap its source and target).
|
|
||||||
* \return The flipped arc.
|
* \return The flipped arc.
|
||||||
*/
|
*/
|
||||||
Self flip () const
|
Self flip () const
|
||||||
|
|
@ -1341,8 +1324,7 @@ public:
|
||||||
return (arc);
|
return (arc);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*! prints the rational arc.
|
||||||
* Print the rational arc.
|
|
||||||
*/
|
*/
|
||||||
std::ostream& print (std::ostream& os) const
|
std::ostream& print (std::ostream& os) const
|
||||||
{
|
{
|
||||||
|
|
@ -1386,8 +1368,7 @@ protected:
|
||||||
/// \name Auxiliary (protected) functions.
|
/// \name Auxiliary (protected) functions.
|
||||||
//@{
|
//@{
|
||||||
|
|
||||||
/*!
|
/*! checks if the given x-value is in the x-range of the arc.
|
||||||
* Check if the given x-value is in the x-range of the arc.
|
|
||||||
* \param x The x-value.
|
* \param x The x-value.
|
||||||
* \param eq_src Output: Is this value equal to the x-coordinate of the
|
* \param eq_src Output: Is this value equal to the x-coordinate of the
|
||||||
* source point.
|
* source point.
|
||||||
|
|
@ -1470,8 +1451,7 @@ protected:
|
||||||
return (true);
|
return (true);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*! checks if the given x-value is in the x-range of the arc, excluding its
|
||||||
* Check if the given x-value is in the x-range of the arc, excluding its
|
|
||||||
* open ends.
|
* open ends.
|
||||||
*/
|
*/
|
||||||
bool _is_in_true_x_range (const Algebraic& x) const
|
bool _is_in_true_x_range (const Algebraic& x) const
|
||||||
|
|
@ -1494,8 +1474,7 @@ protected:
|
||||||
return (true);
|
return (true);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*! checks if the underlying rational function is the same in the given arc.
|
||||||
* Check if the underlying rational function is the same in the given arc.
|
|
||||||
* \param arc The given arc.
|
* \param arc The given arc.
|
||||||
* \return (true) if arc's underlying rational function is the same
|
* \return (true) if arc's underlying rational function is the same
|
||||||
* as of *this; (false) otherwise.
|
* as of *this; (false) otherwise.
|
||||||
|
|
@ -1506,8 +1485,7 @@ protected:
|
||||||
return (_numer * arc._denom == _denom * arc._numer);
|
return (_numer * arc._denom == _denom * arc._numer);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*! computes the sign of the given polynomial at x = -oo.
|
||||||
* Compute the sign of the given polynomial at x = -oo.
|
|
||||||
*/
|
*/
|
||||||
CGAL::Sign _sign_at_minus_infinity (const Polynomial& poly) const
|
CGAL::Sign _sign_at_minus_infinity (const Polynomial& poly) const
|
||||||
{
|
{
|
||||||
|
|
@ -1531,8 +1509,7 @@ protected:
|
||||||
return ((lead_sign == CGAL::POSITIVE) ? CGAL::NEGATIVE : CGAL::POSITIVE);
|
return ((lead_sign == CGAL::POSITIVE) ? CGAL::NEGATIVE : CGAL::POSITIVE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*! computes the sign of the given polynomial at x = +oo.
|
||||||
* Compute the sign of the given polynomial at x = +oo.
|
|
||||||
*/
|
*/
|
||||||
CGAL::Sign _sign_at_plus_infinity (const Polynomial& poly) const
|
CGAL::Sign _sign_at_plus_infinity (const Polynomial& poly) const
|
||||||
{
|
{
|
||||||
|
|
@ -1548,8 +1525,7 @@ protected:
|
||||||
return (CGAL::sign (nt_traits.get_coefficient (poly, degree)));
|
return (CGAL::sign (nt_traits.get_coefficient (poly, degree)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*! computes infinity type of the rational function P(x)/Q(x) at x = -oo.
|
||||||
* Compute infinity type of the rational function P(x)/Q(x) at x = -oo.
|
|
||||||
* \param y Output: The value of the horizontal asymptote (if exists).
|
* \param y Output: The value of the horizontal asymptote (if exists).
|
||||||
* \return The infinity type for the y-coordinate at x = -oo.
|
* \return The infinity type for the y-coordinate at x = -oo.
|
||||||
*/
|
*/
|
||||||
|
|
@ -1588,8 +1564,7 @@ protected:
|
||||||
((def_diff % 2 == 0) ? ARR_BOTTOM_BOUNDARY : ARR_TOP_BOUNDARY);
|
((def_diff % 2 == 0) ? ARR_BOTTOM_BOUNDARY : ARR_TOP_BOUNDARY);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*! computes infinity type of the rational function P(x)/Q(x) at x = +oo.
|
||||||
* Compute infinity type of the rational function P(x)/Q(x) at x = +oo.
|
|
||||||
* \param y Output: The value of the horizontal asymptote (if exists).
|
* \param y Output: The value of the horizontal asymptote (if exists).
|
||||||
* \return The infinity type for the y-coordinate at x = +oo.
|
* \return The infinity type for the y-coordinate at x = +oo.
|
||||||
*/
|
*/
|
||||||
|
|
@ -1625,8 +1600,7 @@ protected:
|
||||||
ARR_TOP_BOUNDARY : ARR_BOTTOM_BOUNDARY;
|
ARR_TOP_BOUNDARY : ARR_BOTTOM_BOUNDARY;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*! computes all zeros of the denominator polynomial that lie within the
|
||||||
* Compute all zeros of the denominator polynomial that lie within the
|
|
||||||
* x-range of the arc.
|
* x-range of the arc.
|
||||||
*/
|
*/
|
||||||
template <class OutputIterator>
|
template <class OutputIterator>
|
||||||
|
|
@ -1673,7 +1647,7 @@ protected:
|
||||||
return (oi);
|
return (oi);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Check whether the arc is continuous. */
|
/*! checks whether the arc is continuous. */
|
||||||
bool _is_continuous ()
|
bool _is_continuous ()
|
||||||
{
|
{
|
||||||
// Compute the roots of the denominator polynomial, and make sure
|
// Compute the roots of the denominator polynomial, and make sure
|
||||||
|
|
@ -1687,8 +1661,7 @@ protected:
|
||||||
return (q_roots.empty());
|
return (q_roots.empty());
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*! determines the signs of the rational functions infinitisimally to the left
|
||||||
* Determine the signs of the rational functions infinitisimally to the left
|
|
||||||
* and to the right of the given pole.
|
* and to the right of the given pole.
|
||||||
* \param x0 The x-coordinate of the pole.
|
* \param x0 The x-coordinate of the pole.
|
||||||
* \pre x0 lies in the interior of the arc.
|
* \pre x0 lies in the interior of the arc.
|
||||||
|
|
@ -1754,8 +1727,7 @@ protected:
|
||||||
return (std::make_pair (sign_left, sign_right));
|
return (std::make_pair (sign_left, sign_right));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*! prints a polynomial nicely.
|
||||||
* Print a polynomial nicely.
|
|
||||||
*/
|
*/
|
||||||
std::ostream& _print_polynomial (std::ostream& os,
|
std::ostream& _print_polynomial (std::ostream& os,
|
||||||
const Polynomial& poly,
|
const Polynomial& poly,
|
||||||
|
|
@ -1797,8 +1769,7 @@ protected:
|
||||||
//@}
|
//@}
|
||||||
};
|
};
|
||||||
|
|
||||||
/*!
|
/*! exports a rational arc.
|
||||||
* Exporter for rational arcs.
|
|
||||||
*/
|
*/
|
||||||
template <class Alg_kernel, class Nt_traits>
|
template <class Alg_kernel, class Nt_traits>
|
||||||
std::ostream&
|
std::ostream&
|
||||||
|
|
@ -1836,15 +1807,13 @@ public:
|
||||||
/// \name Construction methods.
|
/// \name Construction methods.
|
||||||
//@{
|
//@{
|
||||||
|
|
||||||
/*!
|
/*! constructs default.
|
||||||
* Default constructor.
|
|
||||||
*/
|
*/
|
||||||
_Continuous_rational_arc_2 () :
|
_Continuous_rational_arc_2 () :
|
||||||
Base()
|
Base()
|
||||||
{}
|
{}
|
||||||
|
|
||||||
/*!
|
/*! constructors from a base arc.
|
||||||
* Constructor from a base arc.
|
|
||||||
*/
|
*/
|
||||||
_Continuous_rational_arc_2 (const Base& arc) :
|
_Continuous_rational_arc_2 (const Base& arc) :
|
||||||
Base (arc)
|
Base (arc)
|
||||||
|
|
@ -1852,16 +1821,14 @@ public:
|
||||||
CGAL_precondition (arc.is_continuous());
|
CGAL_precondition (arc.is_continuous());
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*! constructs a whole polynomial curve.
|
||||||
* Constructor of a whole polynomial curve.
|
|
||||||
* \param pcoeffs The rational coefficients of the polynomial p(x).
|
* \param pcoeffs The rational coefficients of the polynomial p(x).
|
||||||
*/
|
*/
|
||||||
_Continuous_rational_arc_2 (const Rat_vector& pcoeffs) :
|
_Continuous_rational_arc_2 (const Rat_vector& pcoeffs) :
|
||||||
Base (pcoeffs)
|
Base (pcoeffs)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
/*!
|
/*! constructs a polynomial ray, defined by y = p(x), for x_s <= x if the
|
||||||
* Constructor of a polynomial ray, defined by y = p(x), for x_s <= x if the
|
|
||||||
* ray is directed to the right, or for x_s >= x if it is directed to the
|
* ray is directed to the right, or for x_s >= x if it is directed to the
|
||||||
* left.
|
* left.
|
||||||
* \param pcoeffs The rational coefficients of the polynomial p(x).
|
* \param pcoeffs The rational coefficients of the polynomial p(x).
|
||||||
|
|
@ -1874,8 +1841,7 @@ public:
|
||||||
Base (pcoeffs, x_s, dir_right)
|
Base (pcoeffs, x_s, dir_right)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
/*!
|
/*! constructors a polynomial arc, defined by y = p(x), x_min <= x <= x_max.
|
||||||
* Constructor of a polynomial arc, defined by y = p(x), x_min <= x <= x_max.
|
|
||||||
* \param pcoeffs The rational coefficients of the polynomial p(x).
|
* \param pcoeffs The rational coefficients of the polynomial p(x).
|
||||||
* \param x_s The x-coordinate of the source point.
|
* \param x_s The x-coordinate of the source point.
|
||||||
* \param x_t The x-coordinate of the target point.
|
* \param x_t The x-coordinate of the target point.
|
||||||
|
|
@ -1886,8 +1852,7 @@ public:
|
||||||
Base (pcoeffs, x_s, x_t)
|
Base (pcoeffs, x_s, x_t)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
/*!
|
/*! constructs a polynomial function, defined by y = p(x)/q(x) for any x.
|
||||||
* Constructor of a polynomial function, defined by y = p(x)/q(x) for any x.
|
|
||||||
* \param pcoeffs The rational coefficients of the polynomial p(x).
|
* \param pcoeffs The rational coefficients of the polynomial p(x).
|
||||||
* \param qcoeffs The rational coefficients of the polynomial q(x).
|
* \param qcoeffs The rational coefficients of the polynomial q(x).
|
||||||
* \pre The denominator polynomial q(x) does not have any roots.
|
* \pre The denominator polynomial q(x) does not have any roots.
|
||||||
|
|
@ -1903,8 +1868,7 @@ public:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*! constructs a ray of a rational function, defined by y = p(x)/q(x),
|
||||||
* Constructor of a ray of a rational function, defined by y = p(x)/q(x),
|
|
||||||
* for x_s <= x if the ray is directed to the right, or for x_s >= x if it
|
* for x_s <= x if the ray is directed to the right, or for x_s >= x if it
|
||||||
* is directed to the left.
|
* is directed to the left.
|
||||||
* \param pcoeffs The rational coefficients of the polynomial p(x).
|
* \param pcoeffs The rational coefficients of the polynomial p(x).
|
||||||
|
|
@ -1927,8 +1891,7 @@ public:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*! constructs a bounded rational arc, defined by y = p(x)/q(x),
|
||||||
* Constructor of a bounded rational arc, defined by y = p(x)/q(x),
|
|
||||||
* where: x_min <= x <= x_max.
|
* where: x_min <= x <= x_max.
|
||||||
* \param pcoeffs The rational coefficients of the polynomial p(x).
|
* \param pcoeffs The rational coefficients of the polynomial p(x).
|
||||||
* \param qcoeffs The rational coefficients of the polynomial q(x).
|
* \param qcoeffs The rational coefficients of the polynomial q(x).
|
||||||
|
|
@ -1954,8 +1917,7 @@ public:
|
||||||
/// \name Constructions of points and curves.
|
/// \name Constructions of points and curves.
|
||||||
//@{
|
//@{
|
||||||
|
|
||||||
/*!
|
/*! computes the intersections with the given arc.
|
||||||
* Compute the intersections with the given arc.
|
|
||||||
* \param arc The given intersecting arc.
|
* \param arc The given intersecting arc.
|
||||||
* \param oi The output iterator.
|
* \param oi The output iterator.
|
||||||
* \return The past-the-end iterator.
|
* \return The past-the-end iterator.
|
||||||
|
|
@ -2148,8 +2110,7 @@ public:
|
||||||
return oi;
|
return oi;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*! splits the arc into two at a given split point.
|
||||||
* Split the arc into two at a given split point.
|
|
||||||
* \param p The split point.
|
* \param p The split point.
|
||||||
* \param c1 Output: The first resulting arc, lying to the left of p.
|
* \param c1 Output: The first resulting arc, lying to the left of p.
|
||||||
* \param c2 Output: The first resulting arc, lying to the right of p.
|
* \param c2 Output: The first resulting arc, lying to the right of p.
|
||||||
|
|
@ -2195,8 +2156,7 @@ public:
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*! merges the current arc with the given arc.
|
||||||
* Merge the current arc with the given arc.
|
|
||||||
* \param arc The arc to merge with.
|
* \param arc The arc to merge with.
|
||||||
* \pre The two arcs are mergeable.
|
* \pre The two arcs are mergeable.
|
||||||
*/
|
*/
|
||||||
|
|
@ -2349,23 +2309,20 @@ public:
|
||||||
/// \name Construction methods.
|
/// \name Construction methods.
|
||||||
//@{
|
//@{
|
||||||
|
|
||||||
/*!
|
/*! constructs default.
|
||||||
* Default constructor.
|
|
||||||
*/
|
*/
|
||||||
_Rational_arc_2 () :
|
_Rational_arc_2 () :
|
||||||
Base()
|
Base()
|
||||||
{}
|
{}
|
||||||
|
|
||||||
/*!
|
/*! constructs a whole polynomial curve.
|
||||||
* Constructor of a whole polynomial curve.
|
|
||||||
* \param pcoeffs The rational coefficients of the polynomial p(x).
|
* \param pcoeffs The rational coefficients of the polynomial p(x).
|
||||||
*/
|
*/
|
||||||
_Rational_arc_2 (const Rat_vector& pcoeffs) :
|
_Rational_arc_2 (const Rat_vector& pcoeffs) :
|
||||||
Base (pcoeffs)
|
Base (pcoeffs)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
/*!
|
/*! constructs a polynomial ray, defined by y = p(x), for x_s <= x if the
|
||||||
* Constructor of a polynomial ray, defined by y = p(x), for x_s <= x if the
|
|
||||||
* ray is directed to the right, or for x_s >= x if it is directed to the
|
* ray is directed to the right, or for x_s >= x if it is directed to the
|
||||||
* left.
|
* left.
|
||||||
* \param pcoeffs The rational coefficients of the polynomial p(x).
|
* \param pcoeffs The rational coefficients of the polynomial p(x).
|
||||||
|
|
@ -2378,8 +2335,7 @@ public:
|
||||||
Base (pcoeffs, x_s, dir_right)
|
Base (pcoeffs, x_s, dir_right)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
/*!
|
/*! constructs a polynomial arc, defined by y = p(x), x_min <= x <= x_max.
|
||||||
* Constructor of a polynomial arc, defined by y = p(x), x_min <= x <= x_max.
|
|
||||||
* \param pcoeffs The rational coefficients of the polynomial p(x).
|
* \param pcoeffs The rational coefficients of the polynomial p(x).
|
||||||
* \param x_s The x-coordinate of the source point.
|
* \param x_s The x-coordinate of the source point.
|
||||||
* \param x_t The x-coordinate of the target point.
|
* \param x_t The x-coordinate of the target point.
|
||||||
|
|
@ -2390,8 +2346,7 @@ public:
|
||||||
Base (pcoeffs, x_s, x_t)
|
Base (pcoeffs, x_s, x_t)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
/*!
|
/*! constructs a polynomial function, defined by y = p(x)/q(x) for any x.
|
||||||
* Constructor of a polynomial function, defined by y = p(x)/q(x) for any x.
|
|
||||||
* \param pcoeffs The rational coefficients of the polynomial p(x).
|
* \param pcoeffs The rational coefficients of the polynomial p(x).
|
||||||
* \param qcoeffs The rational coefficients of the polynomial q(x).
|
* \param qcoeffs The rational coefficients of the polynomial q(x).
|
||||||
*/
|
*/
|
||||||
|
|
@ -2399,8 +2354,7 @@ public:
|
||||||
Base (pcoeffs, qcoeffs)
|
Base (pcoeffs, qcoeffs)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
/*!
|
/*! constructs a ray of a rational function, defined by y = p(x)/q(x),
|
||||||
* Constructor of a ray of a rational function, defined by y = p(x)/q(x),
|
|
||||||
* for x_s <= x if the ray is directed to the right, or for x_s >= x if it
|
* for x_s <= x if the ray is directed to the right, or for x_s >= x if it
|
||||||
* is directed to the left.
|
* is directed to the left.
|
||||||
* \param pcoeffs The rational coefficients of the polynomial p(x).
|
* \param pcoeffs The rational coefficients of the polynomial p(x).
|
||||||
|
|
@ -2414,8 +2368,7 @@ public:
|
||||||
Base (pcoeffs, qcoeffs, x_s, dir_right)
|
Base (pcoeffs, qcoeffs, x_s, dir_right)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
/*!
|
/*! constructs a bounded rational arc, defined by y = p(x)/q(x),
|
||||||
* Constructor of a bounded rational arc, defined by y = p(x)/q(x),
|
|
||||||
* where: x_min <= x <= x_max.
|
* where: x_min <= x <= x_max.
|
||||||
* \param pcoeffs The rational coefficients of the polynomial p(x).
|
* \param pcoeffs The rational coefficients of the polynomial p(x).
|
||||||
* \param qcoeffs The rational coefficients of the polynomial q(x).
|
* \param qcoeffs The rational coefficients of the polynomial q(x).
|
||||||
|
|
@ -2429,8 +2382,7 @@ public:
|
||||||
{}
|
{}
|
||||||
//@}
|
//@}
|
||||||
|
|
||||||
/*!
|
/*! subdivides the given portion of a rational function into continuous
|
||||||
* Subdivide the given portion of a rational function into continuous
|
|
||||||
* sub-arcs, splitting it at the roots of the denominator polynomial.
|
* sub-arcs, splitting it at the roots of the denominator polynomial.
|
||||||
* \param oi An output iterator of _Continuous_rational_arc_2 objects.
|
* \param oi An output iterator of _Continuous_rational_arc_2 objects.
|
||||||
*/
|
*/
|
||||||
|
|
@ -2475,7 +2427,7 @@ public:
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
/*! Check whether the arc is continuous. */
|
/*! checks whether the arc is continuous. */
|
||||||
void _check_continuity ()
|
void _check_continuity ()
|
||||||
{
|
{
|
||||||
if (this->_is_continuous())
|
if (this->_is_continuous())
|
||||||
|
|
@ -2489,6 +2441,6 @@ protected:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
} //namespace CGAL
|
} // namespace CGAL
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -70,8 +70,7 @@ public:
|
||||||
typedef CGAL::Segment_assertions<Arr_linear_traits_2<Kernel> >
|
typedef CGAL::Segment_assertions<Arr_linear_traits_2<Kernel> >
|
||||||
Segment_assertions;
|
Segment_assertions;
|
||||||
|
|
||||||
/*!
|
/*! \class Representation of a linear with cached data.
|
||||||
* \class Representation of a linear with cached data.
|
|
||||||
*/
|
*/
|
||||||
class _Linear_object_cached_2 {
|
class _Linear_object_cached_2 {
|
||||||
public:
|
public:
|
||||||
|
|
@ -100,7 +99,7 @@ public:
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
/*! Default constructor.
|
/*! constructs default.
|
||||||
*/
|
*/
|
||||||
_Linear_object_cached_2() :
|
_Linear_object_cached_2() :
|
||||||
has_source(true),
|
has_source(true),
|
||||||
|
|
@ -111,7 +110,7 @@ public:
|
||||||
is_degen(true)
|
is_degen(true)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
/*! Constructor for segment from two points.
|
/*! constructs from two points.
|
||||||
* \param p1 source point.
|
* \param p1 source point.
|
||||||
* \param p2 target point.
|
* \param p2 target point.
|
||||||
* \pre The two points must not be equal.
|
* \pre The two points must not be equal.
|
||||||
|
|
@ -137,7 +136,7 @@ public:
|
||||||
has_pos_slope = _has_positive_slope();
|
has_pos_slope = _has_positive_slope();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Constructor from a segment.
|
/*! constructs from a segment.
|
||||||
* \param seg The segment.
|
* \param seg The segment.
|
||||||
* \pre The segment is not degenerate.
|
* \pre The segment is not degenerate.
|
||||||
*/
|
*/
|
||||||
|
|
@ -165,7 +164,7 @@ public:
|
||||||
has_pos_slope = _has_positive_slope();
|
has_pos_slope = _has_positive_slope();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Constructor from a ray.
|
/*! constructs from a ray.
|
||||||
* \param ray The ray.
|
* \param ray The ray.
|
||||||
* \pre The ray is not degenerate.
|
* \pre The ray is not degenerate.
|
||||||
*/
|
*/
|
||||||
|
|
@ -193,7 +192,7 @@ public:
|
||||||
has_pos_slope = _has_positive_slope();
|
has_pos_slope = _has_positive_slope();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Constructor from a line.
|
/*! constructs from a line.
|
||||||
* \param ln The line.
|
* \param ln The line.
|
||||||
* \pre The line is not degenerate.
|
* \pre The line is not degenerate.
|
||||||
*/
|
*/
|
||||||
|
|
@ -221,7 +220,7 @@ public:
|
||||||
has_pos_slope = _has_positive_slope();
|
has_pos_slope = _has_positive_slope();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Check whether the \f$x\f$-coordinate of the left point is infinite.
|
/*! checks whether the \f$x\f$-coordinate of the left point is infinite.
|
||||||
* \return `ARR_LEFT_BOUNDARY` if the left point is near the boundary;
|
* \return `ARR_LEFT_BOUNDARY` if the left point is near the boundary;
|
||||||
* `ARR_INTERIOR` if the \f$x\f$-coordinate is finite.
|
* `ARR_INTERIOR` if the \f$x\f$-coordinate is finite.
|
||||||
*/
|
*/
|
||||||
|
|
@ -234,7 +233,7 @@ public:
|
||||||
(has_target ? ARR_INTERIOR : ARR_LEFT_BOUNDARY);
|
(has_target ? ARR_INTERIOR : ARR_LEFT_BOUNDARY);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Check whether the \f$y\f$-coordinate of the left point is infinite.
|
/*! checks whether the \f$y\f$-coordinate of the left point is infinite.
|
||||||
* \return `ARR_BOTTOM_BOUNDARY` if the left point is at \f$y = -\infty\f$;
|
* \return `ARR_BOTTOM_BOUNDARY` if the left point is at \f$y = -\infty\f$;
|
||||||
* `ARR_INTERIOR` if the \f$y\f$-coordinate is finite.
|
* `ARR_INTERIOR` if the \f$y\f$-coordinate is finite.
|
||||||
* `ARR_TOP_BOUNDARY` if the left point is at \f$y = +\infty\f$;
|
* `ARR_TOP_BOUNDARY` if the left point is at \f$y = +\infty\f$;
|
||||||
|
|
@ -255,11 +254,11 @@ public:
|
||||||
return (has_pos_slope ? ARR_BOTTOM_BOUNDARY : ARR_TOP_BOUNDARY);
|
return (has_pos_slope ? ARR_BOTTOM_BOUNDARY : ARR_TOP_BOUNDARY);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Check whether the left point is finite.
|
/*! checks whether the left point is finite.
|
||||||
*/
|
*/
|
||||||
bool has_left() const { return (is_right ? has_source : has_target); }
|
bool has_left() const { return (is_right ? has_source : has_target); }
|
||||||
|
|
||||||
/*! Obtain the (lexicographically) left endpoint.
|
/*! obtains the (lexicographically) left endpoint.
|
||||||
* \pre The left point is finite.
|
* \pre The left point is finite.
|
||||||
*/
|
*/
|
||||||
const Point_2& left() const
|
const Point_2& left() const
|
||||||
|
|
@ -268,7 +267,7 @@ public:
|
||||||
return (is_right ? ps : pt);
|
return (is_right ? ps : pt);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Set the (lexicographically) left endpoint.
|
/*! sets the (lexicographically) left endpoint.
|
||||||
* \param p The point to set.
|
* \param p The point to set.
|
||||||
* \pre p lies on the supporting line to the left of the right endpoint.
|
* \pre p lies on the supporting line to the left of the right endpoint.
|
||||||
*/
|
*/
|
||||||
|
|
@ -293,7 +292,7 @@ public:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Set the (lexicographically) left endpoint as infinite.
|
/*! sets the (lexicographically) left endpoint as infinite.
|
||||||
*/
|
*/
|
||||||
void set_left()
|
void set_left()
|
||||||
{
|
{
|
||||||
|
|
@ -303,7 +302,7 @@ public:
|
||||||
else has_target = false;
|
else has_target = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Check whether the \f$x\f$-coordinate of the right point is infinite.
|
/*! checks whether the \f$x\f$-coordinate of the right point is infinite.
|
||||||
* \return `ARR_RIGHT_BOUNDARY` if the right point is near the boundary;
|
* \return `ARR_RIGHT_BOUNDARY` if the right point is near the boundary;
|
||||||
* `ARR_INTERIOR` if the \f$x\f$-coordinate is finite.
|
* `ARR_INTERIOR` if the \f$x\f$-coordinate is finite.
|
||||||
*/
|
*/
|
||||||
|
|
@ -316,7 +315,7 @@ public:
|
||||||
(has_source ? ARR_INTERIOR : ARR_RIGHT_BOUNDARY);
|
(has_source ? ARR_INTERIOR : ARR_RIGHT_BOUNDARY);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Check whether the \f$y\f$-coordinate of the right point is infinite.
|
/*! checks whether the \f$y\f$-coordinate of the right point is infinite.
|
||||||
* \return `ARR_BOTTOM_BOUNDARY` if the right point is at \f$y = -\infty\f$;
|
* \return `ARR_BOTTOM_BOUNDARY` if the right point is at \f$y = -\infty\f$;
|
||||||
* `ARR_INTERIOR` if the \f$y\f$-coordinate is finite.
|
* `ARR_INTERIOR` if the \f$y\f$-coordinate is finite.
|
||||||
* `ARR_TOP_BOUNDARY` if the right point is at \f$y = +\infty\f$;
|
* `ARR_TOP_BOUNDARY` if the right point is at \f$y = +\infty\f$;
|
||||||
|
|
@ -337,11 +336,11 @@ public:
|
||||||
return (has_pos_slope ? ARR_TOP_BOUNDARY : ARR_BOTTOM_BOUNDARY);
|
return (has_pos_slope ? ARR_TOP_BOUNDARY : ARR_BOTTOM_BOUNDARY);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Check whether the right point is finite.
|
/*! checks whether the right point is finite.
|
||||||
*/
|
*/
|
||||||
bool has_right() const { return (is_right ? has_target : has_source); }
|
bool has_right() const { return (is_right ? has_target : has_source); }
|
||||||
|
|
||||||
/*! Obtain the (lexicographically) right endpoint.
|
/*! obtains the (lexicographically) right endpoint.
|
||||||
* \pre The right endpoint is finite.
|
* \pre The right endpoint is finite.
|
||||||
*/
|
*/
|
||||||
const Point_2& right() const
|
const Point_2& right() const
|
||||||
|
|
@ -350,7 +349,7 @@ public:
|
||||||
return (is_right ? pt : ps);
|
return (is_right ? pt : ps);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Set the (lexicographically) right endpoint.
|
/*! sets the (lexicographically) right endpoint.
|
||||||
* \param p The point to set.
|
* \param p The point to set.
|
||||||
* \pre p lies on the supporting line to the right of the left endpoint.
|
* \pre p lies on the supporting line to the right of the left endpoint.
|
||||||
*/
|
*/
|
||||||
|
|
@ -374,7 +373,7 @@ public:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Set the (lexicographically) right endpoint as infinite.
|
/*! sets the (lexicographically) right endpoint as infinite.
|
||||||
*/
|
*/
|
||||||
void set_right()
|
void set_right()
|
||||||
{
|
{
|
||||||
|
|
@ -384,7 +383,7 @@ public:
|
||||||
else has_source = false;
|
else has_source = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Obtain the supporting line.
|
/*! obtains the supporting line.
|
||||||
*/
|
*/
|
||||||
const Line_2& supp_line() const
|
const Line_2& supp_line() const
|
||||||
{
|
{
|
||||||
|
|
@ -392,7 +391,7 @@ public:
|
||||||
return (l);
|
return (l);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Check whether the curve is vertical.
|
/*! checks whether the curve is vertical.
|
||||||
*/
|
*/
|
||||||
bool is_vertical() const
|
bool is_vertical() const
|
||||||
{
|
{
|
||||||
|
|
@ -400,15 +399,15 @@ public:
|
||||||
return (is_vert);
|
return (is_vert);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Check whether the curve is degenerate.
|
/*! checks whether the curve is degenerate.
|
||||||
*/
|
*/
|
||||||
bool is_degenerate() const { return (is_degen); }
|
bool is_degenerate() const { return (is_degen); }
|
||||||
|
|
||||||
/*! Check whether the curve is directed lexicographic from left to right
|
/*! checks whether the curve is directed lexicographic from left to right
|
||||||
*/
|
*/
|
||||||
bool is_directed_right() const { return (is_right); }
|
bool is_directed_right() const { return (is_right); }
|
||||||
|
|
||||||
/*! Check whether the given point is in the \f$x\f$-range of the object.
|
/*! checks whether the given point is in the \f$x\f$-range of the object.
|
||||||
* \param p The query point.
|
* \param p The query point.
|
||||||
* \return (true) is in the \f$x\f$-range of the segment; (false) if it is
|
* \return (true) is in the \f$x\f$-range of the segment; (false) if it is
|
||||||
* not.
|
* not.
|
||||||
|
|
@ -447,7 +446,7 @@ public:
|
||||||
return (res2 != LARGER);
|
return (res2 != LARGER);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Check whether the given point is in the \f$y\f$-range of the object.
|
/*! checks whether the given point is in the \f$y\f$-range of the object.
|
||||||
* \param p The query point.
|
* \param p The query point.
|
||||||
* \pre The object is vertical.
|
* \pre The object is vertical.
|
||||||
* \return (true) is in the \f$y\f$-range of the segment; (false) if it is
|
* \return (true) is in the \f$y\f$-range of the segment; (false) if it is
|
||||||
|
|
@ -480,7 +479,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/*! Determine if the supporting line has a positive slope.
|
/*! determines if the supporting line has a positive slope.
|
||||||
*/
|
*/
|
||||||
bool _has_positive_slope() const
|
bool _has_positive_slope() const
|
||||||
{
|
{
|
||||||
|
|
@ -503,7 +502,7 @@ public:
|
||||||
typedef unsigned int Multiplicity;
|
typedef unsigned int Multiplicity;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/*! Default constructor.
|
/*! constructs default.
|
||||||
*/
|
*/
|
||||||
Arr_linear_traits_2() {}
|
Arr_linear_traits_2() {}
|
||||||
|
|
||||||
|
|
@ -518,7 +517,7 @@ public:
|
||||||
/*! The traits (in case it has state) */
|
/*! The traits (in case it has state) */
|
||||||
const Traits& m_traits;
|
const Traits& m_traits;
|
||||||
|
|
||||||
/*! Constructor
|
/*! constructs
|
||||||
* \param traits the traits (in case it has state)
|
* \param traits the traits (in case it has state)
|
||||||
* The constructor is declared private to allow only the functor
|
* The constructor is declared private to allow only the functor
|
||||||
* obtaining function, which is a member of the nesting class,
|
* obtaining function, which is a member of the nesting class,
|
||||||
|
|
@ -530,7 +529,7 @@ public:
|
||||||
friend class Arr_linear_traits_2<Kernel>;
|
friend class Arr_linear_traits_2<Kernel>;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/*! Compare the \f$x\f$-coordinates of two points.
|
/*! compares the \f$x\f$-coordinates of two points.
|
||||||
* \param p1 The first point.
|
* \param p1 The first point.
|
||||||
* \param p2 The second point.
|
* \param p2 The second point.
|
||||||
* \return LARGER if x(p1) > x(p2);
|
* \return LARGER if x(p1) > x(p2);
|
||||||
|
|
@ -544,13 +543,13 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/*! Obtain a `Compare_x_2` functor. */
|
/*! obtains a `Compare_x_2` functor. */
|
||||||
Compare_x_2 compare_x_2_object() const { return Compare_x_2(*this); }
|
Compare_x_2 compare_x_2_object() const { return Compare_x_2(*this); }
|
||||||
|
|
||||||
/*! A functor that compares the he endpoints of an $x$-monotone curve. */
|
/*! A functor that compares the he endpoints of an $x$-monotone curve. */
|
||||||
class Compare_endpoints_xy_2{
|
class Compare_endpoints_xy_2{
|
||||||
public:
|
public:
|
||||||
/*! Compare the endpoints of an $x$-monotone curve lexicographically.
|
/*! compares the endpoints of an $x$-monotone curve lexicographically.
|
||||||
* (assuming the curve has a designated source and target points).
|
* (assuming the curve has a designated source and target points).
|
||||||
* \param cv The curve.
|
* \param cv The curve.
|
||||||
* \return SMALLER if the curve is directed right;
|
* \return SMALLER if the curve is directed right;
|
||||||
|
|
@ -560,7 +559,7 @@ public:
|
||||||
{ return (xcv.is_directed_right()) ? (SMALLER) : (LARGER); }
|
{ return (xcv.is_directed_right()) ? (SMALLER) : (LARGER); }
|
||||||
};
|
};
|
||||||
|
|
||||||
/*! Obtain a `Compare_endpoints_xy_2` functor. */
|
/*! obtains a `Compare_endpoints_xy_2` functor. */
|
||||||
Compare_endpoints_xy_2 compare_endpoints_xy_2_object() const
|
Compare_endpoints_xy_2 compare_endpoints_xy_2_object() const
|
||||||
{ return Compare_endpoints_xy_2(); }
|
{ return Compare_endpoints_xy_2(); }
|
||||||
|
|
||||||
|
|
@ -571,7 +570,7 @@ public:
|
||||||
/*! The traits (in case it has state) */
|
/*! The traits (in case it has state) */
|
||||||
const Traits& m_traits;
|
const Traits& m_traits;
|
||||||
|
|
||||||
/*! Constructor
|
/*! constructs
|
||||||
* \param traits the traits (in case it has state)
|
* \param traits the traits (in case it has state)
|
||||||
* The constructor is declared private to allow only the functor
|
* The constructor is declared private to allow only the functor
|
||||||
* obtaining function, which is a member of the nesting class,
|
* obtaining function, which is a member of the nesting class,
|
||||||
|
|
@ -613,7 +612,7 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/*! Obtain a `Trim_2` functor object. */
|
/*! obtains a `Trim_2` functor object. */
|
||||||
Trim_2 trim_2_object() const { return Trim_2(*this); }
|
Trim_2 trim_2_object() const { return Trim_2(*this); }
|
||||||
|
|
||||||
class Construct_opposite_2{
|
class Construct_opposite_2{
|
||||||
|
|
@ -623,7 +622,7 @@ public:
|
||||||
/*! The traits (in case it has state) */
|
/*! The traits (in case it has state) */
|
||||||
const Traits& m_traits;
|
const Traits& m_traits;
|
||||||
|
|
||||||
/*! Constructor
|
/*! constructs
|
||||||
* \param traits the traits (in case it has state)
|
* \param traits the traits (in case it has state)
|
||||||
* The constructor is declared private to allow only the functor
|
* The constructor is declared private to allow only the functor
|
||||||
* obtaining function, which is a member of the nesting class,
|
* obtaining function, which is a member of the nesting class,
|
||||||
|
|
@ -652,14 +651,14 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/*! Get a Construct_opposite_2 functor object. */
|
/*! obtains a Construct_opposite_2 functor object. */
|
||||||
Construct_opposite_2 construct_opposite_2_object() const
|
Construct_opposite_2 construct_opposite_2_object() const
|
||||||
{ return Construct_opposite_2(*this); }
|
{ return Construct_opposite_2(*this); }
|
||||||
|
|
||||||
/*! A functor that compares the \f$x\f$-coordinates of two points */
|
/*! A functor that compares the \f$x\f$-coordinates of two points */
|
||||||
class Compare_xy_2 {
|
class Compare_xy_2 {
|
||||||
public:
|
public:
|
||||||
/*! Compare two points lexigoraphically: by \f$x\f$, then by \f$y\f$.
|
/*! compares two points lexigoraphically: by \f$x\f$, then by \f$y\f$.
|
||||||
* \param p1 The first point.
|
* \param p1 The first point.
|
||||||
* \param p2 The second point.
|
* \param p2 The second point.
|
||||||
* \return LARGER if x(p1) > x(p2), or if x(p1) = x(p2) and y(p1) > y(p2);
|
* \return LARGER if x(p1) > x(p2), or if x(p1) = x(p2) and y(p1) > y(p2);
|
||||||
|
|
@ -673,13 +672,13 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/*! Obtain a `Compare_xy_2` functor object. */
|
/*! obtains a `Compare_xy_2` functor object. */
|
||||||
Compare_xy_2 compare_xy_2_object() const { return Compare_xy_2(); }
|
Compare_xy_2 compare_xy_2_object() const { return Compare_xy_2(); }
|
||||||
|
|
||||||
/*! A functor that obtains the left endpoint of a segment or a ray. */
|
/*! A functor that obtains the left endpoint of a segment or a ray. */
|
||||||
class Construct_min_vertex_2 {
|
class Construct_min_vertex_2 {
|
||||||
public:
|
public:
|
||||||
/*! Obtain the left endpoint of the \f$x\f$-monotone curve (segment).
|
/*! obtains the left endpoint of the \f$x\f$-monotone curve (segment).
|
||||||
* \param cv The curve.
|
* \param cv The curve.
|
||||||
* \pre The left end of cv is a valid (bounded) point.
|
* \pre The left end of cv is a valid (bounded) point.
|
||||||
* \return The left endpoint.
|
* \return The left endpoint.
|
||||||
|
|
@ -693,14 +692,14 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/*! Obtain a `Construct_min_vertex_2` functor object. */
|
/*! obtains a `Construct_min_vertex_2` functor object. */
|
||||||
Construct_min_vertex_2 construct_min_vertex_2_object() const
|
Construct_min_vertex_2 construct_min_vertex_2_object() const
|
||||||
{ return Construct_min_vertex_2(); }
|
{ return Construct_min_vertex_2(); }
|
||||||
|
|
||||||
/*! A functor that obtains the right endpoint of a segment or a ray. */
|
/*! A functor that obtains the right endpoint of a segment or a ray. */
|
||||||
class Construct_max_vertex_2 {
|
class Construct_max_vertex_2 {
|
||||||
public:
|
public:
|
||||||
/*! Obtain the right endpoint of the \f$x\f$-monotone curve (segment).
|
/*! obtains the right endpoint of the \f$x\f$-monotone curve (segment).
|
||||||
* \param cv The curve.
|
* \param cv The curve.
|
||||||
* \pre The right end of cv is a valid (bounded) point.
|
* \pre The right end of cv is a valid (bounded) point.
|
||||||
* \return The right endpoint.
|
* \return The right endpoint.
|
||||||
|
|
@ -714,14 +713,14 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/*! Obtain a `Construct_max_vertex_2` functor object. */
|
/*! obtains a `Construct_max_vertex_2` functor object. */
|
||||||
Construct_max_vertex_2 construct_max_vertex_2_object() const
|
Construct_max_vertex_2 construct_max_vertex_2_object() const
|
||||||
{ return Construct_max_vertex_2(); }
|
{ return Construct_max_vertex_2(); }
|
||||||
|
|
||||||
/*! A functor that checks whether a given linear curve is vertical. */
|
/*! A functor that checks whether a given linear curve is vertical. */
|
||||||
class Is_vertical_2 {
|
class Is_vertical_2 {
|
||||||
public:
|
public:
|
||||||
/*! Check whether the given \f$x\f$-monotone curve is a vertical segment.
|
/*! checks whether the given \f$x\f$-monotone curve is a vertical segment.
|
||||||
* \param cv The curve.
|
* \param cv The curve.
|
||||||
* \return (true) if the curve is a vertical segment; (false) otherwise.
|
* \return (true) if the curve is a vertical segment; (false) otherwise.
|
||||||
*/
|
*/
|
||||||
|
|
@ -732,7 +731,7 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/*! Obtain an `Is_vertical_2` functor object. */
|
/*! obtains an `Is_vertical_2` functor object. */
|
||||||
Is_vertical_2 is_vertical_2_object() const { return Is_vertical_2(); }
|
Is_vertical_2 is_vertical_2_object() const { return Is_vertical_2(); }
|
||||||
|
|
||||||
/*! A functor that compares the \f$y\f$-coordinates of a point and a line at
|
/*! A functor that compares the \f$y\f$-coordinates of a point and a line at
|
||||||
|
|
@ -745,7 +744,7 @@ public:
|
||||||
/*! The traits (in case it has state) */
|
/*! The traits (in case it has state) */
|
||||||
const Traits& m_traits;
|
const Traits& m_traits;
|
||||||
|
|
||||||
/*! Constructor
|
/*! constructs
|
||||||
* \param traits the traits (in case it has state)
|
* \param traits the traits (in case it has state)
|
||||||
* The constructor is declared private to allow only the functor
|
* The constructor is declared private to allow only the functor
|
||||||
* obtaining function, which is a member of the nesting class,
|
* obtaining function, which is a member of the nesting class,
|
||||||
|
|
@ -757,7 +756,7 @@ public:
|
||||||
friend class Arr_linear_traits_2<Kernel>;
|
friend class Arr_linear_traits_2<Kernel>;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/*! Obtain the location of the given point with respect to the input curve.
|
/*! obtains the location of the given point with respect to the input curve.
|
||||||
* \param cv The curve.
|
* \param cv The curve.
|
||||||
* \param p The point.
|
* \param p The point.
|
||||||
* \pre p is in the \f$x\f$-range of cv.
|
* \pre p is in the \f$x\f$-range of cv.
|
||||||
|
|
@ -787,7 +786,7 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/*! Obtain a `Compare_y_at_x_2` functor object. */
|
/*! obtains a `Compare_y_at_x_2` functor object. */
|
||||||
Compare_y_at_x_2 compare_y_at_x_2_object() const
|
Compare_y_at_x_2 compare_y_at_x_2_object() const
|
||||||
{ return Compare_y_at_x_2(*this); }
|
{ return Compare_y_at_x_2(*this); }
|
||||||
|
|
||||||
|
|
@ -796,7 +795,7 @@ public:
|
||||||
*/
|
*/
|
||||||
class Compare_y_at_x_left_2 {
|
class Compare_y_at_x_left_2 {
|
||||||
public:
|
public:
|
||||||
/*! Compare the \f$y\f$-value of two \f$x\f$-monotone curves immediately to
|
/*! compares the \f$y\f$-value of two \f$x\f$-monotone curves immediately to
|
||||||
* the left of their intersection point.
|
* the left of their intersection point.
|
||||||
* \param cv1 The first curve.
|
* \param cv1 The first curve.
|
||||||
* \param cv2 The second curve.
|
* \param cv2 The second curve.
|
||||||
|
|
@ -839,7 +838,7 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/*! Obtain a Compare_y_at_x_left_2 functor object. */
|
/*! obtains a Compare_y_at_x_left_2 functor object. */
|
||||||
Compare_y_at_x_left_2 compare_y_at_x_left_2_object() const
|
Compare_y_at_x_left_2 compare_y_at_x_left_2_object() const
|
||||||
{ return Compare_y_at_x_left_2(); }
|
{ return Compare_y_at_x_left_2(); }
|
||||||
|
|
||||||
|
|
@ -848,7 +847,7 @@ public:
|
||||||
*/
|
*/
|
||||||
class Compare_y_at_x_right_2 {
|
class Compare_y_at_x_right_2 {
|
||||||
public:
|
public:
|
||||||
/*! Compare the \f$y\f$-value of two \f$x\f$-monotone curves immediately to
|
/*! compares the \f$y\f$-value of two \f$x\f$-monotone curves immediately to
|
||||||
* the right of their intersection point.
|
* the right of their intersection point.
|
||||||
* \param cv1 The first curve.
|
* \param cv1 The first curve.
|
||||||
* \param cv2 The second curve.
|
* \param cv2 The second curve.
|
||||||
|
|
@ -889,7 +888,7 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/*! Obtain a `Compare_y_at_x_right_2` functor object. */
|
/*! obtains a `Compare_y_at_x_right_2` functor object. */
|
||||||
Compare_y_at_x_right_2 compare_y_at_x_right_2_object() const
|
Compare_y_at_x_right_2 compare_y_at_x_right_2_object() const
|
||||||
{ return Compare_y_at_x_right_2(); }
|
{ return Compare_y_at_x_right_2(); }
|
||||||
|
|
||||||
|
|
@ -898,7 +897,7 @@ public:
|
||||||
*/
|
*/
|
||||||
class Equal_2 {
|
class Equal_2 {
|
||||||
public:
|
public:
|
||||||
/*! Check whether the two \f$x\f$-monotone curves are the same (have the
|
/*! checks whether the two \f$x\f$-monotone curves are the same (have the
|
||||||
* same graph).
|
* same graph).
|
||||||
* \param cv1 The first curve.
|
* \param cv1 The first curve.
|
||||||
* \param cv2 The second curve.
|
* \param cv2 The second curve.
|
||||||
|
|
@ -935,7 +934,7 @@ public:
|
||||||
(! cv1.has_right() || equal (cv1.right(), cv2.right())));
|
(! cv1.has_right() || equal (cv1.right(), cv2.right())));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Check whether the two points are the same.
|
/*! checks whether the two points are the same.
|
||||||
* \param p1 The first point.
|
* \param p1 The first point.
|
||||||
* \param p2 The second point.
|
* \param p2 The second point.
|
||||||
* \return (true) if the two point are the same; (false) otherwise.
|
* \return (true) if the two point are the same; (false) otherwise.
|
||||||
|
|
@ -947,7 +946,7 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/*! Obtain an `Equal_2` functor object. */
|
/*! obtains an `Equal_2` functor object. */
|
||||||
Equal_2 equal_2_object() const { return Equal_2(); }
|
Equal_2 equal_2_object() const { return Equal_2(); }
|
||||||
//@}
|
//@}
|
||||||
|
|
||||||
|
|
@ -959,7 +958,7 @@ public:
|
||||||
*/
|
*/
|
||||||
class Parameter_space_in_x_2 {
|
class Parameter_space_in_x_2 {
|
||||||
public:
|
public:
|
||||||
/*! Obtains the parameter space at the end of a line along the \f$x\f$-axis.
|
/*! obtains the parameter space at the end of a line along the \f$x\f$-axis.
|
||||||
* \param xcv the line
|
* \param xcv the line
|
||||||
* \param ce the line end indicator:
|
* \param ce the line end indicator:
|
||||||
* ARR_MIN_END - the minimal end of xc or
|
* ARR_MIN_END - the minimal end of xc or
|
||||||
|
|
@ -979,7 +978,7 @@ public:
|
||||||
xcv.left_infinite_in_x() : xcv.right_infinite_in_x();
|
xcv.left_infinite_in_x() : xcv.right_infinite_in_x();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Obtains the parameter space at a point along the \f$x\f$-axis.
|
/*! obtains the parameter space at a point along the \f$x\f$-axis.
|
||||||
* \param p the point.
|
* \param p the point.
|
||||||
* \return the parameter space at `p`.
|
* \return the parameter space at `p`.
|
||||||
*/
|
*/
|
||||||
|
|
@ -987,7 +986,7 @@ public:
|
||||||
{ return ARR_INTERIOR; }
|
{ return ARR_INTERIOR; }
|
||||||
};
|
};
|
||||||
|
|
||||||
/*! Obtain a `Parameter_space_in_x_2` function object. */
|
/*! obtains a `Parameter_space_in_x_2` function object. */
|
||||||
Parameter_space_in_x_2 parameter_space_in_x_2_object() const
|
Parameter_space_in_x_2 parameter_space_in_x_2_object() const
|
||||||
{ return Parameter_space_in_x_2(); }
|
{ return Parameter_space_in_x_2(); }
|
||||||
|
|
||||||
|
|
@ -996,7 +995,7 @@ public:
|
||||||
*/
|
*/
|
||||||
class Parameter_space_in_y_2 {
|
class Parameter_space_in_y_2 {
|
||||||
public:
|
public:
|
||||||
/*! Obtains the parameter space at the end of a line along the \f$y\f$-axis.
|
/*! obtains the parameter space at the end of a line along the \f$y\f$-axis.
|
||||||
* Note that if the line end coincides with a pole, then unless the line
|
* Note that if the line end coincides with a pole, then unless the line
|
||||||
* coincides with the identification arc, the line end is considered to
|
* coincides with the identification arc, the line end is considered to
|
||||||
* be approaching the boundary, but not on the boundary.
|
* be approaching the boundary, but not on the boundary.
|
||||||
|
|
@ -1022,7 +1021,7 @@ public:
|
||||||
xcv.left_infinite_in_y() : xcv.right_infinite_in_y();
|
xcv.left_infinite_in_y() : xcv.right_infinite_in_y();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Obtains the parameter space at a point along the \f$y\f$-axis.
|
/*! obtains the parameter space at a point along the \f$y\f$-axis.
|
||||||
* \param p the point.
|
* \param p the point.
|
||||||
* \return the parameter space at `p`.
|
* \return the parameter space at `p`.
|
||||||
*/
|
*/
|
||||||
|
|
@ -1030,7 +1029,7 @@ public:
|
||||||
{ return ARR_INTERIOR; }
|
{ return ARR_INTERIOR; }
|
||||||
};
|
};
|
||||||
|
|
||||||
/*! Obtain a `Parameter_space_in_y_2` function object. */
|
/*! obtains a `Parameter_space_in_y_2` function object. */
|
||||||
Parameter_space_in_y_2 parameter_space_in_y_2_object() const
|
Parameter_space_in_y_2 parameter_space_in_y_2_object() const
|
||||||
{ return Parameter_space_in_y_2(); }
|
{ return Parameter_space_in_y_2(); }
|
||||||
|
|
||||||
|
|
@ -1044,7 +1043,7 @@ public:
|
||||||
/*! The traits (in case it has state) */
|
/*! The traits (in case it has state) */
|
||||||
const Traits& m_traits;
|
const Traits& m_traits;
|
||||||
|
|
||||||
/*! Constructor
|
/*! constructs
|
||||||
* \param traits the traits (in case it has state)
|
* \param traits the traits (in case it has state)
|
||||||
* The constructor is declared private to allow only the functor
|
* The constructor is declared private to allow only the functor
|
||||||
* obtaining function, which is a member of the nesting class,
|
* obtaining function, which is a member of the nesting class,
|
||||||
|
|
@ -1056,7 +1055,7 @@ public:
|
||||||
friend class Arr_linear_traits_2<Kernel>;
|
friend class Arr_linear_traits_2<Kernel>;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/*! Compare the \f$x\f$-limit of a vertical line at a point with the
|
/*! compares the \f$x\f$-limit of a vertical line at a point with the
|
||||||
* \f$x\f$-limit of a line end on the boundary at \f$y = +/- \infty\f$.
|
* \f$x\f$-limit of a line end on the boundary at \f$y = +/- \infty\f$.
|
||||||
* \param p the point direction.
|
* \param p the point direction.
|
||||||
* \param xcv the line, the endpoint of which is compared.
|
* \param xcv the line, the endpoint of which is compared.
|
||||||
|
|
@ -1082,7 +1081,7 @@ public:
|
||||||
return (kernel.compare_x_at_y_2_object()(p, xcv.supp_line()));
|
return (kernel.compare_x_at_y_2_object()(p, xcv.supp_line()));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Compare the \f$x\f$-limits of 2 arcs ends on the boundary of the
|
/*! compares the \f$x\f$-limits of 2 arcs ends on the boundary of the
|
||||||
* parameter space at \f$y = +/- \infty\f$.
|
* parameter space at \f$y = +/- \infty\f$.
|
||||||
* \param xcv1 the first arc.
|
* \param xcv1 the first arc.
|
||||||
* \param ce1 the first arc end indicator -
|
* \param ce1 the first arc end indicator -
|
||||||
|
|
@ -1104,7 +1103,7 @@ public:
|
||||||
Comparison_result operator()(const X_monotone_curve_2 & xcv1,
|
Comparison_result operator()(const X_monotone_curve_2 & xcv1,
|
||||||
Arr_curve_end /* ce1 */,
|
Arr_curve_end /* ce1 */,
|
||||||
const X_monotone_curve_2 & xcv2,
|
const X_monotone_curve_2 & xcv2,
|
||||||
Arr_curve_end /*! ce2 */) const
|
Arr_curve_end /* ce2 */) const
|
||||||
{
|
{
|
||||||
CGAL_precondition(! xcv1.is_degenerate());
|
CGAL_precondition(! xcv1.is_degenerate());
|
||||||
CGAL_precondition(! xcv2.is_degenerate());
|
CGAL_precondition(! xcv2.is_degenerate());
|
||||||
|
|
@ -1118,7 +1117,7 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/*! Obtain a `Compare_x_on_boundary_2` function object. */
|
/*! obtains a `Compare_x_on_boundary_2` function object. */
|
||||||
Compare_x_on_boundary_2 compare_x_on_boundary_2_object() const
|
Compare_x_on_boundary_2 compare_x_on_boundary_2_object() const
|
||||||
{ return Compare_x_on_boundary_2(*this); }
|
{ return Compare_x_on_boundary_2(*this); }
|
||||||
|
|
||||||
|
|
@ -1127,7 +1126,7 @@ public:
|
||||||
*/
|
*/
|
||||||
class Compare_x_near_boundary_2 {
|
class Compare_x_near_boundary_2 {
|
||||||
public:
|
public:
|
||||||
/*! Compare the \f$x\f$-coordinates of 2 arcs ends near the boundary of the
|
/*! compares the \f$x\f$-coordinates of 2 arcs ends near the boundary of the
|
||||||
* parameter space at y\f$ = +/- \infty\f$.
|
* parameter space at y\f$ = +/- \infty\f$.
|
||||||
* \param xcv1 the first arc.
|
* \param xcv1 the first arc.
|
||||||
* \param ce1 the first arc end indicator -
|
* \param ce1 the first arc end indicator -
|
||||||
|
|
@ -1151,7 +1150,7 @@ public:
|
||||||
Comparison_result
|
Comparison_result
|
||||||
operator()(const X_monotone_curve_2& CGAL_precondition_code(xcv1),
|
operator()(const X_monotone_curve_2& CGAL_precondition_code(xcv1),
|
||||||
const X_monotone_curve_2& CGAL_precondition_code(xcv2),
|
const X_monotone_curve_2& CGAL_precondition_code(xcv2),
|
||||||
Arr_curve_end /*! ce2 */) const
|
Arr_curve_end /* ce2 */) const
|
||||||
{
|
{
|
||||||
CGAL_precondition(! xcv1.is_degenerate());
|
CGAL_precondition(! xcv1.is_degenerate());
|
||||||
CGAL_precondition(! xcv2.is_degenerate());
|
CGAL_precondition(! xcv2.is_degenerate());
|
||||||
|
|
@ -1161,7 +1160,7 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/*! Obtain a `Compare_x_near_boundary_2` function object. */
|
/*! obtains a `Compare_x_near_boundary_2` function object. */
|
||||||
Compare_x_near_boundary_2 compare_x_near_boundary_2_object() const
|
Compare_x_near_boundary_2 compare_x_near_boundary_2_object() const
|
||||||
{ return Compare_x_near_boundary_2(); }
|
{ return Compare_x_near_boundary_2(); }
|
||||||
|
|
||||||
|
|
@ -1175,7 +1174,7 @@ public:
|
||||||
/*! The traits (in case it has state) */
|
/*! The traits (in case it has state) */
|
||||||
const Traits& m_traits;
|
const Traits& m_traits;
|
||||||
|
|
||||||
/*! Constructor
|
/*! constructs
|
||||||
* \param traits the traits (in case it has state)
|
* \param traits the traits (in case it has state)
|
||||||
* The constructor is declared private to allow only the functor
|
* The constructor is declared private to allow only the functor
|
||||||
* obtaining function, which is a member of the nesting class,
|
* obtaining function, which is a member of the nesting class,
|
||||||
|
|
@ -1187,7 +1186,7 @@ public:
|
||||||
friend class Arr_linear_traits_2<Kernel>;
|
friend class Arr_linear_traits_2<Kernel>;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/*! Compare the \f$y\f$-limits of 2 lines at their ends on the boundary
|
/*! compares the \f$y\f$-limits of 2 lines at their ends on the boundary
|
||||||
* of the parameter space at \f$x = +/- \infty\f$.
|
* of the parameter space at \f$x = +/- \infty\f$.
|
||||||
* \param xcv1 the first arc.
|
* \param xcv1 the first arc.
|
||||||
* \param xcv2 the second arc.
|
* \param xcv2 the second arc.
|
||||||
|
|
@ -1230,7 +1229,7 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/*! Obtain a `Compare_y_near_boundary_2` function object. */
|
/*! obtains a `Compare_y_near_boundary_2` function object. */
|
||||||
Compare_y_near_boundary_2 compare_y_near_boundary_2_object() const
|
Compare_y_near_boundary_2 compare_y_near_boundary_2_object() const
|
||||||
{ return Compare_y_near_boundary_2(*this); }
|
{ return Compare_y_near_boundary_2(*this); }
|
||||||
|
|
||||||
|
|
@ -1241,9 +1240,9 @@ public:
|
||||||
|
|
||||||
class Make_x_monotone_2 {
|
class Make_x_monotone_2 {
|
||||||
public:
|
public:
|
||||||
/*! Cut the given curve into \f$x\f$-monotone subcurves and insert them into
|
/*! cuts the given curve into \f$x\f$-monotone subcurves and insert them
|
||||||
* the given output iterator. As segments are always x_monotone, only one
|
* into the given output iterator. As segments are always x_monotone, only
|
||||||
* object will be contained in the iterator.
|
* one object will be contained in the iterator.
|
||||||
* \param cv The curve.
|
* \param cv The curve.
|
||||||
* \param oi an output iterator for the result. Its dereference type is a
|
* \param oi an output iterator for the result. Its dereference type is a
|
||||||
* variant that wraps a \c Point_2 or an \c X_monotone_curve_2
|
* variant that wraps a \c Point_2 or an \c X_monotone_curve_2
|
||||||
|
|
@ -1261,13 +1260,13 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/*! Obtain a `Make_x_monotone_2` functor object. */
|
/*! obtains a `Make_x_monotone_2` functor object. */
|
||||||
Make_x_monotone_2 make_x_monotone_2_object() const
|
Make_x_monotone_2 make_x_monotone_2_object() const
|
||||||
{ return Make_x_monotone_2(); }
|
{ return Make_x_monotone_2(); }
|
||||||
|
|
||||||
class Split_2 {
|
class Split_2 {
|
||||||
public:
|
public:
|
||||||
/*! Split a given \f$x\f$-monotone curve at a given point into two
|
/*! splits a given \f$x\f$-monotone curve at a given point into two
|
||||||
* sub-curves.
|
* sub-curves.
|
||||||
* \param cv The curve to split
|
* \param cv The curve to split
|
||||||
* \param p The split point.
|
* \param p The split point.
|
||||||
|
|
@ -1300,7 +1299,7 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/*! Obtain a `Split_2` functor object. */
|
/*! obtains a `Split_2` functor object. */
|
||||||
Split_2 split_2_object() const { return Split_2(); }
|
Split_2 split_2_object() const { return Split_2(); }
|
||||||
|
|
||||||
class Intersect_2 {
|
class Intersect_2 {
|
||||||
|
|
@ -1310,7 +1309,7 @@ public:
|
||||||
/*! The traits (in case it has state) */
|
/*! The traits (in case it has state) */
|
||||||
const Traits& m_traits;
|
const Traits& m_traits;
|
||||||
|
|
||||||
/*! Constructor
|
/*! constructs
|
||||||
* \param traits the traits (in case it has state)
|
* \param traits the traits (in case it has state)
|
||||||
*/
|
*/
|
||||||
Intersect_2(const Traits& traits) : m_traits(traits) {}
|
Intersect_2(const Traits& traits) : m_traits(traits) {}
|
||||||
|
|
@ -1318,7 +1317,7 @@ public:
|
||||||
friend class Arr_linear_traits_2<Kernel>;
|
friend class Arr_linear_traits_2<Kernel>;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/*! Find the intersections of the two given curves and insert them into the
|
/*! finds the intersections of the two given curves and insert them into the
|
||||||
* given output iterator. As two segments may itersect only once, only a
|
* given output iterator. As two segments may itersect only once, only a
|
||||||
* single intersection will be contained in the iterator.
|
* single intersection will be contained in the iterator.
|
||||||
* \param cv1 The first curve.
|
* \param cv1 The first curve.
|
||||||
|
|
@ -1416,12 +1415,12 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/*! Obtain an Intersect_2 functor object. */
|
/*! obtains an Intersect_2 functor object. */
|
||||||
Intersect_2 intersect_2_object () const { return Intersect_2(*this); }
|
Intersect_2 intersect_2_object () const { return Intersect_2(*this); }
|
||||||
|
|
||||||
class Are_mergeable_2 {
|
class Are_mergeable_2 {
|
||||||
public:
|
public:
|
||||||
/*! Check whether it is possible to merge two given \f$x\f$-monotone curves.
|
/*! checks whether it is possible to merge two given \f$x\f$-monotone curves.
|
||||||
* \param cv1 The first curve.
|
* \param cv1 The first curve.
|
||||||
* \param cv2 The second curve.
|
* \param cv2 The second curve.
|
||||||
* \return (true) if the two curves are mergeable - if they are supported
|
* \return (true) if the two curves are mergeable - if they are supported
|
||||||
|
|
@ -1451,7 +1450,7 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/*! Obtain an Are_mergeable_2 functor object. */
|
/*! obtains an Are_mergeable_2 functor object. */
|
||||||
Are_mergeable_2 are_mergeable_2_object () const { return Are_mergeable_2(); }
|
Are_mergeable_2 are_mergeable_2_object () const { return Are_mergeable_2(); }
|
||||||
|
|
||||||
/*! \class Merge_2
|
/*! \class Merge_2
|
||||||
|
|
@ -1464,7 +1463,7 @@ public:
|
||||||
/*! The traits (in case it has state) */
|
/*! The traits (in case it has state) */
|
||||||
const Traits& m_traits;
|
const Traits& m_traits;
|
||||||
|
|
||||||
/*! Constructor
|
/*! constructs
|
||||||
* \param traits the traits (in case it has state)
|
* \param traits the traits (in case it has state)
|
||||||
*/
|
*/
|
||||||
Merge_2(const Traits& traits) : m_traits(traits) {}
|
Merge_2(const Traits& traits) : m_traits(traits) {}
|
||||||
|
|
@ -1472,7 +1471,7 @@ public:
|
||||||
friend class Arr_linear_traits_2<Kernel>;
|
friend class Arr_linear_traits_2<Kernel>;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/*! Merge two given \f$x\f$-monotone curves into a single curve (segment).
|
/*! merges two given \f$x\f$-monotone curves into a single curve (segment).
|
||||||
* \param cv1 The first curve.
|
* \param cv1 The first curve.
|
||||||
* \param cv2 The second curve.
|
* \param cv2 The second curve.
|
||||||
* \param c Output: The merged curve.
|
* \param c Output: The merged curve.
|
||||||
|
|
@ -1512,7 +1511,7 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/*! Obtain a `Merge_2` functor object. */
|
/*! obtains a `Merge_2` functor object. */
|
||||||
Merge_2 merge_2_object() const { return Merge_2(*this); }
|
Merge_2 merge_2_object() const { return Merge_2(*this); }
|
||||||
//@}
|
//@}
|
||||||
|
|
||||||
|
|
@ -1522,7 +1521,7 @@ public:
|
||||||
|
|
||||||
class Approximate_2 {
|
class Approximate_2 {
|
||||||
public:
|
public:
|
||||||
/*! Obtain an approximation of a point coordinate.
|
/*! obtains an approximation of a point coordinate.
|
||||||
* \param p The exact point.
|
* \param p The exact point.
|
||||||
* \param i The coordinate index (either 0 or 1).
|
* \param i The coordinate index (either 0 or 1).
|
||||||
* \pre `i` is either 0 or 1.
|
* \pre `i` is either 0 or 1.
|
||||||
|
|
@ -1536,13 +1535,13 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/*! Obtain an `Approximate_2` functor object. */
|
/*! obtains an `Approximate_2` functor object. */
|
||||||
Approximate_2 approximate_2_object() const { return Approximate_2(); }
|
Approximate_2 approximate_2_object() const { return Approximate_2(); }
|
||||||
|
|
||||||
//! Functor
|
//! Functor
|
||||||
class Construct_x_monotone_curve_2 {
|
class Construct_x_monotone_curve_2 {
|
||||||
public:
|
public:
|
||||||
/*! Obtain an \f$x\f$-monotone curve connecting the two given endpoints.
|
/*! obtains an \f$x\f$-monotone curve connecting the two given endpoints.
|
||||||
* \param p The first point.
|
* \param p The first point.
|
||||||
* \param q The second point.
|
* \param q The second point.
|
||||||
* \pre p and q must not be the same.
|
* \pre p and q must not be the same.
|
||||||
|
|
@ -1557,7 +1556,7 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/*! Obtain a `Construct_x_monotone_curve_2` functor object. */
|
/*! obtains a `Construct_x_monotone_curve_2` functor object. */
|
||||||
Construct_x_monotone_curve_2 construct_x_monotone_curve_2_object() const
|
Construct_x_monotone_curve_2 construct_x_monotone_curve_2_object() const
|
||||||
{ return Construct_x_monotone_curve_2(); }
|
{ return Construct_x_monotone_curve_2(); }
|
||||||
//@}
|
//@}
|
||||||
|
|
@ -1568,14 +1567,13 @@ public:
|
||||||
//! Functor
|
//! Functor
|
||||||
typedef Construct_x_monotone_curve_2 Construct_curve_2;
|
typedef Construct_x_monotone_curve_2 Construct_curve_2;
|
||||||
|
|
||||||
/*! Obtain a `Construct_curve_2` functor object. */
|
/*! obtains a `Construct_curve_2` functor object. */
|
||||||
Construct_curve_2 construct_curve_2_object() const
|
Construct_curve_2 construct_curve_2_object() const
|
||||||
{ return Construct_x_monotone_curve_2(*this); }
|
{ return Construct_x_monotone_curve_2(*this); }
|
||||||
//@}
|
//@}
|
||||||
};
|
};
|
||||||
|
|
||||||
/*!
|
/*! \class A representation of a segment, as used by the Arr_segment_traits_2
|
||||||
* \class A representation of a segment, as used by the Arr_segment_traits_2
|
|
||||||
* traits-class.
|
* traits-class.
|
||||||
*/
|
*/
|
||||||
template <typename Kernel_>
|
template <typename Kernel_>
|
||||||
|
|
@ -1594,41 +1592,41 @@ public:
|
||||||
typedef typename Kernel::Line_2 Line_2;
|
typedef typename Kernel::Line_2 Line_2;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/*! Default constructor.
|
/*! constructs default.
|
||||||
*/
|
*/
|
||||||
Arr_linear_object_2() : Base() {}
|
Arr_linear_object_2() : Base() {}
|
||||||
|
|
||||||
/*! Constructor from two points.
|
/*! constructs from two points.
|
||||||
* \param s The source point.
|
* \param s The source point.
|
||||||
* \param t The target point.
|
* \param t The target point.
|
||||||
* \pre The two points must not be the same.
|
* \pre The two points must not be the same.
|
||||||
*/
|
*/
|
||||||
Arr_linear_object_2(const Point_2& s, const Point_2& t) : Base(s, t) {}
|
Arr_linear_object_2(const Point_2& s, const Point_2& t) : Base(s, t) {}
|
||||||
|
|
||||||
/*! Constructor from a segment.
|
/*! constructs from a segment.
|
||||||
* \param seg The segment.
|
* \param seg The segment.
|
||||||
* \pre The segment is not degenerate.
|
* \pre The segment is not degenerate.
|
||||||
*/
|
*/
|
||||||
Arr_linear_object_2(const Segment_2& seg) : Base(seg) {}
|
Arr_linear_object_2(const Segment_2& seg) : Base(seg) {}
|
||||||
|
|
||||||
/*! Constructor from a ray.
|
/*! constructs from a ray.
|
||||||
* \param ray The segment.
|
* \param ray The segment.
|
||||||
* \pre The ray is not degenerate.
|
* \pre The ray is not degenerate.
|
||||||
*/
|
*/
|
||||||
Arr_linear_object_2(const Ray_2& ray) : Base(ray) {}
|
Arr_linear_object_2(const Ray_2& ray) : Base(ray) {}
|
||||||
|
|
||||||
/*! Constructor from a line.
|
/*! constructs from a line.
|
||||||
* \param line The line.
|
* \param line The line.
|
||||||
* \pre The line is not degenerate.
|
* \pre The line is not degenerate.
|
||||||
*/
|
*/
|
||||||
Arr_linear_object_2(const Line_2& line) : Base(line) {}
|
Arr_linear_object_2(const Line_2& line) : Base(line) {}
|
||||||
|
|
||||||
/*! Check whether the object is actually a segment.
|
/*! checks whether the object is actually a segment.
|
||||||
*/
|
*/
|
||||||
bool is_segment() const
|
bool is_segment() const
|
||||||
{ return (! this->is_degen && this->has_source && this->has_target); }
|
{ return (! this->is_degen && this->has_source && this->has_target); }
|
||||||
|
|
||||||
/*! Cast to a segment.
|
/*! casts to a segment.
|
||||||
* \pre The linear object is really a segment.
|
* \pre The linear object is really a segment.
|
||||||
*/
|
*/
|
||||||
Segment_2 segment() const
|
Segment_2 segment() const
|
||||||
|
|
@ -1640,12 +1638,12 @@ public:
|
||||||
return seg;
|
return seg;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Check whether the object is actually a ray.
|
/*! checks whether the object is actually a ray.
|
||||||
*/
|
*/
|
||||||
bool is_ray() const
|
bool is_ray() const
|
||||||
{ return (! this->is_degen && (this->has_source != this->has_target)); }
|
{ return (! this->is_degen && (this->has_source != this->has_target)); }
|
||||||
|
|
||||||
/*! Cast to a ray.
|
/*! casts to a ray.
|
||||||
* \pre The linear object is really a ray.
|
* \pre The linear object is really a ray.
|
||||||
*/
|
*/
|
||||||
Ray_2 ray() const
|
Ray_2 ray() const
|
||||||
|
|
@ -1660,12 +1658,12 @@ public:
|
||||||
return ray;
|
return ray;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Check whether the object is actually a line.
|
/*! checks whether the object is actually a line.
|
||||||
*/
|
*/
|
||||||
bool is_line() const
|
bool is_line() const
|
||||||
{ return (! this->is_degen && ! this->has_source && ! this->has_target); }
|
{ return (! this->is_degen && ! this->has_source && ! this->has_target); }
|
||||||
|
|
||||||
/*! Cast to a line.
|
/*! casts to a line.
|
||||||
* \pre The linear object is really a line.
|
* \pre The linear object is really a line.
|
||||||
*/
|
*/
|
||||||
Line_2 line() const
|
Line_2 line() const
|
||||||
|
|
@ -1674,7 +1672,7 @@ public:
|
||||||
return (this->l);
|
return (this->l);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Get the supporting line.
|
/*! obtains the supporting line.
|
||||||
* \pre The object is not a point.
|
* \pre The object is not a point.
|
||||||
*/
|
*/
|
||||||
const Line_2& supporting_line() const
|
const Line_2& supporting_line() const
|
||||||
|
|
@ -1683,7 +1681,7 @@ public:
|
||||||
return (this->l);
|
return (this->l);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Get the source point.
|
/*! obtains the source point.
|
||||||
* \pre The object is a point, a segment or a ray.
|
* \pre The object is a point, a segment or a ray.
|
||||||
*/
|
*/
|
||||||
const Point_2& source() const
|
const Point_2& source() const
|
||||||
|
|
@ -1695,7 +1693,7 @@ public:
|
||||||
else return (this->pt); // For a "flipped" ray.
|
else return (this->pt); // For a "flipped" ray.
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Get the target point.
|
/*! obtains the target point.
|
||||||
* \pre The object is a point or a segment.
|
* \pre The object is a point or a segment.
|
||||||
*/
|
*/
|
||||||
const Point_2& target() const
|
const Point_2& target() const
|
||||||
|
|
@ -1704,7 +1702,7 @@ public:
|
||||||
return (this->pt);
|
return (this->pt);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Create a bounding box for the linear object.
|
/*! creates a bounding box for the linear object.
|
||||||
*/
|
*/
|
||||||
Bbox_2 bbox() const
|
Bbox_2 bbox() const
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -73,9 +73,8 @@ public:
|
||||||
typedef Arr_oblivious_side_tag Top_side_category;
|
typedef Arr_oblivious_side_tag Top_side_category;
|
||||||
typedef Arr_oblivious_side_tag Right_side_category;
|
typedef Arr_oblivious_side_tag Right_side_category;
|
||||||
|
|
||||||
/*! Default Constructor */
|
/*! constructs default */
|
||||||
Arr_non_caching_segment_basic_traits_2()
|
Arr_non_caching_segment_basic_traits_2() {}
|
||||||
{}
|
|
||||||
|
|
||||||
/// \name Types and functor inherited from the kernel
|
/// \name Types and functor inherited from the kernel
|
||||||
//@{
|
//@{
|
||||||
|
|
@ -116,8 +115,7 @@ public:
|
||||||
*/
|
*/
|
||||||
class Compare_y_at_x_left_2 {
|
class Compare_y_at_x_left_2 {
|
||||||
public:
|
public:
|
||||||
|
/* compares the \f$y\f$-value of two segments immediately to the left of
|
||||||
/* Compare the \f$y\f$-value of two segments immediately to the left of
|
|
||||||
* their intersection point.
|
* their intersection point.
|
||||||
* \param cv1 The first segment.
|
* \param cv1 The first segment.
|
||||||
* \param cv2 The second segment.
|
* \param cv2 The second segment.
|
||||||
|
|
@ -163,19 +161,16 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/*! Obtain a Compare_y_at_x_left_2 functor object. */
|
/*! obtains a `Compare_y_at_x_left_2` functor object. */
|
||||||
Compare_y_at_x_left_2 compare_y_at_x_left_2_object() const
|
Compare_y_at_x_left_2 compare_y_at_x_left_2_object() const
|
||||||
{
|
{ return Compare_y_at_x_left_2(); }
|
||||||
return Compare_y_at_x_left_2();
|
|
||||||
}
|
|
||||||
|
|
||||||
/*! \class
|
/*! \class
|
||||||
* A functor for comparing two segments to the right of a point.
|
* A functor for comparing two segments to the right of a point.
|
||||||
*/
|
*/
|
||||||
class Compare_y_at_x_right_2 {
|
class Compare_y_at_x_right_2 {
|
||||||
public:
|
public:
|
||||||
|
/*! compares the \f$y\f$-value of two segments immediately to the right of
|
||||||
/*! Compare the \f$y\f$-value of two segments immediately to the right of
|
|
||||||
* their intersection point.
|
* their intersection point.
|
||||||
* \param cv1 The first segment.
|
* \param cv1 The first segment.
|
||||||
* \param cv2 The second segment.
|
* \param cv2 The second segment.
|
||||||
|
|
@ -220,11 +215,9 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/*! Obtain a `Compare_y_at_x_right_2` functor object. */
|
/*! obtains a `Compare_y_at_x_right_2` functor object. */
|
||||||
Compare_y_at_x_right_2 compare_y_at_x_right_2_object() const
|
Compare_y_at_x_right_2 compare_y_at_x_right_2_object() const
|
||||||
{
|
{ return Compare_y_at_x_right_2(); }
|
||||||
return Compare_y_at_x_right_2();
|
|
||||||
}
|
|
||||||
//@}
|
//@}
|
||||||
|
|
||||||
/// \name Functor definitions for the landmarks point-location strategy.
|
/// \name Functor definitions for the landmarks point-location strategy.
|
||||||
|
|
@ -240,7 +233,7 @@ public:
|
||||||
/*! The traits (in case it has state) */
|
/*! The traits (in case it has state) */
|
||||||
const Traits& m_traits;
|
const Traits& m_traits;
|
||||||
|
|
||||||
/*! Constructor
|
/*! constructs
|
||||||
* \param traits the traits.
|
* \param traits the traits.
|
||||||
*/
|
*/
|
||||||
Approximate_2(const Traits& traits) : m_traits(traits) {}
|
Approximate_2(const Traits& traits) : m_traits(traits) {}
|
||||||
|
|
@ -248,7 +241,7 @@ public:
|
||||||
friend class Arr_non_caching_segment_basic_traits_2<Kernel>;
|
friend class Arr_non_caching_segment_basic_traits_2<Kernel>;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/*! Return an approximation of a point coordinate.
|
/*! obtains an approximation of a point coordinate.
|
||||||
* \param p The exact point.
|
* \param p The exact point.
|
||||||
* \param i The coordinate index (either 0 or 1).
|
* \param i The coordinate index (either 0 or 1).
|
||||||
* \pre `i` is either 0 or 1.
|
* \pre `i` is either 0 or 1.
|
||||||
|
|
@ -260,12 +253,12 @@ public:
|
||||||
return (i == 0) ? (CGAL::to_double(p.x())) : (CGAL::to_double(p.y()));
|
return (i == 0) ? (CGAL::to_double(p.x())) : (CGAL::to_double(p.y()));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Obtain an approximation of a point.
|
/*! obtains an approximation of a point.
|
||||||
*/
|
*/
|
||||||
Approximate_point_2 operator()(const Point_2& p) const
|
Approximate_point_2 operator()(const Point_2& p) const
|
||||||
{ return Approximate_point_2(operator()(p, 0), operator()(p, 1)); }
|
{ return Approximate_point_2(operator()(p, 0), operator()(p, 1)); }
|
||||||
|
|
||||||
/*! Obtain an approximation of an \f$x\f$-monotone curve.
|
/*! obtains an approximation of an \f$x\f$-monotone curve.
|
||||||
*/
|
*/
|
||||||
template <typename OutputIterator>
|
template <typename OutputIterator>
|
||||||
OutputIterator operator()(const X_monotone_curve_2& xcv, double /* error */,
|
OutputIterator operator()(const X_monotone_curve_2& xcv, double /* error */,
|
||||||
|
|
@ -284,20 +277,18 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/*! Get an Approximate_2 functor object. */
|
/*! obtains an Approximate_2 functor object. */
|
||||||
Approximate_2 approximate_2_object () const { return Approximate_2(*this); }
|
Approximate_2 approximate_2_object () const { return Approximate_2(*this); }
|
||||||
|
|
||||||
typedef typename Kernel::Construct_segment_2 Construct_x_monotone_curve_2;
|
typedef typename Kernel::Construct_segment_2 Construct_x_monotone_curve_2;
|
||||||
|
|
||||||
/*! Get a `Construct_x_monotone_curve_2` functor object. */
|
/*! obtains a `Construct_x_monotone_curve_2` functor object. */
|
||||||
Construct_x_monotone_curve_2 construct_x_monotone_curve_2_object () const
|
Construct_x_monotone_curve_2 construct_x_monotone_curve_2_object () const
|
||||||
{
|
{ return (this->construct_segment_2_object()); }
|
||||||
return (this->construct_segment_2_object());
|
|
||||||
}
|
|
||||||
//@}
|
//@}
|
||||||
};
|
};
|
||||||
|
|
||||||
} //namespace CGAL
|
} // namespace CGAL
|
||||||
|
|
||||||
#include <CGAL/enable_warnings.h>
|
#include <CGAL/enable_warnings.h>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -52,7 +52,7 @@ public:
|
||||||
typedef typename Base::Segment_assertions Segment_assertions;
|
typedef typename Base::Segment_assertions Segment_assertions;
|
||||||
typedef typename Base::Has_exact_division Has_exact_division;
|
typedef typename Base::Has_exact_division Has_exact_division;
|
||||||
|
|
||||||
/*! Default constructor */
|
/*! constructs default */
|
||||||
Arr_non_caching_segment_traits_2() : Base() {}
|
Arr_non_caching_segment_traits_2() : Base() {}
|
||||||
|
|
||||||
/// \name Types and functors inherited from the base
|
/// \name Types and functors inherited from the base
|
||||||
|
|
@ -118,7 +118,7 @@ public:
|
||||||
*/
|
*/
|
||||||
class Make_x_monotone_2 {
|
class Make_x_monotone_2 {
|
||||||
public:
|
public:
|
||||||
/*! Subdivide a given curve into x-monotone subcurves and insert them into
|
/*! subdivides a given curve into x-monotone subcurves and insert them into
|
||||||
* a given output iterator. As segments are always x_monotone, only one
|
* a given output iterator. As segments are always x_monotone, only one
|
||||||
* x-monotone curve is inserted into the output iterator.
|
* x-monotone curve is inserted into the output iterator.
|
||||||
* \param cv the segment.
|
* \param cv the segment.
|
||||||
|
|
@ -138,7 +138,7 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/*! Obtain a Make_x_monotone_2 functor object. */
|
/*! obtains a Make_x_monotone_2 functor object. */
|
||||||
Make_x_monotone_2 make_x_monotone_2_object() const
|
Make_x_monotone_2 make_x_monotone_2_object() const
|
||||||
{ return Make_x_monotone_2(); }
|
{ return Make_x_monotone_2(); }
|
||||||
|
|
||||||
|
|
@ -149,7 +149,7 @@ public:
|
||||||
typedef Arr_non_caching_segment_traits_2<Kernel_T> Self;
|
typedef Arr_non_caching_segment_traits_2<Kernel_T> Self;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/*! Split a given x-monotone curve at a given point into two sub-curves.
|
/*! splits a given x-monotone curve at a given point into two sub-curves.
|
||||||
* \param cv The curve to split
|
* \param cv The curve to split
|
||||||
* \param p The split point.
|
* \param p The split point.
|
||||||
* \param c1 Output: The left resulting subcurve (p is its right endpoint).
|
* \param c1 Output: The left resulting subcurve (p is its right endpoint).
|
||||||
|
|
@ -189,7 +189,7 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/*! Obtain a Split_2 functor object. */
|
/*! obtains a Split_2 functor object. */
|
||||||
Split_2 split_2_object() const { return Split_2(); }
|
Split_2 split_2_object() const { return Split_2(); }
|
||||||
|
|
||||||
/*! \class
|
/*! \class
|
||||||
|
|
@ -202,7 +202,7 @@ public:
|
||||||
/*! The traits (in case it has state) */
|
/*! The traits (in case it has state) */
|
||||||
const Traits& m_traits;
|
const Traits& m_traits;
|
||||||
|
|
||||||
/*! Constructor
|
/*! constructs
|
||||||
* \param traits the traits (in case it has state)
|
* \param traits the traits (in case it has state)
|
||||||
*/
|
*/
|
||||||
Intersect_2(const Traits& traits) : m_traits(traits) {}
|
Intersect_2(const Traits& traits) : m_traits(traits) {}
|
||||||
|
|
@ -210,7 +210,7 @@ public:
|
||||||
friend class Arr_non_caching_segment_traits_2<Kernel>;
|
friend class Arr_non_caching_segment_traits_2<Kernel>;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/*! Find the intersections of the two given segments and insert them into
|
/*! finds the intersections of the two given segments and insert them into
|
||||||
* the given output iterator. As two segments may itersect only once, only
|
* the given output iterator. As two segments may itersect only once, only
|
||||||
* a single intersection will be contained in the iterator.
|
* a single intersection will be contained in the iterator.
|
||||||
* \param cv1 The first curve.
|
* \param cv1 The first curve.
|
||||||
|
|
@ -264,7 +264,7 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/*! Obtain an Intersect_2 functor object. */
|
/*! obtains an Intersect_2 functor object. */
|
||||||
Intersect_2 intersect_2_object() const { return Intersect_2(*this); }
|
Intersect_2 intersect_2_object() const { return Intersect_2(*this); }
|
||||||
|
|
||||||
/*! \class
|
/*! \class
|
||||||
|
|
@ -277,7 +277,7 @@ public:
|
||||||
/*! The traits (in case it has state) */
|
/*! The traits (in case it has state) */
|
||||||
const Traits* m_traits;
|
const Traits* m_traits;
|
||||||
|
|
||||||
/*! Constructor
|
/*! constructs
|
||||||
* \param traits the traits (in case it has state)
|
* \param traits the traits (in case it has state)
|
||||||
*/
|
*/
|
||||||
Are_mergeable_2(const Traits* traits) : m_traits(traits) {}
|
Are_mergeable_2(const Traits* traits) : m_traits(traits) {}
|
||||||
|
|
@ -285,7 +285,7 @@ public:
|
||||||
friend class Arr_non_caching_segment_traits_2<Kernel>;
|
friend class Arr_non_caching_segment_traits_2<Kernel>;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/*! Check whether it is possible to merge two given x-monotone curves.
|
/*! checks whether it is possible to merge two given x-monotone curves.
|
||||||
* \param cv1 The first curve.
|
* \param cv1 The first curve.
|
||||||
* \param cv2 The second curve.
|
* \param cv2 The second curve.
|
||||||
* \return (true) if the two curves are mergeable, that is, if they are
|
* \return (true) if the two curves are mergeable, that is, if they are
|
||||||
|
|
@ -308,7 +308,7 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/*! Obtain an Are_mergeable_2 functor object */
|
/*! obtains an Are_mergeable_2 functor object */
|
||||||
Are_mergeable_2 are_mergeable_2_object() const
|
Are_mergeable_2 are_mergeable_2_object() const
|
||||||
{ return Are_mergeable_2(this); }
|
{ return Are_mergeable_2(this); }
|
||||||
|
|
||||||
|
|
@ -322,7 +322,7 @@ public:
|
||||||
/*! The traits (in case it has state) */
|
/*! The traits (in case it has state) */
|
||||||
const Traits* m_traits;
|
const Traits* m_traits;
|
||||||
|
|
||||||
/*! Constructor
|
/*! constructs
|
||||||
* \param traits the traits (in case it has state)
|
* \param traits the traits (in case it has state)
|
||||||
*/
|
*/
|
||||||
Merge_2(const Traits* traits) : m_traits(traits) {}
|
Merge_2(const Traits* traits) : m_traits(traits) {}
|
||||||
|
|
@ -330,7 +330,7 @@ public:
|
||||||
friend class Arr_non_caching_segment_traits_2<Kernel>;
|
friend class Arr_non_caching_segment_traits_2<Kernel>;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/*! Merge two given segments into a single segment.
|
/*! merges two given segments into a single segment.
|
||||||
* \param cv1 The first curve.
|
* \param cv1 The first curve.
|
||||||
* \param cv2 The second curve.
|
* \param cv2 The second curve.
|
||||||
* \param c Output: The merged curve.
|
* \param c Output: The merged curve.
|
||||||
|
|
@ -365,7 +365,7 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/*! Obtain a Merge_2 functor object */
|
/*! obtains a Merge_2 functor object */
|
||||||
Merge_2 merge_2_object() const { return Merge_2(this); }
|
Merge_2 merge_2_object() const { return Merge_2(this); }
|
||||||
//@}
|
//@}
|
||||||
|
|
||||||
|
|
@ -373,14 +373,13 @@ public:
|
||||||
//@{
|
//@{
|
||||||
typedef typename Kernel::Construct_opposite_segment_2 Construct_opposite_2;
|
typedef typename Kernel::Construct_opposite_segment_2 Construct_opposite_2;
|
||||||
|
|
||||||
/*! Obtain a Construct_opposite_2 functor object */
|
/*! obtains a Construct_opposite_2 functor object */
|
||||||
Construct_opposite_2 construct_opposite_2_object() const
|
Construct_opposite_2 construct_opposite_2_object() const
|
||||||
{ return Construct_opposite_2(); }
|
{ return Construct_opposite_2(); }
|
||||||
|
|
||||||
class Compare_endpoints_xy_2 {
|
class Compare_endpoints_xy_2 {
|
||||||
public:
|
public:
|
||||||
/*!
|
/*! compares the two endpoints of a given curve lexigoraphically.
|
||||||
* Compare the two endpoints of a given curve lexigoraphically.
|
|
||||||
* \param cv The curve.
|
* \param cv The curve.
|
||||||
* \return SMALLER if cv is directed from left to right and LARGER
|
* \return SMALLER if cv is directed from left to right and LARGER
|
||||||
* otherwise.
|
* otherwise.
|
||||||
|
|
@ -397,7 +396,7 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/*! Obtain a Compare_endpoints_xy_2 functor object */
|
/*! obtains a Compare_endpoints_xy_2 functor object */
|
||||||
Compare_endpoints_xy_2 compare_endpoints_xy_2_object() const
|
Compare_endpoints_xy_2 compare_endpoints_xy_2_object() const
|
||||||
{ return Compare_endpoints_xy_2(); }
|
{ return Compare_endpoints_xy_2(); }
|
||||||
//@}
|
//@}
|
||||||
|
|
@ -408,14 +407,14 @@ public:
|
||||||
//! Functor
|
//! Functor
|
||||||
typedef typename Kernel::Construct_segment_2 Construct_curve_2;
|
typedef typename Kernel::Construct_segment_2 Construct_curve_2;
|
||||||
|
|
||||||
/*! Obtain a Construct_curve_2 functor object. */
|
/*! obtains a Construct_curve_2 functor object. */
|
||||||
Construct_curve_2 construct_curve_2_object() const
|
Construct_curve_2 construct_curve_2_object() const
|
||||||
{ return this->construct_segment_2_object(); }
|
{ return this->construct_segment_2_object(); }
|
||||||
|
|
||||||
//@}
|
//@}
|
||||||
};
|
};
|
||||||
|
|
||||||
} //namespace CGAL
|
} // namespace CGAL
|
||||||
|
|
||||||
#include <CGAL/enable_warnings.h>
|
#include <CGAL/enable_warnings.h>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -77,7 +77,7 @@ protected:
|
||||||
const Base_traits_2* m_base_traits;
|
const Base_traits_2* m_base_traits;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/*! Constructor. */
|
/*! constructs. */
|
||||||
Arr_batched_point_location_traits_2(const Base_traits_2& tr) :
|
Arr_batched_point_location_traits_2(const Base_traits_2& tr) :
|
||||||
m_base_traits(&tr)
|
m_base_traits(&tr)
|
||||||
{}
|
{}
|
||||||
|
|
@ -184,7 +184,7 @@ public:
|
||||||
//! The base operator.
|
//! The base operator.
|
||||||
Base_construct_min_vertex_2 m_base_min_v;
|
Base_construct_min_vertex_2 m_base_min_v;
|
||||||
|
|
||||||
/*! Constructor.
|
/*! constructs.
|
||||||
* The constructor is declared private to allow only the functor
|
* The constructor is declared private to allow only the functor
|
||||||
* obtaining function, which is a member of the nesting class,
|
* obtaining function, which is a member of the nesting class,
|
||||||
* constructing it.
|
* constructing it.
|
||||||
|
|
@ -197,8 +197,7 @@ public:
|
||||||
friend class Arr_batched_point_location_traits_2<Arrangement_2>;
|
friend class Arr_batched_point_location_traits_2<Arrangement_2>;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/*!
|
/*! obtains the left endpoint of the x-monotone curve (segment).
|
||||||
* Get the left endpoint of the x-monotone curve (segment).
|
|
||||||
* \param xcv The curve.
|
* \param xcv The curve.
|
||||||
* \return The left endpoint.
|
* \return The left endpoint.
|
||||||
*/
|
*/
|
||||||
|
|
@ -211,7 +210,7 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/*! Obtain a Construct_min_vertex_2 functor object. */
|
/*! obtains a Construct_min_vertex_2 functor object. */
|
||||||
Construct_min_vertex_2 construct_min_vertex_2_object() const
|
Construct_min_vertex_2 construct_min_vertex_2_object() const
|
||||||
{
|
{
|
||||||
return
|
return
|
||||||
|
|
@ -224,7 +223,7 @@ public:
|
||||||
//! The base operator.
|
//! The base operator.
|
||||||
Base_construct_max_vertex_2 m_base_max_v;
|
Base_construct_max_vertex_2 m_base_max_v;
|
||||||
|
|
||||||
/*! Constructor.
|
/*! constructs.
|
||||||
* The constructor is declared private to allow only the functor
|
* The constructor is declared private to allow only the functor
|
||||||
* obtaining function, which is a member of the nesting class,
|
* obtaining function, which is a member of the nesting class,
|
||||||
* constructing it.
|
* constructing it.
|
||||||
|
|
@ -237,8 +236,7 @@ public:
|
||||||
friend class Arr_batched_point_location_traits_2<Arrangement_2>;
|
friend class Arr_batched_point_location_traits_2<Arrangement_2>;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/*!
|
/*! obtains the right endpoint of the x-monotone curve .
|
||||||
* Get the right endpoint of the x-monotone curve .
|
|
||||||
* \param xcv The curve.
|
* \param xcv The curve.
|
||||||
* \return The right endpoint.
|
* \return The right endpoint.
|
||||||
*/
|
*/
|
||||||
|
|
@ -251,7 +249,7 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/*! Obtain a Construct_min_vertex_2 functor object. */
|
/*! obtains a Construct_min_vertex_2 functor object. */
|
||||||
Construct_max_vertex_2 construct_max_vertex_2_object() const
|
Construct_max_vertex_2 construct_max_vertex_2_object() const
|
||||||
{
|
{
|
||||||
return
|
return
|
||||||
|
|
@ -266,7 +264,7 @@ public:
|
||||||
|
|
||||||
Vertex_const_handle invalid_v;
|
Vertex_const_handle invalid_v;
|
||||||
|
|
||||||
/*! Constructor.
|
/*! constructs.
|
||||||
* The constructor is declared private to allow only the functor
|
* The constructor is declared private to allow only the functor
|
||||||
* obtaining function, which is a member of the nesting class,
|
* obtaining function, which is a member of the nesting class,
|
||||||
* constructing it.
|
* constructing it.
|
||||||
|
|
@ -280,8 +278,7 @@ public:
|
||||||
friend class Arr_batched_point_location_traits_2<Arrangement_2>;
|
friend class Arr_batched_point_location_traits_2<Arrangement_2>;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/*!
|
/*! obtains the left endpoint of the x-monotone curve (segment).
|
||||||
* Get the left endpoint of the x-monotone curve (segment).
|
|
||||||
* \param xcv The curve.
|
* \param xcv The curve.
|
||||||
* \return The left endpoint.
|
* \return The left endpoint.
|
||||||
*/
|
*/
|
||||||
|
|
@ -295,7 +292,7 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/*! Obtain a Construct_min_vertex_2 functor object. */
|
/*! obtains a Construct_min_vertex_2 functor object. */
|
||||||
Compare_xy_2 compare_xy_2_object() const
|
Compare_xy_2 compare_xy_2_object() const
|
||||||
{ return Compare_xy_2(m_base_traits->compare_xy_2_object()); }
|
{ return Compare_xy_2(m_base_traits->compare_xy_2_object()); }
|
||||||
|
|
||||||
|
|
@ -307,7 +304,7 @@ public:
|
||||||
//! The base operator.
|
//! The base operator.
|
||||||
Base_compare_y_at_x_2 m_base_cmp_y_at_x;
|
Base_compare_y_at_x_2 m_base_cmp_y_at_x;
|
||||||
|
|
||||||
/*! Constructor.
|
/*! constructs.
|
||||||
* The constructor is declared private to allow only the functor
|
* The constructor is declared private to allow only the functor
|
||||||
* obtaining function, which is a member of the nesting class,
|
* obtaining function, which is a member of the nesting class,
|
||||||
* constructing it.
|
* constructing it.
|
||||||
|
|
@ -325,7 +322,7 @@ public:
|
||||||
{ return (m_base_cmp_y_at_x(p.base(), xcv.base())); }
|
{ return (m_base_cmp_y_at_x(p.base(), xcv.base())); }
|
||||||
};
|
};
|
||||||
|
|
||||||
/*! Obtain a Compare_y_at_x_2 function object. */
|
/*! obtains a Compare_y_at_x_2 function object. */
|
||||||
Compare_y_at_x_2 compare_y_at_x_2_object() const
|
Compare_y_at_x_2 compare_y_at_x_2_object() const
|
||||||
{ return (Compare_y_at_x_2(m_base_traits->compare_y_at_x_2_object())); }
|
{ return (Compare_y_at_x_2(m_base_traits->compare_y_at_x_2_object())); }
|
||||||
|
|
||||||
|
|
@ -337,7 +334,7 @@ public:
|
||||||
//! The base operator.
|
//! The base operator.
|
||||||
Base_compare_y_at_x_right_2 m_base_cmp_y_at_x_right;
|
Base_compare_y_at_x_right_2 m_base_cmp_y_at_x_right;
|
||||||
|
|
||||||
/*! Constructor.
|
/*! constructs.
|
||||||
* The constructor is declared private to allow only the functor
|
* The constructor is declared private to allow only the functor
|
||||||
* obtaining function, which is a member of the nesting class,
|
* obtaining function, which is a member of the nesting class,
|
||||||
* constructing it.
|
* constructing it.
|
||||||
|
|
@ -356,7 +353,7 @@ public:
|
||||||
{ return (m_base_cmp_y_at_x_right(xcv1.base(), xcv2.base(), p.base())); }
|
{ return (m_base_cmp_y_at_x_right(xcv1.base(), xcv2.base(), p.base())); }
|
||||||
};
|
};
|
||||||
|
|
||||||
/*! Obtain a Compare_y_at_x_right_2 function object. */
|
/*! obtains a Compare_y_at_x_right_2 function object. */
|
||||||
Compare_y_at_x_right_2 compare_y_at_x_right_2_object() const
|
Compare_y_at_x_right_2 compare_y_at_x_right_2_object() const
|
||||||
{
|
{
|
||||||
return (Compare_y_at_x_right_2
|
return (Compare_y_at_x_right_2
|
||||||
|
|
@ -374,7 +371,7 @@ public:
|
||||||
Vertex_const_handle invalid_v;
|
Vertex_const_handle invalid_v;
|
||||||
Halfedge_const_handle invalid_he;
|
Halfedge_const_handle invalid_he;
|
||||||
|
|
||||||
/*! Constructor.
|
/*! constructs.
|
||||||
* The constructor is declared private to allow only the functor
|
* The constructor is declared private to allow only the functor
|
||||||
* obtaining function, which is a member of the nesting class,
|
* obtaining function, which is a member of the nesting class,
|
||||||
* constructing it.
|
* constructing it.
|
||||||
|
|
@ -389,7 +386,7 @@ public:
|
||||||
friend class Arr_batched_point_location_traits_2<Arrangement_2>;
|
friend class Arr_batched_point_location_traits_2<Arrangement_2>;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/*! Check if two curves are the same. */
|
/*! checks if two curves are the same. */
|
||||||
bool operator()(const X_monotone_curve_2& xcv1,
|
bool operator()(const X_monotone_curve_2& xcv1,
|
||||||
const X_monotone_curve_2& xcv2) const
|
const X_monotone_curve_2& xcv2) const
|
||||||
{
|
{
|
||||||
|
|
@ -400,7 +397,7 @@ public:
|
||||||
return (m_base_eq(xcv1.base(), xcv2.base()));
|
return (m_base_eq(xcv1.base(), xcv2.base()));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Check if the two points are the same. */
|
/*! checks if the two points are the same. */
|
||||||
bool operator()(const Point_2& p1, const Point_2& p2) const
|
bool operator()(const Point_2& p1, const Point_2& p2) const
|
||||||
{
|
{
|
||||||
if (p1.vertex_handle() == p2.vertex_handle() &&
|
if (p1.vertex_handle() == p2.vertex_handle() &&
|
||||||
|
|
@ -411,7 +408,7 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/*! Obtain an `Equal_2` function object. */
|
/*! obtains an `Equal_2` function object. */
|
||||||
Equal_2 equal_2_object() const
|
Equal_2 equal_2_object() const
|
||||||
{ return (Equal_2(m_base_traits->equal_2_object())); }
|
{ return (Equal_2(m_base_traits->equal_2_object())); }
|
||||||
|
|
||||||
|
|
@ -421,7 +418,7 @@ public:
|
||||||
//! The base operator.
|
//! The base operator.
|
||||||
Base_compare_x_2 m_base_cmp_x;
|
Base_compare_x_2 m_base_cmp_x;
|
||||||
|
|
||||||
/*! Constructor.
|
/*! constructs.
|
||||||
* The constructor is declared private to allow only the functor
|
* The constructor is declared private to allow only the functor
|
||||||
* obtaining function, which is a member of the nesting class,
|
* obtaining function, which is a member of the nesting class,
|
||||||
* constructing it.
|
* constructing it.
|
||||||
|
|
@ -436,7 +433,7 @@ public:
|
||||||
{ return (m_base_cmp_x(p1.base(), p2.base())); }
|
{ return (m_base_cmp_x(p1.base(), p2.base())); }
|
||||||
};
|
};
|
||||||
|
|
||||||
/*! Obtain a Compare_x_2 function object. */
|
/*! obtains a Compare_x_2 function object. */
|
||||||
Compare_x_2 compare_x_2_object() const
|
Compare_x_2 compare_x_2_object() const
|
||||||
{ return (Compare_x_2(m_base_traits->compare_x_2_object())); }
|
{ return (Compare_x_2(m_base_traits->compare_x_2_object())); }
|
||||||
|
|
||||||
|
|
@ -446,7 +443,7 @@ public:
|
||||||
//! The base operator.
|
//! The base operator.
|
||||||
Base_is_vertical_2 m_base_is_vert;
|
Base_is_vertical_2 m_base_is_vert;
|
||||||
|
|
||||||
/*! Constructor.
|
/*! constructs.
|
||||||
* The constructor is declared private to allow only the functor
|
* The constructor is declared private to allow only the functor
|
||||||
* obtaining function, which is a member of the nesting class,
|
* obtaining function, which is a member of the nesting class,
|
||||||
* constructing it.
|
* constructing it.
|
||||||
|
|
@ -461,7 +458,7 @@ public:
|
||||||
{ return (m_base_is_vert(xcv.base())); }
|
{ return (m_base_is_vert(xcv.base())); }
|
||||||
};
|
};
|
||||||
|
|
||||||
/*! Obtain a Is_vertical_2 function object. */
|
/*! obtains a Is_vertical_2 function object. */
|
||||||
Is_vertical_2 is_vertical_2_object() const
|
Is_vertical_2 is_vertical_2_object() const
|
||||||
{ return (Is_vertical_2(m_base_traits->is_vertical_2_object())); }
|
{ return (Is_vertical_2(m_base_traits->is_vertical_2_object())); }
|
||||||
|
|
||||||
|
|
@ -476,7 +473,7 @@ public:
|
||||||
//! The base traits.
|
//! The base traits.
|
||||||
const Base_traits_2* m_base;
|
const Base_traits_2* m_base;
|
||||||
|
|
||||||
/*! Constructor.
|
/*! constructs.
|
||||||
* The constructor is declared private to allow only the functor
|
* The constructor is declared private to allow only the functor
|
||||||
* obtaining function, which is a member of the nesting class,
|
* obtaining function, which is a member of the nesting class,
|
||||||
* constructing it.
|
* constructing it.
|
||||||
|
|
@ -498,7 +495,7 @@ public:
|
||||||
{ return m_base->parameter_space_in_x_2_object() (xcv.base()); }
|
{ return m_base->parameter_space_in_x_2_object() (xcv.base()); }
|
||||||
};
|
};
|
||||||
|
|
||||||
/*! Obtain a Parameter_space_in_x_2 function object */
|
/*! obtains a Parameter_space_in_x_2 function object */
|
||||||
Parameter_space_in_x_2 parameter_space_in_x_2_object() const
|
Parameter_space_in_x_2 parameter_space_in_x_2_object() const
|
||||||
{ return Parameter_space_in_x_2(m_base_traits); }
|
{ return Parameter_space_in_x_2(m_base_traits); }
|
||||||
|
|
||||||
|
|
@ -510,7 +507,7 @@ public:
|
||||||
//! The base traits.
|
//! The base traits.
|
||||||
const Base_traits_2* m_base;
|
const Base_traits_2* m_base;
|
||||||
|
|
||||||
/*! Constructor.
|
/*! constructs.
|
||||||
* The constructor is declared private to allow only the functor
|
* The constructor is declared private to allow only the functor
|
||||||
* obtaining function, which is a member of the nesting class,
|
* obtaining function, which is a member of the nesting class,
|
||||||
* constructing it.
|
* constructing it.
|
||||||
|
|
@ -528,7 +525,7 @@ public:
|
||||||
{ return m_base->is_on_x_identification_2_object()(xcv.base()); }
|
{ return m_base->is_on_x_identification_2_object()(xcv.base()); }
|
||||||
};
|
};
|
||||||
|
|
||||||
/*! Obtain a Is_on_x_identification_2 function object */
|
/*! obtains a Is_on_x_identification_2 function object */
|
||||||
Is_on_x_identification_2 is_on_x_identification_2_object() const
|
Is_on_x_identification_2 is_on_x_identification_2_object() const
|
||||||
{ return Is_on_x_identification_2(m_base_traits); }
|
{ return Is_on_x_identification_2(m_base_traits); }
|
||||||
|
|
||||||
|
|
@ -540,7 +537,7 @@ public:
|
||||||
//! The base traits.
|
//! The base traits.
|
||||||
const Base_traits_2* m_base;
|
const Base_traits_2* m_base;
|
||||||
|
|
||||||
/*! Constructor.
|
/*! constructs.
|
||||||
* \param tr The base traits class. It must be passed, to handle
|
* \param tr The base traits class. It must be passed, to handle
|
||||||
* non stateless traits (e.g., it stores data).
|
* non stateless traits (e.g., it stores data).
|
||||||
* The constructor is declared private to allow only the functor
|
* The constructor is declared private to allow only the functor
|
||||||
|
|
@ -574,7 +571,7 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/*! Obtain a Compare_y_on_boundary_2 functor object. */
|
/*! obtains a Compare_y_on_boundary_2 functor object. */
|
||||||
Compare_y_on_boundary_2 compare_y_on_boundary_2_object() const
|
Compare_y_on_boundary_2 compare_y_on_boundary_2_object() const
|
||||||
{ return Compare_y_on_boundary_2(m_base_traits); }
|
{ return Compare_y_on_boundary_2(m_base_traits); }
|
||||||
|
|
||||||
|
|
@ -586,7 +583,7 @@ public:
|
||||||
//! The base traits.
|
//! The base traits.
|
||||||
const Base_traits_2* m_base;
|
const Base_traits_2* m_base;
|
||||||
|
|
||||||
/*! Constructor.
|
/*! constructs.
|
||||||
* \param tr The base traits class. It must be passed, to handle
|
* \param tr The base traits class. It must be passed, to handle
|
||||||
* non stateless traits (e.g., it stores data).
|
* non stateless traits (e.g., it stores data).
|
||||||
* The constructor is declared private to allow only the functor
|
* The constructor is declared private to allow only the functor
|
||||||
|
|
@ -610,7 +607,7 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/*! Obtain a Compare_y_near_boundary_2 functor object. */
|
/*! obtains a Compare_y_near_boundary_2 functor object. */
|
||||||
Compare_y_near_boundary_2 compare_y_near_boundary_2_object() const
|
Compare_y_near_boundary_2 compare_y_near_boundary_2_object() const
|
||||||
{ return Compare_y_near_boundary_2(m_base_traits); }
|
{ return Compare_y_near_boundary_2(m_base_traits); }
|
||||||
|
|
||||||
|
|
@ -624,7 +621,7 @@ public:
|
||||||
//! The base traits.
|
//! The base traits.
|
||||||
const Base_traits_2* m_base;
|
const Base_traits_2* m_base;
|
||||||
|
|
||||||
/*! Constructor.
|
/*! constructs.
|
||||||
* The constructor is declared private to allow only the functor
|
* The constructor is declared private to allow only the functor
|
||||||
* obtaining function, which is a member of the nesting class,
|
* obtaining function, which is a member of the nesting class,
|
||||||
* constructing it.
|
* constructing it.
|
||||||
|
|
@ -646,7 +643,7 @@ public:
|
||||||
{ return m_base->parameter_space_in_y_2_object()(xcv.base()); }
|
{ return m_base->parameter_space_in_y_2_object()(xcv.base()); }
|
||||||
};
|
};
|
||||||
|
|
||||||
/*! Obtain a Parameter_space_in_y_2 function object */
|
/*! obtains a Parameter_space_in_y_2 function object */
|
||||||
Parameter_space_in_y_2 parameter_space_in_y_2_object() const
|
Parameter_space_in_y_2 parameter_space_in_y_2_object() const
|
||||||
{ return Parameter_space_in_y_2(m_base_traits); }
|
{ return Parameter_space_in_y_2(m_base_traits); }
|
||||||
|
|
||||||
|
|
@ -658,7 +655,7 @@ public:
|
||||||
//! The base traits.
|
//! The base traits.
|
||||||
const Base_traits_2* m_base;
|
const Base_traits_2* m_base;
|
||||||
|
|
||||||
/*! Constructor.
|
/*! constructs.
|
||||||
* The constructor is declared private to allow only the functor
|
* The constructor is declared private to allow only the functor
|
||||||
* obtaining function, which is a member of the nesting class,
|
* obtaining function, which is a member of the nesting class,
|
||||||
* constructing it.
|
* constructing it.
|
||||||
|
|
@ -676,7 +673,7 @@ public:
|
||||||
{ return m_base->is_on_y_identification_2_object()(xcv.base()); }
|
{ return m_base->is_on_y_identification_2_object()(xcv.base()); }
|
||||||
};
|
};
|
||||||
|
|
||||||
/*! Obtain a Is_on_y_identification_2 function object */
|
/*! obtains a Is_on_y_identification_2 function object */
|
||||||
Is_on_y_identification_2 is_on_y_identification_2_object() const
|
Is_on_y_identification_2 is_on_y_identification_2_object() const
|
||||||
{ return Is_on_y_identification_2(m_base_traits); }
|
{ return Is_on_y_identification_2(m_base_traits); }
|
||||||
|
|
||||||
|
|
@ -688,7 +685,7 @@ public:
|
||||||
//! The base traits.
|
//! The base traits.
|
||||||
const Base_traits_2* m_base;
|
const Base_traits_2* m_base;
|
||||||
|
|
||||||
/*! Constructor.
|
/*! constructs.
|
||||||
* \param tr The base traits class. It must be passed, to handle
|
* \param tr The base traits class. It must be passed, to handle
|
||||||
* non stateless traits (e.g., it stores data).
|
* non stateless traits (e.g., it stores data).
|
||||||
* The constructor is declared private to allow only the functor
|
* The constructor is declared private to allow only the functor
|
||||||
|
|
@ -722,7 +719,7 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/*! Obtain a Compare_x_on_boundary_2 functor object. */
|
/*! obtains a Compare_x_on_boundary_2 functor object. */
|
||||||
Compare_x_on_boundary_2 compare_x_on_boundary_2_object() const
|
Compare_x_on_boundary_2 compare_x_on_boundary_2_object() const
|
||||||
{ return Compare_x_on_boundary_2(m_base_traits); }
|
{ return Compare_x_on_boundary_2(m_base_traits); }
|
||||||
|
|
||||||
|
|
@ -734,7 +731,7 @@ public:
|
||||||
//! The base traits.
|
//! The base traits.
|
||||||
const Base_traits_2* m_base;
|
const Base_traits_2* m_base;
|
||||||
|
|
||||||
/*! Constructor.
|
/*! constructs.
|
||||||
* \param tr The base traits class. It must be passed, to handle
|
* \param tr The base traits class. It must be passed, to handle
|
||||||
* non stateless traits (e.g., it stores data).
|
* non stateless traits (e.g., it stores data).
|
||||||
* The constructor is declared private to allow only the functor
|
* The constructor is declared private to allow only the functor
|
||||||
|
|
@ -757,11 +754,11 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/*! Obtain a Compare_x_near_boundary_2 function object. */
|
/*! obtains a Compare_x_near_boundary_2 function object. */
|
||||||
Compare_x_near_boundary_2 compare_x_near_boundary_2_object() const
|
Compare_x_near_boundary_2 compare_x_near_boundary_2_object() const
|
||||||
{ return Compare_x_near_boundary_2(m_base_traits); }
|
{ return Compare_x_near_boundary_2(m_base_traits); }
|
||||||
};
|
};
|
||||||
|
|
||||||
} //namespace CGAL
|
} // namespace CGAL
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -98,14 +98,14 @@ public:
|
||||||
bool is_empty() const { return nn.is_empty(); }
|
bool is_empty() const { return nn.is_empty(); }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/*! Copy constructor - not supported. */
|
/*! Copy constructor not supported. */
|
||||||
Arr_landmarks_generator_base(const Self&);
|
Arr_landmarks_generator_base(const Self&);
|
||||||
|
|
||||||
/*! Assignment operator - not supported. */
|
/*! Assignment operator not supported. */
|
||||||
Self& operator=(const Self& );
|
Self& operator=(const Self& );
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/*! Constructor from an arrangement.
|
/*! constructs from an arrangement.
|
||||||
* \param arr (in) The arrangement.
|
* \param arr (in) The arrangement.
|
||||||
*/
|
*/
|
||||||
Arr_landmarks_generator_base(const Base_aos& arr) :
|
Arr_landmarks_generator_base(const Base_aos& arr) :
|
||||||
|
|
@ -120,7 +120,7 @@ public:
|
||||||
// inherited class.
|
// inherited class.
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Create the landmarks set (choosing the landmarks) ,
|
/*! creates the landmarks set (choosing the landmarks) ,
|
||||||
* and saving them in the nearest-neighbor search structure.
|
* and saving them in the nearest-neighbor search structure.
|
||||||
*/
|
*/
|
||||||
virtual void build_landmark_set() {
|
virtual void build_landmark_set() {
|
||||||
|
|
@ -136,7 +136,7 @@ public:
|
||||||
updated = true;
|
updated = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! clear the set of landmarks.
|
/*! clears the set of landmarks.
|
||||||
*/
|
*/
|
||||||
virtual void clear_landmark_set() {
|
virtual void clear_landmark_set() {
|
||||||
nn.clear();
|
nn.clear();
|
||||||
|
|
@ -144,7 +144,7 @@ public:
|
||||||
updated = false;
|
updated = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Obtain the nearest neighbor (landmark) to the given point.
|
/*! obtains the nearest neighbor (landmark) to the given point.
|
||||||
* \param p The query point.
|
* \param p The query point.
|
||||||
* \param obj Output: The location of the nearest landmark point in the
|
* \param obj Output: The location of the nearest landmark point in the
|
||||||
* arrangement (a vertex, halfedge, or face handle).
|
* arrangement (a vertex, halfedge, or face handle).
|
||||||
|
|
@ -399,7 +399,7 @@ public:
|
||||||
//@}
|
//@}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
/*! Create the list of landmarks with their location.
|
/*! creates the list of landmarks with their location.
|
||||||
* This is a pure virtual function, and the class that inherites from
|
* This is a pure virtual function, and the class that inherites from
|
||||||
* this generator must implement it.
|
* this generator must implement it.
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -171,7 +171,7 @@ public:
|
||||||
/*! The traits (in case it has state) */
|
/*! The traits (in case it has state) */
|
||||||
const Traits* m_traits;
|
const Traits* m_traits;
|
||||||
|
|
||||||
/*! Constructor
|
/*! constructs
|
||||||
* \param traits the traits (in case it has state)
|
* \param traits the traits (in case it has state)
|
||||||
* The constructor is declared private to allow only the functor
|
* The constructor is declared private to allow only the functor
|
||||||
* obtaining function, which is a member of the nesting class,
|
* obtaining function, which is a member of the nesting class,
|
||||||
|
|
@ -352,7 +352,7 @@ public:
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/*! Obtain a Compare_curve_end_x_2 functor object. */
|
/*! obtains a Compare_curve_end_x_2 functor object. */
|
||||||
Compare_curve_end_x_2 compare_curve_end_x_2_object () const
|
Compare_curve_end_x_2 compare_curve_end_x_2_object () const
|
||||||
{
|
{
|
||||||
return Compare_curve_end_x_2(this);
|
return Compare_curve_end_x_2(this);
|
||||||
|
|
@ -371,7 +371,7 @@ public:
|
||||||
/*! The traits (in case it has state) */
|
/*! The traits (in case it has state) */
|
||||||
const Traits* m_traits;
|
const Traits* m_traits;
|
||||||
|
|
||||||
/*! Constructor
|
/*! constructs
|
||||||
* \param traits the traits (in case it has state)
|
* \param traits the traits (in case it has state)
|
||||||
* The constructor is declared private to allow only the functor
|
* The constructor is declared private to allow only the functor
|
||||||
* obtaining function, which is a member of the nesting class,
|
* obtaining function, which is a member of the nesting class,
|
||||||
|
|
@ -481,7 +481,7 @@ public:
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/*! Obtain a Compare_y_at_x_2 functor object. */
|
/*! obtains a Compare_y_at_x_2 functor object. */
|
||||||
Compare_curve_end_y_at_x_2 compare_curve_end_y_at_x_2_object () const
|
Compare_curve_end_y_at_x_2 compare_curve_end_y_at_x_2_object () const
|
||||||
{
|
{
|
||||||
return Compare_curve_end_y_at_x_2(this);
|
return Compare_curve_end_y_at_x_2(this);
|
||||||
|
|
@ -498,7 +498,7 @@ public:
|
||||||
const Traits* m_traits;
|
const Traits* m_traits;
|
||||||
const Traits_base* m_traits_base; //MICHAL: rational-upd
|
const Traits_base* m_traits_base; //MICHAL: rational-upd
|
||||||
|
|
||||||
/*! Constructor
|
/*! constructs
|
||||||
* \param traits the traits (in case it has state)
|
* \param traits the traits (in case it has state)
|
||||||
* The constructor is declared private to allow only the functor
|
* The constructor is declared private to allow only the functor
|
||||||
* obtaining function, which is a member of the nesting class,
|
* obtaining function, which is a member of the nesting class,
|
||||||
|
|
@ -586,7 +586,7 @@ public:
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/*! Obtain an Equal_curve_end_2 functor object. */
|
/*! obtains an Equal_curve_end_2 functor object. */
|
||||||
Equal_curve_end_2 equal_curve_end_2_object () const
|
Equal_curve_end_2 equal_curve_end_2_object () const
|
||||||
{
|
{
|
||||||
return Equal_curve_end_2(this);
|
return Equal_curve_end_2(this);
|
||||||
|
|
@ -601,7 +601,7 @@ public:
|
||||||
/*! The traits (in case it has state) */
|
/*! The traits (in case it has state) */
|
||||||
const Traits* m_traits;
|
const Traits* m_traits;
|
||||||
|
|
||||||
/*! Constructor
|
/*! constructs
|
||||||
* \param traits the traits (in case it has state)
|
* \param traits the traits (in case it has state)
|
||||||
* The constructor is declared private to allow only the functor
|
* The constructor is declared private to allow only the functor
|
||||||
* obtaining function, which is a member of the nesting class,
|
* obtaining function, which is a member of the nesting class,
|
||||||
|
|
@ -613,8 +613,7 @@ public:
|
||||||
friend class Td_traits<Traits_base, Arrangement_on_surface_2>;
|
friend class Td_traits<Traits_base, Arrangement_on_surface_2>;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/*!
|
/*! compares two edge ends lexigoraphically: by x, then by y.
|
||||||
* Compare two edge ends lexigoraphically: by x, then by y.
|
|
||||||
* \param cv1, cv1_end The first cv end.
|
* \param cv1, cv1_end The first cv end.
|
||||||
* \param cv2, cv2_end The second cv end.
|
* \param cv2, cv2_end The second cv end.
|
||||||
* \return LARGER if x(cv1-end) > x(cv2-end),
|
* \return LARGER if x(cv1-end) > x(cv2-end),
|
||||||
|
|
@ -860,15 +859,12 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/*! Obtain a Compare_curve_end_xy_2 functor object. */
|
/*! obtains a Compare_curve_end_xy_2 functor object. */
|
||||||
Compare_curve_end_xy_2 compare_curve_end_xy_2_object () const
|
Compare_curve_end_xy_2 compare_curve_end_xy_2_object () const
|
||||||
{
|
{
|
||||||
return Compare_curve_end_xy_2(this);
|
return Compare_curve_end_xy_2(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Td_traits class ctors and dtor
|
// Td_traits class ctors and dtor
|
||||||
|
|
||||||
Td_traits(const Traits_base& t) : Traits_base(t)
|
Td_traits(const Traits_base& t) : Traits_base(t)
|
||||||
|
|
|
||||||
|
|
@ -85,20 +85,20 @@ protected:
|
||||||
enum { INVALID_INDEX = 0xffffffff };
|
enum { INVALID_INDEX = 0xffffffff };
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/*! Construct default. */
|
/*! constructs default. */
|
||||||
Arr_polycurve_basic_traits_2() :
|
Arr_polycurve_basic_traits_2() :
|
||||||
m_subcurve_traits(new Subcurve_traits_2()),
|
m_subcurve_traits(new Subcurve_traits_2()),
|
||||||
m_own_traits(true)
|
m_own_traits(true)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
/*! Construct from a subcurve traits.
|
/*! constructs from a subcurve traits.
|
||||||
* \param seg_traits an already existing subcurve tarits, which is passed in;
|
* \param seg_traits an already existing subcurve tarits, which is passed in;
|
||||||
* it will be used by the class.
|
* it will be used by the class.
|
||||||
*/
|
*/
|
||||||
Arr_polycurve_basic_traits_2(const Subcurve_traits_2* geom_traits) :
|
Arr_polycurve_basic_traits_2(const Subcurve_traits_2* geom_traits) :
|
||||||
m_subcurve_traits(geom_traits), m_own_traits(false) {}
|
m_subcurve_traits(geom_traits), m_own_traits(false) {}
|
||||||
|
|
||||||
/*! Construct copy.
|
/*! constructs copy.
|
||||||
* If the 'other' polycurve traits owns its subcurve traits, then make
|
* If the 'other' polycurve traits owns its subcurve traits, then make
|
||||||
* this polycurve traits own its subcurve traits as well
|
* this polycurve traits own its subcurve traits as well
|
||||||
* \param other the other traits.
|
* \param other the other traits.
|
||||||
|
|
@ -117,7 +117,7 @@ public:
|
||||||
~Arr_polycurve_basic_traits_2()
|
~Arr_polycurve_basic_traits_2()
|
||||||
{ if (m_own_traits) delete m_subcurve_traits; }
|
{ if (m_own_traits) delete m_subcurve_traits; }
|
||||||
|
|
||||||
/*! Obtain the subcurve traits.
|
/*! obtains the subcurve traits.
|
||||||
* \return the subcurve traits.
|
* \return the subcurve traits.
|
||||||
*/
|
*/
|
||||||
const Subcurve_traits_2* subcurve_traits_2() const
|
const Subcurve_traits_2* subcurve_traits_2() const
|
||||||
|
|
@ -147,13 +147,13 @@ public:
|
||||||
|
|
||||||
friend class Arr_polycurve_basic_traits_2<Subcurve_traits_2>;
|
friend class Arr_polycurve_basic_traits_2<Subcurve_traits_2>;
|
||||||
|
|
||||||
/*! Constructor. */
|
/*! constructs. */
|
||||||
Compare_x_2(const Polycurve_basic_traits_2& traits) :
|
Compare_x_2(const Polycurve_basic_traits_2& traits) :
|
||||||
m_poly_traits(traits)
|
m_poly_traits(traits)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/*! Compare the \f$x\f$-coordinates of two directional points.
|
/*! compares the \f$x\f$-coordinates of two directional points.
|
||||||
* \param p1 the first directional point.
|
* \param p1 the first directional point.
|
||||||
* \param p2 the second directional point.
|
* \param p2 the second directional point.
|
||||||
* \return `SMALLER` - \f$x\f$(`p1`) < \f$x\f$(`p2`);
|
* \return `SMALLER` - \f$x\f$(`p1`) < \f$x\f$(`p2`);
|
||||||
|
|
@ -165,7 +165,7 @@ public:
|
||||||
Comparison_result operator()(const Point_2& p1, const Point_2& p2) const
|
Comparison_result operator()(const Point_2& p1, const Point_2& p2) const
|
||||||
{ return m_poly_traits.subcurve_traits_2()->compare_x_2_object()(p1, p2); }
|
{ return m_poly_traits.subcurve_traits_2()->compare_x_2_object()(p1, p2); }
|
||||||
|
|
||||||
/*! Compare two ends of \f$x\f$-monotone curves in \f$x\f$.
|
/*! compares two ends of \f$x\f$-monotone curves in \f$x\f$.
|
||||||
* \param xs1 the first curve.
|
* \param xs1 the first curve.
|
||||||
* \param ce1 the curve-end indicator of the first \f$x\f$-monotone curve
|
* \param ce1 the curve-end indicator of the first \f$x\f$-monotone curve
|
||||||
* `xs1`:
|
* `xs1`:
|
||||||
|
|
@ -177,7 +177,7 @@ public:
|
||||||
Arr_curve_end ce1, const Point_2& p2)
|
Arr_curve_end ce1, const Point_2& p2)
|
||||||
{ return operator()(xs1, ce1, p2, All_sides_oblivious_category()); }
|
{ return operator()(xs1, ce1, p2, All_sides_oblivious_category()); }
|
||||||
|
|
||||||
/*! Compare two ends of \f$x\f$-monotone curves in x.
|
/*! compares two ends of \f$x\f$-monotone curves in x.
|
||||||
* \param xs1 the first curve.
|
* \param xs1 the first curve.
|
||||||
* \param ce1 the curve-end indicator of the first \f$x\f$-monotone curve
|
* \param ce1 the curve-end indicator of the first \f$x\f$-monotone curve
|
||||||
* `xs1`:
|
* `xs1`:
|
||||||
|
|
@ -296,7 +296,7 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/*! Obtain a Compare_x_2 functor object. */
|
/*! obtains a Compare_x_2 functor object. */
|
||||||
Compare_x_2 compare_x_2_object() const { return Compare_x_2(*this); }
|
Compare_x_2 compare_x_2_object() const { return Compare_x_2(*this); }
|
||||||
|
|
||||||
//! Compare two curve-ends or points lexigoraphically: by x, then by y.
|
//! Compare two curve-ends or points lexigoraphically: by x, then by y.
|
||||||
|
|
@ -310,13 +310,13 @@ public:
|
||||||
|
|
||||||
friend class Arr_polycurve_basic_traits_2<Subcurve_traits_2>;
|
friend class Arr_polycurve_basic_traits_2<Subcurve_traits_2>;
|
||||||
|
|
||||||
/*! Constructor. */
|
/*! constructs. */
|
||||||
Compare_xy_2(const Polycurve_basic_traits_2& traits) :
|
Compare_xy_2(const Polycurve_basic_traits_2& traits) :
|
||||||
m_poly_traits(traits)
|
m_poly_traits(traits)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/*! Compare two directional points lexigoraphically: by \f$x\f$, then by
|
/*! compares two directional points lexigoraphically: by \f$x\f$, then by
|
||||||
* \f$y\f$.
|
* \f$y\f$.
|
||||||
* \param p1 the first endpoint directional point.
|
* \param p1 the first endpoint directional point.
|
||||||
* \param p2 the second endpoint directional point.
|
* \param p2 the second endpoint directional point.
|
||||||
|
|
@ -332,7 +332,7 @@ public:
|
||||||
Comparison_result operator()(const Point_2& p1, const Point_2& p2) const
|
Comparison_result operator()(const Point_2& p1, const Point_2& p2) const
|
||||||
{ return m_poly_traits.subcurve_traits_2()->compare_xy_2_object()(p1, p2); }
|
{ return m_poly_traits.subcurve_traits_2()->compare_xy_2_object()(p1, p2); }
|
||||||
|
|
||||||
/*! Compare two ends of \f$x\f$-monotone curves lexicographically.
|
/*! compares two ends of \f$x\f$-monotone curves lexicographically.
|
||||||
* \param xs1 the first curve.
|
* \param xs1 the first curve.
|
||||||
* \param ce1 the curve-end indicator of the first \f$x\f$-monotone curve
|
* \param ce1 the curve-end indicator of the first \f$x\f$-monotone curve
|
||||||
* `xs1`:
|
* `xs1`:
|
||||||
|
|
@ -344,7 +344,7 @@ public:
|
||||||
Arr_curve_end ce1, const Point_2& p2)
|
Arr_curve_end ce1, const Point_2& p2)
|
||||||
{ return operator()(xs1, ce1, p2, All_sides_oblivious_category()); }
|
{ return operator()(xs1, ce1, p2, All_sides_oblivious_category()); }
|
||||||
|
|
||||||
/*! Compare two ends of \f$x\f$-monotone curves lexicographically.
|
/*! compares two ends of \f$x\f$-monotone curves lexicographically.
|
||||||
* \param xs1 the first curve.
|
* \param xs1 the first curve.
|
||||||
* \param ce1 the curve-end indicator of the first \f$x\f$-monotone curve
|
* \param ce1 the curve-end indicator of the first \f$x\f$-monotone curve
|
||||||
* `xs1`:
|
* `xs1`:
|
||||||
|
|
@ -517,7 +517,7 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/*! Obtain a Compare_xy_2 functor object. */
|
/*! obtains a Compare_xy_2 functor object. */
|
||||||
Compare_xy_2 compare_xy_2_object() const { return Compare_xy_2(*this); }
|
Compare_xy_2 compare_xy_2_object() const { return Compare_xy_2(*this); }
|
||||||
|
|
||||||
/*! A functor that obtain the lexicographically smallest endpoint of an
|
/*! A functor that obtain the lexicographically smallest endpoint of an
|
||||||
|
|
@ -533,13 +533,13 @@ public:
|
||||||
|
|
||||||
friend class Arr_polycurve_basic_traits_2<Subcurve_traits_2>;
|
friend class Arr_polycurve_basic_traits_2<Subcurve_traits_2>;
|
||||||
|
|
||||||
/* Constructor. */
|
/*! constructs. */
|
||||||
Construct_min_vertex_2(const Polycurve_basic_traits_2& traits) :
|
Construct_min_vertex_2(const Polycurve_basic_traits_2& traits) :
|
||||||
m_poly_traits(traits)
|
m_poly_traits(traits)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/*! Obtain the left endpoint of the \f$x\f$-monotone polycurve. The return
|
/*! obtains the left endpoint of the \f$x\f$-monotone polycurve. The return
|
||||||
* type is the same as the return type of the corresponding operator in the
|
* type is the same as the return type of the corresponding operator in the
|
||||||
* functor of the subtraits, which is either by value or by reference.
|
* functor of the subtraits, which is either by value or by reference.
|
||||||
* \param xcv the polycurve curve.
|
* \param xcv the polycurve curve.
|
||||||
|
|
@ -561,7 +561,7 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/*! Obtain a Construct_min_vertex_2 functor object. */
|
/*! obtains a Construct_min_vertex_2 functor object. */
|
||||||
Construct_min_vertex_2 construct_min_vertex_2_object() const
|
Construct_min_vertex_2 construct_min_vertex_2_object() const
|
||||||
{ return Construct_min_vertex_2(*this); }
|
{ return Construct_min_vertex_2(*this); }
|
||||||
|
|
||||||
|
|
@ -578,13 +578,13 @@ public:
|
||||||
|
|
||||||
friend class Arr_polycurve_basic_traits_2<Subcurve_traits_2>;
|
friend class Arr_polycurve_basic_traits_2<Subcurve_traits_2>;
|
||||||
|
|
||||||
/*! Constructor. */
|
/*! constructs. */
|
||||||
Construct_max_vertex_2(const Polycurve_basic_traits_2& traits) :
|
Construct_max_vertex_2(const Polycurve_basic_traits_2& traits) :
|
||||||
m_poly_traits(traits)
|
m_poly_traits(traits)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/*! Obtain the right endpoint of the \f$x\f$-monotone polycurve. The return
|
/*! obtains the right endpoint of the \f$x\f$-monotone polycurve. The return
|
||||||
* type is the same as the return type of the corresponding operator in the
|
* type is the same as the return type of the corresponding operator in the
|
||||||
* functor of the subtraits, which is either by value or by reference.
|
* functor of the subtraits, which is either by value or by reference.
|
||||||
* \param xcv the polycurve.
|
* \param xcv the polycurve.
|
||||||
|
|
@ -603,7 +603,7 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/*! Obtain a Construct_max_vertex_2 functor object. */
|
/*! obtains a Construct_max_vertex_2 functor object. */
|
||||||
Construct_max_vertex_2 construct_max_vertex_2_object() const
|
Construct_max_vertex_2 construct_max_vertex_2_object() const
|
||||||
{ return Construct_max_vertex_2(*this); }
|
{ return Construct_max_vertex_2(*this); }
|
||||||
|
|
||||||
|
|
@ -618,13 +618,13 @@ public:
|
||||||
|
|
||||||
friend class Arr_polycurve_basic_traits_2<Subcurve_traits_2>;
|
friend class Arr_polycurve_basic_traits_2<Subcurve_traits_2>;
|
||||||
|
|
||||||
/*! Constructor. */
|
/*! constructs. */
|
||||||
Is_vertical_2(const Polycurve_basic_traits_2& traits) :
|
Is_vertical_2(const Polycurve_basic_traits_2& traits) :
|
||||||
m_poly_traits(traits)
|
m_poly_traits(traits)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/*! Check whether the given \f$x\f$-monotone curve is a vertical segment.
|
/*! checks whether the given \f$x\f$-monotone curve is a vertical segment.
|
||||||
* \param cv the curve.
|
* \param cv the curve.
|
||||||
* \return `true` if the curve is a vertical segment; `false` otherwise.
|
* \return `true` if the curve is a vertical segment; `false` otherwise.
|
||||||
*/
|
*/
|
||||||
|
|
@ -637,7 +637,7 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/*! Obtain an Is_vertical_2 functor object. */
|
/*! obtains an Is_vertical_2 functor object. */
|
||||||
Is_vertical_2 is_vertical_2_object() const { return Is_vertical_2(*this); }
|
Is_vertical_2 is_vertical_2_object() const { return Is_vertical_2(*this); }
|
||||||
|
|
||||||
/*! A functor that compares the \f$y\f$-coordinates of a point and an
|
/*! A functor that compares the \f$y\f$-coordinates of a point and an
|
||||||
|
|
@ -762,13 +762,13 @@ public:
|
||||||
|
|
||||||
friend class Arr_polycurve_basic_traits_2<Subcurve_traits_2>;
|
friend class Arr_polycurve_basic_traits_2<Subcurve_traits_2>;
|
||||||
|
|
||||||
/*! Constructor. */
|
/*! constructs. */
|
||||||
Compare_y_at_x_2(const Polycurve_basic_traits_2& traits) :
|
Compare_y_at_x_2(const Polycurve_basic_traits_2& traits) :
|
||||||
m_poly_traits(traits)
|
m_poly_traits(traits)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/*! Obtain the location of the given point with respect to the input curve.
|
/*! obtains the location of the given point with respect to the input curve.
|
||||||
* \param p the point.
|
* \param p the point.
|
||||||
* \param xcv the polycurve curve.
|
* \param xcv the polycurve curve.
|
||||||
* \pre `p` is in the \f$x\f$-range of `xcv`.
|
* \pre `p` is in the \f$x\f$-range of `xcv`.
|
||||||
|
|
@ -781,7 +781,7 @@ public:
|
||||||
const X_monotone_curve_2& xcv) const
|
const X_monotone_curve_2& xcv) const
|
||||||
{ return operator()(p, xcv, All_sides_oblivious_category()); }
|
{ return operator()(p, xcv, All_sides_oblivious_category()); }
|
||||||
|
|
||||||
/*! Obtain the location of the given curve_end with respect to the input
|
/*! obtains the location of the given curve_end with respect to the input
|
||||||
* curve.
|
* curve.
|
||||||
* \param xcv The polycurve curve.
|
* \param xcv The polycurve curve.
|
||||||
* \param ce the curve-end indicator of the \f$x\f$-monotone subcurve xl:
|
* \param ce the curve-end indicator of the \f$x\f$-monotone subcurve xl:
|
||||||
|
|
@ -801,7 +801,7 @@ public:
|
||||||
{ return operator()(xs1, ce1, xs2, All_sides_oblivious_category()); }
|
{ return operator()(xs1, ce1, xs2, All_sides_oblivious_category()); }
|
||||||
};
|
};
|
||||||
|
|
||||||
/*! Obtain a Compare_y_at_x_2 functor object. */
|
/*! obtains a Compare_y_at_x_2 functor object. */
|
||||||
Compare_y_at_x_2 compare_y_at_x_2_object() const
|
Compare_y_at_x_2 compare_y_at_x_2_object() const
|
||||||
{ return Compare_y_at_x_2(*this); }
|
{ return Compare_y_at_x_2(*this); }
|
||||||
|
|
||||||
|
|
@ -818,13 +818,13 @@ public:
|
||||||
|
|
||||||
friend class Arr_polycurve_basic_traits_2<Subcurve_traits_2>;
|
friend class Arr_polycurve_basic_traits_2<Subcurve_traits_2>;
|
||||||
|
|
||||||
/*! Constructor. */
|
/*! constructs. */
|
||||||
Compare_y_at_x_left_2(const Polycurve_basic_traits_2& traits) :
|
Compare_y_at_x_left_2(const Polycurve_basic_traits_2& traits) :
|
||||||
m_poly_traits(traits)
|
m_poly_traits(traits)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/*! Compare the y value of two \f$x\f$-monotone curves immediately to the
|
/*! compares the y value of two \f$x\f$-monotone curves immediately to the
|
||||||
* left of their intersection point.
|
* left of their intersection point.
|
||||||
* \param cv1 the first polycurve curve.
|
* \param cv1 the first polycurve curve.
|
||||||
* \param cv2 the second polycurve curve.
|
* \param cv2 the second polycurve curve.
|
||||||
|
|
@ -851,7 +851,7 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/*! Obtain a Compare_y_at_x_left_2 functor object. */
|
/*! obtains a Compare_y_at_x_left_2 functor object. */
|
||||||
Compare_y_at_x_left_2 compare_y_at_x_left_2_object() const
|
Compare_y_at_x_left_2 compare_y_at_x_left_2_object() const
|
||||||
{ return Compare_y_at_x_left_2(*this); }
|
{ return Compare_y_at_x_left_2(*this); }
|
||||||
|
|
||||||
|
|
@ -868,13 +868,13 @@ public:
|
||||||
|
|
||||||
friend class Arr_polycurve_basic_traits_2<Subcurve_traits_2>;
|
friend class Arr_polycurve_basic_traits_2<Subcurve_traits_2>;
|
||||||
|
|
||||||
/*! Constructor. */
|
/*! constructs. */
|
||||||
Compare_y_at_x_right_2(const Polycurve_basic_traits_2& traits) :
|
Compare_y_at_x_right_2(const Polycurve_basic_traits_2& traits) :
|
||||||
m_poly_traits(traits)
|
m_poly_traits(traits)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/*! Compare the \f$y\f$-value of two \f$x\f$-monotone curves immediately to
|
/*! compares the \f$y\f$-value of two \f$x\f$-monotone curves immediately to
|
||||||
* the right of their intersection point.
|
* the right of their intersection point.
|
||||||
* \param cv1 the first curve.
|
* \param cv1 the first curve.
|
||||||
* \param cv2 the second curve.
|
* \param cv2 the second curve.
|
||||||
|
|
@ -901,7 +901,7 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/*! Obtain a Compare_y_at_x_right_2 functor object.
|
/*! obtains a Compare_y_at_x_right_2 functor object.
|
||||||
*/
|
*/
|
||||||
Compare_y_at_x_right_2 compare_y_at_x_right_2_object() const
|
Compare_y_at_x_right_2 compare_y_at_x_right_2_object() const
|
||||||
{ return Compare_y_at_x_right_2(*this); }
|
{ return Compare_y_at_x_right_2(*this); }
|
||||||
|
|
@ -919,11 +919,11 @@ public:
|
||||||
|
|
||||||
friend class Arr_polycurve_basic_traits_2<Subcurve_traits_2>;
|
friend class Arr_polycurve_basic_traits_2<Subcurve_traits_2>;
|
||||||
|
|
||||||
/*! Constructor. */
|
/*! constructs. */
|
||||||
Equal_2(const Polycurve_basic_traits_2& poly_tr) : m_poly_traits(poly_tr) {}
|
Equal_2(const Polycurve_basic_traits_2& poly_tr) : m_poly_traits(poly_tr) {}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/*! Check whether the two points are the same.
|
/*! checks whether the two points are the same.
|
||||||
* \param p1 the first point.
|
* \param p1 the first point.
|
||||||
* \param p2 the second point.
|
* \param p2 the second point.
|
||||||
* \return `true` if the two point are the same; `false` otherwise.
|
* \return `true` if the two point are the same; `false` otherwise.
|
||||||
|
|
@ -931,7 +931,7 @@ public:
|
||||||
bool operator()(const Point_2& p1, const Point_2& p2) const
|
bool operator()(const Point_2& p1, const Point_2& p2) const
|
||||||
{ return m_poly_traits.subcurve_traits_2()->equal_2_object()(p1, p2); }
|
{ return m_poly_traits.subcurve_traits_2()->equal_2_object()(p1, p2); }
|
||||||
|
|
||||||
/*! Check whether the two \f$x\f$-monotone curves are the same (have the
|
/*! checks whether the two \f$x\f$-monotone curves are the same (have the
|
||||||
* same graph).
|
* same graph).
|
||||||
* \param cv1 the first curve.
|
* \param cv1 the first curve.
|
||||||
* \param cv2 the second curve.
|
* \param cv2 the second curve.
|
||||||
|
|
@ -1008,7 +1008,7 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/*! Obtain an Equal_2 functor object. */
|
/*! obtains an Equal_2 functor object. */
|
||||||
Equal_2 equal_2_object() const { return Equal_2(*this); }
|
Equal_2 equal_2_object() const { return Equal_2(*this); }
|
||||||
|
|
||||||
/*! A functor that lexicographically compares the endpoints of a curve. */
|
/*! A functor that lexicographically compares the endpoints of a curve. */
|
||||||
|
|
@ -1022,13 +1022,13 @@ public:
|
||||||
|
|
||||||
friend class Arr_polycurve_basic_traits_2<Subcurve_traits_2>;
|
friend class Arr_polycurve_basic_traits_2<Subcurve_traits_2>;
|
||||||
|
|
||||||
/*! Constructor. */
|
/*! constructs. */
|
||||||
Compare_endpoints_xy_2(const Polycurve_basic_traits_2& traits) :
|
Compare_endpoints_xy_2(const Polycurve_basic_traits_2& traits) :
|
||||||
m_poly_traits(traits)
|
m_poly_traits(traits)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/*! Compare the endpoints of an \(x\)-monotone curve lexicographically.
|
/*! compares the endpoints of an \(x\)-monotone curve lexicographically.
|
||||||
* (assuming the curve has a designated source and target points).
|
* (assuming the curve has a designated source and target points).
|
||||||
* \param cv the curve.
|
* \param cv the curve.
|
||||||
* \return `SMALLER` if `cv` is oriented left-to-right;
|
* \return `SMALLER` if `cv` is oriented left-to-right;
|
||||||
|
|
@ -1062,13 +1062,13 @@ public:
|
||||||
|
|
||||||
friend class Arr_polycurve_basic_traits_2<Subcurve_traits_2>;
|
friend class Arr_polycurve_basic_traits_2<Subcurve_traits_2>;
|
||||||
|
|
||||||
/*! Constructor */
|
/*! constructs */
|
||||||
Construct_opposite_2(const Polycurve_basic_traits_2& traits) :
|
Construct_opposite_2(const Polycurve_basic_traits_2& traits) :
|
||||||
m_poly_traits(traits)
|
m_poly_traits(traits)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/*! Construct the reversed \f$x\f$-monotone polycurve of the input.
|
/*! constructs the reversed \f$x\f$-monotone polycurve of the input.
|
||||||
* Note that the functor constructs the opposites of _all_ subcurves
|
* Note that the functor constructs the opposites of _all_ subcurves
|
||||||
* constituting `xcv`.
|
* constituting `xcv`.
|
||||||
* \param xcv the \f$x\f$-monotone polycurve to be reveres
|
* \param xcv the \f$x\f$-monotone polycurve to be reveres
|
||||||
|
|
@ -1132,7 +1132,7 @@ public:
|
||||||
using Approximate_point_2 =
|
using Approximate_point_2 =
|
||||||
typename has_approximate_2<Subcurve_traits_2>::Approximate_point_2;
|
typename has_approximate_2<Subcurve_traits_2>::Approximate_point_2;
|
||||||
|
|
||||||
/*! Obtain an Approximate_2 functor object. */
|
/*! obtains an Approximate_2 functor object. */
|
||||||
Approximate_2 approximate_2_object_impl(std::false_type) const
|
Approximate_2 approximate_2_object_impl(std::false_type) const
|
||||||
{ return subcurve_traits_2()->approximate_2_object(); }
|
{ return subcurve_traits_2()->approximate_2_object(); }
|
||||||
|
|
||||||
|
|
@ -1152,7 +1152,7 @@ public:
|
||||||
//! The polycurve traits (in case it has state).
|
//! The polycurve traits (in case it has state).
|
||||||
const Polycurve_basic_traits_2& m_poly_traits;
|
const Polycurve_basic_traits_2& m_poly_traits;
|
||||||
|
|
||||||
/*! Constructor. */
|
/*! constructs. */
|
||||||
Construct_point_2(const Polycurve_basic_traits_2& traits) :
|
Construct_point_2(const Polycurve_basic_traits_2& traits) :
|
||||||
m_poly_traits(traits)
|
m_poly_traits(traits)
|
||||||
{}
|
{}
|
||||||
|
|
@ -1160,7 +1160,7 @@ public:
|
||||||
friend class Arr_polycurve_basic_traits_2<Subcurve_traits_2>;
|
friend class Arr_polycurve_basic_traits_2<Subcurve_traits_2>;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/*! Construct a point.
|
/*! constructs a point.
|
||||||
* Apply perfect forwarding.
|
* Apply perfect forwarding.
|
||||||
*/
|
*/
|
||||||
template <typename ... Args>
|
template <typename ... Args>
|
||||||
|
|
@ -1171,7 +1171,7 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/*! Obtain a Construct_x_monotone_curve_2 functor object. */
|
/*! obtains a Construct_x_monotone_curve_2 functor object. */
|
||||||
Construct_point_2 construct_point_2_object() const
|
Construct_point_2 construct_point_2_object() const
|
||||||
{ return Construct_point_2(*this); }
|
{ return Construct_point_2(*this); }
|
||||||
|
|
||||||
|
|
@ -1186,13 +1186,14 @@ public:
|
||||||
|
|
||||||
friend class Arr_polycurve_basic_traits_2<Subcurve_traits_2>;
|
friend class Arr_polycurve_basic_traits_2<Subcurve_traits_2>;
|
||||||
|
|
||||||
/*! Constructor. */
|
/*! constructs. */
|
||||||
Construct_x_monotone_curve_2(const Polycurve_basic_traits_2& traits) :
|
Construct_x_monotone_curve_2(const Polycurve_basic_traits_2& traits) :
|
||||||
m_poly_traits(traits)
|
m_poly_traits(traits)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/*! Obtain an \f$x\f$-monotone polycurve that consists of one given subcurve.
|
/*! obtains an \f$x\f$-monotone polycurve that consists of one given
|
||||||
|
* subcurve.
|
||||||
* \param seg input subcurve.
|
* \param seg input subcurve.
|
||||||
* \pre seg is not degenerated.
|
* \pre seg is not degenerated.
|
||||||
* \return an \f$x\f$-monotone polycurve with one subcurve.
|
* \return an \f$x\f$-monotone polycurve with one subcurve.
|
||||||
|
|
@ -1223,7 +1224,7 @@ public:
|
||||||
return X_monotone_curve_2(seg);
|
return X_monotone_curve_2(seg);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Construct an \f$x\f$-monotone polycurve, which is well-oriented, from a
|
/*! constructs an \f$x\f$-monotone polycurve, which is well-oriented, from a
|
||||||
* range of elements.
|
* range of elements.
|
||||||
* \pre the elements in the range should form a continuous well-oriented
|
* \pre the elements in the range should form a continuous well-oriented
|
||||||
* \f$x\f$-monotone polycurve.
|
* \f$x\f$-monotone polycurve.
|
||||||
|
|
@ -1238,7 +1239,7 @@ public:
|
||||||
return constructor_impl(begin, end, Is_point());
|
return constructor_impl(begin, end, Is_point());
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Construct an \f$x\f$-monotone polycurve from a range of points.
|
/*! constructs an \f$x\f$-monotone polycurve from a range of points.
|
||||||
* The polycurve may be oriented left-to-right or right-to-left
|
* The polycurve may be oriented left-to-right or right-to-left
|
||||||
* depending on the lexicographical order of the points in the input.
|
* depending on the lexicographical order of the points in the input.
|
||||||
* \pre range contains at least two points.
|
* \pre range contains at least two points.
|
||||||
|
|
@ -1253,7 +1254,7 @@ public:
|
||||||
std::true_type) const
|
std::true_type) const
|
||||||
{ CGAL_error_msg("Cannot construct a polycurve from a range of points!"); }
|
{ CGAL_error_msg("Cannot construct a polycurve from a range of points!"); }
|
||||||
|
|
||||||
/*! Obtain an \f$x\f$-monotone polycurve from a range of subcurves.
|
/*! obtains an \f$x\f$-monotone polycurve from a range of subcurves.
|
||||||
* \param begin An iterator pointing to the first subcurve in the range.
|
* \param begin An iterator pointing to the first subcurve in the range.
|
||||||
* \param end An iterator pointing to the past-the-end subcurve
|
* \param end An iterator pointing to the past-the-end subcurve
|
||||||
* in the range.
|
* in the range.
|
||||||
|
|
@ -1345,7 +1346,7 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/*! Obtain a Construct_x_monotone_curve_2 functor object. */
|
/*! obtains a Construct_x_monotone_curve_2 functor object. */
|
||||||
Construct_x_monotone_curve_2 construct_x_monotone_curve_2_object() const
|
Construct_x_monotone_curve_2 construct_x_monotone_curve_2_object() const
|
||||||
{ return Construct_x_monotone_curve_2(*this); }
|
{ return Construct_x_monotone_curve_2(*this); }
|
||||||
|
|
||||||
|
|
@ -1368,13 +1369,13 @@ public:
|
||||||
|
|
||||||
friend class Arr_polycurve_basic_traits_2<Subcurve_traits_2>;
|
friend class Arr_polycurve_basic_traits_2<Subcurve_traits_2>;
|
||||||
|
|
||||||
/*! Constructor. */
|
/*! constructs. */
|
||||||
Parameter_space_in_x_2(const Polycurve_basic_traits_2& traits) :
|
Parameter_space_in_x_2(const Polycurve_basic_traits_2& traits) :
|
||||||
m_poly_traits(traits)
|
m_poly_traits(traits)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/*! Obtains the parameter space at the end of a curve along the
|
/*! obtains the parameter space at the end of a curve along the
|
||||||
* \f$x\f$-axis. Note that if the curve-end coincides with a pole, then
|
* \f$x\f$-axis. Note that if the curve-end coincides with a pole, then
|
||||||
* unless the curve coincides with the identification curve, the curve-end
|
* unless the curve coincides with the identification curve, the curve-end
|
||||||
* is considered to be approaching the boundary, but not on the boundary.
|
* is considered to be approaching the boundary, but not on the boundary.
|
||||||
|
|
@ -1405,7 +1406,7 @@ public:
|
||||||
return geom_traits->parameter_space_in_x_2_object()(xs, ce);
|
return geom_traits->parameter_space_in_x_2_object()(xs, ce);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Obtains the parameter space at a point along the \f$x\f$-axis.
|
/*! obtains the parameter space at a point along the \f$x\f$-axis.
|
||||||
* \param p the point.
|
* \param p the point.
|
||||||
* \return the parameter space at `p`.
|
* \return the parameter space at `p`.
|
||||||
* \pre `p` does not lie on the vertical identification curve.
|
* \pre `p` does not lie on the vertical identification curve.
|
||||||
|
|
@ -1416,7 +1417,7 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/*! Obtain a Parameter_space_in_x_2 function object */
|
/*! obtains a Parameter_space_in_x_2 function object */
|
||||||
Parameter_space_in_x_2 parameter_space_in_x_2_object() const
|
Parameter_space_in_x_2 parameter_space_in_x_2_object() const
|
||||||
{ return Parameter_space_in_x_2(*this); }
|
{ return Parameter_space_in_x_2(*this); }
|
||||||
|
|
||||||
|
|
@ -1433,13 +1434,13 @@ public:
|
||||||
|
|
||||||
friend class Arr_polycurve_basic_traits_2<Subcurve_traits_2>;
|
friend class Arr_polycurve_basic_traits_2<Subcurve_traits_2>;
|
||||||
|
|
||||||
/*! Constructor. */
|
/*! constructs. */
|
||||||
Parameter_space_in_y_2(const Polycurve_basic_traits_2& traits) :
|
Parameter_space_in_y_2(const Polycurve_basic_traits_2& traits) :
|
||||||
m_poly_traits(traits)
|
m_poly_traits(traits)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/*! Obtains the parameter space at the end of an curve along the
|
/*! obtains the parameter space at the end of an curve along the
|
||||||
* \f$y\f$-axis. Note that if the curve-end coincides with a pole, then
|
* \f$y\f$-axis. Note that if the curve-end coincides with a pole, then
|
||||||
* unless the curve coincides with the identification curve, the curve-end
|
* unless the curve coincides with the identification curve, the curve-end
|
||||||
* is considered to be approaching the boundary, but not on the boundary.
|
* is considered to be approaching the boundary, but not on the boundary.
|
||||||
|
|
@ -1470,7 +1471,7 @@ public:
|
||||||
return geom_traits->parameter_space_in_y_2_object()(xs, ce);
|
return geom_traits->parameter_space_in_y_2_object()(xs, ce);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Obtains the parameter space at a point along the \f$y\f$-axis.
|
/*! obtains the parameter space at a point along the \f$y\f$-axis.
|
||||||
* \param p the point.
|
* \param p the point.
|
||||||
* \return the parameter space at `p`.
|
* \return the parameter space at `p`.
|
||||||
* \pre p does not lie on the horizontal identification curve.
|
* \pre p does not lie on the horizontal identification curve.
|
||||||
|
|
@ -1482,7 +1483,7 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/*! Obtain a Parameter_space_in_y_2 function object */
|
/*! obtains a Parameter_space_in_y_2 function object */
|
||||||
Parameter_space_in_y_2 parameter_space_in_y_2_object() const
|
Parameter_space_in_y_2 parameter_space_in_y_2_object() const
|
||||||
{ return Parameter_space_in_y_2(*this); }
|
{ return Parameter_space_in_y_2(*this); }
|
||||||
|
|
||||||
|
|
@ -1499,13 +1500,13 @@ public:
|
||||||
|
|
||||||
friend class Arr_polycurve_basic_traits_2<Subcurve_traits_2>;
|
friend class Arr_polycurve_basic_traits_2<Subcurve_traits_2>;
|
||||||
|
|
||||||
/*! Constructor. */
|
/*! constructs. */
|
||||||
Compare_x_on_boundary_2(const Polycurve_basic_traits_2& traits) :
|
Compare_x_on_boundary_2(const Polycurve_basic_traits_2& traits) :
|
||||||
m_poly_traits(traits)
|
m_poly_traits(traits)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/*! Compare the \f$x\f$-coordinates of a point with the \f$x\f$-coordinate
|
/*! compares the \f$x\f$-coordinates of a point with the \f$x\f$-coordinate
|
||||||
* of an \f$x\f$-curve-end on the boundary.
|
* of an \f$x\f$-curve-end on the boundary.
|
||||||
* \param point the point.
|
* \param point the point.
|
||||||
* \param xcv the \f$x\f$-monotone curve, the endpoint of which is compared.
|
* \param xcv the \f$x\f$-monotone curve, the endpoint of which is compared.
|
||||||
|
|
@ -1525,7 +1526,7 @@ public:
|
||||||
Arr_curve_end ce) const
|
Arr_curve_end ce) const
|
||||||
{ return operator()(point, xcv, ce, Bottom_or_top_sides_category()); }
|
{ return operator()(point, xcv, ce, Bottom_or_top_sides_category()); }
|
||||||
|
|
||||||
/*! Compare the \f$x\f$-coordinates of 2 curve-ends on the boundary of the
|
/*! compares the \f$x\f$-coordinates of 2 curve-ends on the boundary of the
|
||||||
* parameter space.
|
* parameter space.
|
||||||
* \param xcv1 the first curve.
|
* \param xcv1 the first curve.
|
||||||
* \param ce1 the first curve-end indicator:
|
* \param ce1 the first curve-end indicator:
|
||||||
|
|
@ -1553,7 +1554,7 @@ public:
|
||||||
{ return operator()(xcv1, ce1, xcv2, ce2, Bottom_or_top_sides_category()); }
|
{ return operator()(xcv1, ce1, xcv2, ce2, Bottom_or_top_sides_category()); }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/*! \brief compares the \f$x\f$-coordinates of a point with the
|
/*! compares the \f$x\f$-coordinates of a point with the
|
||||||
* \f$x\f$-coordinate of an \f$x\f$-monotone curve-end on the boundary.
|
* \f$x\f$-coordinate of an \f$x\f$-monotone curve-end on the boundary.
|
||||||
*/
|
*/
|
||||||
Comparison_result operator()(const Point_2& point,
|
Comparison_result operator()(const Point_2& point,
|
||||||
|
|
@ -1570,7 +1571,7 @@ public:
|
||||||
return geom_traits->compare_x_on_boundary_2_object()(point, xs, ce);
|
return geom_traits->compare_x_on_boundary_2_object()(point, xs, ce);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! \brief compares the \f$x\f$-coordinates of 2 curve-ends on the boundary
|
/*! compares the \f$x\f$-coordinates of 2 curve-ends on the boundary
|
||||||
* of the parameter space.
|
* of the parameter space.
|
||||||
*/
|
*/
|
||||||
Comparison_result operator()(const X_monotone_curve_2& xcv1,
|
Comparison_result operator()(const X_monotone_curve_2& xcv1,
|
||||||
|
|
@ -1597,13 +1598,12 @@ public:
|
||||||
const Arr_curve_end ce) const
|
const Arr_curve_end ce) const
|
||||||
{ return (ce == ARR_MIN_END) ? 0 : xcv.number_of_subcurves() - 1; }
|
{ return (ce == ARR_MIN_END) ? 0 : xcv.number_of_subcurves() - 1; }
|
||||||
|
|
||||||
/*! Given a point \f$p\f$, an x-monotone curve \f$C(t) = (X(t),Y(t))\f$,
|
/*! given a point \f$p\f$, an \f$x\f$-monotone curve \f$C(t) =
|
||||||
* and an enumerator that specifies either the minimum end or the
|
* (X(t),Y(t))\f$, and an enumerator that specifies either the minimum end
|
||||||
* maximum end of the curve, and thus maps to a parameter value
|
* or the maximum end of the curve, and thus maps to a parameter value \f$d
|
||||||
* \f$d \in \{0,1\}\f$, compare x_p and limit{t => d} X(t).
|
* \in \{0,1\}\f$, compares x_p and limit{t => d} X(t). If the parameter
|
||||||
* If the parameter space is unbounded, a precondition ensures that \f$C\f$
|
* space is unbounded, a precondition ensures that \f$C\f$ has a vertical
|
||||||
* has a vertical asymptote at its \f$d\f$-end; that is
|
* asymptote at its \f$d\f$-end; that is limit{t => d} X(t) is finite.
|
||||||
* limit{t => d} X(t) is finite.
|
|
||||||
*/
|
*/
|
||||||
Comparison_result operator()(const Point_2& p,
|
Comparison_result operator()(const Point_2& p,
|
||||||
const X_monotone_curve_2& xcv,
|
const X_monotone_curve_2& xcv,
|
||||||
|
|
@ -1616,7 +1616,7 @@ public:
|
||||||
return cmp_x_on_boundary(p, xcv[index], ce);
|
return cmp_x_on_boundary(p, xcv[index], ce);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Given two \f$x\f$-monotone curves \f$C_1(t) = (X_1(t),Y_1(t))\f$ and
|
/*! given two \f$x\f$-monotone curves \f$C_1(t) = (X_1(t),Y_1(t))\f$ and
|
||||||
* \f$C2_(t) = (X_2(t),Y_2(t))\f$ and two enumerators that specify either
|
* \f$C2_(t) = (X_2(t),Y_2(t))\f$ and two enumerators that specify either
|
||||||
* the minimum ends or the maximum ends of the curves, and thus map to
|
* the minimum ends or the maximum ends of the curves, and thus map to
|
||||||
* parameter values \f$d_1 \in \{0,1\}\f$ and \f$d_2 \in \{0,1\}\f$ for
|
* parameter values \f$d_1 \in \{0,1\}\f$ and \f$d_2 \in \{0,1\}\f$ for
|
||||||
|
|
@ -1624,7 +1624,7 @@ public:
|
||||||
* limit{t => d1} X1(t) and limit{t => d2} X2(t).
|
* limit{t => d1} X1(t) and limit{t => d2} X2(t).
|
||||||
* If the parameter space is unbounded, a precondition ensures that
|
* If the parameter space is unbounded, a precondition ensures that
|
||||||
* \f$C_1\f$ and \f$C_2\f$ have vertical asymptotes at their respective
|
* \f$C_1\f$ and \f$C_2\f$ have vertical asymptotes at their respective
|
||||||
* ends; that is, limit{t => d1} X1(t) and limit{t =? d2} X2(t) are finite.
|
* ends; that is, limit{t => d1} X1(t) and limit{t => d2} X2(t) are finite.
|
||||||
*/
|
*/
|
||||||
Comparison_result operator()(const X_monotone_curve_2& xcv1,
|
Comparison_result operator()(const X_monotone_curve_2& xcv1,
|
||||||
Arr_curve_end ce1/* for xcv1 */,
|
Arr_curve_end ce1/* for xcv1 */,
|
||||||
|
|
@ -1649,7 +1649,7 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/*! Obtain a Compare_x_on_boundary_2 function object. */
|
/*! obtains a Compare_x_on_boundary_2 function object. */
|
||||||
Compare_x_on_boundary_2 compare_x_on_boundary_2_object() const
|
Compare_x_on_boundary_2 compare_x_on_boundary_2_object() const
|
||||||
{ return Compare_x_on_boundary_2(*this); }
|
{ return Compare_x_on_boundary_2(*this); }
|
||||||
|
|
||||||
|
|
@ -1703,13 +1703,13 @@ public:
|
||||||
|
|
||||||
friend class Arr_polycurve_basic_traits_2<Subcurve_traits_2>;
|
friend class Arr_polycurve_basic_traits_2<Subcurve_traits_2>;
|
||||||
|
|
||||||
/*! Constructor. */
|
/*! constructs. */
|
||||||
Compare_y_on_boundary_2(const Polycurve_basic_traits_2& traits) :
|
Compare_y_on_boundary_2(const Polycurve_basic_traits_2& traits) :
|
||||||
m_poly_traits(traits)
|
m_poly_traits(traits)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/*! Compare the \f$y\f$-coordinate of two given points that lie on the
|
/*! compares the \f$y\f$-coordinate of two given points that lie on the
|
||||||
* vertical identification curve.
|
* vertical identification curve.
|
||||||
* \param p1 the first point.
|
* \param p1 the first point.
|
||||||
* \param p2 the second point.
|
* \param p2 the second point.
|
||||||
|
|
@ -1725,7 +1725,7 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/*! Obtain a Compare_y_on_boundary_2 function object */
|
/*! obtains a Compare_y_on_boundary_2 function object */
|
||||||
Compare_y_on_boundary_2 compare_y_on_boundary_2_object() const
|
Compare_y_on_boundary_2 compare_y_on_boundary_2_object() const
|
||||||
{ return Compare_y_on_boundary_2(*this); }
|
{ return Compare_y_on_boundary_2(*this); }
|
||||||
|
|
||||||
|
|
@ -1742,13 +1742,13 @@ public:
|
||||||
|
|
||||||
friend class Arr_polycurve_basic_traits_2<Subcurve_traits_2>;
|
friend class Arr_polycurve_basic_traits_2<Subcurve_traits_2>;
|
||||||
|
|
||||||
/*! Constructor. */
|
/*! constructs. */
|
||||||
Compare_y_near_boundary_2(const Polycurve_basic_traits_2& traits) :
|
Compare_y_near_boundary_2(const Polycurve_basic_traits_2& traits) :
|
||||||
m_poly_traits(traits)
|
m_poly_traits(traits)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/*! Compare the \f$y\f$-coordinates of 2 curves at their ends near the
|
/*! compares the \f$y\f$-coordinates of 2 curves at their ends near the
|
||||||
* boundary of the parameter space.
|
* boundary of the parameter space.
|
||||||
* \param xcv1 the first curve.
|
* \param xcv1 the first curve.
|
||||||
* \param xcv2 the second curve.
|
* \param xcv2 the second curve.
|
||||||
|
|
@ -1780,7 +1780,7 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/*! Obtain a Compare_y_near_boundary_2 function object */
|
/*! obtains a Compare_y_near_boundary_2 function object */
|
||||||
Compare_y_near_boundary_2 compare_y_near_boundary_2_object() const
|
Compare_y_near_boundary_2 compare_y_near_boundary_2_object() const
|
||||||
{ return Compare_y_near_boundary_2(*this); }
|
{ return Compare_y_near_boundary_2(*this); }
|
||||||
|
|
||||||
|
|
@ -1797,13 +1797,13 @@ public:
|
||||||
|
|
||||||
friend class Arr_polycurve_basic_traits_2<Subcurve_traits_2>;
|
friend class Arr_polycurve_basic_traits_2<Subcurve_traits_2>;
|
||||||
|
|
||||||
/*! Constructor. */
|
/*! constructs. */
|
||||||
Is_on_y_identification_2(const Polycurve_basic_traits_2& traits) :
|
Is_on_y_identification_2(const Polycurve_basic_traits_2& traits) :
|
||||||
m_poly_traits(traits)
|
m_poly_traits(traits)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/*! Determine whether a point lies in the vertical boundary.
|
/*! determines whether a point lies in the vertical boundary.
|
||||||
* \param p the point.
|
* \param p the point.
|
||||||
* \return a Boolean indicating whether `p` lies in the vertical boundary.
|
* \return a Boolean indicating whether `p` lies in the vertical boundary.
|
||||||
*/
|
*/
|
||||||
|
|
@ -1812,7 +1812,7 @@ public:
|
||||||
return geom_traits->is_on_y_identification_2_object()(p);
|
return geom_traits->is_on_y_identification_2_object()(p);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Determine whether an \f$x\f$-monotone curve lies in the vertical
|
/*! determines whether an \f$x\f$-monotone curve lies in the vertical
|
||||||
* boundary.
|
* boundary.
|
||||||
* \param xcv the \f$x\f$-monotone curve.
|
* \param xcv the \f$x\f$-monotone curve.
|
||||||
* \return a Boolean indicating whether `xcv` lies in the vertical boundary.
|
* \return a Boolean indicating whether `xcv` lies in the vertical boundary.
|
||||||
|
|
@ -1825,7 +1825,7 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/*! Obtain a Is_on_y_identification_2 function object */
|
/*! obtains a Is_on_y_identification_2 function object */
|
||||||
Is_on_y_identification_2 is_on_y_identification_2_object() const
|
Is_on_y_identification_2 is_on_y_identification_2_object() const
|
||||||
{ return Is_on_y_identification_2(*this); }
|
{ return Is_on_y_identification_2(*this); }
|
||||||
|
|
||||||
|
|
@ -1842,13 +1842,13 @@ public:
|
||||||
|
|
||||||
friend class Arr_polycurve_basic_traits_2<Subcurve_traits_2>;
|
friend class Arr_polycurve_basic_traits_2<Subcurve_traits_2>;
|
||||||
|
|
||||||
/*! Constructor. */
|
/*! constructs. */
|
||||||
Is_on_x_identification_2(const Polycurve_basic_traits_2& traits) :
|
Is_on_x_identification_2(const Polycurve_basic_traits_2& traits) :
|
||||||
m_poly_traits(traits)
|
m_poly_traits(traits)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/*! Determine whether a point lies in the vertical boundary.
|
/*! determines whether a point lies in the vertical boundary.
|
||||||
* \param p the point.
|
* \param p the point.
|
||||||
* \return a Boolean indicating whether `p` lies in the vertical boundary.
|
* \return a Boolean indicating whether `p` lies in the vertical boundary.
|
||||||
*/
|
*/
|
||||||
|
|
@ -1857,7 +1857,7 @@ public:
|
||||||
return geom_traits->is_on_x_identification_2_object()(p);
|
return geom_traits->is_on_x_identification_2_object()(p);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Determine whether an \f$x\f$-monotone curve lies in the vertical
|
/*! determines whether an \f$x\f$-monotone curve lies in the vertical
|
||||||
* boundary.
|
* boundary.
|
||||||
* \param `xcv` the \f$x\f$-monotone curve.
|
* \param `xcv` the \f$x\f$-monotone curve.
|
||||||
* \return a Boolean indicating whether `xcv` lies in the vertical boundary.
|
* \return a Boolean indicating whether `xcv` lies in the vertical boundary.
|
||||||
|
|
@ -1870,7 +1870,7 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/*! Obtain a Is_on_x_identification_2 function object */
|
/*! obtains a Is_on_x_identification_2 function object */
|
||||||
Is_on_x_identification_2 is_on_x_identification_2_object() const
|
Is_on_x_identification_2 is_on_x_identification_2_object() const
|
||||||
{ return Is_on_x_identification_2(*this); }
|
{ return Is_on_x_identification_2(*this); }
|
||||||
|
|
||||||
|
|
@ -1906,13 +1906,13 @@ public:
|
||||||
|
|
||||||
friend class Arr_polycurve_basic_traits_2<Subcurve_traits_2>;
|
friend class Arr_polycurve_basic_traits_2<Subcurve_traits_2>;
|
||||||
|
|
||||||
/*! Constructor. */
|
/*! constructs. */
|
||||||
Push_back_2(const Polycurve_basic_traits_2& traits) :
|
Push_back_2(const Polycurve_basic_traits_2& traits) :
|
||||||
m_poly_traits(traits)
|
m_poly_traits(traits)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/*! Append a subcurve to an existing \f$x\f$-monotone polycurve at the back.
|
/*! appends a subcurve to an existing \f$x\f$-monotone polycurve at the back.
|
||||||
*/
|
*/
|
||||||
void operator()(X_monotone_curve_2& xcv, const X_monotone_subcurve_2& seg)
|
void operator()(X_monotone_curve_2& xcv, const X_monotone_subcurve_2& seg)
|
||||||
const
|
const
|
||||||
|
|
@ -2071,7 +2071,7 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/*! Obtain a Push_back_2 functor object. */
|
/*! obtains a Push_back_2 functor object. */
|
||||||
Push_back_2 push_back_2_object() const { return Push_back_2(*this); }
|
Push_back_2 push_back_2_object() const { return Push_back_2(*this); }
|
||||||
|
|
||||||
/* Functor to augment a polycurve by adding a subcurve at the front.
|
/* Functor to augment a polycurve by adding a subcurve at the front.
|
||||||
|
|
@ -2087,7 +2087,7 @@ public:
|
||||||
|
|
||||||
friend class Arr_polycurve_basic_traits_2<Subcurve_traits_2>;
|
friend class Arr_polycurve_basic_traits_2<Subcurve_traits_2>;
|
||||||
|
|
||||||
/*! Constructor. */
|
/*! constructs. */
|
||||||
Push_front_2(const Polycurve_basic_traits_2& traits) :
|
Push_front_2(const Polycurve_basic_traits_2& traits) :
|
||||||
m_poly_traits(traits)
|
m_poly_traits(traits)
|
||||||
{}
|
{}
|
||||||
|
|
@ -2225,7 +2225,7 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/*! Obtain a Push_front_2 functor object. */
|
/*! obtains a Push_front_2 functor object. */
|
||||||
Push_front_2 push_front_2_object() const { return Push_front_2(*this); }
|
Push_front_2 push_front_2_object() const { return Push_front_2(*this); }
|
||||||
|
|
||||||
//! A functor that trimps an \f$x\f$-monotone curve.
|
//! A functor that trimps an \f$x\f$-monotone curve.
|
||||||
|
|
@ -2239,11 +2239,11 @@ public:
|
||||||
|
|
||||||
friend class Arr_polycurve_basic_traits_2<Subcurve_traits_2>;
|
friend class Arr_polycurve_basic_traits_2<Subcurve_traits_2>;
|
||||||
|
|
||||||
/*! Constructor. */
|
/*! constructs. */
|
||||||
Trim_2(const Polycurve_basic_traits_2& traits) : m_poly_traits(traits) {}
|
Trim_2(const Polycurve_basic_traits_2& traits) : m_poly_traits(traits) {}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/*! \brief returns a trimmed version of the polycurve with `source` and
|
/*! returns a trimmed version of the polycurve with `source` and
|
||||||
* `target` as end points.
|
* `target` as end points.
|
||||||
*/
|
*/
|
||||||
X_monotone_curve_2 operator()(const X_monotone_curve_2& xcv,
|
X_monotone_curve_2 operator()(const X_monotone_curve_2& xcv,
|
||||||
|
|
@ -2339,7 +2339,7 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/*! Obtain a Trim_2 functor object. */
|
/*! obtains a Trim_2 functor object. */
|
||||||
Trim_2 trim_2_object() const { return Trim_2(*this); }
|
Trim_2 trim_2_object() const { return Trim_2(*this); }
|
||||||
|
|
||||||
///@}
|
///@}
|
||||||
|
|
@ -2349,7 +2349,7 @@ protected:
|
||||||
* Roadmap: locate() should return an iterator to the located subcurve
|
* Roadmap: locate() should return an iterator to the located subcurve
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*! Obtain the index of the subcurve in the polycurve that contains a point
|
/*! obtains the index of the subcurve in the polycurve that contains a point
|
||||||
* \f$q\f$ in its \f$x\f$-range. The function performs a binary search, so if
|
* \f$q\f$ in its \f$x\f$-range. The function performs a binary search, so if
|
||||||
* the point \f$q\f$ is in the \f$x\f$-range of the polycurve with \f$n\f$
|
* the point \f$q\f$ is in the \f$x\f$-range of the polycurve with \f$n\f$
|
||||||
* subcurves, the subcurve containing it can be located in \cgalBigO{log n}
|
* subcurves, the subcurve containing it can be located in \cgalBigO{log n}
|
||||||
|
|
@ -2491,7 +2491,7 @@ protected:
|
||||||
{ return m_compare(xs, ce, m_x_monotone_subcurve, m_curve_end); }
|
{ return m_compare(xs, ce, m_x_monotone_subcurve, m_curve_end); }
|
||||||
};
|
};
|
||||||
|
|
||||||
/*! Locate the index of a curve in a polycurve that contains an endpoint
|
/*! locates the index of a curve in a polycurve that contains an endpoint
|
||||||
* of a curve.
|
* of a curve.
|
||||||
* This implementation is used in the case where at least one side of the
|
* This implementation is used in the case where at least one side of the
|
||||||
* parameter space is not oblivious.
|
* parameter space is not oblivious.
|
||||||
|
|
@ -2521,7 +2521,7 @@ protected:
|
||||||
return locate_gen(xcv, compare);
|
return locate_gen(xcv, compare);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Locate the index of a curve in a polycurve that contains an endpoint
|
/*! locates the index of a curve in a polycurve that contains an endpoint
|
||||||
* of a curve.
|
* of a curve.
|
||||||
* This implementation is used in the case where all sides of the parameter
|
* This implementation is used in the case where all sides of the parameter
|
||||||
* space is oblivious.
|
* space is oblivious.
|
||||||
|
|
@ -2540,7 +2540,7 @@ protected:
|
||||||
return locate(xcv, p);
|
return locate(xcv, p);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Locate the index of a curve in a polycurve that contains a point.
|
/*! locates the index of a curve in a polycurve that contains a point.
|
||||||
* This implementation is used in the case where at least one side of the
|
* This implementation is used in the case where at least one side of the
|
||||||
* parameter space is not oblivious.
|
* parameter space is not oblivious.
|
||||||
* \param(in) xcv the given polycurve.
|
* \param(in) xcv the given polycurve.
|
||||||
|
|
@ -2567,7 +2567,7 @@ protected:
|
||||||
return locate_gen(xcv, compare);
|
return locate_gen(xcv, compare);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Locate the index of a curve in a polycurve that contains a point.
|
/*! locates the index of a curve in a polycurve that contains a point.
|
||||||
* This implementation is used in the case where all sides of the parameter
|
* This implementation is used in the case where all sides of the parameter
|
||||||
* space are oblivious.
|
* space are oblivious.
|
||||||
* \param(in) xcv the given polycurve.
|
* \param(in) xcv the given polycurve.
|
||||||
|
|
@ -2599,7 +2599,7 @@ protected:
|
||||||
return locate_gen(xcv, compare);
|
return locate_gen(xcv, compare);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Find the index of the subcurve in the polycurve that is defined to the
|
/*! finds the index of the subcurve in the polycurve that is defined to the
|
||||||
* left (or to the right) of the point `q`.
|
* left (or to the right) of the point `q`.
|
||||||
* \param cv the polycurve curve.
|
* \param cv the polycurve curve.
|
||||||
* \param q the point.
|
* \param q the point.
|
||||||
|
|
|
||||||
|
|
@ -96,23 +96,23 @@ public:
|
||||||
/// \name Creation
|
/// \name Creation
|
||||||
//@{
|
//@{
|
||||||
|
|
||||||
/*! Construct default. */
|
/*! constructs default. */
|
||||||
_Segment_cached_2();
|
_Segment_cached_2();
|
||||||
|
|
||||||
/*! Construct a segment from a Kernel segment.
|
/*! constructs a segment from a Kernel segment.
|
||||||
* \param seg the segment.
|
* \param seg the segment.
|
||||||
* \pre the segment is not degenerate.
|
* \pre the segment is not degenerate.
|
||||||
*/
|
*/
|
||||||
_Segment_cached_2(const Segment_2& seg);
|
_Segment_cached_2(const Segment_2& seg);
|
||||||
|
|
||||||
/*! Construct a segment from two endpoints.
|
/*! constructs a segment from two endpoints.
|
||||||
* \param source the source point.
|
* \param source the source point.
|
||||||
* \param target the target point.
|
* \param target the target point.
|
||||||
* \param `source` and `target` are not equal.
|
* \param `source` and `target` are not equal.
|
||||||
*/
|
*/
|
||||||
_Segment_cached_2(const Point_2& source, const Point_2& target);
|
_Segment_cached_2(const Point_2& source, const Point_2& target);
|
||||||
|
|
||||||
/*! Construct a segment from two endpoints on a supporting line.
|
/*! constructs a segment from two endpoints on a supporting line.
|
||||||
* \param line the supporting line.
|
* \param line the supporting line.
|
||||||
* \param source the source point.
|
* \param source the source point.
|
||||||
* \param target the target point.
|
* \param target the target point.
|
||||||
|
|
@ -121,7 +121,7 @@ public:
|
||||||
_Segment_cached_2(const Line_2& line,
|
_Segment_cached_2(const Line_2& line,
|
||||||
const Point_2& source, const Point_2& target);
|
const Point_2& source, const Point_2& target);
|
||||||
|
|
||||||
/*! Construct a segment from all fields.
|
/*! constructs a segment from all fields.
|
||||||
* \param line the supporting line.
|
* \param line the supporting line.
|
||||||
* \param source the source point.
|
* \param source the source point.
|
||||||
* \param target the target point.
|
* \param target the target point.
|
||||||
|
|
@ -133,7 +133,7 @@ public:
|
||||||
const Point_2& source, const Point_2& target,
|
const Point_2& source, const Point_2& target,
|
||||||
bool is_directed_right, bool is_vert, bool is_degen);
|
bool is_directed_right, bool is_vert, bool is_degen);
|
||||||
|
|
||||||
/*! Assign.
|
/*! assigns.
|
||||||
* \param seg the source segment to copy from
|
* \param seg the source segment to copy from
|
||||||
* \pre the segment is not degenerate.
|
* \pre the segment is not degenerate.
|
||||||
*/
|
*/
|
||||||
|
|
@ -144,44 +144,44 @@ public:
|
||||||
/// \name Accessors
|
/// \name Accessors
|
||||||
//@{
|
//@{
|
||||||
|
|
||||||
/*! Obtain the supporting line.
|
/*! obtains the supporting line.
|
||||||
* \return the supporting line.
|
* \return the supporting line.
|
||||||
*/
|
*/
|
||||||
const Line_2& line() const;
|
const Line_2& line() const;
|
||||||
|
|
||||||
/*! Obtain the segment source.
|
/*! obtains the segment source.
|
||||||
* \return the segment source.
|
* \return the segment source.
|
||||||
*/
|
*/
|
||||||
const Point_2& source() const;
|
const Point_2& source() const;
|
||||||
|
|
||||||
/*! Obtain the segment target.
|
/*! obtains the segment target.
|
||||||
* \return the segment target.
|
* \return the segment target.
|
||||||
*/
|
*/
|
||||||
const Point_2& target() const;
|
const Point_2& target() const;
|
||||||
|
|
||||||
/*! Determine whether the curve is vertical.
|
/*! determines whether the curve is vertical.
|
||||||
* \return a Boolean flag indicating whether the curve is vertical.
|
* \return a Boolean flag indicating whether the curve is vertical.
|
||||||
*/
|
*/
|
||||||
bool is_vertical() const;
|
bool is_vertical() const;
|
||||||
|
|
||||||
/*! Determine whether the curve is degenerate.
|
/*! determines whether the curve is degenerate.
|
||||||
* return a Boolean flag indicating whether the curve is degenerate.
|
* return a Boolean flag indicating whether the curve is degenerate.
|
||||||
*/
|
*/
|
||||||
bool is_degenerate() const;
|
bool is_degenerate() const;
|
||||||
|
|
||||||
/*! Determine whether the curve is lexicographically directed from left to
|
/*! determines whether the curve is lexicographically directed from left to
|
||||||
* right.
|
* right.
|
||||||
* \return a Boolean flag indicating whether the curve is lexicographically
|
* \return a Boolean flag indicating whether the curve is lexicographically
|
||||||
* directed from left to right.
|
* directed from left to right.
|
||||||
*/
|
*/
|
||||||
bool is_directed_right() const;
|
bool is_directed_right() const;
|
||||||
|
|
||||||
/*! Obtain the (lexicographically) left endpoint.
|
/*! obtains the (lexicographically) left endpoint.
|
||||||
* \return the (lexicographically) left endpoint.
|
* \return the (lexicographically) left endpoint.
|
||||||
*/
|
*/
|
||||||
const Point_2& left() const;
|
const Point_2& left() const;
|
||||||
|
|
||||||
/*! Obtain the (lexicographically) right endpoint.
|
/*! obtains the (lexicographically) right endpoint.
|
||||||
* \return the (lexicographically) right endpoint.
|
* \return the (lexicographically) right endpoint.
|
||||||
*/
|
*/
|
||||||
const Point_2& right() const;
|
const Point_2& right() const;
|
||||||
|
|
@ -191,13 +191,13 @@ public:
|
||||||
/// \name Modifiers
|
/// \name Modifiers
|
||||||
//@{
|
//@{
|
||||||
|
|
||||||
/*! Set the (lexicographically) left endpoint.
|
/*! sets the (lexicographically) left endpoint.
|
||||||
* \param p the point to set.
|
* \param p the point to set.
|
||||||
* \pre p lies on the supporting line to the left of the right endpoint.
|
* \pre p lies on the supporting line to the left of the right endpoint.
|
||||||
*/
|
*/
|
||||||
void set_left(const Point_2& p);
|
void set_left(const Point_2& p);
|
||||||
|
|
||||||
/*! Set the (lexicographically) right endpoint.
|
/*! sets the (lexicographically) right endpoint.
|
||||||
* \param p the point to set.
|
* \param p the point to set.
|
||||||
* \pre p lies on the supporting line to the right of the left endpoint.
|
* \pre p lies on the supporting line to the right of the left endpoint.
|
||||||
*/
|
*/
|
||||||
|
|
@ -208,14 +208,15 @@ public:
|
||||||
/// \name Deprecated
|
/// \name Deprecated
|
||||||
//@{
|
//@{
|
||||||
|
|
||||||
/*! Determine whether the given point is in the \f$x\f$-range of the segment.
|
/*! determine whether the given point is in the \f$x\f$-range of the segment.
|
||||||
* \param p the query point.
|
* \param p the query point.
|
||||||
* \return (true) is in the \f$x\f$-range of the segment; (false) if it is
|
* \return (true) is in the \f$x\f$-range of the segment; (false) if it is
|
||||||
* not.
|
* not.
|
||||||
*/
|
*/
|
||||||
CGAL_DEPRECATED bool is_in_x_range(const Point_2& p) const;
|
CGAL_DEPRECATED bool is_in_x_range(const Point_2& p) const;
|
||||||
|
|
||||||
/*! Determine whether the given point is in the \f$y\f$-range of the segment.
|
/*! determines whether the given point is in the \f$y\f$-range of the
|
||||||
|
* segment.
|
||||||
* \param p the query point.
|
* \param p the query point.
|
||||||
* \return (true) is in the \f$y\f$-range of the segment; (false) if it is
|
* \return (true) is in the \f$y\f$-range of the segment; (false) if it is
|
||||||
* not.
|
* not.
|
||||||
|
|
@ -233,7 +234,7 @@ public:
|
||||||
typedef unsigned int Multiplicity;
|
typedef unsigned int Multiplicity;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/*! Construct default. */
|
/*! constructs default. */
|
||||||
Arr_segment_traits_2() {}
|
Arr_segment_traits_2() {}
|
||||||
|
|
||||||
/// \name Basic functor definitions.
|
/// \name Basic functor definitions.
|
||||||
|
|
@ -246,7 +247,7 @@ public:
|
||||||
//! The traits (in case it has state).
|
//! The traits (in case it has state).
|
||||||
const Traits& m_traits;
|
const Traits& m_traits;
|
||||||
|
|
||||||
/*! Constructor
|
/*! constructs
|
||||||
* \param traits the traits (in case it has state)
|
* \param traits the traits (in case it has state)
|
||||||
*/
|
*/
|
||||||
Compare_x_2(const Traits& traits) : m_traits(traits) {}
|
Compare_x_2(const Traits& traits) : m_traits(traits) {}
|
||||||
|
|
@ -254,7 +255,7 @@ public:
|
||||||
friend class Arr_segment_traits_2<Kernel>;
|
friend class Arr_segment_traits_2<Kernel>;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/*! Compare the \f$x\f$-coordinates of two points.
|
/*! compares the \f$x\f$-coordinates of two points.
|
||||||
* \param p1 the first point.
|
* \param p1 the first point.
|
||||||
* \param p2 the second point.
|
* \param p2 the second point.
|
||||||
* \return `LARGER` if x(p1) > x(p2);
|
* \return `LARGER` if x(p1) > x(p2);
|
||||||
|
|
@ -268,7 +269,7 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/*! Obtain a `Compare_x_2` functor object. */
|
/*! obtains a `Compare_x_2` functor object. */
|
||||||
Compare_x_2 compare_x_2_object() const { return Compare_x_2(*this); }
|
Compare_x_2 compare_x_2_object() const { return Compare_x_2(*this); }
|
||||||
|
|
||||||
class Compare_xy_2 {
|
class Compare_xy_2 {
|
||||||
|
|
@ -278,7 +279,7 @@ public:
|
||||||
/*! The traits (in case it has state) */
|
/*! The traits (in case it has state) */
|
||||||
const Traits& m_traits;
|
const Traits& m_traits;
|
||||||
|
|
||||||
/*! Constructor
|
/*! constructs
|
||||||
* \param traits the traits (in case it has state)
|
* \param traits the traits (in case it has state)
|
||||||
*/
|
*/
|
||||||
Compare_xy_2(const Traits& traits) : m_traits(traits) {}
|
Compare_xy_2(const Traits& traits) : m_traits(traits) {}
|
||||||
|
|
@ -286,7 +287,7 @@ public:
|
||||||
friend class Arr_segment_traits_2<Kernel>;
|
friend class Arr_segment_traits_2<Kernel>;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/*! Compare two points lexicographically: by x, then by y.
|
/*! compares two points lexicographically: by x, then by y.
|
||||||
* \param p1 the first point.
|
* \param p1 the first point.
|
||||||
* \param p2 the second point.
|
* \param p2 the second point.
|
||||||
* \return LARGER if x(p1) > x(p2), or if x(p1) = x(p2) and y(p1) > y(p2);
|
* \return LARGER if x(p1) > x(p2), or if x(p1) = x(p2) and y(p1) > y(p2);
|
||||||
|
|
@ -300,12 +301,12 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/*! Obtain a `Compare_xy_2` functor object. */
|
/*! obtains a `Compare_xy_2` functor object. */
|
||||||
Compare_xy_2 compare_xy_2_object() const { return Compare_xy_2(*this); }
|
Compare_xy_2 compare_xy_2_object() const { return Compare_xy_2(*this); }
|
||||||
|
|
||||||
class Construct_min_vertex_2 {
|
class Construct_min_vertex_2 {
|
||||||
public:
|
public:
|
||||||
/*! Obtain the left endpoint of the \f$x\f$-monotone curve (segment).
|
/*! obtains the left endpoint of the \f$x\f$-monotone curve (segment).
|
||||||
* \param cv the curve.
|
* \param cv the curve.
|
||||||
* \return the left endpoint.
|
* \return the left endpoint.
|
||||||
*/
|
*/
|
||||||
|
|
@ -313,13 +314,13 @@ public:
|
||||||
{ return (cv.left()); }
|
{ return (cv.left()); }
|
||||||
};
|
};
|
||||||
|
|
||||||
/*! Obtain a `Construct_min_vertex_2` functor object. */
|
/*! obtains a `Construct_min_vertex_2` functor object. */
|
||||||
Construct_min_vertex_2 construct_min_vertex_2_object() const
|
Construct_min_vertex_2 construct_min_vertex_2_object() const
|
||||||
{ return Construct_min_vertex_2(); }
|
{ return Construct_min_vertex_2(); }
|
||||||
|
|
||||||
class Construct_max_vertex_2 {
|
class Construct_max_vertex_2 {
|
||||||
public:
|
public:
|
||||||
/*! Obtain the right endpoint of the \f$x\f$-monotone curve (segment).
|
/*! obtains the right endpoint of the \f$x\f$-monotone curve (segment).
|
||||||
* \param cv the curve.
|
* \param cv the curve.
|
||||||
* \return the right endpoint.
|
* \return the right endpoint.
|
||||||
*/
|
*/
|
||||||
|
|
@ -327,13 +328,13 @@ public:
|
||||||
{ return (cv.right()); }
|
{ return (cv.right()); }
|
||||||
};
|
};
|
||||||
|
|
||||||
/*! Obtain a `Construct_max_vertex_2` functor object. */
|
/*! obtains a `Construct_max_vertex_2` functor object. */
|
||||||
Construct_max_vertex_2 construct_max_vertex_2_object() const
|
Construct_max_vertex_2 construct_max_vertex_2_object() const
|
||||||
{ return Construct_max_vertex_2(); }
|
{ return Construct_max_vertex_2(); }
|
||||||
|
|
||||||
class Is_vertical_2 {
|
class Is_vertical_2 {
|
||||||
public:
|
public:
|
||||||
/*! Check whether the given \f$x\f$-monotone curve is a vertical segment.
|
/*! checks whether the given \f$x\f$-monotone curve is a vertical segment.
|
||||||
* \param cv the curve.
|
* \param cv the curve.
|
||||||
* \return (true) if the curve is a vertical segment; (false) otherwise.
|
* \return (true) if the curve is a vertical segment; (false) otherwise.
|
||||||
*/
|
*/
|
||||||
|
|
@ -341,17 +342,17 @@ public:
|
||||||
{ return (cv.is_vertical()); }
|
{ return (cv.is_vertical()); }
|
||||||
};
|
};
|
||||||
|
|
||||||
/*! Obtain an `Is_vertical_2` functor object. */
|
/*! obtains an `Is_vertical_2` functor object. */
|
||||||
Is_vertical_2 is_vertical_2_object () const { return Is_vertical_2(); }
|
Is_vertical_2 is_vertical_2_object () const { return Is_vertical_2(); }
|
||||||
|
|
||||||
class Compare_y_at_x_2 {
|
class Compare_y_at_x_2 {
|
||||||
protected:
|
protected:
|
||||||
typedef Arr_segment_traits_2<Kernel> Traits;
|
typedef Arr_segment_traits_2<Kernel> Traits;
|
||||||
|
|
||||||
/*! the traits (in case it has state) */
|
/*! The traits (in case it has state) */
|
||||||
const Traits& m_traits;
|
const Traits& m_traits;
|
||||||
|
|
||||||
/*! Constructor
|
/*! constructs
|
||||||
* \param traits the traits (in case it has state)
|
* \param traits the traits (in case it has state)
|
||||||
*/
|
*/
|
||||||
Compare_y_at_x_2(const Traits& traits) : m_traits(traits) {}
|
Compare_y_at_x_2(const Traits& traits) : m_traits(traits) {}
|
||||||
|
|
@ -359,7 +360,7 @@ public:
|
||||||
friend class Arr_segment_traits_2<Kernel>;
|
friend class Arr_segment_traits_2<Kernel>;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/*! Return the location of the given point with respect to the input curve.
|
/*! returns the location of the given point with respect to the input curve.
|
||||||
* \param cv the curve.
|
* \param cv the curve.
|
||||||
* \param p the point.
|
* \param p the point.
|
||||||
* \pre `p` is in the \f$x\f$-range of `cv`.
|
* \pre `p` is in the \f$x\f$-range of `cv`.
|
||||||
|
|
@ -389,7 +390,7 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/*! Obtain a `Compare_y_at_x_2` functor object. */
|
/*! obtains a `Compare_y_at_x_2` functor object. */
|
||||||
Compare_y_at_x_2 compare_y_at_x_2_object() const
|
Compare_y_at_x_2 compare_y_at_x_2_object() const
|
||||||
{ return Compare_y_at_x_2(*this); }
|
{ return Compare_y_at_x_2(*this); }
|
||||||
|
|
||||||
|
|
@ -400,7 +401,7 @@ public:
|
||||||
/*! The traits (in case it has state) */
|
/*! The traits (in case it has state) */
|
||||||
const Traits& m_traits;
|
const Traits& m_traits;
|
||||||
|
|
||||||
/*! Constructor
|
/*! constructs
|
||||||
* \param traits the traits (in case it has state)
|
* \param traits the traits (in case it has state)
|
||||||
*/
|
*/
|
||||||
Compare_y_at_x_left_2(const Traits& traits) : m_traits(traits) {}
|
Compare_y_at_x_left_2(const Traits& traits) : m_traits(traits) {}
|
||||||
|
|
@ -408,7 +409,7 @@ public:
|
||||||
friend class Arr_segment_traits_2<Kernel>;
|
friend class Arr_segment_traits_2<Kernel>;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/*! Compare the \f$y\f$-value of two \f$x\f$-monotone curves immediately to
|
/*! compares the \f$y\f$-value of two \f$x\f$-monotone curves immediately to
|
||||||
* the left of their intersection point.
|
* the left of their intersection point.
|
||||||
* \param cv1 the first curve.
|
* \param cv1 the first curve.
|
||||||
* \param cv2 the second curve.
|
* \param cv2 the second curve.
|
||||||
|
|
@ -443,7 +444,7 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/*! Obtain a `Compare_y_at_x_left_2` functor object. */
|
/*! obtains a `Compare_y_at_x_left_2` functor object. */
|
||||||
Compare_y_at_x_left_2 compare_y_at_x_left_2_object() const
|
Compare_y_at_x_left_2 compare_y_at_x_left_2_object() const
|
||||||
{ return Compare_y_at_x_left_2(*this); }
|
{ return Compare_y_at_x_left_2(*this); }
|
||||||
|
|
||||||
|
|
@ -454,7 +455,7 @@ public:
|
||||||
/*! The traits (in case it has state) */
|
/*! The traits (in case it has state) */
|
||||||
const Traits& m_traits;
|
const Traits& m_traits;
|
||||||
|
|
||||||
/*! Constructor
|
/*! constructs
|
||||||
* \param traits the traits (in case it has state)
|
* \param traits the traits (in case it has state)
|
||||||
*/
|
*/
|
||||||
Compare_y_at_x_right_2(const Traits& traits) : m_traits(traits) {}
|
Compare_y_at_x_right_2(const Traits& traits) : m_traits(traits) {}
|
||||||
|
|
@ -462,7 +463,7 @@ public:
|
||||||
friend class Arr_segment_traits_2<Kernel>;
|
friend class Arr_segment_traits_2<Kernel>;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/*! Compare the \f$y\f$-value of two \f$x\f$-monotone curves immediately to
|
/*! compares the \f$y\f$-value of two \f$x\f$-monotone curves immediately to
|
||||||
* the right of their intersection point.
|
* the right of their intersection point.
|
||||||
* \param cv1 the first curve.
|
* \param cv1 the first curve.
|
||||||
* \param cv2 the second curve.
|
* \param cv2 the second curve.
|
||||||
|
|
@ -495,7 +496,7 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/*! Obtain a `Compare_y_at_x_right_2` functor object. */
|
/*! obtains a `Compare_y_at_x_right_2` functor object. */
|
||||||
Compare_y_at_x_right_2 compare_y_at_x_right_2_object() const
|
Compare_y_at_x_right_2 compare_y_at_x_right_2_object() const
|
||||||
{ return Compare_y_at_x_right_2(*this); }
|
{ return Compare_y_at_x_right_2(*this); }
|
||||||
|
|
||||||
|
|
@ -506,7 +507,7 @@ public:
|
||||||
/*! The traits (in case it has state) */
|
/*! The traits (in case it has state) */
|
||||||
const Traits& m_traits;
|
const Traits& m_traits;
|
||||||
|
|
||||||
/*! Constructor
|
/*! constructs
|
||||||
* \param traits the traits (in case it has state)
|
* \param traits the traits (in case it has state)
|
||||||
*/
|
*/
|
||||||
Equal_2(const Traits& traits) : m_traits(traits) {}
|
Equal_2(const Traits& traits) : m_traits(traits) {}
|
||||||
|
|
@ -514,7 +515,7 @@ public:
|
||||||
friend class Arr_segment_traits_2<Kernel>;
|
friend class Arr_segment_traits_2<Kernel>;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/*! Check whether the two \f$x\f$-monotone curves are the same (have the
|
/*! checks whether the two \f$x\f$-monotone curves are the same (have the
|
||||||
* same graph).
|
* same graph).
|
||||||
* \param cv1 the first curve.
|
* \param cv1 the first curve.
|
||||||
* \param cv2 the second curve.
|
* \param cv2 the second curve.
|
||||||
|
|
@ -530,7 +531,7 @@ public:
|
||||||
equal(cv1.right(), cv2.right()));
|
equal(cv1.right(), cv2.right()));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Determine whether the two points are the same.
|
/*! determines whether the two points are the same.
|
||||||
* \param p1 the first point.
|
* \param p1 the first point.
|
||||||
* \param p2 the second point.
|
* \param p2 the second point.
|
||||||
* \return (true) if the two point are the same; (false) otherwise.
|
* \return (true) if the two point are the same; (false) otherwise.
|
||||||
|
|
@ -542,7 +543,7 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/*! Obtain an `Equal_2` functor object. */
|
/*! obtains an `Equal_2` functor object. */
|
||||||
Equal_2 equal_2_object() const { return Equal_2(*this); }
|
Equal_2 equal_2_object() const { return Equal_2(*this); }
|
||||||
|
|
||||||
//@}
|
//@}
|
||||||
|
|
@ -555,7 +556,7 @@ public:
|
||||||
*/
|
*/
|
||||||
class Make_x_monotone_2 {
|
class Make_x_monotone_2 {
|
||||||
public:
|
public:
|
||||||
/*! Subdivide a given curve into \f$x\f$-monotone subcurves and insert them
|
/*! subdivides a given curve into \f$x\f$-monotone subcurves and insert them
|
||||||
* into a given output iterator. As segments are always \f$x\f$_monotone a
|
* into a given output iterator. As segments are always \f$x\f$_monotone a
|
||||||
* single object is inserted.
|
* single object is inserted.
|
||||||
* \param cv the curve.
|
* \param cv the curve.
|
||||||
|
|
@ -575,7 +576,7 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/*! Obtain a `Make_x_monotone_2` functor object. */
|
/*! obtains a `Make_x_monotone_2` functor object. */
|
||||||
Make_x_monotone_2 make_x_monotone_2_object() const
|
Make_x_monotone_2 make_x_monotone_2_object() const
|
||||||
{ return Make_x_monotone_2(); }
|
{ return Make_x_monotone_2(); }
|
||||||
|
|
||||||
|
|
@ -586,7 +587,7 @@ public:
|
||||||
/*! The traits (in case it has state) */
|
/*! The traits (in case it has state) */
|
||||||
const Traits& m_traits;
|
const Traits& m_traits;
|
||||||
|
|
||||||
/*! Constructor
|
/*! constructs
|
||||||
* \param traits the traits (in case it has state)
|
* \param traits the traits (in case it has state)
|
||||||
*/
|
*/
|
||||||
Split_2(const Traits& traits) : m_traits(traits) {}
|
Split_2(const Traits& traits) : m_traits(traits) {}
|
||||||
|
|
@ -594,7 +595,7 @@ public:
|
||||||
friend class Arr_segment_traits_2<Kernel>;
|
friend class Arr_segment_traits_2<Kernel>;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/*! Split a given \f$x\f$-monotone curve at a given point into two
|
/*! split a given \f$x\f$-monotone curve at a given point into two
|
||||||
* sub-curves.
|
* sub-curves.
|
||||||
* \param cv the curve to split
|
* \param cv the curve to split
|
||||||
* \param p the split point.
|
* \param p the split point.
|
||||||
|
|
@ -622,7 +623,7 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/*! Obtain a `Split_2` functor object. */
|
/*! obtains a `Split_2` functor object. */
|
||||||
Split_2 split_2_object() const { return Split_2(*this); }
|
Split_2 split_2_object() const { return Split_2(*this); }
|
||||||
|
|
||||||
class Intersect_2 {
|
class Intersect_2 {
|
||||||
|
|
@ -632,7 +633,7 @@ public:
|
||||||
/*! The traits (in case it has state) */
|
/*! The traits (in case it has state) */
|
||||||
const Traits& m_traits;
|
const Traits& m_traits;
|
||||||
|
|
||||||
/*! Construct
|
/*! constructs
|
||||||
* \param traits the traits (in case it has state)
|
* \param traits the traits (in case it has state)
|
||||||
*/
|
*/
|
||||||
Intersect_2(const Traits& traits) : m_traits(traits) {}
|
Intersect_2(const Traits& traits) : m_traits(traits) {}
|
||||||
|
|
@ -682,7 +683,7 @@ public:
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Determine whether the bounding boxes of two segments overlap
|
/*! determines whether the bounding boxes of two segments overlap
|
||||||
*/
|
*/
|
||||||
bool do_bboxes_overlap(const X_monotone_curve_2& cv1,
|
bool do_bboxes_overlap(const X_monotone_curve_2& cv1,
|
||||||
const X_monotone_curve_2& cv2) const
|
const X_monotone_curve_2& cv2) const
|
||||||
|
|
@ -695,7 +696,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/*! Find the intersections of the two given curves and insert them into the
|
/*! finds the intersections of the two given curves and insert them into the
|
||||||
* given output iterator. As two segments may intersect only once, only a
|
* given output iterator. As two segments may intersect only once, only a
|
||||||
* single intersection will be contained in the iterator.
|
* single intersection will be contained in the iterator.
|
||||||
* \param cv1 the first curve.
|
* \param cv1 the first curve.
|
||||||
|
|
@ -781,7 +782,7 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/*! Obtain an `Intersect_2` functor object. */
|
/*! obtains an `Intersect_2` functor object. */
|
||||||
Intersect_2 intersect_2_object() const { return Intersect_2(*this); }
|
Intersect_2 intersect_2_object() const { return Intersect_2(*this); }
|
||||||
|
|
||||||
class Are_mergeable_2 {
|
class Are_mergeable_2 {
|
||||||
|
|
@ -791,7 +792,7 @@ public:
|
||||||
/*! The traits (in case it has state) */
|
/*! The traits (in case it has state) */
|
||||||
const Traits& m_traits;
|
const Traits& m_traits;
|
||||||
|
|
||||||
/*! Constructor
|
/*! constructs
|
||||||
* \param traits the traits (in case it has state)
|
* \param traits the traits (in case it has state)
|
||||||
*/
|
*/
|
||||||
Are_mergeable_2(const Traits& traits) : m_traits(traits) {}
|
Are_mergeable_2(const Traits& traits) : m_traits(traits) {}
|
||||||
|
|
@ -799,7 +800,7 @@ public:
|
||||||
friend class Arr_segment_traits_2<Kernel>;
|
friend class Arr_segment_traits_2<Kernel>;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/*! Check whether it is possible to merge two given \f$x\f$-monotone curves.
|
/*! checks whether it is possible to merge two given \f$x\f$-monotone curves.
|
||||||
* \param cv1 the first curve.
|
* \param cv1 the first curve.
|
||||||
* \param cv2 the second curve.
|
* \param cv2 the second curve.
|
||||||
* \return (true) if the two curves are mergeable, that is, if they are
|
* \return (true) if the two curves are mergeable, that is, if they are
|
||||||
|
|
@ -822,7 +823,7 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/*! Obtain an `Are_mergeable_2` functor object. */
|
/*! obtains an `Are_mergeable_2` functor object. */
|
||||||
Are_mergeable_2 are_mergeable_2_object() const
|
Are_mergeable_2 are_mergeable_2_object() const
|
||||||
{ return Are_mergeable_2(*this); }
|
{ return Are_mergeable_2(*this); }
|
||||||
|
|
||||||
|
|
@ -836,7 +837,7 @@ public:
|
||||||
/*! The traits (in case it has state) */
|
/*! The traits (in case it has state) */
|
||||||
const Traits& m_traits;
|
const Traits& m_traits;
|
||||||
|
|
||||||
/*! Constructor
|
/*! constructs
|
||||||
* \param traits the traits (in case it has state)
|
* \param traits the traits (in case it has state)
|
||||||
*/
|
*/
|
||||||
Merge_2(const Traits& traits) : m_traits(traits) {}
|
Merge_2(const Traits& traits) : m_traits(traits) {}
|
||||||
|
|
@ -844,7 +845,7 @@ public:
|
||||||
friend class Arr_segment_traits_2<Kernel>;
|
friend class Arr_segment_traits_2<Kernel>;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/*! Merge two given \f$x\f$-monotone curves into a single curve (segment).
|
/*! merges two given \f$x\f$-monotone curves into a single curve (segment).
|
||||||
* \param cv1 the first curve.
|
* \param cv1 the first curve.
|
||||||
* \param cv2 the second curve.
|
* \param cv2 the second curve.
|
||||||
* \param c Output: the merged curve.
|
* \param c Output: the merged curve.
|
||||||
|
|
@ -875,7 +876,7 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/*! Obtain a `Merge_2` functor object. */
|
/*! obtains a `Merge_2` functor object. */
|
||||||
Merge_2 merge_2_object() const { return Merge_2(*this); }
|
Merge_2 merge_2_object() const { return Merge_2(*this); }
|
||||||
//@}
|
//@}
|
||||||
|
|
||||||
|
|
@ -892,7 +893,7 @@ public:
|
||||||
/*! The traits (in case it has state) */
|
/*! The traits (in case it has state) */
|
||||||
const Traits& m_traits;
|
const Traits& m_traits;
|
||||||
|
|
||||||
/*! Constructor
|
/*! constructs
|
||||||
* \param traits the traits.
|
* \param traits the traits.
|
||||||
*/
|
*/
|
||||||
Approximate_2(const Traits& traits) : m_traits(traits) {}
|
Approximate_2(const Traits& traits) : m_traits(traits) {}
|
||||||
|
|
@ -900,7 +901,7 @@ public:
|
||||||
friend class Arr_segment_traits_2<Kernel>;
|
friend class Arr_segment_traits_2<Kernel>;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/*! Obtain an approximation of a point coordinate.
|
/*! obtains an approximation of a point coordinate.
|
||||||
* \param p the exact point.
|
* \param p the exact point.
|
||||||
* \param i the coordinate index (either 0 or 1).
|
* \param i the coordinate index (either 0 or 1).
|
||||||
* \pre `i` is either 0 or 1.
|
* \pre `i` is either 0 or 1.
|
||||||
|
|
@ -912,12 +913,12 @@ public:
|
||||||
return (i == 0) ? (CGAL::to_double(p.x())) : (CGAL::to_double(p.y()));
|
return (i == 0) ? (CGAL::to_double(p.x())) : (CGAL::to_double(p.y()));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Obtain an approximation of a point.
|
/*! obtains an approximation of a point.
|
||||||
*/
|
*/
|
||||||
Approximate_point_2 operator()(const Point_2& p) const
|
Approximate_point_2 operator()(const Point_2& p) const
|
||||||
{ return Approximate_point_2(operator()(p, 0), operator()(p, 1)); }
|
{ return Approximate_point_2(operator()(p, 0), operator()(p, 1)); }
|
||||||
|
|
||||||
/*! Obtain an approximation of an \f$x\f$-monotone curve.
|
/*! obtains an approximation of an \f$x\f$-monotone curve.
|
||||||
*/
|
*/
|
||||||
template <typename OutputIterator>
|
template <typename OutputIterator>
|
||||||
OutputIterator operator()(const X_monotone_curve_2& xcv, double /* error */,
|
OutputIterator operator()(const X_monotone_curve_2& xcv, double /* error */,
|
||||||
|
|
@ -936,7 +937,7 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/*! Obtain an `Approximate_2` functor object. */
|
/*! obtains an `Approximate_2` functor object. */
|
||||||
Approximate_2 approximate_2_object() const { return Approximate_2(*this); }
|
Approximate_2 approximate_2_object() const { return Approximate_2(*this); }
|
||||||
|
|
||||||
//! Functor
|
//! Functor
|
||||||
|
|
@ -947,7 +948,7 @@ public:
|
||||||
//! The traits (in case it has state).
|
//! The traits (in case it has state).
|
||||||
const Traits& m_traits;
|
const Traits& m_traits;
|
||||||
|
|
||||||
/*! Constructor
|
/*! constructs
|
||||||
* \param traits the traits (in case it has state)
|
* \param traits the traits (in case it has state)
|
||||||
*/
|
*/
|
||||||
Construct_x_monotone_curve_2(const Traits& traits) : m_traits(traits) {}
|
Construct_x_monotone_curve_2(const Traits& traits) : m_traits(traits) {}
|
||||||
|
|
@ -957,7 +958,7 @@ public:
|
||||||
public:
|
public:
|
||||||
typedef typename Kernel::Segment_2 Segment_2;
|
typedef typename Kernel::Segment_2 Segment_2;
|
||||||
|
|
||||||
/*! Obtain an \f$x\f$-monotone curve connecting two given endpoints.
|
/*! obtains an \f$x\f$-monotone curve connecting two given endpoints.
|
||||||
* \param source the first point.
|
* \param source the first point.
|
||||||
* \param target the second point.
|
* \param target the second point.
|
||||||
* \pre `source` and `target` must not be equal.
|
* \pre `source` and `target` must not be equal.
|
||||||
|
|
@ -978,7 +979,7 @@ public:
|
||||||
is_directed_right, is_vert, is_degen);
|
is_directed_right, is_vert, is_degen);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Obtain an \f$x\f$-monotone curve given a Kernel segment.
|
/*! obtains an \f$x\f$-monotone curve given a Kernel segment.
|
||||||
* \param seg the segment.
|
* \param seg the segment.
|
||||||
* \return the \f$x\f$-monotone curve.
|
* \return the \f$x\f$-monotone curve.
|
||||||
* \pre the segment is not degenerate.
|
* \pre the segment is not degenerate.
|
||||||
|
|
@ -1001,7 +1002,7 @@ public:
|
||||||
is_directed_right, is_vert, is_degen);
|
is_directed_right, is_vert, is_degen);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Obtain an \f$x\f$-monotone curve given two endpoints and the supporting
|
/*! obtains an \f$x\f$-monotone curve given two endpoints and the supporting
|
||||||
* line.
|
* line.
|
||||||
* \param line the supporting line.
|
* \param line the supporting line.
|
||||||
* \param the source point.
|
* \param the source point.
|
||||||
|
|
@ -1029,7 +1030,7 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/*! Obtain a `Construct_x_monotone_curve_2` functor object. */
|
/*! obtains a `Construct_x_monotone_curve_2` functor object. */
|
||||||
Construct_x_monotone_curve_2 construct_x_monotone_curve_2_object() const
|
Construct_x_monotone_curve_2 construct_x_monotone_curve_2_object() const
|
||||||
{ return Construct_x_monotone_curve_2(*this); }
|
{ return Construct_x_monotone_curve_2(*this); }
|
||||||
//@}
|
//@}
|
||||||
|
|
@ -1040,7 +1041,7 @@ public:
|
||||||
//! Functor
|
//! Functor
|
||||||
typedef Construct_x_monotone_curve_2 Construct_curve_2;
|
typedef Construct_x_monotone_curve_2 Construct_curve_2;
|
||||||
|
|
||||||
/*! Obtain a `Construct_curve_2` functor object. */
|
/*! obtains a `Construct_curve_2` functor object. */
|
||||||
Construct_curve_2 construct_curve_2_object() const
|
Construct_curve_2 construct_curve_2_object() const
|
||||||
{ return Construct_x_monotone_curve_2(*this); }
|
{ return Construct_x_monotone_curve_2(*this); }
|
||||||
//@}
|
//@}
|
||||||
|
|
@ -1055,14 +1056,14 @@ public:
|
||||||
/*! The traits (in case it has state). */
|
/*! The traits (in case it has state). */
|
||||||
const Traits& m_traits;
|
const Traits& m_traits;
|
||||||
|
|
||||||
/*! Constructor
|
/*! constructs
|
||||||
* \param traits the traits (in case it has state)
|
* \param traits the traits (in case it has state)
|
||||||
*/
|
*/
|
||||||
Trim_2(const Traits& traits) : m_traits(traits) {}
|
Trim_2(const Traits& traits) : m_traits(traits) {}
|
||||||
|
|
||||||
friend class Arr_segment_traits_2<Kernel>;
|
friend class Arr_segment_traits_2<Kernel>;
|
||||||
|
|
||||||
/*! Obtain a trimmed version of a line.
|
/*! obtains a trimmed version of a line.
|
||||||
* \param xseg the \f$x\f$-monotone segment.
|
* \param xseg the \f$x\f$-monotone segment.
|
||||||
* \param src the new start endpoint.
|
* \param src the new start endpoint.
|
||||||
* \param tgt the new end endpoint.
|
* \param tgt the new end endpoint.
|
||||||
|
|
@ -1097,12 +1098,12 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/*! Obtain a `Trim_2` functor object */
|
/*! obtains a `Trim_2` functor object */
|
||||||
Trim_2 trim_2_object() const { return Trim_2(*this); }
|
Trim_2 trim_2_object() const { return Trim_2(*this); }
|
||||||
|
|
||||||
class Compare_endpoints_xy_2 {
|
class Compare_endpoints_xy_2 {
|
||||||
public:
|
public:
|
||||||
/*! Compare the endpoints of an $x$-monotone curve lexicographically.
|
/*! compares the endpoints of an $x$-monotone curve lexicographically.
|
||||||
* (assuming the curve has a designated source and target points).
|
* (assuming the curve has a designated source and target points).
|
||||||
* \param cv the curve.
|
* \param cv the curve.
|
||||||
* \return SMALLER if the curve is directed right;
|
* \return SMALLER if the curve is directed right;
|
||||||
|
|
@ -1112,7 +1113,7 @@ public:
|
||||||
{ return (cv.is_directed_right()) ? (SMALLER) : (LARGER); }
|
{ return (cv.is_directed_right()) ? (SMALLER) : (LARGER); }
|
||||||
};
|
};
|
||||||
|
|
||||||
/*! Obtain a `Compare_endpoints_xy_2` functor object. */
|
/*! obtains a `Compare_endpoints_xy_2` functor object. */
|
||||||
Compare_endpoints_xy_2 compare_endpoints_xy_2_object() const
|
Compare_endpoints_xy_2 compare_endpoints_xy_2_object() const
|
||||||
{ return Compare_endpoints_xy_2(); }
|
{ return Compare_endpoints_xy_2(); }
|
||||||
|
|
||||||
|
|
@ -1126,7 +1127,7 @@ public:
|
||||||
{ return (cv.flip()); }
|
{ return (cv.flip()); }
|
||||||
};
|
};
|
||||||
|
|
||||||
/*! Obtain a `Construct_opposite_2` functor object. */
|
/*! obtains a `Construct_opposite_2` functor object. */
|
||||||
Construct_opposite_2 construct_opposite_2_object() const
|
Construct_opposite_2 construct_opposite_2_object() const
|
||||||
{ return Construct_opposite_2(); }
|
{ return Construct_opposite_2(); }
|
||||||
//@}
|
//@}
|
||||||
|
|
@ -1149,7 +1150,7 @@ public:
|
||||||
friend class Arr_segment_traits_2<Kernel>;
|
friend class Arr_segment_traits_2<Kernel>;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/*! Determine whether a given point is in the \f$x\f$-range of a given
|
/*! determines whether a given point is in the \f$x\f$-range of a given
|
||||||
* segment.
|
* segment.
|
||||||
* \param cv the segment.
|
* \param cv the segment.
|
||||||
* \param p the point.
|
* \param p the point.
|
||||||
|
|
@ -1169,7 +1170,7 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/*! Obtain an `Is_in_x_range_2` functor object */
|
/*! obtains an `Is_in_x_range_2` functor object */
|
||||||
Is_in_x_range_2 is_in_x_range_2_object() const
|
Is_in_x_range_2 is_in_x_range_2_object() const
|
||||||
{ return Is_in_x_range_2(*this); }
|
{ return Is_in_x_range_2(*this); }
|
||||||
|
|
||||||
|
|
@ -1188,7 +1189,7 @@ public:
|
||||||
friend class Arr_segment_traits_2<Kernel>;
|
friend class Arr_segment_traits_2<Kernel>;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/*! Determine whether a given point is in the \f$y\f$-range of a given
|
/*! determines whether a given point is in the \f$y\f$-range of a given
|
||||||
* segment.
|
* segment.
|
||||||
* \param cv the segment.
|
* \param cv the segment.
|
||||||
* \param p the point.
|
* \param p the point.
|
||||||
|
|
@ -1208,7 +1209,7 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/*! Obtain an `Is_in_y_range_2` functor object */
|
/*! obtains an `Is_in_y_range_2` functor object */
|
||||||
Is_in_y_range_2 is_in_y_range_2_object() const
|
Is_in_y_range_2 is_in_y_range_2_object() const
|
||||||
{ return Is_in_y_range_2(*this); }
|
{ return Is_in_y_range_2(*this); }
|
||||||
|
|
||||||
|
|
@ -1370,7 +1371,7 @@ template <typename Kernel>
|
||||||
bool Arr_segment_traits_2<Kernel>::_Segment_cached_2::is_directed_right() const
|
bool Arr_segment_traits_2<Kernel>::_Segment_cached_2::is_directed_right() const
|
||||||
{ return m_is_directed_right; }
|
{ return m_is_directed_right; }
|
||||||
|
|
||||||
//! \brief obtain the segment source.
|
//! \brief obtains the segment source.
|
||||||
template <typename Kernel>
|
template <typename Kernel>
|
||||||
const typename Kernel::Point_2&
|
const typename Kernel::Point_2&
|
||||||
Arr_segment_traits_2<Kernel>::_Segment_cached_2::source() const { return m_ps; }
|
Arr_segment_traits_2<Kernel>::_Segment_cached_2::source() const { return m_ps; }
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue