mirror of https://github.com/CGAL/cgal
Corrected and completed the documentation of the functor Push_back_2
This commit is contained in:
parent
a97d636819
commit
fab148f88d
|
|
@ -58,32 +58,51 @@ namespace CGAL {
|
|||
/// @{
|
||||
|
||||
/*!
|
||||
* Append a point p to an existing polyline cv.
|
||||
* \param cv a polyline. Note, cv is not (necessarily) \f$ x\f$-monotone.
|
||||
* \param p a point to be appended to cv
|
||||
* \pre cv contains at least one segment
|
||||
* Append a point `p` to an existing polyline `cv`.
|
||||
* \param cv a polyline. Note, `cv` is not (necessarily)
|
||||
* \f$ x\f$-monotone.
|
||||
* \param p a point to be appended to `cv`.
|
||||
* \pre `cv` contains at least one segment.
|
||||
*/
|
||||
void operator()(Curve_2& cv, const Point_2& p) const;
|
||||
|
||||
/*!
|
||||
Append a segment seg to an existing polyline cv. If cv is
|
||||
empty, seg will be its first segment.
|
||||
|
||||
\param cv a polyline. Note, cv is not (necessarily)
|
||||
x-monotone.
|
||||
|
||||
\param seg a segment to be appended to cv
|
||||
|
||||
\pre If cv is not empty then target of cv should coincide
|
||||
with the source of seg or(!) the source of cv should coincide
|
||||
with the target of seg.
|
||||
|
||||
\post The resulting cv is well oriented.
|
||||
Append a segment `seg` to an existing polyline `cv`. If `cv` is
|
||||
empty, `seg` will be its first segment.
|
||||
\param cv a polyline. Note, `cv` is not (necessarily)
|
||||
\f$x\f$-monotone.
|
||||
\param seg a segment to be appended to `cv`
|
||||
\pre If `cv` is not empty then target of `cv` should coincide
|
||||
with the source of `seg` or(!) the source of `cv` should coincide
|
||||
with the target of `seg`.
|
||||
\post The resulting `cv` is well oriented.
|
||||
*/
|
||||
void operator()(Curve_2& cv, const Segment_2& seg) const;
|
||||
|
||||
/// @} /* end of operations */
|
||||
/*!
|
||||
* Append a point `p` to an existing x-monotone polyline `xcv`.
|
||||
* \param xcv the existing \f$x\f$-monotone polyline
|
||||
* \param p the point to be pushed back.
|
||||
* \pre `xcv` contains at least one segment
|
||||
* \pre `p` is either to the right of `xcv` if it is oriented
|
||||
* left-to-right or it is to its left if `xcv` is oriented
|
||||
* right-to-left.
|
||||
*/
|
||||
void operator()(const X_monotone_curve_2& xcv, Point_2& p) const;
|
||||
|
||||
/*!
|
||||
* Append a segment `seg` to an existing x-monotone polyline `xcv`. If
|
||||
* `xcv` is empty, `seg` will be its first segment.
|
||||
* \param xcv existing \f$x\f$-monotone polyline
|
||||
* \param seg the segment to be added
|
||||
* \pre If `xcv` is not empty then `seg` extends `xcv` to the right if
|
||||
* `xcv` is oriented right-to-left. Otherwise, `seg` extends `xcv` to
|
||||
* the left.
|
||||
* \pre `xcv` and `seg` should have the same orientation
|
||||
*/
|
||||
void operator()(const X_monotone_curve_2& xcv, Segment_2& seg) const;
|
||||
|
||||
/// @} /* end of operations */
|
||||
}; /* end of Arr_polyline_traits_2::Push_back_2 */
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -714,10 +714,10 @@ namespace CGAL {
|
|||
Make_x_monotone_2 make_x_monotone_2_object() const
|
||||
{ return Make_x_monotone_2(*this); }
|
||||
|
||||
/*! Functor to enable pushing back of either points or segments to an
|
||||
* existing polyline.
|
||||
* TODO: Test all the operator()'s. (Don't forget vertical cases!)
|
||||
* Should we add tests of this functor to the test suite?
|
||||
/* see documentation in
|
||||
* ../../doc/Arrangement_on_surface_2/CGAL/Arr_polyline_traits_2.h
|
||||
* TODO: Test all the operator()'s. (Don't forget vertical cases!)
|
||||
* Should we add tests of this functor to the test suite?
|
||||
*/
|
||||
class Push_back_2 {
|
||||
protected:
|
||||
|
|
@ -729,12 +729,8 @@ namespace CGAL {
|
|||
/*! Constructor. */
|
||||
Push_back_2(const Geometry_traits_2& traits) : m_poly_traits(traits) {}
|
||||
|
||||
/*!
|
||||
* Append a point p to an existing polyline cv.
|
||||
* \param cv a polyline. Note, cv is not (necessarily) x-monotone.
|
||||
* \param p a point to be appended to cv
|
||||
* \pre cv contains at least one segment
|
||||
*/
|
||||
/* see documentation in
|
||||
../../doc/Arrangement_on_surface_2/CGAL/Arr_polyline_traits_2.h */
|
||||
void operator()(Curve_2& cv, const Point_2& p) const
|
||||
{
|
||||
int num_seg = cv.number_of_segments();
|
||||
|
|
@ -767,16 +763,8 @@ namespace CGAL {
|
|||
}
|
||||
|
||||
|
||||
/*!
|
||||
* Append a segment seg to an existing polyline cv. If cv is empty, seg
|
||||
* will be its first segment.
|
||||
* \param cv a polyline. Note, cv is not (necessarily) x-monotone.
|
||||
* \param seg a segment to be appended to cv
|
||||
* \pre If cv is not empty then target of cv should coincide with the
|
||||
* source of seg or(!) the source of cv should coincide with the
|
||||
* target of seg.
|
||||
* \post The resulting cv is well oriented.
|
||||
*/
|
||||
/* see documentation in
|
||||
../../doc/Arrangement_on_surface_2/CGAL/Arr_polyline_traits_2.h */
|
||||
void operator()(Curve_2& cv, const Segment_2& seg) const
|
||||
{
|
||||
int num_seg = cv.number_of_segments();
|
||||
|
|
@ -819,14 +807,8 @@ namespace CGAL {
|
|||
}
|
||||
}
|
||||
|
||||
/*!
|
||||
* Append a point p to an existing x-monotone polyline cv.
|
||||
* \param cv the existing x-monotone polyline
|
||||
* \param p the point to be pushed back.
|
||||
* \pre cv contains at least one segment
|
||||
* \pre p is either to the right of cv if it is oriented left-to-right
|
||||
* or it is to its left if it is oriented right-to-left
|
||||
*/
|
||||
/* see documentation in
|
||||
../../doc/Arrangement_on_surface_2/CGAL/Arr_polyline_traits_2.h */
|
||||
void operator()(const X_monotone_curve_2& xcv, Point_2& p) const
|
||||
{
|
||||
int num_seg = xcv.number_of_segments();
|
||||
|
|
@ -858,15 +840,8 @@ namespace CGAL {
|
|||
}
|
||||
}
|
||||
|
||||
/*!
|
||||
* Append a segment seg to an existing x-monotone polyline xcv.
|
||||
* \param xcv existing x-monotone polyline
|
||||
* \param seg the segment to be added
|
||||
* \pre If xcv is not empty then seg extends xcv to the right if
|
||||
* xcv is oriented right-to-left. Otherwise, seg extends xcv to
|
||||
* the left.
|
||||
* \pre xcv and seg should have the same orientation
|
||||
*/
|
||||
/* see documentation in
|
||||
../../doc/Arrangement_on_surface_2/CGAL/Arr_polyline_traits_2.h */
|
||||
void operator()(const X_monotone_curve_2& xcv, Segment_2& seg) const
|
||||
{
|
||||
int num_seg = xcv.number_of_segments();
|
||||
|
|
|
|||
Loading…
Reference in New Issue