From 303af026eee204eef45311907140618aa851831d Mon Sep 17 00:00:00 2001 From: Efi Fogel Date: Tue, 27 Aug 2024 01:50:10 +0300 Subject: [PATCH 01/63] Replaced Arrangement prefix of concepts to Aos and cleaned up --- .../CGAL/Arr_Bezier_curve_traits_2.h | 452 ++++---- .../CGAL/Arr_accessor.h | 379 +++---- .../Arr_bounded_planar_topology_traits_2.h | 10 +- .../CGAL/Arr_circle_segment_traits_2.h | 13 +- .../CGAL/Arr_conic_traits_2.h | 6 +- .../CGAL/Arr_curve_data_traits_2.h | 11 +- .../Arrangement_on_surface_2/CGAL/Arr_dcel.h | 17 +- .../CGAL/Arr_dcel_base.h | 96 +- .../CGAL/Arr_default_dcel.h | 8 +- .../CGAL/Arr_default_overlay_traits.h | 92 +- .../CGAL/Arr_face_index_map.h | 104 +- .../CGAL/Arr_line_arc_traits_2.h | 25 +- .../CGAL/Arr_polycurve_traits_2.h | 973 +++++++++--------- .../CGAL/Arr_spherical_topology_traits_2.h | 10 +- .../CGAL/Arr_triangulation_point_location.h | 7 +- .../CGAL/Arr_unb_planar_topology_traits_2.h | 12 +- .../CGAL/Arr_vertex_index_map.h | 103 +- .../CGAL/Arrangement_on_surface_2.h | 48 +- .../CGAL/Arrangement_with_history_2.h | 12 +- .../CGAL/draw_arrangement_2.h | 76 +- ...ateTraits_2.h => AosApproximateTraits_2.h} | 0 ...ologyTraits.h => AosBasicTopologyTraits.h} | 0 ...mentBasicTraits_2.h => AosBasicTraits_2.h} | 0 ...SideTraits_2.h => AosBottomSideTraits_2.h} | 0 ...omTraits_2.h => AosClosedBottomTraits_2.h} | 0 ...LeftTraits_2.h => AosClosedLeftTraits_2.h} | 0 ...ghtTraits_2.h => AosClosedRightTraits_2.h} | 0 ...edTopTraits_2.h => AosClosedTopTraits_2.h} | 0 ...Traits_2.h => AosConstructCurveTraits_2.h} | 0 ...h => AosConstructXMonotoneCurveTraits_2.h} | 0 ...aits_2.h => AosContractedBottomTraits_2.h} | 0 ...Traits_2.h => AosContractedLeftTraits_2.h} | 0 ...raits_2.h => AosContractedRightTraits_2.h} | 0 ...pTraits_2.h => AosContractedTopTraits_2.h} | 0 .../Concepts/AosDcel.h | 232 +++++ .../{ArrangementDcelFace.h => AosDcelFace.h} | 0 .../Concepts/AosDcelHalfedge.h | 157 +++ ...gementDcelInnerCcb.h => AosDcelInnerCcb.h} | 0 ...olatedVertex.h => AosDcelIsolatedVertex.h} | 0 ...gementDcelOuterCcb.h => AosDcelOuterCcb.h} | 0 ...rrangementDcelVertex.h => AosDcelVertex.h} | 0 ...ntDcelWithRebind.h => AosDcelWithRebind.h} | 0 ...Traits_2.h => AosHorizontalSideTraits_2.h} | 0 ..._2.h => AosIdentifiedHorizontalTraits_2.h} | 0 ...ts_2.h => AosIdentifiedVerticalTraits_2.h} | 0 ...ntInputFormatter.h => AosInputFormatter.h} | 0 ...ndmarkTraits_2.h => AosLandmarkTraits_2.h} | 0 ...ftSideTraits_2.h => AosLeftSideTraits_2.h} | 0 ...ttomTraits_2.h => AosOpenBottomTraits_2.h} | 0 ...ryTraits_2.h => AosOpenBoundaryTraits_2.h} | 0 ...enLeftTraits_2.h => AosOpenLeftTraits_2.h} | 21 +- ...RightTraits_2.h => AosOpenRightTraits_2.h} | 21 +- ...OpenTopTraits_2.h => AosOpenTopTraits_2.h} | 21 +- ...OutputFormatter.h => AosOutputFormatter.h} | 0 ...PointLocation_2.h => AosPointLocation_2.h} | 0 ...tSideTraits_2.h => AosRightSideTraits_2.h} | 0 ...its_2.h => AosSphericalBoundaryTraits_2.h} | 0 ...TopSideTraits_2.h => AosTopSideTraits_2.h} | 0 ...ntTopologyTraits.h => AosTopologyTraits.h} | 0 ...oximate_2.h => AosTraits--Approximate_2.h} | 0 ...geable_2.h => AosTraits--AreMergeable_2.h} | 0 ....h => AosTraits--CompareXNearBoundary_2.h} | 0 ...sTraits--CompareXOnBoundaryOfCurveEnd_2.h} | 0 ..._2.h => AosTraits--CompareXOnBoundary_2.h} | 0 ...--CompareX_2.h => AosTraits--CompareX_2.h} | 0 ...CompareXy_2.h => AosTraits--CompareXy_2.h} | 0 ...eft_2.h => AosTraits--CompareYAtXLeft_2.h} | 0 ...ht_2.h => AosTraits--CompareYAtXRight_2.h} | 0 ...areYAtX_2.h => AosTraits--CompareYAtX_2.h} | 0 ....h => AosTraits--CompareYNearBoundary_2.h} | 0 ..._2.h => AosTraits--CompareYOnBoundary_2.h} | 0 ...urve_2.h => AosTraits--ConstructCurve_2.h} | 0 ..._2.h => AosTraits--ConstructMaxVertex_2.h} | 0 ..._2.h => AosTraits--ConstructMinVertex_2.h} | 0 ...=> AosTraits--ConstructXMonotoneCurve_2.h} | 0 ...Traits--Curve_2.h => AosTraits--Curve_2.h} | 0 ...Traits--Equal_2.h => AosTraits--Equal_2.h} | 0 ...Intersect_2.h => AosTraits--Intersect_2.h} | 0 ...2.h => AosTraits--IsOnXIdentification_2.h} | 0 ...2.h => AosTraits--IsOnYIdentification_2.h} | 0 ...Vertical_2.h => AosTraits--IsVertical_2.h} | 0 ...otone_2.h => AosTraits--MakeXMonotone_2.h} | 0 ...Traits--Merge_2.h => AosTraits--Merge_2.h} | 0 ...X_2.h => AosTraits--ParameterSpaceInX_2.h} | 0 ...Y_2.h => AosTraits--ParameterSpaceInY_2.h} | 0 ...Traits--Point_2.h => AosTraits--Point_2.h} | 0 ...Traits--Split_2.h => AosTraits--Split_2.h} | 0 ...urve_2.h => AosTraits--XMonotoneCurve_2.h} | 0 .../{ArrangementTraits_2.h => AosTraits_2.h} | 0 ...alRayShoot_2.h => AosVerticalRayShoot_2.h} | 0 ...deTraits_2.h => AosVerticalSideTraits_2.h} | 0 ...atter.h => AosWithHistoryInputFormatter.h} | 0 ...tter.h => AosWithHistoryOutputFormatter.h} | 0 ...otoneTraits_2.h => AosXMonotoneTraits_2.h} | 0 .../Concepts/ArrangementDcel.h | 234 ----- .../Concepts/ArrangementDcelHalfedge.h | 186 ---- 96 files changed, 1607 insertions(+), 1719 deletions(-) rename Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/{ArrangementApproximateTraits_2.h => AosApproximateTraits_2.h} (100%) rename Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/{ArrangementBasicTopologyTraits.h => AosBasicTopologyTraits.h} (100%) rename Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/{ArrangementBasicTraits_2.h => AosBasicTraits_2.h} (100%) rename Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/{ArrangementBottomSideTraits_2.h => AosBottomSideTraits_2.h} (100%) rename Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/{ArrangementClosedBottomTraits_2.h => AosClosedBottomTraits_2.h} (100%) rename Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/{ArrangementClosedLeftTraits_2.h => AosClosedLeftTraits_2.h} (100%) rename Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/{ArrangementClosedRightTraits_2.h => AosClosedRightTraits_2.h} (100%) rename Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/{ArrangementClosedTopTraits_2.h => AosClosedTopTraits_2.h} (100%) rename Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/{ArrangementConstructCurveTraits_2.h => AosConstructCurveTraits_2.h} (100%) rename Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/{ArrangementConstructXMonotoneCurveTraits_2.h => AosConstructXMonotoneCurveTraits_2.h} (100%) rename Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/{ArrangementContractedBottomTraits_2.h => AosContractedBottomTraits_2.h} (100%) rename Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/{ArrangementContractedLeftTraits_2.h => AosContractedLeftTraits_2.h} (100%) rename Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/{ArrangementContractedRightTraits_2.h => AosContractedRightTraits_2.h} (100%) rename Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/{ArrangementContractedTopTraits_2.h => AosContractedTopTraits_2.h} (100%) create mode 100644 Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosDcel.h rename Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/{ArrangementDcelFace.h => AosDcelFace.h} (100%) create mode 100644 Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosDcelHalfedge.h rename Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/{ArrangementDcelInnerCcb.h => AosDcelInnerCcb.h} (100%) rename Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/{ArrangementDcelIsolatedVertex.h => AosDcelIsolatedVertex.h} (100%) rename Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/{ArrangementDcelOuterCcb.h => AosDcelOuterCcb.h} (100%) rename Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/{ArrangementDcelVertex.h => AosDcelVertex.h} (100%) rename Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/{ArrangementDcelWithRebind.h => AosDcelWithRebind.h} (100%) rename Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/{ArrangementHorizontalSideTraits_2.h => AosHorizontalSideTraits_2.h} (100%) rename Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/{ArrangementIdentifiedHorizontalTraits_2.h => AosIdentifiedHorizontalTraits_2.h} (100%) rename Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/{ArrangementIdentifiedVerticalTraits_2.h => AosIdentifiedVerticalTraits_2.h} (100%) rename Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/{ArrangementInputFormatter.h => AosInputFormatter.h} (100%) rename Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/{ArrangementLandmarkTraits_2.h => AosLandmarkTraits_2.h} (100%) rename Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/{ArrangementLeftSideTraits_2.h => AosLeftSideTraits_2.h} (100%) rename Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/{ArrangementOpenBottomTraits_2.h => AosOpenBottomTraits_2.h} (100%) rename Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/{ArrangementOpenBoundaryTraits_2.h => AosOpenBoundaryTraits_2.h} (100%) rename Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/{ArrangementOpenLeftTraits_2.h => AosOpenLeftTraits_2.h} (56%) rename Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/{ArrangementOpenRightTraits_2.h => AosOpenRightTraits_2.h} (55%) rename Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/{ArrangementOpenTopTraits_2.h => AosOpenTopTraits_2.h} (55%) rename Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/{ArrangementOutputFormatter.h => AosOutputFormatter.h} (100%) rename Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/{ArrangementPointLocation_2.h => AosPointLocation_2.h} (100%) rename Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/{ArrangementRightSideTraits_2.h => AosRightSideTraits_2.h} (100%) rename Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/{ArrangementSphericalBoundaryTraits_2.h => AosSphericalBoundaryTraits_2.h} (100%) rename Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/{ArrangementTopSideTraits_2.h => AosTopSideTraits_2.h} (100%) rename Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/{ArrangementTopologyTraits.h => AosTopologyTraits.h} (100%) rename Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/{ArrTraits--Approximate_2.h => AosTraits--Approximate_2.h} (100%) rename Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/{ArrTraits--AreMergeable_2.h => AosTraits--AreMergeable_2.h} (100%) rename Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/{ArrTraits--CompareXNearBoundary_2.h => AosTraits--CompareXNearBoundary_2.h} (100%) rename Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/{ArrTraits--CompareXOnBoundaryOfCurveEnd_2.h => AosTraits--CompareXOnBoundaryOfCurveEnd_2.h} (100%) rename Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/{ArrTraits--CompareXOnBoundary_2.h => AosTraits--CompareXOnBoundary_2.h} (100%) rename Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/{ArrTraits--CompareX_2.h => AosTraits--CompareX_2.h} (100%) rename Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/{ArrTraits--CompareXy_2.h => AosTraits--CompareXy_2.h} (100%) rename Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/{ArrTraits--CompareYAtXLeft_2.h => AosTraits--CompareYAtXLeft_2.h} (100%) rename Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/{ArrTraits--CompareYAtXRight_2.h => AosTraits--CompareYAtXRight_2.h} (100%) rename Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/{ArrTraits--CompareYAtX_2.h => AosTraits--CompareYAtX_2.h} (100%) rename Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/{ArrTraits--CompareYNearBoundary_2.h => AosTraits--CompareYNearBoundary_2.h} (100%) rename Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/{ArrTraits--CompareYOnBoundary_2.h => AosTraits--CompareYOnBoundary_2.h} (100%) rename Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/{ArrTraits--ConstructCurve_2.h => AosTraits--ConstructCurve_2.h} (100%) rename Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/{ArrTraits--ConstructMaxVertex_2.h => AosTraits--ConstructMaxVertex_2.h} (100%) rename Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/{ArrTraits--ConstructMinVertex_2.h => AosTraits--ConstructMinVertex_2.h} (100%) rename Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/{ArrTraits--ConstructXMonotoneCurve_2.h => AosTraits--ConstructXMonotoneCurve_2.h} (100%) rename Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/{ArrTraits--Curve_2.h => AosTraits--Curve_2.h} (100%) rename Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/{ArrTraits--Equal_2.h => AosTraits--Equal_2.h} (100%) rename Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/{ArrTraits--Intersect_2.h => AosTraits--Intersect_2.h} (100%) rename Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/{ArrTraits--IsOnXIdentification_2.h => AosTraits--IsOnXIdentification_2.h} (100%) rename Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/{ArrTraits--IsOnYIdentification_2.h => AosTraits--IsOnYIdentification_2.h} (100%) rename Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/{ArrTraits--IsVertical_2.h => AosTraits--IsVertical_2.h} (100%) rename Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/{ArrTraits--MakeXMonotone_2.h => AosTraits--MakeXMonotone_2.h} (100%) rename Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/{ArrTraits--Merge_2.h => AosTraits--Merge_2.h} (100%) rename Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/{ArrTraits--ParameterSpaceInX_2.h => AosTraits--ParameterSpaceInX_2.h} (100%) rename Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/{ArrTraits--ParameterSpaceInY_2.h => AosTraits--ParameterSpaceInY_2.h} (100%) rename Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/{ArrTraits--Point_2.h => AosTraits--Point_2.h} (100%) rename Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/{ArrTraits--Split_2.h => AosTraits--Split_2.h} (100%) rename Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/{ArrTraits--XMonotoneCurve_2.h => AosTraits--XMonotoneCurve_2.h} (100%) rename Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/{ArrangementTraits_2.h => AosTraits_2.h} (100%) rename Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/{ArrangementVerticalRayShoot_2.h => AosVerticalRayShoot_2.h} (100%) rename Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/{ArrangementVerticalSideTraits_2.h => AosVerticalSideTraits_2.h} (100%) rename Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/{ArrangementWithHistoryInputFormatter.h => AosWithHistoryInputFormatter.h} (100%) rename Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/{ArrangementWithHistoryOutputFormatter.h => AosWithHistoryOutputFormatter.h} (100%) rename Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/{ArrangementXMonotoneTraits_2.h => AosXMonotoneTraits_2.h} (100%) delete mode 100644 Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementDcel.h delete mode 100644 Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementDcelHalfedge.h diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_Bezier_curve_traits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_Bezier_curve_traits_2.h index 7976f939c74..5e9481a807a 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_Bezier_curve_traits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_Bezier_curve_traits_2.h @@ -1,303 +1,265 @@ - namespace CGAL { -/*! -\ingroup PkgArrangementOnSurface2TraitsClasses +/*! \ingroup PkgArrangementOnSurface2TraitsClasses + * + * The traits class `Arr_Bezier_curve_traits_2` is a model of the `AosTraits_2` + * concept that handles planar Bézier curves. A planar Bézier + * curve \f$ B\f$ is a parametric curve defined by a sequence of control + * points \f$ p_0, \ldots, p_n\f$ as follows: -The traits class `Arr_Bezier_curve_traits_2` is a model of the `ArrangementTraits_2` -concept that handles planar Bézier curves. A planar Bézier curve -\f$ B\f$ is a parametric curve defined by a sequence of control points -\f$ p_0, \ldots, p_n\f$ as follows: - - -\f{eqnarray*}{ -B(t) = \left(X(t), Y(t)\right) -= \ccSum{k=0}{n}{p_k \cdot \frac{n!}{k! (n-k)!} \cdot -t^k (1-t)^{n-k}}\ . + * \f{eqnarray*}{ + * B(t) = \left(X(t), Y(t)\right) = \ccSum{k=0}{n}{p_k \cdot \frac{n!}{k! (n-k)!} \cdot t^k (1-t)^{n-k}}\ , \f} -where \f$ t \in [0, 1]\f$. The degree of the curve is therefore \f$ n\f$ - -namely, \f$ X(t)\f$ and \f$ Y(t)\f$ are polynomials of degree \f$ n\f$. Bézier curves -have numerous applications in computer graphics and solid modelling. They -are used, for example, in free-form sketches and for defining the true-type -fonts. + * where \f$ t \in [0, 1]\f$. The degree of the curve is therefore \f$n\f$, + * namely, \f$ X(t)\f$ and \f$ Y(t)\f$ are polynomials of degree \f$ n\f$. + * Bézier curves have numerous applications in computer graphics and + * solid modelling. They are used, for example, in free-form sketches and for + * defining the true-type fonts. -In our representation, we assume that the coordinates of all control -points are rational numbers (namely they are given as objects of the -`RatKernel::Point_2` type), so both \f$ X(t)\f$ and \f$ Y(t)\f$ are polynomials -with rational coefficients. The intersection points between curves are -however algebraic numbers, and their exact computation is time-consuming. -The traits class therefore contains a layer of geometric filtering that -performs all computation in an approximate manner whenever possible, and -it resorts to exact computations only when the approximate computation -fails to produce an unambiguous result. + * In our representation, we assume that the coordinates of all control points + * are rational numbers (namely they are given as objects of the + * `RatKernel::Point_2` type), so both \f$ X(t)\f$ and \f$ Y(t)\f$ are + * polynomials with rational coefficients. The intersection points between + * curves are however algebraic numbers, and their exact computation is + * time-consuming. The traits class therefore contains a layer of geometric + * filtering that performs all computation in an approximate manner whenever + * possible, and it resorts to exact computations only when the approximate + * computation fails to produce an unambiguous result. -We therefore require separate representations of the control points and -the intersection points. The `NtTraits` should be instantiated with a class -that defines nested `Integer`, `Rational` and `Algebraic` number -types and supports various operations on them, yielding certified computation -results (for example, in can convert rational numbers to algebraic numbers -and can compute roots of polynomials with integer coefficients). -The other template parameters, `RatKernel` and `AlgKernel` should be -geometric kernels templated with the `NtTraits::Rational` and -`NtTraits::Algebraic` number types, respectively. It is recommended to -instantiate the `CORE_algebraic_number_traits` class as the `NtTraits` -parameter, with `Cartesian` and -`Cartesian` instantiating the two kernel types, -respectively. The number types in this case are provided by the \core -library, with its ability to exactly represent simple algebraic numbers. + * We therefore require separate representations of the control points and the + * intersection points. The `NtTraits` should be instantiated with a class that + * defines nested `Integer`, `Rational` and `Algebraic` number types and + * supports various operations on them, yielding certified computation results + * (for example, in can convert rational numbers to algebraic numbers and can + * compute roots of polynomials with integer coefficients). The other template + * parameters, `RatKernel` and `AlgKernel` should be geometric kernels templated + * with the `NtTraits::Rational` and `NtTraits::Algebraic` number types, + * respectively. It is recommended to instantiate the + * `CORE_algebraic_number_traits` class as the `NtTraits` parameter, with + * `Cartesian` and `Cartesian` + * instantiating the two kernel types, respectively. The number types in this + * case are provided by the \core library, with its ability to exactly represent + * simple algebraic numbers. -While `Arr_Bezier_curve_traits_2` models the concept -`ArrangementDirectionalXMonotoneTraits_2`, the implementation of -the `Are_mergeable_2` operation does not enforce the input curves -to have the same direction as a precondition. Moreover, `Arr_Bezier_curve_traits_2` -supports the merging of curves of opposite directions. - -\cgalModels{ArrangementTraits_2,ArrangementDirectionalXMonotoneTraits_2} - - -*/ -template< typename RatKernel, typename AlgKernel, typename NtTraits > + * While `Arr_Bezier_curve_traits_2` models the concept + * `AosDirectionalXMonotoneTraits_2`, the implementation of the + * `Are_mergeable_2` operation does not enforce the input curves to have the + * same direction as a precondition. Moreover, `Arr_Bezier_curve_traits_2` + * supports the merging of curves of opposite directions. + * + * \cgalModels{AosTraits_2,AosDirectionalXMonotoneTraits_2} + */ +template class Arr_Bezier_curve_traits_2 { public: -/// \name Types -/// @{ + /// \name Types + /// @{ -/*! -the `NtTraits::Rational` type -(and also the `RatKernel::FT` type). -*/ -typedef unspecified_type Rational; + /*! the `NtTraits::Rational` type (and also the `RatKernel::FT` type). + */ + typedef unspecified_type Rational; -/*! -the `NtTraits::Algebraic` type -(and also the `AlgKernel::FT` type). -*/ -typedef unspecified_type Algebraic; + /*! the `NtTraits::Algebraic` type (and also the `AlgKernel::FT` type). + */ + typedef unspecified_type Algebraic; -/// @} + /// @} + /*! The `Curve_2` class nested within the Bézier traits class is used + * to represent a Bézier curve of arbitrary degree, which is defined by + * a sequence of rational control points. In addition to the methods listed + * below, the I/O operators \link PkgArrangementOnSurface2op_left_shift + * `operator<<` \endlink and \link PkgArrangementOnSurface2op_right_shift + * `operator>>` \endlink for standard output-streams are also supported. The + * copy constructor and assignment operator are supported as well. + */ + class Curve_2 { + public: -/*! + /// \name Creation + /// @{ + /*! default constructor. + */ + Curve_2(); -The `Curve_2` class nested within the Bézier traits class is used -to represent a Bézier curve of arbitrary degree, which is defined by a -sequence of rational control points. In addition to the methods listed -below, the I/O operators \link PkgArrangementOnSurface2op_left_shift `operator<<` \endlink and \link PkgArrangementOnSurface2op_right_shift `operator>>` \endlink for -standard output-streams are also supported. The copy constructor and -assignment operator are supported as well. + /*! constructs a Bézier curve as defined by the given range of + * control points. The value-type of `InputIterator` is + * `RatKernel::Point_2`. + * + * \pre The input range must contain at least two control points. + */ + template + Curve_2(InputIterator pts_begin, InputIterator pts_end); -*/ -class Curve_2 { -public: + /// @} -/// \name Creation -/// @{ + /// \name Access Functions + /// @{ -/*! -default constructor. -*/ -Curve_2 (); + /*! returns the number of control points that define `B`. + */ + size_t number_of_control_points() const; -/*! -constructs a Bézier curve as defined by the given range of control -points. The value-type of `InputIterator` is `RatKernel::Point_2`. -\pre The input range must contain at least two control points. + /*! returns the \f$ k\f$th control point. Note that the first control point + * equals the curve source, while the last control point equals its + * target. The rest of the control points do not lie on the curve. + * + * \pre \f$ k\f$ is smaller than the number of control points. + */ + typename RatKernel::Point_2 control_point(std::size_t k) const; -*/ -template -Curve_2 (InputIterator pts_begin, InputIterator pts_end); + /*! returns the point \f$ B(t)\f$ on the curve that corresponds to the given + * rational parameter value. + */ + typename RatKernel::Point_2 operator()(const Rational& t) const; -/// @} + /*! returns the point \f$ B(t)\f$ on the curve that corresponds to the given + * algebraic parameter value. + */ + typename AlgKernel::Point_2 operator()(const Algebraic& t) const; -/// \name Access Functions -/// @{ + /// @} -/*! -returns the number of control points that define `B`. -*/ -size_t number_of_control_points () const; + }; /* end Arr_Bezier_curve_traits_2::Curve_2 */ -/*! -returns the \f$ k\f$th control point. Note that the first control point equals -the curve source, while the last control point equals its target. The rest -of the control points do not lie on the curve. -\pre \f$ k\f$ is smaller than the number of control points. -*/ -typename RatKernel::Point_2 control_point (size_t k) const; + /*! The `Point_2` class nested within the Bézier traits class is used + * to represent: (i) an endpoint of a Bézier curve, (ii) a vertical + * tangency point of a curve, used to subdivide it into \f$ x\f$-monotone + * subcurve, and (iii) an intersection point between two curves. While, points + * of type (i) have rational coordinates and are given as part of the input, + * points of the two latter types have algebraic coordinates. However, to + * speed up the arrangement construction, such point are not computed in an + * exact manner, and instead are given in an approximate representation. Note + * that the exact coordinates of a point may only be accessed if it is exactly + * computed. -/*! -returns the point \f$ B(t)\f$ on the curve that corresponds to the given -rational parameter value. -*/ -typename RatKernel::Point_2 operator() (const Rational& t) const; + * In addition to the methods listed below, the copy constructor and assignment + * operator for `Point_2` objects are also supported. + */ + class Point_2 { + public: -/*! -returns the point \f$ B(t)\f$ on the curve that corresponds to the given -algebraic parameter value. -*/ -typename AlgKernel::Point_2 operator() (const Algebraic& t) const; + /// \name Creation + /// @{ -/// @} + /*! + default constructor. + */ + Point_2(); -}; /* end Arr_Bezier_curve_traits_2::Curve_2 */ + /*! + constructs the point \f$ B(t_0)\f$ on the given curve. As \f$ t_0\f$ is an + algebraic number, the point has algebraic coordinates. + */ + Point_2(const Curve_2& B, const Algebraic& t_0); + /*! + constructs the point \f$ B(t_0)\f$ on the given curve. As \f$ t_0\f$ is a + rational number, the point has rational coordinates. + */ + Point_2(const Curve_2& B, const Rational& t_0); -/*! + /// @} -The `Point_2` class nested within the Bézier traits class is used -to represent: (i) an endpoint of a Bézier curve, (ii) a vertical tangency -point of a curve, used to subdivide it into \f$ x\f$-monotone subcurve, and -(iii) an intersection point between two curves. While, points of type (i) have -rational coordinates and are given as part of the input, points of the two -latter types have algebraic coordinates. However, to speed up the arrangement -construction, such point are not computed in an exact manner, and instead -are given in an approximate representation. Note that the exact coordinates -of a point may only be accessed if it is exactly computed. + /// \name Access Functions + /// @{ -In addition to the methods listed below, the copy constructor and assignment -operator for `Point_2` objects are also supported. + /*! returns the approximated coordinates of `p`. + */ + std::pair approximate() const; -*/ -class Point_2 { -public: + /*! returns whether the coordinates of `p` are computed in an exact manner. + */ + bool is_exact() const; -/// \name Creation -/// @{ + /*! returns the \f$ x\f$-coordinate of `p`. + * + * \pre `p` is exactly computed. + */ + Algebraic x() const; -/*! -default constructor. -*/ -Point_2 (); + /*! returns the \f$ y\f$-coordinate of `p`. + * + * \pre `p` is exactly computed. + */ + Algebraic y() const; -/*! -constructs the point \f$ B(t_0)\f$ on the given curve. As \f$ t_0\f$ is an -algebraic number, the point has algebraic coordinates. -*/ -Point_2 (const Curve_2& B, const Algebraic& t_0); + /*! returns whether the coordinates of `p` are rational numbers. + */ + bool is_rational() const; -/*! -constructs the point \f$ B(t_0)\f$ on the given curve. As \f$ t_0\f$ is a -rational number, the point has rational coordinates. -*/ -Point_2 (const Curve_2& B, const Rational& t_0); + /*! casts `p` to a point with rational coordinates. + * \pre `p` has rational coordinates. + */ + operator typename RatKernel::Point_2() const; -/// @} + /// @} -/// \name Access Functions -/// @{ + }; /* end Arr_Bezier_curve_traits_2::Point_2 */ -/*! -returns the approximated coordinates of `p`. -*/ -std::pair approximate () const; + /*! The `X_monotone_curve_2` class nested within the Bézier traits is + * used to represent \f$ x\f$-monotone subcurves of Bézier curves. The + * subcurve is defined by a supporting Bézier curve \f$ B(t)\f$ and a + * range of definition in the parameter space \f$ [t_1, t_2] \subseteq [0,1]\f$, + * where \f$ B(t_1)\f$ is the subcurve source and \f$ B(t_2)\f$ is its target. + * Note that as the point endpoints may only be approximated, the parameter + * range defining the subcurve may only be approximately known. + * + * It is not possible to construct \f$ x\f$-monotone subcurves directly. + * Instead, use the `Make_x_monotone_2` functor supplied by the traits class to + * subdivide a `Curve_2` object into \f$ x\f$-monotone subcurves. + */ + class X_monotone_curve_2 { + public: -/*! -returns whether the coordinates of `p` are computed in an exact manner. -*/ -bool is_exact () const; + /// \name Access Functions + /// @{ -/*! -returns the \f$ x\f$-coordinate of `p`. -\pre `p` is exactly computed. -*/ -Algebraic x () const; + /*! returns the supporting Bézier curve of `b`. + */ + Curve_2 supporting_curve() const; -/*! -returns the \f$ y\f$-coordinate of `p`. -\pre `p` is exactly computed. -*/ -Algebraic y () const; + /*! returns the source point of `b`. + */ + Point_2 source() const; -/*! -returns whether the coordinates of `p` are rational numbers. -*/ -bool is_rational () const; + /*! returns the target point of `b`. + */ + Point_2 target() const; -/*! -casts `p` to a point with rational coordinates. -\pre `p` has rational coordinates. -*/ -operator typename RatKernel::Point_2 () const; + /*! returns the left (\f$xy\f$-lexicographically smaller) endpoint of `b`. + */ + Point_2 left() const; -/// @} + /*! returns the right (\f$xy\f$-lexicographically smaller) endpoint of `b`. + */ + Point_2 right() const; -}; /* end Arr_Bezier_curve_traits_2::Point_2 */ + /*! return the approximate parameter range defining the subcurve `b`. + */ + std::pair parameter_range() const; -/*! + /// @} + }; /* end Arr_Bezier_curve_traits_2::X_monotone_curve_2 */ -The `X_monotone_curve_2` class nested within the Bézier traits is -used to represent \f$ x\f$-monotone subcurves of Bézier curves. The subcurve is -defined by a supporting Bézier curve \f$ B(t)\f$ and a range of definition in -the parameter space \f$ [t_1, t_2] \subseteq [0, 1]\f$, where \f$ B(t_1)\f$ is the -subcurve source and \f$ B(t_2)\f$ is its target. Note that as the point endpoints -may only be approximated, the parameter range defining the subcurve may -only be approximately known. + class Trim_2 { + public: + /// \name Creation + /// @{ -It is not possible to construct \f$ x\f$-monotone subcurves directly. Instead, -use the `Make_x_monotone_2` functor supplied by the traits class to -subdivide a `Curve_2` object into \f$ x\f$-monotone subcurves. + /*! Trims the given x-monotone curve to an from src to tgt. + * + * \ pre `src` and `tgt` lies on the curve + */ + X_monotone_curve_2(const X_monotone_curve_2& xcv, + const Point_2& src, const Point_2& tgt) const -*/ -class X_monotone_curve_2 { -public: + /// @} -/// \name Access Functions -/// @{ - -/*! -returns the supporting Bézier curve of `b`. -*/ -Curve_2 supporting_curve () const; - -/*! -returns the source point of `b`. -*/ -Point_2 source () const; - -/*! -returns the target point of `b`. -*/ -Point_2 target () const; - -/*! -returns the left (\f$ xy\f$-lexicographically smaller) endpoint of `b`. -*/ -Point_2 left () const; - -/*! -returns the right (\f$ xy\f$-lexicographically smaller) endpoint of `b`. -*/ -Point_2 right () const; - -/*! -return the approximate parameter range defining the subcurve `b`. -*/ -std::pair parameter_range () const; - -/// @} - -}; /* end Arr_Bezier_curve_traits_2::X_monotone_curve_2 */ - -class Trim_2{ -public: -/// \name Creation -/// @{ - -/*! -Trims the given x-monotone curve to an from src to tgt. -\ pre `src` and `tgt` lies on the curve -*/ - -X_monotone_curve_2(const X_monotone_curve_2& xcv, - const Point_2& src, - const Point_2& tgt)const - -/// @} - -}/* end Arr_Bezier_curve_traits_2::Trim_2 */ + } /* end Arr_Bezier_curve_traits_2::Trim_2 */ }; /* end Arr_Bezier_curve_traits_2 */ } /* end namespace CGAL */ diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_accessor.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_accessor.h index 786eacc5092..1fcf4694c44 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_accessor.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_accessor.h @@ -19,121 +19,123 @@ template class Arr_accessor { public: -/// \name Types -/// @{ + /// \name Types + /// @{ -/*! the type of the associated arrangement. */ -typedef unspecified_type Arrangement_2; + /*! the type of the associated arrangement. */ + typedef unspecified_type Arrangement_2; -/*! the point type. */ -typedef typename Arrangement_2::Point_2 Point_2; + /*! the point type. */ + typedef typename Arrangement_2::Point_2 Point_2; -/*! the \f$ x\f$-monotone curve type. */ + /*! the \f$ x\f$-monotone curve type. */ + typedef typename Arrangement_2::X_monotone_curve_2 X_monotone_curve_2; -typedef typename Arrangement_2::X_monotone_curve_2 X_monotone_curve_2; + /*! */ + typedef typename Arrangement_2::Vertex_handle Vertex_handle; -/*! */ -typedef typename Arrangement_2::Vertex_handle Vertex_handle; + /*! */ + typedef typename Arrangement_2::Halfedge_handle Halfedge_handle; -/*! */ -typedef typename Arrangement_2::Halfedge_handle Halfedge_handle; + /*! */ + typedef typename Arrangement_2::Face_handle Face_handle; -/*! */ -typedef typename Arrangement_2::Face_handle Face_handle; + /*! represents the boundary of a connected component (CCB). */ + typedef typename Arrangement_2::Ccb_halfedge_circulator Ccb_halfedge_circulator; -/*! represents the boundary of a connected component (CCB). */ -typedef typename Arrangement_2::Ccb_halfedge_circulator Ccb_halfedge_circulator; + /// @} -/// @} + /// \name Creation + /// @{ -/// \name Creation -/// @{ + /*! constructs an accessor attached to the given arrangement `arr`. */ + Arr_accessor(Arrangement_2& arr); -/*! constructs an accessor attached to the given arrangement `arr`. */ -Arr_accessor(Arrangement_2& arr); + /// @} -/// @} + /// \name Accessing the Notification Functions -/// \name Accessing the Notification Functions + /// @{ -/// @{ + /*! notifies the arrangement observer that a global change is going to take + * place (for the usage of the global functions that operate on arrangements). + */ + void notify_before_global_change(); -/*! notifies the arrangement observer that a global change is going to take - * place (for the usage of the global functions that operate on arrangements). - */ -void notify_before_global_change(); + /*! notifies the arrangement observer that a global change has taken place + * (for the usage of the global functions that operate on arrangements). + */ + void notify_after_global_change(); -/*! notifies the arrangement observer that a global change has taken place (for - * the usage of the global functions that operate on arrangements). - */ -void notify_after_global_change(); + /// @} -/// @} + /// \name Arrangement Predicates + /// @{ -/// \name Arrangement Predicates -/// @{ + /*! locates a place for the curve `c` around the vertex `v` and returns a + * halfedge whose target is `v`, where c should be inserted between this + * halfedge and the next halfedge around `v` in a clockwise order. + */ + Halfedge_handle + locate_around_vertex(Vertex_handle v, const X_monotone_curve_2& c) const; -/*! locates a place for the curve `c` around the vertex `v` and returns a - * halfedge whose target is `v`, where c should be inserted between this - * halfedge and the next halfedge around `v` in a clockwise order. - */ -Halfedge_handle -locate_around_vertex(Vertex_handle v, const X_monotone_curve_2& c) const; + /*! counts the number of edges along the path from `e1` to `e2`. In case the + * two halfedges do not belong to the same connected component, the function + * returns (-1). + */ + int halfedge_distance(Halfedge_const_handle e1, + Halfedge_const_handle e2) const; -/*! counts the number of edges along the path from `e1` to `e2`. In case the - * two halfedges do not belong to the same connected component, the function - * returns (-1). -*/ -int halfedge_distance(Halfedge_const_handle e1, Halfedge_const_handle e2) const; + /*! determines whether a new halfedge we are about to create, which is to be + * associated with the curve `c` and directed from `pred1->target()` to + * `pred2->target()`, lies on the inner CCB of the new face that will be + * created, introducing this new edge. + * + * \pre `pred1->target()` and `pred2->target()` are associated with `c`'s + * endpoints. + * + * \pre `pred1` and `pred2` belong to the same connected component, such that + * a new face is created by connecting `pred1->target()` and + * `pred2->target()`. + */ + bool is_inside_new_face(Halfedge_handle pred1, + Halfedge_handle pred2, + const X_monotone_curve_2& c) const; -/*! determines whether a new halfedge we are about to create, which is to be - * associated with the curve `c` and directed from `pred1->target()` to - * `pred2->target()`, lies on the inner CCB of the new face that will be - * created, introducing this new edge. - * - * \pre `pred1->target()` and `pred2->target()` are associated with `c`'s - * endpoints. - * - * \pre `pred1` and `pred2` belong to the same connected component, such that a - * new face is created by connecting `pred1->target()` and `pred2->target()`. -*/ -bool is_inside_new_face(Halfedge_handle pred1, -Halfedge_handle pred2, -const X_monotone_curve_2& c) const; + /*! determines whether a given point lies within the region bounded by a + * boundary of the connected component that `he` belongs to. Note that if the + * function returns `true`, then `p` is contained within `he->face()` (but not + * on its boundary), or inside one of the inner CCBs of this face, or it may + * coincide with an isolated vertex in this face. + */ + bool point_is_in(const Point_2& p, Halfedge_const_handle he) const; -/*! determines whether a given point lies within the region bounded by a - * boundary of the connected component that `he` belongs to. Note that if the - * function returns `true`, then `p` is contained within `he->face()` (but not - * on its boundary), or inside one of the inner CCBs of this face, or it may - * coincide with an isolated vertex in this face. - */ -bool point_is_in(const Point_2& p, Halfedge_const_handle he) const; + /*! determines whether `he` lies on the outer boundary of its incident face. + */ + bool is_on_outer_boundary(Halfedge_const_handle he) const; -/*! determines whether `he` lies on the outer boundary of its incident face. */ -bool is_on_outer_boundary(Halfedge_const_handle he) const; + /*! determines whether `he` lies on the inner boundary of its incident face + * (that is, whether it lies on the boundary of one of the inner CCBs of this + * face). + */ + bool is_on_inner_boundary(Halfedge_const_handle he) const; -/*! determines whether `he` lies on the inner boundary of its incident face - * (that is, whether it lies on the boundary of one of the inner CCBs of this - * face). - */ -bool is_on_inner_boundary(Halfedge_const_handle he) const; + /// @} -/// @} + /// \name Arrangement Modifiers + /// @{ -/// \name Arrangement Modifiers -/// @{ - -/*! creates a new vertex an associates it with the point `p`. - * - * \pre There is no existing vertex already associated with `p`. - */ -Vertex_handle create_vertex(const Point_2& p); + /*! creates a new vertex an associates it with the point `p`. + * + * \pre There is no existing vertex already associated with `p`. + */ + Vertex_handle create_vertex(const Point_2& p); /*! inserts the curve `c` as a new inner CCBs (hole) of the face `f`, * connecting the two isolated vertices `v1` and `v2`. `res` is the comparison * result between these two end-vertices. The function returns a handle for one - * of the new halfedges corresponding to the inserted curve, directed from `v1` - * to `v2`. + * one of the new halfedges corresponding to the inserted curve, directed from + * `v1` to `v2`. * * \pre `v1` and `v2` are associated with `c`'s endpoints, that they lie of * `f`'s interior and that and that they have no incident edges. @@ -160,121 +162,122 @@ Halfedge_handle insert_from_vertex_ex(const X_monotone_curve_2& c, Vertex_handle v, Comparison_result res); -/*! inserts the curve `c` into the arrangement, such that both `c`'s endpoints - * correspond to existing arrangement vertices, given by `pred1->target()` and - * `pred2->target()`. `res` is the comparison result between these two - * end-vertices. The function creates a new halfedge pair that connects the two - * vertices (with `pred1` and `pred2` indicate the exact place for these - * halfedges around the two target vertices) and returns a handle for the - * halfedge directed from `pred1->target()` to `pred2->target()`. The output - * flag `new_face` indicates whether a new face has been created following the - * insertion of the new curve. - * - * \pre `pred1->target()` and `pred2->target()` are associated with `c`'s - * endpoints and that if a new face is created, then `is_inside_new_face (pred1, - * pred2, c)` is `true`. - */ -Halfedge_handle insert_at_vertices_ex(const X_monotone_curve_2& c, - Halfedge_handle pred1, - Halfedge_handle pred2, - Comparison_result res, bool& new_face); + /*! inserts the curve `c` into the arrangement, such that both `c`'s endpoints + * correspond to existing arrangement vertices, given by `pred1->target()` and + * `pred2->target()`. `res` is the comparison result between these two + * end-vertices. The function creates a new halfedge pair that connects the two + * vertices (with `pred1` and `pred2` indicate the exact place for these + * halfedges around the two target vertices) and returns a handle for the + * halfedge directed from `pred1->target()` to `pred2->target()`. The output + * flag `new_face` indicates whether a new face has been created following the + * insertion of the new curve. + * + * \pre `pred1->target()` and `pred2->target()` are associated with `c`'s + * endpoints and that if a new face is created, then `is_inside_new_face (pred1, + * pred2, c)` is `true`. + */ + Halfedge_handle insert_at_vertices_ex(const X_monotone_curve_2& c, + Halfedge_handle pred1, + Halfedge_handle pred2, + Comparison_result res, bool& new_face); -/*! inserts `v` as an isolated vertex inside `f`. - * - * \pre `v->point()` is contained in the interior of the given face. - */ -void insert_isolated_vertex(Face_handle f, Vertex_handle v); + /*! inserts `v` as an isolated vertex inside `f`. + * + * \pre `v->point()` is contained in the interior of the given face. + */ + void insert_isolated_vertex(Face_handle f, Vertex_handle v); -/*! moves the given hole (inner CCB) from the interior of the face `f1` to the - * face `f2`. - * - * \pre `hole` is currently contained in `f1` and should be moved to `f2`. - */ -void move_hole(Face_handle f1, Face_handle f2, Ccb_halfedge_circulator hole); + /*! moves the given hole (inner CCB) from the interior of the face `f1` to the + * face `f2`. + * + * \pre `hole` is currently contained in `f1` and should be moved to `f2`. + */ + void move_hole(Face_handle f1, Face_handle f2, Ccb_halfedge_circulator hole); -/*! moves the given isolated vertex from the interior of the face `f1` - * inside the face `f2`. - * - * \pre `v` is indeed an isolated vertex currently contained in `f1` and should - * be moved to `f2`. - */ -bool move_isolated_vertex(Face_handle f1, Face_handle f2, Vertex_handle v); + /*! moves the given isolated vertex from the interior of the face `f1` + * inside the face `f2`. + * + * \pre `v` is indeed an isolated vertex currently contained in `f1` and + * should be moved to `f2`. + */ + bool move_isolated_vertex(Face_handle f1, Face_handle f2, Vertex_handle v); -/*! relocates all inner ccbs and isolated vertices to their proper position - * immediately after a face has split due to the insertion of a new halfedge, - * namely after `insert_at_vertices_ex()` was invoked and indicated that a new - * face has been created. `he` is the halfedge returned by - * `insert_at_vertices_ex()`, such that `he->twin()->face` is the face that has - * just been split and `he->face()` is the newly created face. - */ -void relocate_in_new_face(Halfedge_handle he); + /*! relocates all inner ccbs and isolated vertices to their proper position + * immediately after a face has split due to the insertion of a new halfedge, + * namely after `insert_at_vertices_ex()` was invoked and indicated that a new + * face has been created. `he` is the halfedge returned by + * `insert_at_vertices_ex()`, such that `he->twin()->face` is the face that + * has just been split and `he->face()` is the newly created face. + */ + void relocate_in_new_face(Halfedge_handle he); -/*! relocates all inner ccbs in a new face, as detailed above. */ -void relocate_holes_in_new_face(Halfedge_handle he); + /*! relocates all inner ccbs in a new face, as detailed above. */ + void relocate_holes_in_new_face(Halfedge_handle he); -/*! relocates all isolated vertices in a new face, as detailed above. */ -void relocate_isolated_vertices_in_new_face(Halfedge_handle he); + /*! relocates all isolated vertices in a new face, as detailed above. */ + void relocate_isolated_vertices_in_new_face(Halfedge_handle he); -/*! modifies the point associated with the vertex `v` (the point may be - * geometrically different than the one currently associated with `v`). The - * function returns a handle to the modified vertex (same as `v`). - * - * \pre No other arrangement vertex is already associated with `p`. - * - * \pre The topology of the arrangement does not change after the vertex point - * is modified. - */ -Vertex_handle modify_vertex_ex(Vertex_handle v, const Point_2& p); + /*! modifies the point associated with the vertex `v` (the point may be + * geometrically different than the one currently associated with `v`). The + * function returns a handle to the modified vertex (same as `v`). + * + * \pre No other arrangement vertex is already associated with `p`. + * + * \pre The topology of the arrangement does not change after the vertex point + * is modified. + */ + Vertex_handle modify_vertex_ex(Vertex_handle v, const Point_2& p); -/*! modifies the \f$ x\f$-monotone curve associated with the edge `e` (the curve - * `c` may be geometrically different than the one currently associated with - * `e`). The function returns a handle to the modified edge (same as `e`). - * - * \pre The interior of `c` is disjoint from all existing arrangement vertices - * and edges. - */ -Halfedge_handle modify_edge_ex(Halfedge_handle e, const X_monotone_curve_2& c); + /*! modifies the \f$ x\f$-monotone curve associated with the edge `e` (the + * curve `c` may be geometrically different than the one currently associated + * with `e`). The function returns a handle to the modified edge (same as + * `e`). + * + * \pre The interior of `c` is disjoint from all existing arrangement vertices + * and edges. + */ + Halfedge_handle modify_edge_ex(Halfedge_handle e, const X_monotone_curve_2& c); -/*! splits a given edge into two at the split point `p`, and associate the - * x-monotone curves `c1` and `c2` with the resulting edges, such that `c1` - * connects `he->source()` with `p` and `c2` connects `p` with - * `he->target()`. The function return a handle to the split halfedge directed - * from `he->source()` to the split point `p`. - * - * \pre The endpoints of `c1` and `c2` correspond to `p` and to `he`'s - * end-vertices, as indicated above. - */ -Halfedge_handle split_edge_ex(Halfedge_handle he, const Point_2& p, - const X_monotone_curve_2& c1, - const X_monotone_curve_2& c2); + /*! splits a given edge into two at the split point `p`, and associate the + * x-monotone curves `c1` and `c2` with the resulting edges, such that `c1` + * connects `he->source()` with `p` and `c2` connects `p` with + * `he->target()`. The function return a handle to the split halfedge directed + * from `he->source()` to the split point `p`. + * + * \pre The endpoints of `c1` and `c2` correspond to `p` and to `he`'s + * end-vertices, as indicated above. + */ + Halfedge_handle split_edge_ex(Halfedge_handle he, const Point_2& p, + const X_monotone_curve_2& c1, + const X_monotone_curve_2& c2); -/*! splits a given edge into two at by the vertex `v`, and associate the - * x-monotone curves `c1` and `c2` with the resulting edges, such that `c1` - * connects `he->source()` with `v` and `c2` connects `v` with - * `he->target()`. The function return a handle to the split halfedge directed - * from `he->source()` to `v`. - * - * \pre The endpoints of `c1` and `c2` correspond to `v` and to `he`'s - * end-vertices, as indicated above. It is also assumed that `v` has no incident - * edges. - */ -Halfedge_handle split_edge_ex(Halfedge_handle he, Vertex_handle v, - const X_monotone_curve_2& c1, - const X_monotone_curve_2& c2); + /*! splits a given edge into two at by the vertex `v`, and associate the + * x-monotone curves `c1` and `c2` with the resulting edges, such that `c1` + * connects `he->source()` with `v` and `c2` connects `v` with + * `he->target()`. The function return a handle to the split halfedge directed + * from `he->source()` to `v`. + * + * \pre The endpoints of `c1` and `c2` correspond to `v` and to `he`'s + * end-vertices, as indicated above. It is also assumed that `v` has no + * incident edges. + */ + Halfedge_handle split_edge_ex(Halfedge_handle he, Vertex_handle v, + const X_monotone_curve_2& c1, + const X_monotone_curve_2& c2); -/*! removes the edge `he` from the arrangement, such that if the edge removal - * causes the creation of a new hole (inner CCB), `he->target()` lies on the - * boundary of this hole. The flags `remove_source` and `remove_target` - * indicate whether the end-vertices of `he` should be removed as well, in case - * they have no other incident edges. If the operation causes two faces to - * merge, the merged face is returned. Otherwise, the face to which the edge - * was incident is returned. - */ -Face_handle remove_edge_ex(Halfedge_handle he, - bool remove_source = true, - bool remove_target = true); + /*! removes the edge `he` from the arrangement, such that if the edge removal + * causes the creation of a new hole (inner CCB), `he->target()` lies on the + * boundary of this hole. The flags `remove_source` and `remove_target` + * indicate whether the end-vertices of `he` should be removed as well, in + * case they have no other incident edges. If the operation causes two faces + * to merge, the merged face is returned. Otherwise, the face to which the + * edge was incident is returned. + */ + Face_handle remove_edge_ex(Halfedge_handle he, + bool remove_source = true, + bool remove_target = true); -/// @} + /// @} }; /* end Arr_accessor */ } /* end namespace CGAL */ diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_bounded_planar_topology_traits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_bounded_planar_topology_traits_2.h index 9bda6a296b9..41ee06cfe88 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_bounded_planar_topology_traits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_bounded_planar_topology_traits_2.h @@ -10,18 +10,18 @@ namespace CGAL { * The `Arr_bounded_planar_topology_traits_2` template has two parameters: *
    *
  • The `GeometryTraits_2` template-parameter should be substituted by - * a model of the `ArrangementBasicTraits_2` concept. The traits + * a model of the `AosBasicTraits_2` concept. The traits * class defines the types of \f$x\f$-monotone curves and two-dimensional - * points, namely `ArrangementBasicTraits_2::X_monotone_curve_2` and - * `ArrangementBasicTraits_2::Point_2`, + * points, namely `AosBasicTraits_2::X_monotone_curve_2` and + * `AosBasicTraits_2::Point_2`, * respectively, and supports basic geometric predicates on them. *
  • The `Dcel` template-parameter should be substituted by - * a class that is a model of the `ArrangementDcel` concept. The + * a class that is a model of the `AosDcel` concept. The * value of this parameter is by default * `Arr_default_dcel`. *
* - * \cgalModels{ArrangementBasicTopologyTraits} + * \cgalModels{AosBasicTopologyTraits} * * \sa `Arr_default_dcel` * \sa `CGAL::Arr_geodesic_arc_on_sphere_traits_2` diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_circle_segment_traits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_circle_segment_traits_2.h index 303a00ded01..805cfd833bc 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_circle_segment_traits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_circle_segment_traits_2.h @@ -3,7 +3,7 @@ namespace CGAL { /*! \ingroup PkgArrangementOnSurface2TraitsClasses * * The class `Arr_circle_segment_traits_2` is a model of the - * `ArrangementTraits_2` concept and can be used to construct and maintain + * `AosTraits_2` concept and can be used to construct and maintain * arrangements of circular arcs and line segments. * * The traits class must be instantiated with a geometric kernel, such that the @@ -27,12 +27,12 @@ namespace CGAL { * For more details see the documentation of `Sqrt_extension`. * * While `Arr_circle_segment_traits_2` models the concept - * `ArrangementDirectionalXMonotoneTraits_2`, the implementation of the + * `AosDirectionalXMonotoneTraits_2`, the implementation of the * `Are_mergeable_2` operation does not enforce the input curves to have the * same direction as a precondition. Moreover, `Arr_circle_segment_traits_2` * supports the merging of curves of opposite directions. * - * \cgalModels{ArrangementTraits_2,ArrangementDirectionalXMonotoneTraits_2} + * \cgalModels{AosTraits_2,AosDirectionalXMonotoneTraits_2} * */ template< typename Kernel > @@ -88,7 +88,7 @@ public: * center point with rational coordinates and whose squared radius is * rational, with the given endpoints. The orientation of the arc is the * same as the orientation of `circ`. - + * * \pre Both endpoints must lie on the given supporting circle. */ Curve_2(const typename Kernel::Circle_2& circ, @@ -133,7 +133,7 @@ public: /*! returns the target point. * * \pre `cv` is not a full circle. - */ + */ const Point_2& target() const; /*! returns the orientation of the curve (`COLLINEAR` in case of line @@ -315,7 +315,6 @@ public: Bbox_2 bbox() const; /// @} - }; /* end Arr_circle_segment_traits_2::X_monotone_curve_2 */ class Trim_2 { @@ -331,7 +330,7 @@ public: const Point_2& src, const Point_2& tgt)const /// @} - } /* end Arr_circle_segment_traits_2::Trim_2 */ + } /* end Arr_circle_segment_traits_2::Trim_2 */ }; /* end Arr_circle_segment_traits_2 */ diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_conic_traits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_conic_traits_2.h index 2db8001f4b1..1061f529c92 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_conic_traits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_conic_traits_2.h @@ -2,7 +2,7 @@ namespace CGAL { /*! \ingroup PkgArrangementOnSurface2TraitsClasses * - * The class `Arr_conic_traits_2` is a model of the `ArrangementTraits_2` + * The class `Arr_conic_traits_2` is a model of the `AosTraits_2` * concept and can be used to construct and maintain arrangements of bounded * segments of algebraic curves of degree \f$2\f$ at most, also known as * conic curves. @@ -75,12 +75,12 @@ namespace CGAL { * and defines a curve and \f$x\f$-monotone curve types, as detailed below. * * While the `Arr_conic_traits_2` models the concept - * `ArrangementDirectionalXMonotoneTraits_2`, the implementation of + * `AosDirectionalXMonotoneTraits_2`, the implementation of * the `Are_mergeable_2` operation does not enforce the input curves * to have the same direction as a precondition. Moreover, `Arr_conic_traits_2` * supports the merging of curves of opposite directions. * - * \cgalModels{ArrangementTraits_2,ArrangementLandmarkTraits_2,ArrangementDirectionalXMonotoneTraits_2} + * \cgalModels{AosTraits_2,AosLandmarkTraits_2,AosDirectionalXMonotoneTraits_2} * * \cgalHeading{Types} */ diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_curve_data_traits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_curve_data_traits_2.h index e75623e8cd7..9fcb837d7ac 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_curve_data_traits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_curve_data_traits_2.h @@ -2,10 +2,10 @@ namespace CGAL { /*! \ingroup PkgArrangementOnSurface2TraitsClasses * - * The class `Arr_curve_data_traits_2` is a model of the `ArrangementTraits_2` + * The class `Arr_curve_data_traits_2` is a model of the `AosTraits_2` * concept and serves as a decorator class that allows the extension of the * curves defined by the base traits-class (the `Tr` parameter), which serves as - * a geometric traits-class (a model of the `ArrangementTraits_2` concept), with + * a geometric traits-class (a model of the `AosTraits_2` concept), with * extraneous (non-geometric) data fields. * * The traits class inherits its point type from `Traits::Point_2`, and defines @@ -49,12 +49,11 @@ namespace CGAL { * `d1` and `d2`. The \f$ x\f$-monotone curve that represents the overlap is * associated with the output of this functor. * - * \cgalModels{ArrangementTraits_2} + * \cgalModels{AosTraits_2} */ template class Arr_curve_data_traits_2 : public Tr { public: - /// \name Types /// @{ @@ -97,7 +96,6 @@ public: */ class Curve_2 : public Base_curve_2 { public: - /// \name Creation /// @{ @@ -130,7 +128,6 @@ public: void set_data(const Curve_data& data); /// @} - }; /* end Arr_curve_data_traits_2::Curve_2 */ /*! The `X_monotone_curve_2` class nested within the curve-data traits extends @@ -138,7 +135,6 @@ public: */ class X_monotone_curve_2 : public Base_x_monotone_curve_2 { public: - /// \name Creation /// @{ @@ -172,7 +168,6 @@ public: void set_data(const X_monotone_curve_data& data); /// @} - }; /* end Arr_curve_data_traits_2::X_monotone_curve_2 */ }; /* end Arr_curve_data_traits_2 */ diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_dcel.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_dcel.h index b65f8bf4799..56e4e3c3101 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_dcel.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_dcel.h @@ -7,8 +7,8 @@ namespace CGAL { * class templates and other templates. It is parameterized by a geometry * traits type and optionally by a vertex, halfedge, or face types. By default, * the `Arr_dcel` class template uses the \link - * ArrangementBasicTraits_2::Point_2 `Point_2`\endlink and \link - * ArrangementBasicTraits_2::X_monotone_curve_2 `X_monotone_curve_2`\endlink + * AosBasicTraits_2::Point_2 `Point_2`\endlink and \link + * AosBasicTraits_2::X_monotone_curve_2 `X_monotone_curve_2`\endlink * types nested in the traits type to instantiate the vertex and base halfedge * types, respectively. Thus, by default the \dcel only stores the topological * incidence relations and the geometric data attached to vertices and @@ -16,15 +16,15 @@ namespace CGAL { * overridden. Notice that if the vertex and halfedge types are overridden, the * traits type is ignored. * - * \cgalModels{ArrangementDcelWithRebind} + * \cgalModels{AosDcelWithRebind} * * \tparam Traits a geometry traits type, which is a model of the - * `ArrangementBasicTraits_2` concept. - * \tparam V the vertex type, which is a model of the `ArrangementDcelVertex` + * `AosBasicTraits_2` concept. + * \tparam V the vertex type, which is a model of the `AosDcelVertex` * concept. * \tparam H the halfedge type, which is a model of the - * `ArrangementDcelHalfedge` concept. - * \tparam F the face type, which is a model of the `ArrangementDcelFace` + * `AosDcelHalfedge` concept. + * \tparam F the face type, which is a model of the `AosDcelFace` * concept. * * \sa `Arr_dcel_base` @@ -33,7 +33,6 @@ template , typename H = Arr_halfedge_base, typename F = Arr_face_base> -class Arr_dcel : public Arr_dcel_base { -}; +class Arr_dcel : public Arr_dcel_base {}; } /* end namespace CGAL */ diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_dcel_base.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_dcel_base.h index 9fa8f5f4d96..dafdc593b67 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_dcel_base.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_dcel_base.h @@ -1,71 +1,47 @@ - namespace CGAL { -/*! -\ingroup PkgArrangementOnSurface2DCEL - -\anchor arr_refarr_dcel_base - -The `Arr_dcel_base` class is an important ingredient in the -definition of \dcel data structures. It serves as a basis class for -any instance of the `Dcel` template parameter of the -`Arrangement_2` template. In particular it is the basis class of -the default `Dcel` template parameter, and the basis class of any -extended \dcel. The template parameters `V`, `H`, and `F` -must be instantiated with models of the concepts -`ArrangementDcelVertex`, `ArrangementDcelHalfedge`, -and `ArrangementDcelFace` respectively. - -\cgalModels{ArrangementDcel} - -*/ +/*! \ingroup PkgArrangementOnSurface2DCEL + * + * \anchor arr_refarr_dcel_base + * + * The `Arr_dcel_base` class is an important ingredient in the definition of + * \dcel data structures. It serves as a basis class for any instance of the + * `Dcel` template parameter of the `Arrangement_2` template. In particular it + * is the basis class of the default `Dcel` template parameter, and the basis + * class of any extended \dcel. The template parameters `V`, `H`, and `F` must + * be instantiated with models of the concepts `AosVertex`, `AosHalfedge`, and + * `AosFace` respectively. + * + * \cgalModels{Aos} + */ template< typename V, typename H, typename F > class Arr_dcel_base { public: + /*! The basic \dcel face type. Serves as a basis class for an extended + * face record with auxiliary data fields. + * + * \cgalModels{AosFace} + */ + class Arr_face_base {}; -/*! - -The basic \dcel face type. Serves as a basis class for an extended -face record with auxiliary data fields. - -\cgalModels{ArrangementDcelFace} - -*/ -class Arr_face_base { - -}; /* end Arr_dcel_base::Arr_face_base */ - -/*! - - -The basic \dcel halfedge type. Serves as a basis class for an -extended halfedge record with auxiliary data fields. The `Curve` -parameter is the type of \f$ x\f$-monotone curves associated with the vertices. - -\cgalModels{ArrangementDcelHalfedge} - -*/ -template< typename Curve > -class Arr_halfedge_base { - -}; /* end Arr_dcel_base::Arr_halfedge_base */ - -/*! - - -The basic \dcel vertex type. Serves as a basis class for an extended -vertex record with auxiliary data fields. The `Point` parameter is -the type of points associated with the vertices. - -\cgalModels{ArrangementDcelVertex} - -*/ -template< typename Point > -class Arr_vertex_base { - -}; /* end Arr_dcel_base::Arr_vertex_base */ + /*! The basic \dcel halfedge type. Serves as a basis class for an extended + * halfedge record with auxiliary data fields. The `Curve` parameter is the + * type of \f$ x\f$-monotone curves associated with the vertices. + * + * \cgalModels{AosHalfedge} + */ + template + class Arr_halfedge_base {}; + /*! The basic \dcel vertex type. Serves as a basis class for an extended + * vertex record with auxiliary data fields. The `Point` parameter is the + * type of points associated with the vertices. + * + * \cgalModels{AosVertex} + */ + template + class Arr_vertex_base {}; }; /* end Arr_dcel_base */ } /* end namespace CGAL */ diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_default_dcel.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_default_dcel.h index b2dba1ca39e..e0674c72567 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_default_dcel.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_default_dcel.h @@ -5,17 +5,17 @@ namespace CGAL { * The default \dcel class used by the `Arrangement_2`, * `Arr_bounded_planar_topology_traits_2`, `Arr_unb_planar_topology_traits_2` * class templates and other templates. It is parameterized by a geometry - * traits type. It uses the \link ArrangementBasicTraits_2::Point_2 - * `Point_2`\endlink and \link ArrangementBasicTraits_2::X_monotone_curve_2 + * traits type. It uses the \link AosBasicTraits_2::Point_2 + * `Point_2`\endlink and \link AosBasicTraits_2::X_monotone_curve_2 * `X_monotone_curve_2`\endlink types nested in the traits type to instantiate * the vertex and base halfedge types, respectively. Thus, by default the \dcel * only stores the topological incidence relations and the geometric data * attached to vertices and edges. * - * \cgalModels{ArrangementDcelWithRebind} + * \cgalModels{AosDcelWithRebind} * * \tparam Traits a geometry traits type, which is a model of the - * `ArrangementBasicTraits_2` concept. + * `AosBasicTraits_2` concept. * * \sa `Arr_dcel` * \sa `Arr_dcel_base` diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_default_overlay_traits.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_default_overlay_traits.h index 5b5677b7458..7b4f4fe7f6a 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_default_overlay_traits.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_default_overlay_traits.h @@ -1,57 +1,45 @@ - namespace CGAL { -/*! -\ingroup PkgArrangementOnSurface2TraitsClasses -\ingroup PkgArrangementOnSurface2Overlay +/*! \ingroup PkgArrangementOnSurface2TraitsClasses + * \ingroup PkgArrangementOnSurface2Overlay + * + * An instance of `Arr_default_overlay_traits` should be used for overlaying two + * arrangements of type `Arrangement` that store no auxiliary data with their + * \dcel records, where the resulting overlaid arrangement stores no auxiliary + * \dcel data as well. This class simply gives empty implementation for all + * traits-class functions. + * + * \cgalModels{OverlayTraits} + * + * \sa `overlay` + */ +template +class Arr_default_overlay_traits {}; -An instance of `Arr_default_overlay_traits` should be used for overlaying two arrangements -of type `Arrangement` that store no auxiliary data with their \dcel records, where the resulting overlaid arrangement stores no auxiliary -\dcel data as well. This class simply gives empty implementation for all -traits-class functions. +/*! \ingroup PkgArrangementOnSurface2TraitsClasses + * \ingroup PkgArrangementOnSurface2Overlay + * + * An instance of `Arr_face_overlay_traits` should be used for overlaying two + * arrangements of types `Arr_A` and `Arr_B`, which are instantiated using the + * same geometric traits-class and with the \dcel classes `Dcel_A` and `Dcel_B` + * respectively, in order to store their overlay in an arrangement of type + * `Arr_R`, which is instantiated using a third \dcel class `Dcel_R`. All three + * \dcel classes are assumed to be instantiations of the + * `Arr_face_extended_dcel` template with types `FaceData_A`, `FaceData_B` and + * `FaceData_R`, respectively. + * + * This class gives empty implementation for all overlay traits-class functions, + * except the function that computes the overlay of two faces. In this case, it + * uses the functor `OvlFaceData`, which accepts a `FaceData_A` object and a + * `FaceData_B` object and computes a corresponding `FaceData_R` object, in + * order to set the auxiliary data of the overlay face. + * + * \cgalModels{OverlayTraits} + * + * \sa `overlay` + * \sa `CGAL::Arr_face_extended_dcel` + */ +template +class Arr_face_overlay_traits {}; -\cgalModels{OverlayTraits} - -\sa `overlay` - -*/ -template< typename Arrangement > -class Arr_default_overlay_traits { -public: - -}; /* end Arr_default_overlay_traits */ -} /* end namespace CGAL */ - -namespace CGAL { - -/*! -\ingroup PkgArrangementOnSurface2TraitsClasses -\ingroup PkgArrangementOnSurface2Overlay - -An instance of `Arr_face_overlay_traits` should be used for overlaying two arrangements -of types `Arr_A` and `Arr_B`, which are instantiated using the same -geometric traits-class and with the \dcel classes `Dcel_A` and -`Dcel_B` respectively, in order to store their overlay in an arrangement -of type `Arr_R`, which is instantiated using a third \dcel class -`Dcel_R`. All three \dcel classes are assumed to be instantiations of the -`Arr_face_extended_dcel` template with types `FaceData_A`, -`FaceData_B` and `FaceData_R`, respectively. - -This class gives empty implementation for all overlay traits-class functions, -except the function that computes the overlay of two faces. In this case, -it uses the functor `OvlFaceData`, which accepts a `FaceData_A` object -and a `FaceData_B` object and computes a corresponding `FaceData_R` -object, in order to set the auxiliary data of the overlay face. - -\cgalModels{OverlayTraits} - -\sa `overlay` -\sa `CGAL::Arr_face_extended_dcel` - -*/ -template< typename Arr_A, typename Arr_B, typename Arr_R, typename OvlFaceData > -class Arr_face_overlay_traits { -public: - -}; /* end Arr_face_overlay_traits */ } /* end namespace CGAL */ diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_face_index_map.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_face_index_map.h index 21f071f4596..9f84f831bc4 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_face_index_map.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_face_index_map.h @@ -1,69 +1,67 @@ namespace CGAL { - /*! \ingroup PkgArrangementOnSurface2Ref - * - * `Arr_face_index_map` maintains a mapping of face handles of an attached - * arrangement object to indices (of type `unsigned int`). This class template - * is a model of the concept `ReadablePropertyMap`. A mapping between face - * handles and indices enables convenient usage of property-map classes supplied - * by `boost`. For example, the property-map class templates - * `boost::vector_property_map`, which is based on `std::vector`, and - * `boost::iterator_property_map`, which can be used to implement a property map - * based on a native \CC array, require the user to supply a mapping such as - * `Arr_face_index_map`. - * - * As new faces might be inserted into the attached arrangement, and - * existing faces might be removed, the notification mechanism is used - * to dynamically maintain the mapping of face handles to indices. - * - * \cgalModels{DefaultConstructible,CopyConstructible,Assignable,ReadablePropertyMap} - * - * \sa `Arr_vertex_index_map` +/*! \ingroup PkgArrangementOnSurface2Ref + * + * `Arr_face_index_map` maintains a mapping of face handles of an attached + * arrangement object to indices (of type `unsigned int`). This class template + * is a model of the concept `ReadablePropertyMap`. A mapping between face + * handles and indices enables convenient usage of property-map classes supplied + * by `boost`. For example, the property-map class templates + * `boost::vector_property_map`, which is based on `std::vector`, and + * `boost::iterator_property_map`, which can be used to implement a property map + * based on a native \CC array, require the user to supply a mapping such as + * `Arr_face_index_map`. + * + * As new faces might be inserted into the attached arrangement, and + * existing faces might be removed, the notification mechanism is used + * to dynamically maintain the mapping of face handles to indices. + * + * \cgalModels{DefaultConstructible,CopyConstructible,Assignable,ReadablePropertyMap} + * + * \sa `Arr_vertex_index_map` + */ + +template +class Arr_face_index_map: public Arrangement_::Observer { +public: + /// \name Types + /// @{ + + /*! the type of the attached arrangement. */ + typedef Arrangement_ Arrangement_2; + typedef typename Arrangement_2::Base_aos Base_aos; - template - class Arr_face_index_map: public Arrangement_::Observer { - public: + typedef boost::readable_property_map_tag category; - /// \name Types - /// @{ + typedef unsigned int value_type; - /*! the type of the attached arrangement. - */ - typedef Arrangement_ Arrangement_2; - typedef typename Arrangement_2::Base_aos Base_aos; + typedef unsigned int reference; - typedef boost::readable_property_map_tag category; + typedef Face_handle key_type; - typedef unsigned int value_type; + /*! The face handle type. + */ + typedef typename Base_aos::Face_handle Face_handle; - typedef unsigned int reference; + /*! The type of mapping of faces to indices. + */ + typedef Unique_hash_map Index_map; - typedef Face_handle key_type; + /// @} - /*! The face handle type. - */ - typedef typename Base_aos::Face_handle Face_handle; + /// \name Creation + /// @{ - /*! The type of mapping of faces to indices. - */ - typedef Unique_hash_map Index_map; + /*! constructs a map that is unattached to any arrangement instance. + */ + Arr_face_index_map(); - /// @} + /*! constructs a map and attaches it to the given arrangement `arr`. + */ + Arr_face_index_map(Base_aos& arr); - /// \name Creation - /// @{ - - /*! constructs a map that is unattached to any arrangement instance. - */ - Arr_face_index_map(); - - /*! constructs a map and attaches it to the given arrangement `arr`. - */ - Arr_face_index_map(Base_aos& arr); - - /// @} - - }; /* end Arr_accessor */ + /// @} +}; /* end Arr_accessor */ } /* end namespace CGAL */ diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_line_arc_traits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_line_arc_traits_2.h index 909792816a7..777088a4c89 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_line_arc_traits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_line_arc_traits_2.h @@ -1,19 +1,14 @@ - namespace CGAL { -/*! -\ingroup PkgArrangementOnSurface2TraitsClasses +/*! \ingroup PkgArrangementOnSurface2TraitsClasses + * + * This class is a traits class for \cgal arrangements, built on top of a + * model of concept `CircularKernel`. It provides curves of type + * `CGAL::Line_arc_2`. + * + * \cgalModels{ArrangementTraits_2} + */ +template +class Arr_line_arc_traits_2 {}; -This class is a traits class for \cgal arrangements, built on top of a -model of concept `CircularKernel`. It provides curves of type -`CGAL::Line_arc_2`. - -\cgalModels{ArrangementTraits_2} - -*/ -template< typename CircularKernel > -class Arr_line_arc_traits_2 { -public: - -}; /* end Arr_line_arc_traits_2 */ } /* end namespace CGAL */ diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_polycurve_traits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_polycurve_traits_2.h index 8c1db150c3b..3346df459f3 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_polycurve_traits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_polycurve_traits_2.h @@ -1,521 +1,522 @@ namespace CGAL { - /*! \ingroup PkgArrangementOnSurface2TraitsClasses - * - * Note: The `SubcurveTraits_2` can comprise of Line_segments, Conic_arcs, - * Circular_arc, Bezier_curves, or Linear_curves. A portion or a part - * of any of the above mentioned geometric traits is called a subcurve. - * - * The traits class `Arr_polycurve_traits_2` handles piecewise curves that are - * not necessarily linear, such as conic arcs, circular arcs, Bezier curves, - * or line segments. We call such a compound curve a polycurve. A polycurve - * is a chain of subcurves, where each two neighboring subcurves in the chain - * share a common endpoint; that is, the polycurve is continuous. Furthermore, - * the target of the \f$i\f$th segment of a polycurve has to coincide with - * the source of the \f$i+1\f$st segment; that is, the polycurve has to be - * \a well-oriented. Note that it is possible to construct general polycurves - * that are neither continuous nor well-oriented, as it is impossible to - * enforce this precondition (using the set of predicates required by the - * relevant concepts, see below). However, such polycurves cannot be used for - * the actual computation of arrangements. The traits class template exploits - * the functionality of the `SubcurveTraits_2` template-parameter to handle - * the subcurves that compose the polycurve. - * - * The type substituting the template parameter `SubcurveTraits_2` when - * the template Arr_polycurve_traits_2 is instantiated must be a model - * of the concepts - * - `ArrangementTraits_2` and - * - `ArrangementDirectionalXMonotoneTraits_2`. - * - * If, in addition, the SubcurveTraits_2 models the concept - * `ArrangementApproximateTraits_2` then `Arr_polycurve_traits_2` models this - * concept as well. The same holds for the concept - * `ArrangementOpenBoundaryTraits_2`. If no type is provided, then - * `Arr_segment_traits_2` (instantiated with - * `Exact_predicates_exact_constructions_kernel` as the kernel) is used. - * Otherwise, - * `Arr_algebraic_segment_traits_2`, - * `Arr_Bezier_curve_traits_2`, - * `Arr_circle_segment_traits_2`, - * `Arr_conic_traits_2`, - * `Arr_linear_traits_2`, - * `Arr_non_caching_segment_traits_2`, - * `Arr_segment_traits_2`, - * `Arr_rational_function_traits_2`, - * or any other model of the concepts above can be used. - * - * The number type used by the injected subcurve traits should support exact - * rational arithmetic (that is, the number type should support the arithmetic - * operations \f$ +\f$, \f$ -\f$, \f$ \times\f$ and \f$ \div\f$ carried out - * without loss of precision), in order to avoid robustness problems, although - * other inexact number types could be used at the user's own risk. - * - * A polycurve that comprises \f$n > 0\f$ subcurves has \f$ n+1 \f$ subcurve - * end-points, and they are represented as objects of type - * `SubcurveTraits_2::Point_2`. Since the notion of a \a vertex is reserved to - * 0-dimensional elements of an arrangement, we use, in this context, the - * notion of \a points in order to refer to the vertices of a polycurve. For - * example, an arrangement induced by a single non-self intersecting polycurve - * has exactly two vertices regardless of the number of subcurve - * end-points. Finally, the types `Subcurve_2` and `X_monotone_subcurve_2` - * nested in `Arr_polycurve_traits_2` are nothing but - * `SubcurveTraits_2::Curve_2` and `SubcurveTraits_2::X_monotone_curve_2`, - * respectively. - * - * \cgalHeading{A note on Backwards compatibility} In \cgal version 4.2 (and - * earlier) any object of the `X_monotone_curve_2` type nested in - * `Arr_polycurve_traits_2` which in that version was called - * `Arr_polyline_tratis_2` maintained a direction invariant; namely, its - * vertices were ordered in an \a ascending lexicographical \f$(xy)\f$-order. - * This restriction is no longer imposed and `X_monotone_curve_2` can be now - * directed either from right-to-left \a or left-to-right. If you wish to - * maintain a left-to-right orientations of the \f$x\f$-monotone polycurve, - * set the macro `CGAL_ALWAYS_LEFT_TO_RIGHT` to 1 before any \cgal header is - * included. - * - * \cgalModels{ArrangementTraits_2,ArrangementDirectionalXMonotoneTraits_2, - * ArrangementApproximateTraits_2 (if the type that substitutes - * the template parameter `SubcurveTraits_2` models the concept as well)} - * - * \sa `Arr_algebraic_segment_traits_2` - * \sa `Arr_Bezier_curve_traits_2` - * \sa `Arr_circle_segment_traits_2` - * \sa `Arr_conic_traits_2` - * \sa `Arr_linear_traits_2` - * \sa `Arr_non_caching_segment_traits_2` - * \sa `Arr_segment_traits_2` - * \sa `Arr_rational_function_traits_2` - * \sa `CGAL_ALWAYS_LEFT_TO_RIGHT` - */ - template - class Arr_polycurve_traits_2 { +/*! \ingroup PkgArrangementOnSurface2TraitsClasses + * + * Note: The `SubcurveTraits_2` can comprise of Line_segments, Conic_arcs, + * Circular_arc, Bezier_curves, or Linear_curves. A portion or a part + * of any of the above mentioned geometric traits is called a subcurve. + * + * The traits class `Arr_polycurve_traits_2` handles piecewise curves that are + * not necessarily linear, such as conic arcs, circular arcs, Bezier curves, + * or line segments. We call such a compound curve a polycurve. A polycurve + * is a chain of subcurves, where each two neighboring subcurves in the chain + * share a common endpoint; that is, the polycurve is continuous. Furthermore, + * the target of the \f$i\f$th segment of a polycurve has to coincide with + * the source of the \f$i+1\f$st segment; that is, the polycurve has to be + * \a well-oriented. Note that it is possible to construct general polycurves + * that are neither continuous nor well-oriented, as it is impossible to + * enforce this precondition (using the set of predicates required by the + * relevant concepts, see below). However, such polycurves cannot be used for + * the actual computation of arrangements. The traits class template exploits + * the functionality of the `SubcurveTraits_2` template-parameter to handle + * the subcurves that compose the polycurve. + * + * The type substituting the template parameter `SubcurveTraits_2` when + * the template Arr_polycurve_traits_2 is instantiated must be a model + * of the concepts + * - `AosTraits_2` and + * - `AosDirectionalXMonotoneTraits_2`. + * + * If, in addition, the SubcurveTraits_2 models the concept + * `AosApproximateTraits_2` then `Arr_polycurve_traits_2` models this + * concept as well. The same holds for the concept + * `AosOpenBoundaryTraits_2`. If no type is provided, then + * `Arr_segment_traits_2` (instantiated with + * `Exact_predicates_exact_constructions_kernel` as the kernel) is used. + * Otherwise, + * `Arr_algebraic_segment_traits_2`, + * `Arr_Bezier_curve_traits_2`, + * `Arr_circle_segment_traits_2`, + * `Arr_conic_traits_2`, + * `Arr_linear_traits_2`, + * `Arr_non_caching_segment_traits_2`, + * `Arr_segment_traits_2`, + * `Arr_rational_function_traits_2`, + * or any other model of the concepts above can be used. + * + * The number type used by the injected subcurve traits should support exact + * rational arithmetic (that is, the number type should support the arithmetic + * operations \f$ +\f$, \f$ -\f$, \f$ \times\f$ and \f$ \div\f$ carried out + * without loss of precision), in order to avoid robustness problems, although + * other inexact number types could be used at the user's own risk. + * + * A polycurve that comprises \f$n > 0\f$ subcurves has \f$ n+1 \f$ subcurve + * end-points, and they are represented as objects of type + * `SubcurveTraits_2::Point_2`. Since the notion of a \a vertex is reserved to + * 0-dimensional elements of an arrangement, we use, in this context, the + * notion of \a points in order to refer to the vertices of a polycurve. For + * example, an arrangement induced by a single non-self intersecting polycurve + * has exactly two vertices regardless of the number of subcurve + * end-points. Finally, the types `Subcurve_2` and `X_monotone_subcurve_2` + * nested in `Arr_polycurve_traits_2` are nothing but + * `SubcurveTraits_2::Curve_2` and `SubcurveTraits_2::X_monotone_curve_2`, + * respectively. + * + * \cgalHeading{A note on Backwards compatibility} In \cgal version 4.2 (and + * earlier) any object of the `X_monotone_curve_2` type nested in + * `Arr_polycurve_traits_2` which in that version was called + * `Arr_polyline_tratis_2` maintained a direction invariant; namely, its + * vertices were ordered in an \a ascending lexicographical \f$(xy)\f$-order. + * This restriction is no longer imposed and `X_monotone_curve_2` can be now + * directed either from right-to-left \a or left-to-right. If you wish to + * maintain a left-to-right orientations of the \f$x\f$-monotone polycurve, + * set the macro `CGAL_ALWAYS_LEFT_TO_RIGHT` to 1 before any \cgal header is + * included. + * + * \cgalModels{AosTraits_2,AosDirectionalXMonotoneTraits_2, + * AosApproximateTraits_2 (if the type that substitutes + * the template parameter `SubcurveTraits_2` models the concept as well)} + * + * \sa `Arr_algebraic_segment_traits_2` + * \sa `Arr_Bezier_curve_traits_2` + * \sa `Arr_circle_segment_traits_2` + * \sa `Arr_conic_traits_2` + * \sa `Arr_linear_traits_2` + * \sa `Arr_non_caching_segment_traits_2` + * \sa `Arr_segment_traits_2` + * \sa `Arr_rational_function_traits_2` + * \sa `CGAL_ALWAYS_LEFT_TO_RIGHT` + */ + +template +class Arr_polycurve_traits_2 { +public: + /// \name Types + /// @{ + + /*! + */ + // TODO: Have to turn these into links, so whenever I mention Point_2 it + // will point here and *not* to Kernel::Point_2 for instance. + typedef SubcurveTraits_2::Point_2 Point_2; + + /*! + */ + typedef SubcurveTraits_2::Curve_2 Subcurve_2; + typedef SubcurveTraits_2::X_monotone_curve_2 X_monotone_subcurve_2; + + /// @} + + /*! Construction functor of a general (not necessarily \f$x\f$-monotone) + * polycurve. + * + * This functor constructs general polycurve. Its `operator()` is + * overloaded to support various input types. + * + * Note that the composing subcurves, depending on the `SubcurveTraits_2`, + * might not be \f$x\f$-monotone. + */ + class Construct_curve_2 { + public: + /// \name Operations + /// @{ + + /*! Obtain a polycurve that comprises of one given subcurve. + * \param subcurve input subcurve. + * \pre `subcurve` is not degenerated (not tested). + * \return A polycurve with one subcurve, namely `subcurve`. + */ + Curve_2 operator()(const Subcurve_2& subcurve) const; + + /*! Construct a well-oriented polycurve from a range of either + * `SubcurveTraits_2::Point_2` or `SubcurveTraits_2::Curve_2`. + * + * \param begin iterator pointing to the first element in the + * range. + * \param end iterator pointing to the past-the-end + * element in the range. + * \pre The given range form a continuous and well-oriented polycurve + * (not tested). + * \pre Contains no degenerated subcurves (not tested) + * \return A polycurve using the corresponding construction implementation. + */ + template + Curve_2 operator()(ForwardIterator begin, ForwardIterator end) const; + + /// @} /* end of operations */ + }; /* end of Arr_polycurve_traits_2::Construct_curve_2 */ + + /*! Construction functor of \f$x\f$-monotone polycurve. + * + * Similar to `Construct_curve_2`, only returns \f$x\f$-monotone + * polycurve. Thus, have the same overloads of the + * `operator()`. Note that when constructing `X_monotone_curve_2` + * all preconditions are tested. + * + * If `CGAL_ALWAYS_LEFT_TO_RIGHT` is defined, then the resulting + * \f$x\f$-monotone polycurve will be oriented from left-to-right. + */ + class Construct_x_monotone_curve_2 {}; + + /*! Function object which returns the number of subcurve end-points of a + * polycurve. + */ + class Number_of_points_2 {}; + + /*! Functor to augment a polycurve by either adding a vertex or a subcurve + * at the back. + */ + class Push_back_2 { + public: + /// \name Operations + /// @{ + + /*! Append a subcurve `subcurve` to an existing polycurve `cv` at the back. + * If `cv` is empty, `subcurve` will be its first subcurve. + * \param cv a polycurve. Note, `cv` is (not necessarily) \f$x\f$-monotone. + * \param subcurve a subcurve (not necessarily \f$x\f$-monotone) to be + * appended to `cv` + */ + void operator()(Curve_2& cv, const Subcurve_2& subcurve) const; + + /*! Append a subcurve `subcurve` to an existing \f$x\f$-monotone polycurve + * `xcv` at the back. If `xcv` is empty, `subcurve` will be its first + * subcurve. + * \param xcv existing \f$x\f$-monotone polycurve + * \param subcurve the subcurve to be added + * \pre If `xcv` is not empty then `subcurve` extends `xcv` to the right + * if `xcv` is oriented right-to-left. Otherwise, `subcurve` extends + * `xcv` to the left. + * \pre `subcurve` is not degenerated. + * \pre `xcv` and `subcurve` should have the same orientation + */ + void operator()(X_monotone_curve_2& xcv, + const X_monotone_subcurve_2& subcurve) const; + /// @} /* end of operations */ + }; /* end of Arr_polycurve_traits_2::Push_back_2 */ + + /*! Functor to augment a polycurve by either adding a vertex or a subcurve + * at the front. + */ + class Push_front_2 { + public: + /// \name Operations + /// @{ + + /*! Append a subcurve `subcurve` to an existing polycurve `cv` at the + * front. If `cv` is empty, `subcurve` will be its first subcurve. + * \param cv a polycurve. Note, `cv` is (not necessarily) \f$x\f$-monotone. + * \param subcurve a subcurve (not necessarily \f$x\f$-monotone) to be + * appended to `cv` + */ + void operator()(Curve_2& cv, const Subcurve_2& subcurve) const; + + /*! Append a subcurve `subcurve` to an existing \f$x\f$-monotone polycurve + * `xcv` at the front. If `xcv` is empty, `subcurve` will be its first + * subcurve. + * \param xcv existing \f$x\f$-monotone polycurve + * \param subcurve the subcurve to be added + * \pre If `xcv` is not empty then `subcurve` extends `xcv` to the left if + * `xcv` is oriented right-to-left. Otherwise, `subcurve` extends + * `xcv` to the right. + * \pre `subcurve` is not degenerated. + * \pre `xcv` and `subcurve` should have the same orientation + */ + void operator()(X_monotone_curve_2& xcv, + const X_monotone_subcurve_2& subcurve) const; + + /// @} /* end of operations */ + }; /* end of Arr_polycurve_traits_2::Push_front_2 */ + + class Trim_2 { + public: + /*! Obtain a trimmed version of the polycurve with src and tgt as end + * vertices. + * Src and tgt will be swapped if they do not conform to the direction of + * the polycurve. + */ + X_monotone_curve_2 operator()(const X_monotone_curve_2& xcv, + const Point_2& src, + const Point_2& tgt) const; + }; + + /*! Subdivide a given subcurve into \f$x\f$-monotone subcurves and + * isolated points, and insert them into an output container. An object in + * the output container is represented by a discriminated union container + * that holds either a point or an \f$x\f$-monotone curve. + */ + class Make_x_monotone_2 { + public: + /*! performs the subdivision. + * + * \param cv the subcurve. + * \param oi The output iterator that points at the output container. + * \return the past-the-end iterator of the output container. + * + * \pre if `cv` is not empty, then it must be continuous and well-oriented. + * \pre Dereferencing `oi` must yield a polymorphic object of type + * `std::variant<`\link Arr_polycurve_traits_2::Point_2 `Point_2` \endlink, + * `X_monotone_curve_2>`. + */ + template + OutputIterator operator()(const Curve_2& cv, OutputIterator oi) const; + }; + + /*! The `Curve_2` type nested in the `Arr_polycurve_traits_2` represents + * general continuous piecewise-linear subcurves (a polycurve can be + * self-intersecting) and support their construction from range of + * subcurves. Construction of polycurves in various ways is supported using + * the construction functors. It is strongly recommended to avoid + * construction of `Curve_2` objects directly and prefer the usage of the + * construction functors. The type `Curve_2` has two template + * parameters, namely `SubcurveType_2` and `PointType_2`, which are + * `SubcurveTraits_2::Curve_2` and `SubcurveTraits_2::Point_2` types. Thus, + * in general, the subcurves that a `Curve_2` instance comprises could be + * either \f$x\f$-monotone or not! + * + * The copy and default constructor as well as the assignment operator are + * provided for polycurve subcurves. In addition, an \link + * PkgArrangementOnSurface2op_left_shift `operator<<` \endlink for the + * subcurves is defined for standard output streams, and an \link + * PkgArrangementOnSurface2op_right_shift `operator>>` \endlink for the + * subcurves is defined for standard input streams. + */ + template + class Curve_2 { public: + protected: /// \name Types /// @{ - /*! + + /*! The container of the subcurves that comprises the polycurve. */ - // TODO: Have to turn these into links, so whenever I mention Point_2 it - // will point here and *not* to Kernel::Point_2 for instance. - typedef SubcurveTraits_2::Point_2 Point_2; + typedef typename std::vector Subcurves_container; - /*! + public: + /*! The size of the container that comprises the polycurve. */ - typedef SubcurveTraits_2::Curve_2 Subcurve_2; - typedef SubcurveTraits_2::X_monotone_curve_2 X_monotone_subcurve_2; - /// @} + typedef typename Subcurves_container::size_type Size; + typedef typename Subcurves_container::size_type size_type; - /*! Construction functor of a general (not necessarily \f$x\f$-monotone) - * polycurve. - * - * This functor constructs general polycurve. Its `operator()` is - * overloaded to support various input types. - * - * Note that the composing subcurves, depending on the `SubcurveTraits_2`, - * might not be \f$x\f$-monotone. + /*! \deprecated + * A bidirectional iterator that allows traversing the points + * that comprise a polycurve's subcurves. */ - class Construct_curve_2 { - public: - /// \name Operations - /// @{ + typedef unspecified_type const_iterator; - /*! Obtain a polycurve that comprises of one given subcurve. - * \param subcurve input subcurve. - * \pre `subcurve` is not degenerated (not tested). - * \return A polycurve with one subcurve, namely `subcurve`. - */ - Curve_2 operator()(const Subcurve_2& subcurve) const; - - /*! Construct a well-oriented polycurve from a range of either - * `SubcurveTraits_2::Point_2` or `SubcurveTraits_2::Curve_2`. - * - * \param begin iterator pointing to the first element in the - * range. - * \param end iterator pointing to the past-the-end - * element in the range. - * \pre The given range form a continuous and well-oriented polycurve - * (not tested). - * \pre Contains no degenerated subcurves (not tested) - * \return A polycurve using the corresponding construction implementation. - */ - template - Curve_2 operator()(ForwardIterator begin, ForwardIterator end) const; - - /// @} /* end of operations */ - }; /* end of Arr_polycurve_traits_2::Construct_curve_2 */ - - /*! Construction functor of \f$x\f$-monotone polycurve. - * - * Similar to `Construct_curve_2`, only returns \f$x\f$-monotone - * polycurve. Thus, have the same overloads of the - * `operator()`. Note that when constructing `X_monotone_curve_2` - * all preconditions are tested. - * - * If `CGAL_ALWAYS_LEFT_TO_RIGHT` is defined, then the resulting - * \f$x\f$-monotone polycurve will be oriented from left-to-right. + /*! \deprecated + * A bidirectional iterator that allows traversing the points + * that comprise a polycurve's subcurves. */ - class Construct_x_monotone_curve_2 {}; + typedef unspecified_type const_reverse_iterator; - /*! Function object which returns the number of subcurve end-points of a - * polycurve. + /*! A bidirectional constant iterator that allows traversing + * the subcurves that comprise the polycurve. */ - class Number_of_points_2 {}; + typedef unspecified_type Subcurve_const_iterator; - /*! Functor to augment a polycurve by either adding a vertex or a subcurve - * at the back. + /*! A bidirectional constant iterator that allows traversing + * the subcurves that comprise the polycurve. */ - class Push_back_2 { - public: - /// \name Operations - /// @{ + typedef unspecified_type Subcurve_const_reverse_iterator; - /*! Append a subcurve `subcurve` to an existing polycurve `cv` at the back. - * If `cv` is empty, `subcurve` will be its first subcurve. - * \param cv a polycurve. Note, `cv` is (not necessarily) \f$x\f$-monotone. - * \param subcurve a subcurve (not necessarily \f$x\f$-monotone) to be - * appended to `cv` - */ - void operator()(Curve_2& cv, const Subcurve_2& subcurve) const; + /// @} /* End of Types */ - /*! Append a subcurve `subcurve` to an existing \f$x\f$-monotone polycurve - * `xcv` at the back. If `xcv` is empty, `subcurve` will be its first - * subcurve. - * \param xcv existing \f$x\f$-monotone polycurve - * \param subcurve the subcurve to be added - * \pre If `xcv` is not empty then `subcurve` extends `xcv` to the right - * if `xcv` is oriented right-to-left. Otherwise, `subcurve` extends - * `xcv` to the left. - * \pre `subcurve` is not degenerated. - * \pre `xcv` and `subcurve` should have the same orientation - */ - void operator()(X_monotone_curve_2& xcv, - const X_monotone_subcurve_2& subcurve) const; - /// @} /* end of operations */ - }; /* end of Arr_polycurve_traits_2::Push_back_2 */ - - /*! Functor to augment a polycurve by either adding a vertex or a subcurve - * at the front. - */ - class Push_front_2 { - public: - /// \name Operations - /// @{ - - /*! Append a subcurve `subcurve` to an existing polycurve `cv` at the - * front. If `cv` is empty, `subcurve` will be its first subcurve. - * \param cv a polycurve. Note, `cv` is (not necessarily) \f$x\f$-monotone. - * \param subcurve a subcurve (not necessarily \f$x\f$-monotone) to be - * appended to `cv` - */ - void operator()(Curve_2& cv, const Subcurve_2& subcurve) const; - - /*! Append a subcurve `subcurve` to an existing \f$x\f$-monotone polycurve - * `xcv` at the front. If `xcv` is empty, `subcurve` will be its first - * subcurve. - * \param xcv existing \f$x\f$-monotone polycurve - * \param subcurve the subcurve to be added - * \pre If `xcv` is not empty then `subcurve` extends `xcv` to the left if - * `xcv` is oriented right-to-left. Otherwise, `subcurve` extends - * `xcv` to the right. - * \pre `subcurve` is not degenerated. - * \pre `xcv` and `subcurve` should have the same orientation - */ - void operator()(X_monotone_curve_2& xcv, - const X_monotone_subcurve_2& subcurve) const; - - /// @} /* end of operations */ - }; /* end of Arr_polycurve_traits_2::Push_front_2 */ - - class Trim_2 { - public: - /*! Obtain a trimmed version of the polycurve with src and tgt as end - * vertices. - * Src and tgt will be swapped if they do not conform to the direction of - * the polycurve. - */ - X_monotone_curve_2 operator()(const X_monotone_curve_2& xcv, - const Point_2& src, - const Point_2& tgt) const; - }; - - /*! Subdivide a given subcurve into \f$x\f$-monotone subcurves and - * isolated points, and insert them into an output container. An object in - * the output container is represented by a discriminated union container - * that holds either a point or an \f$x\f$-monotone curve. - */ - class Make_x_monotone_2 { - public: - /*! performs the subdivision. - * - * \param cv the subcurve. - * \param oi The output iterator that points at the output container. - * \return the past-the-end iterator of the output container. - * - * \pre if `cv` is not empty, then it must be continuous and well-oriented. - * \pre Dereferencing `oi` must yield a polymorphic object of type - * `std::variant<`\link Arr_polycurve_traits_2::Point_2 `Point_2` \endlink, `X_monotone_curve_2>`. - */ - template - OutputIterator operator()(const Curve_2& cv, OutputIterator oi) const; - }; - - /*! The `Curve_2` type nested in the `Arr_polycurve_traits_2` represents - * general continuous piecewise-linear subcurves (a polycurve can be - * self-intersecting) and support their construction from range of - * subcurves. Construction of polycurves in various ways is supported using - * the construction functors. It is strongly recommended to avoid - * construction of `Curve_2` objects directly and prefer the usage of the - * construction functors. The type `Curve_2` has two template - * parameters, namely `SubcurveType_2` and `PointType_2`, which are - * `SubcurveTraits_2::Curve_2` and `SubcurveTraits_2::Point_2` types. Thus, - * in general, the subcurves that a `Curve_2` instance comprises could be - * either \f$x\f$-monotone or not! - * - * The copy and default constructor as well as the assignment operator are - * provided for polycurve subcurves. In addition, an \link - * PkgArrangementOnSurface2op_left_shift `operator<<` \endlink for the subcurves is - * defined for standard output streams, and an \link - * PkgArrangementOnSurface2op_right_shift `operator>>` \endlink for the subcurves is - * defined for standard input streams. - */ - template - class Curve_2 { - public: - - protected: - /// \name Types - /// @{ - - /*! The container of the subcurves that comprises the polycurve. - */ - typedef typename std::vector Subcurves_container; - - public: - /*! The size of the container that comprises the polycurve. - */ - typedef typename Subcurves_container::size_type Size; - typedef typename Subcurves_container::size_type size_type; - - /*! \deprecated - * A bidirectional iterator that allows traversing the points - * that comprise a polycurve's subcurves. - */ - typedef unspecified_type const_iterator; - - /*! \deprecated - * A bidirectional iterator that allows traversing the points - * that comprise a polycurve's subcurves. - */ - typedef unspecified_type const_reverse_iterator; - - /*! A bidirectional constant iterator that allows traversing - * the subcurves that comprise the polycurve. - */ - typedef unspecified_type Subcurve_const_iterator; - - /*! A bidirectional constant iterator that allows traversing - * the subcurves that comprise the polycurve. - */ - typedef unspecified_type Subcurve_const_reverse_iterator; - - /// @} /* End of Types */ - - /// \name Creation - /// @{ - - /*! Default constructor that constructs an empty polycurve. - */ - Curve_2(); - - /*! Construct a polycurve from one subcurve. - */ - Curve_2(const Subcurve_2 subcurve); - - /*! Construct a polycurve defined by the given range of subcurves - * `[first, last)` (the value-type of `InputIterator` must be - * `SubcurveTraits_2::Curve_2`. In general, the subcurves might not - * be \f$x\f$-monotone, furthermore, they might not form a - * continuous polycurve. - * - * \pre The subcurves in the range should form a continuous and - * well-oriented polycurve. - * - * \deprecated For backwards compatibility, it is - * possible to call this constructor with a range whose - * value-type is `SubcurveTraits_2::Point_2`. In this case, the - * constructed polycurve will concatenate the \f$n\f$th point - * with the \f$(n+1)\f$-st point in the range (using a - * `SubcurveTraits_2::Subcurve_2`'s). This functionality is \a deprecated. - * Instead use the `Construct_curve_2` functors. - */ - template - Curve_2(Iterator first, Iterator last); - - /// @} /* End of Creation */ - - /// \name Access Functions - /// @{ - - /*! \deprecated - * Obtain the number of subcurve end-points that comprise the polycurve. - * Note that for a bounded polycurve, if there are \f$ n\f$ points in the - * polycurve, it comprises \f$ (n - 1)\f$ subcurves. - * Currently, only bounded polycurves are supported. - */ - unsigned_int points() const; - - /*! \deprecated - * Obtain an iterator pointing at the source point of the polycurve. - */ - const_iterator begin() const; - - /*! Obtain an iterator pointing at the first subcurve of the polycurve. - */ - Subcurve_const_iterator begin_subcurves() const; - - /*! \deprecated - * Obtain an iterator pointing after the end of the polycurve. - */ - const_iterator end() const; - - /*! Get an iterator pointing at the past-the-end subcurve of the polycurve. - */ - Subcurve_const_iterator end_subcurves() const; - - /*! \deprecated - * Obtain an iterator pointing at the target point of the polycurve. - */ - const_iterator rbegin() const; - - /*! Obtain an iterator pointing at the last subcurve of the polycurve. - */ - Subcurve_const_reverse_iterator rbegin_subcurves() const; - - /*! \deprecated - * Obtain an iterator pointing before the beginning of the polycurve. - */ - const_iterator rend() const; - - /*! Obtain an iterator pointing at the past-the-end subcurve of - * the polycurve in reverse order. - */ - Subcurve_const_reverse_iterator rend_subcurves() const; - - /*! \deprecated - * Obtain the number of subcurves composing the polycurve - * (equivalent to `pi.points() - 1`). Was replaced by number_of_subcurves() - */ - size_type size() const; - - /*! Obtain the number of subcurves that comprise the polycurve. - */ - size_type number_of_subcurves() const; - - /*! Obtain the \f$ k\f$th subcurve of the polycurve. - * \pre \f$k\f$ is not greater than or equal to \f$n-1\f$, where - * \f$n\f$ is the number of subcurves. - */ - typename SubcurveTraits_2::X_monotone_curve_2 - operator[](size_t k) const; - - /*! Obtain the bounding box of the polycurve. - */ - Bbox_2 bbox() const; - - /// @} /* End of Access functions */ - - /// \name Operations - /// @{ - - /*! Append a subcurve to the polycurve at the back. - * \a Warning: This function does not perform the precondition test - * that the `Push_back_2` functor does. Thus, it is - * recommended to use the latter. - * \param subcurve The new subcurve to be appended to the polycurve. - * \pre If the polycurve is not empty, the source of `subcurve` must - * coincide with the target point of the last subcurve in the - * polycurve. - */ - inline void push_back(const Subcurve_2& subcurve); - - /*! Append a subcurve to the polycurve at the front. - * \a Warning: This is a risky function! Don't use it! Prefer the - * corresponding functor which is provided in the traits - * class. - * \param subcurve The new subcurve to be appended to the polycurve. - * \pre If the polycurve is not empty, the target of `subcurve` must - * coincide with the source point of the first subcurve in the - * polycurve. - */ - inline void push_front(const Subcurve_2& subcurve); - - /*! \deprecated - * Add a new point to the polycurvs, which becomes the new target point - * of `pi`. - */ - void push_back(const Point_2 & p); - - /*! Reset the polycurve. - */ - void clear(); - - /// @} /* End of Operations */ - - }; /* end Arr_polycurve_traits_2::Curve_2 */ - - - /*! The `X_monotone_curve_2` class nested within the polycurve - * traits is used to represent \f$ x\f$-monotone piecewise linear subcurves. - * - * It inherits from the `Curve_2` type. `X_monotone_curve_2` can be - * constructed just like `Curve_2`. However, there is precondition - * (which is not tested) that the input defines an \f$ - * x\f$-monotone polycurve. Furthermore, in contrast to the general - * `Curve_2` type, in this case, the subcurves that an - * `X_monotone_curve_2` comprises have to be instances of the type - * `SubcurveTraits_2::X_monotone_curve_2`. Note that the \f$ - * x\f$-monotonicity ensures that an \f$ x\f$-monotone polycurve - * is not self-intersecting. (A self-intersecting polycurve is - * subdivided into several interior-disjoint \f$x\f$-monotone subcurves). - * - * The defined \f$ x\f$-monotone polycurve can be directed either from - * right-to-left (and in turn its vertices are stored in an ascending - * lexicographical \f$ xy\f$-order) or left-to-right (and in this case the - * vertices are stored in a descending lexicographical \f$ xy\f$-order). - */ - template - class X_monotone_curve_2 { - - }; /* end Arr_polycurve_traits_2::X_monotone_curve_2 */ - - /// \name Accessing Functor Objects + /// \name Creation /// @{ - /*! + /*! Default constructor that constructs an empty polycurve. */ - Construct_curve_2 construct_curve_2_object() const; + Curve_2(); - /*! + /*! Construct a polycurve from one subcurve. */ - Construct_x_monotone_curve_2 construct_x_monotone_curve_2_object() const; + Curve_2(const Subcurve_2 subcurve); - /*! + /*! Construct a polycurve defined by the given range of subcurves + * `[first, last)` (the value-type of `InputIterator` must be + * `SubcurveTraits_2::Curve_2`. In general, the subcurves might not + * be \f$x\f$-monotone, furthermore, they might not form a + * continuous polycurve. + * + * \pre The subcurves in the range should form a continuous and + * well-oriented polycurve. + * + * \deprecated For backwards compatibility, it is + * possible to call this constructor with a range whose + * value-type is `SubcurveTraits_2::Point_2`. In this case, the + * constructed polycurve will concatenate the \f$n\f$th point + * with the \f$(n+1)\f$-st point in the range (using a + * `SubcurveTraits_2::Subcurve_2`'s). This functionality is \a deprecated. + * Instead use the `Construct_curve_2` functors. */ - Number_of_points_2 number_of_points_2_object() const; + template + Curve_2(Iterator first, Iterator last); - /*! + /// @} /* End of Creation */ + + /// \name Access Functions + /// @{ + + /*! \deprecated + * Obtain the number of subcurve end-points that comprise the polycurve. + * Note that for a bounded polycurve, if there are \f$ n\f$ points in the + * polycurve, it comprises \f$ (n - 1)\f$ subcurves. + * Currently, only bounded polycurves are supported. */ - Push_back_2 push_back_2_object() const; + unsigned_int points() const; - /*! + /*! \deprecated + * Obtain an iterator pointing at the source point of the polycurve. */ - Push_front_2 push_front_2_object() const; + const_iterator begin() const; - /*! + /*! Obtain an iterator pointing at the first subcurve of the polycurve. */ - Make_x_monotone_2 make_x_monotone_2_object() const; + Subcurve_const_iterator begin_subcurves() const; - /// @} /* End Accessing Functor Objects */ + /*! \deprecated + * Obtain an iterator pointing after the end of the polycurve. + */ + const_iterator end() const; + + /*! Get an iterator pointing at the past-the-end subcurve of the polycurve. + */ + Subcurve_const_iterator end_subcurves() const; + + /*! \deprecated + * Obtain an iterator pointing at the target point of the polycurve. + */ + const_iterator rbegin() const; + + /*! Obtain an iterator pointing at the last subcurve of the polycurve. + */ + Subcurve_const_reverse_iterator rbegin_subcurves() const; + + /*! \deprecated + * Obtain an iterator pointing before the beginning of the polycurve. + */ + const_iterator rend() const; + + /*! Obtain an iterator pointing at the past-the-end subcurve of + * the polycurve in reverse order. + */ + Subcurve_const_reverse_iterator rend_subcurves() const; + + /*! \deprecated + * Obtain the number of subcurves composing the polycurve + * (equivalent to `pi.points() - 1`). Was replaced by number_of_subcurves() + */ + size_type size() const; + + /*! Obtain the number of subcurves that comprise the polycurve. + */ + size_type number_of_subcurves() const; + + /*! Obtain the \f$ k\f$th subcurve of the polycurve. + * \pre \f$k\f$ is not greater than or equal to \f$n-1\f$, where + * \f$n\f$ is the number of subcurves. + */ + typename SubcurveTraits_2::X_monotone_curve_2 + operator[](size_t k) const; + + /*! Obtain the bounding box of the polycurve. + */ + Bbox_2 bbox() const; + + /// @} /* End of Access functions */ + + /// \name Operations + /// @{ + + /*! Append a subcurve to the polycurve at the back. + * \a Warning: This function does not perform the precondition test + * that the `Push_back_2` functor does. Thus, it is + * recommended to use the latter. + * \param subcurve The new subcurve to be appended to the polycurve. + * \pre If the polycurve is not empty, the source of `subcurve` must + * coincide with the target point of the last subcurve in the + * polycurve. + */ + inline void push_back(const Subcurve_2& subcurve); + + /*! Append a subcurve to the polycurve at the front. + * \a Warning: This is a risky function! Don't use it! Prefer the + * corresponding functor which is provided in the traits + * class. + * \param subcurve The new subcurve to be appended to the polycurve. + * \pre If the polycurve is not empty, the target of `subcurve` must + * coincide with the source point of the first subcurve in the + * polycurve. + */ + inline void push_front(const Subcurve_2& subcurve); + + /*! \deprecated + * Add a new point to the polycurvs, which becomes the new target point + * of `pi`. + */ + void push_back(const Point_2 & p); + + /*! Reset the polycurve. + */ + void clear(); + + /// @} /* End of Operations */ + + }; /* end Arr_polycurve_traits_2::Curve_2 */ + + + /*! The `X_monotone_curve_2` class nested within the polycurve + * traits is used to represent \f$ x\f$-monotone piecewise linear subcurves. + * + * It inherits from the `Curve_2` type. `X_monotone_curve_2` can be + * constructed just like `Curve_2`. However, there is precondition + * (which is not tested) that the input defines an \f$ + * x\f$-monotone polycurve. Furthermore, in contrast to the general + * `Curve_2` type, in this case, the subcurves that an + * `X_monotone_curve_2` comprises have to be instances of the type + * `SubcurveTraits_2::X_monotone_curve_2`. Note that the \f$ + * x\f$-monotonicity ensures that an \f$ x\f$-monotone polycurve + * is not self-intersecting. (A self-intersecting polycurve is + * subdivided into several interior-disjoint \f$x\f$-monotone subcurves). + * + * The defined \f$ x\f$-monotone polycurve can be directed either from + * right-to-left (and in turn its vertices are stored in an ascending + * lexicographical \f$ xy\f$-order) or left-to-right (and in this case the + * vertices are stored in a descending lexicographical \f$ xy\f$-order). + */ + template + class X_monotone_curve_2 {}; + + /// \name Accessing Functor Objects + /// @{ + + /*! + */ + Construct_curve_2 construct_curve_2_object() const; + + /*! + */ + Construct_x_monotone_curve_2 construct_x_monotone_curve_2_object() const; + + /*! + */ + Number_of_points_2 number_of_points_2_object() const; + + /*! + */ + Push_back_2 push_back_2_object() const; + + /*! + */ + Push_front_2 push_front_2_object() const; + + /*! + */ + Make_x_monotone_2 make_x_monotone_2_object() const; + + /// @} /* End Accessing Functor Objects */ +}; /* end Arr_polycurve_traits_2 */ - }; /* end Arr_polycurve_traits_2 */ } /* end namespace CGAL */ diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_spherical_topology_traits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_spherical_topology_traits_2.h index aa95832414a..4502114fdcd 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_spherical_topology_traits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_spherical_topology_traits_2.h @@ -10,18 +10,18 @@ namespace CGAL { * The `Arr_spherical_topology_traits_2` template has two parameters: *
    *
  • The `GeometryTraits_2` template-parameter should be substituted by - * a model of the `ArrangementBasicTraits_2` concept. The traits + * a model of the `AosBasicTraits_2` concept. The traits * class defines the types of \f$x\f$-monotone curves and two-dimensional - * points, namely `ArrangementBasicTraits_2::X_monotone_curve_2` and - * `ArrangementBasicTraits_2::Point_2`, + * points, namely `AosBasicTraits_2::X_monotone_curve_2` and + * `AosBasicTraits_2::Point_2`, * respectively, and supports basic geometric predicates on them. *
  • The `Dcel` template-parameter should be substituted by - * a class that is a model of the `ArrangementDcel` concept. The + * a class that is a model of the `AosDcel` concept. The * value of this parameter is by default * `Arr_default_dcel`. *
* - * \cgalModels{ArrangementBasicTopologyTraits} + * \cgalModels{AosBasicTopologyTraits} * * \sa `Arr_default_dcel` * \sa `CGAL::Arr_geodesic_arc_on_sphere_traits_2` diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_triangulation_point_location.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_triangulation_point_location.h index f0799d553be..4e86b2606f6 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_triangulation_point_location.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_triangulation_point_location.h @@ -14,13 +14,12 @@ namespace CGAL { * (especially when the number of modifications applied to the arrangement is * high) and provided only for educational purposes. * - * \cgalModels{ArrangementPointLocation_2,ArrangementVerticalRayShoot_2} + * \cgalModels{AosPointLocation_2,AosVerticalRayShoot_2} * - * \sa `ArrangementPointLocation_2` - * \sa `ArrangementVerticalRayShoot_2` + * \sa `AosPointLocation_2` + * \sa `AosVerticalRayShoot_2` * \sa `CGAL::Arr_point_location_result` */ - template class Arr_triangulation_point_location : public Arrangement_::Observer {} diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_unb_planar_topology_traits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_unb_planar_topology_traits_2.h index 9a3aaf14789..9e5c81dc5d0 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_unb_planar_topology_traits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_unb_planar_topology_traits_2.h @@ -10,24 +10,24 @@ namespace CGAL { * The `Arr_unb_planar_topology_traits_2` template has two parameters: *
    *
  • The `GeometryTraits_2` template-parameter should be substituted by - * a model of the `ArrangementBasicTraits_2` concept. The traits + * a model of the `AosBasicTraits_2` concept. The traits * class defines the types of \f$x\f$-monotone curves and two-dimensional - * points, namely `ArrangementBasicTraits_2::X_monotone_curve_2` and - * `ArrangementBasicTraits_2::Point_2`, + * points, namely `AosBasicTraits_2::X_monotone_curve_2` and + * `AosBasicTraits_2::Point_2`, * respectively, and supports basic geometric predicates on them. *
  • The `Dcel` template-parameter should be substituted by - * a class that is a model of the `ArrangementDcel` concept. The + * a class that is a model of the `AosDcel` concept. The * value of this parameter is by default * `Arr_default_dcel`. *
* - * \cgalModels{ArrangementBasicTopologyTraits} + * \cgalModels{AosBasicTopologyTraits} * * \sa `Arr_default_dcel` * \sa `CGAL::Arr_geodesic_arc_on_sphere_traits_2` */ template > + typename Dcel = Arr_default_dcel> class Arr_unb_planar_topology_traits_2 { public: /// \name Types diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_vertex_index_map.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_vertex_index_map.h index e5bb1449dbf..cd9fe317b81 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_vertex_index_map.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_vertex_index_map.h @@ -1,69 +1,66 @@ namespace CGAL { - /*! \ingroup PkgArrangementOnSurface2Ref - * - * `Arr_vertex_index_map` maintains a mapping of vertex handles of an attached - * arrangement object to indices (of type `unsigned int`). This class template - * is a model of the concept `ReadablePropertyMap`. A mapping between vertex - * handles and indices enables convenient usage of property-map classes supplied - * by `boost`. For example, the property-map class templates - * `boost::vector_property_map`, which is based on `std::vector`, and - * `boost::iterator_property_map`, which can be used to implement a property map - * based on a native \CC array, require the user to supply a mapping such as - * `Arr_vertex_index_map`. - * - * As new vertices might be inserted into the attached arrangement, and - * existing vertices might be removed, the notification mechanism is used - * to dynamically maintain the mapping of vertex handles to indices. - * - * \cgalModels{DefaultConstructible,CopyConstructible,Assignable,ReadablePropertyMap} - * - * \sa `Arr_face_index_map` +/*! \ingroup PkgArrangementOnSurface2Ref + * + * `Arr_vertex_index_map` maintains a mapping of vertex handles of an attached + * arrangement object to indices (of type `unsigned int`). This class template + * is a model of the concept `ReadablePropertyMap`. A mapping between vertex + * handles and indices enables convenient usage of property-map classes supplied + * by `boost`. For example, the property-map class templates + * `boost::vector_property_map`, which is based on `std::vector`, and + * `boost::iterator_property_map`, which can be used to implement a property map + * based on a native \CC array, require the user to supply a mapping such as + * `Arr_vertex_index_map`. + * + * As new vertices might be inserted into the attached arrangement, and + * existing vertices might be removed, the notification mechanism is used + * to dynamically maintain the mapping of vertex handles to indices. + * + * \cgalModels{DefaultConstructible,CopyConstructible,Assignable,ReadablePropertyMap} + * + * \sa `Arr_face_index_map` + */ +template +class Arr_vertex_index_map: public Arrangement_::Observer { +public: + /// \name Types + /// @{ + + /*! the type of the attached arrangement. */ + typedef Arrangement_ Arrangement_2; + typedef typename Arrangement_2::Base_aos Base_aos; - template< typename Arrangement_> - class Arr_vertex_index_map: public Arrangement_::Observer { - public: + typedef boost::readable_property_map_tag category; - /// \name Types - /// @{ + typedef unsigned int value_type; - /*! the type of the attached arrangement. - */ - typedef Arrangement_ Arrangement_2; - typedef typename Arrangement_2::Base_aos Base_aos; + typedef unsigned int reference; - typedef boost::readable_property_map_tag category; + typedef Vertex_handle key_type; - typedef unsigned int value_type; + /*! The vertex handle type. + */ + typedef typename Base_aos::Vertex_handle Vertex_handle; - typedef unsigned int reference; + /*! The type of mapping of vertices to indices. + */ + typedef Unique_hash_map Index_map; - typedef Vertex_handle key_type; + /// @} - /*! The vertex handle type. - */ - typedef typename Base_aos::Vertex_handle Vertex_handle; + /// \name Creation + /// @{ - /*! The type of mapping of vertices to indices. - */ - typedef Unique_hash_map Index_map; + /*! constructs a map that is unattached to any arrangement instance. + */ + Arr_vertex_index_map(); - /// @} + /*! constructs a map and attaches it to the given arrangement `arr`. + */ + Arr_vertex_index_map(Base_aos& arr); - /// \name Creation - /// @{ - - /*! constructs a map that is unattached to any arrangement instance. - */ - Arr_vertex_index_map(); - - /*! constructs a map and attaches it to the given arrangement `arr`. - */ - Arr_vertex_index_map(Base_aos& arr); - - /// @} - - }; /* end Arr_accessor */ + /// @} +}; /* end Arr_accessor */ } /* end namespace CGAL */ diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arrangement_on_surface_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arrangement_on_surface_2.h index d4c30698e16..47700f52e33 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arrangement_on_surface_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arrangement_on_surface_2.h @@ -18,21 +18,21 @@ namespace CGAL { *
    *
  • The `GeometryTraits` template-parameter should be substituted by * a model of a geometry traits. The minimal requirements are defined by the - * `ArrangementBasicTraits_2` concept. A model of this concept defines + * `AosBasicTraits_2` concept. A model of this concept defines * the types of \f$ x\f$-monotone curves and two-dimensional points, namely - * `ArrangementBasicTraits_2::X_monotone_curve_2` and - * `ArrangementBasicTraits_2::Point_2`, respectively, and supports basic + * `AosBasicTraits_2::X_monotone_curve_2` and + * `AosBasicTraits_2::Point_2`, respectively, and supports basic * geometric predicates on them. *
  • The `TopologyTraits` template-parameter should be substituted by a - * class that is a model of the `ArrangementTopologyTraits` concept. + * class that is a model of the `AosTopologyTraits` concept. *
* * The available traits classes and Dcel classes are * described below. - * \sa `ArrangementDcel` + * \sa `AosDcel` * \sa `Arr_default_dcel` - * \sa `ArrangementBasicTraits_2` + * \sa `AosBasicTraits_2` * \sa `CGAL::overlay()` * Insertion Functions @@ -1024,14 +1024,14 @@ namespace CGAL { * *
    *
  • If the curve is \f$ x\f$-monotone curve then The instantiated - * `Traits` class must model the `ArrangementXMonotoneTraits_2` + * `Traits` class must model the `AosXMonotoneTraits_2` * concept. In case that the curve is not \f$ x\f$-monotone then the * instantiated `Traits` class must model the - * `ArrangementTraits_2` concept. That is, it should define the + * `AosTraits_2` concept. That is, it should define the * `Curve_2` type, and support its subdivision into \f$ x\f$-monotone * subcurves (and perhaps isolated points). *
  • The point-location object `pl`, must model the - * `ArrangementPointLocation_2` concept. + * `AosPointLocation_2` concept. *
*/ @@ -1112,13 +1112,13 @@ void insert(Arrangement_on_surface_2& arr, * *
    *
  • If `c` is \f$ x\f$-monotone then the instantiated `GeometryTraits` - * class must model the `ArrangementXMonotoneTraits_2` concept. If + * class must model the `AosXMonotoneTraits_2` concept. If * `c` is a curve then the instantiated `GeometryTraits` class must - * model the `ArrangementTraits_2` concept. That is, it should + * model the `AosTraits_2` concept. That is, it should * define the `Curve_2` type, and support its subdivision into * \f$ x\f$-monotone subcurves (and perhaps isolated points). *
  • The point-location object `pl`, must model the - * `ArrangementPointLocation_2` concept. + * `AosPointLocation_2` concept. *
*/ template & arr, * *
    *
  • The instantiated `Traits` class must model the restricted - * `ArrangementBasicTraits_2` concept, as no intersections are computed. + * `AosBasicTraits_2` concept, as no intersections are computed. *
  • The point-location object `pl` must model the - * `ArrangementPointLocation_2` concept. + * `AosPointLocation_2` concept. *
*/ template *
  • The instantiated `Traits` class must model the - * `ArrangementBasicTraits_2` concept, as no intersections are computed. + * `AosBasicTraits_2` concept, as no intersections are computed. *
  • `InputIterator::value_type` must be `Traits::X_monotone_curve_2` * */ @@ -1209,12 +1209,12 @@ void insert_non_intersecting_curves * *
      *
    • The instantiated `Traits` class must model the - * `ArrangementXMonotoneTraits_2` concept. Not all expressions listed + * `AosXMonotoneTraits_2` concept. Not all expressions listed * by this concept are required. In fact the traits class must model the - * `ArrangementBasicTraits_2` concept, and support the splitting + * `AosBasicTraits_2` concept, and support the splitting * functionality. *
    • The point-location object `pl`, must model the - * `ArrangementPointLocation_2` concept. + * `AosPointLocation_2` concept. *
    */ template *
  • The instantiated traits class must model the concept - * `ArrangementXMonotoneTraits_2`. + * `AosXMonotoneTraits_2`. * */ template @@ -1287,9 +1287,9 @@ remove_edge * *
      *
    • The instantiated `Traits` class must model the - * `ArrangementXMonotoneTraits_2` concept. Not all expressions listed + * `AosXMonotoneTraits_2` concept. Not all expressions listed * by this concept are required. In fact the traits class must model the - * `ArrangementBasicTraits_2` concept and support the merging + * `AosBasicTraits_2` concept and support the merging * functionality. *
    */ @@ -1323,9 +1323,9 @@ bool remove_vertex * * \pre If provided, `pl` must be attached to the given arrangement `arr`. * \pre The instantiated `GeometryTraits` class must model the - * `ArrangementXMonotoneTraits_2` concept. + * `AosXMonotoneTraits_2` concept. * \pre The point-location object `pl`, must model the - * `ArrangementPointLocation_2` concept. + * `AosPointLocation_2` concept. * \pre Dereferencing `oi` must yield a polymorphic object of type * `std::variant`. * diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arrangement_with_history_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arrangement_with_history_2.h index a4f001847c3..35dec6e6643 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arrangement_with_history_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arrangement_with_history_2.h @@ -24,19 +24,19 @@ namespace CGAL { * The `Arrangement_with_history_2` template has two parameters: *
      *
    • The `Traits` template-parameter should be substituted by a model of - * the `ArrangementTraits_2` concept. The traits class defines the `Curve_2` + * the `AosTraits_2` concept. The traits class defines the `Curve_2` * type, which represents an input curve. It also defines the types of \f$ * x\f$-monotone curves and two-dimensional points, namely - * `ArrangementTraits_2::X_monotone_curve_2` and `ArrangementTraits_2::Point_2`, + * `AosTraits_2::X_monotone_curve_2` and `AosTraits_2::Point_2`, * respectively, and supports basic geometric predicates on them. *
    • The `Dcel` template-parameter should be substituted by a class that is - * a model of the `ArrangementDcelWithRebind` concept. The value of this + * a model of the `AosDcelWithRebind` concept. The value of this * parameter is by default `Arr_default_dcel`. *
    * - * \sa `ArrangementDcel` + * \sa `AosDcel` * \sa `Arr_default_dcel` - * \sa `ArrangementTraits_2` + * \sa `AosTraits_2` * \sa `Arrangement_2` * \sa `insertion functions` * \sa `removal functions` @@ -161,7 +161,6 @@ template Size remove_curve(Arrangement_with_history_2& arr, typename Arrangement_with_history_2::Curve_handle ch); - /*! \addtogroup PkgArrangementOnSurface2Overlay * Computes the overlay of two arrangements with history `arr1` and `arr2`, and * sets the output arrangement with history `res` to represent the overlaid @@ -177,7 +176,6 @@ void overlay(const Arrangement_with_history_2& arr1, Arrangement_with_history_2& res, OverlayTraits& ovl_tr); - /*! \addtogroup PkgArrangementOnSurface2Overlay * * Computes the (simple) overlay of two arrangements with history `arr1` and diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/draw_arrangement_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/draw_arrangement_2.h index cf7782447aa..fe702f38e4e 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/draw_arrangement_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/draw_arrangement_2.h @@ -25,51 +25,63 @@ namespace CGAL { /*! \ingroup PkgArrangementOnSurface2Draw - opens a new window and draws `arr`, an instance of the `CGAL::Arrangement_2` class template. Parameters of the drawing are taken from the optional graphics scene options parameter. - -A call to this function blocks the execution of the program until the drawing window is closed. This function requires `CGAL_Qt6`, and is only available if the macro `CGAL_USE_BASIC_VIEWER` is defined. -Linking with the cmake target `CGAL::CGAL_Basic_viewer` will link with `CGAL_Qt6` and add the definition `CGAL_USE_BASIC_VIEWER`. - - -\tparam GeometryTraits_2 a geometry traits type, a model of a 2D arrangement traits concept. At this point it must be an instance of either `CGAL::Arr_segment_traits_2` or `CGAL::Arr_conic_traits_2`. -\tparam Dcel the \dcel type, a model of the `ArrangementDcel` concept. -\tparam GSOptions a model of `GraphicsSceneOptions` concept. - -\param arr the 2D arrangement to draw. -\param gso the graphics scene options parameter. - -\sa `ArrangementDcel` -\sa `ArrangementTraits_2` -*/ + * The function opens a new window and draws `arr`, an instance of the + * `CGAL::Arrangement_2` class template. Parameters of the drawing are taken + * from the optional graphics scene options parameter. + * + * A call to this function blocks the execution of the program until the drawing + * window is closed. This function requires `CGAL_Qt6`, and is only available if + * the macro `CGAL_USE_BASIC_VIEWER` is defined. Linking with the cmake target + * `CGAL::CGAL_Basic_viewer` will link with `CGAL_Qt6` and add the definition + * `CGAL_USE_BASIC_VIEWER`. + * + * \tparam GeometryTraits_2 a geometry traits type, a model of a 2D arrangement + * traits concept. At this point it must be an instance of either + * `CGAL::Arr_segment_traits_2` or `CGAL::Arr_conic_traits_2`. \tparam Dcel the + * \dcel type, a model of the `AosDcel` concept. \tparam GSOptions a model of + * `GraphicsSceneOptions` concept. + * + * \param arr the 2D arrangement to draw. + * \param gso the graphics scene options parameter. + * + * \sa `AosDcel` + * \sa `AosTraits_2` + */ template -void draw(const Arrangement_2& arr, const GSOptions& gso); +void draw(const Arrangement_2& arr, + const GSOptions& gso); /*! \ingroup PkgArrangementOnSurface2Draw - - A shortcut to `CGAL::draw(arr, Graphics_scene_options{})`. -*/ + * + * A shortcut to `CGAL::draw(arr, Graphics_scene_options{})`. + */ template void draw(const Arrangement_2& arr); /*! \ingroup PkgArrangementOnSurface2Draw - -adds the vertices, edges and faces of `arr` into the given graphic scene `gs`. Parameters of the cells are taken from the optional graphics scene options parameter `gso`. Note that `gs` is not cleared before being filled (to enable to draw several data structures in the same basic viewer). - -\tparam GeometryTraits_2 a geometry traits type, a model of a 2D arrangement traits concept. At this point it must be an instance of either `CGAL::Arr_segment_traits_2` or `CGAL::Arr_conic_traits_2`. -\tparam Dcel the \dcel type, a model of the `ArrangementDcel` concept. -\tparam GSOptions a model of `GraphicsSceneOptions` concept. - -\param arr the 2D arrangement to draw. -\param gs the graphic scene to fill. -\param gso the graphics scene options parameter. + * + * adds the vertices, edges and faces of `arr` into the given graphic scene + * `gs`. Parameters of the cells are taken from the optional graphics scene + * options parameter `gso`. Note that `gs` is not cleared before being filled + * (to enable to draw several data structures in the same basic viewer). + * + * \tparam GeometryTraits_2 a geometry traits type, a model of a 2D arrangement + * traits concept. At this point it must be an instance of either + * `CGAL::Arr_segment_traits_2` or `CGAL::Arr_conic_traits_2`. \tparam Dcel the + * \dcel type, a model of the `AosDcel` concept. \tparam GSOptions a model of + * `GraphicsSceneOptions` concept. + * + * \param arr the 2D arrangement to draw. + * \param gs the graphic scene to fill. + * \param gso the graphics scene options parameter. */ template void add_to_graphics_scene(const Arrangement_2& arr, CGAL::Graphics_scene& gs, const GSOptions& gso); /*! \ingroup PkgArrangementOnSurface2Draw - - A shortcut to `CGAL::add_to_graphics_scene(arr, gs, Graphics_scene_options{})`. + * A shortcut to `CGAL::add_to_graphics_scene(arr, gs, + * Graphics_scene_options{})`. */ template void add_to_graphics_scene(const Arrangement_2& arr, diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementApproximateTraits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosApproximateTraits_2.h similarity index 100% rename from Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementApproximateTraits_2.h rename to Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosApproximateTraits_2.h diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementBasicTopologyTraits.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosBasicTopologyTraits.h similarity index 100% rename from Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementBasicTopologyTraits.h rename to Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosBasicTopologyTraits.h diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementBasicTraits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosBasicTraits_2.h similarity index 100% rename from Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementBasicTraits_2.h rename to Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosBasicTraits_2.h diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementBottomSideTraits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosBottomSideTraits_2.h similarity index 100% rename from Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementBottomSideTraits_2.h rename to Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosBottomSideTraits_2.h diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementClosedBottomTraits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosClosedBottomTraits_2.h similarity index 100% rename from Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementClosedBottomTraits_2.h rename to Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosClosedBottomTraits_2.h diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementClosedLeftTraits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosClosedLeftTraits_2.h similarity index 100% rename from Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementClosedLeftTraits_2.h rename to Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosClosedLeftTraits_2.h diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementClosedRightTraits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosClosedRightTraits_2.h similarity index 100% rename from Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementClosedRightTraits_2.h rename to Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosClosedRightTraits_2.h diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementClosedTopTraits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosClosedTopTraits_2.h similarity index 100% rename from Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementClosedTopTraits_2.h rename to Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosClosedTopTraits_2.h diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementConstructCurveTraits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosConstructCurveTraits_2.h similarity index 100% rename from Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementConstructCurveTraits_2.h rename to Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosConstructCurveTraits_2.h diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementConstructXMonotoneCurveTraits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosConstructXMonotoneCurveTraits_2.h similarity index 100% rename from Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementConstructXMonotoneCurveTraits_2.h rename to Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosConstructXMonotoneCurveTraits_2.h diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementContractedBottomTraits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosContractedBottomTraits_2.h similarity index 100% rename from Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementContractedBottomTraits_2.h rename to Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosContractedBottomTraits_2.h diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementContractedLeftTraits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosContractedLeftTraits_2.h similarity index 100% rename from Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementContractedLeftTraits_2.h rename to Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosContractedLeftTraits_2.h diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementContractedRightTraits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosContractedRightTraits_2.h similarity index 100% rename from Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementContractedRightTraits_2.h rename to Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosContractedRightTraits_2.h diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementContractedTopTraits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosContractedTopTraits_2.h similarity index 100% rename from Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementContractedTopTraits_2.h rename to Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosContractedTopTraits_2.h diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosDcel.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosDcel.h new file mode 100644 index 00000000000..a7862475027 --- /dev/null +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosDcel.h @@ -0,0 +1,232 @@ +/*! \ingroup PkgArrangementOnSurface2ConceptsDCEL + * \cgalConcept + * + * A doubly-connected edge-list (\dcel for short) data-structure. It consists of + * three containers of records: vertices \f$ V\f$, halfedges \f$ E\f$, and faces + * \f$ F\f$. It maintains the incidence relation among them. The halfedges are + * ordered in pairs sometimes referred to as twins, such that each halfedge pair + * represent an edge. + * + * A model of the `AosDcel` concept must provide the following types and + * operations. (In addition to the requirements here, the local types + * `Vertex`,`Halfedge`, `Face`, `Outer_ccb`, `Inner_ccb`, and `Isolated_vertex` + * must be models of the concepts `AosDcelVertex`, + * `AosDcelHalfedge`, `AosDcelFace`, `AosDcelOuterCcb`, + * `AosDcelInnerCcb`, and `AosDcelIsolatedVertex` respectively.) + * + * \cgalHasModelsBegin + * \cgalHasModels{CGAL::Arr_dcel_base} + * \cgalHasModels{CGAL::Arr_default_dcel} + * \cgalHasModels{CGAL::Arr_face_extended_dcel} + * \cgalHasModels{CGAL::Arr_extended_dcel} + * \cgalHasModelsEnd + * + * \sa `AosDcelVertex` + * \sa `AosDcelHalfedge` + * \sa `AosDcelFace` + * \sa `AosDcelOuterCcb` + * \sa `AosDcelInnerCcb` + * \sa `AosDcelIsolatedVertex` + */ + +class AosDcel { +public: + /// \name Types + /// @{ + + //! the vertex type. + typedef unspecified_type Vertex; + + //! the halfedge type. + typedef unspecified_type Halfedge; + + //! the face type. + typedef unspecified_type Face; + + //! the Outer CCB type. + typedef unspecified_type Outer_ccb; + + //! the Inner CCB type. + typedef unspecified_type Inner_ccb; + + //! the hole (i.e., Inner_ccb) type. + typedef unspecified_type Hole; + + //! the isolated vertex type. + typedef unspecified_type Isolated_vertex; + + //! used to represent size values (e.g., `size_t`). + typedef unspecified_type Size; + + //! a bidirectional iterator over the vertices. Its value-type is `Vertex`. + typedef unspecified_type Vertex_iterator; + + //! a bidirectional iterator over the vertices. Its value-type is `Vertex`. + typedef unspecified_type Vertex_const_iterator; + + //! a bidirectional iterator over the halfedges. Its value-type is `Halfedge`. + typedef unspecified_type Halfedge_iterator; + + //! a bidirectional iterator over the halfedges. Its value-type is `Halfedge`. + typedef unspecified_type Halfedge_const_iterator; + + //! a bidirectional iterator over the faces. Its value-type is `Face`. + typedef unspecified_type Face_iterator; + + //! a bidirectional iterator over the faces. Its value-type is `Face`. + typedef unspecified_type Face_const_iterator; + + /// @} + + /// \name Creation + /// @{ + + /*! constructs an empty \dcel with one unbounded face. + */ + Arr_dcel(); + + /*! assigns the contents of the `other` \dcel whose unbounded face is given by + * `uf`, to `dcel`. The function returns a pointer to the unbounded face of + * `dcel` after the assignment. + */ + Face* assign(const Self& other, const Face *uf); + + /// @} + + /// \name Access Functions + /// @{ + + /*! obtains the number of vertices. */ + Size size_of_vertices() const; + + /*! obtains the number of halfedges (always even). */ + Size size_of_halfedges() const; + + /*! obtains the number of faces. */ + Size size_of_faces() const; + + /*! obtains the number of outer CCBs. */ + Size size_of_outer_ccbs() const; + + /*! obtains the number of inner CCBs. */ + Size size_of_inner_ccbs() const; + + /*! obtains the number of holes (i.e., inner CCBs). */ + Size size_of_holes() const; + + /*! obtains the number of isolated vertices. */ + Size size_of_isolated_vertices() const; + + /*! obtains a begin-iterator of the vertices in `dcel`. */ + Vertex_iterator vertices_begin(); + + /*! obtains a past-the-end iterator of the vertices in `dcel`. */ + Vertex_iterator vertices_end(); + + /*! obtains a range over handles of the vertices in `dcel`. */ + unspecified_type vertex_handles(); + + /*! obtains a begin-iterator of the vertices in `dcel`. */ + Vertex_const_iterator vertices_begin() const; + + /*! obtains a past-the-end iterator of the vertices in `dcel`. */ + Vertex_const_iterator vertices_end() const; + + /*! obtains a const range (model of `ConstRange`) over handles of the vertices + * in `dcel`. + */ + unspecified_type vertex_handles() const; + + /*! obtains a begin-iterator of the halfedges in `dcel`. */ + Halfedge_iterator halfedges_begin(); + + /*! obtains a past-the-end iterator of the halfedges in `dcel`. */ + Halfedge_iterator halfedges_end(); + + /*! obtains a range over handles of the halfedges in `dcel`. */ + unspecified_type halfedge_handles(); + + /*! obtains a begin-iterator of the halfedges in `dcel`. */ + Halfedge_const_iterator halfedges_begin() const; + + /*! obtains a past-the-end iterator of the halfedges in `dcel`. */ + Halfedge_const_iterator halfedges_end() const; + + /*! obtains a const range (model of `ConstRange`) over handles of the halfedges + * in `dcel`. + */ + unspecified_type halfedge_handles() const; + + /*! obtains a begin-iterator of the faces in `dcel`. */ + Face_iterator faces_begin(); + + /*! obtains a past-the-end iterator of the faces in `dcel`. */ + Face_iterator faces_end(); + + /*! obtains a range over handles of the faces in `dcel`. */ + unspecified_type face_handles(); + + /*! obtains a begin-iterator of the faces in `dcel`. */ + Face_const_iterator faces_begin() const; + + /*! obtains a past-the-end iterator of the faces in `dcel`. */ + Face_const_iterator faces_end() const; + + /*! obtains a const range (model of `ConstRange`) over handles of the faces in + * `dcel`. + */ + unspecified_type face_handles() const; + + /// @} + + /// \name Modifiers + /// The following operations allocate a new element of the respective + /// type. Halfedges are always allocated in pairs of opposite + /// halfedges. The halfedges and their opposite pointers are + /// automatically set. + /// @{ + + /*! creates a new vertex. */ + Vertex* new_vertex(); + + /*! creates a new pair of twin halfedges. */ + Halfedge* new_edge(); + + /*! creates a new face. */ + Face* new_face(); + + /*! creates a new outer CCB record. */ + Hole* new_outer_ccb(); + + /*! creates a new inner CCB record. */ + Hole* new_inner_ccb(); + + /*! creates a new hole (i.e., inner CCB) record. */ + Hole* new_hole(); + + /*! creates a new isolated vertex record. */ + Isolated_vertex* new_isolated_vertex(); + + /*! deletes a given vertex `v`. */ + void delete_vertex(Vertex* v); + + /*! deletes a given halfedge `e` as well as its twin. */ + void delete_edge(Halfedge* e); + + /*! deletes a given face `f`. */ + void delete_face(Face* f); + + /*! deletes a given outer CCB `oc`. */ + void delete_outer_ccb(Outer_ccb* oc); + + /*! deletes a given inner CCB `ic`. */ + void delete_inner_ccb(Inner_ccb* oc); + + /*! deletes a given hole (i.e., inner CCB) `ho`. */ + void delete_hole(Hole* ho); + + /*! deletes a given isolated vertex `iv`. */ + void delete_isolated_vertex(Isolated_vertex* iv); + + /// @} +}; /* end AosDcel */ diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementDcelFace.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosDcelFace.h similarity index 100% rename from Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementDcelFace.h rename to Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosDcelFace.h diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosDcelHalfedge.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosDcelHalfedge.h new file mode 100644 index 00000000000..bd1cadb977a --- /dev/null +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosDcelHalfedge.h @@ -0,0 +1,157 @@ +/*! \ingroup PkgArrangementOnSurface2ConceptsDCEL + * \cgalConcept + * + * A halfedge record in a \dcel data structure. Two halfedges with opposite + * directions always form an edge (a halfedge pair). The halfedges form together + * chains, defining the boundaries of connected components, such that all + * halfedges along a chain have the same incident face. Note that the chain the + * halfedge belongs to may form the outer boundary of a bounded face (an outer + * CCB) or the boundary of a hole inside a face (an inner CCB). + * + * An edge is always associated with a curve, but the halfedge records only + * store a pointer to the associated curve, and the actual curve objects are + * stored elsewhere. Two opposite halfedges are always associated with the same + * curve. + * + * \sa `AosDcel` + * \sa `AosDcelVertex` + * \sa `AosDcelFace` + * \sa `AosDcelOuterCcb` + * \sa `AosDcelInnerCcb` + */ + +class AosDcelHalfedge { +public: + /// \name Types + /// @{ + + //! the corresponding \dcel vertex type. + typedef unspecified_type Vertex; + + //! the corresponding \dcel face type. + typedef unspecified_type Face; + + //! the corresponding \dcel hole type. + typedef unspecified_type Hole; + + //! the curve type associated with the edge. + typedef unspecified_type X_monotone_curve; + + /// @} + + /// \name Creation + /// @{ + + /*! default constructor. + */ + Arr_dcel_halfedge(); + + /*! assigns `e` with the contents of the `other` halfedge. + */ + void assign(const Self& other); + + /// @} + + /// \name Access Functions + /// @{ + + /*! returns `ARR_LEFT_TO_RIGHT` if `e`'s source vertex is + * lexicographically smaller than it target, and + * `ARR_RIGHT_TO_LEFT` if it is lexicographically larger than the target. + */ + Arr_halfedge_direction direction() const; + + /*! determines whether the `e` lies on an outer CCB of a bounded face, + * or on an inner CCB (a hole inside a face). The function returns `true` + * if `e` lies on a hole. + */ + bool is_on_hole() const; + + /// @} + + /// \name + /// All functions below also have `const` counterparts, returning non-mutable + /// pointers or references: + /// @{ + + /*! returns the twin halfedge. + */ + Halfedge* opposite(); + + /*! returns the previous halfedge along the chain. + */ + Halfedge* prev(); + + /*! returns the next halfedge along the chain. + */ + Halfedge* next(); + + /*! returns the target vertex. + */ + Vertex* vertex(); + + /*! returns the incident face. + * + * \pre `e` lies on the outer boundary of this face. + */ + Face* face(); + + /*! returns the hole (inner CCB) `e` belongs to. + * + * \pre `e` lies on a hole inside its incident face. + */ + Hole* hole(); + + /*! returns whether the vertex is not associated with a valid curve. + */ + bool has_null_curve() const; + + /*! returns the associated curve. + * \pre `e` is associated with a valid curve. + */ + X_monotone_curve& curve(); + + /// @} + + /// \name Modifiers + /// @{ + + /*! sets the opposite halfedge. + */ + void set_opposite(Halfedge* opp); + + /*! sets the lexicographical order between `e`'s source and target + * vertices to be `dir`. The direction of the opposite halfedge is also set + * to the opposite direction. + */ + void set_direction(Arr_halfedge_direction dir); + + /*! sets the previous halfedge of `e` along the chain, + * and updates the cross-pointer `prev->next()`. + */ + void set_prev(Halfedge* prev); + + /*! sets the next halfedge of `e` along the chain, + * and updates the cross-pointer `next->prev()`. + */ + void set_next(Halfedge* next); + + /*! sets the target vertex. + */ + void set_vertex(Vertex* v); + + /*! sets the incident face, marking that `e` lies on the outer CCB + * of the face `f`. + */ + void set_face(Face* f); + + /*! sets the incident hole, marking that `e` lies on an inner CCB. + */ + void set_hole(Hole* ho); + + /*! sets the associated curve of `e` and its opposite halfedge. + */ + void set_curve(X_monotone_curve* c); + + /// @} +}; /* end AosDcelHalfedge */ diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementDcelInnerCcb.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosDcelInnerCcb.h similarity index 100% rename from Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementDcelInnerCcb.h rename to Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosDcelInnerCcb.h diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementDcelIsolatedVertex.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosDcelIsolatedVertex.h similarity index 100% rename from Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementDcelIsolatedVertex.h rename to Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosDcelIsolatedVertex.h diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementDcelOuterCcb.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosDcelOuterCcb.h similarity index 100% rename from Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementDcelOuterCcb.h rename to Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosDcelOuterCcb.h diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementDcelVertex.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosDcelVertex.h similarity index 100% rename from Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementDcelVertex.h rename to Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosDcelVertex.h diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementDcelWithRebind.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosDcelWithRebind.h similarity index 100% rename from Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementDcelWithRebind.h rename to Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosDcelWithRebind.h diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementHorizontalSideTraits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosHorizontalSideTraits_2.h similarity index 100% rename from Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementHorizontalSideTraits_2.h rename to Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosHorizontalSideTraits_2.h diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementIdentifiedHorizontalTraits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosIdentifiedHorizontalTraits_2.h similarity index 100% rename from Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementIdentifiedHorizontalTraits_2.h rename to Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosIdentifiedHorizontalTraits_2.h diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementIdentifiedVerticalTraits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosIdentifiedVerticalTraits_2.h similarity index 100% rename from Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementIdentifiedVerticalTraits_2.h rename to Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosIdentifiedVerticalTraits_2.h diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementInputFormatter.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosInputFormatter.h similarity index 100% rename from Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementInputFormatter.h rename to Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosInputFormatter.h diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementLandmarkTraits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosLandmarkTraits_2.h similarity index 100% rename from Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementLandmarkTraits_2.h rename to Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosLandmarkTraits_2.h diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementLeftSideTraits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosLeftSideTraits_2.h similarity index 100% rename from Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementLeftSideTraits_2.h rename to Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosLeftSideTraits_2.h diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementOpenBottomTraits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosOpenBottomTraits_2.h similarity index 100% rename from Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementOpenBottomTraits_2.h rename to Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosOpenBottomTraits_2.h diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementOpenBoundaryTraits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosOpenBoundaryTraits_2.h similarity index 100% rename from Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementOpenBoundaryTraits_2.h rename to Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosOpenBoundaryTraits_2.h diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementOpenLeftTraits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosOpenLeftTraits_2.h similarity index 56% rename from Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementOpenLeftTraits_2.h rename to Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosOpenLeftTraits_2.h index f1b7d62ca68..6b547ddf6ff 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementOpenLeftTraits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosOpenLeftTraits_2.h @@ -1,24 +1,23 @@ -/*! - * \ingroup PkgArrangementOnSurface2ConceptsTraits +/*! \ingroup PkgArrangementOnSurface2ConceptsTraits * \cgalConcept * - * A model of the concept `ArrangementOpenLeftTraits_2` must be used when the + * A model of the concept `AosOpenLeftTraits_2` must be used when the * parameter space of the surface, the arrangement is embedded on, is open on * the left side and curves inserted into the arrangement are expected to reach * this boundary side. A model of this concept can handle curves that reach the * left boundary side when it is open. * - * \cgalRefines{ArrangementLeftSideTraits_2} + * \cgalRefines{AosLeftSideTraits_2} * - * \sa `ArrangementOpenRightTraits_2`, - * `ArrangementOpenBottomTraits_2`, - * `ArrangementOpenTopTraits_2`, - * `ArrangementClosedLeftTraits_2`, - * `ArrangementContractedLeftTraits_2`, and - * `ArrangementIdentifiedVerticalTraits_2` + * \sa `AosOpenRightTraits_2`, + * `AosOpenBottomTraits_2`, + * `AosOpenTopTraits_2`, + * `AosClosedLeftTraits_2`, + * `AosContractedLeftTraits_2`, and + * `AosIdentifiedVerticalTraits_2` */ -class ArrangementOpenLeftTraits_2 { +class AosOpenLeftTraits_2 { public: /// \name Categories /// @{ diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementOpenRightTraits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosOpenRightTraits_2.h similarity index 55% rename from Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementOpenRightTraits_2.h rename to Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosOpenRightTraits_2.h index fa8468d49dc..31df597f562 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementOpenRightTraits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosOpenRightTraits_2.h @@ -1,24 +1,23 @@ -/*! - * \ingroup PkgArrangementOnSurface2ConceptsTraits +/*! \ingroup PkgArrangementOnSurface2ConceptsTraits * \cgalConcept * - * A model of the concept `ArrangementOpenRightTraits_2` must be used when the + * A model of the concept `AosOpenRightTraits_2` must be used when the * parameter space of the surface, the arrangement is embedded on, is open on * the right side and curves inserted into the arrangement are expected to reach * this boundary side. A model of this concept can handle curves that reach the * right boundary side when it is open. * - * \cgalRefines{ArrangementRightSideTraits_2} + * \cgalRefines{AosRightSideTraits_2} * - * \sa `ArrangementOpenLeftTraits_2`, - * `ArrangementOpenBottomTraits_2`, - * `ArrangementOpenTopTraits_2`, - * `ArrangementClosedRightTraits_2`, - * `ArrangementContractedRightTraits_2`, and - * `ArrangementIdentifiedVerticalTraits_2` + * \sa `AosOpenLeftTraits_2`, + * `AosOpenBottomTraits_2`, + * `AosOpenTopTraits_2`, + * `AosClosedRightTraits_2`, + * `AosContractedRightTraits_2`, and + * `AosIdentifiedVerticalTraits_2` */ -class ArrangementOpenRightTraits_2 { +class AosOpenRightTraits_2 { public: /// \name Categories /// @{ diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementOpenTopTraits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosOpenTopTraits_2.h similarity index 55% rename from Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementOpenTopTraits_2.h rename to Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosOpenTopTraits_2.h index 455bef4d160..18ac0b9b1cd 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementOpenTopTraits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosOpenTopTraits_2.h @@ -1,24 +1,23 @@ -/*! - * \ingroup PkgArrangementOnSurface2ConceptsTraits +/*! \ingroup PkgArrangementOnSurface2ConceptsTraits * \cgalConcept * - * A model of the concept `ArrangementOpenTopTraits_2` must be used when the + * A model of the concept `AosOpenTopTraits_2` must be used when the * parameter space of the surface, the arrangement is embedded on, is open on * the top side and curves inserted into the arrangement are expected to reach * this boundary side. A model of this concept can handle curves that reach the * top boundary side when it is open. * - * \cgalRefines{ArrangementTopSideTraits_2} + * \cgalRefines{AosTopSideTraits_2} * - * \sa `ArrangementOpenLeftTraits_2`, - * `ArrangementOpenRightTraits_2`, - * `ArrangementOpenBottomTraits_2`, - * `ArrangementClosedTopTraits_2`, - * `ArrangementContractedTopTraits_2`, and - * `ArrangementIdentifiedHorizontalTraits_2` + * \sa `AosOpenLeftTraits_2`, + * `AosOpenRightTraits_2`, + * `AosOpenBottomTraits_2`, + * `AosClosedTopTraits_2`, + * `AosContractedTopTraits_2`, and + * `AosIdentifiedHorizontalTraits_2` */ -class ArrangementOpenTopTraits_2 { +class AosOpenTopTraits_2 { public: /// \name Categories /// @{ diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementOutputFormatter.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosOutputFormatter.h similarity index 100% rename from Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementOutputFormatter.h rename to Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosOutputFormatter.h diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementPointLocation_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosPointLocation_2.h similarity index 100% rename from Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementPointLocation_2.h rename to Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosPointLocation_2.h diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementRightSideTraits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosRightSideTraits_2.h similarity index 100% rename from Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementRightSideTraits_2.h rename to Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosRightSideTraits_2.h diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementSphericalBoundaryTraits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosSphericalBoundaryTraits_2.h similarity index 100% rename from Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementSphericalBoundaryTraits_2.h rename to Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosSphericalBoundaryTraits_2.h diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementTopSideTraits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTopSideTraits_2.h similarity index 100% rename from Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementTopSideTraits_2.h rename to Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTopSideTraits_2.h diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementTopologyTraits.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTopologyTraits.h similarity index 100% rename from Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementTopologyTraits.h rename to Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTopologyTraits.h diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrTraits--Approximate_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--Approximate_2.h similarity index 100% rename from Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrTraits--Approximate_2.h rename to Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--Approximate_2.h diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrTraits--AreMergeable_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--AreMergeable_2.h similarity index 100% rename from Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrTraits--AreMergeable_2.h rename to Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--AreMergeable_2.h diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrTraits--CompareXNearBoundary_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--CompareXNearBoundary_2.h similarity index 100% rename from Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrTraits--CompareXNearBoundary_2.h rename to Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--CompareXNearBoundary_2.h diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrTraits--CompareXOnBoundaryOfCurveEnd_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--CompareXOnBoundaryOfCurveEnd_2.h similarity index 100% rename from Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrTraits--CompareXOnBoundaryOfCurveEnd_2.h rename to Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--CompareXOnBoundaryOfCurveEnd_2.h diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrTraits--CompareXOnBoundary_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--CompareXOnBoundary_2.h similarity index 100% rename from Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrTraits--CompareXOnBoundary_2.h rename to Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--CompareXOnBoundary_2.h diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrTraits--CompareX_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--CompareX_2.h similarity index 100% rename from Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrTraits--CompareX_2.h rename to Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--CompareX_2.h diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrTraits--CompareXy_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--CompareXy_2.h similarity index 100% rename from Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrTraits--CompareXy_2.h rename to Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--CompareXy_2.h diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrTraits--CompareYAtXLeft_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--CompareYAtXLeft_2.h similarity index 100% rename from Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrTraits--CompareYAtXLeft_2.h rename to Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--CompareYAtXLeft_2.h diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrTraits--CompareYAtXRight_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--CompareYAtXRight_2.h similarity index 100% rename from Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrTraits--CompareYAtXRight_2.h rename to Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--CompareYAtXRight_2.h diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrTraits--CompareYAtX_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--CompareYAtX_2.h similarity index 100% rename from Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrTraits--CompareYAtX_2.h rename to Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--CompareYAtX_2.h diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrTraits--CompareYNearBoundary_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--CompareYNearBoundary_2.h similarity index 100% rename from Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrTraits--CompareYNearBoundary_2.h rename to Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--CompareYNearBoundary_2.h diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrTraits--CompareYOnBoundary_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--CompareYOnBoundary_2.h similarity index 100% rename from Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrTraits--CompareYOnBoundary_2.h rename to Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--CompareYOnBoundary_2.h diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrTraits--ConstructCurve_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--ConstructCurve_2.h similarity index 100% rename from Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrTraits--ConstructCurve_2.h rename to Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--ConstructCurve_2.h diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrTraits--ConstructMaxVertex_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--ConstructMaxVertex_2.h similarity index 100% rename from Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrTraits--ConstructMaxVertex_2.h rename to Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--ConstructMaxVertex_2.h diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrTraits--ConstructMinVertex_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--ConstructMinVertex_2.h similarity index 100% rename from Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrTraits--ConstructMinVertex_2.h rename to Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--ConstructMinVertex_2.h diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrTraits--ConstructXMonotoneCurve_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--ConstructXMonotoneCurve_2.h similarity index 100% rename from Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrTraits--ConstructXMonotoneCurve_2.h rename to Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--ConstructXMonotoneCurve_2.h diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrTraits--Curve_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--Curve_2.h similarity index 100% rename from Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrTraits--Curve_2.h rename to Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--Curve_2.h diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrTraits--Equal_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--Equal_2.h similarity index 100% rename from Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrTraits--Equal_2.h rename to Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--Equal_2.h diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrTraits--Intersect_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--Intersect_2.h similarity index 100% rename from Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrTraits--Intersect_2.h rename to Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--Intersect_2.h diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrTraits--IsOnXIdentification_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--IsOnXIdentification_2.h similarity index 100% rename from Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrTraits--IsOnXIdentification_2.h rename to Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--IsOnXIdentification_2.h diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrTraits--IsOnYIdentification_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--IsOnYIdentification_2.h similarity index 100% rename from Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrTraits--IsOnYIdentification_2.h rename to Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--IsOnYIdentification_2.h diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrTraits--IsVertical_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--IsVertical_2.h similarity index 100% rename from Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrTraits--IsVertical_2.h rename to Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--IsVertical_2.h diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrTraits--MakeXMonotone_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--MakeXMonotone_2.h similarity index 100% rename from Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrTraits--MakeXMonotone_2.h rename to Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--MakeXMonotone_2.h diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrTraits--Merge_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--Merge_2.h similarity index 100% rename from Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrTraits--Merge_2.h rename to Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--Merge_2.h diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrTraits--ParameterSpaceInX_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--ParameterSpaceInX_2.h similarity index 100% rename from Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrTraits--ParameterSpaceInX_2.h rename to Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--ParameterSpaceInX_2.h diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrTraits--ParameterSpaceInY_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--ParameterSpaceInY_2.h similarity index 100% rename from Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrTraits--ParameterSpaceInY_2.h rename to Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--ParameterSpaceInY_2.h diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrTraits--Point_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--Point_2.h similarity index 100% rename from Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrTraits--Point_2.h rename to Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--Point_2.h diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrTraits--Split_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--Split_2.h similarity index 100% rename from Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrTraits--Split_2.h rename to Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--Split_2.h diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrTraits--XMonotoneCurve_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--XMonotoneCurve_2.h similarity index 100% rename from Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrTraits--XMonotoneCurve_2.h rename to Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--XMonotoneCurve_2.h diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementTraits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits_2.h similarity index 100% rename from Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementTraits_2.h rename to Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits_2.h diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementVerticalRayShoot_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosVerticalRayShoot_2.h similarity index 100% rename from Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementVerticalRayShoot_2.h rename to Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosVerticalRayShoot_2.h diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementVerticalSideTraits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosVerticalSideTraits_2.h similarity index 100% rename from Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementVerticalSideTraits_2.h rename to Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosVerticalSideTraits_2.h diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementWithHistoryInputFormatter.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosWithHistoryInputFormatter.h similarity index 100% rename from Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementWithHistoryInputFormatter.h rename to Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosWithHistoryInputFormatter.h diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementWithHistoryOutputFormatter.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosWithHistoryOutputFormatter.h similarity index 100% rename from Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementWithHistoryOutputFormatter.h rename to Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosWithHistoryOutputFormatter.h diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementXMonotoneTraits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosXMonotoneTraits_2.h similarity index 100% rename from Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementXMonotoneTraits_2.h rename to Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosXMonotoneTraits_2.h diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementDcel.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementDcel.h deleted file mode 100644 index b0cb67e12e9..00000000000 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementDcel.h +++ /dev/null @@ -1,234 +0,0 @@ -/*! \ingroup PkgArrangementOnSurface2ConceptsDCEL - * \cgalConcept - * - * A doubly-connected edge-list (\dcel for short) data-structure. It consists of - * three containers of records: vertices \f$ V\f$, halfedges \f$ E\f$, and faces - * \f$ F\f$. It maintains the incidence relation among them. The halfedges are - * ordered in pairs sometimes referred to as twins, such that each halfedge pair - * represent an edge. - * - * A model of the `ArrangementDcel` concept must provide the following types and - * operations. (In addition to the requirements here, the local types - * `Vertex`,`Halfedge`, `Face`, `Outer_ccb`, `Inner_ccb`, and `Isolated_vertex` - * must be models of the concepts `ArrangementDcelVertex`, - * `ArrangementDcelHalfedge`, `ArrangementDcelFace`, `ArrangementDcelOuterCcb`, - * `ArrangementDcelInnerCcb`, and `ArrangementDcelIsolatedVertex` respectively.) - * - * \cgalHasModelsBegin - * \cgalHasModels{CGAL::Arr_dcel_base} - * \cgalHasModels{CGAL::Arr_default_dcel} - * \cgalHasModels{CGAL::Arr_face_extended_dcel} - * \cgalHasModels{CGAL::Arr_extended_dcel} - * \cgalHasModelsEnd - * - * \sa `ArrangementDcelVertex` - * \sa `ArrangementDcelHalfedge` - * \sa `ArrangementDcelFace` - * \sa `ArrangementDcelOuterCcb` - * \sa `ArrangementDcelInnerCcb` - * \sa `ArrangementDcelIsolatedVertex` - */ - -class ArrangementDcel { -public: - -/// \name Types -/// @{ - -/*! the vertex type. */ -typedef unspecified_type Vertex; - -/*! the halfedge type. */ -typedef unspecified_type Halfedge; - -/*! the face type. */ -typedef unspecified_type Face; - -/*! the Outer CCB type. */ -typedef unspecified_type Outer_ccb; - -/*! the Inner CCB type. */ -typedef unspecified_type Inner_ccb; - -/*! the hole (i.e., Inner_ccb) type. */ -typedef unspecified_type Hole; - -/*! the isolated vertex type. */ -typedef unspecified_type Isolated_vertex; - -/*! used to represent size values (e.g., `size_t`). */ -typedef unspecified_type Size; - -/*! a bidirectional iterator over the vertices. Its value-type is `Vertex`. */ -typedef unspecified_type Vertex_iterator; - -/*! a bidirectional iterator over the vertices. Its value-type is `Vertex`. */ -typedef unspecified_type Vertex_const_iterator; - -/*! a bidirectional iterator over the halfedges. Its value-type is `Halfedge`. */ -typedef unspecified_type Halfedge_iterator; - -/*! a bidirectional iterator over the halfedges. Its value-type is `Halfedge`. */ -typedef unspecified_type Halfedge_const_iterator; - -/*! a bidirectional iterator over the faces. Its value-type is `Face`. */ -typedef unspecified_type Face_iterator; - -/*! a bidirectional iterator over the faces. Its value-type is `Face`. */ -typedef unspecified_type Face_const_iterator; - -/// @} - -/// \name Creation -/// @{ - -/*! constructs an empty \dcel with one unbounded face. - */ -Arr_dcel(); - -/*! assigns the contents of the `other` \dcel whose unbounded face is given by - * `uf`, to `dcel`. The function returns a pointer to the unbounded face of - * `dcel` after the assignment. - */ -Face* assign(const Self& other, const Face *uf); - -/// @} - -/// \name Access Functions -/// @{ - -/*! obtains the number of vertices. */ -Size size_of_vertices() const; - -/*! obtains the number of halfedges (always even). */ -Size size_of_halfedges() const; - -/*! obtains the number of faces. */ -Size size_of_faces() const; - -/*! obtains the number of outer CCBs. */ -Size size_of_outer_ccbs() const; - -/*! obtains the number of inner CCBs. */ -Size size_of_inner_ccbs() const; - -/*! obtains the number of holes (i.e., inner CCBs). */ -Size size_of_holes() const; - -/*! obtains the number of isolated vertices. */ -Size size_of_isolated_vertices() const; - -/*! obtains a begin-iterator of the vertices in `dcel`. */ -Vertex_iterator vertices_begin(); - -/*! obtains a past-the-end iterator of the vertices in `dcel`. */ -Vertex_iterator vertices_end(); - -/*! obtains a range over handles of the vertices in `dcel`. */ -unspecified_type vertex_handles(); - -/*! obtains a begin-iterator of the vertices in `dcel`. */ -Vertex_const_iterator vertices_begin() const; - -/*! obtains a past-the-end iterator of the vertices in `dcel`. */ -Vertex_const_iterator vertices_end() const; - -/*! obtains a const range (model of `ConstRange`) over handles of the vertices - * in `dcel`. - */ -unspecified_type vertex_handles() const; - -/*! obtains a begin-iterator of the halfedges in `dcel`. */ -Halfedge_iterator halfedges_begin(); - -/*! obtains a past-the-end iterator of the halfedges in `dcel`. */ -Halfedge_iterator halfedges_end(); - -/*! obtains a range over handles of the halfedges in `dcel`. */ -unspecified_type halfedge_handles(); - -/*! obtains a begin-iterator of the halfedges in `dcel`. */ -Halfedge_const_iterator halfedges_begin() const; - -/*! obtains a past-the-end iterator of the halfedges in `dcel`. */ -Halfedge_const_iterator halfedges_end() const; - -/*! obtains a const range (model of `ConstRange`) over handles of the halfedges - * in `dcel`. - */ -unspecified_type halfedge_handles() const; - -/*! obtains a begin-iterator of the faces in `dcel`. */ -Face_iterator faces_begin(); - -/*! obtains a past-the-end iterator of the faces in `dcel`. */ -Face_iterator faces_end(); - -/*! obtains a range over handles of the faces in `dcel`. */ -unspecified_type face_handles(); - -/*! obtains a begin-iterator of the faces in `dcel`. */ -Face_const_iterator faces_begin() const; - -/*! obtains a past-the-end iterator of the faces in `dcel`. */ -Face_const_iterator faces_end() const; - -/*! obtains a const range (model of `ConstRange`) over handles of the faces in - * `dcel`. - */ -unspecified_type face_handles() const; - -/// @} - -/// \name Modifiers -/// The following operations allocate a new element of the respective -/// type. Halfedges are always allocated in pairs of opposite -/// halfedges. The halfedges and their opposite pointers are -/// automatically set. -/// @{ - -/*! creates a new vertex. */ -Vertex* new_vertex(); - -/*! creates a new pair of twin halfedges. */ -Halfedge* new_edge(); - -/*! creates a new face. */ -Face* new_face(); - -/*! creates a new outer CCB record. */ -Hole* new_outer_ccb(); - -/*! creates a new inner CCB record. */ -Hole* new_inner_ccb(); - -/*! creates a new hole (i.e., inner CCB) record. */ -Hole* new_hole(); - -/*! creates a new isolated vertex record. */ -Isolated_vertex* new_isolated_vertex(); - -/*! deletes a given vertex `v`. */ -void delete_vertex(Vertex* v); - -/*! deletes a given halfedge `e` as well as its twin. */ -void delete_edge(Halfedge* e); - -/*! deletes a given face `f`. */ -void delete_face(Face* f); - -/*! deletes a given outer CCB `oc`. */ -void delete_outer_ccb(Outer_ccb* oc); - -/*! deletes a given inner CCB `ic`. */ -void delete_inner_ccb(Inner_ccb* oc); - -/*! deletes a given hole (i.e., inner CCB) `ho`. */ -void delete_hole(Hole* ho); - -/*! deletes a given isolated vertex `iv`. */ -void delete_isolated_vertex(Isolated_vertex* iv); - -/// @} - -}; /* end ArrangementDcel */ diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementDcelHalfedge.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementDcelHalfedge.h deleted file mode 100644 index 3444ed51779..00000000000 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementDcelHalfedge.h +++ /dev/null @@ -1,186 +0,0 @@ -/*! \ingroup PkgArrangementOnSurface2ConceptsDCEL - * \cgalConcept - * - * A halfedge record in a \dcel data structure. Two halfedges with opposite - * directions always form an edge (a halfedge pair). The halfedges form together - * chains, defining the boundaries of connected components, such that all - * halfedges along a chain have the same incident face. Note that the chain the - * halfedge belongs to may form the outer boundary of a bounded face (an outer - * CCB) or the boundary of a hole inside a face (an inner CCB). - * - * An edge is always associated with a curve, but the halfedge records only - * store a pointer to the associated curve, and the actual curve objects are - * stored elsewhere. Two opposite halfedges are always associated with the same - * curve. - * - * \sa `ArrangementDcel` - * \sa `ArrangementDcelVertex` - * \sa `ArrangementDcelFace` - * \sa `ArrangementDcelOuterCcb` - * \sa `ArrangementDcelInnerCcb` - */ - -class ArrangementDcelHalfedge { -public: - -/// \name Types -/// @{ - -/*! -the corresponding \dcel vertex type. -*/ -typedef unspecified_type Vertex; - -/*! -the corresponding \dcel face type. -*/ -typedef unspecified_type Face; - -/*! -the corresponding \dcel hole type. -*/ -typedef unspecified_type Hole; - -/*! -the curve type associated with the edge. -*/ -typedef unspecified_type X_monotone_curve; - -/// @} - -/// \name Creation -/// @{ - -/*! -default constructor. -*/ -Arr_dcel_halfedge(); - -/*! -assigns `e` with the contents of the `other` halfedge. -*/ -void assign (const Self& other); - -/// @} - -/// \name Access Functions -/// @{ - -/*! -returns `ARR_LEFT_TO_RIGHT` if `e`'s source vertex is -lexicographically smaller than it target, and -`ARR_RIGHT_TO_LEFT` if it is lexicographically larger than -the target. -*/ -Arr_halfedge_direction direction() const; - -/*! -determines whether the `e` lies on an outer CCB of a bounded face, -or on an inner CCB (a hole inside a face). The function returns `true` -if `e` lies on a hole. -*/ -bool is_on_hole() const; - -/// @} - -/// \name -/// All functions below also have `const` counterparts, returning non-mutable pointers or references: -/// @{ - -/*! -returns the twin halfedge. -*/ -Halfedge* opposite(); - -/*! -returns the previous halfedge along the chain. -*/ -Halfedge* prev(); - -/*! -returns the next halfedge along the chain. -*/ -Halfedge* next(); - -/*! -returns the target vertex. -*/ -Vertex* vertex(); - -/*! -returns the incident face. -\pre `e` lies on the outer boundary of this face. -*/ -Face* face(); - -/*! -returns the hole (inner CCB) `e` belongs to. -\pre `e` lies on a hole inside its incident face. -*/ -Hole* hole(); - -/*! -returns whether the vertex is not associated with a valid curve. -*/ -bool has_null_curve() const; - -/*! -returns the associated curve. -\pre `e` is associated with a valid curve. -*/ -X_monotone_curve& curve(); - -/// @} - -/// \name Modifiers -/// @{ - -/*! -sets the opposite halfedge. -*/ -void set_opposite (Halfedge* opp); - -/*! -sets the lexicographical order between `e`'s source and target -vertices to be `dir`. -The direction of the opposite halfedge is also set to the -opposite direction. -*/ -void set_direction (Arr_halfedge_direction dir); - -/*! -sets the previous halfedge of `e` along the chain, -and updates the cross-pointer `prev->next()`. -*/ -void set_prev (Halfedge* prev); - -/*! -sets the next halfedge of `e` along the chain, -and updates the cross-pointer `next->prev()`. -*/ -void set_next (Halfedge* next); - -/*! -sets the target vertex. -*/ -void set_vertex (Vertex* v); - -/*! -sets the incident face, marking that `e` lies on the outer CCB -of the face `f`. -*/ -void set_face (Face* f); - -/*! -sets the incident hole, marking that `e` lies on an inner CCB. -*/ -void set_hole (Hole* ho); - -/*! -sets the associated curve of `e` and its opposite halfedge. -*/ -void set_curve (X_monotone_curve* c); - -/// @} - -}; /* end ArrangementDcelHalfedge */ From b2b34c124d6c3a97e6d17d6950879a35ba7c48b3 Mon Sep 17 00:00:00 2001 From: Efi Fogel Date: Wed, 28 Aug 2024 15:39:48 +0300 Subject: [PATCH 02/63] Replaced prefix of concept names Arrangement => Aos. Applied small fixes and generall clean ups --- .../Arrangement_on_surface_2.txt | 650 ++++---- .../CGAL/Aos_observer.h | 25 +- .../CGAL/Arr_Bezier_curve_traits_2.h | 40 +- .../CGAL/Arr_accessor.h | 15 +- .../CGAL/Arr_algebraic_segment_traits_2.h | 675 ++++---- .../CGAL/Arr_batched_point_location.h | 7 +- .../Arr_bounded_planar_topology_traits_2.h | 4 +- .../CGAL/Arr_circle_segment_traits_2.h | 62 +- .../CGAL/Arr_circular_arc_traits_2.h | 25 +- .../CGAL/Arr_circular_line_arc_traits_2.h | 32 +- .../CGAL/Arr_conic_traits_2.h | 52 +- .../Arr_consolidated_curve_data_traits_2.h | 237 ++- .../CGAL/Arr_curve_data_traits_2.h | 119 +- .../CGAL/Arr_dcel_base.h | 7 +- .../CGAL/Arr_extended_dcel.h | 376 ++--- .../CGAL/Arr_face_index_map.h | 11 +- .../Arr_geodesic_arc_on_sphere_traits_2.h | 855 ++++++----- .../CGAL/Arr_landmarks_point_location.h | 112 +- .../CGAL/Arr_linear_traits_2.h | 32 +- .../CGAL/Arr_naive_point_location.h | 42 +- .../Arr_non_caching_segment_basic_traits_2.h | 50 +- .../CGAL/Arr_non_caching_segment_traits_2.h | 80 +- .../CGAL/Arr_overlay_2.h | 135 +- .../CGAL/Arr_point_location_result.h | 7 +- .../CGAL/Arr_polycurve_traits_2.h | 50 +- .../CGAL/Arr_polyline_traits_2.h | 81 +- .../CGAL/Arr_rational_function_traits_2.h | 1363 ++++++++--------- .../CGAL/Arr_segment_traits_2.h | 56 +- .../CGAL/Arr_spherical_topology_traits_2.h | 4 +- .../Arrangement_on_surface_2/CGAL/Arr_tags.h | 30 +- .../CGAL/Arr_trapezoid_ric_point_location.h | 109 +- .../CGAL/Arr_unb_planar_topology_traits_2.h | 8 +- .../CGAL/Arr_vertex_index_map.h | 10 +- .../CGAL/Arr_walk_along_line_point_location.h | 61 +- .../CGAL/Arrangement_2.h | 65 +- .../CGAL/Arrangement_on_surface_2.h | 110 +- .../Arrangement_on_surface_with_history_2.h | 92 +- .../CGAL/Arrangement_with_history_2.h | 31 +- .../CGAL/CORE_algebraic_number_traits.h | 8 +- .../CGAL/IO/Arr_iostream.h | 147 +- .../CGAL/IO/Arr_text_formatter.h | 148 +- .../CGAL/IO/Arr_with_history_iostream.h | 75 +- .../CGAL/IO/Arr_with_history_text_formatter.h | 45 +- .../CGAL/draw_arrangement_2.h | 12 +- .../Concepts/AosApproximateTraits_2.h | 64 +- .../Concepts/AosBasicTopologyTraits.h | 16 +- .../Concepts/AosBasicTraits_2.h | 81 +- .../Concepts/AosBottomSideTraits_2.h | 16 +- .../Concepts/AosClosedBottomTraits_2.h | 24 +- .../Concepts/AosClosedLeftTraits_2.h | 32 +- .../Concepts/AosClosedRightTraits_2.h | 24 +- .../Concepts/AosClosedTopTraits_2.h | 24 +- .../Concepts/AosConstructCurveTraits_2.h | 14 +- .../AosConstructXMonotoneCurveTraits_2.h | 23 +- .../Concepts/AosContractedBottomTraits_2.h | 22 +- .../Concepts/AosContractedLeftTraits_2.h | 22 +- .../Concepts/AosContractedRightTraits_2.h | 22 +- .../Concepts/AosContractedTopTraits_2.h | 22 +- .../Concepts/AosDcel.h | 32 +- .../Concepts/AosDcelFace.h | 202 ++- .../Concepts/AosDcelInnerCcb.h | 68 +- .../Concepts/AosDcelIsolatedVertex.h | 107 +- .../Concepts/AosDcelOuterCcb.h | 103 +- .../Concepts/AosDcelVertex.h | 209 ++- .../Concepts/AosDcelWithRebind.h | 83 +- .../Concepts/AosHorizontalSideTraits_2.h | 18 +- .../AosIdentifiedHorizontalTraits_2.h | 25 +- .../Concepts/AosIdentifiedVerticalTraits_2.h | 29 +- .../Concepts/AosInputFormatter.h | 276 ++-- .../Concepts/AosLandmarkTraits_2.h | 16 +- .../Concepts/AosLeftSideTraits_2.h | 15 +- .../Concepts/AosOpenBottomTraits_2.h | 21 +- .../Concepts/AosOpenBoundaryTraits_2.h | 78 +- .../Concepts/AosOutputFormatter.h | 284 ++-- .../Concepts/AosPointLocation_2.h | 154 +- .../Concepts/AosRightSideTraits_2.h | 16 +- .../Concepts/AosSphericalBoundaryTraits_2.h | 67 +- .../Concepts/AosTopSideTraits_2.h | 16 +- .../Concepts/AosTopologyTraits.h | 7 +- .../Concepts/AosTraits--Approximate_2.h | 10 +- .../Concepts/AosTraits--AreMergeable_2.h | 12 +- .../AosTraits--CompareXNearBoundary_2.h | 30 +- ...osTraits--CompareXOnBoundaryOfCurveEnd_2.h | 92 +- .../AosTraits--CompareXOnBoundary_2.h | 18 +- .../Concepts/AosTraits--CompareX_2.h | 11 +- .../Concepts/AosTraits--CompareXy_2.h | 10 +- .../Concepts/AosTraits--CompareYAtXLeft_2.h | 16 +- .../Concepts/AosTraits--CompareYAtXRight_2.h | 18 +- .../Concepts/AosTraits--CompareYAtX_2.h | 12 +- .../AosTraits--CompareYNearBoundary_2.h | 18 +- .../AosTraits--CompareYOnBoundary_2.h | 34 +- .../Concepts/AosTraits--ConstructCurve_2.h | 15 +- .../AosTraits--ConstructMaxVertex_2.h | 10 +- .../AosTraits--ConstructMinVertex_2.h | 8 +- .../AosTraits--ConstructXMonotoneCurve_2.h | 12 +- .../Concepts/AosTraits--Curve_2.h | 9 +- .../Concepts/AosTraits--Equal_2.h | 18 +- .../Concepts/AosTraits--Intersect_2.h | 18 +- .../AosTraits--IsOnXIdentification_2.h | 12 +- .../AosTraits--IsOnYIdentification_2.h | 12 +- .../Concepts/AosTraits--IsVertical_2.h | 10 +- .../Concepts/AosTraits--MakeXMonotone_2.h | 12 +- .../Concepts/AosTraits--Merge_2.h | 16 +- .../Concepts/AosTraits--ParameterSpaceInX_2.h | 20 +- .../Concepts/AosTraits--ParameterSpaceInY_2.h | 22 +- .../Concepts/AosTraits--Point_2.h | 9 +- .../Concepts/AosTraits--Split_2.h | 16 +- .../Concepts/AosTraits--XMonotoneCurve_2.h | 10 +- .../Concepts/AosTraits_2.h | 149 +- .../Concepts/AosVerticalRayShoot_2.h | 205 ++- .../Concepts/AosVerticalSideTraits_2.h | 16 +- .../Concepts/AosWithHistoryInputFormatter.h | 114 +- .../Concepts/AosWithHistoryOutputFormatter.h | 17 +- .../Concepts/AosXMonotoneTraits_2.h | 205 ++- .../Concepts/OverlayTraits.h | 284 ++-- .../PackageDescription.txt | 157 +- .../fig_src/central_concept_cluster.tex | 6 +- .../fig_src/identified_clusters.tex | 6 +- .../fig_src/landmark_concept_cluster.tex | 8 +- .../fig_src/left_side_cluster.tex | 10 +- .../fig_src/open_concept_hierarchy.tex | 10 +- .../fig_src/side_clusters.tex | 10 +- .../fig_src/spherical_concept_hierarchy.tex | 8 +- 123 files changed, 4735 insertions(+), 5367 deletions(-) diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Arrangement_on_surface_2.txt b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Arrangement_on_surface_2.txt index 5b4b9ed9051..ff97c34c384 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Arrangement_on_surface_2.txt +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Arrangement_on_surface_2.txt @@ -284,18 +284,18 @@ classes built on top of the halfedge data structure. The \f$x\f$-monotone curves of an arrangement are embedded in a rectangular two-dimensional area called the parameter space. The -parameter space is defined as \f$ X \times Y\f$, where \f$ X\f$ and -\f$ Y\f$ are open, half-open, or closed intervals with endpoints in -the compactified real line \f$ \mathbb{R} \cup -\{-\infty,+\infty\}\f$. Let \f$x_{\rm min}\f$, \f$x_{\rm max}\f$, -\f$y_{\rm min}\f$, and \f$y_{\rm max}\f$ denote the endpoints of \f$ -X\f$ and \f$ Y\f$, respectively. We typically refer to these values as -the left, right, bottom, and top sides of the boundary of the -parameter space. If the parameter space is, for example, the entire -compactified plane, as in the case of arrangements in the plane, -\f$x_{\rm min} = y_{\rm min} = -\infty\f$ and \f$x_{\rm max} = y_{\rm -max} = +\infty\f$; see Section \ref aos_sec-curved_surfaces for more -details. +parameter space is defined as \f$X \times Y\f$, where \f$X\f$ and +\f$Y\f$ are open, half-open, or closed intervals with endpoints in the +compactified real line \f$\mathbb{R} \cup \{-\infty,+\infty\}\f$. Let +\f$x_{\rm min}\f$, \f$x_{\rm max}\f$, \f$y_{\rm min}\f$, and +\f$y_{\rm max}\f$ denote the endpoints of \f$X\f$ and \f$Y\f$, +respectively. We typically refer to these values as the left, right, +bottom, and top sides of the boundary of the parameter space. If the +parameter space is, for example, the entire compactified plane, as in +the case of arrangements in the plane, +\f$x_{\rm min} = y_{\rm min} = -\infty\f$ and +\f$x_{\rm max} = y_{\rm max} = +\infty\f$; see Section \ref +aos_sec-curved_surfaces for more details. \cgalAdvancedEnd @@ -349,20 +349,20 @@ theoretically, the former are degenerate holes. See \cgalFigureBegin{aos_fig-arr_segs,arr_segs.png} An arrangement of interior-disjoint line segments with some of the -\dcel records that represent it. The unbounded face \f$ f_0\f$ has +\dcel records that represent it. The unbounded face \f$f_0\f$ has a single connected component that forms a hole inside it, and this -hole comprises of several faces. The halfedge \f$ e\f$ is directed -from its source vertex \f$ v_1\f$ to its target vertex \f$ -v_2\f$. This edge, together with its twin \f$ e'\f$, correspond to a -line segment that connects the points associated with \f$ v_1\f$ and -\f$ v_2\f$ and separates the face \f$ f_1\f$ from \f$ f_2\f$. The -predecessor \f$ e_{\rm prev}\f$ and successor \f$ e_{\rm next}\f$ of -\f$ e\f$ are part of the chain that form the outer boundary of the -face \f$ f_2\f$. The face \f$ f_1\f$ has a more complicated structure +hole comprises of several faces. The halfedge \f$e\f$ is directed +from its source vertex \f$v_1\f$ to its target vertex \f$v_2\f$. +This edge, together with its twin \f$e'\f$, correspond to a +line segment that connects the points associated with \f$v_1\f$ and +\f$v_2\f$ and separates the face \f$f_1\f$ from \f$f_2\f$. The +predecessor \f$e_{\rm prev}\f$ and successor \f$e_{\rm next}\f$ of +\f$e\f$ are part of the chain that form the outer boundary of the +face \f$f_2\f$. The face \f$f_1\f$ has a more complicated structure as it contains two holes in its interior: One hole consists of two -adjacent faces \f$ f_3\f$ and \f$ f_4\f$, while the other hole -comprises of two edges. \f$ f_1\f$ also contains two isolated vertices -\f$ u_1\f$ and \f$ u_2\f$ in its interior. +adjacent faces \f$f_3\f$ and \f$f_4\f$, while the other hole +comprises of two edges. \f$f_1\f$ also contains two isolated vertices +\f$u_1\f$ and \f$u_2\f$ in its interior. \cgalFigureEnd @@ -391,12 +391,12 @@ the `Arrangement_2` class template; their description follows.
    • The `Traits` template-parameter should be substituted by a - model of the `ArrangementBasicTraits_2` concept and optionally + model of the `AosBasicTraits_2` concept and optionally additional geometry traits concepts. A model of the - `ArrangementBasicTraits_2` concept defines the types of + `AosBasicTraits_2` concept defines the types of \f$x\f$-monotone curves and two-dimensional points, namely - `ArrangementBasicTraits_2::X_monotone_curve_2` and - `ArrangementBasicTraits_2::Point_2`, respectively, and supports + `AosBasicTraits_2::X_monotone_curve_2` and + `AosBasicTraits_2::Point_2`, respectively, and supports basic geometric predicates on them. The instantiated traits class determines the family of planar curves that induce the arrangement. @@ -416,7 +416,7 @@ the `Arrangement_2` class template; their description follows. in Section \ref aos_sec-geom_traits.
    • The `Dcel` template-parameter should be substituted by a class - that models the `ArrangementDcel` concept, which is used to represent + that models the `AosDcel` concept, which is used to represent the topological layout of the arrangement. This parameter is substituted by `Arr_default_dcel` by default, and we use this default value in this and in the following three @@ -486,12 +486,12 @@ results. #include #include -typedef int Number_type; -typedef CGAL::Cartesian Kernel; -typedef CGAL::Arr_non_caching_segment_traits_2 Traits; -typedef Traits_2::Point_2 Point; -typedef Traits_2::X_monotone_curve_2 Segment; -typedef CGAL::Arrangement_2 Arrangement; +using Number_type = int; +using Kernel = CGAL::Cartesian; +using Traits = CGAL::Arr_non_caching_segment_traits_2; +using Point = Traits_2::Point_2; +using Segment = Traits_2::X_monotone_curve_2; +using Arrangement = CGAL::Arrangement_2; int main() { Arrangement arr; @@ -1017,17 +1017,17 @@ exact manner. #include #include -typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel; -typedef Kernel::FT Number_type; +using Kernel = CGAL::Exact_predicates_inexact_constructions_kernel; +using Number_type = Kernel::FT; -typedef CGAL::Arr_non_caching_segment_traits_2 Traits; -typedef Traits::Point_2 Point; -typedef Traits::X_monotone_curve_2 Segment; +using Traits = CGAL::Arr_non_caching_segment_traits_2; +using Point = Traits::Point_2; +using Segment = Traits::X_monotone_curve_2; -typedef CGAL::Arrangement_2 Arrangement; -typedef Arrangement::Vertex_handle Vertex_handle; -typedef Arrangement::Halfedge_handle Halfedge_handle; -typedef Arrangement::Face_handle Face_handle; +using Arrangement = CGAL::Arrangement_2; +using Vertex_handle = Arrangement::Vertex_handle; +using Halfedge_handle = Arrangement::Halfedge_handle; +using Face_handle = Arrangement::Face_handle; \endcode @@ -1039,7 +1039,7 @@ the member functions that manipulate them are easier to understand. The call \link Arrangement_on_surface_2::insert_in_face_interior() `arr.insert_in_face_interior(p, f)`\endlink inserts an isolated point -\f$p\f$, located in the interior of a given face \f$ f\f$, into the +\f$p\f$, located in the interior of a given face \f$f\f$, into the arrangement and returns a handle to the arrangement vertex associated with \f$p\f$ it has created. Naturally, this function has a precondition that \f$p\f$ is really an isolated point; namely it does @@ -1304,10 +1304,10 @@ geometric algorithms that operate on it. Thus, the `Arrangement_2` class template does not support point-location queries directly. Instead, the \ref PkgArrangementOnSurface2 package provides a set of class templates that are capable of answering such queries; all are -models of the concept `ArrangementPointLocation_2`. Each model employs +models of the concept `AosPointLocation_2`. Each model employs a different algorithm or strategy for answering queries. A model of this concept must define the \link -ArrangementPointLocation_2::locate() `locate()`\endlink member +AosPointLocation_2::locate() `locate()`\endlink member function, which accepts an input query-point and returns a polymorphic object representing the arrangement cell that contains this point. The returned object is of type @@ -1324,7 +1324,7 @@ the appropriate handle can be obtained with value retrieval by `std::get` as demonstrated in the example below. Note that the handles returned by the \link -ArrangementPointLocation_2::locate() `locate()`\endlink functions are +AosPointLocation_2::locate() `locate()`\endlink functions are non-mutable (`const`). If necessary, such handles may be cast to mutable handles using the `Arrangement_on_surface_2::non_const_handle()` methods. @@ -1337,7 +1337,7 @@ when `pl` is constructed or at a later time using the The function template `locate_point()` listed below accepts a point-location object, the type of which is a model of the -`ArrangementPointLocation_2` concept, and a query point. The function +`AosPointLocation_2` concept, and a query point. The function template issues a point-location query for the given point, and prints out the result. It is defined in the header file `point_location_utils.h`. @@ -1346,10 +1346,9 @@ out the result. It is defined in the header file \code template void locate_point(const PointLocation& pl, - const typename PointLocation::Arrangement_2::Point_2& q) -{ - typedef PointLocation Point_location; - typedef typename Point_location::Arrangement_2 Arrangement_2; + const typename PointLocation::Arrangement_2::Point_2& q) { + using Point_location = PointLocation; + using Arrangement_2 = typename Point_location::Arrangement_2; typename CGAL::Arr_point_location_result::Type obj = pl.locate(q); @@ -1371,13 +1370,12 @@ to an arrangement. template void print_point_location (const typename PointLocation::Arrangement_::Point_2& q - typename CGAL::Arr_point_location_result::Type obj) -{ - typedef Arrangement_ Arrangement_2; + typename CGAL::Arr_point_location_result::Type obj) { + using Arrangement_2 = Arrangement_; - typedef typename Arrangement_2::Vertex_const_handle Vertex_const_handle; - typedef typename Arrangement_2::Halfedge_const_handle Halfedge_const_handle; - typedef typename Arrangement_2::Face_const_handle Face_const_handle; + using Vertex_const_handle = typename Arrangement_2::Vertex_const_handle; + using Halfedge_const_handle = typename Arrangement_2::Halfedge_const_handle; + using Face_const_handle = typename Arrangement_2::Face_const_handle; const Vertex_const_handle* v; const Halfedge_const_handle* e; @@ -1440,8 +1438,8 @@ vary according to the user choice.} for answering queries: The landmark strategy requires that the type of the attached arrangement be an instance of the `Arrangement_2` class template, where the `Traits` parameter is substituted by a - geometry-traits class that models the `ArrangementLandmarkTraits_2` - concept, which refines the basic `ArrangementBasicTraits_2` concept; + geometry-traits class that models the `AosLandmarkTraits_2` + concept, which refines the basic `AosBasicTraits_2` concept; see Section \ref aos_sssec-tr_landmarks_concept for details. Most traits classes included in the \ref PkgArrangementOnSurface2 package are models of this refined concept. @@ -1558,7 +1556,7 @@ that it hits a vertex, or that the arrangement does not have any vertex or edge lying directly above (or below) the query point. All point-location classes listed in the previous section are also -models of the `ArrangementVerticalRayShoot_2` concept. That is, they +models of the `AosVerticalRayShoot_2` concept. That is, they all have member functions called `ray_shoot_up(q)` and `ray_shoot_down(q)` that accept a query point \f$q\f$. These functions output a polymorphic object of type @@ -1575,7 +1573,7 @@ directly above (or below) \f$q\f$. The function template `vertical_ray_shooting_query()` listed below accepts a vertical ray-shooting object, the type of which -models the `ArrangementVerticalRayShoot_2` concept. It exports +models the `AosVerticalRayShoot_2` concept. It exports the result of the upward vertical ray-shooting operation from a given query point to the standard output-stream. The ray-shooting object `vrs` is assumed to be already attached to an arrangement. @@ -1586,18 +1584,17 @@ The function template is defined in the header file template void shoot_vertical_ray(const RayShoot& vrs, const typename - VerticalRayShooting::Arrangement_2::Point_2& q) -{ - typedef VerticalRayShooting Vertical_ray_shooting; + VerticalRayShooting::Arrangement_2::Point_2& q) { + using Vertical_ray_shooting = VerticalRayShooting; // Perform the point-location query. typename Vertical_ray_shooting::result_type obj = vrs.ray_shoot_up(q); // Print the result. - typedef typename Vertical_ray_shooting::Arrangement_2 Arrangement_2; - typedef typename Arrangement_2::Vertex_const_handle Vertex_const_handle; - typedef typename Arrangement_2::Halfedge_const_handle Halfedge_const_handle; - typedef typename Arrangement_2::Face_const_handle Face_const_handle; + using Arrangement_2 = typename Vertical_ray_shooting::Arrangement_2; + using Vertex_const_handle = typename Arrangement_2::Vertex_const_handle; + using Halfedge_const_handle = typename Arrangement_2::Halfedge_const_handle; + using Face_const_handle = typename Arrangement_2::Face_const_handle; const Vertex_const_handle* v; const Halfedge_const_handle* e; @@ -1683,7 +1680,7 @@ namely the surface sweep and the zone construction. These operations accepts \f$x\f$-monotone curves; thus, the geometry-traits class used by the arrangements passed as input to, or obtained as output from, these operations must be a model of the -`ArrangementXMonotoneTraits_2` concept; see Section \ref +`AosXMonotoneTraits_2` concept; see Section \ref aos_sec-geom_traits for the precise definition of this concept. It defines the minimal set of geometric primitives, among other things, required to perform the algorithms of the surface-sweep and @@ -1744,13 +1741,13 @@ location.\cgalFootnote{The \cgalFootnoteCode{CGAL::insert_non_intersecting_curve function template, as all other functions reviewed in this section, is parameterized by an arrangement type and a point-location type (The latter must be substituted by a model of the -`ArrangementPointLocation_2` concept).} The insertion operation thus +`AosPointLocation_2` concept).} The insertion operation thus hardly requires any geometric operations on top of the ones needed to answer the point-location queries. Moreover, it is sufficient that the traits class that substitutes the `Traits` template parameter of the `Arrangement_2` class template when the latter is -instantiated models the concept `ArrangementBasicTraits_2` concept -(and the concept `ArrangementLandmarkTraits_2` if the landmark +instantiated models the concept `AosBasicTraits_2` concept +(and the concept `AosLandmarkTraits_2` if the landmark point-location strategy is used), and does not have to support the computation of intersection points between curves. This implies that using a kernel that provides exact geometric predicates, but @@ -1778,7 +1775,7 @@ function relatively efficient; however, its preconditions on the input curves are still rather restricting. Let us assume that the traits class that substitutes the `Traits` template parameter of the `Arrangement_2` class template models the refined -`ArrangementXMonotoneTraits_2` concept and supports curve intersection +`AosXMonotoneTraits_2` concept and supports curve intersection computations; see Section \ref aos_sec-geom_traits for the exact details. Given an \f$x\f$-monotone curve, it is sufficient to locate its left endpoint in the arrangement and to trace its zone @@ -1848,10 +1845,10 @@ pl)`\endlink, where \f$c\f$ is not necessarily \f$x\f$-monotone. In this case the type of `arr` must be an instance of the `Arrangement_2` class template, where the `Traits` template parameter is substituted by a traits class that models the -concept `ArrangementTraits_2`, which refines the -`ArrangementXMonotoneTraits_2` concept. It has to define an additional -\link ArrangementTraits_2::Curve_2 `Curve_2`\endlink type, which may -differ from the \link ArrangementBasicTraits_2::X_monotone_curve_2 +concept `AosTraits_2`, which refines the +`AosXMonotoneTraits_2` concept. It has to define an additional +\link AosTraits_2::Curve_2 `Curve_2`\endlink type, which may +differ from the \link AosBasicTraits_2::X_monotone_curve_2 `X_monotone_curve_2`\endlink type. It also has to support the subdivision of curves of this new type into \f$x\f$-monotone curves and possibly singular points; see the exact details in Section \ref @@ -1892,7 +1889,7 @@ associated with \f$p\f$. The type of `arr` must be and instance of the `Arrangement_2` class template instantiated with a traits class that models the -`ArrangementXMonotoneTraits_2` concept, as the insertion operation may +`AosXMonotoneTraits_2` concept, as the insertion operation may involve the splitting of curves. @@ -1956,7 +1953,7 @@ use the zone framework. The free function template `%CGAL::do_intersect<>(arr, c, pl)` checks whether the given query curve \f$c\f$ intersects the curves and points of an existing arrangement `arr`. If \f$c\f$ is not \f$x\f$-monotone -(that is, it is of type \link ArrangementTraits_2::Curve_2 +(that is, it is of type \link AosTraits_2::Curve_2 `Curve_2`\endlink) the curve is subdivided into \f$x\f$-monotone subcurves and isolated points. Each \f$x\f$-monotone curve (or point) is checked for intersection in turn using the zone framework. For @@ -1971,9 +1968,9 @@ user-defined point-location object, it constructs a local object of the walk point-location type, namely, an instance of the `Arr_walk_along_line_point_location` class template, and uses it to locate the endpoint. If the given curve is \f$x\f$-monotone then the -traits type must model the `ArrangementXMonotoneTraits_2` concept. If +traits type must model the `AosXMonotoneTraits_2` concept. If the curve is not \f$x\f$-monotone then the traits type must model the -`ArrangementTraits_2` concept. +`AosTraits_2` concept. The `CGAL::zone<>(arr, c, oi, pl)` function template computes the zone of a given \f$x\f$-monotone curve in a given arrangement. More @@ -1986,7 +1983,7 @@ that instead of accepting a user-defined point-location object, it constructs a local object of the walk point-location type, namely, an instance of the `Arr_walk_along_line_point_location` class template, and uses it to locate the endpoint. The traits type must model the -`ArrangementXMonotoneTraits_2` concept. +`AosXMonotoneTraits_2` concept. \subsection arr_ssec_sweep The Surface-Sweep Algorithm @@ -2080,7 +2077,7 @@ arrangement of intersecting line segments, as constructed in \ref Arrangement_on_surface_2/global_insertion.cpp. The segments of \f$\mathcal{S}_1\f$ are drawn in solid lines and the segments of \f$\mathcal{S}_2\f$ are drawn in dark dashed lines. Note that the -segment \f$ s\f$ (light dashed line) overlaps one of the segments in +segment \f$s\f$ (light dashed line) overlaps one of the segments in \f$\mathcal{S}_1\f$. \cgalFigureEnd @@ -2113,9 +2110,9 @@ below. The three levels, starting from the most restrictive, are
      Type of Curves Geometry-Traits Concept Insertion Function -
      \f$x\f$-monotone and pairwise disjoint `ArrangementBasicTraits_2` or `ArrangementLandmarkTraits_2` `CGAL::insert_non_intersecting_curve<>()` -
      \f$x\f$-monotone `ArrangementXMonotoneTraits_2` `%CGAL::insert<>()` -
      general `ArrangementTraits_2` `%CGAL::insert<>()` +
      \f$x\f$-monotone and pairwise disjoint `AosBasicTraits_2` or `AosLandmarkTraits_2` `CGAL::insert_non_intersecting_curve<>()` +
      \f$x\f$-monotone `AosXMonotoneTraits_2` `%CGAL::insert<>()` +
      general `AosTraits_2` `%CGAL::insert<>()`
      The insertion function template `%insert()` is overloaded to @@ -2141,8 +2138,8 @@ form a single curve associated with a single edge. An attempt to remove a vertex or an edge from an arrangement object `arr` using the free functions above requires that the traits class used to instantiate the arrangement type of `arr` models the concept -`ArrangementXMonotoneTraits_2`, which refines the -`ArrangementBasicTraits_2` concept; see Section \ref +`AosXMonotoneTraits_2`, which refines the +`AosBasicTraits_2` concept; see Section \ref aos_sec-geom_traits. The function template `CGAL::remove_vertex<>(arr, v)` removes the @@ -2534,7 +2531,7 @@ the file `is_in_x_range.h`, checks whether a given point \f$p\f$ is in the \f$x\f$-range of the curve associated with a given halfedge \f$e\f$. The function template also exemplifies how some of the above functions can be used. The traits functor \link -ArrangementBasicTraits_2::Compare_x_2 `Compare_x_2`\endlink used in +AosBasicTraits_2::Compare_x_2 `Compare_x_2`\endlink used in the code is described in Section \ref aos_sssec-geom_traits-concepts_basic. @@ -2680,20 +2677,20 @@ next. These types are defined in the header file `arr_linear.h`. #include #include -typedef CGAL::Exact_predicates_exact_constructions_kernel Kernel; -typedef Kernel::FT Number_type; +using Kernel = CGAL::Exact_predicates_exact_constructions_kernel; +using Number_type = Kernel::FT; -typedef CGAL::Arr_linear_traits_2 Traits; -typedef Traits::Point_2 Point; -typedef Traits::Segment_2 Segment; -typedef Traits::Ray_2 Ray; -typedef Traits::Line_2 Line; -typedef Traits::X_monotone_curve_2 X_monotone_curve; +using Traits = CGAL::Arr_linear_traits_2; +using Point = Traits::Point_2; +using Segment = Traits::Segment_2; +using Ray = Traits::Ray_2; +using Line = Traits::Line_2; +using X_monotone_curve = Traits::X_monotone_curve_2; -typedef CGAL::Arrangement_2 Arrangement; -typedef Arrangement::Vertex_handle Vertex_handle; -typedef Arrangement::Halfedge_handle Halfedge_handle; -typedef Arrangement::Face_handle Face_handle; +using Arrangement = CGAL::Arrangement_2; +using Vertex_handle = Arrangement::Vertex_handle; +using Halfedge_handle = Arrangement::Halfedge_handle; +using Face_handle = Arrangement::Face_handle; \endcode @@ -2852,7 +2849,7 @@ right sides) are identified if called an identification curve. Rectangles, strips, quadrants, half-planes, and planes can be modeled -with \f$\phi_S \f$ being the identity mapping. For example, +with \f$\phi_S\f$ being the identity mapping. For example, \f$\Phi_S(x, y) = (x, y, 0)\f$ with \f$X = Y =(-\infty, +\infty)\f$ parameterizes a plane. Surfaces such as paraboloids can be modeled through continuous and bijective parameterizations, for @@ -3053,17 +3050,17 @@ respectively. If you want to determine whether the pre-image of a point \f$p\f$ lies on identified sides, you need to employ one of the two traits functors \link - ArrangementIdentifiedHorizontalTraits_2::Is_on_x_identification_2 + AosIdentifiedHorizontalTraits_2::Is_on_x_identification_2 `Is_on_x_identification_2`\endlink or \link - ArrangementIdentifiedVerticalTraits_2::Is_on_y_identification_2 + AosIdentifiedVerticalTraits_2::Is_on_y_identification_2 `Is_on_y_identification_2`\endlink; see Section \ref aos_ssec-traits-curved. If the pre-image of an \f$x\f$-monotone curve \f$c\f$ does not entirely lie on identified sides, you can determine the location of the pre-image of an endpoint of \f$c\f$ employing either the \link - ArrangementVerticalSideTraits_2::Parameter_space_in_x_2 + AosVerticalSideTraits_2::Parameter_space_in_x_2 `Parameter_space_in_x_2`\endlink functor or the \link - ArrangementHorizontalSideTraits_2::Parameter_space_in_y_2 + AosHorizontalSideTraits_2::Parameter_space_in_y_2 `Parameter_space_in_y_2`\endlink functors; see Section \ref aos_ssec-traits-curved. The operations in both functors accept an enumeration that indicates the curve end, that is, @@ -3120,20 +3117,20 @@ parameter space are identified and the bottom and top sides are contracted, which is the settings used by the traits class template `Arr_geodesic_arc_on_sphere_traits_2`; see Section \ref arr_ssectr_spherical. The traits functors \link -ArrangementBasicTraits_2::Construct_min_vertex_2 +AosBasicTraits_2::Construct_min_vertex_2 `Construct_min_vertex_2`\endlink, \link -ArrangementBasicTraits_2::Construct_max_vertex_2 +AosBasicTraits_2::Construct_max_vertex_2 `Construct_min_vertex_2`\endlink, and \link -ArrangementBasicTraits_2::Compare_x_2 `Compare_x_2`\endlink used in +AosBasicTraits_2::Compare_x_2 `Compare_x_2`\endlink used in the code are described is Section \ref aos_sssec-geom_traits-concepts_basic. The traits functors \link -ArrangementVerticalSideTraits_2::Parameter_space_in_x_2 +AosVerticalSideTraits_2::Parameter_space_in_x_2 `Parameter_space_in_x_2`\endlink, \link -ArrangementHorizontalSideTraits_2::Parameter_space_in_y_2 +AosHorizontalSideTraits_2::Parameter_space_in_y_2 `Parameter_space_in_y_2`\endlink, \link -ArrangementIdentifiedVerticalTraits_2::Is_on_y_identification_2 +AosIdentifiedVerticalTraits_2::Is_on_y_identification_2 `Is_on_y_identification_2`\endlink, and \link -ArrangementHorizontalSideTraits_2::Compare_x_on_boundary_2 +AosHorizontalSideTraits_2::Compare_x_on_boundary_2 `Compare_x_on_boundary_2`\endlink, are described is Section \ref aos_ssec-traits-curved. @@ -3253,10 +3250,10 @@ The hierarchy of the main geometry traits concepts. \subsubsection aos_sssec-geom_traits-concepts_basic The Basic Concept -A model of the basic concept `ArrangementBasicTraits_2` needs to -define the types \link ArrangementBasicTraits_2::Point_2 +A model of the basic concept `AosBasicTraits_2` needs to +define the types \link AosBasicTraits_2::Point_2 `Point_2`\endlink and \link -ArrangementBasicTraits_2::X_monotone_curve_2 +AosBasicTraits_2::X_monotone_curve_2 `X_monotone_curve_2`\endlink, where objects of the former type are the geometric mapping of arrangement vertices, and objects of the latter type are the geometric mapping of edges. In addition, it has to @@ -3267,20 +3264,20 @@ and points that do not lie in the interiors of the curves. The basic set of predicates is also sufficient for answering vertical ray-shooting queries and point-location queries with a small exception: Locating a point using the landmark strategy requires a -traits class that models the concept `ArrangementLandmarkTraits_2`; +traits class that models the concept `AosLandmarkTraits_2`; see Section \ref aos_sssec-tr_landmarks_concept.
      -
      \link ArrangementBasicTraits_2::Compare_x_2 `Compare_x_2`\endlink: +
      \link AosBasicTraits_2::Compare_x_2 `Compare_x_2`\endlink:
      Compares the \f$x\f$-coordinates of two points. -
      \link ArrangementBasicTraits_2::Compare_xy_2 `Compare_xy_2`\endlink: +
      \link AosBasicTraits_2::Compare_xy_2 `Compare_xy_2`\endlink:
      Compares two points lexicographically, first by their \f$x\f$-coordinates, and if they are equal, by their \f$y\f$-coordinates. -
      \link ArrangementBasicTraits_2::Equal_2 `Equal_2`\endlink: +
      \link AosBasicTraits_2::Equal_2 `Equal_2`\endlink:
      There are two overloaded Boolean operators that test equality. One returns true iff two given points represent the same geometric point in the two-dimensional surface, and the second returns true iff the @@ -3289,36 +3286,36 @@ see Section \ref aos_sssec-tr_landmarks_concept. of two \f$x\f$-monotone curves is used only for testing as part of the test suite.} -
      \link ArrangementBasicTraits_2::Construct_min_vertex_2 `Construct_min_vertex_2`\endlink: +
      \link AosBasicTraits_2::Construct_min_vertex_2 `Construct_min_vertex_2`\endlink:
      Returns the lexicographically smallest (or left) endpoint of an \f$x\f$-monotone curve. -
      \link ArrangementBasicTraits_2::Construct_max_vertex_2 `Construct_max_vertex_2`\endlink: +
      \link AosBasicTraits_2::Construct_max_vertex_2 `Construct_max_vertex_2`\endlink:
      Returns the lexicographically largest (or right) endpoint of an \f$x\f$-monotone curve. -
      \link ArrangementBasicTraits_2::Is_vertical_2 `Is_vertical_2`\endlink: +
      \link AosBasicTraits_2::Is_vertical_2 `Is_vertical_2`\endlink:
      Determines whether an \f$x\f$-monotone curve is vertical. -
      \link ArrangementBasicTraits_2::Compare_y_at_x_2 `Compare_y_at_x_2`\endlink: +
      \link AosBasicTraits_2::Compare_y_at_x_2 `Compare_y_at_x_2`\endlink:
      Given an \f$x\f$-monotone curve \f$c\f$ and a point \f$p\f$ that lies in the \f$x\f$-range of \f$c\f$, determines whether \f$p\f$ is below, above or lies on \f$c\f$. -
      \link ArrangementBasicTraits_2::Compare_y_at_x_right_2 `Compare_y_at_x_right_2`\endlink: +
      \link AosBasicTraits_2::Compare_y_at_x_right_2 `Compare_y_at_x_right_2`\endlink:
      Given two \f$x\f$-monotone curves \f$c_1\f$ and \f$c_2\f$ that share a common minimal (left) endpoint \f$p\f$, determines whether \f$c_1\f$ is above or below \f$c_2\f$ immediately to the right of \f$p\f$, or whether the two curves overlap there.
      -Every model of the concept `ArrangementBasicTraits_2` needs to define -a nested type named \link ArrangementBasicTraits_2::Has_left_category +Every model of the concept `AosBasicTraits_2` needs to define +a nested type named \link AosBasicTraits_2::Has_left_category `Has_left_category`\endlink. It determines whether the traits class supports the following predicate:
      -
      \link ArrangementBasicTraits_2::Compare_y_at_x_left_2 `Compare_y_at_x_left_2`\endlink: +
      \link AosBasicTraits_2::Compare_y_at_x_left_2 `Compare_y_at_x_left_2`\endlink:
      Given two \f$x\f$-monotone curves \f$c_1\f$ and \f$c_2\f$ that share a common maximal (right) endpoint \f$p\f$, determines whether \f$c_1\f$ is above or under \f$c_2\f$ immediately to the left of @@ -3326,7 +3323,7 @@ supports the following predicate:
      -If the `ArrangementBasicTraits_2::Has_left_category` type nested in a +If the `AosBasicTraits_2::Has_left_category` type nested in a model of the basic concept is defined as `Tag_true`\cgalFootnote{In principle, the category type may only be convertible to the tag type, but in practice the category is typically explicitly defined as the @@ -3345,18 +3342,18 @@ bottom, or top side of the boundary of the parameter space, must be conveyed by the traits class. This is done through the definition of four additional nested types, namely
        -
      1. \link ArrangementBasicTraits_2::Left_side_category +
      2. \link AosBasicTraits_2::Left_side_category `Left_side_category`\endlink, -
      3. \link ArrangementBasicTraits_2::Right_side_category +
      4. \link AosBasicTraits_2::Right_side_category `Right_side_category`\endlink, -
      5. \link ArrangementBasicTraits_2::Bottom_side_category +
      6. \link AosBasicTraits_2::Bottom_side_category `Bottom_side_category`\endlink, and -
      7. \link ArrangementBasicTraits_2::Top_side_category +
      8. \link AosBasicTraits_2::Top_side_category `Top_side_category`\endlink.
      Each of those types must be convertible to the type `Arr_oblivious_side_tag` for the class to be a model of -the concept `ArrangementBasicTraits_2`. +the concept `AosBasicTraits_2`. \subsubsection aos_sssec-geom_traits-concepts_intersecting Intersections @@ -3364,17 +3361,17 @@ the concept `ArrangementBasicTraits_2`. Constructing an arrangement induced by \f$x\f$-monotone curves that may intersect in their interior requires operations that are not part -of the `ArrangementBasicTraits_2` concept. The additional operations -are listed by the concept `ArrangementXMonotoneTraits_2`, which +of the `AosBasicTraits_2` concept. The additional operations +are listed by the concept `AosXMonotoneTraits_2`, which refines the basic arrangement geometry-traits concept described above. -While models of the `ArrangementXMonotoneTraits_2` concept still +While models of the `AosXMonotoneTraits_2` concept still handle only \f$x\f$-monotone curves, the curves are not restricted to be disjoint in their interiors. Such a model must be capable of computing points of intersection between \f$x\f$-monotone curves, splitting curves at these intersection points to obtain pairs of interior-disjoint subcurves, and optionally merging pairs of subcurves. A point of intersection between two curves is also -represented by the \link ArrangementBasicTraits_2::Point_2 +represented by the \link AosBasicTraits_2::Point_2 `Point_2`\endlink type. A model of the refined concept must define an additional type called `Multiplicity`. An object of this type indicates the multiplicity of the intersection point of two curves, @@ -3395,12 +3392,12 @@ operations:
      -
      \link ArrangementXMonotoneTraits_2::Split_2 `Split_2`\endlink: +
      \link AosXMonotoneTraits_2::Split_2 `Split_2`\endlink:
      Splits an \f$x\f$-monotone curve \f$c\f$ into two subcurves at a given point \f$p\f$ that lies in the interior of \f$c\f$. -
      \link ArrangementXMonotoneTraits_2::Are_mergeable_2 `Are_mergeable_2`\endlink: -
      Determines whether two \f$ x\f$-monotone curves \f$c_1\f$ and +
      \link AosXMonotoneTraits_2::Are_mergeable_2 `Are_mergeable_2`\endlink: +
      Determines whether two \f$x\f$-monotone curves \f$c_1\f$ and \f$c_2\f$ that share a common endpoint can be merged into a single continuous \f$x\f$-monotone curve representable by the traits class.\cgalFootnote{On the face of it this seems a difficult @@ -3409,10 +3406,10 @@ operations: underlying curves are identical and whether they do not bend to form a non-\f$x\f$-monotone curve.} -
      \link ArrangementXMonotoneTraits_2::Merge_2 `Merge_2`\endlink: +
      \link AosXMonotoneTraits_2::Merge_2 `Merge_2`\endlink:
      Merges two mergeable \f$x\f$-monotone curves into a single curve. -
      \link ArrangementXMonotoneTraits_2::Intersect_2 `Intersect_2`\endlink: +
      \link AosXMonotoneTraits_2::Intersect_2 `Intersect_2`\endlink:
      Computes all intersection points and overlapping sections of two given \f$x\f$-monotone curves. If possible, computes also the multiplicity of each intersection point. Providing the multiplicity @@ -3426,12 +3423,12 @@ operations:
      -Using a model of the `ArrangementXMonotoneTraits_2` it is +Using a model of the `AosXMonotoneTraits_2` it is possible to construct arrangements of sets of \f$x\f$-monotone curves (and points) that may intersect one another. The two operations listed above, regarding the merging of curves, are optional, and should be provided only if the type `Has_merge_category` nested in a model of -the `ArrangementXMonotoneTraits_2` concept is defined as `Tag_true`. +the `AosXMonotoneTraits_2` concept is defined as `Tag_true`. Otherwise, it is not possible to merge \f$x\f$-monotone curve and redundant vertices may be left in the arrangement due to the removal of edges. @@ -3440,11 +3437,11 @@ edges. \subsubsection aos_sssec-geom_traits-concepts_arbitrary Supporting Arbitrary Curves -The concept `ArrangementTraits_2` refines the -`ArrangementXMonotoneTraits_2` concept. A model of the refined concept +The concept `AosTraits_2` refines the +`AosXMonotoneTraits_2` concept. A model of the refined concept must define an additional type that is used to represent general, not necessarily \f$x\f$-monotone and not necessarily continuous, curves, -named \link ArrangementTraits_2::Curve_2 `Curve_2`\endlink. It also +named \link AosTraits_2::Curve_2 `Curve_2`\endlink. It also has to support the subdivision of a curve of that type into a set of continuous \f$x\f$-monotone curves and isolated points. For example, the curve \f$c:\ (x^2 + y^2)(x^2 + y^2 - 1) = 0\f$ comprises the unit @@ -3457,20 +3454,20 @@ operation:
      -
      \link ArrangementTraits_2::Make_x_monotone_2 `Make_x_monotone_2`\endlink: +
      \link AosTraits_2::Make_x_monotone_2 `Make_x_monotone_2`\endlink:
      Divides a given general curve of type \link - ArrangementTraits_2::Curve_2 `Curve_2`\endlink into continuous weakly + AosTraits_2::Curve_2 `Curve_2`\endlink into continuous weakly \f$x\f$-monotone curves and isolated points.
      -Note that a model of the refined concept `ArrangementTraits_2` is +Note that a model of the refined concept `AosTraits_2` is required only when using the free `insert()` function templates (see Section \ref arr_secgl_funcs) that accept an object of type \link -ArrangementTraits_2::Curve_2 `Curve_2`\endlink or a range of objects +AosTraits_2::Curve_2 `Curve_2`\endlink or a range of objects of that type. In all other cases it is sufficient to use a model of -the `ArrangementXMonotoneTraits_2` concept. +the `AosXMonotoneTraits_2` concept. \subsubsection aos_sssec-tr_landmarks_concept The Landmark Concept @@ -3487,22 +3484,22 @@ The type of an arrangement associated with the landmark point-location strategy (see Section \ref arr_ssecpl) must be an instance of the `Arrangement_on_surface_2` class template, where the `GeomTraits` parameter is substituted by a model of the -concept `ArrangementLandmarkTraits_2`. (Naturally, it can also model -either the `ArrangementXMonotoneTraits_2` concept or the -`ArrangementTraits_2` concept.) The `ArrangementLandmarkTraits_2` -concept refines the two concepts `ArrangementApproximateTraits_2` and -`ArrangementConstructXMonotoneCurveTraits_2`. Each of these two -concepts, in turn, refines the concept `ArrangementBasicTraits_2`. +concept `AosLandmarkTraits_2`. (Naturally, it can also model +either the `AosXMonotoneTraits_2` concept or the +`AosTraits_2` concept.) The `AosLandmarkTraits_2` +concept refines the two concepts `AosApproximateTraits_2` and +`AosConstructXMonotoneCurveTraits_2`. Each of these two +concepts, in turn, refines the concept `AosBasicTraits_2`. -A model of the `ArrangementApproximateTraits_2` concept must define a +A model of the `AosApproximateTraits_2` concept must define a fixed precision number type (typically the double-precision floating-point `double`) and support the operation below (in addition -to fulfilling the requirements listed by the `ArrangementBasicTraits_2` +to fulfilling the requirements listed by the `AosBasicTraits_2` concept).
      -
      \link ArrangementApproximateTraits_2::Approximate_2 `Approximate_2`\endlink: +
      \link AosApproximateTraits_2::Approximate_2 `Approximate_2`\endlink:
      Given a point `p`, approximate the \f$x\f$ and \f$y\f$-coordinates of `p` using a not necessarily multi-precision number type. We use this operation for approximate @@ -3513,33 +3510,33 @@ fixed-precision number type.
      -A model of the `ArrangementConstructXMonotoneCurveTraits_2` concept +A model of the `AosConstructXMonotoneCurveTraits_2` concept must support the operation below (in addition to fulfilling the -requirements listed by the `ArrangementBasicTraits_2` concept). +requirements listed by the `AosBasicTraits_2` concept).
      -
      \link ArrangementConstructXMonotoneCurveTraits_2::Construct_x_monotone_curve_2 `Construct_x_monotone_curve_2`\endlink: +
      \link AosConstructXMonotoneCurveTraits_2::Construct_x_monotone_curve_2 `Construct_x_monotone_curve_2`\endlink:
      Given two points \f$p_1\f$ and \f$p_2\f$, construct an \f$x\f$-monotone curve connecting \f$p_1\f$ and \f$p_2\f$.
      -Most traits classes model the `ArrangementTraits_2` concept, and some -also model the `ArrangementLandmarkTraits_2` concept. +Most traits classes model the `AosTraits_2` concept, and some +also model the `AosLandmarkTraits_2` concept. \subsubsection aos_sssec-tr_additional_concepts The Construct Curve Concept -The concept `ArrangementConstructCurveTraits_2` refines the concept -`ArrangementTraits_2`. A model of the -`ArrangementConstructCurveTraits_2` concept must support the operation +The concept `AosConstructCurveTraits_2` refines the concept +`AosTraits_2`. A model of the +`AosConstructCurveTraits_2` concept must support the operation below (in addition to fulfilling the requirements listed by the -`ArrangementTraits_2` concept). +`AosTraits_2` concept).
      -
      \link ArrangementConstructCurveTraits_2::Construct_curve_2 `Construct_curve_2`\endlink: +
      \link AosConstructCurveTraits_2::Construct_curve_2 `Construct_curve_2`\endlink:
      Given two points \f$p_1\f$ and \f$p_2\f$, construct a curve connecting \f$p_1\f$ and \f$p_2\f$.
      @@ -3548,7 +3545,7 @@ The `Arr_polyline_traits_2` class template handles polylines; see Section ~\ref arr_sssectr_polylines. The type that substitutes the template parameter `SubcurveTraits_2` when `Arr_polyline_traits_2` is instantiated must be -a geometry-traits class that models the concept `ArrangementConstructCurveTraits_2` +a geometry-traits class that models the concept `AosConstructCurveTraits_2` to enable the construction of polylines from a sequence of two or more points. @@ -3565,13 +3562,13 @@ boundary sides) or approach them (the pre-images of their endpoints approach boundary sides). These boundary conditions typically occur with unbounded curves or with arrangements embedded in curved surfaces. The category types \link -ArrangementBasicTraits_2::Left_side_category +AosBasicTraits_2::Left_side_category `Left_side_category`\endlink, \link -ArrangementBasicTraits_2::Right_side_category +AosBasicTraits_2::Right_side_category `Right_side_category`\endlink, \link -ArrangementBasicTraits_2::Bottom_side_category +AosBasicTraits_2::Bottom_side_category `Bottom_side_category`\endlink, and \link -ArrangementBasicTraits_2::Top_side_category +AosBasicTraits_2::Top_side_category `Top_side_category`\endlink, nested in every geometry traits class indicate whether the corresponding boundary side (i.e., left, right, bottom, and top) is open, closed, contracted, or identified, and @@ -3600,9 +3597,9 @@ closed, contracted, and identified sides, respectively. (When curves are expected to neither reach nor approach a particular side, special handling is not required; thus, there is no need for a corresponding concept.) For example, it is required that the category type \link -ArrangementOpenBottomTraits_2::Bottom_side_category +AosOpenBottomTraits_2::Bottom_side_category `Bottom_side_category`\endlink, nested in models of the concept -`ArrangementOpenBottomTraits_2`, is convertible to the tag type +`AosOpenBottomTraits_2`, is convertible to the tag type `Arr_open_side_tag`. This makes for a total of 16 abstract concepts (combine one of left, right, bottom, and top with one of open, closed, contracted, identified). Any one of these individual abstract concept @@ -3616,8 +3613,8 @@ contracted side must be adjacent to two identified sides. While this narrows down the number of tangible concepts, the total number is still high; in practice we have used only two so far (not counting the "plain" concept, models of which do not handle boundary conditions at -all), namely, `ArrangementOpenBoundaryTraits_2` and -`ArrangementSphericalBoundaryTraits_2`; see below for more +all), namely, `AosOpenBoundaryTraits_2` and +`AosSphericalBoundaryTraits_2`; see below for more details. Many of the traits class-templates provided by the \ref PkgArrangementOnSurface2 package do not handle boundary conditions at all. Some of them, such as the `Arr_segment_traits_2` traits (see @@ -3639,7 +3636,7 @@ sufficient to handle not only curves embedded in an unbounded parameter space, but also curves embedded in a bounded parameter space with open boundaries. The arrangement type instantiated with a traits class that models the combined concept -`ArrangementOpenBoundaryTraits_2` shown in +`AosOpenBoundaryTraits_2` shown in \cgalFigureRef{aos_fig-open_concept_hierarchy} can handle curves that are open in any direction. Recall that an arrangement that supports unbounded \f$x\f$-monotone curves maintains an implicit bounding @@ -3649,7 +3646,7 @@ are expected to be unbounded; namely, there exists \f$d \in \{0,1\}\f$ such that \f$\lim_{t \rightarrow d}x(t) = \pm\infty\f$ or \f$\lim_{t \rightarrow d}y(t) = \pm\infty\f$ holds for at least one input curve \f$c(t) = (x(t),y(t))\f$, the arrangement template must be -instantiated with a model of the `ArrangementOpenBoundaryTraits_2` +instantiated with a model of the `AosOpenBoundaryTraits_2` concept.\cgalFootnote{A curve that reaches the boundary of the parameter space in this case is open and unbounded.} @@ -3662,7 +3659,7 @@ concepts for curves embedded in a sphere-like parameterized surface A suitable geometry-traits component for arrangements embedded in surfaces homeomorphic to a sphere is a model of the combined concept -`ArrangementSphericalBoundaryTraits_2` shown in +`AosSphericalBoundaryTraits_2` shown in \cgalFigureRef{aos_fig-spherical_concept_hierarchy}. Here the two vertical sides of the parameter space are identified and the two horizontal sides are contracted. @@ -3677,9 +3674,9 @@ exists for the right, bottom, and top sides. The shared requirements for the four options of a side are collected -in abstract layers called `ArrangementLeftSideTraits_2`, -`ArrangementRightSideTraits_2`, `ArrangementBottomSideTraits_2`, and -`ArrangementTopSideTraits_2`; see, e.g., +in abstract layers called `AosLeftSideTraits_2`, +`AosRightSideTraits_2`, `AosBottomSideTraits_2`, and +`AosTopSideTraits_2`; see, e.g., \cgalFigureRef{aos_fig-left_side_cluster}. @@ -3693,8 +3690,8 @@ curves that either reach or approach horizontal sides. The shared requirements for the options of opposite sides are collected in two additional abstract layers called -`ArrangementVerticalSideTraits_2` and -`ArrangementHorizontalSideTraits_2`; see +`AosVerticalSideTraits_2` and +`AosHorizontalSideTraits_2`; see \cgalFigureRef{aos_fig-side_clusters}. @@ -3715,8 +3712,8 @@ of the parameter space and for curves that reach the identified top side of the parameter space do not exist either. Instead, the shared requirements for opposite identified sides are collected in two additional abstract concepts called -`ArrangementIdentifiedVerticalTraits_2` and -`ArrangementIdentifiedHorizontalTraits_2`; see +`AosIdentifiedVerticalTraits_2` and +`AosIdentifiedHorizontalTraits_2`; see \cgalFigureRef{aos_fig-identified_clusters}. The former lists requirements for operations that handle curves that reach identified vertical sides of the parameter space, and the latter lists @@ -3726,12 +3723,12 @@ horizontal sides of the parameter space. In the following we list the specific requirements of all the aforementioned concepts. -The abstract concept `ArrangementVerticalSideTraits_2` requires the +The abstract concept `AosVerticalSideTraits_2` requires the following predicate:
      -
      \link ArrangementVerticalSideTraits_2::Parameter_space_in_x_2 `Parameter_space_in_x_2`\endlink: +
      \link AosVerticalSideTraits_2::Parameter_space_in_x_2 `Parameter_space_in_x_2`\endlink:
      This three-valued predicate is overloaded with two versions as follows: @@ -3761,18 +3758,18 @@ in between. Return `CGAL::ARR_LEFT_BOUNDARY`, min},x_{\rm max}\}\f$, then the boundary side containing \f$p\f$ cannot be open and must not be identified. In other words, this overloaded version is required only for the concepts -`ArrangementClosedLeftTraits_2`, `ArrangementClosedRightTraits_2`, -`ArrangementContractedLeftTraits_2` and -`ArrangementContractedRightTraits_2`. +`AosClosedLeftTraits_2`, `AosClosedRightTraits_2`, +`AosContractedLeftTraits_2` and +`AosContractedRightTraits_2`.
      -The abstract concept `ArrangementHorizontalSideTraits_2` requires the +The abstract concept `AosHorizontalSideTraits_2` requires the following predicate:
      -
      \link ArrangementHorizontalSideTraits_2::Parameter_space_in_y_2 `Parameter_space_in_y_2`\endlink: +
      \link AosHorizontalSideTraits_2::Parameter_space_in_y_2 `Parameter_space_in_y_2`\endlink:
      This three-valued predicate is overloaded with two versions as follows: @@ -3802,9 +3799,9 @@ in between. Return `CGAL::ARR_BOTTOM_BOUNDARY`, min},y_{\rm max}\}\f$, then the boundary side containing \f$p\f$ cannot be open and must not be identified. In other words, this overloaded version is required only for the concepts -`ArrangementClosedBottomTraits_2`, `ArrangementClosedTopTraits_2`, -`ArrangementContractedBottomTraits_2` and -`ArrangementContractedTopTraits_2`. +`AosClosedBottomTraits_2`, `AosClosedTopTraits_2`, +`AosContractedBottomTraits_2` and +`AosContractedTopTraits_2`.
      @@ -3821,14 +3818,14 @@ asymmetry is also reflected in the predicates listed below. They help determining the order of curve-ends lying on the boundary of the parameter space with respect to regular points and among each other. -The concepts `ArrangementClosedLeftTraits_2`, -`ArrangementClosedRightTraits_2`, and -`ArrangementIdentifiedVerticalTraits_2` require the following +The concepts `AosClosedLeftTraits_2`, +`AosClosedRightTraits_2`, and +`AosIdentifiedVerticalTraits_2` require the following additional predicate:
      -
      \link ArrangementIdentifiedVerticalTraits_2::Compare_y_on_boundary_2 `Compare_y_on_boundary_2`\endlink: +
      \link AosIdentifiedVerticalTraits_2::Compare_y_on_boundary_2 `Compare_y_on_boundary_2`\endlink:
      Given two points \f$p_1=(x_{p_1},y_{p_1})\f$ and \f$p_2=(x_{p_2},y_{p_2})\f$, such that at least one of them lies on a @@ -3839,16 +3836,16 @@ min},x_{\rm max}\}\f$ (resp. \f$x_{p_2} \in \{x_{\rm min},x_{\rm max}\}\f$), then the vertical boundary side containing \f$p_1\f$ (resp. \f$p_2\f$) must be either closed or identified. In other words, this overloaded version is required only for the concepts -`ArrangementClosedLeftTraits_2`, `ArrangementClosedRightTraits_2`, and -`ArrangementIdentifiedVerticalTraits_2`. +`AosClosedLeftTraits_2`, `AosClosedRightTraits_2`, and +`AosIdentifiedVerticalTraits_2`.
      -The concept `ArrangementVerticalSideTraits_2` requires the following additional predicate: +The concept `AosVerticalSideTraits_2` requires the following additional predicate:
      -
      \link ArrangementVerticalSideTraits_2::Compare_y_near_boundary_2 `Compare_y_near_boundary_2`\endlink: +
      \link AosVerticalSideTraits_2::Compare_y_near_boundary_2 `Compare_y_near_boundary_2`\endlink:
      @@ -3880,12 +3877,12 @@ boundary-side in a similar manner. -The concept `ArrangementHorizontalSideTraits_2` requires two additional +The concept `AosHorizontalSideTraits_2` requires two additional predicates:
      -
      \link ArrangementHorizontalSideTraits_2::Compare_x_on_boundary_2 `Compare_x_on_boundary_2`\endlink: +
      \link AosHorizontalSideTraits_2::Compare_x_on_boundary_2 `Compare_x_on_boundary_2`\endlink:
      This predicate is overloaded with three versions. We distinguish between open and non-open sides as explained below. @@ -3939,10 +3936,10 @@ min},y_{\rm max}\}\f$ (resp. \f$y_{p_2} \in \{y_{\rm min},y_{\rm max}\}\f$), then the boundary side containing \f$p_1\f$ (resp. \f$p_2\f$) must be either closed or identified. In other words, this overloaded version is required only for the concepts -`ArrangementClosedBottomTraits_2`, `ArrangementClosedTopTraits_2`, -and `ArrangementIdentifiedHorizontalTraits_2`. +`AosClosedBottomTraits_2`, `AosClosedTopTraits_2`, +and `AosIdentifiedHorizontalTraits_2`. -
      \link ArrangementHorizontalSideTraits_2::Compare_x_near_boundary_2 +
      \link AosHorizontalSideTraits_2::Compare_x_near_boundary_2 `Compare_x_near_boundary_2`\endlink:
      @@ -3979,12 +3976,12 @@ boundary-side, \f$p\f$ is located far to the top in a similar manner.
      -The concept `ArrangementIdentifiedVerticalTraits_2` requires the following +The concept `AosIdentifiedVerticalTraits_2` requires the following additional predicate:
      -
      \link ArrangementIdentifiedVerticalTraits_2::Is_on_y_identification_2 `Is_on_y_identification_2`\endlink: +
      \link AosIdentifiedVerticalTraits_2::Is_on_y_identification_2 `Is_on_y_identification_2`\endlink:
      This predicate is overloaded with two versions. @@ -3999,12 +3996,12 @@ boundary.
      -Similarly, the concept `ArrangementIdentifiedHorizontalTraits_2` +Similarly, the concept `AosIdentifiedHorizontalTraits_2` requires the following additional predicate:
      -
      \link ArrangementIdentifiedHorizontalTraits_2::Is_on_x_identification_2 `Is_on_x_identification_2`\endlink: +
      \link AosIdentifiedHorizontalTraits_2::Is_on_x_identification_2 `Is_on_x_identification_2`\endlink:
      This predicate is overloaded with two versions. @@ -4141,14 +4138,14 @@ template that handles line segments, namely the `Arr_non_caching_segment_basic_traits_2` class template. This class template and the `Arr_segment_traits_2` class template are both parameterized by a geometric kernel and model the concepts -`ArrangementTraits_2` and `ArrangementLandmarkTraits_2`. +`AosTraits_2` and `AosLandmarkTraits_2`. \cgalFootnote{They also model the refined concept -\cgalFootnoteCode{ArrangementDirectionalXMonotoneTraits_2}, which enables Boolean set +\cgalFootnoteCode{AosDirectionalXMonotoneTraits_2}, which enables Boolean set operations; see Package \ref PkgBooleanSetOperations2Ref.} The class template `Arr_non_caching_segment_traits_2` derives from the instance `Arr_non_caching_segment_basic_traits_2`, which -models the `ArrangementLandmarkTraits_2` traits concept but not the -refined `ArrangementXMonotoneTraits_2` concept. Like the +models the `AosLandmarkTraits_2` traits concept but not the +refined `AosXMonotoneTraits_2` concept. Like the `Arr_segment_traits_2` class template it derives from the `Kernel` type. Unlike the `Arr_segment_traits_2` class template it defines its point and segment types as `Kernel::Point_2` and `Kernel::Segment_2`, @@ -4195,8 +4192,8 @@ The `Arr_linear_traits_2` class used in Section \ref aos_sec-unbounded for demonstrating the construction of arrangements of unbounded curves is capable of handling bounded and unbounded linear objects, namely, lines, rays, and line segments. It models the -concepts `ArrangementTraits_2`, `ArrangementLandmarkTraits_2`, and -`{ArrangementOpenBoundaryTraits_2`. It is parameterized by a geometric +concepts `AosTraits_2`, `AosLandmarkTraits_2`, and +`{AosOpenBoundaryTraits_2`. It is parameterized by a geometric kernel and its nested \link Arr_linear_traits_2::Point_2 `Point_2`\endlink type is defined to be the kernel-point type. The \link Arr_linear_traits_2::Curve_2 `Curve_2`\endlink (and \link @@ -4240,13 +4237,13 @@ arr_sssectr_polycurves. The `Arr_polyline_traits_2` class template handles polylines. It models the following four concepts: -- `ArrangementTraits_2`, +- `AosTraits_2`, -- `ArrangementDirectionalXMonotoneTraits_2` +- `AosDirectionalXMonotoneTraits_2` -- `ArrangementConstructXMonotoneCurveTraits_2`, and +- `AosConstructXMonotoneCurveTraits_2`, and -- `ArrangementConstructCurveTraits_2`. +- `AosConstructCurveTraits_2`. The type that substitutes the template parameter `SubcurveTraits_2` when `Arr_polyline_traits_2` is instantiated must be @@ -4254,16 +4251,16 @@ a geometry-traits class that models the same four concepts. We refer to the type that substitutes the template parameter `SubcurveTraits_2` as the subcurve traits hereafter. If, in addition, the subcurve traits also models the concept -`ArrangementApproximateTraits_2` then the instantiated +`AosApproximateTraits_2` then the instantiated `Arr_polyline_traits_2` type models the concept -`ArrangementApproximateTraits_2` as well. (By definition, modeling the -concepts `ArrangementApproximateTraits_2` and -`ArrangementConstructXMonotoneCurveTraits_2` implies modeling the -concept `ArrangementLandmarkTraits_2`.) Similarly, if the subcurve -traits also models the concept `ArrangementOpenBoundaryTraits_2` then +`AosApproximateTraits_2` as well. (By definition, modeling the +concepts `AosApproximateTraits_2` and +`AosConstructXMonotoneCurveTraits_2` implies modeling the +concept `AosLandmarkTraits_2`.) Similarly, if the subcurve +traits also models the concept `AosOpenBoundaryTraits_2` then the instantiated `Arr_polyline_traits_2` type models -the concept `ArrangementOpenBoundaryTraits_2` as well. Modeling the -`ArrangementConstructXMonotoneCurveTraits_2` concept implies that the +the concept `AosOpenBoundaryTraits_2` as well. Modeling the +`AosConstructXMonotoneCurveTraits_2` concept implies that the subcurve traits must support the construction of a unique (\f$x\f$-monotone) segment given two input points. @@ -4400,14 +4397,14 @@ template, instantiated with the predefined filtered kernel. #include #include -typedef CGAL::Exact_predicates_exact_constructions_kernel Kernel; -typedef Kernel::FT Number_type; +using Kernel = CGAL::Exact_predicates_exact_constructions_kernel; +using Number_type = Kernel::FT; -typedef CGAL::Arr_segment_traits_2 Segment_traits; -typedef CGAL::Arr_polyline_traits_2 Traits; -typedef Traits::Point_2 Point; -typedef Traits::Curve_2 Polyline; -typedef CGAL::Arrangement_2 Arrangement; +using Segment_traits = CGAL::Arr_segment_traits_2; +using Traits = CGAL::Arr_polyline_traits_2; +using Point = Traits::Point_2; +using Polyline = Traits::Curve_2; +using Arrangement = CGAL::Arrangement_2; \endcode @@ -4425,8 +4422,8 @@ is continuous. As a matter of fact, most characteristics of the also to the `Arr_polycurve_traits_2` traits class template. The only difference between the two, is that the latter is not a model of the concepts -`ArrangementConstructXMonotoneCurveTraits_2` nor -`ArrangementConstructCurveTraits_2`, and as such, it is not +`AosConstructXMonotoneCurveTraits_2` nor +`AosConstructCurveTraits_2`, and as such, it is not able to construct a subcurve from only two points. As a consequence, it does not support the operations that (i) construct a polycurve from a sequence of points, and (ii) push a point at the back or at the @@ -4535,10 +4532,10 @@ are rational). The \ref PkgArrangementOnSurface2 package offers a traits class-template called `Arr_circle_segment_traits_2` that exclusively handles line segments, circular arcs, and whole circles -and models the concepts `ArrangementTraits_2` and -`ArrangementDirectionalXMonotoneTraits_2`; see Package \ref +and models the concepts `AosTraits_2` and +`AosDirectionalXMonotoneTraits_2`; see Package \ref PkgBooleanSetOperations2Ref. Note that it is not a model of the -`ArrangementLandmarkTraits_2` concept. It exploits efficient +`AosLandmarkTraits_2` concept. It exploits efficient computations with square root numbers, which makes it attractive for arrangements induced by line segments, circular arcs, and whole circles. When the traits class-template is instantiated, the `Kernel` @@ -4589,16 +4586,16 @@ performance further. #include #include -typedef CGAL::Exact_predicates_exact_constructions_kernel Kernel; -typedef Kernel::FT Number_type; -typedef CGAL::Arr_circle_segment_traits_2 Traits; -typedef Traits::CoordNT CoordNT; -typedef Traits::Point_2 Point; -typedef Traits::Curve_2 Curve; -typedef Traits::Rational_point_2 Rational_point; -typedef Traits::Rational_segment_2 Segment; -typedef Traits::Rational_circle_2 Circle; -typedef CGAL::Arrangement_2 Arrangement; +using Kernel = CGAL::Exact_predicates_exact_constructions_kernel; +using Number_type = Kernel::FT; +using Traits = CGAL::Arr_circle_segment_traits_2; +using CoordNT = Traits::CoordNT; +using Point = Traits::Point_2; +using Curve = Traits::Curve_2; +using Rational_point = Traits::Rational_point_2; +using Segment = Traits::Rational_segment_2; +using Circle = Traits::Rational_circle_2; +using Arrangement = CGAL::Arrangement_2; \endcode The \link Arr_circle_segment_traits_2::Curve_2 `Curve_2`\endlink type @@ -4760,8 +4757,8 @@ type traits-class, then use them to define the conic traits class-template. Also note the types defined by the rational kernels, which we need for conveniently constructing conic arcs. -The `Arr_conic_traits_2` models the `ArrangementTraits_2` and -`ArrangementLandmarkTraits_2` concepts. Its \link +The `Arr_conic_traits_2` models the `AosTraits_2` and +`AosLandmarkTraits_2` concepts. Its \link Arr_conic_traits_2::Point_2 `Point_2`\endlink type is derived from `AlgKernel::Point_2`, while the \link Arr_conic_traits_2::Curve_2 `Curve_2`\endlink type represents a bounded, not necessarily @@ -4864,7 +4861,7 @@ they have another intersection point at A rational function is given by the equation \f$y = \frac{P(x)}{Q(x)}\f$, where \f$P\f$ and \f$Q\f$ are polynomials of -arbitrary degrees. In particular, if \f$ Q(x) = 1\f$, then the +arbitrary degrees. In particular, if \f$Q(x) = 1\f$, then the function is simply a polynomial function. A bounded rational arc is defined by the graph of a rational function over some interval \f$[x_{\rm min}, x_{\rm max}]\f$, where \f$Q\f$ does not have @@ -4880,12 +4877,12 @@ more complicated curves and for interpolation; see, e.g., Using the `Arr_rational_function_traits_2` class template it is possible to construct and maintain arrangements induced by rational arcs. Every instance of the `Arr_rational_function_traits_2` class -template models the concepts `ArrangementTraits_2` and -`ArrangementOpenBoundaryTraits_2`, but it does not model the -`ArrangementLandmarkTraits_2` concept. It also models the refined -concept `ArrangementDirectionalXMonotoneTraits_2`, which enables +template models the concepts `AosTraits_2` and +`AosOpenBoundaryTraits_2`, but it does not model the +`AosLandmarkTraits_2` concept. It also models the refined +concept `AosDirectionalXMonotoneTraits_2`, which enables Boolean set operations; see Package \ref PkgBooleanSetOperations2Ref. -Note that it is not a model of `ArrangementLandmarkTraits_2` concept, +Note that it is not a model of `AosLandmarkTraits_2` concept, so it is impossible to use the landmark point-location strategy with this traits class. @@ -4906,7 +4903,7 @@ depicted in \cgalFigureRef{aos_fig-rat_func_singular}. This arc has two singularities, at \f$x = 1\f$ and at \f$x = 2\f$. It is split into three continuous portions defined over the intervals \f$[0,1)\f$, \f$(1,2)\f$, and \f$(2,3]\f$ by the traits operation \link -ArrangementTraits_2::Make_x_monotone_2 +AosTraits_2::Make_x_monotone_2 `Make_x_monotone_2`\endlink. Arbitrary rational functions are represented by the nested type \link Arr_rational_function_traits_2::Curve_2 `Curve_2`\endlink and @@ -4965,15 +4962,15 @@ are defined in the header file `arr_rat_functions.h`. #include #include -typedef CORE::BigInt Number_type; -typedef CGAL::Algebraic_kernel_d_1 AK1; -typedef CGAL::Arr_rational_function_traits_2 Traits; +using Number_type = CORE::BigInt; +using AK1 = CGAL::Algebraic_kernel_d_1; +using Traits = CGAL::Arr_rational_function_traits_2; -typedef Traits::Polynomial_1 Polynomial; -typedef Traits::Algebraic_real_1 Alg_real; -typedef Traits::Bound Bound; +using Polynomial = Traits::Polynomial_1; +using Alg_real = Traits::Algebraic_real_1; +using Bound = Traits::Bound; -typedef CGAL::Arrangement_2 Arrangement; +using Arrangement = CGAL::Arrangement_2; \endcode The constructed rational functions are cached by the traits class. The @@ -5079,17 +5076,17 @@ header file `arr_Bezier.h`. #include #include -typedef CGAL::CORE_algebraic_number_traits Nt_traits; -typedef Nt_traits::Rational NT; -typedef Nt_traits::Rational Rational; -typedef Nt_traits::Algebraic Algebraic; -typedef CGAL::Cartesian Rat_kernel; -typedef CGAL::Cartesian Alg_kernel; -typedef Rat_kernel::Point_2 Rat_point; -typedef CGAL::Arr_Bezier_curve_traits_2 - Traits; -typedef Traits::Curve_2 Bezier_curve; -typedef CGAL::Arrangement_2 Arrangement; +using Nt_traits = CGAL::CORE_algebraic_number_traits; +using NT = Nt_traits::Rational; +using Rational = Nt_traits::Rational; +using Algebraic = Nt_traits::Algebraic; +using Rat_kernel = CGAL::Cartesian; +using Alg_kernel = CGAL::Cartesian; +using Rat_point = Rat_kernel::Point_2; +using Traits = + CGAL::Arr_Bezier_curve_traits_2; +using Bezier_curve = Traits::Curve_2; +using Arrangement = CGAL::Arrangement_2; \endcode As mentioned above, we assume that the coordinates of all control @@ -5111,9 +5108,9 @@ Arr_Bezier_curve_traits_2::X_monotone_curve_2 `X_monotone_curve_2`\endlink types defined by the traits class. Every instance of the `Arr_Bezier_curve_traits_2` class templates -models the concept `ArrangementTraits_2` (but it does not model the -`ArrangementLandmarkTraits_2` concept). It also models the refined -concept `ArrangementDirectionalXMonotoneTraits_2`, which enables +models the concept `AosTraits_2` (but it does not model the +`AosLandmarkTraits_2` concept). It also models the refined +concept `AosDirectionalXMonotoneTraits_2`, which enables Boolean set operations; see Package \ref PkgBooleanSetOperations2Ref. @@ -5168,9 +5165,9 @@ either vertical or a closed connected point set, with all interior points parameterizable in \f$x\f$. Every instance of the `Arr_algebraic_segment_traits_2` -class template models the `ArrangementTraits_2` and -`ArrangementOpenBoundaryTraits_2` concepts (but it does not model the -`ArrangementLandmarkTraits_2` concept). The template argument +class template models the `AosTraits_2` and +`AosOpenBoundaryTraits_2` concepts (but it does not model the +`AosLandmarkTraits_2` concept). The template argument `Coefficient` determines the type of the scalar coefficients of the polynomial. Currently supported integral number types are `Gmpz`, `leda_integer`, and `CORE::BigInt`. This is reflected in the @@ -5238,12 +5235,12 @@ A weakly \f$x\f$-monotone segment of an algebraic curve is represented by the \link Arr_algebraic_segment_traits_2::X_monotone_curve_2 `X_monotone_curve_2`\endlink type nested in the traits class-template. You can construct such segments in two ways as -follows: (i) using the \link ArrangementTraits_2::Make_x_monotone_2 +follows: (i) using the \link AosTraits_2::Make_x_monotone_2 `Make_x_monotone_2`\endlink functor or (ii) using the \link Arr_algebraic_segment_traits_2::Construct_x_monotone_segment_2 `Construct_x_monotone_segment_2`\endlink functor. Both functors are nested in the traits class-template. The former is required by the -concept `ArrangementTraits_2` our traits class models; see Section +concept `AosTraits_2` our traits class models; see Section \ref aos_sssec-geom_traits-concepts_arbitrary. The latter enables the construction of individual segments. The \link Arr_algebraic_segment_traits_2::X_monotone_curve_2 @@ -5377,7 +5374,7 @@ segments in Euclidean geometry. The `Arr_geodesic_arc_on_sphere_traits_2` class template handles arcs of great circles (also known as geodesic arcs) of a unit sphere (centered at the origin in \f$\mathbb{R}^3\f$). It is a model of the -concept `ArrangementSphericalBoundaryTraits_2`; see Section \ref +concept `AosSphericalBoundaryTraits_2`; see Section \ref aos_ssec-traits-curved. An arrangement type (an instance of the template `Arrangement_on_surface_2`) that uses an instance of this traits class as the geometry traits must use @@ -5508,8 +5505,8 @@ nested types are defined as follows: CopyConstructible, EqualityComparable, and DefaultConstructible. The latter ensures that every instance of the class template `Arr_curve_data_traits_2` obtained by substituting the `BaseTraits` - template parameter with a model of the `ArrangementLandmarkTraits_2` - concept models the `ArrangementLandmarkTraits_2` concept as well + template parameter with a model of the `AosLandmarkTraits_2` + concept models the `AosLandmarkTraits_2` concept as well @@ -5992,8 +5989,8 @@ In such cases you may explicitly extend the base \dcel class-template, as described in the next paragraph, or implement your own \dcel class from scratch and use the resulting \dcel to instantiate the `Arrangement_2` class template. In any case such a -class must model the concept `ArrangementDcel` or its refinement -`ArrangementDcelWithRebind`. The latter requires a `rebind` struct +class must model the concept `AosDcel` or its refinement +`AosDcelWithRebind`. The latter requires a `rebind` struct template, which implements a policy-clone idiom. Here, the \dcel class is the policy class and the `rebind` member template struct is used to pass a different traits type parameter to the policy class @@ -6308,17 +6305,16 @@ header file `Overlay_color_traits.h`. \code{.cpp} template struct Overlay_color_traits { - typedef unsigned int Color; - typedef typename Arrangement::Vertex_const_handle V_const_handle; - typedef typename Arrangement::Halfedge_const_handle H_const_handle; - typedef typename Arrangement::Face_const_handle F_const_handle; - typedef typename Arrangement::Vertex_handle V_handle; - typedef typename Arrangement::Halfedge_handle H_handle; - typedef typename Arrangement::Face_handle F_handle; + using Color = unsigned int; + using V_const_handle = typename Arrangement::Vertex_const_handle; + using H_const_handle = typename Arrangement::Halfedge_const_handle; + using F_const_handle = typename Arrangement::Face_const_handle; + using V_handle = typename Arrangement::Vertex_handle; + using H_handle = typename Arrangement::Halfedge_handle; + using F_handle = typename Arrangement::Face_handle; // Compute the average of the red, green, and blue components separately. - Color blend(Color color1, Color color2) const - { + Color blend(Color color1, Color color2) const { return ((((color1 & 0x000000ff) + (color2 & 0x000000ff)) / 2) & 0x000000ff) | ((((color1 & 0x0000ff00) + (color2 & 0x0000ff00)) / 2) & 0x0000ff00) | @@ -6407,12 +6403,12 @@ between these curves and the arrangement edges they induce. Similarly, the `Arrangement_with_history_2` class-template extends the `Arrangement_2` class template. The `GeometryTraits` template parameter, of either class templates, must -be substituted by a model of the `ArrangementTraits_2` concept; see +be substituted by a model of the `AosTraits_2` concept; see Section \ref aos_ssec-insert_gen. It should define the \link -ArrangementTraits_2::Curve_2 `Curve_2`\endlink type and support its -subdivision into \link ArrangementBasicTraits_2::X_monotone_curve_2 +AosTraits_2::Curve_2 `Curve_2`\endlink type and support its +subdivision into \link AosBasicTraits_2::X_monotone_curve_2 `X_monotone_curve_2`\endlink objects, among the others. The `Dcel` -parameter must be substituted by a model of the `ArrangementDcel` +parameter must be substituted by a model of the `AosDcel` concept. You can use either the default \dcel class or an extended \dcel class (see Section \ref arr_ssecex_dcel) based on your needs. An arrangement that support the cross-mapping mentioned above is referred @@ -6647,8 +6643,8 @@ predefined \ascii format that encodes the arrangement topology, as well as all geometric entities associated with vertices and edges. The ability to use the input/output operators, requires that the \link -ArrangementBasicTraits_2::Point_2 `Point_2`\endlink type and the \link -ArrangementBasicTraits_2::X_monotone_curve_2 +AosBasicTraits_2::Point_2 `Point_2`\endlink type and the \link +AosBasicTraits_2::X_monotone_curve_2 `X_monotone_curve_2`\endlink type defined by the traits class both support the `<<` and `>>` operators. The `Arr_conic_traits_2` class (see Section \ref arr_sssectr_conic), the @@ -6715,7 +6711,7 @@ from a file: \cgalExample{Arrangement_on_surface_2/dcel_extension_io.cpp} You may develop your own formatter classes - models of the -`ArrangementInputFormatter` and `ArrangementOutputFormatter` +`AosInputFormatter` and `AosOutputFormatter` concepts, as defined in the Reference Manual. Doing so, you can define other I/O formats, such as an XML-based format or a binary format. @@ -6892,15 +6888,15 @@ and returns it. The functor template is defined in the header file #include #include -typedef CGAL::Exact_predicates_exact_constructions_kernel Kernel; -typedef Kernel::FT Number_type; +using Kernel = CGAL::Exact_predicates_exact_constructions_kernel; +using Number_type = Kernel::FT; template struct Edge_length { // Boost property-type definitions. - typedef boost::readable_property_map_tag category; - typedef Number_type value_type; - typedef value_type reference; - typedef typename Arrangement::Halfedge_handle key_type; + using category = boost::readable_property_map_tag; + using value_type = Number_type; + using reference = value_type; + using key_type = typename Arrangement::Halfedge_handle; value_type operator()(typename Arrangement::Halfedge_handle e) const { const auto diff_x = e->target()->point().x() - e->source()->point().x(); @@ -6983,13 +6979,13 @@ header file `Extended_face_property_map.h` listed below. // A property map that reads/writes the information to/from the extended face. template class Extended_face_property_map { public: - typedef typename Arrangement::Face_handle Face_handle; + using Face_handle = typename Arrangement::Face_handle; // Boost property type definitions. - typedef boost::read_write_property_map_tag category; - typedef Type value_type; - typedef value_type& reference; - typedef Face_handle key_type; + using category = boost::read_write_property_map_tag; + using value_type = Type; + using reference = value_type&; + using key_type = Face_handle; // The get function is required by the property map concept. friend reference get(const Extended_face_property_map& map, key_type key) diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Aos_observer.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Aos_observer.h index 2f21f4a886c..95839a6c344 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Aos_observer.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Aos_observer.h @@ -23,26 +23,25 @@ namespace CGAL { template class Aos_observer { public: - /// \name Types /// @{ - //! the type of the associated arrangement. + /// the type of the associated arrangement. typedef unspecified_type Arrangement_2; - //! the point type. + /// the point type. typedef typename Arrangement_2::Point_2 Point_2; - //! the \f$x\f$-monotone curve type. + /// the \f$x\f$-monotone curve type. typedef typename Arrangement_2::X_monotone_curve_2 X_monotone_curve_2; - //! the type of a handle to an arrangement vertex. + /// the type of a handle to an arrangement vertex. typedef typename Arrangement_2::Vertex_handle Vertex_handle; - //! the type of a handle to an arrangement halfedge. + /// the type of a handle to an arrangement halfedge. typedef typename Arrangement_2::Halfedge_handle Halfedge_handle; - //! the type of a handle to an arrangement face. + /// the type of a handle to an arrangement face. typedef typename Arrangement_2::Face_handle Face_handle; /*! represents a connected component of the boundary (CCB), either an outer @@ -77,11 +76,11 @@ public: /// \name Notifications on Global Arrangement Operations /// @{ - /*! issued just before the attached arrangement is assigned with the contents of another - * arrangement. - * \param arr The other arrangement. Notice that the arrangement type is the type used to - * instantiate the observer, which is conveniently defined as - * `Arrangement_2::Base_aos`. + /*! issued just before the attached arrangement is assigned with the contents + * of another arrangement. + * \param arr The other arrangement. Notice that the arrangement type is the + * type used to instantiate the observer, which is conveniently + * defined as `Arrangement_2::Base_aos`. */ virtual void before_assign(const typename Arrangement_2::Base_aos& arr); @@ -419,6 +418,6 @@ public: virtual void after_remove_inner_ccb(Face_handle f); /// @} - }; /* end Aos_observer */ + } /* end namespace CGAL */ diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_Bezier_curve_traits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_Bezier_curve_traits_2.h index 5e9481a807a..7e5c1ac3ef3 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_Bezier_curve_traits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_Bezier_curve_traits_2.h @@ -4,21 +4,21 @@ namespace CGAL { * * The traits class `Arr_Bezier_curve_traits_2` is a model of the `AosTraits_2` * concept that handles planar Bézier curves. A planar Bézier - * curve \f$ B\f$ is a parametric curve defined by a sequence of control - * points \f$ p_0, \ldots, p_n\f$ as follows: + * curve \f$B\f$ is a parametric curve defined by a sequence of control + * points \f$p_0, \ldots, p_n\f$ as follows: * \f{eqnarray*}{ * B(t) = \left(X(t), Y(t)\right) = \ccSum{k=0}{n}{p_k \cdot \frac{n!}{k! (n-k)!} \cdot t^k (1-t)^{n-k}}\ , \f} - * where \f$ t \in [0, 1]\f$. The degree of the curve is therefore \f$n\f$, - * namely, \f$ X(t)\f$ and \f$ Y(t)\f$ are polynomials of degree \f$ n\f$. + * where \f$t \in [0, 1]\f$. The degree of the curve is therefore \f$n\f$, + * namely, \f$X(t)\f$ and \f$Y(t)\f$ are polynomials of degree \f$n\f$. * Bézier curves have numerous applications in computer graphics and * solid modelling. They are used, for example, in free-form sketches and for * defining the true-type fonts. * In our representation, we assume that the coordinates of all control points * are rational numbers (namely they are given as objects of the - * `RatKernel::Point_2` type), so both \f$ X(t)\f$ and \f$ Y(t)\f$ are + * `RatKernel::Point_2` type), so both \f$X(t)\f$ and \f$Y(t)\f$ are * polynomials with rational coefficients. The intersection points between * curves are however algebraic numbers, and their exact computation is * time-consuming. The traits class therefore contains a layer of geometric @@ -102,20 +102,20 @@ public: */ size_t number_of_control_points() const; - /*! returns the \f$ k\f$th control point. Note that the first control point + /*! returns the \f$k\f$th control point. Note that the first control point * equals the curve source, while the last control point equals its * target. The rest of the control points do not lie on the curve. * - * \pre \f$ k\f$ is smaller than the number of control points. + * \pre \f$k\f$ is smaller than the number of control points. */ typename RatKernel::Point_2 control_point(std::size_t k) const; - /*! returns the point \f$ B(t)\f$ on the curve that corresponds to the given + /*! returns the point \f$B(t)\f$ on the curve that corresponds to the given * rational parameter value. */ typename RatKernel::Point_2 operator()(const Rational& t) const; - /*! returns the point \f$ B(t)\f$ on the curve that corresponds to the given + /*! returns the point \f$B(t)\f$ on the curve that corresponds to the given * algebraic parameter value. */ typename AlgKernel::Point_2 operator()(const Algebraic& t) const; @@ -126,7 +126,7 @@ public: /*! The `Point_2` class nested within the Bézier traits class is used * to represent: (i) an endpoint of a Bézier curve, (ii) a vertical - * tangency point of a curve, used to subdivide it into \f$ x\f$-monotone + * tangency point of a curve, used to subdivide it into \f$x\f$-monotone * subcurve, and (iii) an intersection point between two curves. While, points * of type (i) have rational coordinates and are given as part of the input, * points of the two latter types have algebraic coordinates. However, to @@ -150,13 +150,13 @@ public: Point_2(); /*! - constructs the point \f$ B(t_0)\f$ on the given curve. As \f$ t_0\f$ is an + constructs the point \f$B(t_0)\f$ on the given curve. As \f$t_0\f$ is an algebraic number, the point has algebraic coordinates. */ Point_2(const Curve_2& B, const Algebraic& t_0); /*! - constructs the point \f$ B(t_0)\f$ on the given curve. As \f$ t_0\f$ is a + constructs the point \f$B(t_0)\f$ on the given curve. As \f$t_0\f$ is a rational number, the point has rational coordinates. */ Point_2(const Curve_2& B, const Rational& t_0); @@ -174,13 +174,13 @@ public: */ bool is_exact() const; - /*! returns the \f$ x\f$-coordinate of `p`. + /*! returns the \f$x\f$-coordinate of `p`. * * \pre `p` is exactly computed. */ Algebraic x() const; - /*! returns the \f$ y\f$-coordinate of `p`. + /*! returns the \f$y\f$-coordinate of `p`. * * \pre `p` is exactly computed. */ @@ -200,16 +200,16 @@ public: }; /* end Arr_Bezier_curve_traits_2::Point_2 */ /*! The `X_monotone_curve_2` class nested within the Bézier traits is - * used to represent \f$ x\f$-monotone subcurves of Bézier curves. The - * subcurve is defined by a supporting Bézier curve \f$ B(t)\f$ and a - * range of definition in the parameter space \f$ [t_1, t_2] \subseteq [0,1]\f$, - * where \f$ B(t_1)\f$ is the subcurve source and \f$ B(t_2)\f$ is its target. + * used to represent \f$x\f$-monotone subcurves of Bézier curves. The + * subcurve is defined by a supporting Bézier curve \f$B(t)\f$ and a + * range of definition in the parameter space \f$[t_1, t_2] \subseteq [0,1]\f$, + * where \f$B(t_1)\f$ is the subcurve source and \f$B(t_2)\f$ is its target. * Note that as the point endpoints may only be approximated, the parameter * range defining the subcurve may only be approximately known. * - * It is not possible to construct \f$ x\f$-monotone subcurves directly. + * It is not possible to construct \f$x\f$-monotone subcurves directly. * Instead, use the `Make_x_monotone_2` functor supplied by the traits class to - * subdivide a `Curve_2` object into \f$ x\f$-monotone subcurves. + * subdivide a `Curve_2` object into \f$x\f$-monotone subcurves. */ class X_monotone_curve_2 { public: diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_accessor.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_accessor.h index 1fcf4694c44..45cf6a39a48 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_accessor.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_accessor.h @@ -18,7 +18,6 @@ namespace CGAL { template class Arr_accessor { public: - /// \name Types /// @{ @@ -28,7 +27,7 @@ public: /*! the point type. */ typedef typename Arrangement_2::Point_2 Point_2; - /*! the \f$ x\f$-monotone curve type. */ + /*! the \f$x\f$-monotone curve type. */ typedef typename Arrangement_2::X_monotone_curve_2 X_monotone_curve_2; /*! */ @@ -165,16 +164,16 @@ Halfedge_handle insert_from_vertex_ex(const X_monotone_curve_2& c, /*! inserts the curve `c` into the arrangement, such that both `c`'s endpoints * correspond to existing arrangement vertices, given by `pred1->target()` and * `pred2->target()`. `res` is the comparison result between these two - * end-vertices. The function creates a new halfedge pair that connects the two - * vertices (with `pred1` and `pred2` indicate the exact place for these + * end-vertices. The function creates a new halfedge pair that connects the + * two vertices (with `pred1` and `pred2` indicate the exact place for these * halfedges around the two target vertices) and returns a handle for the * halfedge directed from `pred1->target()` to `pred2->target()`. The output * flag `new_face` indicates whether a new face has been created following the * insertion of the new curve. * * \pre `pred1->target()` and `pred2->target()` are associated with `c`'s - * endpoints and that if a new face is created, then `is_inside_new_face (pred1, - * pred2, c)` is `true`. + * endpoints and that if a new face is created, then + * `is_inside_new_face(pred1, pred2, c)` is `true`. */ Halfedge_handle insert_at_vertices_ex(const X_monotone_curve_2& c, Halfedge_handle pred1, @@ -228,7 +227,7 @@ Halfedge_handle insert_from_vertex_ex(const X_monotone_curve_2& c, */ Vertex_handle modify_vertex_ex(Vertex_handle v, const Point_2& p); - /*! modifies the \f$ x\f$-monotone curve associated with the edge `e` (the + /*! modifies the \f$x\f$-monotone curve associated with the edge `e` (the * curve `c` may be geometrically different than the one currently associated * with `e`). The function returns a handle to the modified edge (same as * `e`). @@ -278,6 +277,6 @@ Halfedge_handle insert_from_vertex_ex(const X_monotone_curve_2& c, bool remove_target = true); /// @} - }; /* end Arr_accessor */ + } /* end namespace CGAL */ diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_algebraic_segment_traits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_algebraic_segment_traits_2.h index 5007dce85f5..fa5e26821e3 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_algebraic_segment_traits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_algebraic_segment_traits_2.h @@ -1,356 +1,335 @@ - namespace CGAL { -/*! -\ingroup PkgArrangementOnSurface2TraitsClasses - -The traits class `Arr_algebraic_segment_traits_2` is a model of the `ArrangementTraits_2` -concept that handles planar algebraic curves of arbitrary degree, -and \f$ x\f$-monotone of such curves. -A planar (real) algebraic curve -is the vanishing set of a polynomial in two variables, that is, the -curve is defined by the defining equation -\f[ f(x):=\sum_{i+j\leq n} a_{ij} x^i y^j =0, \f] -where \f$ n\f$ is the degree of the curve. - -The traits class allows the construction of algebraic curves, -by specifying their implicit equation. \f$ x\f$-monotone and vertical segments -of a curve can also be defined; unbounded curves and segments are supported. -The template parameter `Coefficient` defines -the innermost coefficient type of the polynomials. Currently, -the types `leda::integer` and `CORE::BigInt` are supported as well -as any instance of `CGAL::Sqrt_extension` that is instantiated with -one of the integral types above. - -\cgalModels{ArrangementTraits_2} - - -*/ +/*! \ingroup PkgArrangementOnSurface2TraitsClasses + * + * The traits class `Arr_algebraic_segment_traits_2` is a model of the + * `AosTraits_2` concept that handles planar algebraic curves of arbitrary + * degree, and \f$x\f$-monotone of such curves. A planar (real) algebraic + * curve is the vanishing set of a polynomial in two variables, that is, the + * curve is defined by the defining equation + * \f[f(x):=\sum_{i+j\leq n} a_{ij} x^i y^j =0, \f] where \f$n\f$ is the + * degree of the curve. + * + * The traits class allows the construction of algebraic curves, by specifying + * their implicit equation. \f$x\f$-monotone and vertical segments of a curve + * can also be defined; unbounded curves and segments are supported. The + * template parameter `Coefficient` defines the innermost coefficient type of + * the polynomials. Currently, the types `leda::integer` and `CORE::BigInt` are + * supported as well as any instance of `CGAL::Sqrt_extension` that is + * instantiated with one of the integral types above. + * + * \cgalModels{AosTraits_2} + */ template class Arr_algebraic_segment_traits_2 { public: - -/// \name Types -/// @{ - -/*! Value to specify whether a point should be in the interior of a segment, or - * its minimal point, or its maximal point in lexicographic order. - */ -enum Site_of_point { POINT_IN_INTERIOR = 0, MIN_ENDPOINT = -1, MAX_ENDPOINT = 1 }; - -/*! the type for bivariate polynomials, with innermost coefficient type - * `Coefficient`. Constitutes a model of the concept `Polynomial_d` with two - * variables. - * - * \sa `CGAL::Polynomial_d` - */ -typedef unspecified_type Polynomial_2; - -/*! model for the concept `AlgebraicKernel_1` - */ -typedef unspecified_type Algebraic_kernel_1; - -/*! represents coordinates of points. - * Typedef from `Algebraic_kernel_1::Algebraic_real_1` - */ -typedef unspecified_type Algebraic_real_1; - -/*! Typedef from `Algebraic_kernel_1::Bound` - */ -typedef unspecified_type Bound; - -/// @} - -/// \name Accessing functor objects -/// @{ - -/*! - - */ -Construct_curve_2 construct_curve_2_object() const; - -/*! - - */ -Construct_point_2 construct_point_2_object() const; - -/*! - - */ -Construct_x_monotone_segment_2 construct_x_monotone_segment_2_object() const; - -/// @} - -/*! - - */ -class Construct_curve_2 { -public: - -/// \name Object Creation Functors -/// @{ - -/*! Returns a `Curve_2` object that represents the curve defined by the - * polynomial `p` - */ -Curve_2 operator() (Polynomial_2 p); - -/*! Returns a `Curve_2` object specified by `s`. The passed string represents - * the defining polynomial of the curve and must be given in a MAPLE-readable - * format using "x" as first and "y" as second variable, e.g., - * \f$(x^3*y-2*x)*(-6*x-y^3*x^6)\f$ for integer coefficients, and - * \f$3/2*x*y^4-5/7*x^2+3/1\f$ for rational coefficients. - */ -Curve_2 operator() (std::string s); - -/// @} - -}; /* end Arr_algebraic_segment_traits_2::Construct_curve_2 */ - -/*! - - */ -class Construct_point_2 { -public: - -/// \name Object Creation Functors -/// @{ - -/*! Returns a `Point_2` object that represents the `arcno`-th - * point in the fiber of `cv` at \f$ x\f$-coordinate `x`, - * counted from the bottom, starting with zero. - * \pre (`cv` must not have a vertical line at `x`, - * and \f$ 0\leq arcno < c\f$, where \f$ c\f$ is the number of points - * in the fiber of `cv` at `x`.) - */ -Point_2 operator() (Algebraic_real_1 x, Curve_2 cv, int arcno); - -/*! Returns a `Point_2` object that represents the - * point on `xcv` at \f$ x\f$-coordinate `x` - * \pre (`x` is in the \f$ x\f$-range of `xcv`.) - */ -Point_2 operator() (Algebraic_real_1 x, X_monotone_curve_2 xcv); - -/*! Returns a `Point_2` object that represents (x,y) - */ -Point_2 operator() (Algebraic_real_1 x, Algebraic_real_1 y); - -/*! Returns a `Point_2` object that represents (x,y) - */ -Point_2 operator() (Coefficient x, Coefficient y); - -/*! Returns a `Point_2` object that represents (x,y) - */ -Point_2 operator() (Bound x, Bound y); - -/*! Returns a `Point_2` object that represents (x,y) - */ -Point_2 operator() (int x, int y); - -/// @} - -}; /* end Arr_algebraic_segment_traits_2::Construct_point_2 */ - -/*! - - */ -class Construct_x_monotone_segment_2 { -public: - -/// \name Object Creation Functors -/// @{ - -/*! inserts a sequence of `X_monotone_curve_2` objects (terminal segments) into - * an output container given through an output iterator. These terminal segments - * compose an \f$x\f$-monotone (or vertical) segment of a given curve that - * starts in `end_min`, and ends in `end_max`. - * - * \param cv The input curve. - * \param end_min The starting point. - * \param end_max The ending point. - * \param oi The output iterator that points at the output container. - * \return The past-the-end iterator of the output container. - * - * \pre `end_min` must have a unique \f$x\f$-monotone segment to its right, or - * `end_max` must have a unique \f$x\f$-monotone segment to its left. - * Furthermore, `end_min` and `end_max` must be connected by an - * \f$x\f$-monotone segment of `cv`) - */ -template -OutputIterator operator() (Curve_2 cv, Point_2 end_min, Point_2 end_max, - OutputIterator oi); - -/*! inserts a sequence of `X_monotone_curve_2` objects into an output container - * given through an output iterator. These segments form an \f$x\f$-monotone - * (or vertical) segment of the curve `cv`. - * - * If `site_of_p==POINT_IN_INTERIOR`, the maximal segment is - * returned that contains `p` in its interior. - * - * returned that contains `p` as its left endpoint. - * - * returned that contains `p` as its left endpoint. - * - * \pre (If `site_of_p==POINT_IN_INTERIOR`, `p` - * must be an interior point of an \f$x\f$-monotone or a vertical - * segment. - * must either have a unique \f$x\f$-monotone segment to the right, - * or a vertical segment from `p` upwards. - * must either have a unique \f$x\f$-monotone segment to the left, - * or a vertical segment from `p` downwards.) - */ -template -OutputIterator operator() (Curve_2 cv, Point_2 p, Site_of_point site_of_p, - OutputIterator out); - -/*! inserts a sequence of `X_monotone_curve_2` objects into an output container - * given through an output iterator. These segments form a straight-line - * segment connecting the points `p` and `q`. If `p` and `q` share the same - * \f$x\f$-coordinate, the constructed vertical segment consists of only one - * `X_monotone_curve_2` object and can be computed efficiently. In the - * non-vertical case, the construction is only possible if `p` and `q` have both - * rational x- and y-coordinates. - * - * \pre (`p` must not be equal to `q`.) - */ -template -OutputIterator operator() (Point_2 p, Point_2 q, OutputIterator out); - -/// @} - -}; /* end Arr_algebraic_segment_traits_2::Construct_x_monotone_segment_2 */ - -/*! Models the `ArrangementTraits_2::Curve_2` concept. - * Represents algebraic curves. Internally, the type stores - * topological-geometric information about the particular curve. - * In order to use internal caching, instances should only be created - * using the `Construct_curve_2` functor of the traits class. - */ -class Curve_2 { -public: - -/// \name Modifiers -/// @{ - -/*! returns the defining polynomial of the curve. -*/ -Polynomial_2 polynomial () const; - -/// @} - -}; /* end Arr_algebraic_segment_traits_2::Curve_2 */ - -/*! Models the `ArrangementBasicTraits_2::Point_2` concept. - * Represents points in \f$ \mathbb{R}^2\f$. Intersection points of algebraic - * curves are in general non-rational, so we need a data structure that is - * capable of representing arbitrary points with algebraic coordinates. - * - * The traits class represents algebraic coordinates by the type - * `Algebraic_real_1`, which is a model of the `AlgebraicReal_1` concept. - * A point \f$ p\f$ is stored by a triple \f$ (x,cv,arcno)\f$, - * where \f$ x\f$ is the \f$ x\f$-coordinate of a point, \f$ cv\f$ is an instance - * of `Curve_2` that contains the point, (and has no vertical line at \f$ x\f$), - * and \f$ arcno\f$ is an `int`, denoting that \f$ p\f$ is met as the - * \f$arcno\f$-th point when shooting a vertical ray at \f$ x\f$, starting from - * \f$-\infty\f$ (where counting starts with \f$ 0\f$). - * - * In addition to the methods listed below, the copy constructor and assignment - * operator for `Point_2` objects are also supported. - * - * The functor `Construct_point_2` constructs `Point_2` instances. - */ - -class Point_2 { -public: - -/// \name Modifiers -/// @{ - -/*! returns the \f$ x\f$-coordinate of `p`. - */ -Algebraic_real_1 x () const; - -/*! returns the \f$ y\f$-coordinates of `p`. - * - * Attention: As described above, points are not stored - * by their \f$ y\f$-coordinate in `Algebraic_real_1` representation. In fact, - * this representation must be computed on demand, and might become quite - * costly for points defined by high-degree polynomials. Therefore, it is - * recommended to avoid to call this function as much as possible. - */ -Algebraic_real_1 y () const; - -/*! returns a `Curve_2` instance that `p`is part of. - */ -Curve_2 curve () const; - -/*! returns the arc number of `p`. - */ -int arcno () const; - -/*! returns double-approximations of the \f$ x\f$- and \f$ y\f$-coordinates. - */ -std::pair to_double () const; - -/// @} - -}; /* end Arr_algebraic_segment_traits_2::Point_2 */ - -/*! Models the `ArrangementBasicTraits_2::X_monotone_curve_2` concept. - * Represents terminal segments of an algebraic curves, that means vertical - * segments or \f$ x\f$-monotone segments with no critical \f$ x\f$-coordinate - * in the interior of their \f$ x\f$-range. Terminal segments might either be - * bounded or unbounded. By definition, each interior point of a non-vertical - * segment has the same arc number (see the documentation of type `Point_2` - * above, which is called the arc number of the segment (note the arc - * number at the endpoints might differ). Such segments are represented - * internally by a 4-tuple \f$ (p,q,cv,arcno)\f$, where \f$ p\f$ and \f$ q\f$ - * are the endpoints, \f$ cv\f$ is the supporting curve that the segment - * belongs to, and arcno is the arc number of the segment. - * - * Arbitrary (weakly) \f$ x\f$-monotone segments are presented by a range - * of `X_monotone_curve_2` instances, whose union equals the segment. - * The functor `Construct_x_monotone_segment_2` allows their construction. - * To construct all (maximal) terminal segments of a curve, - * use the `Make_x_monotone_2` functor supplied by the traits class. - */ -class X_monotone_curve_2 { -public: - -/// \name Modifiers -/// @{ - -/*! returns the supporting algebraic curve of `s`. - */ -Curve_2 curve () const; - -/*! returns whether `s` is a vertical segment. - */ -bool is_vertical () const; - -/*! returns whether `s` has a finite endpoint on the left - */ -bool is_finite (CGAL::Arr_curve_end ce) const; - -/*! \pre (The corresponding curve end is finite) - */ -Point_2 curve_end (CGAL::Arr_curve_end ce) const; - -/*! returns the arc number of the segment. - * \pre (The segment is non-vertical) - */ -int arcno () const; - -/*! -returns the \f$ x\f$-coordinate of a vertical segment. -\pre (The segment is vertical) -*/ -Algebraic_real_1 x () const; - -/// @} - -}; /* end Arr_algebraic_segment_traits_2::X_monotone_curve_2 */ - + /// \name Types + /// @{ + + /*! Value to specify whether a point should be in the interior of a segment, or + * its minimal point, or its maximal point in lexicographic order. + */ + enum Site_of_point {POINT_IN_INTERIOR = 0, MIN_ENDPOINT = -1, MAX_ENDPOINT = 1}; + + /*! the type for bivariate polynomials, with innermost coefficient type + * `Coefficient`. Constitutes a model of the concept `Polynomial_d` with two + * variables. + * + * \sa `CGAL::Polynomial_d` + */ + typedef unspecified_type Polynomial_2; + + /// model for the concept `AlgebraicKernel_1` + typedef unspecified_type Algebraic_kernel_1; + + /*! represents coordinates of points. + * Typedef from `Algebraic_kernel_1::Algebraic_real_1` + */ + typedef unspecified_type Algebraic_real_1; + + /// Typedef from `Algebraic_kernel_1::Bound` + typedef unspecified_type Bound; + + /// @} + + /// \name Accessing functor objects + /// @{ + + /// + Construct_curve_2 construct_curve_2_object() const; + + /// + Construct_point_2 construct_point_2_object() const; + + /// + Construct_x_monotone_segment_2 construct_x_monotone_segment_2_object() const; + + /// @} + + /*! + */ + class Construct_curve_2 { + public: + /// \name Object Creation Functors + /// @{ + + /*! Returns a `Curve_2` object that represents the curve defined by the + * polynomial `p`. + */ + Curve_2 operator()(Polynomial_2 p); + + /*! Returns a `Curve_2` object specified by `s`. The passed string + * represents the defining polynomial of the curve and must be given in a + * MAPLE-readable format using "x" as first and "y" as second variable, + * e.g., \f$(x^3*y-2*x)*(-6*x-y^3*x^6)\f$ for integer coefficients, and + * \f$3/2*x*y^4-5/7*x^2+3/1\f$ for rational coefficients. + */ + Curve_2 operator()(std::string s); + + /// @} + + }; /* end Arr_algebraic_segment_traits_2::Construct_curve_2 */ + + /*! + */ + class Construct_point_2 { + public: + /// \name Object Creation Functors + /// @{ + + /*! Returns a `Point_2` object that represents the `arcno`-th + * point in the fiber of `cv` at \f$x\f$-coordinate `x`, + * counted from the bottom, starting with zero. + * + * \pre `cv` must not have a vertical line at `x`, + * and \f$0\leq arcno < c\f$, where \f$c\f$ is the number of points + * in the fiber of `cv` at `x`. + */ + Point_2 operator()(Algebraic_real_1 x, Curve_2 cv, int arcno); + + /*! Returns a `Point_2` object that represents the point on + * `xcv` at \f$x\f$-coordinate `x` + * + * \pre `x` is in the \f$x\f$-range of `xcv`. + */ + Point_2 operator()(Algebraic_real_1 x, X_monotone_curve_2 xcv); + + /*! Returns a `Point_2` object that represents (x,y) + */ + Point_2 operator()(Algebraic_real_1 x, Algebraic_real_1 y); + + /*! Returns a `Point_2` object that represents (x,y) + */ + Point_2 operator()(Coefficient x, Coefficient y); + + /*! Returns a `Point_2` object that represents (x,y) + */ + Point_2 operator()(Bound x, Bound y); + + /*! Returns a `Point_2` object that represents (x,y) + */ + Point_2 operator()(int x, int y); + + /// @} + + }; /* end Arr_algebraic_segment_traits_2::Construct_point_2 */ + + /*! + */ + class Construct_x_monotone_segment_2 { + public: + /// \name Object Creation Functors + /// @{ + + /*! inserts a sequence of `X_monotone_curve_2` objects (terminal segments) + * into an output container given through an output iterator. These terminal + * segments compose an \f$x\f$-monotone (or vertical) segment of a given + * curve that starts in `end_min`, and ends in `end_max`. + * + * \param cv The input curve. + * \param end_min The starting point. + * \param end_max The ending point. + * \param oi The output iterator that points at the output container. + * \return The past-the-end iterator of the output container. + * + * \pre `end_min` must have a unique \f$x\f$-monotone segment to its right, + * or `end_max` must have a unique \f$x\f$-monotone segment to its + * Furthermore, `end_min` and `end_max` must be connected by an + * left. \f$x\f$-monotone segment of `cv`) + */ + template + OutputIterator operator()(Curve_2 cv, Point_2 end_min, Point_2 end_max, + OutputIterator oi); + + /*! inserts a sequence of `X_monotone_curve_2` objects into an output + * container given through an output iterator. These segments form an + * \f$x\f$-monotone (or vertical) segment of the curve `cv`. + * + * If `site_of_p` == `POINT_IN_INTERIOR`, the maximal segment that contains + * `p` in its interior is returned . + * + * If `site_of_p` == `MIN_ENDPOINT`, the segment that contains + * `p` as its left endpoint returned . + * + * If `site_of_p` == `MAX_ENDPOINT`, the segment that contains + * `p` as its right endpoint returned . + * + * \pre If `site_of_p` == `POINT_IN_INTERIOR`, `p` must be an interior point + * of an \f$x\f$-monotone or a vertical segment. + * + * \pre If `site_of_p` == `MIN_ENDPOINT`, `p` must either have a unique + * \f$x\f$-monotone segment to the right, or a vertical segment from `p` + * upwards. + * + * \pre If `site_of_p` == `MAX_ENDPOINT`, `p` must either have a unique + * \f$x\f$-monotone segment to the left, or a vertical segment from `p` + * downwards. + */ + template + OutputIterator operator()(Curve_2 cv, Point_2 p, Site_of_point site_of_p, + OutputIterator out); + + /*! inserts a sequence of `X_monotone_curve_2` objects into an output + * container given through an output iterator. These segments form a + * straight-line segment connecting the points `p` and `q`. If `p` and `q` + * share the same \f$x\f$-coordinate, the constructed vertical segment + * consists of only one `X_monotone_curve_2` object and can be computed + * efficiently. In the non-vertical case, the construction is only possible + * if `p` and `q` have both rational x- and y-coordinates. + * + * \pre `p` must not be equal to `q`. + */ + template + OutputIterator operator()(Point_2 p, Point_2 q, OutputIterator out); + + /// @} + }; /* end Arr_algebraic_segment_traits_2::Construct_x_monotone_segment_2 */ + + /*! Models the `AosTraits_2::Curve_2` concept. + * Represents algebraic curves. Internally, the type stores + * topological-geometric information about the particular curve. + * In order to use internal caching, instances should only be created + * using the `Construct_curve_2` functor of the traits class. + */ + class Curve_2 { + public: + /// \name Modifiers + /// @{ + + /*! returns the defining polynomial of the curve. + */ + Polynomial_2 polynomial() const; + + /// @} + }; /* end Arr_algebraic_segment_traits_2::Curve_2 */ + + /*! Models the `AosBasicTraits_2::Point_2` concept. + * Represents points in \f$\mathbb{R}^2\f$. Intersection points of algebraic + * curves are in general non-rational, so we need a data structure that is + * capable of representing arbitrary points with algebraic coordinates. + * + * The traits class represents algebraic coordinates by the type + * `Algebraic_real_1`, which is a model of the `AlgebraicReal_1` concept. A + * point \f$p\f$ is stored by a triple \f$(x,cv,arcno)\f$, where \f$x\f$ is + * the \f$x\f$-coordinate of a point, \f$cv\f$ is an instance of `Curve_2` + * that contains the point, (and has no vertical line at \f$x\f$), and + * \f$arcno\f$ is an `int`, denoting that \f$p\f$ is met as the \f$arcno\f$-th + * point when shooting a vertical ray at \f$x\f$, starting from \f$-\infty\f$ + * (where counting starts with \f$0\f$). + * + * In addition to the methods listed below, the copy constructor and + * assignment operator for `Point_2` objects are also supported. + * + * The functor `Construct_point_2` constructs `Point_2` instances. + */ + + class Point_2 { + public: + /// \name Modifiers + /// @{ + + /*! returns the \f$x\f$-coordinate of `p`. + */ + Algebraic_real_1 x() const; + + /*! returns the \f$y\f$-coordinates of `p`. + * + * Attention: As described above, points are not stored by their + * \f$y\f$-coordinate in `Algebraic_real_1` representation. In fact, + * this representation must be computed on demand, and might become quite + * costly for points defined by high-degree polynomials. Therefore, it is + * recommended to avoid to call this function as much as possible. + */ + Algebraic_real_1 y() const; + + /*! returns a `Curve_2` instance that `p`is part of. + */ + Curve_2 curve() const; + + /*! returns the arc number of `p`. + */ + int arcno() const; + + /*! returns double-approximations of the \f$x\f$- and \f$y\f$-coordinates. + */ + std::pair to_double() const; + + /// @} + }; /* end Arr_algebraic_segment_traits_2::Point_2 */ + + /*! Models the `AosBasicTraits_2::X_monotone_curve_2` concept. + * Represents terminal segments of an algebraic curves, that means vertical + * segments or \f$x\f$-monotone segments with no critical \f$x\f$-coordinate + * in the interior of their \f$x\f$-range. Terminal segments might either be + * bounded or unbounded. By definition, each interior point of a non-vertical + * segment has the same arc number (see the documentation of type `Point_2` + * above, which is called the arc number of the segment (note the arc + * number at the endpoints might differ). Such segments are represented + * internally by a 4-tuple \f$(p,q,cv,arcno)\f$, where \f$p\f$ and \f$q\f$ + * are the endpoints, \f$cv\f$ is the supporting curve that the + * segment belongs to, and arcno is the arc number of the segment. + * + * Arbitrary (weakly) \f$x\f$-monotone segments are presented by a range + * of `X_monotone_curve_2` instances, whose union equals the segment. + * The functor `Construct_x_monotone_segment_2` allows their construction. + * To construct all (maximal) terminal segments of a curve, + * use the `Make_x_monotone_2` functor supplied by the traits class. + */ + class X_monotone_curve_2 { + public: + /// \name Modifiers + /// @{ + + /*! returns the supporting algebraic curve of `s`. + */ + Curve_2 curve() const; + + /*! returns whether `s` is a vertical segment. + */ + bool is_vertical() const; + + /*! returns whether `s` has a finite endpoint on the left + */ + bool is_finite(CGAL::Arr_curve_end ce) const; + + /*! \pre The corresponding curve end is finite. + */ + Point_2 curve_end(CGAL::Arr_curve_end ce) const; + + /*! returns the arc number of the segment. + * + * \pre The segment is non-vertical. + */ + int arcno() const; + + /*! returns the \f$x\f$-coordinate of a vertical segment. + * + * \pre The segment is vertical. + */ + Algebraic_real_1 x() const; + + /// @} + }; /* end Arr_algebraic_segment_traits_2::X_monotone_curve_2 */ }; /* end Arr_algebraic_segment_traits_2 */ } /* end namespace CGAL */ diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_batched_point_location.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_batched_point_location.h index d71d0f7faf9..3ced6434b63 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_batched_point_location.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_batched_point_location.h @@ -30,9 +30,8 @@ namespace CGAL { */ template -OutputIterator locate (const Arrangement_2& arr, - InputIterator begin, - InputIterator end, - OutputIterator oi); +OutputIterator locate(const Arrangement_2& arr, + InputIterator begin, InputIterator end, + OutputIterator oi); } /* namespace CGAL */ diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_bounded_planar_topology_traits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_bounded_planar_topology_traits_2.h index 41ee06cfe88..e6aca42153d 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_bounded_planar_topology_traits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_bounded_planar_topology_traits_2.h @@ -62,10 +62,10 @@ public: /// \name Accessors /// @{ - /*! Obtain the DCEL (const version). */ + /*! Obtain the \dcel (const version). */ const Dcel& dcel() const; - /*! Obtain the DCEL (non-const version). */ + /*! Obtain the \dcel (non-const version). */ Dcel& dcel(); /*! Obtain the unbounded face (const version). */ diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_circle_segment_traits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_circle_segment_traits_2.h index 805cfd833bc..4a9739925f4 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_circle_segment_traits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_circle_segment_traits_2.h @@ -11,18 +11,18 @@ namespace CGAL { * the supporting lines of the line segments are of type `Kernel::Line_2`. * Thus, the coordinates of the center of supporting circles, and its squared * radius are of type `Kernel::FT`, which should be an exact rational - * number-type; similarly, the coefficients of each supporting line \f$ ax + by - * + c = 0\f$ are also of type `Kernel::FT`. Note however that the intersection - * point between two such arcs do not have rational coordinates in general. For - * this reason, we do not require the endpoints of the input arcs and segments - * to have rational coordinates. + * number-type; similarly, the coefficients of each supporting line + * \f$ax + by + c = 0\f$ are also of type `Kernel::FT`. Note however that the + * intersection point between two such arcs do not have rational coordinates in + * general. For this reason, we do not require the endpoints of the input arcs + * and segments to have rational coordinates. * * The nested `Point_2` type defined by the traits class is therefore * different than the `Kernel::Point_2` type. Its coordinates are of type - * `CoordNT`, which an instantiation of `Sqrt_extension` where `NT = - * ROOT = Kernel::FT`. Moreover, the third and fourth (hidden) template - * parameters of `Sqrt_extension` are set to `CGAL::Tag_true`, which - * enables efficient comparison among different extensions. + * `CoordNT`, which an instantiation of `Sqrt_extension` where + * `NT` = `ROOT = `Kernel::FT`. Moreover, the third and fourth (hidden) + * template parameters of `Sqrt_extension` are set to `CGAL::Tag_true`, + * which enables efficient comparison among different extensions. * * For more details see the documentation of `Sqrt_extension`. * @@ -35,10 +35,9 @@ namespace CGAL { * \cgalModels{AosTraits_2,AosDirectionalXMonotoneTraits_2} * */ -template< typename Kernel > +template class Arr_circle_segment_traits_2 { public: - /*! The `Curve_2` class nested within the traits class can represent * arbitrary circular arcs, full circles and line segments and support their * construction in various ways. The copy and default constructor as well as @@ -111,9 +110,9 @@ public: * * \pre The three points must not be collinear. */ - Curve_2 (const typename Kernel::Point_2& source, - const typename Kernel::Point_2& mid, - const typename Kernel::Point_2& target); + Curve_2(const typename Kernel::Point_2& source, + const typename Kernel::Point_2& mid, + const typename Kernel::Point_2& target); /// @} @@ -162,7 +161,6 @@ public: typename Kernel::Circle_2 supporting_circle() const; /// @} - }; /* end Arr_circle_segment_traits_2::Curve_2 */ @@ -172,16 +170,13 @@ public: */ class Point_2 { public: - /// \name Types /// @{ - /*! the `Kernel::FT` type. - */ + /// the `Kernel::FT` type. typedef unspecified_type Rational; - /*! the algebraic number-type. - */ + /// the algebraic number-type. typedef unspecified_type CoordNT; /// @} @@ -193,11 +188,11 @@ public: */ Point_2(); - /*! creates the point \f$ (x,y)\f$. + /*! creates the point \f$(x,y)\f$. */ Point_2(const Rational& x, const Rational& y); - /*! creates the point \f$ (x,y)\f$. + /*! creates the point \f$(x,y)\f$. */ Point_2(const CoordNT& x, const CoordNT& y); @@ -206,36 +201,34 @@ public: /// \name Access Functions /// @{ - /*! returns the \f$ x\f$-coordinate. + /*! returns the \f$x\f$-coordinate. */ CoordNT x() const; - /*! returns the \f$ y\f$-coordinate. + /*! returns the \f$y\f$-coordinate. */ CoordNT y() const; /// @} - }; /* end Arr_circle_segment_traits_2::Point_2 */ /*! The `X_monotone_curve_2` class nested within the traits class can - * represent \f$ x\f$-monotone and line segments (which are always weakly + * represent \f$x\f$-monotone and line segments (which are always weakly * \f$x\f$-monotone). The copy and default constructor as well as the * assignment operator are provided. In addition, an `operator<<` for the * curves is defined for standard output streams. */ class X_monotone_curve_2 { public: - /// \name Creation /// @{ /*! constructs an curve corresponding to the line segment directed * from `source` to `target`, both having rational coordinates. */ - X_monotone_curve_2 (const typename Kernel::Point_2& source, - const typename Kernel::Point_2& target); + X_monotone_curve_2(const typename Kernel::Point_2& source, + const typename Kernel::Point_2& target); /*! constructs an curve corresponding to the line segment supported by * the given line, directed from `source` to `target`. Note that the two @@ -254,7 +247,7 @@ public: * * \pre Both endpoints must lie on the given supporting circle. * - * \pre The circular arc is \f$ x\f$-monotone. + * \pre The circular arc is \f$x\f$-monotone. */ X_monotone_curve_2(const typename Kernel::Circle_2& circ, const Point_2& source, const Point_2& target, @@ -275,7 +268,7 @@ public: /*! returns true if `xcv` is directed right, false otherwise. */ - bool is_directed_right () const; + bool is_directed_right() const; /*! returns the left (lexicographically smaller) endpoint of `xcv`. */ @@ -292,11 +285,11 @@ public: /*! determines whether `xcv` is a line segment. */ - bool is_linear () const; + bool is_linear() const; /*! determines whether `xcv` is a circular arc. */ - bool is_circular () const; + bool is_circular() const; /*! returns the supporting line of `xcv`. * @@ -325,13 +318,12 @@ public: /*! Trims the given x-monotone curve to an from src to tgt. * \ pre `src` and `tgt` lies on the curve */ - X_monotone_curve_2(const X_monotone_curve_2& xcv, const Point_2& src, const Point_2& tgt)const + /// @} } /* end Arr_circle_segment_traits_2::Trim_2 */ - }; /* end Arr_circle_segment_traits_2 */ } /* end namespace CGAL */ diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_circular_arc_traits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_circular_arc_traits_2.h index 014e1f5ec21..fb7945956e2 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_circular_arc_traits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_circular_arc_traits_2.h @@ -1,19 +1,14 @@ - namespace CGAL { -/*! -\ingroup PkgArrangementOnSurface2TraitsClasses +/*! \ingroup PkgArrangementOnSurface2TraitsClasses + * + * This class is a traits class for \cgal arrangements, built on top of a model + * of concept `CircularKernel`. + * It provides curves of type `CGAL::Circular_arc_2`. + * + * \cgalModels{ArrangementTraits_2} + */ +template +class Arr_circular_arc_traits_2 {}; -This class is a traits class for \cgal arrangements, built on top of a model of -concept `CircularKernel`. -It provides curves of type `CGAL::Circular_arc_2`. - -\cgalModels{ArrangementTraits_2} - -*/ -template< typename CircularKernel > -class Arr_circular_arc_traits_2 { -public: - -}; /* end Arr_circular_arc_traits_2 */ } /* end namespace CGAL */ diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_circular_line_arc_traits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_circular_line_arc_traits_2.h index c7bc38001fc..dd280f33fbf 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_circular_line_arc_traits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_circular_line_arc_traits_2.h @@ -1,23 +1,17 @@ - namespace CGAL { -/*! -\ingroup PkgArrangementOnSurface2TraitsClasses +/*! \ingroup PkgArrangementOnSurface2TraitsClasses + * + * This class is a traits class for \cgal arrangements, built on top of a model + * of concept `CircularKernel`. It provides curves that can be of both types + * `CGAL::Line_arc_2` or `CGAL::Circular_arc_2`. + * + * It uses the + * std::variant. + * + * \cgalModels{AosTraits_2} + */ +template +class Arr_circular_line_arc_traits_2 {}; -This class is a traits class for \cgal arrangements, built on top of a -model of concept `CircularKernel`. It provides curves that can be -of both types -`CGAL::Line_arc_2` or -`CGAL::Circular_arc_2`. - -It uses the std::variant. - -\cgalModels{ArrangementTraits_2} - -*/ -template< typename CircularKernel > -class Arr_circular_line_arc_traits_2 { -public: - -}; /* end Arr_circular_line_arc_traits_2 */ } /* end namespace CGAL */ diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_conic_traits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_conic_traits_2.h index 1061f529c92..c14387ca411 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_conic_traits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_conic_traits_2.h @@ -13,13 +13,13 @@ namespace CGAL { * *
        - *
      • If \f$4 r s - t^2 > 0\f$, \f$ C\f$ is an ellipse. A special case occurs - * when \f$r = s\f$ and \f$ t = 0\f$, when \f$ C\f$ becomes a circle. + *
      • If \f$4 r s - t^2 > 0\f$, \f$C\f$ is an ellipse. A special case occurs + * when \f$r = s\f$ and \f$t = 0\f$, when \f$C\f$ becomes a circle. * - *
      • If \f$4 r s - t^2 < 0\f$, \f$ C\f$ is a hyperbola. + *
      • If \f$4 r s - t^2 < 0\f$, \f$C\f$ is a hyperbola. * - *
      • If \f$4 r s - t^2 = 0\f$, \f$ C\f$ is a parabola. A degenerate case - * occurs when \f$r = s = t = 0\f$, when \f$ C\f$ is a line. + *
      • If \f$4 r s - t^2 = 0\f$, \f$C\f$ is a parabola. A degenerate case + * occurs when \f$r = s = t = 0\f$, when \f$C\f$ is a line. * *
      * @@ -27,14 +27,14 @@ namespace CGAL { * *
        * - *
      • A full ellipse (or a circle) \f$ C\f$. + *
      • A full ellipse (or a circle) \f$C\f$. * - *
      • The tuple \f$ \langle C, p_s, p_t, o \rangle\f$, where \f$ C\f$ is the - * supporting conic curve, with the arc endpoints being \f$ p_s\f$ and \f$ - * p_t\f$ (the source and target points, respectively). The orientation \f$ o\f$ - * indicates whether we proceed from \f$ p_s\f$ to \f$ p_t\f$ in a clockwise or - * in a counterclockwise direction. Note that \f$ C\f$ may also correspond to a - * line or to pair of lines---in this case \f$ o\f$ may specify a `COLLINEAR` + *
      • The tuple \f$\langle C, p_s, p_t, o \rangle\f$, where \f$C\f$ is the + * supporting conic curve, with the arc endpoints being \f$p_s\f$ and \f$ + * p_t\f$ (the source and target points, respectively). The orientation \f$o\f$ + * indicates whether we proceed from \f$p_s\f$ to \f$p_t\f$ in a clockwise or + * in a counterclockwise direction. Note that \f$C\f$ may also correspond to a + * line or to pair of lines---in this case \f$o\f$ may specify a `COLLINEAR` * orientation. * *
      @@ -54,7 +54,7 @@ namespace CGAL { * must be rational numbers. This guarantees that the coordinates of all * arrangement vertices (in particular, those representing intersection points) * are algebraic numbers of degree \f$4\f$ (a real number \f$\alpha\f$ is an - * algebraic number of degree \f$d\f$ if there exist a polynomial \f$ p\f$ with + * algebraic number of degree \f$d\f$ if there exist a polynomial \f$p\f$ with * integer coefficient of degree \f$d\f$ such that \f$p(\alpha) = 0\f$). * We therefore require separate representations of the curve * coefficients and the point coordinates. The `NtTraits` should be substituted @@ -87,22 +87,19 @@ namespace CGAL { template class Arr_conic_traits_2 { public: - /// \name Types /// @{ - /*! the `NtTraits::Rational` type (and also the `RatKernel::FT` type). - */ + /// the `NtTraits::Rational` type (and also the `RatKernel::FT` type). typedef unspecified_type Rational; - /*! the `NtTraits::Algebraic` type (and also the `AlgKernel::FT` type). - */ + /// the `NtTraits::Algebraic` type (and also the `AlgKernel::FT` type). typedef unspecified_type Algebraic; /// @} /*! The `Curve_2` class nested within the conic-arc traits can represent - * arbitrary conic arcs and support their construction in various ways. The + * arbitrary conic arcs and support their construction in various ways. The * copy and default constructor as well as the assignment operator are * provided for conic arcs. In addition, an `operator<<` for the curves is * defined for standard output streams. @@ -211,7 +208,6 @@ public: void set_target(const Point_2 & pt); /// @} - }; /* end Arr_conic_traits_2::Curve_2 */ /*! \class X_monotone_curve_2 @@ -227,7 +223,6 @@ public: */ class X_monotone_curve_2 { public: - /// \name Creation /// @{ @@ -249,7 +244,6 @@ public: const Point_2& right() const; /// @} - }; /* end Arr_conic_traits_2::X_monotone_curve_2 */ /*! The `Point_2` class nested within the conic-arc traits is @@ -366,7 +360,8 @@ public: * respectively) is available, and their exact locations are given * implicitly, specified by the intersections of the supporting conic curve * with \f$r_1 x^2 + s_1 y^2 + t_1 x y + u_1 x + v_1 y + w_1 = 0\f$ and - * \f$r_2 x^2 + s_2 y^2 + t_2 x y + u_2 x + v_2 y + w_2 = 0\f$, respectively. + * \f$r_2 x^2 + s_2 y^2 + t_2 x y + u_2 x + v_2 y + w_2 = 0\f$, + * respectively. * * \pre The two auxiliary curves specifying the endpoints really intersect * with the supporting conic curve, such that the arc endpoints define a @@ -407,11 +402,13 @@ public: * \pre `source` and `target` must not be the same. * \return A segment connecting `source` and `target`. */ - X_monotone_curve_2 operator()(const Point_2& source, const Point_2& target) const; + X_monotone_curve_2 operator()(const Point_2& source, + const Point_2& target) const; /*! Constructs a special segment of a given line connecting to given * endpoints. - * \param a, b, c The coefficients of the supporting line (\f$ax + by + c = 0\f$). + * \param a, b, c The coefficients of the supporting line + * (\f$ax + by + c = 0\f$). * \param source The source point. * \param target The target point. * \pre `source` and `target` must not be the same. @@ -419,7 +416,8 @@ public: */ X_monotone_curve_2 operator()(const Algebraic& a, const Algebraic& b, const Algebraic& c, - const Point_2& source, const Point_2& target) const; + const Point_2& source, + const Point_2& target) const; }; /*! \class Construct_bbox_2 @@ -527,6 +525,6 @@ public: Approximate_2 approximate_2_object() const; /// @} - }; /* end Arr_conic_traits_2 */ + } /* end namespace CGAL */ diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_consolidated_curve_data_traits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_consolidated_curve_data_traits_2.h index 2ed18e6be6b..585bb0b7448 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_consolidated_curve_data_traits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_consolidated_curve_data_traits_2.h @@ -1,170 +1,133 @@ - namespace CGAL { -/*! -\ingroup PkgArrangementOnSurface2TraitsClasses +/*! \ingroup PkgArrangementOnSurface2TraitsClasses + * + * The class `Arr_consolidated_curve_data_traits_2` is a model of the concept + * `AosTraits_2`, and serves as a decorator class that enables the extension of + * the curve type defined by the `Traits` parameter. The traits class inherits + * its point type from `Traits::Point_2`, and defines the types `Curve_2` and + * `X_monotone_curve_2` extended with extraneous data fields of type `Data`. -The class `Arr_consolidated_curve_data_traits_2` is a model of the concept `ArrangementTraits_2`, -and serves as a decorator class that enables the extension of the curve -type defined by the `Traits` parameter. The traits class inherits its -point type from `Traits::Point_2`, and defines the types -`Curve_2` and `X_monotone_curve_2` extended with extraneous data -fields of type `Data`. + * Each `Curve_2` object is associated with a single data field of type `Data`, + * and each `X_monotone_curve_2` object is associated with a set of unique data + * objects. When a curve is subdivided into \f$x\f$-monotone subcurves, all + * resulting subcurves are associated with a list containing a single data + * object, copied from the inducing curve. When an \f$x\f$-monotone curve is + * split, its data set is duplicated, and inserted into the sets of both + * resulting subcurves. In case two (or more) \f$x\f$-monotone curves overlap, + * their data sets are consolidated, and are inserted into the set of the + * \f$x\f$-monotone curve that represents the overlap. -Each `Curve_2` object is associated with a single data field of type -`Data`, and each `X_monotone_curve_2` object is associated with -a set of unique data objects. When a curve is subdivided into \f$ x\f$-monotone -subcurves, all resulting subcurves are associated with a list containing -a single data object, copied from the inducing curve. When an \f$ x\f$-monotone -curve is split, its data set is duplicated, and inserted into the sets of -both resulting subcurves. In case two (or more) \f$ x\f$-monotone curves -overlap, their data sets are consolidated, and are inserted into the set -of the \f$ x\f$-monotone curve that represents the overlap. - -\cgalModels{ArrangementTraits_2} - -*/ -template< typename Traits, typename Data > -class Arr_consolidated_curve_data_traits_2 - : public Arr_curve_data_traits_2, - _Consolidate_unique_lists, - Data> -{ + * \cgalModels{AosTraits_2} + */ +template +class Arr_consolidated_curve_data_traits_2 : + public Arr_curve_data_traits_2, + _Consolidate_unique_lists, Data> { public: + /// \name Types + /// @{ -/// \name Types -/// @{ + /// the base traits-class. + typedef Traits Base_traits_2; -/*! -the base traits-class. -*/ -typedef Traits Base_traits_2; + /// the base curve. + typedef typename Base_traits_2::Curve_2 Base_curve_2; -/*! -the base curve. -*/ -typedef typename Base_traits_2::Curve_2 Base_curve_2; + /// the base \f$x\f$-monotone curve curve. + typedef typename Base_traits_2::X_monotone_curve_2 Base_x_monotone_curve_2; -/*! -the base \f$ x\f$-monotone curve curve. -*/ -typedef typename Base_traits_2::X_monotone_curve_2 Base_x_monotone_curve_2; + /// a set of data objects that is associated with an \f$x\f$-monotone curve. + typedef unspecified_type typedef Data_container; -/*! -a set of data objects that is associated with an \f$ x\f$-monotone curve. -*/ -typedef unspecified_type typedef Data_container; + /// a non-mutable iterator for the data objects in the data container. + typedef unspecified_type typedef Data_iterator; -/*! -a non-mutable iterator for the data objects in the data container. -*/ -typedef unspecified_type typedef Data_iterator; + /// @} -/// @} + /*! The `Data_container` class nested within the consolidated + * curve-data traits and associated with the `Traits::X_monotone_curve_2` type + * is maintained as a list with unique data objects. This representation is + * simple and efficient in terms of memory consumption. It also requires that + * the `Data` class supports only the equality operator. Note however that + * most set operations require linear time. + */ + class Data_container { + public: + /// \name Creation + /// @{ + /*! default constructor. + */ + Data_container(); -/*! + /*! constructs set containing a single `data` object. + */ + Data_container(const Data& data); + /// @} -The `Data_container` class nested within the consolidated -curve-data traits and associated with the `Traits::X_monotone_curve_2` -type is maintained as a list with unique data objects. This representation is -simple and efficient in terms of memory consumption. It also requires that -the `Data` class supports only the equality operator. Note however that -most set operations require linear time. + /// \name Access Functions + /// @{ -*/ -class Data_container { -public: + /*! returns the number of data objects in the set. + */ + std::size_t size() const; -/// \name Creation -/// @{ + /*! returns an iterator pointing to the first data object. + */ + Data_iterator begin() const; -/*! -default constructor. -*/ -Data_container (); + /*! returns a past-the-end iterator for the data objects. + */ + Data_iterator end() const; -/*! -constructs set containing a single `data` object. -*/ -Data_container (const Data& data); + /*! returns the first data object inserted into the set. + * \pre The number of data objects is not \f$0\f$. + */ + const Data& front() const; -/// @} + /*! returns the last data object inserted into the set. + * \pre The number of data objects is not \f$0\f$. + */ + const Data& back() const; -/// \name Access Functions -/// @{ + /// @} -/*! -returns the number of data objects in the set. -*/ -std::size_t size () const; + /// \name Predicates + /// @{ -/*! -returns an iterator pointing to the first data object. -*/ -Data_iterator begin () const; + /*! check if the two sets contain the same data objects + * (regardless of order). + */ + bool operator==(const Data_container& other) const; -/*! -returns a past-the-end iterator for the data objects. -*/ -Data_iterator end () const; + /*! find the given `data` object in the set and returns an iterator + * for this object, or `end()` if it is not found. + */ + Data_iterator find(const Data& data); -/*! -returns the first data object inserted into the set. -\pre The number of data objects is not \f$ 0\f$. -*/ -const Data& front () const; + /// @} -/*! -returns the last data object inserted into the set. -\pre The number of data objects is not \f$ 0\f$. -*/ -const Data& back () const; + /// \name Modifiers + /// @{ -/// @} - -/// \name Predicates -/// @{ - -/*! -check if the two sets contain the same data objects (regardless of order). -*/ -bool operator== (const Data_container& other) const; - -/*! -find the given `data` object in the set and returns an iterator -for this object, or `end()` if it is not found. -*/ -Data_iterator find (const Data& data); - -/// @} - -/// \name Modifiers -/// @{ - -/*! -inserts the given `data` object into the set. Returns `true` on -success, or `false` if the set already contains the object. -*/ -bool insert (const Data& data); - -/*! -erases the given `data` object from the set. Returns `true` on -success, or `false` if the set does not contain the object. -*/ -bool erase (const Data& data); - -/*! -clears the set. -*/ -void clear (); - -/// @} - -}; /* end Arr_consolidated_curve_data_traits_2::Data_container */ + /*! inserts the given `data` object into the set. Returns `true` on + * success, or `false` if the set already contains the object. + */ + bool insert(const Data& data); + /*! erases the given `data` object from the set. Returns `true` on + * success, or `false` if the set does not contain the object. + */ + bool erase(const Data& data); + /*! clears the set. + */ + void clear(); + /// @} + }; /* end Arr_consolidated_curve_data_traits_2::Data_container */ }; /* end Arr_consolidated_curve_data_traits_2 */ + } /* end namespace CGAL */ diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_curve_data_traits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_curve_data_traits_2.h index 9fcb837d7ac..bf3df9d53d4 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_curve_data_traits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_curve_data_traits_2.h @@ -4,8 +4,8 @@ namespace CGAL { * * The class `Arr_curve_data_traits_2` is a model of the `AosTraits_2` * concept and serves as a decorator class that allows the extension of the - * curves defined by the base traits-class (the `Tr` parameter), which serves as - * a geometric traits-class (a model of the `AosTraits_2` concept), with + * curves defined by the base traits-class (the `Tr` parameter), which serves + * as a geometric traits-class (a model of the `AosTraits_2` concept), with * extraneous (non-geometric) data fields. * * The traits class inherits its point type from `Traits::Point_2`, and defines @@ -13,7 +13,7 @@ namespace CGAL { * * Each `Curve_2` object is associated with a single data field of type `CData`, * and each `X_monotone_curve_2` object is associated with a single data field - * of type `XData`. When a curve is subdivided into \f$ x\f$-monotone subcurves, + * of type `XData`. When a curve is subdivided into \f$x\f$-monotone subcurves, * its data field is converted using the conversion functor, which is specified * by the `Cnv` template-parameter, and the resulting objects is copied to all * `X_monotone_curve_2` objects induced by this curve. The conversion functor @@ -24,21 +24,18 @@ namespace CGAL { * By default, the two data types are the same, so the conversion operator * is trivial: * - *
      - * - * - * + *
      - * `CData` = - * - * `XData` - *
      - * `Cnv` = - * - * `_Default_convert_functor` - *
      + * + * + * + * + * + * + * + * *
      `CData` = `XData`
      `Cnv` =`_Default_convert_functor`
      * - * In case two (or more) \f$ x\f$-monotone curves overlap, their data fields are + * In case two (or more) \f$x\f$-monotone curves overlap, their data fields are * merged to a single field, using the merge functor functor, which is specified * by the `Mrg` template-parameter. This functor should provide an operator with * the following prototype: @@ -46,7 +43,7 @@ namespace CGAL { * `XData operator() (const XData& d1, const XData& d2) const;` * * which returns a single data object that represents the merged data field of - * `d1` and `d2`. The \f$ x\f$-monotone curve that represents the overlap is + * `d1` and `d2`. The \f$x\f$-monotone curve that represents the overlap is * associated with the output of this functor. * * \cgalModels{AosTraits_2} @@ -57,36 +54,28 @@ public: /// \name Types /// @{ - /*! the base traits-class. - */ + /// the base traits-class. typedef Tr Base_traits_2; - /*! the base curve. - */ + /// the base curve. typedef typename Base_traits_2::Curve_2 Base_curve_2; - /*! the base \f$ x\f$-monotone curve curve. - */ + /// the base \f$x\f$-monotone curve curve. typedef typename Base_traits_2::X_monotone_curve_2 Base_x_monotone_curve_2; - /*! the point type. - */ + /// the point type. typedef typename Base_traits_2::Point_2 Point_2; - /*! the merge functor. - */ + /// the merge functor. typedef Mrg Merge; - /*! the conversion functor. - */ + /// the conversion functor. typedef Cnv Convert; - /*! the type of data associated with curves. - */ + /// the type of data associated with curves. typedef CData Curve_data; - /*! the type of data associated with \f$ x\f$-monotone curves. - */ + /// the type of data associated with \f$x\f$-monotone curves. typedef XData X_monotone_curve_data; /// @} @@ -128,47 +117,47 @@ public: void set_data(const Curve_data& data); /// @} -}; /* end Arr_curve_data_traits_2::Curve_2 */ + }; /* end Arr_curve_data_traits_2::Curve_2 */ -/*! The `X_monotone_curve_2` class nested within the curve-data traits extends - * the `Base_traits_2::X_monotone_curve_2` type with an extra data field. - */ -class X_monotone_curve_2 : public Base_x_monotone_curve_2 { -public: - /// \name Creation - /// @{ - - /*! default constructor. + /*! The `X_monotone_curve_2` class nested within the curve-data traits extends + * the `Base_traits_2::X_monotone_curve_2` type with an extra data field. */ - X_monotone_curve_2(); + class X_monotone_curve_2 : public Base_x_monotone_curve_2 { + public: + /// \name Creation + /// @{ - /*! constructs an \f$ x\f$-monotone curve from the given `base` curve with - * uninitialized data field. - */ - X_monotone_curve_2(const Base_x_monotone_curve_2& base); + /*! default constructor. + */ + X_monotone_curve_2(); - /*! constructs an \f$ x\f$-monotone curve from the given `base` \f$ - * x\f$-monotone curve with an attached `data` field. - */ - X_monotone_curve_2(const Base_x_monotone_curve_2& base, - const X_monotone_curve_data& data); + /*! constructs an \f$x\f$-monotone curve from the given `base` curve with + * uninitialized data field. + */ + X_monotone_curve_2(const Base_x_monotone_curve_2& base); - /// @} + /*! constructs an \f$x\f$-monotone curve from the given `base` \f$ + * x\f$-monotone curve with an attached `data` field. + */ + X_monotone_curve_2(const Base_x_monotone_curve_2& base, + const X_monotone_curve_data& data); - /// \name Access Functions - /// @{ + /// @} - /*! returns the field (a non-const version, which returns a reference - * to the data object, is also available). - */ - const X_monotone_curve_data& data() const; + /// \name Access Functions + /// @{ - /*! sets the data field. - */ - void set_data(const X_monotone_curve_data& data); + /*! returns the field (a non-const version, which returns a reference + * to the data object, is also available). + */ + const X_monotone_curve_data& data() const; - /// @} -}; /* end Arr_curve_data_traits_2::X_monotone_curve_2 */ + /*! sets the data field. + */ + void set_data(const X_monotone_curve_data& data); + /// @} + }; /* end Arr_curve_data_traits_2::X_monotone_curve_2 */ }; /* end Arr_curve_data_traits_2 */ + } /* end namespace CGAL */ diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_dcel_base.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_dcel_base.h index dafdc593b67..1de87dba728 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_dcel_base.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_dcel_base.h @@ -14,10 +14,9 @@ namespace CGAL { * * \cgalModels{Aos} */ -template< typename V, typename H, typename F > +template class Arr_dcel_base { public: - /*! The basic \dcel face type. Serves as a basis class for an extended * face record with auxiliary data fields. * @@ -27,7 +26,7 @@ public: /*! The basic \dcel halfedge type. Serves as a basis class for an extended * halfedge record with auxiliary data fields. The `Curve` parameter is the - * type of \f$ x\f$-monotone curves associated with the vertices. + * type of \f$x\f$-monotone curves associated with the vertices. * * \cgalModels{AosHalfedge} */ @@ -42,6 +41,6 @@ public: */ template class Arr_vertex_base {}; - }; /* end Arr_dcel_base */ + } /* end namespace CGAL */ diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_extended_dcel.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_extended_dcel.h index b36aa2a7eb7..4fb8c85916e 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_extended_dcel.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_extended_dcel.h @@ -1,246 +1,208 @@ - namespace CGAL { -/*! -\ingroup PkgArrangementOnSurface2DCEL +/*! \ingroup PkgArrangementOnSurface2DCEL + * + * The `Arr_extended_dcel` class-template extends the topological-features of + * the \dcel namely the vertex, halfedge, and face types. While it is possible + * to maintain extra (non-geometric) data with the curves or points of the + * arrangement by extending their types respectively, it is also possible to + * extend the vertex, halfedge, or face types of the \dcel through + * inheritance. As the technique to extend these types is somewhat cumbersome + * and difficult for inexperienced users, the `Arr_extended_dcel` class-template + * provides a convenient way to do that. Each one of the three features is + * extended with a corresponding data type provided as parameters. This class + * template is also parameterized with a traits class used to extract default + * values for the vertex, halfedge, and face base classes, which are the + * remaining three template parameters respectively. The default values follow: + * + *
      + * + * `V` = + * + * `Arr_vertex_base` + *
      + * `H` = + * + * `Arr_halfedge_base` + *
      + * `F` = + * + * `Arr_face_base` + * + *
      + * + * \cgalModels{AosDcelWithRebind} + * + * \sa `Arr_dcel_base` + */ +template +class Arr_extended_dcel : public Arr_dcel_base, + Arr_extended_halfedge, + Arr_extended_face> +{}; -The `Arr_extended_dcel` class-template extends the topological-features of the \dcel -namely the vertex, halfedge, and face types. While it is possible to maintain -extra (non-geometric) data with the curves or points of the arrangement by -extending their types respectively, it is also possible to extend the vertex, -halfedge, or face types of the \dcel through inheritance. As the technique to -extend these types is somewhat cumbersome and difficult for inexperienced -users, the `Arr_extended_dcel` class-template provides a convenient way to do that. -Each one of the three features is extended with a corresponding data type -provided as parameters. This class template is also parameterized with a -traits class used to extract default values for the vertex, halfedge, and face -base classes, which are the remaining three template parameters respectively. -The default values follow: - -
      - -`V` = - -`Arr_vertex_base` -
      -`H` = - -`Arr_halfedge_base` -
      -`F` = - -`Arr_face_base` - -
      - -\cgalModels{ArrangementDcelWithRebind} - -\sa `Arr_dcel_base` - -*/ -template< typename Traits, typename VData, typename HData, typename FData, typename V, typename H, typename F > -class Arr_extended_dcel - : public Arr_dcel_base, - Arr_extended_halfedge, - Arr_extended_face > -{ - -}; /* end Arr_extended_dcel */ -} /* end namespace CGAL */ - -namespace CGAL { - -/*! -\ingroup PkgArrangementOnSurface2DCEL - -The `Arr_extended_face` class-template extends the face topological-features of the -\dcel. It is parameterized by a face base-type `FaceBase` and a data type -`FData` used to extend the face base-type. - -\cgalModels{ArrangementDcelFace} - -\sa `Arr_dcel_base` - -*/ -template< typename FaceBase, typename FData > +/*! \ingroup PkgArrangementOnSurface2DCEL + * + * The `Arr_extended_face` class-template extends the face topological-features + * of the \dcel. It is parameterized by a face base-type `FaceBase` and a data + * type `FData` used to extend the face base-type. + * + * \cgalModels{AosDcelFace} + * + * \sa `Arr_dcel_base` + */ +template class Arr_extended_face : FaceBase { public: + /// \name Creation + /// @{ -/// \name Creation -/// @{ + /*! assigns `f` with the contents of the `other` vertex. + */ + void assign(const Self & other); -/*! -assigns `f` with the contents of the `other` vertex. -*/ -void assign (const Self & other); + /// @} -/// @} + /// \name Access Functions + /// @{ -/// \name Access Functions -/// @{ + /*! obtains the auxiliary data (a non-const version, returning a reference + * to a mutable data object is also available). + */ + const FData & data() const; -/*! -obtains the auxiliary data (a non-const version, returning a reference -to a mutable data object is also available). -*/ -const FData & data () const; + /// @} -/// @} + /// \name Modifiers + /// @{ -/// \name Modifiers -/// @{ - -/*! -sets the auxiliary data. -*/ -void set_data (const FData & data); - -/// @} + /*! sets the auxiliary data. + */ + void set_data(const FData & data); + /// @} }; /* end Arr_extended_face */ -} /* end namespace CGAL */ -namespace CGAL { - -/*! -\ingroup PkgArrangementOnSurface2DCEL - -The `Arr_extended_halfedge` class-template extends the halfedge topological-features of -the \dcel. It is parameterized by a halfedge base-type `HalfedgeBase` -and a data type `HData` used to extend the halfedge base-type. - -\cgalModels{ArrangementDcelHalfedge} - -\sa `Arr_dcel_base` - -*/ -template< typename HalfedgeBase, typename HData > +/*! \ingroup PkgArrangementOnSurface2DCEL + * + * The `Arr_extended_halfedge` class-template extends the halfedge + * topological-features of the \dcel. It is parameterized by a halfedge + * base-type `HalfedgeBase` and a data type `HData` used to extend the halfedge + * base-type. + * + * \cgalModels{AosDcelHalfedge} + * + * \sa `Arr_dcel_base` + */ +template class Arr_extended_halfedge : public HalfedgeBase { public: + /// \name Creation + /// @{ -/// \name Creation -/// @{ + /*! assigns `he` with the contents of the `other` vertex. + */ + void assign(const Self & other); -/*! -assigns `he` with the contents of the `other` vertex. -*/ -void assign (const Self & other); + /// @} -/// @} + /// \name Access Functions + /// @{ -/// \name Access Functions -/// @{ + /*! obtains the auxiliary data (a non-const version, returning a reference + * to a mutable data object is also available). + */ + const HData & data() const; -/*! -obtains the auxiliary data (a non-const version, returning a reference -to a mutable data object is also available). -*/ -const HData & data () const; + /// @} -/// @} + /// \name Modifiers + /// @{ -/// \name Modifiers -/// @{ - -/*! -sets the auxiliary data. -*/ -void set_data (const HData & data); - -/// @} + /*! sets the auxiliary data. + */ + void set_data(const HData & data); + /// @} }; /* end Arr_extended_halfedge */ -} /* end namespace CGAL */ -namespace CGAL { - -/*! -\ingroup PkgArrangementOnSurface2DCEL - -The `Arr_extended_vertex` class-template extends the vertex -topological-features of the \dcel. It is parameterized by a -vertex base-type `VertexBase` and a data type `VData` used to extend -the vertex base-type. - -\cgalModels{ArrangementDcelVertex} - -\sa `Arr_dcel_base` - -*/ -template< typename VertexBase, typename VData > +/*! \ingroup PkgArrangementOnSurface2DCEL + * + * The `Arr_extended_vertex` class-template extends the vertex + * topological-features of the \dcel. It is parameterized by a + * vertex base-type `VertexBase` and a data type `VData` used to extend + * the vertex base-type. + * + * \cgalModels{AosDcelVertex} + * + * \sa `Arr_dcel_base` + */ +template class Arr_extended_vertex : public VertexBase { public: + /// \name Creation + /// @{ -/// \name Creation -/// @{ + /*! assigns `v` with the contents of the `other` vertex. + */ + void assign(const Self & other); -/*! -assigns `v` with the contents of the `other` vertex. -*/ -void assign (const Self & other); + /// @} -/// @} + /// \name Access Functions + /// @{ -/// \name Access Functions -/// @{ + /*! obtains the auxiliary data (a non-const version, returning a reference + * to a mutable data object is also available). + */ + const VData & data() const; -/*! -obtains the auxiliary data (a non-const version, returning a reference -to a mutable data object is also available). -*/ -const VData & data () const; + /// @} -/// @} + /// \name Modifiers + /// @{ -/// \name Modifiers -/// @{ - -/*! -sets the auxiliary data. -*/ -void set_data (const VData & data); - -/// @} + /*! sets the auxiliary data. + */ + void set_data(const VData & data); + /// @} }; /* end Arr_extended_vertex */ -} /* end namespace CGAL */ - -namespace CGAL { - -/*! -\ingroup PkgArrangementOnSurface2DCEL - -The `Arr_face_extended_dcel` class-template extends the \dcel face-records, making it -possible to store extra (non-geometric) data with the arrangement faces. -The class should be instantiated by an `FData` type which represents the -extra data stored with each face. - -Note that all types of \dcel features (namely vertex, halfedge and face) -are provided as template parameters. However, by default they are defined -as follows: - -
      - -`V` = - -`Arr_vertex_base` -
      -`H` = - -`Arr_halfedge_base` -
      -`F` = - -`Arr_face_base` - -
      - -\cgalModels{ArrangementDcelWithRebind} - -\sa `Arr_dcel_base` - -*/ -template< typename Traits, typename FData, typename V, typename H, typename F > -class Arr_face_extended_dcel : public Arr_dcel_base > { -}; /* end Arr_face_extended_dcel */ + +/*! \ingroup PkgArrangementOnSurface2DCEL + * + * The `Arr_face_extended_dcel` class-template extends the \dcel face-records, + * making it possible to store extra (non-geometric) data with the arrangement + * faces. The class should be instantiated by an `FData` type which represents + * the extra data stored with each face. + * + * Note that all types of \dcel features (namely vertex, halfedge and face) + * are provided as template parameters. However, by default they are defined + * as follows: + * + *
      + * + * `V` = + * + * `Arr_vertex_base` + *
      + * `H` = + * + * `Arr_halfedge_base` + *
      + * `F` = + * + * `Arr_face_base` + * + *
      + * + * \cgalModels{AosDcelWithRebind} + * + * \sa `Arr_dcel_base` + */ +template +class Arr_face_extended_dcel : + public Arr_dcel_base> {}; + } /* end namespace CGAL */ diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_face_index_map.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_face_index_map.h index 9f84f831bc4..7830f8f5a18 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_face_index_map.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_face_index_map.h @@ -20,16 +20,15 @@ namespace CGAL { * * \sa `Arr_vertex_index_map` */ - template class Arr_face_index_map: public Arrangement_::Observer { public: /// \name Types /// @{ - /*! the type of the attached arrangement. - */ + /// the type of the attached arrangement. typedef Arrangement_ Arrangement_2; + typedef typename Arrangement_2::Base_aos Base_aos; typedef boost::readable_property_map_tag category; @@ -40,12 +39,10 @@ public: typedef Face_handle key_type; - /*! The face handle type. - */ + /// The face handle type. typedef typename Base_aos::Face_handle Face_handle; - /*! The type of mapping of faces to indices. - */ + /// The type of mapping of faces to indices. typedef Unique_hash_map Index_map; /// @} diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_geodesic_arc_on_sphere_traits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_geodesic_arc_on_sphere_traits_2.h index d34b40072a9..03dbe6483f0 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_geodesic_arc_on_sphere_traits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_geodesic_arc_on_sphere_traits_2.h @@ -1,450 +1,449 @@ namespace CGAL { - /*! \ingroup PkgArrangementOnSurface2TraitsClasses - * - * The traits class `Arr_geodesic_arc_on_sphere_traits_2` is a model of the - * `ArrangementTraits_2` concept. It enables the construction and - * maintenance of arrangements of arcs of great circles (also known as - * geodesic arcs) that lie on the sphere (centered at the origin). Almost - * all operations on arrangements require a kernel that supports exact - * predicates. Most operations also require a kernel that supports exact - * constructions. However, all operations on such arrangements can be - * computed efficiently, since all calculations are performed with - * rational arithmetic. - * - * There is an analogy between this class of arrangements and the class of - * planar arrangements induced by linear curves (i.e., segments, rays, and - * lines), as properties of linear curves in the plane often, but not always, - * hold for geodesic arcs on the sphere. For example, given any two - * non-antipodal points on the sphere there exists a unique great circle - * connecting the two points. - * - * We use the following parameterization of the unit sphere \f$S = - * \phi_S(\Phi)\f$: \f$\Phi = [\alpha, 2\pi + \alpha] \times [-\frac{\pi}{2}, - * \frac{\pi}{2}]\f$, \f$\phi_S(x, y) = (\cos y \cos x, \sin y \cos x, \sin - * x)\f$, where \f$\alpha = \arctan(X, Y)\f$. By default, \f$X = -1, Y = 0\f$, - * which implies \f$\alpha = \pi\f$, and a default parameterization \f$\Phi = - * [-\pi, \pi] \times [-\frac{\pi}{2}, \frac{\pi}{2}]\f$. The equator curve, - * for example, is given by \f$\gamma(t) = (\pi(2t - 1) + \alpha, 0)\f$, for - * \f$t \in [0,1]\f$. This parameterization induces two contraction points - * \f$p_s = (0, 0, -1) = \phi_S(y,-\frac{\pi}{2})\f$ and \f$p_n = (0, 0, 1) = - * \phi_S(y,\frac{\pi}{2})\f$, referred to as the south and north poles, - * respectively, and an identification curve \f$\{\phi_S(\pi + - * \alpha,x)\,|\,-\frac{\pi}{2} \leq v \leq \frac{\pi}{2}\}\f$, as - * \f$\phi_S(-\pi + \alpha,v) = \phi_S(+\pi + \alpha,v)\f$ for all \f$x\f$ - * (which coincides with the opposite Prime (Greenwich) Meridian when - * \f$\alpha = \pi\f$). The elements that substitutes the template parameters - * `X` and `Y` when `Arr_geodesic_arc_on_sphere_traits_2` is - * instantiated must be integral values that define a not necessarily - * normalized vector \f$(x,y)\f$ in the \f$xy\f$-plane that bisects the - * identification curve. +/*! \ingroup PkgArrangementOnSurface2TraitsClasses + * + * The traits class `Arr_geodesic_arc_on_sphere_traits_2` is a model of the + * `AosTraits_2` concept. It enables the construction and + * maintenance of arrangements of arcs of great circles (also known as + * geodesic arcs) that lie on the sphere (centered at the origin). Almost + * all operations on arrangements require a kernel that supports exact + * predicates. Most operations also require a kernel that supports exact + * constructions. However, all operations on such arrangements can be + * computed efficiently, since all calculations are performed with + * rational arithmetic. + * + * There is an analogy between this class of arrangements and the class of + * planar arrangements induced by linear curves (i.e., segments, rays, and + * lines), as properties of linear curves in the plane often, but not always, + * hold for geodesic arcs on the sphere. For example, given any two + * non-antipodal points on the sphere there exists a unique great circle + * connecting the two points. + * + * We use the following parameterization of the unit sphere \f$S = + * \phi_S(\Phi)\f$: \f$\Phi = [\alpha, 2\pi + \alpha] \times [-\frac{\pi}{2}, + * \frac{\pi}{2}]\f$, \f$\phi_S(x, y) = (\cos y \cos x, \sin y \cos x, \sin + * x)\f$, where \f$\alpha = \arctan(X, Y)\f$. By default, \f$X = -1, Y = 0\f$, + * which implies \f$\alpha = \pi\f$, and a default parameterization \f$\Phi = + * [-\pi, \pi] \times [-\frac{\pi}{2}, \frac{\pi}{2}]\f$. The equator curve, + * for example, is given by \f$\gamma(t) = (\pi(2t - 1) + \alpha, 0)\f$, for + * \f$t \in [0,1]\f$. This parameterization induces two contraction points + * \f$p_s = (0, 0, -1) = \phi_S(y,-\frac{\pi}{2})\f$ and \f$p_n = (0, 0, 1) = + * \phi_S(y,\frac{\pi}{2})\f$, referred to as the south and north poles, + * respectively, and an identification curve \f$\{\phi_S(\pi + + * \alpha,x)\,|\,-\frac{\pi}{2} \leq v \leq \frac{\pi}{2}\}\f$, as + * \f$\phi_S(-\pi + \alpha,v) = \phi_S(+\pi + \alpha,v)\f$ for all \f$x\f$ + * (which coincides with the opposite Prime (Greenwich) Meridian when + * \f$\alpha = \pi\f$). The elements that substitutes the template parameters + * `X` and `Y` when `Arr_geodesic_arc_on_sphere_traits_2` is + * instantiated must be integral values that define a not necessarily + * normalized vector \f$(x,y)\f$ in the \f$xy\f$-plane that bisects the + * identification curve. - * \cgalModels{ArrangementTraits_2,ArrangementLandmarkTraits_2,ArrangementSphericalBoundaryTraits_2} + * \cgalModels{AosTraits_2,AosLandmarkTraits_2,AosSphericalBoundaryTraits_2} + */ +template +class Arr_geodesic_arc_on_sphere_traits_2 { +public: + /*! The `Point_2` class nested within the traits is used to represent a + * point on a sphere centered at the origin. The point is in fact a + * not-necessarily normalized 3D direction extended with information that + * specifies the location of the point pre-image in the parameter space. + * + * \cgalModels{Assignable,DefaultConstructible,CopyConstructible} */ - - template - class Arr_geodesic_arc_on_sphere_traits_2 { + class Point_2 { public: - /*! The `Point_2` class nested within the traits is used to represent a - * point on a sphere centered at the origin. The point is in fact a - * not-necessarily normalized 3D direction extended with information that - * specifies the location of the point pre-image in the parameter space. - * - * \cgalModels{Assignable,DefaultConstructible,CopyConstructible} + /// \name Enumeration types + /// @{ + + /*! The location type indicates a location in the parameter space. */ - class Point_2 { - public: - /// \name Enumeration types - /// @{ + enum Location_type { + /// Internal to the parameter space. + NO_BOUNDARY_LOC = 0, - /*! The location type indicates a location in the parameter space. - */ - enum Location_type { - /// Internal to the parameter space. - NO_BOUNDARY_LOC = 0, + /// The bottom side boundary of the parameter space (the south pole). + MIN_BOUNDARY_LOC, - /// The bottom side boundary of the parameter space (the south pole). - MIN_BOUNDARY_LOC, + /// The identified left and right side boundaries of the parameter space. + MID_BOUNDARY_LOC, - /// The identified left and right side boundaries of the parameter space. - MID_BOUNDARY_LOC, - - /// The top side boundary of the parameter space (the north pole). - MAX_BOUNDARY_LOC - }; - /// @} - - /// \name Types - /// @{ - typedef Kernel::Direction_3 Direction_3; - /// @} - - /// \name Creation - /// @{ - - /*! Constructs a point from a direction and a location. - * \param[in] dir the direction. - * \param[in] location indicates the location of the point pre-image - * in the parameter space. - */ - Point_2(const Direction_3& dir, Location_type location); - - /// @} - - /// \name Operations - /// @{ - - /*! Set the location of the point pre-image in the parameter space. - * \param[in] location the updated location of the point pre-image in - * the parameter space. - */ - void set_location(Location_type location); - - /*! Obtain the location of the point. - * \return the location of the point pre-image in the parameter space. - */ - Location_type location() const; - - /// @} + /// The top side boundary of the parameter space (the north pole). + MAX_BOUNDARY_LOC }; + /// @} - /*! The `X_monotone_curve_2` class nested within the traits is used to - * represent an \f$x\f$-monotone geodesic arc on the a sphere centered at - * the origin. The pre-image of an \f$x\f$-monotone geodesic arc does not - * intersect the identified left and right sides of the boundary of the - * parameter space. - * - * \cgalModels{Assignable,DefaultConstructible,CopyConstructible} + /// \name Types + /// @{ + typedef Kernel::Direction_3 Direction_3; + /// @} + + /// \name Creation + /// @{ + + /*! Constructs a point from a direction and a location. + * \param[in] dir the direction. + * \param[in] location indicates the location of the point pre-image + * in the parameter space. */ - class X_monotone_curve_2 { - public: - /// \name Types - /// @{ - typedef Arr_geodesic_arc_on_sphere_traits_2::Point_2 Point_2; - /// @} + Point_2(const Direction_3& dir, Location_type location); - /// \name Creation - /// @{ + /// @} - /*! Constructs an \f$x\f$-monotone geodesic arc. - * \param[in] source the source point of the arc. - * \param[in] target the target point of the arc. - * \param[in] normal the normal of the plane that contains the arc. - * \param[in] is_vertical is the arc vertical ? - * \param[in] is_directed_right is the arc directed from left to right? - * \param[in] is_full is the arc a full great circle? - * \param[in] is_degenerate is the arc degenerate (single point)? - * \param[in] is_empty is the arc empty? - * \pre Both endpoints lie on the given plane. - */ - X_monotone_curve_2(const Point_2& source, - const Point_2& target, - const Direction_3& normal, - bool is_vertical, - bool is_directed_right, - bool is_full = false, - bool is_degenerate = false, - bool is_empty = false); + /// \name Operations + /// @{ - /*! Construct an \f$x\f$-monotone geodesic arc. - * \param[in] normal the normal of the plane containing the arc. - * \param[in] source the source-point direction. - * \param[in] target the target-point direction. - * \pre Both endpoints lie on the given plane. - */ - X_monotone_curve_2(const Point_2& source, - const Point_2& target, - const Direction_3& normal); - - /*! Construct a full great-circle. - * \param[in] point the endpoint of the full great-circle. - * \param[in] normal the normal of the plane containing the arc. - * \pre the point lies on the given plane. - * \pre the point pre-image lies on the identified left and right sides - * of the boundary of the parameter space. - */ - X_monotone_curve_2(const Point_2& point, - const Direction_3& normal); - - /// @} - - /// \name Operations - /// @{ - - /*! Sets the source endpoint. - * \param[in] source the updated source endpoint. - */ - void set_source(const Point_2& source); - - /*! Sets the target endpoint. - * \param[in] target the updated target endpoint. - */ - void set_target(const Point_2& target); - - /*! Sets the normal of the underlying plane. - * \param[in] normal the updated normal of the underlying plane. - */ - void set_normal(const Direction_3& normal); - - /*! Sets the flag that indicates whether the arc is vertical. - * \param[in] flag indicates whether the arc pre-image in the parameter - * space is vertical. - */ - void set_is_vertical(bool flag); - - /*! Sets the flag that indicates whether the direction of the arc - * pre-image in the parameter space is from left to right. - * \param flag indicates whether the arc pre-image in the parameter - * space is from left to right. - */ - void set_is_directed_right(bool flag); - - /*! Sets the flag that indicates whether the arc is a full great circle. - * \param[in] flag indicates whether the arc is a full great circle. - */ - void set_is_full(bool flag); - - /*! Sets the flag that indicates whether the arc degenerates to a point. - * \param[in] flag indicates whether the arc degenerates to a point. - */ - void set_is_degenerate(bool flag); - - /*! Sets the flag that indicates whether the arc is empty. - * \param[in] flag indicates whether the arc is empty. - */ - void set_is_empty(bool flag); - - /*! Obtains the source point. - */ - const Point_2& source() const; - - /*! Obtains the target point. - */ - const Point_2& target() const; - - /*! Obtains the normal to the containing plane. - */ - const Direction_3& normal() const; - - /*! Obtains the (lexicographically) left endpoint direction. - */ - const Point_2& left() const; - - /*! Obtains the (lexicographically) right endpoint. - */ - const Point_2& right() const; - - /*! Determines whether the arc is vertical. - */ - bool is_vertical() const; - - /*! Determines whether the arc is directed lexicographically from left to - * right. - */ - bool is_directed_right() const; - - /*! Determines whether the arc is a great circle. - */ - bool is_full() const; - - /*! Determines whether the arc is degenerate. - */ - bool is_degenerate() const; - - /*! Determines whether the arc is empty. */ - bool is_empty() const; - - /*! Determines whether the arc is a meridian. - */ - bool is_meridian() const; - - /// @} - }; - - /*! + /*! Set the location of the point pre-image in the parameter space. + * \param[in] location the updated location of the point pre-image in + * the parameter space. */ - class Curve_2 { - public: - /// \name Types - /// @{ - typedef Arr_geodesic_arc_on_sphere_traits_2::Point_2 Point_2; - /// @} + void set_location(Location_type location); - /// \name Creation - /// @{ - /// @} - - /// \name Operations - /// @{ - /// @} - }; - - /*! Construction functor of a point. - * - * \cgalModels{Assignable,CopyConstructible,AdaptableUnaryFunction,AdaptableTernaryFunction} + /*! Obtain the location of the point. + * \return the location of the point pre-image in the parameter space. */ - /*! - */ - class Construct_point_2 { - public: - /// \name Types - /// @{ - typedef Arr_geodesic_arc_on_sphere_traits_2::Point_2 result_type; - typedef typename Kernel::FT FT; - typedef typename Kernel::Direction_3 Direction_3; - /// @} + Location_type location() const; - /// \name Operations - /// @{ - - /*! Construct a point on the sphere from three coordinates, which define - * a (not necessarily normalized) direction. - * \param[in] x the x coordinate - * \param[in] y the y coordinate - * \param[in] z the z coordinate - */ - Point_2 operator()(const FT& x, const FT& y, const FT& z); - - /*! Construct a point on the sphere from a (not necessarily normalized) - * direction. - * \param other the other direction - */ - Point_2 operator()(const Direction_3& other); - - /// @} - }; - - /*! Construction functor of \f$x\f$-monotone geodesic arcs. - * - * \cgalModels{Assignable,CopyConstructible,AdaptableUnaryFunction,AdaptableBinaryFunction,AdaptableTernaryFunction} - */ - class Construct_x_monotone_curve_2 { - public: - /// \name Types - /// @{ - typedef Arr_geodesic_arc_on_sphere_traits_2::Point_2 Point_2; - typedef Arr_geodesic_arc_on_sphere_traits_2::X_monotone_curve_2 result_type; - typedef Kernel::Direction_3 Direction_3; - typedef Direction_3 argument_type; - /// @} - - /// \name Operations - /// @{ - - /*! Construct the minor geodesic arc from two endpoints. The minor arc - * is the one with the smaller angle among the two geodesic arcs with - * the given endpoints. - * 1. Find out whether the arc is x-monotone. - * 2. If it is x-monotone, - * 2.1 Find out whether it is vertical, and - * 2.2 whether the target is larger than the source (directed right). - * - * An arc is vertical, iff - * 1. one of its endpoint direction pierces a pole, or - * 2. the projections of the endpoint directions onto the xy-plane coincide. - * \param[in] p the first endpoint. - * \param[in] q the second endpoint. - * \pre p and q must not coincide. - * \pre p and q cannot be antipodal. - * \pre The constructed minor arc does not intersect the identification - * curve in its interior. - */ - X_monotone_curve_2 operator()(const Point_2& p, const Point_2& q); - - /*! Construct a full great circle from a normal to a plane. - * Observe that the constructed arc has one endpoint that lies on - * the identification curve. This point is considered both the source and - * target (and also the left and right) point of the arc. - * \param normal the normal to the plane containing the great circle. - * \pre the plane is not vertical. - */ - X_monotone_curve_2 operator()(const Direction_3& normal); - - /*! Construct a geodesic arc from two endpoints and a normal to the plane - * containing the arc. The two endpoints determine the plane. The normal - * determines the orientation of the plane and the final arc (whether its - * the minor arc or the major arc). The right-hand rule can be used - * to select the appropriate normal. - * \param[in] p the first endpoint. - * \param[in] q the second endpoint. - * \param[in] normal the normal to the oriented plane containing the arc. - * \pre Both endpoints lie on the given oriented plane. - * \pre The constructed arc does not intersect the identification curve - * in its interior. - */ - X_monotone_curve_2 operator()(const Point_2& p, const Point_2& q, - const Direction_3& normal); - - /// @} /* end of operations */ - }; - - /*! Construction functor of geodesic arcs. - * - * \cgalModels{Assignable,CopyConstructible,AdaptableUnaryFunction,AdaptableBinaryFunction,AdaptableTernaryFunction} - */ - class Construct_curve_2 { - public: - /// \name Types - /// @{ - typedef Arr_geodesic_arc_on_sphere_traits_2::Point_2 Point_2; - typedef Arr_geodesic_arc_on_sphere_traits_2::Curve_2 result_type; - typedef Kernel::Direction_3 Direction_3; - typedef Direction_3 argument_type; - /// @} - - /// \name Operations - /// @{ - - /*! Construct a full great circle from a normal to a plane. - * \param normal the normal to the plane containing the great circle. - */ - X_monotone_curve_2 operator()(const Direction_3& normal); - - /*! Construct the minor geodesic arc from two endpoints. The minor arc - * is the one with the smaller angle among the two geodesic arcs with - * the given endpoints. - * 1. Find out whether the arc is x-monotone. - * 2. If it is x-monotone, - * 1. Find out whether it is vertical, and - * 2. whether the target is larger than the source (directed right). - * - * An arc is vertical, iff - * 1. one of its endpoint direction pierces a pole, or - * 2. the projections of the endpoint directions onto the xy-plane coincide. - * - * \param[in] p the first endpoint. - * \param[in] q the second endpoint. - * \pre p and q must not coincide. - * \pre p and q cannot be antipodal. - */ - Curve_2 operator()(const Point_2& p, const Point_2& q); - - /*! Construct a geodesic arc from two endpoints and a normal to the plane - * containing the arc. The two endpoints determine the plane. The normal - * determines the orientation of the plane and the final arc (whether its - * the minor arc or the major arc). The right-hand rule can be used - * to select the appropriate normal. - * \param[in] p the first endpoint. - * \param[in] q the second endpoint. - * \param[in] normal the normal to the oriented plane containing the arc. - * \pre Both endpoints lie on the given oriented plane. - */ - Curve_2 operator()(const Point_2& p, const Point_2& q, - const Direction_3& normal); - /// @} - }; - - /*! Returns an instance of `Construct_point_2`. - */ - Construct_point_2 construct_point_2_object() const; - - /*! Returns an instance of `Construct_x_monotone_curve_2`. - */ - Construct_x_monotone_curve_2 construct_x_monotone_curve_2_object() const; - - /*! Returns an instance of `Construct_curve_2`. - */ - Construct_curve_2 construct_curve_2_object() const; + /// @} }; + /*! The `X_monotone_curve_2` class nested within the traits is used to + * represent an \f$x\f$-monotone geodesic arc on the a sphere centered at + * the origin. The pre-image of an \f$x\f$-monotone geodesic arc does not + * intersect the identified left and right sides of the boundary of the + * parameter space. + * + * \cgalModels{Assignable,DefaultConstructible,CopyConstructible} + */ + class X_monotone_curve_2 { + public: + /// \name Types + /// @{ + typedef Arr_geodesic_arc_on_sphere_traits_2::Point_2 Point_2; + /// @} + + /// \name Creation + /// @{ + + /*! Constructs an \f$x\f$-monotone geodesic arc. + * \param[in] source the source point of the arc. + * \param[in] target the target point of the arc. + * \param[in] normal the normal of the plane that contains the arc. + * \param[in] is_vertical is the arc vertical ? + * \param[in] is_directed_right is the arc directed from left to right? + * \param[in] is_full is the arc a full great circle? + * \param[in] is_degenerate is the arc degenerate (single point)? + * \param[in] is_empty is the arc empty? + * \pre Both endpoints lie on the given plane. + */ + X_monotone_curve_2(const Point_2& source, + const Point_2& target, + const Direction_3& normal, + bool is_vertical, + bool is_directed_right, + bool is_full = false, + bool is_degenerate = false, + bool is_empty = false); + + /*! Construct an \f$x\f$-monotone geodesic arc. + * \param[in] normal the normal of the plane containing the arc. + * \param[in] source the source-point direction. + * \param[in] target the target-point direction. + * \pre Both endpoints lie on the given plane. + */ + X_monotone_curve_2(const Point_2& source, + const Point_2& target, + const Direction_3& normal); + + /*! Construct a full great-circle. + * \param[in] point the endpoint of the full great-circle. + * \param[in] normal the normal of the plane containing the arc. + * \pre the point lies on the given plane. + * \pre the point pre-image lies on the identified left and right sides + * of the boundary of the parameter space. + */ + X_monotone_curve_2(const Point_2& point, + const Direction_3& normal); + + /// @} + + /// \name Operations + /// @{ + + /*! Sets the source endpoint. + * \param[in] source the updated source endpoint. + */ + void set_source(const Point_2& source); + + /*! Sets the target endpoint. + * \param[in] target the updated target endpoint. + */ + void set_target(const Point_2& target); + + /*! Sets the normal of the underlying plane. + * \param[in] normal the updated normal of the underlying plane. + */ + void set_normal(const Direction_3& normal); + + /*! Sets the flag that indicates whether the arc is vertical. + * \param[in] flag indicates whether the arc pre-image in the parameter + * space is vertical. + */ + void set_is_vertical(bool flag); + + /*! Sets the flag that indicates whether the direction of the arc + * pre-image in the parameter space is from left to right. + * \param flag indicates whether the arc pre-image in the parameter + * space is from left to right. + */ + void set_is_directed_right(bool flag); + + /*! Sets the flag that indicates whether the arc is a full great circle. + * \param[in] flag indicates whether the arc is a full great circle. + */ + void set_is_full(bool flag); + + /*! Sets the flag that indicates whether the arc degenerates to a point. + * \param[in] flag indicates whether the arc degenerates to a point. + */ + void set_is_degenerate(bool flag); + + /*! Sets the flag that indicates whether the arc is empty. + * \param[in] flag indicates whether the arc is empty. + */ + void set_is_empty(bool flag); + + /*! Obtains the source point. + */ + const Point_2& source() const; + + /*! Obtains the target point. + */ + const Point_2& target() const; + + /*! Obtains the normal to the containing plane. + */ + const Direction_3& normal() const; + + /*! Obtains the (lexicographically) left endpoint direction. + */ + const Point_2& left() const; + + /*! Obtains the (lexicographically) right endpoint. + */ + const Point_2& right() const; + + /*! Determines whether the arc is vertical. + */ + bool is_vertical() const; + + /*! Determines whether the arc is directed lexicographically from left to + * right. + */ + bool is_directed_right() const; + + /*! Determines whether the arc is a great circle. + */ + bool is_full() const; + + /*! Determines whether the arc is degenerate. + */ + bool is_degenerate() const; + + /*! Determines whether the arc is empty. */ + bool is_empty() const; + + /*! Determines whether the arc is a meridian. + */ + bool is_meridian() const; + + /// @} + }; + + /*! + */ + class Curve_2 { + public: + /// \name Types + /// @{ + typedef Arr_geodesic_arc_on_sphere_traits_2::Point_2 Point_2; + /// @} + + /// \name Creation + /// @{ + /// @} + + /// \name Operations + /// @{ + /// @} + }; + + /*! Construction functor of a point. + * + * \cgalModels{Assignable,CopyConstructible,AdaptableUnaryFunction,AdaptableTernaryFunction} + */ + /*! + */ + class Construct_point_2 { + public: + /// \name Types + /// @{ + typedef Arr_geodesic_arc_on_sphere_traits_2::Point_2 result_type; + typedef typename Kernel::FT FT; + typedef typename Kernel::Direction_3 Direction_3; + /// @} + + /// \name Operations + /// @{ + + /*! Construct a point on the sphere from three coordinates, which define + * a (not necessarily normalized) direction. + * \param[in] x the x coordinate + * \param[in] y the y coordinate + * \param[in] z the z coordinate + */ + Point_2 operator()(const FT& x, const FT& y, const FT& z); + + /*! Construct a point on the sphere from a (not necessarily normalized) + * direction. + * \param other the other direction + */ + Point_2 operator()(const Direction_3& other); + + /// @} + }; + + /*! Construction functor of \f$x\f$-monotone geodesic arcs. + * + * \cgalModels{Assignable,CopyConstructible,AdaptableUnaryFunction,AdaptableBinaryFunction,AdaptableTernaryFunction} + */ + class Construct_x_monotone_curve_2 { + public: + /// \name Types + /// @{ + typedef Arr_geodesic_arc_on_sphere_traits_2::Point_2 Point_2; + typedef Arr_geodesic_arc_on_sphere_traits_2::X_monotone_curve_2 result_type; + typedef Kernel::Direction_3 Direction_3; + typedef Direction_3 argument_type; + /// @} + + /// \name Operations + /// @{ + + /*! Construct the minor geodesic arc from two endpoints. The minor arc + * is the one with the smaller angle among the two geodesic arcs with + * the given endpoints. + * 1. Find out whether the arc is x-monotone. + * 2. If it is x-monotone, + * 2.1 Find out whether it is vertical, and + * 2.2 whether the target is larger than the source (directed right). + * + * An arc is vertical, iff + * 1. one of its endpoint direction pierces a pole, or + * 2. the projections of the endpoint directions onto the xy-plane coincide. + * \param[in] p the first endpoint. + * \param[in] q the second endpoint. + * \pre p and q must not coincide. + * \pre p and q cannot be antipodal. + * \pre The constructed minor arc does not intersect the identification + * curve in its interior. + */ + X_monotone_curve_2 operator()(const Point_2& p, const Point_2& q); + + /*! Construct a full great circle from a normal to a plane. + * Observe that the constructed arc has one endpoint that lies on + * the identification curve. This point is considered both the source and + * target (and also the left and right) point of the arc. + * \param normal the normal to the plane containing the great circle. + * \pre the plane is not vertical. + */ + X_monotone_curve_2 operator()(const Direction_3& normal); + + /*! Construct a geodesic arc from two endpoints and a normal to the plane + * containing the arc. The two endpoints determine the plane. The normal + * determines the orientation of the plane and the final arc (whether its + * the minor arc or the major arc). The right-hand rule can be used + * to select the appropriate normal. + * \param[in] p the first endpoint. + * \param[in] q the second endpoint. + * \param[in] normal the normal to the oriented plane containing the arc. + * \pre Both endpoints lie on the given oriented plane. + * \pre The constructed arc does not intersect the identification curve + * in its interior. + */ + X_monotone_curve_2 operator()(const Point_2& p, const Point_2& q, + const Direction_3& normal); + + /// @} /* end of operations */ + }; + + /*! Construction functor of geodesic arcs. + * + * \cgalModels{Assignable,CopyConstructible,AdaptableUnaryFunction,AdaptableBinaryFunction,AdaptableTernaryFunction} + */ + class Construct_curve_2 { + public: + /// \name Types + /// @{ + typedef Arr_geodesic_arc_on_sphere_traits_2::Point_2 Point_2; + typedef Arr_geodesic_arc_on_sphere_traits_2::Curve_2 result_type; + typedef Kernel::Direction_3 Direction_3; + typedef Direction_3 argument_type; + /// @} + + /// \name Operations + /// @{ + + /*! Construct a full great circle from a normal to a plane. + * \param normal the normal to the plane containing the great circle. + */ + X_monotone_curve_2 operator()(const Direction_3& normal); + + /*! Construct the minor geodesic arc from two endpoints. The minor arc + * is the one with the smaller angle among the two geodesic arcs with + * the given endpoints. + * 1. Find out whether the arc is x-monotone. + * 2. If it is x-monotone, + * 1. Find out whether it is vertical, and + * 2. whether the target is larger than the source (directed right). + * + * An arc is vertical, iff + * 1. one of its endpoint direction pierces a pole, or + * 2. the projections of the endpoint directions onto the xy-plane coincide. + * + * \param[in] p the first endpoint. + * \param[in] q the second endpoint. + * \pre p and q must not coincide. + * \pre p and q cannot be antipodal. + */ + Curve_2 operator()(const Point_2& p, const Point_2& q); + + /*! Construct a geodesic arc from two endpoints and a normal to the plane + * containing the arc. The two endpoints determine the plane. The normal + * determines the orientation of the plane and the final arc (whether its + * the minor arc or the major arc). The right-hand rule can be used + * to select the appropriate normal. + * \param[in] p the first endpoint. + * \param[in] q the second endpoint. + * \param[in] normal the normal to the oriented plane containing the arc. + * \pre Both endpoints lie on the given oriented plane. + */ + Curve_2 operator()(const Point_2& p, const Point_2& q, + const Direction_3& normal); + /// @} + }; + + /*! Returns an instance of `Construct_point_2`. + */ + Construct_point_2 construct_point_2_object() const; + + /*! Returns an instance of `Construct_x_monotone_curve_2`. + */ + Construct_x_monotone_curve_2 construct_x_monotone_curve_2_object() const; + + /*! Returns an instance of `Construct_curve_2`. + */ + Construct_curve_2 construct_curve_2_object() const; +}; + } /* end namespace CGAL */ diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_landmarks_point_location.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_landmarks_point_location.h index 2567ed62d7c..447b225ab08 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_landmarks_point_location.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_landmarks_point_location.h @@ -1,62 +1,58 @@ - namespace CGAL { -/*! -\ingroup PkgArrangementOnSurface2PointLocation +/*! \ingroup PkgArrangementOnSurface2PointLocation + * + * \anchor arr_reflm_pl + * + * The `Arr_landmarks_point_location` class implements a Jump & Walk algorithm, + * where special points, referred to as "landmarks", are chosen in a + * preprocessing stage, their place in the arrangement is found, and they are + * inserted into a data-structure that enables efficient nearest-neighbor search + * (a Kd-tree). Given a query point, the nearest + * landmark is located and a "walk" strategy is applied from the landmark to the + * query point. + * + * There are various strategies to select the landmark set in the + * arrangement, where the strategy is determined by the + * `Generator` template parameter. The following landmark-generator + * classes are available: + *
      + *
      `Arr_landmarks_vertices_generator`
      + * The arrangement vertices are used as the landmarks set. + * + *
      `Arr_random_landmarks_generator`
      + * \f$n\f$ random points in the bounding box of the arrangement are chosen + * as the landmarks set. + * + *
      `Arr_halton_landmarks_generator`
      + * \f$n\f$ Halton points in the bounding box of the arrangement are chosen + * as the landmarks set. + * + *
      `Arr_middle_edges_landmarks_generator`
      + * The midpoint of each arrangement edge is computed, and the resulting + * set of points is used as the landmarks set. This generator can be applied + * only for arrangements of line segments. + * + *
      `Arr_grid_landmarks_generator`
      + * A set of \f$n\f$ landmarks are chosen on a + * \f$\lceil \sqrt{n} \rceil \times \lceil \sqrt{n} \rceil\f$ + * grid that covers the bounding box of the arrangement. + *
      + * The `Arr_landmarks_vertices_generator` class is the default generator + * and used if no `Generator` parameter is specified. + * + * It is recommended to use the landmarks point-location strategy + * when the application frequently issues point-location queries on a + * rather static arrangement that the changes applied to it are mainly + * insertions of curves and not deletions of them. + * + * \cgalModels{AosPointLocation_2,AosVerticalRayShoot_2} + * + * \sa `AosPointLocation_2` + * \sa `AosVerticalRayShoot_2` + * \sa `CGAL::Arr_point_location_result` + */ +template +class Arr_landmarks_point_location {}; -\anchor arr_reflm_pl - -The `Arr_landmarks_point_location` class implements a Jump & Walk algorithm, where special -points, referred to as "landmarks", are chosen in a preprocessing stage, -their place in the arrangement is found, and they are inserted into a -data-structure that enables efficient nearest-neighbor search (a -Kd-tree). Given a query point, the nearest landmark is located and a -"walk" strategy is applied from the landmark to the query point. - -There are various strategies to select the landmark set in the -arrangement, where the strategy is determined by the -`Generator` template parameter. The following landmark-generator -classes are available: -
      -
      `Arr_landmarks_vertices_generator` -
      -The arrangement vertices are used as the landmarks set. - -
      `Arr_random_landmarks_generator` -
      -\f$ n\f$ random points in the bounding box of the arrangement are chosen -as the landmarks set. - -
      `Arr_halton_landmarks_generator` -
      -\f$ n\f$ Halton points in the bounding box of the arrangement are chosen -as the landmarks set. - -
      `Arr_middle_edges_landmarks_generator` -
      -The midpoint of each arrangement edge is computed, and the resulting -set of points is used as the landmarks set. This generator can be applied -only for arrangements of line segments. - -
      `Arr_grid_landmarks_generator` -
      -A set of \f$ n\f$ landmarks are chosen on a -\f$ \lceil \sqrt{n} \rceil \times \lceil \sqrt{n} \rceil\f$ -grid that covers the bounding box of the arrangement. -
      -The `Arr_landmarks_vertices_generator` class is the default generator -and used if no `Generator` parameter is specified. - -It is recommended to use the landmarks point-location strategy -when the application frequently issues point-location queries on a -rather static arrangement that the changes applied to it are mainly -insertions of curves and not deletions of them. - -\cgalModels{ArrangementPointLocation_2,ArrangementVerticalRayShoot_2} - -\sa `ArrangementPointLocation_2` -\sa `ArrangementVerticalRayShoot_2` -\sa `CGAL::Arr_point_location_result` - -*/ -template< typename Arrangement, typename Generator > -class Arr_landmarks_point_location { -public: - -}; /* end Arr_landmarks_point_location */ } /* end namespace CGAL */ diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_linear_traits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_linear_traits_2.h index 7f1d5825c01..ede97c7dfe3 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_linear_traits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_linear_traits_2.h @@ -3,10 +3,10 @@ namespace CGAL { /*! \ingroup PkgArrangementOnSurface2TraitsClasses * * The traits class `Arr_linear_traits_2` is a model of the - * `ArrangementTraits_2` concept, which enables the construction and maintenance + * `AosTraits_2` concept, which enables the construction and maintenance * of arrangements of linear objects. The linear objects may be bounded (line * segments) or unbounded (rays and lines). Thus, it is also a model of the - * concept `ArrangementOpenBoundaryTraits_2`. The traits class is parameterized + * concept `AosOpenBoundaryTraits_2`. The traits class is parameterized * parameterized with a \cgal-kernel model; see the reference page of * `Arr_segment_traits_2` for further explanations and recommendations * on choosing a kernel. @@ -14,35 +14,34 @@ namespace CGAL { * `Arr_linear_traits_2` defines `Kernel::Point_2` as its point type. The nested * `X_monotone_curve_2` and `Curve_2` types defined by the traits class (as is * the case with the various segment-traits classes, both types refer to the - * same class, as every linear object is (weakly) \f$ x\f$-monotone), are + * same class, as every linear object is (weakly) \f$x\f$-monotone), are * constructible from a point, a line segment, a ray and from a line (objects of * types `Kernel::Point_2`, `Kernel::Segment_2`, `Kernel::Ray_2` and * `Kernel::Line_2`, respectively). On the other hand, when we are given a curve * we can find out its actual type and convert it to the respective kernel * object (say, to a `Kernel::Ray_2`). * - * \cgalModels{ArrangementTraits_2,ArrangementLandmarkTraits_2,ArrangementOpenBoundaryTraits_2} + * \cgalModels{AosTraits_2,AosLandmarkTraits_2,AosOpenBoundaryTraits_2} */ -template< typename Kernel > +template class Arr_linear_traits_2 { public: - /// \name Types /// @{ - //! + /// typedef typename Kernel::Segment_2 Segment_2; - //! + /// typedef typename Kernel::Ray_2 Ray_2; - //! + /// typedef typename Kernel::Line_2 Line_2; - //! + /// typedef typename Kernel::Point_2 Point_2; - //! + /// typedef typename X_monotone_curve_2 Curve_2; /// @} @@ -57,20 +56,19 @@ public: */ class X_monotone_curve_2 { public: - /// \name Types /// @{ - //! + /// typedef typename Kernel::Point_2 Point_2; - //! + /// typedef typename Kernel::Segment_2 Segment_2; - //! + /// typedef typename Kernel::Ray_2 Ray_2; - //! + /// typedef typename Kernel::Line_2 Line_2; /// @} @@ -139,7 +137,6 @@ public: Point_2 target() const; /// @} - }; /* end Arr_linear_traits_2::X_monotone_curve_2 */ class Trim_2 { @@ -157,7 +154,6 @@ public: } /* end Arr_linear_traits_2::Trim_2 */ Trim_2 trim_2_object() const; - }; /* end Arr_linear_traits_2 */ } /* end namespace CGAL */ diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_naive_point_location.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_naive_point_location.h index 8c08d593518..c6f633c7640 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_naive_point_location.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_naive_point_location.h @@ -1,28 +1,22 @@ - namespace CGAL { -/*! -\ingroup PkgArrangementOnSurface2PointLocation +/*! \ingroup PkgArrangementOnSurface2PointLocation + * + * \anchor arr_refnaive_pl + * + * The `Arr_naive_point_location` class implements a naive algorithm that + * traverses all the vertices and halfedges in the arrangement in search for an + * answer to a point-location query. The query time is therefore linear in the + * complexity of the arrangement. Naturally, this point-location strategy could + * turn into a heavy time-consuming process when applied to dense arrangements. + * + * \cgalModels{AosPointLocation_2,AosVerticalRayShoot_2} + * + * \sa `AosPointLocation_2` + * \sa `AosVerticalRayShoot_2` + * \sa `CGAL::Arr_point_location_result` + */ +template +class Arr_naive_point_location {}; -\anchor arr_refnaive_pl - -The `Arr_naive_point_location` class implements a naive algorithm that traverses -all the vertices and halfedges in the arrangement in search for an -answer to a point-location query. -The query time is therefore linear in the complexity of the arrangement. -Naturally, this point-location strategy could turn into a heavy -time-consuming process when applied to dense arrangements. - -\cgalModels{ArrangementPointLocation_2,ArrangementVerticalRayShoot_2} - -\sa `ArrangementPointLocation_2` -\sa `ArrangementVerticalRayShoot_2` -\sa `CGAL::Arr_point_location_result` - -*/ -template< typename Arrangement > -class Arr_naive_point_location { -public: - -}; /* end Arr_naive_point_location */ } /* end namespace CGAL */ diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_non_caching_segment_basic_traits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_non_caching_segment_basic_traits_2.h index ab5cf747b7a..9fceee59c5e 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_non_caching_segment_basic_traits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_non_caching_segment_basic_traits_2.h @@ -1,32 +1,26 @@ - namespace CGAL { -/*! -\ingroup PkgArrangementOnSurface2TraitsClasses +/*! \ingroup PkgArrangementOnSurface2TraitsClasses + * + * The traits class `Arr_non_caching_segment_basic_traits_2` is a model of the + * `AosTraits_2` concept that allow the construction and maintenance of + * arrangements of sets of pairwise interior-disjoint line segments. It is + * templated with a \cgal-Kernel model, and it is derived from it. This traits + * class is a thin layer above the parameterized kernel. It inherits the + * `Point_2` from the kernel and its `X_monotone_curve_2` type is defined as + * `Kernel::Segment_2`. Most traits-class functor are inherited from the kernel + * functor, and the traits class only supplies the necessary functors that are + * not provided by the kernel. The kernel is parameterized with a number type, + * which should support the arithmetic operations \f$+\f$, \f$-\f$ and + * \f$\times\f$ in an exact manner in order to avoid robustness problems. Using + * `Cartesian` or `Cartesian` are possible substitutions for the + * kernel. Using other (inexact) number types (for example, instantiating the + * template with `Simple_cartesian`) is also possible, at the user's own + * risk. + * + * \cgalModels{AosLandmarkTraits_2} + */ +template +class Arr_non_caching_segment_basic_traits_2 {}; -The traits class `Arr_non_caching_segment_basic_traits_2` is a model of the `ArrangementTraits_2` -concept that allow the construction and maintenance of arrangements of -sets of pairwise interior-disjoint line segments. It is templated with a -\cgal-Kernel model, and it is derived from it. This traits class is a -thin layer above the parameterized kernel. It inherits the `Point_2` -from the kernel and its `X_monotone_curve_2` type is defined as -`Kernel::Segment_2`. Most traits-class functor are inherited from the -kernel functor, and the traits class only supplies the necessary functors -that are not provided by the kernel. The kernel is parameterized with a -number type, which should support the arithmetic operations \f$ +\f$, \f$ -\f$ and -\f$ \times\f$ in an exact manner in order to avoid robustness problems. -Using `Cartesian` or `Cartesian` are possible -substitutions for the kernel. Using other (inexact) number types -(for example, instantiating the template with -`Simple_cartesian`) is also possible, at the user's own -risk. - -\cgalModels{ArrangementLandmarkTraits_2} - -*/ -template< typename Kernel > -class Arr_non_caching_segment_basic_traits_2 { -public: - -}; /* end Arr_non_caching_segment_basic_traits_2 */ } /* end namespace CGAL */ diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_non_caching_segment_traits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_non_caching_segment_traits_2.h index 32a67f5162d..bc5731dfedb 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_non_caching_segment_traits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_non_caching_segment_traits_2.h @@ -1,47 +1,41 @@ - namespace CGAL { -/*! -\ingroup PkgArrangementOnSurface2TraitsClasses +/*! \ingroup PkgArrangementOnSurface2TraitsClasses + * + * The traits class `Arr_non_caching_segment_traits_2` is a model of the + * `AosTraits_2` concept that allows the construction and maintenance of + * arrangements of line segments. It is parameterized with a \cgal-Kernel type, + * and it is derived from it. This traits class is a thin layer above the + * parameterized kernel. It inherits the `Point_2` from the kernel and its + * `X_monotone_curve_2` and `Curve_2` types are both defined as + * `Kernel::Segment_2`. Most traits-class functor are inherited from the kernel + * functor, and the traits class only supplies the necessary functors that are + * not provided by the kernel. The kernel is parameterized with a number type, + * which should support exact rational arithmetic in order to avoid robustness + * problems, although other number types could be used at the user's own risk. + * + * The traits-class implementation is very simple, yet may lead to a cascaded + * representation of intersection points with exponentially long bit-lengths, + * especially if the kernel is parameterized with a number type that does not + * perform normalization (e.g. `Quotient`). The + * `Arr_segment_traits_2` traits class avoids this cascading problem, and should + * be the default choice for implementing arrangements of line segments. It is + * recommended to use `Arr_non_caching_segment_traits_2` only for very sparse + * arrangements of huge sets of input segments. + * + * While `Arr_non_caching_segment_traits_2` models the concept + * `AosDirectionalXMonotoneTraits_2`, the implementation of the + * `Are_mergeable_2` operation does not enforce the input curves to have the + * same direction as a precondition. Moreover, + * `Arr_non_caching_segment_traits_2` supports the merging of curves of opposite + * directions. + * + * \cgalModels{AosTraits_2,AosLandmarkTraits_2,AosDirectionalXMonotoneTraits_2} + * + * \sa `Arr_segment_traits_2` + */ +template +class Arr_non_caching_segment_traits_2 : + public Arr_non_caching_segment_basic_traits_2 {}; -The traits class `Arr_non_caching_segment_traits_2` is a model of the `ArrangementTraits_2` -concept that allows the construction and maintenance of arrangements of -line segments. It is parameterized with a \cgal-Kernel type, and it -is derived from it. This traits class is a thin layer above the -parameterized kernel. It inherits the `Point_2` from the kernel and its -`X_monotone_curve_2` and `Curve_2` types are both defined as -`Kernel::Segment_2`. Most traits-class functor are inherited from the -kernel functor, and the traits class only supplies the necessary functors -that are not provided by the kernel. The kernel is parameterized with a -number type, which should support exact rational arithmetic in order to -avoid robustness problems, although other number types could be used at the -user's own risk. - -The traits-class implementation is very simple, yet may lead to -a cascaded representation of intersection points with exponentially long -bit-lengths, especially if the kernel is parameterized with a number type -that does not perform normalization (e.g. `Quotient`). -The `Arr_segment_traits_2` traits class avoids this cascading -problem, and should be the default choice for implementing arrangements of -line segments. It is recommended to use `Arr_non_caching_segment_traits_2` only for very sparse -arrangements of huge sets of input segments. - -While `Arr_non_caching_segment_traits_2` models the concept -`ArrangementDirectionalXMonotoneTraits_2`, the implementation of -the `Are_mergeable_2` operation does not enforce the input curves -to have the same direction as a precondition. Moreover, `Arr_non_caching_segment_traits_2` -supports the merging of curves of opposite directions. - -\cgalModels{ArrangementTraits_2,ArrangementLandmarkTraits_2,ArrangementDirectionalXMonotoneTraits_2} - -\sa `Arr_segment_traits_2` - -*/ -template< typename Kernel > -class Arr_non_caching_segment_traits_2 - : public Arr_non_caching_segment_basic_traits_2 - { -public: - -}; /* end Arr_non_caching_segment_traits_2 */ } /* end namespace CGAL */ diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_overlay_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_overlay_2.h index 731c735675a..0efe5184b87 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_overlay_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_overlay_2.h @@ -1,75 +1,72 @@ namespace CGAL { -/*! -\ingroup PkgArrangementOnSurface2Funcs -\brief Computes the overlay of two arrangements `arr1` and `arr2`, and sets -the output arrangement `res` to represent the overlaid arrangement. +/*! \ingroup PkgArrangementOnSurface2Funcs + * \brief Computes the overlay of two arrangements `arr1` and `arr2`, and sets + * the output arrangement `res` to represent the overlaid arrangement. + * + * \details + * Computes the overlay of two input arrangement + * objects, and returns the overlaid arrangement. All three arrangements + * can be instantiated with different geometric traits classes and different + * \dcel classes (encapsulated in the various topology-traits classes). + * The geometry traits of the resulting arrangement is used to construct the + * resulting arrangement. This means that all the types (e.g., + * `Traits::Point_2`, `Traits::Curve_2`, and `Traits::Point_2`) + * of both input arrangements have to be convertible to the types in the + * resulting arrangement. A given overlay-traits object is used to properly + * construct the overlaid \dcel that represents the resulting arrangement. + * + * \pre `res` does not refer to either `arr1` or `arr2` (that is, + * "self overlay" is not supported). + * + * \pre The overlay-traits object `ovl_tr` must model the `OverlayTraits` + * concept, which is able to construct records of the `ResDcel` class on + * the basis of the `Dcel1` and `Dcel2` records that induce them. + * + * \sa `OverlayTraits` + */ +template +void overlay(const Arrangement_2& arr1, + const Arrangement_2& arr2, + Arrangement_2& arr_res, + OverlayTraits& ovl_tr); -\details -Computes the overlay of two input arrangement -objects, and returns the overlaid arrangement. All three arrangements -can be instantiated with different geometric traits classes and different -\dcel classes (encapsulated in the various topology-traits classes). -The geometry traits of the resulting arrangement is used to construct the -resulting arrangement. This means that all the types (e.g., -`Traits::Point_2`, `Traits::Curve_2`, and `Traits::Point_2`) -of both input arrangements have to be convertible to the types in the -resulting arrangement. A given overlay-traits object is used to properly -construct the overlaid \dcel that represents the resulting arrangement. - -\pre `res` does not refer to either `arr1` or `arr2` (that is, "self overlay" is not supported). - -\pre The overlay-traits object `ovl_tr` must model the `OverlayTraits` - concept, which is able to construct records of the `ResDcel` class on - the basis of the `Dcel1` and `Dcel2` records that induce them. - -\sa `OverlayTraits` -*/ -template -void overlay (const Arrangement_2& arr1, - const Arrangement_2& arr2, - Arrangement_2& arr_res, - OverlayTraits& ovl_tr); - -/*! -\ingroup PkgArrangementOnSurface2Funcs -\brief Computes the overlay of two arrangements with history `arr1` and -`arr2`, and sets the output arrangement with history `res` to -represent the overlaid arrangement. The function also constructs a -consolidated set of curves that induce `res`. - -\details -Computes the overlay of two input arrangement -objects, and returns the overlaid arrangement. All three arrangements -can be instantiated with different geometric traits classes and different -\dcel classes (encapsulated in the various topology-traits classes). -The geometry traits of the resulting arrangement is used to construct the -resulting arrangement. This means that all the types (e.g., -`Traits::Point_2`, `Traits::Curve_2`, and `Traits::Point_2`) -of both input arrangements have to be convertible to the types in the -resulting arrangement. A given overlay-traits object is used to properly -construct the overlaid \dcel that represents the resulting arrangement. - -\pre `res` does not refer to either `arr1` or `arr2` (that is, "self overlay" is not supported). - -\pre The overlay-traits object `ovl_tr` must model the `OverlayTraits` - concept, which is able to construct records of the `ResDcel` class on - the basis of the `Dcel1` and `Dcel2` records that induce them. - -\sa `OverlayTraits` - -*/ -template -void overlay (const Arrangement_with_history_2& arr1, - const Arrangement_with_history_2& arr2, - Arrangement_with_history_2& res, - OverlayTraits& ovl_tr); - - - +void overlay(const Arrangement_with_history_2& arr1, + const Arrangement_with_history_2& arr2, + Arrangement_with_history_2& res, + OverlayTraits& ovl_tr); } /* end namespace CGAL */ diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_point_location_result.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_point_location_result.h index 0456c4e06f8..d426218d2fe 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_point_location_result.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_point_location_result.h @@ -8,16 +8,15 @@ namespace CGAL { * \tparam Arrangement must be an instance of the * `CGAL::Arrangement_on_surface_2` class template. * - * \sa `ArrangementPointLocation_2` - * \sa `ArrangementVerticalRayShoot_2` + * \sa `AosPointLocation_2` + * \sa `AosVerticalRayShoot_2` * \sa `CGAL::Arr_naive_point_location` * \sa `CGAL::Arr_walk_along_line_point_location` * \sa `CGAL::Arr_landmarks_point_location` * \sa `CGAL::Arr_trapezoid_ric_point_location` */ template -struct Arr_point_location_result -{ +struct Arr_point_location_result { /*! The type of the arrangement feature that is the result of a * point-location query or a vertical ray-shoot query, namely, * `std::variant` diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_polycurve_traits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_polycurve_traits_2.h index 3346df459f3..1068f58dd7d 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_polycurve_traits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_polycurve_traits_2.h @@ -46,11 +46,11 @@ namespace CGAL { * * The number type used by the injected subcurve traits should support exact * rational arithmetic (that is, the number type should support the arithmetic - * operations \f$ +\f$, \f$ -\f$, \f$ \times\f$ and \f$ \div\f$ carried out + * operations \f$+\f$, \f$-\f$, \f$\times\f$ and \f$\div\f$ carried out * without loss of precision), in order to avoid robustness problems, although * other inexact number types could be used at the user's own risk. * - * A polycurve that comprises \f$n > 0\f$ subcurves has \f$ n+1 \f$ subcurve + * A polycurve that comprises \f$n > 0\f$ subcurves has \f$n+1f$ subcurve * end-points, and they are represented as objects of type * `SubcurveTraits_2::Point_2`. Since the notion of a \a vertex is reserved to * 0-dimensional elements of an arrangement, we use, in this context, the @@ -87,22 +87,19 @@ namespace CGAL { * \sa `Arr_rational_function_traits_2` * \sa `CGAL_ALWAYS_LEFT_TO_RIGHT` */ - template class Arr_polycurve_traits_2 { public: /// \name Types /// @{ - /*! - */ - // TODO: Have to turn these into links, so whenever I mention Point_2 it - // will point here and *not* to Kernel::Point_2 for instance. + /// typedef SubcurveTraits_2::Point_2 Point_2; - /*! - */ + /// typedef SubcurveTraits_2::Curve_2 Subcurve_2; + + /// typedef SubcurveTraits_2::X_monotone_curve_2 X_monotone_subcurve_2; /// @} @@ -361,8 +358,8 @@ public: /*! \deprecated * Obtain the number of subcurve end-points that comprise the polycurve. - * Note that for a bounded polycurve, if there are \f$ n\f$ points in the - * polycurve, it comprises \f$ (n - 1)\f$ subcurves. + * Note that for a bounded polycurve, if there are \f$n\f$ points in the + * polycurve, it comprises \f$(n - 1)\f$ subcurves. * Currently, only bounded polycurves are supported. */ unsigned_int points() const; @@ -414,7 +411,7 @@ public: */ size_type number_of_subcurves() const; - /*! Obtain the \f$ k\f$th subcurve of the polycurve. + /*! Obtain the \f$k\f$th subcurve of the polycurve. * \pre \f$k\f$ is not greater than or equal to \f$n-1\f$, where * \f$n\f$ is the number of subcurves. */ @@ -463,28 +460,25 @@ public: void clear(); /// @} /* End of Operations */ - }; /* end Arr_polycurve_traits_2::Curve_2 */ - - /*! The `X_monotone_curve_2` class nested within the polycurve - * traits is used to represent \f$ x\f$-monotone piecewise linear subcurves. + /*! The `X_monotone_curve_2` class nested within the polycurve traits is + * used to represent \f$x\f$-monotone piecewise linear subcurves. * * It inherits from the `Curve_2` type. `X_monotone_curve_2` can be - * constructed just like `Curve_2`. However, there is precondition - * (which is not tested) that the input defines an \f$ - * x\f$-monotone polycurve. Furthermore, in contrast to the general - * `Curve_2` type, in this case, the subcurves that an - * `X_monotone_curve_2` comprises have to be instances of the type - * `SubcurveTraits_2::X_monotone_curve_2`. Note that the \f$ - * x\f$-monotonicity ensures that an \f$ x\f$-monotone polycurve - * is not self-intersecting. (A self-intersecting polycurve is - * subdivided into several interior-disjoint \f$x\f$-monotone subcurves). + * constructed just like `Curve_2`. However, there is precondition (which + * is not tested) that the input defines an \f$x\f$-monotone polycurve. + * Furthermore, in contrast to the general `Curve_2` type, in this case, + * the subcurves that an `X_monotone_curve_2` comprises have to be + * instances of the type `SubcurveTraits_2::X_monotone_curve_2`. Note that + * the \f$x\f$-monotonicity ensures that an \f$x\f$-monotone polycurve is + * not self-intersecting. (A self-intersecting polycurve is subdivided + * into several interior-disjoint \f$x\f$-monotone subcurves). * - * The defined \f$ x\f$-monotone polycurve can be directed either from + * The defined \f$x\f$-monotone polycurve can be directed either from * right-to-left (and in turn its vertices are stored in an ascending - * lexicographical \f$ xy\f$-order) or left-to-right (and in this case the - * vertices are stored in a descending lexicographical \f$ xy\f$-order). + * lexicographical \f$xy\f$-order) or left-to-right (and in this case the + * vertices are stored in a descending lexicographical \f$xy\f$-order). */ template class X_monotone_curve_2 {}; diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_polyline_traits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_polyline_traits_2.h index c9cc6f5def6..ea9dff66c90 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_polyline_traits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_polyline_traits_2.h @@ -30,15 +30,15 @@ namespace CGAL { * The type substituting the template parameter `SegmentTraits_2` when * the template Arr_polyline_traits_2 is instantiated must be a model * of the concepts - * - `ArrangementTraits_2`, - * - `ArrangementDirectionalXMonotoneTraits_2`, - * - `ArrangementConstructXMonotoneCurveTraits_2`, - * - `ArrangementConstructCurveTraits_2`. + * - `AosTraits_2`, + * - `AosDirectionalXMonotoneTraits_2`, + * - `AosConstructXMonotoneCurveTraits_2`, + * - `AosConstructCurveTraits_2`. * * If, in addition, the GeometryTraits_2 models the concept - * `ArrangementApproximateTraits_2` then `Arr_polycurve_traits_2` models + * `AosApproximateTraits_2` then `Arr_polycurve_traits_2` models * this concept as well. The same holds for the concept - * `ArrangementOpenBoundaryTraits_2`. If no type is provided, then + * `AosOpenBoundaryTraits_2`. If no type is provided, then * `Arr_segment_traits_2` (instantiated with * `Exact_predicates_exact_constructions_kernel` as the kernel) is used. * Otherwise, @@ -52,17 +52,17 @@ namespace CGAL { * * The number type used by the injected segment traits should support exact * rational arithmetic (that is, the number type should support the arithmetic - * operations \f$ +\f$, \f$ -\f$, \f$ \times\f$ and \f$ \div\f$ carried out + * operations \f$+\f$, \f$-\f$, \f$\times\f$ and \f$\div\f$ carried out * without loss of precision), in order to avoid robustness problems, although * other inexact number types could be used at the user's own risk. * - * A polyline that comprises \f$n > 0\f$ segments has \f$ n+1 \f$ points, and - * they are represented as objects of type `SegmentTraits_2::Point_2`. Since the - * notion of a \a vertex is reserved to 0-dimensional elements of an + * A polyline that comprises \f$n > 0\f$ segments has \f$n+1\f$ points, and + * they are represented as objects of type `SegmentTraits_2::Point_2`. Since + * the notion of a \a vertex is reserved to 0-dimensional elements of an * arrangement, we use, in this context, the notion of \a points in order to - * refer to the vertices of a polyline. For example, an arrangement induced by a - * single non-self intersecting polyline has exactly two vertices regardless of - * the number of points. Finally, the types `Segment_2` and + * refer to the vertices of a polyline. For example, an arrangement induced by + * a single non-self intersecting polyline has exactly two vertices regardless + * of the number of points. Finally, the types `Segment_2` and * `X_monotone_segment_2` nested in `Arr_polyline_traits_2` are nothing but * `SegmentTraits_2::Curve_2` and `SegmentTraits_2::X_monotone_curve_2`, * respectively. @@ -77,8 +77,7 @@ namespace CGAL { * the macro `CGAL_ALWAYS_LEFT_TO_RIGHT` to 1 before any \cgal header is * included. * - * \cgalModels{ArrangementTraits_2,ArrangementDirectionalXMonotoneTraits_2,`ArrangementConstructXMonotoneCurveTraits_2` - * ArrangementConstructCurveTraits_2,ArrangementApproximateTraits_2 (if the type that substitutes + * \cgalModels{AosTraits_2,AosDirectionalXMonotoneTraits_2,AosConstructXMonotoneCurveTraits_2,AosConstructCurveTraits_2,AosApproximateTraits_2 (if the type that substitutes * the template parameter `SegmentTraits_2` models the concept as well)} * * \sa `Arr_polycurve_traits_2` @@ -91,22 +90,23 @@ namespace CGAL { * \sa `CGAL_ALWAYS_LEFT_TO_RIGHT` */ template -class Arr_polyline_traits_2 : public Arr_polycurve_traits_2{ +class Arr_polyline_traits_2 : public Arr_polycurve_traits_2 { public: - /// \name Types /// @{ - /*! - */ + + /// typedef SegmentTraits_2 Segment_traits_2; - // TODO: Have to turn these into links, so whenever I mention Point_2 it - // will point here and *not* to Kernel::Point_2 for instance. + + /// typedef SegmentTraits_2::Point_2 Point_2; - /*! - */ + /// typedef SegmentTraits_2::Curve_2 Segment_2; + + /// typedef SegmentTraits_2::X_monotone_curve_2 X_monotone_segment_2; + /// @} /*! The `Curve_2` type nested within the traits class respresnts @@ -114,18 +114,18 @@ public: */ class Curve_2 { public: - //! Const iterator of subcurves. + /// Const iterator of subcurves. typedef std::vector::const_iterator Segment_const_iterator; - //! Reverse const iterator of subcurves. + /// Reverse const iterator of subcurves. typedef std::reverse_iterator Segment_const_reverse_iterator; - //! constructs default. + /// constructs default. Curve_2(); - //! constructs from a subcurve. + /// constructs from a subcurve. Curve_2(const Segment_2& seg); /*! constructs a polyline from a range of subcurves. @@ -137,16 +137,16 @@ public: template void Curve_2(InputIterator begin, InputIterator end); - //! obtains an iterator for the polycurve subcurves. + /// obtains an iterator for the polycurve subcurves. Segment_const_iterator begin_segments() const; - //! obtains a past-the-end iterator for the polycurve subcurves. + /// obtains a past-the-end iterator for the polycurve subcurves. Segment_const_iterator end_segments() const; - //! obtains the first reverse iterator of the polyline subcurves. + /// obtains the first reverse iterator of the polyline subcurves. Segment_const_reverse_iterator rbegin_segments() const; - //! obtains the past-the-end reverse iterator for the polyline points. + /// obtains the past-the-end reverse iterator for the polyline points. Segment_const_reverse_iterator rend_segments() const; /*! Obtain the number of subcurves that comprise the poyline. @@ -161,11 +161,11 @@ public: class X_monotone_curve_2 { public: - //! Const iterator of subcurves. + /// Const iterator of subcurves. typedef std::vector::const_iterator Segment_const_iterator; - //! Reverse const iterator of subcurves. + /// Reverse const iterator of subcurves. typedef std::reverse_iterator Segment_const_reverse_iterator; @@ -177,8 +177,8 @@ public: /*! Construct from a range. Similar to the constructor of a general * polycurve. Like in the case of general polycurve, for the sake of - * backwards compatibility we have to keep an implementation of construction - * from a range of points. DO NOT USE THIS CONSTRUCTION. + * backwards compatibility we have to keep an implementation of + * construction from a range of points. DO NOT USE THIS CONSTRUCTION. */ template X_monotone_curve_2(InputIterator begin, InputIterator end); @@ -222,15 +222,15 @@ public: /*! Obtain a polyline connecting the two given endpoints. * \param p The first point. * \param q The second point. - * \pre `p` and `q` are distinct. * \return A segment connecting `p` and `q`. + * \pre `p` and `q` are distinct. */ Curve_2 operator()(const Point_2& p, const Point_2& q) const; /*! Obtain a polyline that comprises of one given segment. * \param seg input segment - * \pre `seg` is not degenerated (not tested) * \return A polyline with one segment, namely `seg`. + * \pre `seg` is not degenerated (not tested) */ Curve_2 operator()(const Segment_2& seg) const; @@ -239,10 +239,10 @@ public: * * \param begin iterator pointing to the first element in the range. * \param end iterator pointing to the past-the-end element in the range. + * \return A polyline using the corresponding construction implementation. * \pre The given range form a continuous and well-oriented polyline * (not tested). * \pre Contains no degenerated segments (not tested) - * \return A polyline using the corresponding construction implementation. */ template Curve_2 operator()(ForwardIterator begin, ForwardIterator end) const; @@ -272,7 +272,7 @@ public: /*! Append a point `p` to an existing polyline `cv` at the back. * \param cv a polyline. Note, `cv` is not (necessarily) - * \f$ x\f$-monotone. + * \f$x\f$-monotone. * \param p a point to be appended to `cv` at the back. * \pre `cv` contains at least one segment. */ @@ -322,7 +322,7 @@ public: /*! Append a point `p` to an existing polyline `cv` at the front. * \param cv a polyline. Note, `cv` is not (necessarily) - * \f$ x\f$-monotone. + * \f$x\f$-monotone. * \param p a point to be appended to `cv` at the back. * \pre `cv` contains at least one segment. */ @@ -382,7 +382,6 @@ public: Push_front_2 push_front_2_object() const; /// @} /* End Accessing Functor Objects */ - }; /* end Arr_polyline_traits_2 */ } /* end namespace CGAL */ diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_rational_function_traits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_rational_function_traits_2.h index d722a3ae285..617244fe75a 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_rational_function_traits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_rational_function_traits_2.h @@ -1,89 +1,74 @@ - namespace CGAL { -/*! - \ingroup PkgArrangementOnSurface2TraitsClasses - - The traits class `Arr_rational_function_traits_2` is a model of the `ArrangementTraits_2` - concept. It handles bounded and unbounded arcs of rational functions, - referred to as rational arcs (in particular, such an arc may correspond to the - entire graph of a rational function). It supports bounded and - unbounded arcs. Thus, it is also a model of the concept - `ArrangementOpenBoundaryTraits_2`. The traits class enables - the construction and maintenance of arrangements of such arcs. - - A rational function \f$ y = \frac{P(x)}{Q(x)}\f$ is defined by two polynomials - \f$ P\f$ and \f$ Q\f$ of arbitrary degrees. - If \f$ Q(x) = 1\f$ then the function is a simple polynomial function. - Usually the domain is \f$ \mathbb{R}\f$ but the function may also be - restricted to a bounded interval \f$ [x_{\rm min}, x_{\rm max}]\f$ - or defined over a ray \f$ (-\infty, x_{\rm max}]\f$ or over \f$ [x_{\rm min}, \infty)\f$. - Rational functions are represented by the nested type `Curve_2`. - Note that a rational function may be not continuous since roots of \f$ Q\f$ induce - vertical asymptotes, which would contradict the notion of an \f$ x\f$-monotone curve - as it is introduced by the `ArrangementTraits_2` concept. - Thus, continuous portions of rational functions are represented by the nested - type `X_monotone_curve_2`, which is different from `Curve_2`. - Constructors for both classes are provided by the traits. - A `Curve_2` may be split up into several `X_monotone_curve_2` - using `Make_x_monotone_2`. - - The template parameter of the traits must be a model of the - concept `AlgebraicKernel_d_1`. - A rational function is then represented by two polynomials \f$ P\f$ and \f$ Q\f$ of type - `AlgebraicKernel_d_1::Polynomial_1`. - A point is represented by a rational function and its \f$ x\f$-coordinate, which is - of type `AlgebraicKernel_d_1::Algebraic_real_1`. - Note that an explicit representation of the \f$ y\f$-coordinate is only computed upon - request, which can be a rather costly operation. - - The constructed rational functions are cached by the traits class. - The cache is local to each traits class object. - It is therefore necessary to construct the curves using the constructor - objects provided by member functions of the traits class. - Moreover, a curve must only be used with its own traits. - The cache is automatically cleaned up from time to time. - The amortized clean up costs are constant. However, there is also a - separate member function that cleans up the cache on demand. - - While `Arr_rational_function_traits_2` models the concept - `ArrangementDirectionalXMonotoneTraits_2`, the implementation of - the `Are_mergeable_2` operation does not enforce the input curves - to have the same direction as a precondition. Moreover, `Arr_rational_function_traits_2` - supports the merging of curves of opposite directions. - - \cgalModels{ArrangementTraits_2,ArrangementDirectionalXMonotoneTraits_2,ArrangementOpenBoundaryTraits_2} -*/ -template< typename AlgebraicKernel_d_1 > +/*! \ingroup PkgArrangementOnSurface2TraitsClasses + * + * The traits class `Arr_rational_function_traits_2` is a model of the + * `ArrangementTraits_2` concept. It handles bounded and unbounded arcs of + * rational functions, referred to as rational arcs (in particular, such + * an arc may correspond to the entire graph of a rational function). It + * supports bounded and unbounded arcs. Thus, it is also a model of the concept + * `ArrangementOpenBoundaryTraits_2`. The traits class enables the construction + * and maintenance of arrangements of such arcs. + * + * A rational function \f$y = \frac{P(x)}{Q(x)}\f$ is defined by two polynomials + * \f$P\f$ and \f$Q\f$ of arbitrary degrees. If \f$Q(x) = 1\f$ then the + * function is a simple polynomial function. Usually the domain is + * \f$\mathbb{R}\f$ but the function may also be restricted to a bounded + * interval \f$[x_{\rm min}, x_{\rm max}]\f$ or defined over a ray + * \f$(-\infty,x_{\rm max}]\f$ or over \f$[x_{\rm min}, \infty)\f$. Rational + * functions are represented by the nested type `Curve_2`. Note that a rational + * function may be not continuous since roots of \f$Q\f$ induce vertical + * asymptotes, which would contradict the notion of an \f$x\f$-monotone curve as + * it is introduced by the `ArrangementTraits_2` concept. Thus, continuous + * portions of rational functions are represented by the nested type + * `X_monotone_curve_2`, which is different from `Curve_2`. Constructors for + * both classes are provided by the traits. A `Curve_2` may be split up into + * several `X_monotone_curve_2` using `Make_x_monotone_2`. + * + * The template parameter of the traits must be a model of the concept + * `AlgebraicKernel_d_1`. A rational function is then represented by two + * polynomials \f$P\f$ and \f$Q\f$ of type + * `AlgebraicKernel_d_1::Polynomial_1`. A point is represented by a rational + * function and its \f$x\f$-coordinate, which is of type + * `AlgebraicKernel_d_1::Algebraic_real_1`. Note that an explicit + * representation of the \f$y\f$-coordinate is only computed upon request, + * which can be a rather costly operation. + * + * The constructed rational functions are cached by the traits class. The cache + * is local to each traits class object. It is therefore necessary to construct + * the curves using the constructor objects provided by member functions of the + * traits class. Moreover, a curve must only be used with its own traits. The + * cache is automatically cleaned up from time to time. The amortized clean up + * costs are constant. However, there is also a separate member function that + * cleans up the cache on demand. + * + * While `Arr_rational_function_traits_2` models the concept + * `ArrangementDirectionalXMonotoneTraits_2`, the implementation of the + * `Are_mergeable_2` operation does not enforce the input curves to have the + * same direction as a precondition. Moreover, `Arr_rational_function_traits_2` + * supports the merging of curves of opposite directions. + * + * \cgalModels{ArrangementTraits_2,ArrangementDirectionalXMonotoneTraits_2,ArrangementOpenBoundaryTraits_2} + */ +template class Arr_rational_function_traits_2 { public: - /// \name Types /// @{ - /*! - - */ + /// typedef AlgebraicKernel_d_1 Algebraic_kernel_d_1; - /*! - - */ + /// typedef AlgebraicKernel_d_1::Coefficient Coefficient; - /*! - - */ + /// typedef AlgebraicKernel_d_1::Polynomial_1 Polynomial_1; - /*! - - */ + /// typedef AlgebraicKernel_d_1::Algebraic_real_1 Algebraic_real_1; - /*! - - */ + /// typedef AlgebraicKernel_d_1::Bound Bound; /// @} @@ -91,10 +76,9 @@ public: /// \name Creation /// @{ - /*! - constructs an empty traits that uses the kernel pointed by `kernel` - for performing algebraic operations. - */ + /*! constructs an empty traits that uses the kernel pointed by `kernel` + * for performing algebraic operations. + */ Arr_rational_function_traits_2(const Algebraic_kernel_d_1* kernel); /// @} @@ -102,673 +86,586 @@ public: /// \name Operations /// @{ - /*! - Returns an instance of `Construct_curve_2`. - */ + /*! Returns an instance of `Construct_curve_2`. + */ Construct_curve_2 construct_curve_2_object() const; - /*! - Returns an instance of `Construct_x_monotone_curve_2`. - */ + /*! Returns an instance of `Construct_x_monotone_curve_2`. + */ Construct_x_monotone_curve_2 construct_x_monotone_curve_2_object() const; - /*! - Deletes all curves from the cache that exist only there. - */ + /*! Deletes all curves from the cache that exist only there. + */ void cleanup_cache() const; - /*! - Returns a pointer to the used algebraic kernel object. - */ + /*! Returns a pointer to the used algebraic kernel object. + */ const Algebraic_kernel_d_1* algebraic_kernel_d_1() const; /// @} - -/*! - - -Functor to construct a `Curve_2`. To enable caching the class is not -default constructible and must be obtained via the function -`construct_curve_2_object()`, which is a member of the traits. - -\cgalModels{Assignable,CopyConstructible,AdaptableBinaryFunction,AdaptableUnaryFunction} - -*/ -class Construct_curve_2 { -public: - -/// \name Types -/// @{ - -/*! - -*/ -typedef AlgebraicKernel_d_1::Polynomial_1 Polynomial_1; - -/*! - -*/ -typedef AlgebraicKernel_d_1::Algebraic_real_1 Algebraic_real_1; - -/*! - -*/ -typedef Arr_rational_function_traits_2::Curve_2 result_type; - -/*! - -*/ -typedef Polynomial_1 argument_type; - -/*! - -*/ -typedef Polynomial_1 first_argument_type; - -/*! - -*/ -typedef Polynomial_1 second_argument_type; - -/// @} - -/// \name Operations -/// @{ - -/*! -Constructs a curve representing the polynomial function \f$ y = P(x)\f$. -*/ -Curve_2 operator()(Polynomial_1 P) const; - -/*! -Constructs a curve representing the polynomial function \f$ y = P(x)\f$. -The function is defined over the interval \f$ [x,+\infty)\f$ if \f$ right\f$ is true -and \f$ (-\infty,x]\f$ otherwise. -*/ -Curve_2 operator()(Polynomial_1 P, const Algebraic_real_1& x, bool right) const; - -/*! -Constructs a curve representing the polynomial function \f$ y = P(x)\f$. -The function is defined over the interval \f$ [lower,upper]\f$. -*/ -Curve_2 operator()(Polynomial_1 P, const Algebraic_real_1& lower, const Algebraic_real_1& upper) const; - -/*! -Constructs a curve representing the rational function \f$ y = P(x)/Q(x)\f$. -*/ -Curve_2 operator()(Polynomial_1 P, Polynomial_1 Q) const; - -/*! -Constructs a curve representing the rational function \f$ y = P(x)/Q(x)\f$. -The function is defined over the interval \f$ I=[x,+\infty)\f$ if \f$ right\f$ is -true and \f$ I=(-\infty,x]\f$ otherwise. -*/ -Curve_2 operator()(Polynomial_1 P, Polynomial_1 Q, const Algebraic_real_1& x, bool right) const; - -/*! -Constructs a curve representing the rational function \f$ y = P(x)/Q(x)\f$. -The function is defined over the interval \f$ I=[lower,upper]\f$. -*/ -Curve_2 operator()(Polynomial_1 P, Polynomial_1 Q, const Algebraic_real_1& lower, const Algebraic_real_1& upper) const; - -/*! -Constructs a curve representing the polynomial function \f$ y = P(x)\f$, where -the coefficients of \f$ P\f$ are given in the range `[begin,end)`. -*/ -template -Curve_2 operator()(InputIterator begin, InputIterator end) const; - -/*! -Constructs a curve representing the polynomial function \f$ y = P(x)\f$, where -the coefficients of \f$ P\f$ are given in the range `[begin,end)`. The -function is defined over the interval \f$ [x,+\infty)\f$ if \f$ right\f$ is true -and \f$ (-\infty,x]\f$ otherwise. -*/ -template -Curve_2 operator()(InputIterator begin, InputIterator end, -const Algebraic_real_1& x, bool right) const; - -/*! -Constructs a curve representing the polynomial function \f$ y = P(x)\f$, where -the coefficients of \f$ P\f$ are given in the range `[begin,end)`. The -function is defined over the interval \f$ [lower,upper]\f$. -*/ -template -Curve_2 operator()(InputIterator begin, InputIterator end, -const Algebraic_real_1& lower, -const Algebraic_real_1& upper) const; - -/*! -Constructs a curve representing the rational function \f$ y = P(x)/Q(x)\f$, -where the coefficients of \f$ P\f$ and \f$ Q\f$ are given in the ranges -`[begin_numer,end_numer)` and `[begin_denom,end_denom)`, -respectively. -*/ -template -Curve_2 operator()(InputIterator begin_numer, InputIterator end_numer, -InputIterator begin_denom, InputIterator end_denom) const; - -/*! -Constructs a curve representing the rational function \f$ y = P(x)/Q(x)\f$, -where the coefficients of \f$ P\f$ and \f$ Q\f$ are given in the ranges -`[begin_numer,end_numer)` and `[begin_denom,end_denom)`, -respectively. The function is defined over the interval \f$ I=[x,+\infty)\f$ -if \f$ right\f$ is true and \f$ I=(-\infty,x]\f$ otherwise. -*/ -template -Curve_2 operator()(InputIterator begin_numer, InputIterator end_numer, -InputIterator begin_denom, InputIterator end_denom, -const Algebraic_real_1& x, bool right) const; - -/*! -Constructs a curve representing the rational function \f$ y = P(x)/Q(x)\f$, -where the coefficients of \f$ P\f$ and \f$ Q\f$ are given in the ranges -`[begin_numer,end_numer)` and `[begin_denom,end_denom)`, -respectively. The function is defined over the interval \f$ I=[lower,upper]\f$. -*/ -template -Curve_2 operator()(InputIterator begin_numer, InputIterator end_numer, -InputIterator begin_denom, InputIterator end_denom, -const Algebraic_real_1& lower, -const Algebraic_real_1& upper) const; - -/// @} - -}; /* end Arr_rational_function_traits_2::Construct_curve_2 */ - -/*! - - -Functor to construct a `X_monotone_curve_2`. To enable caching the class -is not default constructible and must be obtained via the function -`construct_x_monotone_curve_2_object()`, which is a member of the traits. - -\cgalModels{Assignable,CopyConstructible,AdaptableBinaryFunction,AdaptableUnaryFunction} - -*/ -class Construct_x_monotone_curve_2 { -public: - -/// \name Types -/// @{ - -/*! - -*/ -typedef AlgebraicKernel_d_1::Polynomial_1 Polynomial_1; - -/*! - -*/ -typedef AlgebraicKernel_d_1::Algebraic_real_1 Algebraic_real_1; - -/*! - -*/ -typedef Arr_rational_function_traits_2::X_monotone_curve_2 result_type; - -/*! - -*/ -typedef Polynomial_1 argument_type; - -/*! - -*/ -typedef Polynomial_1 first_argument_type; - -/*! - -*/ -typedef Polynomial_1 second_argument_type; - -/// @} - -/// \name Operations -/// @{ - -/*! -Constructs an \f$ x\f$-monotone curve supported by the polynomial function -\f$ y = P(x)\f$. -*/ -X_monotone_curve_2 operator()(Polynomial_1 P) const; - -/*! -Constructs an \f$ x\f$-monotone curve supported by the polynomial function -\f$ y = P(x)\f$. The function is defined over the interval \f$ [x,+\infty)\f$ if -\f$ right\f$ is true and \f$ (-\infty,x]\f$ otherwise. -*/ -X_monotone_curve_2 operator()(Polynomial_1 P, -const Algebraic_real_1& x, -bool right) const; - -/*! -Constructs an \f$ x\f$-monotone curve supported by the polynomial function -\f$ y = P(x)\f$. The function is defined over the interval \f$ [lower,upper]\f$. -*/ -X_monotone_curve_2 operator()(Polynomial_1 P, -const Algebraic_real_1& lower, -const Algebraic_real_1& upper); const - -/*! -Constructs an \f$ x\f$-monotone curve supported by the rational function -\f$ y = P(x)/Q(x)\f$. -\pre \f$ Q\f$ has no real roots. -*/ -X_monotone_curve_2 operator()(Polynomial_1 P, Polynomial_1 Q); const - -/*! -Constructs an \f$ x\f$-monotone curve supported by the rational function -\f$ y = P(x)/Q(x)\f$. The function is defined over the interval \f$ I=[x,+\infty)\f$ -if \f$ right\f$ is true and \f$ I=(-\infty,x]\f$ otherwise. -\pre \f$ Q\f$ has no real roots in the interior of \f$ I\f$. -*/ -X_monotone_curve_2 operator()(Polynomial_1 P, Polynomial_1 Q, -const Algebraic_real_1& x, -bool right); const - -/*! -Constructs an \f$ x\f$-monotone curve supported by the rational function -\f$ y = P(x)/Q(x)\f$. The function is defined over the interval \f$ I=[lower,upper]\f$. -\pre \f$ Q\f$ has no real roots in the interior of \f$ I\f$. -*/ -X_monotone_curve_2 operator()(Polynomial_1 P, Polynomial_1 Q, -const Algebraic_real_1& lower, -const Algebraic_real_1& upper); const - -/*! -Constructs an \f$ x\f$-monotone curve supported by the polynomial function -\f$ y = P(x)\f$, where the coefficients of \f$ P\f$ are given in the range -`[begin,end)`. -*/ -template -X_monotone_curve_2 operator()(InputIterator begin, InputIterator end) const; - -/*! -Constructs an \f$ x\f$-monotone curve supported by the polynomial function -\f$ y = P(x)\f$, where the coefficients of \f$ P\f$ are given in the range -`[begin,end)`. The function is defined over the interval \f$ [x,+\infty)\f$ -if \f$ right\f$ is true and \f$ (-\infty,x]\f$ otherwise. -*/ -template -X_monotone_curve_2 operator()(InputIterator begin, InputIterator end, -const Algebraic_real_1& x, bool right) const; - -/*! -Constructs an \f$ x\f$-monotone curve supported by the polynomial function -\f$ y = P(x)\f$, where the coefficients of \f$ P\f$ are given in the range -`[begin,end)`. The function is defined over the interval -\f$ [lower,upper]\f$. -*/ -template -X_monotone_curve_2 operator()(InputIterator begin, InputIterator end -const Algebraic_real_1& lower, -const Algebraic_real_1& upper); const - -/*! -Constructs an \f$ x\f$-monotone curve supported by the rational function -\f$ y = P(x)/Q(x)\f$, where the coefficients of \f$ P\f$ and \f$ Q\f$ are given in the -ranges `[begin_numer,end_numer)` and `[begin_denom,end_denom)`, -respectively. -\pre \f$ Q\f$ has no real roots. -*/ -template -X_monotone_curve_2 operator()(InputIterator begin_numer, InputIterator end_numer, -InputIterator begin_denom, InputIterator end_denom); const - -/*! -Constructs an \f$ x\f$-monotone curve supported by the rational function -\f$ y = P(x)/Q(x)\f$, where the coefficients of \f$ P\f$ and \f$ Q\f$ are given in the -ranges `[begin_numer,end_numer)` and `[begin_denom,end_denom)`, -respectively. The function is defined over the interval \f$ I=[x,+\infty)\f$ -if \f$ right\f$ is true and \f$ I=(-\infty,x]\f$ otherwise. -\pre \f$ Q\f$ has no real roots in the interior of \f$ I\f$. -*/ -template -X_monotone_curve_2 operator()(InputIterator begin_numer, InputIterator end_numer, -InputIterator begin_denom, InputIterator end_denom, -const Algebraic_real_1& x, bool right); const - -/*! -Constructs an \f$ x\f$-monotone curve supported by the rational function -\f$ y = P(x)/Q(x)\f$, where the coefficients of \f$ P\f$ and \f$ Q\f$ are given in the -ranges `[begin_numer,end_numer)` and `[begin_denom,end_denom)`, -respectively. The function is defined over the interval \f$ I=[lower,upper]\f$. -\pre \f$ Q\f$ has no real roots in the interior of \f$ I\f$. -*/ -template -X_monotone_curve_2 operator()(InputIterator begin_numer, InputIterator end_numer, -InputIterator begin_denom, InputIterator end_denom, -const Algebraic_real_1& lower, const Algebraic_real_1& upper); const - -/// @} - -}; /* end Arr_rational_function_traits_2::Construct_x_monotone_curve_2 */ - -/*! - - -The `Curve_2` class nested within the traits is used -to represent rational functions which may be restricted to a certain x-range. - -\cgalModels{ArrTraits::Curve_2} - -*/ -class Curve_2 { -public: - -/// \name Types -/// @{ - -/*! - -*/ -typedef AlgebraicKernel_d_1::Polynomial_1 Polynomial_1; - -/*! - -*/ -typedef AlgebraicKernel_d_1::Algebraic_real_1 Algebraic_real_1; - -/// @} - -/// \name Operations -/// @{ - -/*! -returns the numerator of the supporting rational function. -*/ -const Polynomial_1& numerator () const; - -/*! -returns the denominator of the supporting rational function. -*/ -const Polynomial_1& denominator () const; - -/*! -returns whether çurve is continuous, namely whether it does not -contains any vertical asymptotes in its interior. -*/ -bool is_continuous() const; - -/*! -returns whether the \f$ x\f$-coordinate of çurve's left end is finite or -whether it is \f$ \pm\infty\f$. -*/ -Arr_parameter_space left_parameter_space_in_x () const; - -/*! -returns whether the \f$ x\f$-coordinate of çurve's right end is finite or -whether it is \f$ \pm\infty\f$. -*/ -Arr_parameter_space right_parameter_space_in_x () const; - -/*! -returns the \f$ x\f$-coordinate of the left end. -\pre left_boundary_in_x()==ARR_INTERIOR -*/ -Algebraic_real_1 left_x() const; - -/*! -returns the \f$ x\f$-coordinate of the right end. -\pre right_boundary_in_x()==ARR_INTERIOR -*/ -Algebraic_real_1 right_x() const; - -/// @} - -}; /* end Arr_rational_function_traits_2::Curve_2 */ - -/*! - - -\cgalModels{ArrTraits::Point_2} - -*/ -class Point_2 { -public: - -/// \name Types -/// @{ - -/*! - -*/ -typedef AlgebraicKernel_d_1::Polynomial_1 Polynomial_1; - -/*! - -*/ -typedef AlgebraicKernel_d_1::Algebraic_real_1 Algebraic_real_1; - -/*! - -*/ -typedef AlgebraicKernel_d_1::Bound Bound; - -/// @} - -/// \name Operations -/// @{ - -/*! -returns the numerator of the supporting rational function. -*/ -Polynomial_1 numerator () const; - -/*! -returns the denominator of the supporting rational function. -*/ -Polynomial_1 denominator () const; - -/*! -returns double-approximations of the x- and y-coordinates. -*/ -std::pair to_double() const; - -/*! -returns the \f$ x\f$-coordinate of the point. -*/ -Algebraic_real_1 x() const; - -/*! -obtains the y-coordinates of the point. Attention: As described above, -points are not stored by their y-coordinate in `Algebraic_real_1` -representation. In fact, this representation must be computed on demand, and -might become quite costly for points defined by high-degree polynomials. -Therefore, it is recommended to avoid calls to this function as much as -possible. -*/ -Algebraic_real_1 y() const; - -/*! -Computes a pair \f$ p\f$ approximating the \f$ x\f$-coordinate with -respect to the given absolute precision \f$ a\f$. -\post \f$ p.first \leq x \leq p.second \f$ -\post \f$ p.second - p.first \leq2^{-a} \f$ -*/ -std::pair approximate_absolute_x(int a) const; - -/*! -Computes a pair \f$ p\f$ approximating the \f$ y\f$-coordinate with -respect to the given absolute precision \f$ a\f$. -\post \f$ p.first \leq y \leq p.second \f$ -\post \f$ p.second - p.first \leq2^{-a} \f$ -*/ -std::pair approximate_absolute_y(int a) const; - -/*! -Computes a pair \f$ p\f$ approximating the \f$ x\f$-coordinate with -respect to the given relative precision \f$ r\f$. -\post \f$ p.first \leq x \leq p.second \f$ -\post \f$ p.second - p.first \leq2^{-r}|x| \f$ -*/ -std::pair approximate_relative_x(int r) const; - -/*! -Computes a pair \f$ p\f$ approximating the \f$ y\f$-coordinate with -respect to the given relative precision \f$ r\f$. -\post \f$ p.first \leq y \leq p.second \f$ -\post \f$ p.second - p.first \leq2^{-r}|y| \f$ -*/ -std::pair approximate_relative_y(int r) const; - -/// @} - -}; /* end Arr_rational_function_traits_2::Point_2 */ - -/*! - - -The `X_monotone_curve_2` class nested within the traits is used -to represent \f$ x\f$-monotone parts of rational functions. In particular, such an \f$ x\f$-monotone curve -may not contain a vertical asymptote in its interior \f$ x\f$-range. - -\cgalModels{ArrTraits::XMonotoneCurve_2} - -*/ -class X_monotone_curve_2 { -public: - -/// \name Types -/// @{ - -/*! - -*/ -typedef AlgebraicKernel_d_1::Polynomial_1 Polynomial_1; - -/*! - -*/ -typedef AlgebraicKernel_d_1::Algebraic_real_1 Algebraic_real_1; - -/*! - -*/ -typedef Arr_rational_function_traits_2::Point_2 Point_2; - -/// @} - -/// \name Operations -/// @{ - -/*! -returns the numerator of the supporting rational function. -*/ -const Polynomial_1& numerator () const; - -/*! -returns the denominator of the supporting rational function. -*/ -const Polynomial_1& denominator () const; - -/*! -returns whether the \f$ x\f$-coordinate of the source is finite or -whether it is \f$ \pm\infty\f$. -*/ -Arr_parameter_space source_parameter_space_in_x () const; - -/*! -returns whether the \f$ y\f$-coordinate of the source is finite or -whether it is \f$ \pm\infty\f$. -*/ -Arr_parameter_space source_parameter_space_in_y () const; - -/*! -returns the source point of the arc. -\pre Both the \f$ x\f$- and \f$ y\f$-coordinates of the source point is finite. -*/ -const Point_2& source() const; - -/*! -returns the \f$ x\f$-coordinate of the source point. -\pre The \f$ x\f$-coordinate of the source point is finite. -*/ -Algebraic_real_1 source_x() const; - -/*! -returns whether the \f$ x\f$-coordinate of the target is finite or -whether it is \f$ \pm\infty\f$. -*/ -Arr_parameter_space target_parameter_space_in_x () const; - -/*! -returns whether the \f$ y\f$-coordinate of the target is finite or -whether it is \f$ \pm\infty\f$. -*/ -Arr_parameter_space target_parameter_space_in_y () const; - -/*! -returns the target point of the arc. -\pre Both the \f$ x\f$- and \f$ y\f$-coordinates of the target point is finite. -*/ -const Point_2& target() const; - -/*! -returns the \f$ x\f$-coordinate of the target point. -\pre The \f$ x\f$-coordinate of the target point is finite. -*/ -Algebraic_real_1 target_x() const; - -/*! -returns whether the \f$ x\f$-coordinate of the left curve end is finite or -whether it is \f$ \pm\infty\f$. -*/ -Arr_parameter_space left_parameter_space_in_x () const; - -/*! -returns whether the \f$ y\f$-coordinate of the left curve end is finite or -whether it is \f$ \pm\infty\f$. -*/ -Arr_parameter_space left_parameter_space_in_y () const; - -/*! -returns the left point of the arc. -\pre Both the \f$ x\f$- and \f$ y\f$-coordinates of the left point is finite. -*/ -const Point_2& left() const; - -/*! -returns the \f$ x\f$-coordinate of the left point. -\pre The \f$ x\f$-coordinate of the left point is finite. -*/ -Algebraic_real_1 left_x() const; - -/*! -returns whether the \f$ x\f$-coordinate of the right curve end is finite or -whether it is \f$ \pm\infty\f$. -*/ -Arr_parameter_space right_parameter_space_in_x () const; - -/*! -returns whether the \f$ y\f$-coordinate of the right curve end is finite or -whether it is \f$ \pm\infty\f$. -*/ -Arr_parameter_space right_parameter_space_in_y () const; - -/*! -returns the right point of the arc. -\pre Both the \f$ x\f$- and \f$ y\f$-coordinates of The right point is finite. -*/ -const Point_2& right() const; - -/*! -returns the \f$ x\f$-coordinate of the right point. -\pre The \f$ x\f$-coordinate of the right point is finite. -*/ -Algebraic_real_1 right_x() const; - -/*! -returns whether the curve is oriented from left to right. -*/ -bool is_left_to_right () const; - -/// @} - -}; /* end Arr_rational_function_traits_2::X_monotone_curve_2 */ - - + /*! Functor to construct a `Curve_2`. To enable caching the class is not + * default constructible and must be obtained via the function + * `construct_curve_2_object()`, which is a member of the traits. + * + * \cgalModels{Assignable,CopyConstructible,AdaptableBinaryFunction,AdaptableUnaryFunction} + */ + class Construct_curve_2 { + public: + /// \name Types + /// @{ + + /// + typedef AlgebraicKernel_d_1::Polynomial_1 Polynomial_1; + + /// + typedef AlgebraicKernel_d_1::Algebraic_real_1 Algebraic_real_1; + + /// + typedef Arr_rational_function_traits_2::Curve_2 result_type; + + /// + typedef Polynomial_1 argument_type; + + /// + typedef Polynomial_1 first_argument_type; + + /// + typedef Polynomial_1 second_argument_type; + + /// @} + + /// \name Operations + /// @{ + + /*! Constructs a curve representing the polynomial function \f$y = P(x)\f$. + */ + Curve_2 operator()(Polynomial_1 P) const; + + /*! Constructs a curve representing the polynomial function \f$y = P(x)\f$. + * The function is defined over the interval \f$[x,+\infty)\f$ if + * \f$right\f$ is true and \f$(-\infty,x]\f$ otherwise. + */ + Curve_2 operator()(Polynomial_1 P, const Algebraic_real_1& x, + bool right) const; + + /*! Constructs a curve representing the polynomial function \f$y = P(x)\f$. + * The function is defined over the interval \f$[lower,upper]\f$. + */ + Curve_2 operator()(Polynomial_1 P, const Algebraic_real_1& lower, + const Algebraic_real_1& upper) const; + + /*! Constructs a curve representing the rational function + * \f$y = P(x)/Q(x)\f$. + */ + Curve_2 operator()(Polynomial_1 P, Polynomial_1 Q) const; + + /*! Constructs a curve representing the rational function + * \f$y = P(x)/Q(x)\f$. + * The function is defined over the interval \f$I=[x,+\infty)\f$ if + * \f$right\f$ is true and \f$I=(-\infty,x]\f$ otherwise. + */ + Curve_2 operator()(Polynomial_1 P, Polynomial_1 Q, + const Algebraic_real_1& x, bool right) const; + + /*! Constructs a curve representing the rational function + * \f$y = P(x)/Q(x)\f$. + * The function is defined over the interval \f$I=[lower,upper]\f$. + */ + Curve_2 operator()(Polynomial_1 P, Polynomial_1 Q, + const Algebraic_real_1& lower, + const Algebraic_real_1& upper) const; + + /*! Constructs a curve representing the polynomial function \f$y = P(x)\f$, + * where the coefficients of \f$P\f$ are given in the range `[begin,end)`. + */ + template + Curve_2 operator()(InputIterator begin, InputIterator end) const; + + /*! Constructs a curve representing the polynomial function \f$y = P(x)\f$, + * where the coefficients of \f$P\f$ are given in the range + * `[begin,end)`. The function is defined over the interval + * \f$[x,+\infty)\f$ if \f$right\f$ is true and \f$(-\infty,x]\f$ otherwise. + */ + template + Curve_2 operator()(InputIterator begin, InputIterator end, + const Algebraic_real_1& x, bool right) const; + + /*! Constructs a curve representing the polynomial function \f$y = P(x)\f$, + * where the coefficients of \f$P\f$ are given in the range `[begin,end)`. + * The function is defined over the interval \f$[lower,upper]\f$. + */ + template + Curve_2 operator()(InputIterator begin, InputIterator end, + const Algebraic_real_1& lower, + const Algebraic_real_1& upper) const; + + /*! Constructs a curve representing the rational function \f$y = P(x)/Q(x)\f$, + * where the coefficients of \f$P\f$ and \f$Q\f$ are given in the ranges + * `[begin_numer,end_numer)` and `[begin_denom,end_denom)`, + * respectively. + */ + template + Curve_2 operator()(InputIterator begin_numer, InputIterator end_numer, + InputIterator begin_denom, InputIterator end_denom) const; + + /*! Constructs a curve representing the rational function + * \f$y = P(x)/Q(x)\f$, where the coefficients of \f$P\f$ and \f$Q\f$ are + * given in the ranges `[begin_numer,end_numer)` and `[begin_denom,end_denom)`, + * respectively. The function is defined over the interval + * \f$I=[x,+\infty)\f$ if \f$right\f$ is true and \f$I=(-\infty,x]\f$ + * otherwise. + */ + template + Curve_2 operator()(InputIterator begin_numer, InputIterator end_numer, + InputIterator begin_denom, InputIterator end_denom, + const Algebraic_real_1& x, bool right) const; + + /*! Constructs a curve representing the rational function + * \f$y = P(x)/Q(x)\f$, where the coefficients of \f$P\f$ and \f$Q\f$ are + * given in the ranges `[begin_numer,end_numer)` and `[begin_denom,end_denom)`, + * respectively. The function is defined over the interval + * \f$I=[lower,upper]\f$. + */ + template + Curve_2 operator()(InputIterator begin_numer, InputIterator end_numer, + InputIterator begin_denom, InputIterator end_denom, + const Algebraic_real_1& lower, + const Algebraic_real_1& upper) const; + + /// @} + }; /* end Arr_rational_function_traits_2::Construct_curve_2 */ + + /*! Functor to construct a `X_monotone_curve_2`. To enable caching the class + * is not default constructible and must be obtained via the function + * `construct_x_monotone_curve_2_object()`, which is a member of the traits. + * + * \cgalModels{Assignable,CopyConstructible,AdaptableBinaryFunction,AdaptableUnaryFunction} + */ + class Construct_x_monotone_curve_2 { + public: + /// \name Types + /// @{ + + /// + typedef AlgebraicKernel_d_1::Polynomial_1 Polynomial_1; + + /// + typedef AlgebraicKernel_d_1::Algebraic_real_1 Algebraic_real_1; + + /// + typedef Arr_rational_function_traits_2::X_monotone_curve_2 result_type; + + /// + typedef Polynomial_1 argument_type; + + /// + typedef Polynomial_1 first_argument_type; + + /// + typedef Polynomial_1 second_argument_type; + + /// @} + + /// \name Operations + /// @{ + + /*! Constructs an \f$x\f$-monotone curve supported by the polynomial + * function \f$y = P(x)\f$. + */ + X_monotone_curve_2 operator()(Polynomial_1 P) const; + + /*! Constructs an \f$x\f$-monotone curve supported by the polynomial + * function \f$y = P(x)\f$. The function is defined over the interval + * \f$[x,+\infty)\f$ if \f$right\f$ is true and \f$(-\infty,x]\f$ + * otherwise. + */ + X_monotone_curve_2 operator()(Polynomial_1 P, const Algebraic_real_1& x, + bool right) const; + + /*! Constructs an \f$x\f$-monotone curve supported by the polynomial + * function \f$y = P(x)\f$. The function is defined over the interval + * \f$[lower,upper]\f$. + */ + X_monotone_curve_2 operator()(Polynomial_1 P, + const Algebraic_real_1& lower, + const Algebraic_real_1& upper); const + + /*! Constructs an \f$x\f$-monotone curve supported by the rational function + * \f$y = P(x)/Q(x)\f$. + * + * \pre \f$Q\f$ has no real roots. + */ + X_monotone_curve_2 operator()(Polynomial_1 P, Polynomial_1 Q); const + + /*! Constructs an \f$x\f$-monotone curve supported by the rational function + * \f$y = P(x)/Q(x)\f$. The function is defined over the interval + * \f$I=[x,+\infty)\f$ if \f$right\f$ is true and \f$I=(-\infty,x]\f$ + * otherwise. + * + * \pre \f$Q\f$ has no real roots in the interior of \f$I\f$. + */ + X_monotone_curve_2 operator()(Polynomial_1 P, Polynomial_1 Q, + const Algebraic_real_1& x, + bool right); const + + /*! Constructs an \f$x\f$-monotone curve supported by the rational function + * \f$y = P(x)/Q(x)\f$. The function is defined over the interval + * \f$I=[lower,upper]\f$. + * + * \pre \f$Q\f$ has no real roots in the interior of \f$I\f$. + */ + X_monotone_curve_2 operator()(Polynomial_1 P, Polynomial_1 Q, + const Algebraic_real_1& lower, + const Algebraic_real_1& upper); const + + /*! Constructs an \f$x\f$-monotone curve supported by the polynomial + * function \f$y = P(x)\f$, where the coefficients of \f$P\f$ are given + * in the range `[begin,end)`. + */ + template + X_monotone_curve_2 operator()(InputIterator begin, InputIterator end) const; + + /*! Constructs an \f$x\f$-monotone curve supported by the polynomial + * function \f$y = P(x)\f$, where the coefficients of \f$P\f$ are given in + * the range `[begin,end)`. The function is defined over the interval + * \f$[x,+\infty)\f$ if \f$right\f$ is true and \f$(-\infty,x]\f$ otherwise. + */ + template + X_monotone_curve_2 operator()(InputIterator begin, InputIterator end, + const Algebraic_real_1& x, bool right) const; + + /*! Constructs an \f$x\f$-monotone curve supported by the polynomial + * function \f$y = P(x)\f$, where the coefficients of \f$P\f$ are given in + * the range `[begin,end)`. The function is defined over the interval + * \f$[lower,upper]\f$. + */ + template + X_monotone_curve_2 operator()(InputIterator begin, InputIterator end + const Algebraic_real_1& lower, + const Algebraic_real_1& upper); const + + /*! Constructs an \f$x\f$-monotone curve supported by the rational function + * \f$y = P(x)/Q(x)\f$, where the coefficients of \f$P\f$ and \f$Q\f$ are + * given in the ranges `[begin_numer,end_numer)` and + * `[begin_denom,end_denom)`, respectively. + * + * \pre \f$Q\f$ has no real roots. + */ + template + X_monotone_curve_2 operator()(InputIterator begin_numer, + InputIterator end_numer, + InputIterator begin_denom, + InputIterator end_denom); const + + /*! Constructs an \f$x\f$-monotone curve supported by the rational function + * \f$y = P(x)/Q(x)\f$, where the coefficients of \f$P\f$ and \f$Q\f$ + * are given in the ranges `[begin_numer,end_numer)` and + * `[begin_denom,end_denom)`, respectively. The function is defined over + * the interval \f$I=[x,+\infty)\f$ if \f$right\f$ is true and + * \f$I=(-\infty,x]\f$ otherwise. + * + * \pre \f$Q\f$ has no real roots in the interior of \f$I\f$. + */ + template + X_monotone_curve_2 operator()(InputIterator begin_numer, + InputIterator end_numer, + InputIterator begin_denom, + InputIterator end_denom, + const Algebraic_real_1& x, bool right); const + + /*! Constructs an \f$x\f$-monotone curve supported by the rational function + * \f$y = P(x)/Q(x)\f$, where the coefficients of \f$P\f$ and \f$Q\f$ + * are given in the ranges `[begin_numer,end_numer)` and + * `[begin_denom,end_denom)`, respectively. The function is defined over + * the interval \f$I=[lower,upper]\f$. + * + * \pre \f$Q\f$ has no real roots in the interior of \f$I\f$. + */ + template + X_monotone_curve_2 operator()(InputIterator begin_numer, + InputIterator end_numer, + InputIterator begin_denom, + InputIterator end_denom, + const Algebraic_real_1& lower, + const Algebraic_real_1& upper); const + + /// @} + }; /* end Arr_rational_function_traits_2::Construct_x_monotone_curve_2 */ + + /*! The `Curve_2` class nested within the traits is used to + * represent rational functions which may be restricted to a certain x-range. + * + * \cgalModels{ArrTraits::Curve_2} + */ + class Curve_2 { + public: + /// \name Types + /// @{ + + /// + typedef AlgebraicKernel_d_1::Polynomial_1 Polynomial_1; + + /// + typedef AlgebraicKernel_d_1::Algebraic_real_1 Algebraic_real_1; + + /// @} + + /// \name Operations + /// @{ + + /*! returns the numerator of the supporting rational function. + */ + const Polynomial_1& numerator() const; + + /*! returns the denominator of the supporting rational function. + */ + const Polynomial_1& denominator() const; + + /*! returns whether çurve is continuous, namely whether it does not + * contains any vertical asymptotes in its interior. + */ + bool is_continuous() const; + + /*! returns whether the \f$x\f$-coordinate of çurve's left end is + * finite or whether it is \f$\pm\infty\f$. + */ + Arr_parameter_space left_parameter_space_in_x() const; + + /*! returns whether the \f$x\f$-coordinate of çurve's right end is + * finite or whether it is \f$\pm\infty\f$. + */ + Arr_parameter_space right_parameter_space_in_x() const; + + /*! returns the \f$x\f$-coordinate of the left end. + * \pre left_boundary_in_x()==ARR_INTERIOR + */ + Algebraic_real_1 left_x() const; + + /*! returns the \f$x\f$-coordinate of the right end. + * \pre right_boundary_in_x()==ARR_INTERIOR + */ + Algebraic_real_1 right_x() const; + + /// @} + + }; /* end Arr_rational_function_traits_2::Curve_2 */ + + /*! \cgalModels{ArrTraits::Point_2} + */ + class Point_2 { + public: + + /// \name Types + /// @{ + + /// + typedef AlgebraicKernel_d_1::Polynomial_1 Polynomial_1; + + /// + typedef AlgebraicKernel_d_1::Algebraic_real_1 Algebraic_real_1; + + /// + typedef AlgebraicKernel_d_1::Bound Bound; + + /// @} + + /// \name Operations + /// @{ + + /*! returns the numerator of the supporting rational function. + */ + Polynomial_1 numerator() const; + + /*! returns the denominator of the supporting rational function. + */ + Polynomial_1 denominator() const; + + /*! returns double-approximations of the x- and y-coordinates. + */ + std::pair to_double() const; + + /*! returns the \f$x\f$-coordinate of the point. + */ + Algebraic_real_1 x() const; + + /*! obtains the y-coordinates of the point. Attention: As described + * above, points are not stored by their y-coordinate in `Algebraic_real_1` + * representation. In fact, this representation must be computed on demand, + * and might become quite costly for points defined by high-degree + * polynomials. Therefore, it is recommended to avoid calls to this + * function as much as possible. + */ + Algebraic_real_1 y() const; + + /*! Computes a pair \f$p\f$ approximating the \f$x\f$-coordinate with + * respect to the given absolute precision \f$a\f$. + * + * \post \f$p.first \leq x \leq p.second\f$ + * \post \f$p.second - p.first \leq 2^{-a}\f$ + */ + std::pair approximate_absolute_x(int a) const; + + /*! Computes a pair \f$p\f$ approximating the \f$y\f$-coordinate with + * respect to the given absolute precision \f$a\f$. + * + * \post \f$p.first \leq y \leq p.second\f$ + * \post \f$p.second - p.first \leq 2^{-a}\f$ + */ + std::pair approximate_absolute_y(int a) const; + + /*! Computes a pair \f$p\f$ approximating the \f$x\f$-coordinate with + * respect to the given relative precision \f$r\f$. + * + * \post \f$p.first \leq x \leq p.second\f$ + * \post \f$p.second - p.first \leq 2^{-r}|x|\f$ + */ + std::pair approximate_relative_x(int r) const; + + /*! Computes a pair \f$p\f$ approximating the \f$y\f$-coordinate with + * respect to the given relative precision \f$r\f$. + * + * \post \f$p.first \leq y \leq p.second\f$ + * \post \f$p.second - p.first \leq 2^{-r}|y|\f$ + */ + std::pair approximate_relative_y(int r) const; + + /// @} + + }; /* end Arr_rational_function_traits_2::Point_2 */ + + /*! The `X_monotone_curve_2` class nested within the traits is used + * to represent \f$x\f$-monotone parts of rational functions. In particular, + * such an \f$x\f$-monotone curve may not contain a vertical asymptote in + * its interior \f$x\f$-range. + * + * \cgalModels{ArrTraits::XMonotoneCurve_2} + */ + class X_monotone_curve_2 { + public: + /// \name Types + /// @{ + + /// + typedef AlgebraicKernel_d_1::Polynomial_1 Polynomial_1; + + /// + typedef AlgebraicKernel_d_1::Algebraic_real_1 Algebraic_real_1; + + /// + typedef Arr_rational_function_traits_2::Point_2 Point_2; + + /// @} + + /// \name Operations + /// @{ + + /*! returns the numerator of the supporting rational function. + */ + const Polynomial_1& numerator() const; + + /*! returns the denominator of the supporting rational function. + */ + const Polynomial_1& denominator() const; + + /*! returns whether the \f$x\f$-coordinate of the source is finite or + * whether it is \f$\pm\infty\f$. + */ + Arr_parameter_space source_parameter_space_in_x() const; + + /*! returns whether the \f$y\f$-coordinate of the source is finite or + * whether it is \f$\pm\infty\f$. + */ + Arr_parameter_space source_parameter_space_in_y() const; + + /*! returns the source point of the arc. + * + * \pre Both the \f$x\f$- and \f$y\f$-coordinates of the source point is + * finite. + */ + const Point_2& source() const; + + /*! returns the \f$x\f$-coordinate of the source point. + * + * \pre The \f$x\f$-coordinate of the source point is finite. + */ + Algebraic_real_1 source_x() const; + + /*! returns whether the \f$x\f$-coordinate of the target is finite or + * whether it is \f$\pm\infty\f$. + */ + Arr_parameter_space target_parameter_space_in_x() const; + + /*! returns whether the \f$y\f$-coordinate of the target is finite or + * whether it is \f$\pm\infty\f$. + */ + Arr_parameter_space target_parameter_space_in_y() const; + + /*! returns the target point of the arc. + * + * \pre Both the \f$x\f$- and \f$y\f$-coordinates of the target point is + * finite. + */ + const Point_2& target() const; + + /*! returns the \f$x\f$-coordinate of the target point. + * + *\pre The \f$x\f$-coordinate of the target point is finite. + */ + Algebraic_real_1 target_x() const; + + /*! returns whether the \f$x\f$-coordinate of the left curve end is finite + * or whether it is \f$\pm\infty\f$. + */ + Arr_parameter_space left_parameter_space_in_x() const; + + /*! returns whether the \f$y\f$-coordinate of the left curve end is finite + * or whether it is \f$\pm\infty\f$. + */ + Arr_parameter_space left_parameter_space_in_y() const; + + /*! returns the left point of the arc. + * + * \pre Both the \f$x\f$- and \f$y\f$-coordinates of the left point is + * finite. + */ + const Point_2& left() const; + + /*! returns the \f$x\f$-coordinate of the left point. + * + * \pre The \f$x\f$-coordinate of the left point is finite. + */ + Algebraic_real_1 left_x() const; + + /*! returns whether the \f$x\f$-coordinate of the right curve end is finite + * or whether it is \f$\pm\infty\f$. + */ + Arr_parameter_space right_parameter_space_in_x() const; + + /*! returns whether the \f$y\f$-coordinate of the right curve end is finite + * or whether it is \f$\pm\infty\f$. + */ + Arr_parameter_space right_parameter_space_in_y() const; + + /*! returns the right point of the arc. + * + * \pre Both the \f$x\f$- and \f$y\f$-coordinates of The right point is + * finite. + */ + const Point_2& right() const; + + /*! returns the \f$x\f$-coordinate of the right point. + * + * \pre The \f$x\f$-coordinate of the right point is finite. + */ + Algebraic_real_1 right_x() const; + + /*! returns whether the curve is oriented from left to right. + */ + bool is_left_to_right() const; + + /// @} + }; /* end Arr_rational_function_traits_2::X_monotone_curve_2 */ }; /* end Arr_rational_function_traits_2 */ + } /* end namespace CGAL */ diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_segment_traits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_segment_traits_2.h index 37a7a6c29bd..3e4b41412ac 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_segment_traits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_segment_traits_2.h @@ -3,12 +3,12 @@ namespace CGAL { /*! \ingroup PkgArrangementOnSurface2TraitsClasses * * The traits class `Arr_segment_traits_2` is a model of the - * `ArrangementTraits_2` concept, which allows the construction and maintenance + * `AosTraits_2` concept, which allows the construction and maintenance * of arrangements of line segments. It is parameterized with a * \cgal-kernel model that is templated in turn with a number type. To avoid * numerical errors and robustness problems, the number type should support * exact rational arithmetic; that is, the number type should support the - * arithmetic operations \f$ +\f$, \f$ -\f$, \f$ \times\f$ and \f$ \div\f$ + * arithmetic operations \f$+\f$, \f$-\f$, \f$\times\f$ and \f$\div\f$ * carried out without loss of precision. * * For example, instantiating the traits template with kernels that support @@ -30,7 +30,7 @@ namespace CGAL { * endpoints only, while the traits class needs to store extra data with its * segments, in order to efficiently operate on them. Nevertheless, the nested * `X_monotone_curve_2` and `Curve_2` types (in this case both types refer to - * the same class, as every line segment is (weakly) \f$ x\f$-monotone) + * the same class, as every line segment is (weakly) \f$x\f$-monotone) * can however be converted to the type `Kernel::Segment_2`. * * `Arr_segment_traits_2` achieves faster running times than the @@ -47,81 +47,81 @@ namespace CGAL { * `Arr_non_caching_segment_traits_2` traits-class. * * While `Arr_segment_traits_2` models the concept - * `ArrangementDirectionalXMonotoneTraits_2`, the implementation of the + * `AosDirectionalXMonotoneTraits_2`, the implementation of the * `Are_mergeable_2` operation does not enforce the input curves to have the * same direction as a precondition. Moreover, `Arr_segment_traits_2` supports * the merging of curves of opposite directions. * - * \cgalModels{ArrangementTraits_2,ArrangementLandmarkTraits_2,ArrangementDirectionalXMonotoneTraits_2} + * \cgalModels{AosTraits_2,AosLandmarkTraits_2,AosDirectionalXMonotoneTraits_2} */ template class Arr_segment_traits_2 : public Kernel { public: + /// \name Types + /// @{ - //! \name Types - //! @{ - - //! the segment type. + /// the segment type. typedef typename Kernel::Segment_2 Segment_2; - //! the line type. + /// the line type. typedef typename Kernel::Line_2 Line_2; - //! the point type. + /// the point type. typedef typename Kernel::Point_2 Point_2; - //! @} + /// @} /*! The `X_monotone_curve_2` class nested within the traits class is * used to represent segments. */ class X_monotone_curve_2 { public: - //! \name Creation - //! @{ + /// \name Creation + /// @{ /*! constructs default. */ X_monotone_curve_2(); - //! @} + /// @} - //! \name Access Functions - //! @{ + /// \name Access Functions + /// @{ - //! obtains the (lexicographically) left endpoint. + /// obtains the (lexicographically) left endpoint. const Point_2& left() const; - //! obtains the (lexicographically) right endpoint. + /// obtains the (lexicographically) right endpoint. const Point_2& right() const; - //! obtains the supporting line. + /// obtains the supporting line. const Line_2& line() const; - //! determines whether the curve is vertical. + /// determines whether the curve is vertical. bool is_vertical() const; - //! determines whether the curve is directed lexicographic from left to right + /// determines whether the curve is directed lexicographic from left to right bool is_directed_right() const; - //! @} + /// @} }; - //! The curve type. + /// The curve type. typedef X_monotone_curve_2 Curve_2; - //! A functor that trims curves. + /// A functor that trims curves. class Trim_2 { public: - //! \name Creation - //! @{ + /// \name Creation + /// @{ /*! trims the given x-monotone curve to an from src to tgt. + * * \ pre `src` and `tgt` lies on the curve */ X_monotone_curve_2(const X_monotone_curve_2& xcv, const Point_2& src, const Point_2& tgt) const; } /* end Arr_segment_traits_2::Trim_2 */ - }; /* end Arr_segment_traits_2 */ + } /* end namespace CGAL */ diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_spherical_topology_traits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_spherical_topology_traits_2.h index 4502114fdcd..97a818d6fe2 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_spherical_topology_traits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_spherical_topology_traits_2.h @@ -62,10 +62,10 @@ public: /// \name Accessors /// @{ - /*! Obtain the DCEL (const version). */ + /*! Obtain the \dcel (const version). */ const Dcel& dcel() const; - /*! Obtain the DCEL (non-const version). */ + /*! Obtain the \dcel (non-const version). */ Dcel& dcel(); /*! Obtain the spherical face (const version). */ diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_tags.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_tags.h index 407544cbc0d..e2430129309 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_tags.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_tags.h @@ -21,10 +21,6 @@ namespace CGAL { */ struct Arr_oblivious_side_tag {}; -} - -namespace CGAL { - /*! \ingroup PkgArrangementOnSurface2Tags * * This type tag is used to indicate that a side of the parameter space, either @@ -35,7 +31,7 @@ namespace CGAL { * `Bottom_side_category`, and `Top_side_category`, nested in every geometry * traits class, must be convertible to the type `Arr_open_side_tag`. For * example, all categories above, nested in every model of the - * `ArrangementOpenBoundaryTraits_2` concept, must be convertible to + * `AosOpenBoundaryTraits_2` concept, must be convertible to * `Arr_open_side_tag`, as curves are expected to approach all the four boundary * sides of the parameter space (i.e., left, right, bottom, and top). * @@ -46,14 +42,10 @@ namespace CGAL { * \sa `Arr_closed_side_tag` * \sa `Arr_contracted_side_tag` * \sa `Arr_identified_side_tag` - * \sa `ArrangementOpenBoundaryTraits_2` + * \sa `AosOpenBoundaryTraits_2` */ struct Arr_open_side_tag : {}; -} - -namespace CGAL { - /*! \ingroup PkgArrangementOnSurface2Tags * * This type tag is used to indicate that a side of the parameter space, either @@ -73,14 +65,10 @@ namespace CGAL { * \sa `Arr_open_side_tag` * \sa `Arr_contracted_side_tag` * \sa `Arr_identified_side_tag` - * \sa `ArrangementOpenBoundaryTraits_2` + * \sa `AosOpenBoundaryTraits_2` */ struct Arr_closed_side_tag {}; -} - -namespace CGAL { - /*! \ingroup PkgArrangementOnSurface2Tags * * This type tag is used to indicate that a side of the parameter space, either @@ -92,7 +80,7 @@ namespace CGAL { * nested in every geometry traits class, must be convertible to the type * `Arr_contracted_side_tag`. For example, the `Bottom_side_category` and * `Top_side_category` category types, nested in every model of the - * `ArrangementSphericalBoundaryTraits_2 concept` (such as any instance of the + * `AosSphericalBoundaryTraits_2 concept` (such as any instance of the * `Arr_geodesic_arc_on_sphere_traits_2` class template) must be convertible to * `Arr_contracted_side_tag` * @@ -103,14 +91,10 @@ namespace CGAL { * \sa `Arr_open_side_tag` * \sa `Arr_closed_side_tag` * \sa `Arr_identified_side_tag` - * \sa `ArrangementOpenBoundaryTraits_2` + * \sa `AosOpenBoundaryTraits_2` */ struct Arr_contracted_side_tag {}; -} - -namespace CGAL { - /*! \ingroup PkgArrangementOnSurface2Tags * * This type tag is used to indicate that a side of the parameter space, either @@ -122,7 +106,7 @@ namespace CGAL { * nested in every geometry traits class, must be convertible to the type * `Arr_identified_side_tag`. For example, the `Left_side_category` and * `Right_side_category` category types, nested in every model of the - * `ArrangementSphericalBoundaryTraits_2 concept` (such as any instance of the + * `AosSphericalBoundaryTraits_2 concept` (such as any instance of the * `Arr_geodesic_arc_on_sphere_traits_2` class template) must be convertible to * `Arr_identified_side_tag` * @@ -133,7 +117,7 @@ namespace CGAL { * \sa `Arr_open_side_tag` * \sa `Arr_closed_side_tag` * \sa `Arr_contracted_side_tag` - * \sa `ArrangementOpenBoundaryTraits_2` + * \sa `AosOpenBoundaryTraits_2` */ struct Arr_identified_side_tag {}; diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_trapezoid_ric_point_location.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_trapezoid_ric_point_location.h index d51ad4cbced..7c4ccf1b37f 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_trapezoid_ric_point_location.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_trapezoid_ric_point_location.h @@ -1,66 +1,69 @@ - namespace CGAL { -/*! -\ingroup PkgArrangementOnSurface2PointLocation - -\anchor arr_reftrap_pl - -The `Arr_trapezoid_ric_point_location` class implements the incremental randomized algorithm -introduced by Mulmuley \cgalCite{m-fppa-90} as presented by -Seidel \cgalCite{s-sfira-91} (see also [\cgalCite{bkos-cgaa-00} Chapter 6). -It subdivides each arrangement face to pseudo-trapezoidal cells, each -of constant complexity, and constructs and maintains a linear-size search -structure on top of these cells, such that each query can be answered -in \cgalBigO{\log n} time, where \f$ n\f$ is the complexity of the arrangement. - -Constructing the search structures takes \cgalBigO{n \log n} expected time -and may require a small number of rebuilds \cgalCite{hkh-iiplgtds-12}. Therefore -attaching a trapezoidal point-location object to an existing arrangement -may incur some overhead in running times. In addition, the point-location -object needs to keep its auxiliary data structures up-to-date as the -arrangement goes through structural changes. It is therefore recommended -to use this point-location strategy for static arrangements (or arrangement -that do not alter frequently), and when the number of issued queries -is relatively large. - -This strategy supports arbitrary subdivisions, including unbounded ones. - -\cgalModels{ArrangementPointLocation_2,ArrangementVerticalRayShoot_2} - -\sa `ArrangementPointLocation_2` -\sa `ArrangementVerticalRayShoot_2` -\sa `CGAL::Arr_point_location_result` - +/*! \ingroup PkgArrangementOnSurface2PointLocation + * + * \anchor arr_reftrap_pl + * + * The `Arr_trapezoid_ric_point_location` class implements the incremental + * randomized algorithm introduced by Mulmuley \cgalCite{m-fppa-90} as presented + * by Seidel \cgalCite{s-sfira-91} (see also [\cgalCite{bkos-cgaa-00} Chapter + * 6). It subdivides each arrangement face to pseudo-trapezoidal cells, each of + * constant complexity, and constructs and maintains a linear-size search + * structure on top of these cells, such that each query can be answered in + * \cgalBigO{\log n} time, where \f$n\f$ is the complexity of the arrangement. + * + * Constructing the search structures takes \cgalBigO{n \log n} expected time + * and may require a small number of rebuilds + * \cgalCite{hkh-iiplgtds-12}. Therefore attaching a trapezoidal point-location + * object to an existing arrangement may incur some overhead in running + * times. In addition, the point-location object needs to keep its auxiliary + * data structures up-to-date as the arrangement goes through structural + * changes. It is therefore recommended to use this point-location strategy for + * static arrangements (or arrangement that do not alter frequently), and when + * the number of issued queries is relatively large. + * + * This strategy supports arbitrary subdivisions, including unbounded ones. + * + * \cgalModels{AosPointLocation_2,AosVerticalRayShoot_2} + * + * \sa `AosPointLocation_2` + * \sa `AosVerticalRayShoot_2` + * \sa `CGAL::Arr_point_location_result` */ -template< typename Arrangement > +template class Arr_trapezoid_ric_point_location { public: + /// \name Creation + /// @{ -/// \name Creation -/// @{ + /*! If with_guarantees is set to true, the construction performs rebuilds in + * order to guarantee a resulting structure with linear size and logarithmic + * query time. Otherwise the structure has expected linear size and expected + * logarithmic query time. + */ + Arr_trapezoid_ric_point_location(bool with_guarantees = true); -/*! -If with_guarantees is set to true, the construction performs rebuilds in order to guarantee a resulting structure with linear size and logarithmic query time. Otherwise the structure has expected linear size and expected logarithmic query time. -*/ -Arr_trapezoid_ric_point_location (bool with_guarantees = true); + /*! Constructs a point location search structure for the given arrangement. + * If with_guarantees is set to true, the construction performs rebuilds in + * order to guarantee a resulting structure with linear size and logarithmic + * query time. Otherwise the structure has expected linear size and expected + * logarithmic query time. + */ + Arr_trapezoid_ric_point_location(const Arrangement& arr, + bool with_guarantees = true); -/*! -Constructs a point location search structure for the given arrangement. If with_guarantees is set to true, the construction performs rebuilds in order to guarantee a resulting structure with linear size and logarithmic query time. Otherwise the structure has expected linear size and expected logarithmic query time. -*/ -Arr_trapezoid_ric_point_location (const Arrangement& arr, bool with_guarantees = true); + /// @} -/// @} + /// \name Modifiers + /// @{ -/// \name Modifiers -/// @{ - -/*! -If with_guarantees is set to true, the structure will guarantee linear size and logarithmic query time, that is, this function may cause a reconstruction of the data structure. -*/ -void with_guarantees (bool with_guarantees); - -/// @} + /*! If with_guarantees is set to true, the structure will guarantee linear + * size and logarithmic query time, that is, this function may cause a + * reconstruction of the data structure. + */ + void with_guarantees(bool with_guarantees); + /// @} }; /* end Arr_trapezoid_ric_point_location */ + } /* end namespace CGAL */ diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_unb_planar_topology_traits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_unb_planar_topology_traits_2.h index 9e5c81dc5d0..b971e846297 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_unb_planar_topology_traits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_unb_planar_topology_traits_2.h @@ -62,16 +62,16 @@ public: /// \name Accessors /// @{ - /*! Obtain the DCEL (const version). */ + /*! obtains the \dcel (const version). */ const Dcel& dcel() const; - /*! Obtain the DCEL (non-const version). */ + /*! obtains the \dcel (non-const version). */ Dcel& dcel(); - /*! Obtain the unbounded face (const version). */ + /*! obtains the unbounded face (const version). */ const Face* unbounded_face() const; - /*! Obtain the unbounded face (non-const version). */ + /*! obtains the unbounded face (non-const version). */ Face* unbounded_face(); /// @} diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_vertex_index_map.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_vertex_index_map.h index cd9fe317b81..f081630e811 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_vertex_index_map.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_vertex_index_map.h @@ -26,9 +26,9 @@ public: /// \name Types /// @{ - /*! the type of the attached arrangement. - */ + /// the type of the attached arrangement. typedef Arrangement_ Arrangement_2; + typedef typename Arrangement_2::Base_aos Base_aos; typedef boost::readable_property_map_tag category; @@ -39,12 +39,10 @@ public: typedef Vertex_handle key_type; - /*! The vertex handle type. - */ + /// The vertex handle type. typedef typename Base_aos::Vertex_handle Vertex_handle; - /*! The type of mapping of vertices to indices. - */ + /// The type of mapping of vertices to indices. typedef Unique_hash_map Index_map; /// @} diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_walk_along_line_point_location.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_walk_along_line_point_location.h index 60ec6272ffd..802694a772d 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_walk_along_line_point_location.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_walk_along_line_point_location.h @@ -1,38 +1,31 @@ - namespace CGAL { -/*! -\ingroup PkgArrangementOnSurface2PointLocation +/*! \ingroup PkgArrangementOnSurface2PointLocation + * + * \anchor arr_refwalk_pl + * + * The `Arr_walk_along_line_point_location` class implements a very simple + * point-location (and vertical ray-shooting) strategy that improves the naive + * one. The algorithm considers an imaginary vertical ray emanating from the + * query point, and simulates a walk along the zone of this ray, starting from + * the unbounded face until reaching the query point. In dense arrangements + * this walk can considerably reduce the number of traversed arrangement edges, + * with respect to the naïve algorithm. + * + * The walk-along-a-line point-location object (just like the naïve one) + * does not use any auxiliary data structures. Thus, attaching it to an existing + * arrangement takes constant time, and any ongoing updates to this arrangement + * do not affect the point-location object. It is therefore recommended to use + * the "walk" point-location strategy for arrangements that are constantly + * changing, especially if the number of issued queries is not large. + * + * \cgalModels{AosPointLocation_2,AosVerticalRayShoot_2} + * + * \sa `AosPointLocation_2` + * \sa `AosVerticalRayShoot_2` + * \sa `CGAL::Arr_point_location_result` + */ +template +class Arr_walk_along_line_point_location {}; -\anchor arr_refwalk_pl - -The `Arr_walk_along_line_point_location` class implements a very simple point-location (and -vertical ray-shooting) strategy that improves the naive one. -The algorithm considers an imaginary vertical ray emanating from the -query point, and simulates a walk along the zone of this ray, starting -from the unbounded face until reaching the query point. -In dense arrangements this walk can considerably reduce the number -of traversed arrangement edges, with respect to the naïve -algorithm. - -The walk-along-a-line point-location object (just like the naïve one) -does not use any auxiliary data structures. Thus, attaching it to an -existing arrangement takes constant time, and any ongoing updates to -this arrangement do not affect the point-location object. -It is therefore recommended to use the "walk" point-location strategy -for arrangements that are constantly changing, especially if the number -of issued queries is not large. - -\cgalModels{ArrangementPointLocation_2,ArrangementVerticalRayShoot_2} - -\sa `ArrangementPointLocation_2` -\sa `ArrangementVerticalRayShoot_2` -\sa `CGAL::Arr_point_location_result` - -*/ -template< typename Arrangement > -class Arr_walk_along_line_point_location { -public: - -}; /* end Arr_walk_along_line_point_location */ } /* end namespace CGAL */ diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arrangement_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arrangement_2.h index 465f1f3a9b2..a9234c5ce90 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arrangement_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arrangement_2.h @@ -5,7 +5,7 @@ namespace CGAL { * \anchor arr_refarr * * An object `arr` of the class `Arrangement_2` represents the planar - * subdivision induced by a set of \f$ x\f$-monotone curves and isolated points + * subdivision induced by a set of \f$x\f$-monotone curves and isolated points * into maximally connected cells. The arrangement is represented as a * doubly-connected edge-list (\dcel) such that each \dcel vertex is associated * with a point of the plane and each edge is associated with an \f$ @@ -16,13 +16,13 @@ namespace CGAL { * The `Arrangement_2` template has two parameters: *
        *
      • The `Traits` template-parameter should be instantiated with - * a model of the `ArrangementBasicTraits_2` concept. The traits - * class defines the types of \f$ x\f$-monotone curves and two-dimensional - * points, namely `ArrangementBasicTraits_2::X_monotone_curve_2` and - * `ArrangementBasicTraits_2::Point_2`, + * a model of the `AosBasicTraits_2` concept. The traits + * class defines the types of \f$x\f$-monotone curves and two-dimensional + * points, namely `AosBasicTraits_2::X_monotone_curve_2` and + * `AosBasicTraits_2::Point_2`, * respectively, and supports basic geometric predicates on them. *
      • The `Dcel` template-parameter should be instantiated with - * a class that is a model of the `ArrangementDcel` concept. The + * a class that is a model of the `AosDcel` concept. The * value of this parameter is by default * `Arr_default_dcel`. *
      @@ -30,9 +30,9 @@ namespace CGAL { * The available traits classes and \dcel classes are * described below. * - * \sa `ArrangementDcel` + * \sa `AosDcel` * \sa `Arr_default_dcel` - * \sa `ArrangementBasicTraits_2` + * \sa `AosBasicTraits_2` * \sa `CGAL::overlay()` * \sa `CGAL::is_valid()` * @@ -156,41 +156,42 @@ public: /// @} }; /* end Arrangement_2 */ + } /* end namespace CGAL */ namespace CGAL { /*! \ingroup PkgArrangementOnSurface2Insert - * The function `%insert` inserts one or more curves or \f$ x\f$-monotone curves + * The function `%insert` inserts one or more curves or \f$x\f$-monotone curves * into a given arrangement, where no restrictions are imposed on the inserted - * curves. If an inserted curve is not \f$ x\f$-monotone curve, it is subdivided - * into \f$ x\f$-monotone subcurves (and perhaps isolated points), which are + * curves. If an inserted curve is not \f$x\f$-monotone curve, it is subdivided + * into \f$x\f$-monotone subcurves (and perhaps isolated points), which are * inserted into the arrangement. * * \cgalHeading{Requirements} * *
        - *
      • If the curve is \f$ x\f$-monotone curve then The instantiated - * `Traits` class must model the `ArrangementXMonotoneTraits_2` - * concept. In case that the curve is not \f$ x\f$-monotone then the + *
      • If the curve is \f$x\f$-monotone curve then The instantiated + * `Traits` class must model the `AosXMonotoneTraits_2` + * concept. In case that the curve is not \f$x\f$-monotone then the * instantiated `Traits` class must model the - * `ArrangementTraits_2` concept. That is, it should define the - * `Curve_2` type, and support its subdivision into \f$ x\f$-monotone + * `ArrtTraits_2` concept. That is, it should define the + * `Curve_2` type, and support its subdivision into \f$x\f$-monotone * subcurves (and perhaps isolated points). *
      • The point-location object `pl`, must model the - * `ArrangementPointLocation_2` concept. + * `AosPointLocation_2` concept. *
      */ /// @{ /*! Inserts the given curve `c` into the arrangement `arr`. - * `c` is subdivided into \f$ x\f$-monotone subcurves (and perhaps isolated + * `c` is subdivided into \f$x\f$-monotone subcurves (and perhaps isolated * points). Each subcurve is in turn inserted into the arrangement by locating * its left endpoint and computing its zone until reaching the right endpoint. * * The given point-location object `pl` is used to locate the left - * endpoints of the \f$ x\f$-monotone curves. By default, the function uses the + * endpoints of the \f$x\f$-monotone curves. By default, the function uses the * "walk along line" point-location strategy - namely an instance of * the class `Arr_walk_along_line_point_location >`. * @@ -213,7 +214,7 @@ void insert(Arrangement_2& arr, const typename Traits::X_monotone_curve_2& xc, typename Arr_point_location_result >::type obj); -/*! Aggregately inserts the curves or \f$ x\f$-monotone curves in the range +/*! Aggregately inserts the curves or \f$x\f$-monotone curves in the range * `[first,last)` into the arrangement `arr` using the sweep-line framework. * \param arr the target arrangement. * \param first the iterator to the first element in the range of curves. @@ -227,7 +228,7 @@ void insert(Arrangement_2& arr, /*! \ingroup PkgArrangementOnSurface2Funcs * - * Inserts a given \f$ x\f$-monotone curve into a given arrangement, where the + * Inserts a given \f$x\f$-monotone curve into a given arrangement, where the * interior of the given curve is disjoint from all existing arrangement * vertices and edges. Under this assumption, it is possible to locate the * endpoints of the given curve in the arrangement, and use one of the @@ -247,7 +248,7 @@ void insert(Arrangement_2& arr, * *
        *
      • The instantiated `Traits` class must model the restricted - * `ArrangementBasicTraits_2` concept, as no intersections are computed. + * `AosBasicTraits_2` concept, as no intersections are computed. *
      • The point-location object `pl` must model the * `ArrangementPointLocation_2` concept. *
      @@ -260,7 +261,7 @@ insert_non_intersecting_curve(Arrangement_2& arr, /*! \ingroup PkgArrangementOnSurface2Funcs * - * Inserts a set of \f$ x\f$-monotone curves in a given range into a given + * Inserts a set of \f$x\f$-monotone curves in a given range into a given * arrangement. The insertion is performed in an aggregated manner, using the * sweep-line algorithm. The input curves should be pairwise disjoint in their * interior and pairwise interior-disjoint from all existing arrangement @@ -270,7 +271,7 @@ insert_non_intersecting_curve(Arrangement_2& arr, * *
        *
      • The instantiated `Traits` class must model the - * `ArrangementBasicTraits_2` concept, as no intersections are computed. + * `AosBasicTraits_2` concept, as no intersections are computed. *
      • `InputIterator::value_type` must be `Traits::X_monotone_curve_2` *
      */ @@ -296,9 +297,9 @@ void insert_non_intersecting_curves(Arrangement_2& arr, * *
        *
      • The instantiated `Traits` class must model the - * `ArrangementXMonotoneTraits_2` concept. Not all expressions listed + * `AosXMonotoneTraits_2` concept. Not all expressions listed * by this concept are required. In fact the traits class must model the - * `ArrangementBasicTraits_2` concept, and support the splitting functionality. + * `AosBasicTraits_2` concept, and support the splitting functionality. *
      • The point-location object `pl`, must model the * `ArrangementPointLocation_2` concept. *
      @@ -315,7 +316,7 @@ insert_point(Arrangement_2& arr, * * Invokes the member function `arr.is_valid()` to verify the topological * correctness of the arrangement. Then it performs additional validity - * tests. It checks that all \f$ x\f$-monotone curves associated with + * tests. It checks that all \f$x\f$-monotone curves associated with * arrangement edges are pairwise disjoint in their interior. Then it makes sure * that all holes and all isolated vertices are located within the proper * arrangement faces. Note that the test carried out by this function may take a @@ -337,8 +338,8 @@ bool is_valid(const Arrangement_2& arr); * its endpoints become isolated, they are removed as well. The call * `remove_edge(arr, e)` is equivalent to the call `arr.remove_edge (e, true, * true)`. However, this free function requires that `Traits` be a model of the - * refined concept `ArrangementXMonotoneTraits_2`, which requires merge - * operations on \f$ x\f$-monotone curves. If one of the end-vertices of the + * refined concept `AosXMonotoneTraits_2`, which requires merge + * operations on \f$x\f$-monotone curves. If one of the end-vertices of the * given edge becomes redundant after the edge is removed (see `remove_vertex()` * for the definition of a redundant vertex), it is removed, and its incident * edges are merged. If the edge-removal operation causes two faces to merge, @@ -349,7 +350,7 @@ bool is_valid(const Arrangement_2& arr); * *
        *
      • The instantiated traits class must model the concept - * `ArrangementXMonotoneTraits_2`. + * `AosXMonotoneTraits_2`. *
      */ template @@ -370,9 +371,9 @@ remove_edge(Arrangement_2& arr, * *
        *
      • The instantiated `Traits` class must model the - * `ArrangementXMonotoneTraits_2` concept. Not all expressions listed + * `AosXMonotoneTraits_2` concept. Not all expressions listed * by this concept are required. In fact the traits class must model the - * `ArrangementBasicTraits_2` concept and support the merging functionality. + * `AosBasicTraits_2` concept and support the merging functionality. *
      */ template diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arrangement_on_surface_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arrangement_on_surface_2.h index 47700f52e33..b5b99619fbd 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arrangement_on_surface_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arrangement_on_surface_2.h @@ -5,11 +5,11 @@ namespace CGAL { * \anchor arr_refaos * * An object `aos` of the class `Arrangement_on_surface_2` represents the - * subdivision induced by a set of \f$ x\f$-monotone curves and isolated points + * subdivision induced by a set of \f$x\f$-monotone curves and isolated points * into maximally connected cells. The arrangement is represented as a * doubly-connected edge-list (Dcel) such that each * Dcel vertex is associated with a point of the - * plane and each edge is associated with an \f$ x\f$-monotone curve whose + * plane and each edge is associated with an \f$x\f$-monotone curve whose * interior is disjoint from all other edges and vertices. Recall that an * arrangement edge is always comprised of a pair of twin Dcel halfedges. @@ -19,7 +19,7 @@ namespace CGAL { *
    • The `GeometryTraits` template-parameter should be substituted by * a model of a geometry traits. The minimal requirements are defined by the * `AosBasicTraits_2` concept. A model of this concept defines - * the types of \f$ x\f$-monotone curves and two-dimensional points, namely + * the types of \f$x\f$-monotone curves and two-dimensional points, namely * `AosBasicTraits_2::X_monotone_curve_2` and * `AosBasicTraits_2::Point_2`, respectively, and supports basic * geometric predicates on them. @@ -62,10 +62,10 @@ public: /// \name Types /// @{ - /*! the geometry traits class in use. */ + /// the geometry traits class in use. typedef GeometryTraits Geometry_traits_2; - /*! the topology traits class in use. */ + /// the topology traits class in use. typedef TopologyTraits Topology_traits; /*! a private type used as an abbreviation of the @@ -78,18 +78,18 @@ public: */ typedef typename Topology_traits::Dcel Dcel; - /*! the point type, as defined by the traits class. */ + /// the point type, as defined by the traits class. typedef typename Geometry_traits_2::Point_2 Point_2; - /*! the \f$ x\f$-monotone curve type, as defined by the traits class. */ + /// the \f$x\f$-monotone curve type, as defined by the traits class. typedef typename Geometry_traits_2::X_monotone_curve_2 X_monotone_curve_2; - /*! the size type (equivalent to `size_t`). */ + /// the size type (equivalent to `size_t`). typedef typename Dcel::Size Size; /*! \ingroup PkgArrangementOnSurface2DCEL - * An object \f$ v\f$ of the class `Vertex` represents an arrangement vertex, - * that is a \f$ 0\f$-dimensional cell, associated with a point on the + * An object \f$v\f$ of the class `Vertex` represents an arrangement vertex, + * that is a \f$0\f$-dimensional cell, associated with a point on the * ambient surface. */ class Vertex : public typename Dcel::Vertex { @@ -137,14 +137,14 @@ public: */ const typename Traits::Point_2& point() const; - /*! obtains the placement of the \f$ x\f$-coordinate in the parameter space, + /*! obtains the placement of the \f$x\f$-coordinate in the parameter space, * that is, either the left boundary-side, the interior, or the right * boundary-side. If the vertex lies on an identified vertical side, the * return value is non-deterministic. */ Arr_parameter_space parameter_space_in_x() const; - /*! obtains the placement of the \f$ y\f$-coordinate in the parameter space, + /*! obtains the placement of the \f$y\f$-coordinate in the parameter space, * that is, either the bottom boundary-side, the interior, or the top * boundary-side. If the vertex lies on an identified horizontal side, the * return value is non-deterministic. @@ -152,17 +152,16 @@ public: Arr_parameter_space parameter_space_in_y() const; /// @} - }; /* end Vertex */ /*! \ingroup PkgArrangementOnSurface2DCEL - * An object \f$ e\f$ of the class `Halfedge` represents a halfedge in the + * An object \f$e\f$ of the class `Halfedge` represents a halfedge in the * arrangement. A halfedge is directed from its source vertex * to its target vertex, and has an incident face lying to * its left. Each halfedge has a twin halfedge directed in the * opposite direction, where the pair of twin halfedges form together - * an arrangement edge, that is, a \f$ 1\f$-dimensional cell, associated - * with planar \f$ x\f$-monotone curve. + * an arrangement edge, that is, a \f$1\f$-dimensional cell, associated + * with planar \f$x\f$-monotone curve. * * Halfedges are stored in doubly-connected lists and form chains. These * chains define the inner and outer boundaries of connected components. @@ -221,7 +220,7 @@ public: */ Ccb_halfedge_circulator ccb(); - /*! obtains the \f$ x\f$-monotone curve associated with `e`. + /*! obtains the \f$x\f$-monotone curve associated with `e`. * \pre `e` is not a fictitious halfedge. */ const typename Traits::X_monotone_curve_2& curve() const; @@ -372,7 +371,7 @@ public: /// Mutable /// @{ - /*! a handle to an arrangement vertex. */ + /// a handle to an arrangement vertex. typedef unspecified_type Vertex_handle; /*! a handle to a halfedge. @@ -380,7 +379,7 @@ public: */ typedef unspecified_type Halfedge_handle; - /*! a handle to an arrangement face. */ + /// a handle to an arrangement face. typedef unspecified_type Face_handle; /*! a bidirectional iterator over the @@ -458,7 +457,7 @@ public: */ typedef unspecified_type Halfedge_const_handle; - /*! a handle to an arrangement face. */ + /// a handle to an arrangement face. typedef unspecified_type Face_const_handle; /*! a bidirectional iterator over the @@ -791,7 +790,7 @@ public: * \pre `c` must not be an unbounded curve. * \pre `v1` and `v2` are associated with `c`'s endpoints. * \pre If `v1` and `v2` are already connected by an edge, this edge - * represents an \f$ x\f$-monotone curve that is interior-disjoint from `c`). + * represents an \f$x\f$-monotone curve that is interior-disjoint from `c`). */ Halfedge_handle insert_at_vertices(const X_monotone_curve_2& c, Vertex_handle v1, @@ -878,12 +877,17 @@ public: * fictitious halfedge that should contain the vertex at infinity that * corresponds to the unbounded left end of `c`. The function returns a * handle for one of the new halfedges directed (lexicographically) from right - * to left. \pre The interior of `c` is disjoint from all existing - * arrangement vertices and edges. `c` must have a bounded right endpoint and - * an unbounded left end. \pre `pred->target()` is associated with the right - * endpoint of `c`, and `c` should be inserted after `pred` in a clockwise - * order around this vertex. \pre `fict_pred` is a fictitious halfedge that - * contains the unbounded left end of `c`. + * to left. + * + * \pre The interior of `c` is disjoint from all existing arrangement vertices + * and edges. `c` must have a bounded right endpoint and an unbounded left + * end. + * + * \pre `pred->target()` is associated with the right endpoint of `c`, and `c` + * should be inserted after `pred` in a clockwise order around this vertex. + * + * \pre `fict_pred` is a fictitious halfedge that contains the unbounded left + * end of `c`. */ Halfedge_handle insert_from_right_vertex(const X_monotone_curve_2& c, Halfedge_handle pred, @@ -899,7 +903,7 @@ public: * vertices and edges. * \pre `pred1->target()` and `v2` are associated with `c`'s endpoints. * \pre If `pred1->target` and `v2` are already connected by an edge, this - * edge represents an \f$ x\f$-monotone curve that is interior-disjoint from + * edge represents an \f$x\f$-monotone curve that is interior-disjoint from * `c`). */ Halfedge_handle insert_at_vertices(const X_monotone_curve_2& c, @@ -918,7 +922,7 @@ public: * \pre `pred1->target()` and `pred2->target()` are associated with `c`'s * endpoints. * \pre If `pred1->target` and `pred2->target()` are already connected by an - * edge, this edge represents an \f$ x\f$-monotone curve that is + * edge, this edge represents an \f$x\f$-monotone curve that is * interior-disjoint from `c`). */ Halfedge_handle insert_at_vertices(const X_monotone_curve_2& c, @@ -943,7 +947,7 @@ public: */ Face_handle remove_isolated_vertex(Vertex_handle v); - /*! sets `c` to be the \f$ x\f$-monotone curve associated with the edge `e`. + /*! sets `c` to be the \f$x\f$-monotone curve associated with the edge `e`. * The function obtains a handle for the modified edge (same as `e`). * \pre `c` is geometrically equivalent to the curve currently associated * with `e`. @@ -967,10 +971,10 @@ public: /*! merges the edges represented by `e1` and `e2` into * a single edge, associated with the given merged curve `c`. Denote `e1`'s - * end-vertices as \f$ u_1\f$ and \f$ v\f$, while `e2`'s end-vertices are - * denoted \f$ u_2\f$ and \f$ v\f$. The function removes the common vertex \f$ + * end-vertices as \f$u_1\f$ and \f$v\f$, while `e2`'s end-vertices are + * denoted \f$u_2\f$ and \f$v\f$. The function removes the common vertex \f$ * v\f$ returns a handle for one of the merged halfedges, directed from \f$ - * u_1\f$ to \f$ u_2\f$. + * u_1\f$ to \f$u_2\f$. * \pre `e1` and `e2` share a common end-vertex, such that the two other * end-vertices of the two edges are associated with `c`'s endpoints. */ @@ -985,7 +989,7 @@ public: * whether they should be left as isolated vertices in the arrangement. * If the operation causes two faces to merge, the merged face is returned. * Otherwise, the face to which the edge was incident is returned. - */ + */ Face_handle remove_edge(Halfedge_handle e, bool remove_source = true, bool remove_target = true); @@ -1007,28 +1011,28 @@ public: bool is_valid() const; /// @} - }; /* end Arrangement_on_surface_2 */ + } /* end namespace CGAL */ namespace CGAL { /*! \ingroup PkgArrangementOnSurface2Insert - * The function `%insert` inserts one or more curves or \f$ x\f$-monotone + * The function `%insert` inserts one or more curves or \f$x\f$-monotone * curves into a given arrangement, where no restrictions are imposed on the - * inserted curves. If an inserted curve is not \f$ x\f$-monotone curve, it is - * subdivided into \f$ x\f$-monotone subcurves (and perhaps isolated points), + * inserted curves. If an inserted curve is not \f$x\f$-monotone curve, it is + * subdivided into \f$x\f$-monotone subcurves (and perhaps isolated points), * which are inserted into the arrangement. * * \cgalHeading{Requirements} * *
        - *
      • If the curve is \f$ x\f$-monotone curve then The instantiated + *
      • If the curve is \f$x\f$-monotone curve then The instantiated * `Traits` class must model the `AosXMonotoneTraits_2` - * concept. In case that the curve is not \f$ x\f$-monotone then the + * concept. In case that the curve is not \f$x\f$-monotone then the * instantiated `Traits` class must model the * `AosTraits_2` concept. That is, it should define the - * `Curve_2` type, and support its subdivision into \f$ x\f$-monotone + * `Curve_2` type, and support its subdivision into \f$x\f$-monotone * subcurves (and perhaps isolated points). *
      • The point-location object `pl`, must model the * `AosPointLocation_2` concept. @@ -1038,12 +1042,12 @@ namespace CGAL { /// @{ /*! Inserts the given curve `c` into the arrangement `arr`. `c` is subdivided - * into \f$ x\f$-monotone subcurves (and perhaps isolated points). Each subcurve + * into \f$x\f$-monotone subcurves (and perhaps isolated points). Each subcurve * is in turn inserted into the arrangement by locating its left endpoint and * computing its zone until reaching the right endpoint. * * The given point-location object `pl` is used to locate the left endpoints of - * the \f$ x\f$-monotone curves. By default, the function uses the "walk along + * the \f$x\f$-monotone curves. By default, the function uses the "walk along * line" point-location strategy - namely an instance of the class * `Arr_walk_along_line_point_location >`. * @@ -1069,7 +1073,7 @@ void insert(Arrangement_on_surface_2& arr, typename Arr_point_location_result >::type obj); -/*! Aggregately inserts the curves or \f$ x\f$-monotone curves in the range +/*! Aggregately inserts the curves or \f$x\f$-monotone curves in the range * `[first,last)` into the arrangement `arr` using the sweep-line framework. * \param arr the target arrangement. * \param first the iterator to the first element in the range of curves. @@ -1089,7 +1093,7 @@ void insert(Arrangement_on_surface_2& arr, * arrangement's edges or vertices. * * If the give curve is not an \f$x\f$-monotone curve then the function - * subdivides the given curve into \f$ x\f$-monotone subcurves and isolated + * subdivides the given curve into \f$x\f$-monotone subcurves and isolated * vertices . Each subcurve is in turn checked for intersection. The function * uses the zone algorithm to check if the curve intersects the * arrangement. First, the curve's left endpoint is located. Then, its zone is @@ -1103,7 +1107,7 @@ void insert(Arrangement_on_surface_2& arr, * `Arr_walk_along_line_point_location >`. * - * Checks if the given curve or \f$ x\f$-monotone curve `c` intersects + * Checks if the given curve or \f$x\f$-monotone curve `c` intersects * edges or vertices of the existing arrangement `arr`. * * \pre If provided, `pl` must be attached to the given arrangement `arr`. @@ -1111,12 +1115,12 @@ void insert(Arrangement_on_surface_2& arr, * \cgalHeading{Requirements} * *
          - *
        • If `c` is \f$ x\f$-monotone then the instantiated `GeometryTraits` + *
        • If `c` is \f$x\f$-monotone then the instantiated `GeometryTraits` * class must model the `AosXMonotoneTraits_2` concept. If * `c` is a curve then the instantiated `GeometryTraits` class must * model the `AosTraits_2` concept. That is, it should * define the `Curve_2` type, and support its subdivision into - * \f$ x\f$-monotone subcurves (and perhaps isolated points). + * \f$x\f$-monotone subcurves (and perhaps isolated points). *
        • The point-location object `pl`, must model the * `AosPointLocation_2` concept. *
        @@ -1128,7 +1132,7 @@ bool do_intersect(Arrangement_on_surface_2& arr, /*! \ingroup PkgArrangementOnSurface2Funcs * - * Inserts a given \f$ x\f$-monotone curve into a given arrangement, where the + * Inserts a given \f$x\f$-monotone curve into a given arrangement, where the * given curve and the existing arrangement edges (more precisely, the curves * geometric mappings of the edges) must be pairwise disjoint in their * interiors, and the interior of the input curve must not contain existing @@ -1167,7 +1171,7 @@ insert_non_intersecting_curve /*! \ingroup PkgArrangementOnSurface2Funcs * - * Inserts a set of \f$ x\f$-monotone curves in a given range into a given + * Inserts a set of \f$x\f$-monotone curves in a given range into a given * arrangement. The insertion is performed in an aggregated manner using the * sweep-line algorithm. The input curves and the existing arrangement edges * (more precisely, the curves geometric mappings of the edges) must be pairwise @@ -1230,7 +1234,7 @@ insert_point(Arrangement_on_surface_2& arr, * * Invokes the member function `arr.is_valid()` to verify the topological * correctness of the arrangement. Then it performs additional validity - * tests. It checks that all \f$ x\f$-monotone curves associated with + * tests. It checks that all \f$x\f$-monotone curves associated with * arrangement edges are pairwise disjoint in their interior. Then it makes sure * that all holes and all isolated vertices are located within the proper * arrangement faces. Note that the test carried out by this function may take a @@ -1254,7 +1258,7 @@ bool is_valid * `remove_edge(arr, e)` is equivalent to the call `arr.remove_edge (e, true, * true)`. However, this free function requires that `Traits` be a model of the * refined concept `AosXMonotoneTraits_2`, which requires merge - * operations on \f$ x\f$-monotone curves. If one of the end-vertices of the + * operations on \f$x\f$-monotone curves. If one of the end-vertices of the * given edge becomes redundant after the edge is removed (see `remove_vertex()` * for the definition of a redundant vertex), it is removed, and its incident * edges are merged. If the edge-removal operation causes two faces to merge, @@ -1268,7 +1272,7 @@ bool is_valid * `AosXMonotoneTraits_2`. *
      */ -template +template typename Arrangement_on_surface_2::Face_handle remove_edge (Arrangement_on_surface_2& arr, diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arrangement_on_surface_with_history_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arrangement_on_surface_with_history_2.h index ac6fac59496..140be3ded46 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arrangement_on_surface_with_history_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arrangement_on_surface_with_history_2.h @@ -5,18 +5,18 @@ namespace CGAL { * \anchor arr_refaos_with_hist * * An object `arr` of the class `Arrangement_on_surface_with_history_2` - * represents the planar subdivision induced by a set of input curves \f$ \cal - * C\f$. The arrangement is represented as a doubly-connected edge-list (Dcel). As is the case for the + * represents the planar subdivision induced by a set of input curves + * \f$\cal C\f$. The arrangement is represented as a doubly-connected edge-list + * (Dcel). As is the case for the * `Arrangement_2`, each Dcel vertex is - * associated with a point and each edge is associated with an \f$ x\f$-monotone + * associated with a point and each edge is associated with an \f$x\f$-monotone * curve whose interior is disjoint from all other edges and vertices. Each such - * \f$ x\f$-monotone curve is a subcurve of some \f$ C \in \cal C\f$ - or may - * represent an overlap among several curves in \f$ \cal C\f$. + * \f$x\f$-monotone curve is a subcurve of some \f$C \in \cal C\f$ - or may + * represent an overlap among several curves in \f$\cal C\f$. * * The `Arrangement_on_surface_with_history_2` class-template extends the * `Arrangement_2` class-template by keeping an additional container of input - * curves representing \f$ \cal C\f$, and by maintaining a cross-mapping between + * curves representing \f$\cal C\f$, and by maintaining a cross-mapping between * these curves and the arrangement edges they induce. This way it is possible * to determine the inducing curve(s) of each arrangement edge. This mapping * also allows the traversal of input curves, and the traversal of edges induced @@ -26,33 +26,32 @@ namespace CGAL { * *
        *
      • The `GeometryTraits` template-parameter should be substituted by a - * model of the `ArrangementTraits_2` concept. The traits class defines the + * model of the `AosTraits_2` concept. The traits class defines the * `Curve_2` type, which represents an input curve. It also defines the types - * of \f$ x\f$-monotone curves and two-dimensional points, namely - * `ArrangementTraits_2::X_monotone_curve_2` and - * `ArrangementTraits_2::Point_2`, respectively, and supports basic + * of \f$x\f$-monotone curves and two-dimensional points, namely + * `AosTraits_2::X_monotone_curve_2` and + * `AosTraits_2::Point_2`, respectively, and supports basic * geometric predicates on them. *
      • The `TopologyTraits` template-parameter should be substituted by a - * class that is a model of the `ArrangementTopologyTraits` concept. + * class that is a model of the `AosTopologyTraits` concept. *
      * * \sa `Arrangement_with_history_2` * \sa `Arrangement_on_surface_2` - * \sa `ArrangementTraits_2` - * \sa `ArrangementTopologyTraits` + * \sa `AosTraits_2` + * \sa `AosTopologyTraits` */ template class Arrangement_on_surface_with_history_2 : - public Arrangement_on_surface_2 -{ + public Arrangement_on_surface_2 { public: /// \name Types /// @{ - //! the geometry traits class in use. + /// the geometry traits class in use. typedef GeometryTraits Geometry_traits_2; - //! the topology traits class in use. + /// the topology traits class in use. typedef TopologyTraits Topology_traits; /*! a private type used as an abbreviation of the @@ -61,16 +60,16 @@ public: typedef Arrangement_on_surface_with_history_2 Self; - //! the Dcel representation of the arrangement. + /// the Dcel representation of the arrangement. typedef typename Topology_traits::Dcel Dcel; - //! the point type, as defined by the traits class. + /// the point type, as defined by the traits class. typedef typename Geometry_traits_2::Point_2 Point_2; - //! the \f$ x\f$-monotone curve type, as defined by the traits class. + /// the \f$x\f$-monotone curve type, as defined by the traits class. typedef typename Geometry_traits_2::X_monotone_curve_2 X_monotone_curve_2; - //! the curve type, as defined by the traits class. + /// the curve type, as defined by the traits class. typedef typename Geometry_traits_2::Curve_2 Curve_2; /// @} @@ -82,7 +81,7 @@ public: */ /// @{ - //! a handle for an input curve. + /// a handle for an input curve. typedef unspecified_type Curve_handle; /*! a bidirectional iterator over the curves that induce the arrangement. @@ -123,13 +122,13 @@ public: /// \name Assignment Methods /// @{ - //! assignment operator. + /// assignment operator. Self& operator=(other); - //! assigns the contents of another arrangement. + /// assigns the contents of another arrangement. void assign(const Self& other); - //! clears the arrangement. + /// clears the arrangement. void clear (); /// @} @@ -140,31 +139,31 @@ public: /// @{ - //! returns the number of input curves that induce the arrangement. + /// returns the number of input curves that induce the arrangement. Size number_of_curves() const; - //! returns the begin-iterator of the curves inducing the arrangement. + /// returns the begin-iterator of the curves inducing the arrangement. Curve_iterator curves_begin(); //! returns the past-the-end iterator of the curves inducing the arrangement. Curve_iterator curves_end(); - //! returns the number of arrangement edges induced by the curve `ch`. + /// returns the number of arrangement edges induced by the curve `ch`. Size number_of_induced_edges(Curve_handle ch) const; - //! returns the begin-iterator of the edges induced by the curve `ch`. + /// returns the begin-iterator of the edges induced by the curve `ch`. Induced_edge_iterator induced_edges_begin(Curve_handle ch) const; - //! returns the past-the-end iterator of the edges induced by the curve `ch`. + /// returns the past-the-end iterator of the edges induced by the curve `ch`. Induced_edge_iterator induced_edges_end(Curve_handle ch) const; - //! returns the number of input curves that originate the edge `e`. + /// returns the number of input curves that originate the edge `e`. Size number_of_originating_curves(Halfedge_handle e) const; - //! returns the begin-iterator of the curves originating the edge `e`. + /// returns the begin-iterator of the curves originating the edge `e`. Originating_curve_iterator originating_curves_begin(Halfedge_handle e) const; - //! returns the past-the-end iterator of the curves originating the edge `e`. + /// returns the past-the-end iterator of the curves originating the edge `e`. Originating_curve_iterator originating_curves_end(Halfedge_handle e) const; /// @} @@ -192,9 +191,9 @@ public: /*! merges the edges represented by `e1` and `e2` into a single edge. The * function returns a handle for one of the merged halfedges. * - * \pre `e1` and `e2` share a common end-vertex, of degree \f$ 2\f$, and the - * \f$ x\f$-monotone curves associated with `e1` and `e2` are mergeable - * into a single \f$ x\f$-monotone curves. + * \pre `e1` and `e2` share a common end-vertex, of degree \f$2\f$, and the + * \f$x\f$-monotone curves associated with `e1` and `e2` are mergeable + * into a single \f$x\f$-monotone curves. */ Halfedge_handle merge_edge(Halfedge_handle e1, Halfedge_handle e2); @@ -210,7 +209,6 @@ public: bool remove_target = true); /// @} - }; /* end Arrangement_on_surface_with_history_2 */ /*! \ingroup PkgArrangementOnSurface2Insert @@ -222,14 +220,14 @@ public: * computing its zone until reaching the right endpoint. * * The given point-location object `pl` is used to locate the left endpoints of - * the \f$ x\f$-monotone curves. By default, the function uses the "walk along + * the \f$x\f$-monotone curves. By default, the function uses the "walk along * line" point-location strategy - namely an instance of the class * `Arr_walk_along_line_point_location >`. * * \pre If provided, `pl` is attached to the given arrangement `arr`. */ -template +template typename Arrangement_on_surface_with_history_2::Curve_handle insert (Arrangement_on_surface_with_history_2& arr, @@ -261,7 +259,6 @@ Size remove_curve (Arrangement_on_surface_with_history_2& arr, typename Arrangement_on_surface_with_history_2::Curve_handle ch); - /*! \addtogroup PkgArrangementOnSurface2Overlay * * Computes the overlay of two arrangements with history `arr1` and `arr2`, and @@ -281,17 +278,16 @@ void overlay Arrangement_on_surface_with_history_2& res, OverlayTraits& ovl_tr); - /*! \addtogroup PkgArrangementOnSurface2Overlay * * Computes the (simple) overlay of two arrangements with history `arr1` and - *`arr2`, and sets the output arrangement with history `res` to represent the - *overlaid arrangement. The function also constructs a consolidated set of - *curves that induce `res`. It employs the default overlay-traits, which - *practically does nothing. + * `arr2`, and sets the output arrangement with history `res` to represent the + * overlaid arrangement. The function also constructs a consolidated set of + * curves that induce `res`. It employs the default overlay-traits, which + * practically does nothing. * * \pre `res` does not refer to either `arr1` or `arr2` (that is, "self overlay" - *is not supported). + * is not supported). */ template diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arrangement_with_history_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arrangement_with_history_2.h index 35dec6e6643..3c81415dc98 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arrangement_with_history_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arrangement_with_history_2.h @@ -5,17 +5,17 @@ namespace CGAL { * \anchor arr_refarr_with_hist * * An object `arr` of the class `Arrangement_with_history_2` represents the - * planar subdivision induced by a set of input curves \f$ \cal C\f$. The + * planar subdivision induced by a set of input curves \f$\cal C\f$. The * arrangement is represented as a doubly-connected edge-list (\dcel). As is * the case for the `Arrangement_2`, each \dcel vertex is - * associated with a point and each edge is associated with an \f$ x\f$-monotone + * associated with a point and each edge is associated with an \f$x\f$-monotone * curve whose interior is disjoint from all other curves and points. Each such - * \f$ x\f$-monotone curve is a subcurve of some \f$ C \in \cal C\f$, or may - * represent an overlap among several curves in \f$ \cal C\f$. + * \f$x\f$-monotone curve is a subcurve of some \f$C \in \cal C\f$, or may + * represent an overlap among several curves in \f$\cal C\f$. * * The `Arrangement_with_history_2` class-template extends the `Arrangement_2` * class-template by keeping an additional container of input curves - * representing \f$ \cal C\f$, and by maintaining a cross-mapping between these + * representing \f$\cal C\f$, and by maintaining a cross-mapping between these * curves and the arrangement edges they induce. This way it is possible to * determine the inducing curve(s) of each arrangement edge. This mapping also * allows the traversal of input curves, and the traversal of edges induced by @@ -43,20 +43,20 @@ namespace CGAL { * \sa `overlaying arrangements` */ template -class Arrangement_with_history_2 : public Arrangement_on_surface_with_history_2::Traits> { +class Arrangement_with_history_2 : + public Arrangement_on_surface_with_history_2::Traits> { public: - /// \name Types /// @{ - //! the geometry traits class. + /// the geometry traits class. typedef Traits Geometry_traits; - //! The topology traits. + /// The topology traits. typedef typename Default_planar_topology::Traits Topology_traits; - //! The base arrangement on surface type. + /// The base arrangement on surface type. typedef Arrangement_on_surface_with_history_2 Base; @@ -129,13 +129,13 @@ public: * computing its zone until reaching the right endpoint. * * The given point-location object `pl` is used to locate the left endpoints of - * the \f$ x\f$-monotone curves. By default, the function uses the "walk along + * the \f$x\f$-monotone curves. By default, the function uses the "walk along * line" point-location strategy - namely an instance of the class * `Arr_walk_along_line_point_location >`. * * \pre If provided, `pl` is attached to the given arrangement `arr`. */ -template +template typename Arrangement_with_history_2::Curve_handle insert(Arrangement_with_history_2& arr, const typename Traits::Curve_2& c, @@ -169,8 +169,8 @@ Size remove_curve(Arrangement_with_history_2& arr, * * \pre `res` does not refer to either `arr1` or `arr2`. */ -template +template void overlay(const Arrangement_with_history_2& arr1, const Arrangement_with_history_2& arr2, Arrangement_with_history_2& res, @@ -187,8 +187,7 @@ void overlay(const Arrangement_with_history_2& arr1, * \pre `res` does not refer to either `arr1` or `arr2` (that is, "self overlay" * is not supported). */ -template +template void overlay(const Arrangement_with_history_2& arr1, const Arrangement_with_history_2& arr2, Arrangement_with_history_2& res); diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/CORE_algebraic_number_traits.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/CORE_algebraic_number_traits.h index b48ef555575..f3b6cdfb9f0 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/CORE_algebraic_number_traits.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/CORE_algebraic_number_traits.h @@ -12,16 +12,16 @@ public: /// \name Types /// @{ - //! The integer number type. + /// The integer number type. typedef CORE::BigInt Integer; - //! The rational number type. + /// The rational number type. typedef CORE::BigRat Rational; - //! The polynomial type. + /// The polynomial type. typedef CORE::Polynomial Polynomial; - //! The algebraic number type. + /// The algebraic number type. typedef CORE::Expr Algebraic; /// @} diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/IO/Arr_iostream.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/IO/Arr_iostream.h index 7aa284b171a..824e3f73bd7 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/IO/Arr_iostream.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/IO/Arr_iostream.h @@ -2,100 +2,89 @@ namespace CGAL { namespace IO { -/*! - \defgroup PkgArrangementOnSurface2Read CGAL::IO::read() - \ingroup PkgArrangementOnSurface2IO +/*! \defgroup PkgArrangementOnSurface2Read CGAL::IO::read() + * \ingroup PkgArrangementOnSurface2IO + * + * Reads a given arrangement from a given input stream + * using a specific input format. + * + * \cgalHeading{Requirements} + * + *
        + *
      • The instantiated `Formatter` class must model the + * `AosInputFormatter` concept. + *
      • The instantiated `WithHistoryFormatter` class must model the + * `AosWithHistoryInputFormatter` concept. + *
      + * + * \sa `PkgArrangementOnSurface2Write` + * \sa `PkgArrangementOnSurface2op_left_shift` + * \sa `PkgArrangementOnSurface2op_right_shift` + */ -Reads a given arrangement from a given input stream -using a specific input format. - -\cgalHeading{Requirements} - -
        -
      • The instantiated `Formatter` class must model the - `ArrangementInputFormatter` concept. -
      • The instantiated `WithHistoryFormatter` class must model the - `ArrangementWithHistoryInputFormatter` concept. -
      - - -\sa `PkgArrangementOnSurface2Write` - - -\sa `PkgArrangementOnSurface2op_left_shift` -\sa `PkgArrangementOnSurface2op_right_shift` -*/ /// @{ -/*! -Reads the arrangement object `arr` from the given input stream `is` -using a specific input format defined by \"formatter\". -*/ -template -std::istream& read (Arrangement_2& arr, - std::istream& is, - Formatter& formatter); - +/*! Reads the arrangement object `arr` from the given input stream `is` + * using a specific input format defined by \"formatter\". + */ +template +std::istream& read(Arrangement_2& arr, + std::istream& is, Formatter& formatter); /// @} -/*! - \defgroup PkgArrangementOnSurface2Write CGAL::IO::write() - \ingroup PkgArrangementOnSurface2IO +/*! \defgroup PkgArrangementOnSurface2Write CGAL::IO::write() + * \ingroup PkgArrangementOnSurface2IO + * + * Writes a given arrangement into a given output stream + * using a specific output format. + * + * \cgalHeading{Requirements} + * + *
        + *
      • The instantiated `Formatter` class must model the + * `AosOutputFormatter` concept. + *
      • The instantiated `WithHistoryFormatter` class must model the + * `AosWithHistoryOutputFormatter` concept. + *
      + * + * \sa `PkgArrangementOnSurface2Read` + * \sa `PkgArrangementOnSurface2op_left_shift` + * \sa `PkgArrangementOnSurface2op_right_shift` + */ -Writes a given arrangement into a given output stream -using a specific output format. - -\cgalHeading{Requirements} - -
        -
      • The instantiated `Formatter` class must model the - `ArrangementOutputFormatter` concept. -
      • The instantiated `WithHistoryFormatter` class must model the - `ArrangementWithHistoryOutputFormatter` concept. -
      - -\sa `PkgArrangementOnSurface2Read` -\sa `PkgArrangementOnSurface2op_left_shift` -\sa `PkgArrangementOnSurface2op_right_shift` -*/ /// @{ -/*! -Writes the arrangement object `arr` into the given output stream -`os` using a specific output format defined by `formatter`. -*/ -template -std::ostream& write (const Arrangement_2& arr, - std::ostream& os, - Formatter& formatter); +/*! Writes the arrangement object `arr` into the given output stream + * `os` using a specific output format defined by `formatter`. + */ +template +std::ostream& write(const Arrangement_2& arr, + std::ostream& os, Formatter& formatter); /// @} } // namespace IO -/*! -\ingroup PkgArrangementOnSurface2op_left_shift -Inserts the arrangement object `arr` into the output stream -`os` using the output format defined by the -`Arr_text_formatter` class. Only the basic geometric and -topological features of the arrangement are inserted. Auxiliary data -that may be attached to the \dcel features is ignored. -*/ -template -std::ostream& operator<< (std::ostream& os, - const Arrangement_2& arr); +/*! \ingroup PkgArrangementOnSurface2op_left_shift + * Inserts the arrangement object `arr` into the output stream + * `os` using the output format defined by the + * `Arr_text_formatter` class. Only the basic geometric and + * topological features of the arrangement are inserted. Auxiliary data + * that may be attached to the \dcel features is ignored. + */ +template +std::ostream& operator<<(std::ostream& os, + const Arrangement_2& arr); -/*! -\ingroup PkgArrangementOnSurface2op_right_shift -Extracts an arrangement from a given input stream using the input -format defined by the `Arr_text_formatter` class - that is, only the -basic geometric and topological features of the arrangement are read -and no auxiliary data is attached to the Dcel features. -*/ -template -std::istream& operator>>(std::istream& is, Arrangement_2& arr); - +/*! \ingroup PkgArrangementOnSurface2op_right_shift + * Extracts an arrangement from a given input stream using the input + * format defined by the `Arr_text_formatter` class - that is, only the + * basic geometric and topological features of the arrangement are read + * and no auxiliary data is attached to the Dcel features. + */ +template +std::istream& operator>>(std::istream& is, Arrangement_2& arr); } /* end namespace CGAL::IO*/ diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/IO/Arr_text_formatter.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/IO/Arr_text_formatter.h index 4695aa5cfb5..8ec0f2f07ee 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/IO/Arr_text_formatter.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/IO/Arr_text_formatter.h @@ -1,93 +1,83 @@ - namespace CGAL { -/*! -\ingroup PkgArrangementOnSurface2IO +/*! \ingroup PkgArrangementOnSurface2IO + * + * `Arr_extended_dcel_text_formatter` defines the format of an arrangement in an + * input or output stream (typically a file stream), thus enabling reading and + * writing an `Arrangement` instance using a simple text format. The + * `Arrangement` class should be instantiated with a \dcel class which in turn + * instantiates the `Arr_extended_dcel` template with the `VertexData`, + * `HalfedgeData` and `FaceData` types. The formatter supports reading and + * writing the data objects attached to the arrangement vertices, halfedges and + * faces. + * + * The `Arr_extended_dcel_text_formatter` class assumes that the nested + * `Point_2` and the `Curve_2` types defined by the `Arrangement` + * template-parameter, as well as the `VertexData`, `HalfedgeData` and + * `FaceData` types, can all be written to an input stream using the `<<` + * operator and read from an input stream using the `>>` operator. + * + * \cgalModels{AosInputFormatter,AosOutputFormatter} + * + * \sa `PkgArrangementOnSurface2Read` + * \sa `PkgArrangementOnSurface2Write` + * \sa `Arr_extended_dcel` + */ +template +class Arr_extended_dcel_text_formatter {}; -`Arr_extended_dcel_text_formatter` defines the format of an arrangement in an input or output stream -(typically a file stream), thus enabling reading and writing an `Arrangement` -instance using a simple text format. The `Arrangement` class should be -instantiated with a \dcel class which in turn instantiates the -`Arr_extended_dcel` template with the `VertexData`, `HalfedgeData` and -`FaceData` types. -The formatter supports reading and writing the data objects attached to the -arrangement vertices, halfedges and faces. - -The `Arr_extended_dcel_text_formatter` class assumes that the nested `Point_2` and the `Curve_2` types -defined by the `Arrangement` template-parameter, as well as the `VertexData`, -`HalfedgeData` and `FaceData` types, can all be written to an input stream using -the `<<` operator and read from an input stream using the `>>` operator. - -\cgalModels{ArrangementInputFormatter,ArrangementOutputFormatter} - -\sa `PkgArrangementOnSurface2Read` -\sa `PkgArrangementOnSurface2Write` -\sa `Arr_extended_dcel` - -*/ -template< typename Arrangement > -class Arr_extended_dcel_text_formatter { -public: - -}; /* end Arr_extended_dcel_text_formatter */ } /* end namespace CGAL */ namespace CGAL { -/*! -\ingroup PkgArrangementOnSurface2IO +/*! \ingroup PkgArrangementOnSurface2IO + * + * `Arr_face_extended_text_formatter` defines the format of an arrangement in an + * input or output stream (typically a file stream), thus enabling reading and + * writing an `Arrangement` instance using a simple text format. The + * `Arrangement` class should be instantiated with a \dcel class which in turn + * instantiates the `Arr_face_extended_dcel` template with a `FaceData` type. + * The formatter supports reading and writing the data objects attached to the + * arrangement faces as well. + * + * The `Arr_face_extended_text_formatter` class assumes that the nested + * `Point_2` and the `Curve_2` types defined by the `Arrangement` + * template-parameter and that the `FaceData` type can all be written to an + * input stream using the `<<` operator and read from an input stream using the + * `>>` operator. + * + * \cgalModels{AosInputFormatter,AosOutputFormatter} + * + * \sa `PkgArrangementOnSurface2Read` + * \sa `PkgArrangementOnSurface2Write` + * \sa `Arr_face_extended_dcel` + */ +template +class Arr_face_extended_text_formatter {}; -`Arr_face_extended_text_formatter` defines the format of an arrangement in an input or output stream -(typically a file stream), thus enabling reading and writing an `Arrangement` -instance using a simple text format. The `Arrangement` class should be -instantiated with a \dcel class which in turn instantiates the -`Arr_face_extended_dcel` template with a `FaceData` type. -The formatter supports reading and writing the data objects attached to the -arrangement faces as well. - -The `Arr_face_extended_text_formatter` class assumes that the nested `Point_2` and the `Curve_2` types -defined by the `Arrangement` template-parameter and that the `FaceData` type -can all be written to an input stream using the `<<` operator and read from an input stream using the `>>` operator. - -\cgalModels{ArrangementInputFormatter,ArrangementOutputFormatter} - -\sa `PkgArrangementOnSurface2Read` -\sa `PkgArrangementOnSurface2Write` -\sa `Arr_face_extended_dcel` - -*/ -template< typename Arrangement > -class Arr_face_extended_text_formatter { -public: - -}; /* end Arr_face_extended_text_formatter */ } /* end namespace CGAL */ namespace CGAL { -/*! -\ingroup PkgArrangementOnSurface2IO +/*! \ingroup PkgArrangementOnSurface2IO + * + * `Arr_text_formatter` defines the format of an arrangement in an input or + * output stream (typically a file stream), thus enabling reading and writing an + * `Arrangement` instance using a simple text format. The arrangement is assumed + * to store no auxiliary data with its \dcel records (and if there are such + * records they will not be written or read by the formatter). + * + * The `Arr_text_formatter` class assumes that the nested `Point_2` and the + * `Curve_2` types defined by the `Arrangement` template-parameter can both be + * written to an input stream using the `<<` operator and read from an input + * stream using the `>>` operator. + * + * \cgalModels{AosInputFormatter,AosOutputFormatter} + * + * \sa `PkgArrangementOnSurface2Read` + * \sa `PkgArrangementOnSurface2Write` + */ +template +class Arr_text_formatter {}; -`Arr_text_formatter` defines the format of an arrangement in an input or output stream -(typically a file stream), thus enabling reading and writing an `Arrangement` -instance using a simple text format. The arrangement is assumed to store no auxiliary -data with its \dcel records (and if there are such records they will not be written -or read by the formatter). - -The `Arr_text_formatter` class assumes that the nested `Point_2` and the `Curve_2` types -defined by the `Arrangement` template-parameter can both be written to an input -stream using the `<<` operator and read from an input stream using the `>>` -operator. - -\cgalModels{ArrangementInputFormatter,ArrangementOutputFormatter} - -\sa `PkgArrangementOnSurface2Read` -\sa `PkgArrangementOnSurface2Write` - -*/ -template< typename Arrangement > -class Arr_text_formatter { -public: - -}; /* end Arr_text_formatter */ } /* end namespace CGAL */ diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/IO/Arr_with_history_iostream.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/IO/Arr_with_history_iostream.h index 968bda50939..c38812953c8 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/IO/Arr_with_history_iostream.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/IO/Arr_with_history_iostream.h @@ -2,51 +2,46 @@ namespace CGAL { namespace IO { -/*! -\ingroup PkgArrangementOnSurface2Read - -Reads the arrangement-with-history object `arr` from the given -input stream `is` using a specific input format defined by -\"formatter\". - -*/ -template -std::istream& read (Arrangement_with_history_2& arr, - std::istream& is, - WithHistoryFormatter& formatter); +std::istream& read(Arrangement_with_history_2& arr, + std::istream& is, WithHistoryFormatter& formatter); -/*! -\ingroup PkgArrangementOnSurface2Write -Writes the arrangement-with-history object `arr` into the given -output stream `os` using a specific output format defined by -`formatter`. -*/ -template -std::ostream& write (const Arrangement_with_history_2& arr, - std::ostream& os, - WithHistoryFormatter& formatter); +std::ostream& write(const Arrangement_with_history_2& arr, + std::ostream& os, WithHistoryFormatter& formatter); } // namespace IO -/*! -\ingroup PkgArrangementOnSurface2op_left_shift -Inserts the arrangement-with-history object `arr` into the output -stream `os` using the output format defined by the -`Arr_with_history_text_formatter` class. Only the basic geometric -and topological features of the arrangement are inserted. Auxiliary -data that may be attached to the \dcel features is ignored. -*/ -template -std::ostream& operator<< (std::ostream& os, - const Arrangement_with_history_2& arr); +/*! \ingroup PkgArrangementOnSurface2op_left_shift + * inserts the arrangement-with-history object `arr` into the output + * stream `os` using the output format defined by the + * `Arr_with_history_text_formatter` class. Only the basic geometric + * and topological features of the arrangement are inserted. Auxiliary + * data that may be attached to the \dcel features is ignored. + */ +template +std::ostream& operator<<(std::ostream& os, + const Arrangement_with_history_2& arr); + +/*! \ingroup PkgArrangementOnSurface2op_right_shift + * extracts an arrangement-with-history from a given input stream using + * the default input format. + */ +template +std::istream& operator>>(std::istream& is, + Arrangement_with_history_2& arr); -/*! -\ingroup PkgArrangementOnSurface2op_right_shift -Extracts an arrangement-with-history from a given input stream using -the default input format. -*/ -template -std::istream& operator>>(std::istream& is, Arrangement_with_history_2& arr); } diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/IO/Arr_with_history_text_formatter.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/IO/Arr_with_history_text_formatter.h index 564b6534b34..305a5f5a753 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/IO/Arr_with_history_text_formatter.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/IO/Arr_with_history_text_formatter.h @@ -1,29 +1,24 @@ - namespace CGAL { -/*! -\ingroup PkgArrangementOnSurface2IO +/*! \ingroup PkgArrangementOnSurface2IO + * + * `Arr_with_history_text_formatter` defines the format of an arrangement in an + * input or output stream (typically a file stream), thus enabling reading and + * writing an arrangement-with-history instance using a simple text format. + * + * The `ArrFormatter` parameter servers as a base class for + * `Arr_with_history_text_formatter` and must be a model of the + * `AosInputFormatter` and the `AosOutputFormatter` concepts. It is used to read + * or write the base arrangement, while the derived class is responsible for + * reading and writing the set of curves inducing the arrangement and + * maintaining the relations between these curves and the edges they induce. + * + * \cgalModels{AosWithHistoryInputFormatter,AosWithHistoryOutputFormatter} + * + * \sa `PkgArrangementOnSurface2Read` + * \sa `PkgArrangementOnSurface2Write` + */ +template +class Arr_with_history_text_formatter {}; -`Arr_with_history_text_formatter` defines the format of an arrangement in an input or output stream -(typically a file stream), thus enabling reading and writing an -arrangement-with-history instance using a simple text format. - -The `ArrFormatter` parameter servers as a base class for -`Arr_with_history_text_formatter` and must be a model of the `ArrangementInputFormatter` -and the `ArrangementOutputFormatter` concepts. It is used to read or write -the base arrangement, while the derived class is responsible for reading and -writing the set of curves inducing the arrangement and maintaining the -relations between these curves and the edges they induce. - -\cgalModels{ArrangementWithHistoryInputFormatter,ArrangementWithHistoryOutputFormatter} - -\sa `PkgArrangementOnSurface2Read` -\sa `PkgArrangementOnSurface2Write` - -*/ -template< typename ArrFormatter > -class Arr_with_history_text_formatter { -public: - -}; /* end Arr_with_history_text_formatter */ } /* end namespace CGAL */ diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/draw_arrangement_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/draw_arrangement_2.h index fe702f38e4e..39d637cde4a 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/draw_arrangement_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/draw_arrangement_2.h @@ -37,9 +37,9 @@ namespace CGAL { * * \tparam GeometryTraits_2 a geometry traits type, a model of a 2D arrangement * traits concept. At this point it must be an instance of either - * `CGAL::Arr_segment_traits_2` or `CGAL::Arr_conic_traits_2`. \tparam Dcel the - * \dcel type, a model of the `AosDcel` concept. \tparam GSOptions a model of - * `GraphicsSceneOptions` concept. + * `CGAL::Arr_segment_traits_2` or `CGAL::Arr_conic_traits_2`. + * \tparam Dcel the \dcel type, a model of the `AosDcel` concept. + * \tparam GSOptions a model of `GraphicsSceneOptions` concept. * * \param arr the 2D arrangement to draw. * \param gso the graphics scene options parameter. @@ -67,9 +67,9 @@ void draw(const Arrangement_2& arr); * * \tparam GeometryTraits_2 a geometry traits type, a model of a 2D arrangement * traits concept. At this point it must be an instance of either - * `CGAL::Arr_segment_traits_2` or `CGAL::Arr_conic_traits_2`. \tparam Dcel the - * \dcel type, a model of the `AosDcel` concept. \tparam GSOptions a model of - * `GraphicsSceneOptions` concept. + * `CGAL::Arr_segment_traits_2` or `CGAL::Arr_conic_traits_2`. + * \tparam Dcel the \dcel type, a model of the `AosDcel` concept. + * \tparam GSOptions a model of `GraphicsSceneOptions` concept. * * \param arr the 2D arrangement to draw. * \param gs the graphic scene to fill. diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosApproximateTraits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosApproximateTraits_2.h index 7dfd9a01f6b..87b94427249 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosApproximateTraits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosApproximateTraits_2.h @@ -1,36 +1,32 @@ -/*! -\ingroup PkgArrangementOnSurface2ConceptsTraits -\cgalConcept - -The concept `ArrangementApproximateTraits_2` refines the basic traits concept -`ArrangementBasicTraits_2`. A model of this concept is able to approximate a -point. - -\cgalRefines{ArrangementBasicTraits_2} - -\cgalHasModelsBegin -\cgalHasModels{CGAL::Arr_conic_traits_2} -\cgalHasModels{CGAL::Arr_geodesic_arc_on_sphere_traits_2} -\cgalHasModels{CGAL::Arr_linear_traits_2} -\cgalHasModels{CGAL::Arr_non_caching_segment_traits_2} -\cgalHasModels{CGAL::Arr_segment_traits_2} -\cgalHasModels{CGAL::Arr_polycurve_traits_2} -\cgalHasModels{CGAL::Arr_polyline_traits_2} -\cgalHasModels{CGAL::Arr_rational_function_traits_2} -\cgalHasModelsEnd - -\sa `ArrangementConstructXMonotoneCurveTraits_2`, - `ArrangementXMonotoneTraits_2`, and - `ArrangementTraits_2` -*/ -class ArrangementApproximateTraits_2 { +/*! \ingroup PkgArrangementOnSurface2ConceptsTraits + * \cgalConcept + * + * The concept `AosApproximateTraits_2` refines the basic traits concept + * `AosBasicTraits_2`. A model of this concept is able to approximate a point. + * + * \cgalRefines{AosBasicTraits_2} + * + * \cgalHasModelsBegin + * \cgalHasModels{CGAL::Arr_conic_traits_2} + * \cgalHasModels{CGAL::Arr_geodesic_arc_on_sphere_traits_2} + * \cgalHasModels{CGAL::Arr_linear_traits_2} + * \cgalHasModels{CGAL::Arr_non_caching_segment_traits_2} + * \cgalHasModels{CGAL::Arr_segment_traits_2} + * \cgalHasModels{CGAL::Arr_polycurve_traits_2} + * \cgalHasModels{CGAL::Arr_polyline_traits_2} + * \cgalHasModels{CGAL::Arr_rational_function_traits_2} + * \cgalHasModelsEnd + * + * \sa `AosConstructXMonotoneCurveTraits_2` + * \sa `AosXMonotoneTraits_2` + * \sa `AosTraits_2` + */ +class AosApproximateTraits_2 { public: /// \name Types /// @{ - /*! - * the number type used to approximate point coordinates, e.g., double. - */ + //! the number type used to approximate point coordinates, e.g., double. typedef unspecified_type Approximate_number_type; /// @} @@ -38,17 +34,15 @@ public: /// \name Functor Types /// @{ - /*! - * models the concept `ArrTraits::Approximate_2`. - */ + /// models the concept `AosTraits::Approximate_2`. typedef unspecified_type Approximate_2; + /// @} + /// \name Accessing Functor Objects /// @{ - /*! - * - */ + /// Approximate_2 approximate_2_object() const; /// @} diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosBasicTopologyTraits.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosBasicTopologyTraits.h index e30fada356a..36810c0be8a 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosBasicTopologyTraits.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosBasicTopologyTraits.h @@ -1,7 +1,7 @@ /*! \ingroup PkgArrangementOnSurface2ConceptsTopologyTraits * \cgalConcept * - * The concept `ArrangementBasicTopologyTraits` defines the minimal + * The concept `AosBasicTopologyTraits` defines the minimal * functionality needed for a model of a topology traits, which can substitutes * the `TopolTraits` template parameters when the class template * `Arrangement_on_surface_2` is instantiated. In @@ -13,19 +13,18 @@ * \cgalHasModels{CGAL::Arr_spherical_topology_traits_2} * \cgalHasModelsEnd */ - -class ArrangementBasicTopologyTraits { +class AosBasicTopologyTraits { public: /// \name Types /// @{ - //! models the concept `ArrTraits::Point_2`. + /// models the concept `AosTraits::Point_2`. typedef unspecified_type Point_2; - //! models the concept `ArrTraits::XMonotoneCurve_2`. + /// models the concept `AosTraits::XMonotoneCurve_2`. typedef unspecified_type X_monotone_curve_2; - //! models the concept `ArrangementDcel`. + /// models the concept `AosDcel`. typedef unspecified_type Dcel; /// @} @@ -38,10 +37,10 @@ public: /// \name Access Functions /// @{ - /*! Obtain the DCEL (const version). */ + /*! obtains the \dcel (const version). */ const Dcel& dcel() const; - /*! Obtain the DCEL (non-const version). */ + /*! obtains the \dcel (non-const version). */ Dcel& dcel(); /// @} @@ -49,5 +48,4 @@ public: /// \name Modifiers /// @{ /// @} - }; diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosBasicTraits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosBasicTraits_2.h index 3771c0af1e0..3a974fc6086 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosBasicTraits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosBasicTraits_2.h @@ -1,23 +1,23 @@ /*! \ingroup PkgArrangementOnSurface2ConceptsTraits * \cgalConcept * - * The concept `ArrangementBasicTraits_2` defines the minimal set of geometric + * The concept `AosBasicTraits_2` defines the minimal set of geometric * predicates needed for the construction and maintenance of objects of the * class `Arrangement_2`, as well as performing simple queries (such as * point-location queries) on such arrangements. * * A model of this concept must define nested `Point_2` and `X_monotone_curve_2` - * types, which represent planar points and continuous \f$ x\f$-monotone curves + * types, which represent planar points and continuous \f$x\f$-monotone curves * (a vertical segment is also considered to be weakly \f$ - * x\f$-monotone), respectively. The \f$ x\f$-monotone curves are assumed to be + * x\f$-monotone), respectively. The \f$x\f$-monotone curves are assumed to be * pairwise disjoint in their interiors, so they do not intersect except at * their endpoints. * * The `X_monotone_curve_2` curves of an arrangement are confined to an * iso-rectangular area called the parameter space. The iso-rectangule can be * unbounded, open, or closed. The set of predicates provided by a model the - * concept `ArrangementBasicTraits_2` is sufficient for constructing - * arrangements of \f$ x\f$-monotone curves that do not reach or approach the + * concept `AosBasicTraits_2` is sufficient for constructing + * arrangements of \f$x\f$-monotone curves that do not reach or approach the * boundary of the parameter space. The nature of the input curves, whether they * are expected to reach or approach the left, right, bottom, or top side of the * boundary of the parameter space, are conveyed through the definition of four @@ -45,19 +45,15 @@ * \cgalHasModels{CGAL::Arr_consolidated_curve_data_traits_2} * \cgalHasModelsEnd */ - -class ArrangementBasicTraits_2 { +class AosBasicTraits_2 { public: - /// \name Types /// @{ - /*! models the concept `ArrTraits::Point_2`. - */ + /// models the concept `AosTraits::Point_2`. typedef unspecified_type Point_2; - /*! models the concept `ArrTraits::XMonotoneCurve_2`. - */ + /// models the concept `AosTraits::XMonotoneCurve_2`. typedef unspecified_type X_monotone_curve_2; /// @} @@ -65,24 +61,19 @@ public: /// \name Categories /// @{ - /*! indicates whether the nested functor `Compare_at_x_left_2` is provided. - */ + /// indicates whether the nested functor `Compare_at_x_left_2` is provided. typedef unspecified_type Has_left_category; - /*! Must be convertible to `CGAL::Arr_oblivious_side_tag`. - */ + /// Must be convertible to `CGAL::Arr_oblivious_side_tag`. typedef unspecified_type Left_side_category; - /*! Must be convertible to `CGAL::Arr_oblivious_side_tag`. - */ + /// Must be convertible to `CGAL::Arr_oblivious_side_tag`. typedef unspecified_type Bottom_side_category; - /*! Must be convertible to `CGAL::Arr_oblivious_side_tag`. - */ + /// Must be convertible to `CGAL::Arr_oblivious_side_tag`. typedef unspecified_type Top_side_category; - /*!Must be convertible to `CGAL::Arr_oblivious_side_tag`. - */ + /// Must be convertible to `CGAL::Arr_oblivious_side_tag`. typedef unspecified_type Right_side_category; /// @} @@ -90,40 +81,35 @@ public: /// \name Functor Types /// @{ - /*! models the concept `ArrTraits::CompareX_2`. - */ + /// models the concept `AosTraits::CompareX_2`. typedef unspecified_type Compare_x_2; - /*! models the concept `ArrTraits::CompareXy_2`. - */ + /// models the concept `AosTraits::CompareXy_2`. typedef unspecified_type Compare_xy_2; - /*! models the concept `ArrTraits::ConstructMinVertex_2`. - */typedef unspecified_type Construct_min_vertex_2; + /// models the concept `AosTraits::ConstructMinVertex_2`. + typedef unspecified_type Construct_min_vertex_2; - /*! models the concept `ArrTraits::ConstructMaxVertex_2`. - */ + /// models the concept `AosTraits::ConstructMaxVertex_2`. typedef unspecified_type Construct_max_vertex_2; - /*! models the concept `ArrTraits::IsVertical_2`. + /*! models the concept `AosTraits::IsVertical_2`. */ typedef unspecified_type Is_vertical_2; - /*! models the concept `ArrTraits::CompareYAtX_2`. + /*! models the concept `AosTraits::CompareYAtX_2`. */ typedef unspecified_type Compare_y_at_x_2; - /*! models the concept `ArrTraits::CompareYAtXLeft_2`. Required only if the + /*! models the concept `AosTraits::CompareYAtXLeft_2`. Required only if the * `Has_left_category` category is convertible to `Tag_true`. */ typedef unspecified_type Compare_y_at_x_left_2; - /*! models the concept `ArrTraits::CompareYAtXRight_2`. - */ + /// models the concept `AosTraits::CompareYAtXRight_2`. typedef unspecified_type Compare_y_at_x_right_2; - /*! models the concept `ArrTraits::Equal_2`. - */ + /// models the concept `AosTraits::Equal_2`. typedef unspecified_type Equal_2; /// @} @@ -131,33 +117,32 @@ public: /// \name Accessing Functor Objects /// @{ - //! + /// Compare_x_2 compare_x_2_object() const; - //! + /// Compare_xy_2 compare_xy_2_object() const; - //! + /// Construct_min_vertex_2 construct_min_vertex_2_object() const; - //! + /// Construct_max_vertex_2 construct_max_vertex_2_object() const; - //! + /// Is_vertical_2 is_vertical_2_object() const; - //! + /// Compare_y_at_x_2 compare_y_at_x_2_object() const; - //! + /// Compare_y_at_x_left_2 compare_y_at_x_left_2_object() const; - //! + /// Compare_y_at_x_right_2 compare_y_at_x_right_2_object() const; - //! + /// Equal_2 equal_2_object() const; /// @} - -}; /* end ArrangementBasicTraits_2 */ +}; /* end AosBasicTraits_2 */ diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosBottomSideTraits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosBottomSideTraits_2.h index a29b1d33531..1a89c4935ce 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosBottomSideTraits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosBottomSideTraits_2.h @@ -1,8 +1,7 @@ -/*! - * \ingroup PkgArrangementOnSurface2ConceptsTraits +/*! \ingroup PkgArrangementOnSurface2ConceptsTraits * \cgalConcept * - * `ArrangementBottomSideTraits_2` is an abstract concept. It generalizes all + * `AosBottomSideTraits_2` is an abstract concept. It generalizes all * concepts that handle curves that either reach or approach the bottom boundary * side of the parameter space. (An "abstract" concept is a concept that is * useless on its own.) Only a combination of this concept and additional @@ -10,14 +9,13 @@ * boundary sides (that is, left, right, and top) are purposeful, and can have * models. * - * \cgalRefines{ArrangementHorizontalSideTraits_2} + * \cgalRefines{AosHorizontalSideTraits_2} * - * \sa `ArrangementLeftSideTraits_2`, - * `ArrangementRightSideTraits_2`, and - * `ArrangementTopSideTraits_2` + * \sa `AosLeftSideTraits_2` + * \sa `AosRightSideTraits_2` + * \sa `AosTopSideTraits_2` */ - -class ArrangementBottomSideTraits_2 { +class AosBottomSideTraits_2 { public: /// \name Categories /// @{ diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosClosedBottomTraits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosClosedBottomTraits_2.h index 37a519a7eca..2c5ba88de4a 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosClosedBottomTraits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosClosedBottomTraits_2.h @@ -1,24 +1,22 @@ -/*! - * \ingroup PkgArrangementOnSurface2ConceptsTraits +/*! \ingroup PkgArrangementOnSurface2ConceptsTraits * \cgalConcept * - * A model of the concept `ArrangementClosedBottomTraits_2` must be used when + * A model of the concept `AosClosedBottomTraits_2` must be used when * the parameter space of the surface, the arrangement is embedded on, is closed * on the left side and curves inserted into the arrangement are expected to * reach this boundary side. A model of this concept can handle curves that * reach the left boundary side when it is closed. * - * \cgalRefines{ArrangementBottomSideTraits_2} + * \cgalRefines{AosBottomSideTraits_2} * - * \sa `ArrangementClosedLeftTraits_2`, - * `ArrangementClosedRightTraits_2`, - * `ArrangementClosedTopTraits_2`, - * `ArrangementOpenBottomTraits_2`, - * `ArrangementContractedBottomTraits_2`, and - * `ArrangementIdentifiedHorizontalTraits_2` + * \sa `AosClosedLeftTraits_2` + * \sa `AosClosedRightTraits_2` + * \sa `AosClosedTopTraits_2` + * \sa `AosOpenBottomTraits_2` + * \sa `AosContractedBottomTraits_2` + * \sa `AosIdentifiedHorizontalTraits_2` */ - -class ArrangementClosedBottomTraits_2 { +class AosClosedBottomTraits_2 { public: /// \name Categories /// @{ @@ -34,7 +32,7 @@ public: /// \name Functor Types /// @{ - /// models the concept `ArrTraits::CompareXOnBoundary_2`. + /// models the concept `AosTraits::CompareXOnBoundary_2`. typedef unspecified_type Compare_x_on_boundary_2; /// @} diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosClosedLeftTraits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosClosedLeftTraits_2.h index ec84ff22035..5cb13cd8ccb 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosClosedLeftTraits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosClosedLeftTraits_2.h @@ -1,30 +1,28 @@ -/*! - * \ingroup PkgArrangementOnSurface2ConceptsTraits +/*! \ingroup PkgArrangementOnSurface2ConceptsTraits * \cgalConcept * - * A model of the concept `ArrangementClosedLeftTraits_2` must be used when the + * A model of the concept `AosClosedLeftTraits_2` must be used when the * parameter space of the surface, the arrangement is embedded on, is closed on * the left side and curves inserted into the arrangement are expected to reach * this boundary side. A model of this concept can handle curves that reach the * left boundary side when it is closed. - - * \cgalRefines{ArrangementLeftSideTraits_2} - -\sa `ArrangementClosedRightTraits_2`, - `ArrangementClosedBottomTraits_2`, - `ArrangementClosedTopTraits_2`, - `ArrangementOpenLeftTraits_2`, - `ArrangementContractedLeftTraits_2`, and - `ArrangementIdentifiedVerticalTraits_2`, -*/ - -class ArrangementClosedLeftTraits_2 { + * + * \cgalRefines{AosLeftSideTraits_2} + * + * \sa `AosClosedRightTraits_2` + * \sa `AosClosedBottomTraits_2` + * \sa `AosClosedTopTraits_2` + * \sa `AosOpenLeftTraits_2` + * \sa `AosContractedLeftTraits_2` + * \sa `AosIdentifiedVerticalTraits_2` + */ +class AosClosedLeftTraits_2 { public: /// \name Categories /// @{ /*! Must be convertible to `CGAL::Arr_closed_side_tag`. - */ + */ typedef unspecified_type Left_side_category; /// @} @@ -35,7 +33,7 @@ public: /// \name Functor Types /// @{ - /// models the concept `ArrTraits::CompareYOnBoundary_2`. + /// models the concept `AosTraits::CompareYOnBoundary_2`. typedef unspecified_type Compare_y_on_boundary_2; /// @} diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosClosedRightTraits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosClosedRightTraits_2.h index 4b4dc18d53d..b5f22fda9d3 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosClosedRightTraits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosClosedRightTraits_2.h @@ -1,24 +1,22 @@ -/*! - * \ingroup PkgArrangementOnSurface2ConceptsTraits +/*! \ingroup PkgArrangementOnSurface2ConceptsTraits * \cgalConcept * - * A model of the concept `ArrangementClosedRightTraits_2` must be used when the + * A model of the concept `AosClosedRightTraits_2` must be used when the * parameter space of the surface, the arrangement is embedded on, is closed on * the right side and curves inserted into the arrangement are expected to reach * this boundary side. A model of this concept can handle curves that reach the * right boundary side when it is closed. * - * \cgalRefines{ArrangementRightSideTraits_2} + * \cgalRefines{AosRightSideTraits_2} * - * \sa `ArrangementClosedLeftTraits_2`, - * `ArrangementClosedBottomTraits_2`, - * `ArrangementClosedTopTraits_2`, - * `ArrangementOpenRightTraits_2`, - * `ArrangementContractedRightTraits_2`, and - * `ArrangementIdentifiedVerticalTraits_2`, + * \sa `AosClosedLeftTraits_2` + * \sa `AosClosedBottomTraits_2` + * \sa `AosClosedTopTraits_2` + * \sa `AosOpenRightTraits_2` + * \sa `AosContractedRightTraits_2` + * \sa `AosIdentifiedVerticalTraits_2` */ - -class ArrangementClosedRightTraits_2 { +class AosClosedRightTraits_2 { public: /// \name Categories /// @{ @@ -34,7 +32,7 @@ public: /// \name Functor Types /// @{ - /// models the concept `ArrTraits::CompareYOnBoundary_2`. + /// models the concept `AosTraits::CompareYOnBoundary_2`. typedef unspecified_type Compare_y_on_boundary_2; /// @} diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosClosedTopTraits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosClosedTopTraits_2.h index e03e3bfa938..7d8867770bf 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosClosedTopTraits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosClosedTopTraits_2.h @@ -1,24 +1,22 @@ -/*! - * \ingroup PkgArrangementOnSurface2ConceptsTraits +/*! \ingroup PkgArrangementOnSurface2ConceptsTraits * \cgalConcept * - * A model of the concept `ArrangementClosedTopTraits_2` must be used when the + * A model of the concept `AosClosedTopTraits_2` must be used when the * parameter space of the surface, the arrangement is embedded on, is closed on * the top side and curves inserted into the arrangement are expected to reach * this boundary side. A model of this concept can handle curves that reach the * top boundary side when it is closed. * - * \cgalRefines{ArrangementTopSideTraits_2} + * \cgalRefines{AosTopSideTraits_2} * - * \sa `ArrangementClosedLeftTraits_2`, - * `ArrangementClosedRightTraits_2`, - * `ArrangementClosedBottomTraits_2`, - * `ArrangementOpenTopTraits_2`, - * `ArrangementContractedTopTraits_2`, and - * `ArrangementIdentifiedHorizontalTraits_2` + * \sa `AosClosedLeftTraits_2` + * \sa `AosClosedRightTraits_2` + * \sa `AosClosedBottomTraits_2` + * \sa `AosOpenTopTraits_2` + * \sa `AosContractedTopTraits_2` + * \sa `AosIdentifiedHorizontalTraits_2` */ - -class ArrangementClosedTopTraits_2 { +class AosClosedTopTraits_2 { public: /// \name Categories /// @{ @@ -34,7 +32,7 @@ public: /// \name Functor Types /// @{ - /// models the concept `ArrTraits::CompareXOnBoundary_2`. + /// models the concept `AosTraits::CompareXOnBoundary_2`. typedef unspecified_type Compare_x_on_boundary_2; /// @} diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosConstructCurveTraits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosConstructCurveTraits_2.h index 570967c2932..cab23b645c3 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosConstructCurveTraits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosConstructCurveTraits_2.h @@ -1,11 +1,11 @@ /*! \ingroup PkgArrangementOnSurface2ConceptsTraits * \cgalConcept * - * The concept `ArrangementConstructCurveTraits_2` refines the basic - * traits concept `ArrangementBasicTraits_2`. A model of this concept is able + * The concept `AosConstructCurveTraits_2` refines the basic + * traits concept `AosBasicTraits_2`. A model of this concept is able * to construct a curve from two points. * - * \cgalRefines{ArrangementTraits_2} + * \cgalRefines{AosTraits_2} * * \cgalHasModelsBegin * \cgalHasModels{CGAL::Arr_conic_traits_2} @@ -17,15 +17,15 @@ * \cgalHasModels{CGAL::Arr_rational_function_traits_2} * \cgalHasModelsEnd * - * \sa `ArrangementConstructXMonotoneCurveTraits_2`, and - * `ArrangementTraits_2` + * \sa `AosConstructXMonotoneCurveTraits_2` + * \sa `AosTraits_2` */ -class ArrangementConstructCurveTraits_2 { +class AosConstructCurveTraits_2 { public: /// \name Functor Types /// @{ - /*! models the concept `ArrTraits::ConstructCurve_2`. + /*! models the concept `AosTraits::ConstructCurve_2`. */ typedef unspecified_type Construct_curve_2; diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosConstructXMonotoneCurveTraits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosConstructXMonotoneCurveTraits_2.h index 6d0a822280e..9530063050c 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosConstructXMonotoneCurveTraits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosConstructXMonotoneCurveTraits_2.h @@ -1,11 +1,11 @@ /*! \ingroup PkgArrangementOnSurface2ConceptsTraits * \cgalConcept * - * The concept `ArrangementConstructXMonotoneCurveTraits_2` refines the basic - * traits concept `ArrangementBasicTraits_2`. A model of this concept is able to - * construct an \f$ x\f$-monotone curve from two points. + * The concept `AosConstructXMonotoneCurveTraits_2` refines the basic + * traits concept `AosBasicTraits_2`. A model of this concept is able to + * construct an \f$x\f$-monotone curve from two points. * - * \cgalRefines{ArrangementBasicTraits_2} + * \cgalRefines{AosBasicTraits_2} * * \cgalHasModelsBegin * \cgalHasModels{CGAL::Arr_conic_traits_2} @@ -17,17 +17,17 @@ * \cgalHasModels{CGAL::Arr_rational_function_traits_2} * \cgalHasModelsEnd * - * \sa `ArrangementApproximateTraits_2`, - * `ArrangementXMonotoneTraits_2` - * `ArrangementTraits_2`, and - * `ArrangementConstructCurveTraits_2`. + * \sa `AosApproximateTraits_2` + * \sa `AosXMonotoneTraits_2` + * \sa `AosTraits_2` + * \sa `AosConstructCurveTraits_2` */ -class ArrangementConstructXMonotoneCurveTraits_2 { +class AosConstructXMonotoneCurveTraits_2 { public: /// \name Functor Types /// @{ - /*! models the concept `ArrTraits::ConstructXMonotoneCurve_2`. + /*! models the concept `AosTraits::ConstructXMonotoneCurve_2`. */ typedef unspecified_type Construct_x_monotone_curve_2; @@ -36,8 +36,7 @@ public: /// \name Accessing Functor Objects /// @{ - /*! - */ + /// Construct_x_monotone_curve_2 construct_x_monotone_curve_2_object() const; /// @} diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosContractedBottomTraits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosContractedBottomTraits_2.h index 09de38a67c5..a9a0d75328d 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosContractedBottomTraits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosContractedBottomTraits_2.h @@ -1,24 +1,22 @@ -/*! - * \ingroup PkgArrangementOnSurface2ConceptsTraits +/*! \ingroup PkgArrangementOnSurface2ConceptsTraits * \cgalConcept * - * A model of the concept `ArrangementContractedBottomTraits_2` must be used + * A model of the concept `AosContractedBottomTraits_2` must be used * when the parameter space of the surface, the arrangement is embedded on, is * contracted on the bottom side and curves inserted into the arrangement are * expected to reach this boundary side. A model of this concept can handle * curves that reach the bottom boundary side when it is contracted. * - * \cgalRefines{ArrangementBottomSideTraits_2} + * \cgalRefines{AosBottomSideTraits_2} * - * \sa `ArrangementContractedLeftTraits_2`, - * `ArrangementContractedRightTraits_2`, - * `ArrangementContractedTopTraits_2`, - * `ArrangementClosedBottomTraits_2`, - * `ArrangementContractedBottomTraits_2`, and - * `ArrangementIdentifiedHorizontalTraits_2` + * \sa `AosContractedLeftTraits_2` + * \sa `AosContractedRightTraits_2` + * \sa `AosContractedTopTraits_2` + * \sa `AosClosedBottomTraits_2` + * \sa `AosContractedBottomTraits_2` + * \sa `AosIdentifiedHorizontalTraits_2` */ - -class ArrangementContractedBottomTraits_2 { +class AosContractedBottomTraits_2 { public: /// \name Categories /// @{ diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosContractedLeftTraits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosContractedLeftTraits_2.h index 9a06f1e409c..0dd9f55174e 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosContractedLeftTraits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosContractedLeftTraits_2.h @@ -1,24 +1,22 @@ -/*! - * \ingroup PkgArrangementOnSurface2ConceptsTraits +/*! \ingroup PkgArrangementOnSurface2ConceptsTraits * \cgalConcept * - * A model of the concept `ArrangementContractedLeftTraits_2` must be used when + * A model of the concept `AosContractedLeftTraits_2` must be used when * the parameter space of the surface, the arrangement is embedded on, is * contracted on the left side and curves inserted into the arrangement are * expected to reach this boundary side. A model of this concept can handle * curves that reach the left boundary side when it is contracted. * - * \cgalRefines{ArrangementLeftSideTraits_2} + * \cgalRefines{AosLeftSideTraits_2} * - * \sa `ArrangementContractedRightTraits_2`, - * `ArrangementContractedBottomTraits_2`, - * `ArrangementContractedTopTraits_2`, - * `ArrangementOpenLeftTraits_2`, - * `ArrangementClosedLeftTraits_2`, and - * `ArrangementIdentifiedVerticalTraits_2` + * \sa `AosContractedRightTraits_2` + * \sa `AosContractedBottomTraits_2` + * \sa `AosContractedTopTraits_2` + * \sa `AosOpenLeftTraits_2` + * \sa `AosClosedLeftTraits_2` + * \sa `AosIdentifiedVerticalTraits_2` */ - -class ArrangementContractedLeftTraits_2 { +class AosContractedLeftTraits_2 { public: /// \name Categories /// @{ diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosContractedRightTraits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosContractedRightTraits_2.h index 3f93d80deb2..56f5babfbf6 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosContractedRightTraits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosContractedRightTraits_2.h @@ -1,24 +1,22 @@ -/*! - * \ingroup PkgArrangementOnSurface2ConceptsTraits +/*! \ingroup PkgArrangementOnSurface2ConceptsTraits * \cgalConcept * - * A model of the concept `ArrangementContractedRightTraits_2` must be used when + * A model of the concept `AosContractedRightTraits_2` must be used when * the parameter space of the surface, the arrangement is embedded on, is * contracted on the right side and curves inserted into the arrangement are * expected to reach this boundary side. A model of this concept can handle * curves that reach the right boundary side when it is contracted. * - * \cgalRefines{ArrangementRightSideTraits_2} + * \cgalRefines{AosRightSideTraits_2} * - * \sa `ArrangementContractedLeftTraits_2`, - * `ArrangementContractedBottomTraits_2`, - * `ArrangementContractedTopTraits_2`, - * `ArrangementOpenRightTraits_2`, - * `ArrangementClosedRightTraits_2`, and - * `ArrangementIdentifiedVerticalTraits_2` + * \sa `AosContractedLeftTraits_2` + * \sa `AosContractedBottomTraits_2` + * \sa `AosContractedTopTraits_2` + * \sa `AosOpenRightTraits_2` + * \sa `AosClosedRightTraits_2` + * \sa `AosIdentifiedVerticalTraits_2` */ - -class ArrangementContractedRightTraits_2 { +class AosContractedRightTraits_2 { public: /// \name Categories /// @{ diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosContractedTopTraits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosContractedTopTraits_2.h index be39ea2b6b1..ed05faa87a4 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosContractedTopTraits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosContractedTopTraits_2.h @@ -1,24 +1,22 @@ -/*! - * \ingroup PkgArrangementOnSurface2ConceptsTraits +/*! \ingroup PkgArrangementOnSurface2ConceptsTraits * \cgalConcept * - * A model of the concept `ArrangementContractedTopTraits_2` must be used when + * A model of the concept `AosContractedTopTraits_2` must be used when * the parameter space of the surface, the arrangement is embedded on, is * contracted on the top side and curves inserted into the arrangement are * expected to reach this boundary side. A model of this concept can handle * curves that reach the top boundary side when it is contracted. * - * \cgalRefines{ArrangementTopSideTraits_2} + * \cgalRefines{AosTopSideTraits_2} * - * \sa `ArrangementContractedLeftTraits_2`, - * `ArrangementContractedRightTraits_2`, - * `ArrangementContractedBottomTraits_2`, - * `ArrangementOpenTopTraits_2`, - * `ArrangementSlosedTopTraits_2`, and - * `ArrangementIdentifiedHorizontalTraits_2` + * \sa `AosContractedLeftTraits_2` + * \sa `AosContractedRightTraits_2` + * \sa `AosContractedBottomTraits_2` + * \sa `AosOpenTopTraits_2` + * \sa `AosSlosedTopTraits_2` + * \sa `AosIdentifiedHorizontalTraits_2` */ - -class ArrangementContractedTopTraits_2 { +class AosContractedTopTraits_2 { public: /// \name Categories /// @{ diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosDcel.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosDcel.h index a7862475027..6f663c086b4 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosDcel.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosDcel.h @@ -2,8 +2,8 @@ * \cgalConcept * * A doubly-connected edge-list (\dcel for short) data-structure. It consists of - * three containers of records: vertices \f$ V\f$, halfedges \f$ E\f$, and faces - * \f$ F\f$. It maintains the incidence relation among them. The halfedges are + * three containers of records: vertices \f$V\f$, halfedges \f$E\f$, and faces + * \f$F\f$. It maintains the incidence relation among them. The halfedges are * ordered in pairs sometimes referred to as twins, such that each halfedge pair * represent an edge. * @@ -34,46 +34,46 @@ public: /// \name Types /// @{ - //! the vertex type. + /// the vertex type. typedef unspecified_type Vertex; - //! the halfedge type. + /// the halfedge type. typedef unspecified_type Halfedge; - //! the face type. + /// the face type. typedef unspecified_type Face; - //! the Outer CCB type. + /// the Outer CCB type. typedef unspecified_type Outer_ccb; - //! the Inner CCB type. + /// the Inner CCB type. typedef unspecified_type Inner_ccb; - //! the hole (i.e., Inner_ccb) type. + /// the hole (i.e., Inner_ccb) type. typedef unspecified_type Hole; - //! the isolated vertex type. + /// the isolated vertex type. typedef unspecified_type Isolated_vertex; - //! used to represent size values (e.g., `size_t`). + /// used to represent size values (e.g., `size_t`). typedef unspecified_type Size; - //! a bidirectional iterator over the vertices. Its value-type is `Vertex`. + /// a bidirectional iterator over the vertices. Its value-type is `Vertex`. typedef unspecified_type Vertex_iterator; - //! a bidirectional iterator over the vertices. Its value-type is `Vertex`. + /// a bidirectional iterator over the vertices. Its value-type is `Vertex`. typedef unspecified_type Vertex_const_iterator; - //! a bidirectional iterator over the halfedges. Its value-type is `Halfedge`. + /// a bidirectional iterator over the halfedges. Its value-type is `Halfedge`. typedef unspecified_type Halfedge_iterator; - //! a bidirectional iterator over the halfedges. Its value-type is `Halfedge`. + /// a bidirectional iterator over the halfedges. Its value-type is `Halfedge`. typedef unspecified_type Halfedge_const_iterator; - //! a bidirectional iterator over the faces. Its value-type is `Face`. + /// a bidirectional iterator over the faces. Its value-type is `Face`. typedef unspecified_type Face_iterator; - //! a bidirectional iterator over the faces. Its value-type is `Face`. + /// a bidirectional iterator over the faces. Its value-type is `Face`. typedef unspecified_type Face_const_iterator; /// @} diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosDcelFace.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosDcelFace.h index dc3fa8f8674..c7577f1722f 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosDcelFace.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosDcelFace.h @@ -10,147 +10,145 @@ * in its interior. A planar face may have only one outer CCBs and its inner * CCBs are referred to as holes. * - * \sa `ArrangementDcel` - * \sa `ArrangementDcelVertex` - * \sa `ArrangementDcelHalfedge` + * \sa `AosDcel` + * \sa `AosDcelVertex` + * \sa `AosDcelHalfedge` */ -class ArrangementDcelFace { +class AosDcelFace { public: + /// \name Types + /// The non-mutable iterators `Outer_ccb_const_iterator`, + /// `Inner_ccb_const_iterator`, `Hole_const_iterator`, and + /// `Isolated_vertex_const_iterator` are also defined. + /// @{ -/// \name Types -/// The non-mutable iterators `Outer_ccb_const_iterator`, -/// `Inner_ccb_const_iterator`, `Hole_const_iterator`, and -/// `Isolated_vertex_const_iterator` are also defined. -/// @{ + /*! the corresponding \dcel vertex type. */ + typedef unspecified_type Vertex; -/*! the corresponding \dcel vertex type. */ -typedef unspecified_type Vertex; + /*! the corresponding \dcel halfedge type. */ + typedef unspecified_type Halfedge; -/*! the corresponding \dcel halfedge type. */ -typedef unspecified_type Halfedge; + /*! a bidirectional iterator over the outer CCBs of the face. Its value-type + * is `Halfedge*`. + */ + typedef unspecified_type Outer_ccb_iterator; -/*! a bidirectional iterator over the outer CCBs of the face. Its value-type - * is `Halfedge*`. - */ -typedef unspecified_type Outer_ccb_iterator; + /*! a bidirectional iterator over the inner CCBs of the face. Its value-type + * is `Halfedge*`. + */ + typedef unspecified_type Inner_ccb_iterator; -/*! a bidirectional iterator over the inner CCBs of the face. Its value-type - * is `Halfedge*`. - */ -typedef unspecified_type Inner_ccb_iterator; + /*! a bidirectional iterator over the holes (i.e., inner CCBs) of the face. Its + * value-type is `Halfedge*`. + */ + typedef unspecified_type Hole_iterator; -/*! a bidirectional iterator over the holes (i.e., inner CCBs) of the face. Its - * value-type is `Halfedge*`. - */ -typedef unspecified_type Hole_iterator; + /*! a bidirectional iterator over the isolated vertices in inside the face. + * Its value-type is `Vertex*`. + */ + typedef unspecified_type Isolated_vertex_iterator; -/*! a bidirectional iterator over the isolated vertices in inside the face. - * Its value-type is `Vertex*`. - */ -typedef unspecified_type Isolated_vertex_iterator; + /// @} -/// @} + /// \name Creation + /// @{ -/// \name Creation -/// @{ + /*! default constructor. */ + Arr_dcel_face(); -/*! default constructor. */ -Arr_dcel_face(); + /*! assigns `f` with the contents of the `other` face. */ + void assign(const Self& other); -/*! assigns `f` with the contents of the `other` face. */ -void assign(const Self& other); + /// @} -/// @} + /// \name Access Functions + /// All functions below also have `const` counterparts, returning + /// non-mutable pointers or iterators: + /// @{ -/// \name Access Functions -/// All functions below also have `const` counterparts, returning -/// non-mutable pointers or iterators: -/// @{ + /*! determines whether the face is unbounded. */ + bool is_unbounded() const; -/*! determines whether the face is unbounded. */ -bool is_unbounded() const; + /*! obtains an incident halfedge along the outer boundaries of the face. If + * `f` has no outer boundary, the function returns `nullptr`. + */ + Halfedge* halfedge(); -/*! obtains an incident halfedge along the outer boundaries of the face. If `f` - * has no outer boundary, the function returns `nullptr`. - */ -Halfedge* halfedge(); + /*! obtains the number of outer CCBs of `f`. In case of planar arrangement + * this is either 0 or 1. + */ + size_t number_of_outer_ccbs() const; -/*! obtains the number of outer CCBs of `f`. In case of planar arrangement - * this is either 0 or 1. - */ -size_t number_of_outer_ccbs() const; + /*! obtains a begin iterator for the outer CCBs of `f`. */ + Outer_ccb_iterator outer_ccbs_begin(); -/*! obtains a begin iterator for the outer CCBs of `f`. */ -Outer_ccb_iterator outer_ccbs_begin(); + /*! obtains a past-the-end iterator for the outer CCBs of `f`. */ + Outer_ccb_iterator outer_ccbs_end(); -/*! obtains a past-the-end iterator for the outer CCBs of `f`. */ -Outer_ccb_iterator outer_ccbs_end(); + /*! obtains the number of inner CCBs of `f`. */ + size_t number_of_inner_ccbs() const; -/*! obtains the number of inner CCBs of `f`. */ -size_t number_of_inner_ccbs() const; + /*! obtains a begin iterator for the inner CCBs of `f`. */ + Inner_ccb_iterator inner_ccbs_begin(); -/*! obtains a begin iterator for the inner CCBs of `f`. */ -Inner_ccb_iterator inner_ccbs_begin(); + /*! obtains a past-the-end iterator for the inner CCBs of `f`. */ + Inner_ccb_iterator inner_ccbs_end(); -/*! obtains a past-the-end iterator for the inner CCBs of `f`. */ -Inner_ccb_iterator inner_ccbs_end(); + /*! obtains the number of holes (i.e., inner CCBs) inside `f`. */ + size_t number_of_holes() const; -/*! obtains the number of holes (i.e., inner CCBs) inside `f`. */ -size_t number_of_holes() const; + /*! obtains a begin-iterator for the holes (i.e., inner CCBs) of `f`. */ + Hole_iterator holes_begin(); -/*! obtains a begin-iterator for the holes (i.e., inner CCBs) of `f`. */ -Hole_iterator holes_begin(); + /*! obtains a past-the-end iterator for the holes (i.e., inner CCBs) of `f`. */ + Hole_iterator holes_end(); -/*! obtains a past-the-end iterator for the holes (i.e., inner CCBs) of `f`. */ -Hole_iterator holes_end(); + /*! obtains the number of isolated vertices inside `f`. */ + size_t number_of_isolated_vertices() const; -/*! obtains the number of isolated vertices inside `f`. */ -size_t number_of_isolated_vertices() const; + /*! obtains a begin-iterator for the isolated vertices inside `f`. */ + Isolated_vertex_iterator isolated_vertices_begin(); -/*! obtains a begin-iterator for the isolated vertices inside `f`. */ -Isolated_vertex_iterator isolated_vertices_begin(); + /*! obtains a past-the-end iterator for the isolated vertices inside `f`. */ + Isolated_vertex_iterator isolated_vertices_end(); -/*! obtains a past-the-end iterator for the isolated vertices inside `f`. */ -Isolated_vertex_iterator isolated_vertices_end(); + /// @} -/// @} + /// \name Modifiers + /// @{ -/// \name Modifiers -/// @{ + /*! sets the face as unbounded (if `flag` is `true`), or as a bounded face + * (if it is `false`). + */ + void set_unbounded(bool flag); -/*! sets the face as unbounded (if `flag` is `true`), or as a bounded face - * (if it is `false`). - */ -void set_unbounded(bool flag); + /*! sets the incident halfedge. */ + void set_halfedge(Halfedge* e); -/*! sets the incident halfedge. */ -void set_halfedge(Halfedge* e); + /*! adds `e` as an outer CCB of `f`. */ + void add_outer_ccb(Halfedge* e); -/*! adds `e` as an outer CCB of `f`. */ -void add_outer_ccb(Halfedge* e); + /*! removes the outer CCB that `it` points to from `f`. */ + void erase_outer_ccb(Outer_ccb_iterator it); -/*! removes the outer CCB that `it` points to from `f`. */ -void erase_outer_ccb(Outer_ccb_iterator it); + /*! adds `e` as an inner CCB of `f`. */ + void add_inner_ccb(Halfedge* e); -/*! adds `e` as an inner CCB of `f`. */ -void add_inner_ccb(Halfedge* e); + /*! removes the inner CCB that `it` points to from `f`. */ + void erase_inner_ccb(Inner_ccb_iterator it); -/*! removes the inner CCB that `it` points to from `f`. */ -void erase_inner_ccb(Inner_ccb_iterator it); + /*! adds `e` as a hole (i.e., inner CCB) of `f`. */ + void add_hole(Halfedge* e); -/*! adds `e` as a hole (i.e., inner CCB) of `f`. */ -void add_hole(Halfedge* e); + /*! removes the hole (i.e., inner CCB) that `it` points to from `f`. */ + void erase_hole(Hole_iterator it); -/*! removes the hole (i.e., inner CCB) that `it` points to from `f`. */ -void erase_hole(Hole_iterator it); + /*! adds `v` as an isolated vertex inside `f`. */ + void add_isolated_vertex(Vertex* v); -/*! adds `v` as an isolated vertex inside `f`. */ -void add_isolated_vertex(Vertex* v); + /*! removes the isolated vertex that `it` points to from inside `f`. */ + void erase_isolated_vertex(Isolated_vertex_iterator it); -/*! removes the isolated vertex that `it` points to from inside `f`. */ -void erase_isolated_vertex(Isolated_vertex_iterator it); - -/// @} - -}; /* end ArrangementDcelFace */ + /// @} +}; /* end AosDcelFace */ diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosDcelInnerCcb.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosDcelInnerCcb.h index ae984d9f836..3c436b30ac3 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosDcelInnerCcb.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosDcelInnerCcb.h @@ -5,56 +5,52 @@ * stores the face that contains the hole in its interior, along with an * iterator for the hole in the holes' container of this face. * - * \sa `ArrangementDcel` - * \sa `ArrangementDcelFace` - * + * \sa `AosDcel` + * \sa `AosDcelFace` */ -class ArrangementDcelInnerCcb { +class AosDcelInnerCcb { public: + /// \name Types + /// @{ -/// \name Types -/// @{ + /*! the corresponding Dcel face type. */ + typedef unspecified_type Face; -/*! the corresponding Dcel face type. */ -typedef unspecified_type Face; + /*! + */ + typedef Face::InnerCcb_iterator InnerCcb_iterator; -/*! + /// @} -*/ -typedef Face::InnerCcb_iterator InnerCcb_iterator; + /// \name Creation + /// @{ -/// @} + /*! default constructor. */ + Arr_dcel_hole(); -/// \name Creation -/// @{ + /// @} -/*! default constructor. */ -Arr_dcel_hole(); + /// \name Access Functions + /// All functions below also have `const` counterparts, returning non-mutable pointers or iterators: + /// @{ -/// @} + /*! returns the incident face, which contains `ho` in its interior. */ + Face* face(); -/// \name Access Functions -/// All functions below also have `const` counterparts, returning non-mutable pointers or iterators: -/// @{ + /*! returns an iterator for the hole. */ + InnerCcb_iterator iterator(); -/*! returns the incident face, which contains `ho` in its interior. */ -Face* face(); + /// @} -/*! returns an iterator for the hole. */ -InnerCcb_iterator iterator(); + /// \name Modifiers + /// @{ -/// @} + /*! sets the incident face. */ + void set_face(Face* f); -/// \name Modifiers -/// @{ + /*! sets the hole iterator. */ + void set_iterator(InnerCcb_iterator it); -/*! sets the incident face. */ -void set_face(Face* f); - -/*! sets the hole iterator. */ -void set_iterator(InnerCcb_iterator it); - -/// @} - -}; /* end ArrangementDcelInnerCcb */ + /// @} +}; /* end AosDcelInnerCcb */ diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosDcelIsolatedVertex.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosDcelIsolatedVertex.h index 633747e65fd..495e2e89076 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosDcelIsolatedVertex.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosDcelIsolatedVertex.h @@ -1,77 +1,62 @@ +/*! \ingroup PkgArrangementOnSurface2ConceptsDCEL + * \cgalConcept + * + * An isolated vertex-information record in a \dcel data structure, which stores + * the face that contains the isolated vertex in its interior, along with an + * iterator for the isolated vertex in the isolated vertices' container of this + * face. + * + * \sa `AosDcel` + * \sa `AosDcelFace` + */ -/*! -\ingroup PkgArrangementOnSurface2ConceptsDCEL -\cgalConcept - -An isolated vertex-information record in a \dcel data structure, which stores -the face that contains the isolated vertex in its interior, along with an -iterator for the isolated vertex in the isolated vertices' container of this -face. - -\sa `ArrangementDcel` -\sa `ArrangementDcelFace` - -*/ - -class ArrangementDcelIsolatedVertex { +class AosDcelIsolatedVertex { public: + /// \name Types + /// @{ -/// \name Types -/// @{ + /// the corresponding \dcel face type. + typedef unspecified_type Face; -/*! -the corresponding \dcel face type. -*/ -typedef unspecified_type Face; + /// + typedef Face::Isolated_vertex_iterator Isolated_vertex_iterator; -/*! + /// @} -*/ -typedef Face::Isolated_vertex_iterator Isolated_vertex_iterator; + /// \name Creation + /// @{ -/// @} + /*! default constructor. + */ + Arr_dcel_isolated_vertex(); -/// \name Creation -/// @{ + /// @} -/*! -default constructor. -*/ -Arr_dcel_isolated_vertex(); + /// \name Access Functions + /// All functions below also have `const` counterparts, returning + /// non-mutable pointers or iterators: + /// @{ -/// @} + /*! returns the incident face, which contains `iv` in its interior. + */ + Face* face(); -/// \name Access Functions -/// All functions below also have `const` counterparts, returning -/// non-mutable pointers or iterators: -/// @{ + /*! returns an iterator for the isolated vertex. + */ + Isolated_vertex_iterator iterator(); -/*! -returns the incident face, which contains `iv` in its interior. -*/ -Face* face (); + /// @} -/*! -returns an iterator for the isolated vertex. -*/ -Isolated_vertex_iterator iterator(); + /// \name Modifiers + /// @{ -/// @} + /*! sets the incident face. + */ + void set_face(Face* f); -/// \name Modifiers -/// @{ - -/*! -sets the incident face. -*/ -void set_face (Face* f); - -/*! -sets the isolated vertex iterator. -*/ -void set_iterator (Isolated_vertex_iterator it); - -/// @} - -}; /* end ArrangementDcelIsolatedVertex */ + /*! sets the isolated vertex iterator. + */ + void set_iterator(Isolated_vertex_iterator it); + /// @} +}; /* end AosDcelIsolatedVertex */ diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosDcelOuterCcb.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosDcelOuterCcb.h index 8ad9cfa530a..7d87b8431ee 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosDcelOuterCcb.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosDcelOuterCcb.h @@ -1,74 +1,59 @@ - -/*! -\ingroup PkgArrangementOnSurface2ConceptsDCEL -\cgalConcept - -A hole record in a \dcel data structure, which stores the face that contains -the hole in its interior, along with an iterator for the hole in the holes' -container of this face. - -\sa `ArrangementDcel` -\sa `ArrangementDcelFace` - -*/ - -class ArrangementDcelOuterCcb { +/*! \ingroup PkgArrangementOnSurface2ConceptsDCEL + * \cgalConcept + * + * A hole record in a \dcel data structure, which stores the face that contains + * the hole in its interior, along with an iterator for the hole in the holes' + * container of this face. + * + * \sa `AosDcel` + * \sa `AosDcelFace` + */ +class AosDcelOuterCcb { public: + /// \name Types + /// @{ -/// \name Types -/// @{ + /// the corresponding \dcel face type. + typedef unspecified_type Face; -/*! -the corresponding \dcel face type. -*/ -typedef unspecified_type Face; + /// + typedef Face::OuterCcb_iterator OuterCcb_iterator; -/*! + /// @} -*/ -typedef Face::OuterCcb_iterator OuterCcb_iterator; + /// \name Creation + /// @{ -/// @} + /*! default constructor. + */ + Arr_dcel_hole(); -/// \name Creation -/// @{ + /// @} -/*! -default constructor. -*/ -Arr_dcel_hole(); + /// \name Access Functions + /// All functions below also have `const` counterparts, returning non-mutable pointers or iterators: + /// @{ -/// @} + /*! returns the incident face, which contains `ho` in its interior. + */ + Face* face(); -/// \name Access Functions -/// All functions below also have `const` counterparts, returning non-mutable pointers or iterators: -/// @{ + /*! returns an iterator for the hole. + */ + OuterCcb_iterator iterator(); -/*! -returns the incident face, which contains `ho` in its interior. -*/ -Face* face (); + /// @} -/*! -returns an iterator for the hole. -*/ -OuterCcb_iterator iterator(); + /// \name Modifiers + /// @{ -/// @} + /*! sets the incident face. + */ + void set_face(Face* f); -/// \name Modifiers -/// @{ + /*! sets the hole iterator. + */ + void set_iterator(OuterCcb_iterator it); -/*! -sets the incident face. -*/ -void set_face (Face* f); - -/*! -sets the hole iterator. -*/ -void set_iterator (OuterCcb_iterator it); - -/// @} - -}; /* end ArrangementDcelOuterCcb */ + /// @} +}; /* end AosDcelOuterCcb */ diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosDcelVertex.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosDcelVertex.h index d4eb01ee7c3..be6f92b4b70 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosDcelVertex.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosDcelVertex.h @@ -1,140 +1,117 @@ - -/*! -\ingroup PkgArrangementOnSurface2ConceptsDCEL -\cgalConcept - -A vertex record in a \dcel data structure. A vertex is always associated -with a point. However, the vertex record only stores a pointer to the -associated point, and the actual `Point` object is stored elsewhere. - -A vertex usually has several halfedges incident to it, such that it is -possible to access one of these halfedges directly and to traverse all -incident halfedges around the vertex. However, the \dcel may also contain -isolated vertices that have no incident halfedges. In this case, the vertex -stores an isolated vertex-information record, indicating the face that -contains this vertex in its interior. - -\sa `ArrangementDcel` -\sa `ArrangementDcelHalfedge` -\sa `ArrangementDcelIsolatedVertex` - -*/ - -class ArrangementDcelVertex { +/*! \ingroup PkgArrangementOnSurface2ConceptsDCEL + * \cgalConcept + * + * A vertex record in a \dcel data structure. A vertex is always associated + * with a point. However, the vertex record only stores a pointer to the + * associated point, and the actual `Point` object is stored elsewhere. + * + * A vertex usually has several halfedges incident to it, such that it is + * possible to access one of these halfedges directly and to traverse all + * incident halfedges around the vertex. However, the \dcel may also contain + * isolated vertices that have no incident halfedges. In this case, the vertex + * stores an isolated vertex-information record, indicating the face that + * contains this vertex in its interior. + * + * \sa `AosDcel` + * \sa `AosDcelHalfedge` + * \sa `AosDcelIsolatedVertex` + */ +class AosDcelVertex { public: + /// \name Types + /// @{ -/// \name Types -/// @{ + /// the corresponding \dcel halfedge type. + typedef unspecified_type Halfedge; -/*! -the corresponding \dcel halfedge type. -*/ -typedef unspecified_type Halfedge; + /// the corresponding \dcel isolated vertex-information type. + typedef unspecified_type Isolated_vertex; -/*! -the corresponding \dcel isolated -vertex-information type. -*/ -typedef unspecified_type Isolated_vertex; + /// the point type associated with the vertex. + typedef unspecified_type Point; -/*! -the point type associated with the vertex. -*/ -typedef unspecified_type Point; + /// @} -/// @} + /// \name Creation + /// @{ -/// \name Creation -/// @{ + /*! default constructor. + */ + Arr_dcel_vertex(); -/*! -default constructor. -*/ -Arr_dcel_vertex(); + /*! assigns `v` with the contents of the `other` vertex. + */ + void assign(const Self& other); -/*! -assigns `v` with the contents of the `other` vertex. -*/ -void assign (const Self& other); + /// @} -/// @} + /// \name Access Functions + /// All functions below also have `const` counterparts, returning + /// non-mutable pointers or references: + /// @{ -/// \name Access Functions -/// All functions below also have `const` counterparts, returning -/// non-mutable pointers or references: -/// @{ + /*! returns whether the vertex is isolated (has no incident halfedges). + */ + bool is_isolated() const; -/*! -returns whether the vertex is isolated (has no incident halfedges). -*/ -bool is_isolated() const; + /*! returns an incident halfedge that has `v` as its target. + * + * \pre `v` is not an isolated vertex. + */ + Halfedge* halfedge(); -/*! -returns an incident halfedge that has `v` as its target. -\pre `v` is not an isolated vertex. -*/ -Halfedge* halfedge(); + /*! returns the isolated vertex-information record. + * + * \pre `v` is an isolated vertex. + */ + Isolated_vertex* isolated_vertex(); -/*! -returns the isolated vertex-information record. -\pre `v` is an isolated vertex. -*/ -Isolated_vertex* isolated_vertex(); + /*! returns whether the vertex is not associated with a valid point + * (i.e.\ it lies at infinity). + */ + bool has_null_point() const; -/*! -returns whether the vertex is not associated with a valid point (i.e.\ it -lies at infinity). -*/ -bool has_null_point () const; + /*! returns the associated point. + * + * \pre `v`() is associated with a valid point. + */ + Point& point(); -/*! -returns the associated point. -\pre `v`() is associated with a valid point. -*/ -Point& point(); + /*! returns the placement of the \f$x\f$-coordinate in the parameter space, + * that is, either the left boundary-side, the interior, or the right + * boundary-side. + */ + Arr_parameter_space parameter_space_in_x() const; -/*! -returns the placement of the \f$ x\f$-coordinate in the parameter space, -that is, either the left boundary-side, the interior, or the right -boundary-side. -*/ -Arr_parameter_space parameter_space_in_x () const; + /*! returns the placement of the \f$y\f$-coordinate in the parameter space, + * that is, either the bottom boundary-side, the interior, or the top + * boundary-side. + */ + Arr_parameter_space parameter_space_in_y() const; -/*! -returns the placement of the \f$ y\f$-coordinate in the parameter space, -that is, either the bottom boundary-side, the interior, or the top -boundary-side. -*/ -Arr_parameter_space parameter_space_in_y () const; + /// @} -/// @} + /// \name Modifiers + /// @{ -/// \name Modifiers -/// @{ + /*! sets the incident halfedge, marking `v` as a regular vertex. + */ + void set_halfedge(Halfedge* e); -/*! -sets the incident halfedge, marking `v` as a regular vertex. -*/ -void set_halfedge (Halfedge* e); + /*! sets the isolated vertex-information record, marking `v` + * as an isolated vertex. + */ + void set_isolated_vertex(Isolated_vertex* iv); -/*! -sets the isolated vertex-information record, marking `v` -as an isolated vertex. -*/ -void set_isolated_vertex (Isolated_vertex* iv); + /*! sets the associated point. + */ + void set_point(Point* p); -/*! -sets the associated point. -*/ -void set_point (Point* p); - -/*! -sets `v` as a vertex on a boundary side. -\pre Either `inf_x` or `inf_y` is not `ARR_INTERIOR`. -*/ -void set_boundary (Arr_parameter_space inf_x, Arr_parameter_space inf_y); - -/// @} - -}; /* end ArrangementDcelVertex */ + /*! sets `v` as a vertex on a boundary side. + * + * \pre Either `inf_x` or `inf_y` is not `ARR_INTERIOR`. + */ + void set_boundary(Arr_parameter_space inf_x, Arr_parameter_space inf_y); + /// @} +}; /* end AosDcelVertex */ diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosDcelWithRebind.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosDcelWithRebind.h index 5d1c38474a6..4aa18530dee 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosDcelWithRebind.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosDcelWithRebind.h @@ -1,51 +1,44 @@ - -/*! -\ingroup PkgArrangementOnSurface2ConceptsDCEL -\cgalConcept - -The concept `ArrangementDcelWithRebind` refines the `ArrangementDcel` concept by adding -a policy clone idiom in form of a rebind struct-template. - -Instantiate a dcel class with many different possible types without ad-hoc limitations on type of the dcel classes. - -\cgalRefines{ArrangementDcel} - -\cgalHasModelsBegin -\cgalHasModels{CGAL::Arr_default_dcel} -\cgalHasModels{CGAL::Arr_dcel} -\cgalHasModels{CGAL::Arr_face_extended_dcel} -\cgalHasModels{CGAL::Arr_extended_dcel} -\cgalHasModelsEnd - -*/ - -class ArrangementDcelWithRebind { +/*! \ingroup PkgArrangementOnSurface2ConceptsDCEL + * \cgalConcept + * + * The concept `AosDcelWithRebind` refines the `AosDcel` concept by adding + * a policy clone idiom in form of a rebind struct-template. + * + * Instantiate a \dcel class with many different possible types without ad-hoc + * limitations on type of the \dcel classes. + * + * \cgalRefines{AosDcel} + * + * \cgalHasModelsBegin + * \cgalHasModels{CGAL::Arr_default_dcel} + * \cgalHasModels{CGAL::Arr_dcel} + * \cgalHasModels{CGAL::Arr_face_extended_dcel} + * \cgalHasModels{CGAL::Arr_extended_dcel} + * \cgalHasModelsEnd + */ +class AosDcelWithRebind { public: + /// \name Types + /// @{ -/// \name Types -/// @{ + /*! allows the instantiation of a model of the base concept + * `AosDcel` with a different possible geometry-traits + class without ad-hoc limitations on it. + * + * Following the standard clone policy, the rebind struct-template must + * have a nested type named `other` that defines the type of the + * model replica. + */ + typedef unspecified_type template rebind; -/*! -allows the instantiation of a model of the base concept -`ArrangementDcel` with a different possible geometry-traits -class without ad-hoc limitations on it. + /// @} -Following the standard clone policy, the rebind struct-template must -have a nested type named `other` that defines the type of the -model replica. -*/ -typedef unspecified_type template rebind; + /// \name Creation + /// @{ -/// @} + /*! constructs an empty \dcel with one unbounded face. + */ + Arr_dcel(); -/// \name Creation -/// @{ - -/*! -constructs an empty \dcel with one unbounded face. -*/ -Arr_dcel(); - -/// @} - -}; /* end ArrangementDcelWithRebind */ + /// @} +}; /* end AosDcelWithRebind */ diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosHorizontalSideTraits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosHorizontalSideTraits_2.h index e28c300acea..baa038464c5 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosHorizontalSideTraits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosHorizontalSideTraits_2.h @@ -1,7 +1,7 @@ /*! \ingroup PkgArrangementOnSurface2ConceptsTraits * \cgalConcept * - * `ArrangementHorizontalSideTraits_2` is an abstract concept. It generalizes + * `AosHorizontalSideTraits_2` is an abstract concept. It generalizes * all concepts that handle curves that either reach or approach either the * bottom or top sizeds of the boundary of the parameter space. (An "abstract" * concept is a concept that is useless on its own.) Only a combination of this @@ -9,7 +9,7 @@ * approach the remaining boundary sides (that is, left and right) are * purposeful, and can have models. * - * \cgalRefines{ArrangementBasicTraits_2} + * \cgalRefines{AosBasicTraits_2} * * \cgalHasModelsBegin * \cgalHasModels{CGAL::Arr_linear_traits_2} @@ -18,12 +18,10 @@ * \cgalHasModels{CGAL::Arr_geodesic_arc_on_sphere_traits_2} * \cgalHasModelsEnd * - * \sa `ArrangementVerticalSideTraits_2` + * \sa `AosVerticalSideTraits_2` */ - -class ArrangementHorizontalSideTraits_2 { +class AosHorizontalSideTraits_2 { public: - /// \name Categories /// @{ /// @} @@ -35,13 +33,13 @@ public: /// \name Functor Types /// @{ - /// models the concept `ArrTraits::ParameterSpaceInY_2`. + /// models the concept `AosTraits::ParameterSpaceInY_2`. typedef unspecified_type Parameter_space_in_y_2; - /// models the concept `ArrTraits::CompareXOnBoundaryOfCurveEnd_2`. + /// models the concept `AosTraits::CompareXOnBoundaryOfCurveEnd_2`. typedef unspecified_type Compare_x_on_boundary_2; - /// models the concept `ArrTraits::CompareXNearBoundary_2`. + /// models the concept `AosTraits::CompareXNearBoundary_2`. typedef unspecified_type Compare_x_near_boundary_2; /// @} @@ -53,4 +51,4 @@ public: Compare_x_near_boundary_2 compare_x_near_boundary_2_object() const; /// @} -}; /* end ArrangementHorizontalSideTraits_2 */ +}; /* end AosHorizontalSideTraits_2 */ diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosIdentifiedHorizontalTraits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosIdentifiedHorizontalTraits_2.h index 1e8603639d0..c95b6ee47d9 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosIdentifiedHorizontalTraits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosIdentifiedHorizontalTraits_2.h @@ -1,23 +1,22 @@ /*! \ingroup PkgArrangementOnSurface2ConceptsTraits * \cgalConcept * - * A model of the concept `ArrangementIdentifiedHorizontalTraits_2` must be used + * A model of the concept `AosIdentifiedHorizontalTraits_2` must be used * when the parameter space of the surface, the arrangement is embedded on, is * identified on the bottom and top sides and curves inserted into the * arrangement are expected to reach these boundary sides. * - * \cgalRefines{ArrangementBasicTraits_2} + * \cgalRefines{AosBasicTraits_2} * - * \sa `ArrangementIdentifiedVerticalTraits_2`, - * `ArrangementOpenBottomTraits_2`, - * `ArrangementClosedBottomTraits_2`, and - * `ArrangementContractedBottomTraits_2` - * `ArrangementOpenTopTraits_2`, - * `ArrangementClosedTopTraits_2`, and - * `ArrangementContractedTopTraits_2` + * \sa `AosIdentifiedVerticalTraits_2` + * \sa `AosOpenBottomTraits_2` + * \sa `AosClosedBottomTraits_2` + * \sa `AosContractedBottomTraits_2` + * \sa `AosOpenTopTraits_2` + * \sa `AosClosedTopTraits_2` + * \sa `AosContractedTopTraits_2` */ - -class ArrangementIdentifiedHorizontalTraits_2 { +class AosIdentifiedHorizontalTraits_2 { public: /// \name Categories /// @{ @@ -34,10 +33,10 @@ public: /// \name Functor Types /// @{ - /// models the concept `ArrTraits::CompareXOnBoundary_2`. + /// models the concept `AosTraits::CompareXOnBoundary_2`. typedef unspecified_type Compare_x_on_boundary_2; - /// models the concept `ArrTraits::IsOnXIdentification_2`. + /// models the concept `AosTraits::IsOnXIdentification_2`. typedef unspecified_type Is_on_x_identification_2; /// @} diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosIdentifiedVerticalTraits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosIdentifiedVerticalTraits_2.h index f42663dd8da..493596fbf18 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosIdentifiedVerticalTraits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosIdentifiedVerticalTraits_2.h @@ -1,23 +1,22 @@ /*! \ingroup PkgArrangementOnSurface2ConceptsTraits * \cgalConcept * - * A model of the concept `ArrangementIdentifiedVerticalTraits_2` must be used - * when the parameter space of the surface, the arrangement is embedded on, is - * identified on the left and right sides and curves inserted into the + * A model of the concept `AosIdentifiedVerticalTraits_2` must be used + * when the parameter space of the surface, the arrangement is embedded on, + * is identified on the left and right sides and curves inserted into the * arrangement are expected to reach these boundary sides. * - * \cgalRefines{ArrangementBasicTraits_2} + * \cgalRefines{AosBasicTraits_2} * - * \sa `ArrangementIdentifiedHorizontalTraits_2`, - * `ArrangementOpenLeftTraits_2`, - * `ArrangementClosedLeftTraits_2`, and - * `ArrangementContractedLeftTraits_2` - * `ArrangementOpenRightTraits_2`, - * `ArrangementClosedRightTraits_2`, and - * `ArrangementContractedRightTraits_2` + * \sa `AosIdentifiedHorizontalTraits_2` + * \sa `AosOpenLeftTraits_2` + * \sa `AosClosedLeftTraits_2` + * \sa `AosContractedLeftTraits_2` + * \sa `AosOpenRightTraits_2` + * \sa `AosClosedRightTraits_2` + * \sa `AosContractedRightTraits_2` */ - -class ArrangementIdentifiedVerticalTraits_2 { +class AosIdentifiedVerticalTraits_2 { public: /// \name Categories /// @{ @@ -34,10 +33,10 @@ public: /// \name Functor Types /// @{ - /// models the concept `ArrTraits::CompareYOnBoundary_2`. + /// models the concept `AosTraits::CompareYOnBoundary_2`. typedef unspecified_type Compare_y_on_boundary_2; - /// models the concept `ArrTraits::IsOnYIdentification_2`. + /// models the concept `AosTraits::IsOnYIdentification_2`. typedef unspecified_type Is_on_y_identification_2; /// @} diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosInputFormatter.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosInputFormatter.h index 286b02727ad..daf23668c41 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosInputFormatter.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosInputFormatter.h @@ -1,7 +1,7 @@ /*! \ingroup PkgArrangementOnSurface2Concepts * \cgalConcept * - * A model for the `ArrangementInputFormatter` concept supports a set of + * A model for the `AosInputFormatter` concept supports a set of * functions that enable reading an arrangement from an input stream using a * specific format. * @@ -10,195 +10,193 @@ * \cgalHasModels{CGAL::Arr_face_extended_text_formatter} * \cgalHasModels{CGAL::Arr_extended_dcel_text_formatter} * \cgalHasModelsEnd - * */ - -class ArrangementInputFormatter { +class AosInputFormatter { public: + /// \name Types + /// @{ -/// \name Types -/// @{ + /// the type of arrangement to input. + typedef unspecified_type Arrangement_2; -/*! the type of arrangement to input. */ -typedef unspecified_type Arrangement_2; + /// the point type. + typedef typename Arrangement_2::Point_2 Point_2; -/*! the point type. */ -typedef typename Arrangement_2::Point_2 Point_2; + /// the \f$x\f$-monotone curve type. + typedef typename Arrangement_2::X_monotone_curve_2 X_monotone_curve_2; -/*! the \f$ x\f$-monotone curve type. */ -typedef typename Arrangement_2::X_monotone_curve_2 X_monotone_curve_2; + /// + typedef typename Arrangement_2::Size Size; -/*! */ -typedef typename Arrangement_2::Size Size; + /// + typedef typename Arrangement_2::Vertex_handle Vertex_handle; -/*! */ -typedef typename Arrangement_2::Vertex_handle Vertex_handle; + /// + typedef typename Arrangement_2::Halfedge_handle Halfedge_handle; -/*! */ -typedef typename Arrangement_2::Halfedge_handle Halfedge_handle; + /// + typedef typename Arrangement_2::Face_handle Face_handle; -/*! */ -typedef typename Arrangement_2::Face_handle Face_handle; + /// @} -/// @} + /// \name Creation + /// @{ -/// \name Creation -/// @{ + /*! default constructor. + */ + Arr_in_formatter(); -/*! -default constructor. -*/ -Arr_in_formatter(); + /*! constructs a formatter that reads from `is`. + */ + Arr_in_formatter(std::istream& is); -/*! -constructs a formatter that reads from `is`. -*/ -Arr_in_formatter(std::istream& is); + /*! directs `inf` to read from `is`. + */ + void set_in(std::istream& is); -/*! -directs `inf` to read from `is`. -*/ -void set_in(std::istream& is); + /// @} -/// @} + /// \name Access Functions + /// @{ -/// \name Access Functions -/// @{ + /*! returns the stream that `inf` reads from. + * \pre `inf` is directed to a valid output stream. + */ + std::istream& in(); -/*! returns the stream that `inf` reads from. - * \pre `inf` is directed to a valid output stream. - */ -std::istream& in(); + /// @} -/// @} + /// \name Formatted Input Functions + /// @{ -/// \name Formatted Input Functions -/// @{ + /*! reads a message indicating the beginning of the arrangement. */ + void read_arrangement_begin(); -/*! reads a message indicating the beginning of the arrangement. */ -void read_arrangement_begin(); + /*! reads a message indicating the end of the arrangement. */ + void read_arrangement_end(); -/*! reads a message indicating the end of the arrangement. */ -void read_arrangement_end(); + /*! reads a size value, which is supposed to be preceded by the given label. + */ + Size read_size(const char *label = nullptr); -/*! reads a size value, which is supposed to be preceded by the given label. */ -Size read_size(const char *label = nullptr); + /*! reads a message indicating the beginning of the vertex records. */ + void read_vertices_begin(); -/*! reads a message indicating the beginning of the vertex records. */ -void read_vertices_begin(); + /*! reads a message indicating the end of the vertex records. */ + void read_vertices_end(); -/*! reads a message indicating the end of the vertex records. */ -void read_vertices_end(); + /*! reads a message indicating the beginning of the edge records. */ + void read_edges_begin(); -/*! reads a message indicating the beginning of the edge records. */ -void read_edges_begin(); + /*! reads a message indicating the end of the edge records. */ + void read_edges_end(); -/*! reads a message indicating the end of the edge records. */ -void read_edges_end(); + /*! reads a message indicating the beginning of the face records. */ + void read_faces_begin(); -/*! reads a message indicating the beginning of the face records. */ -void read_faces_begin(); + /*! reads a message indicating the end of the face records. */ + void read_faces_end(); -/*! reads a message indicating the end of the face records. */ -void read_faces_end(); + /*! reads a message indicating the beginning of a single vertex record. */ + void read_vertex_begin(); -/*! reads a message indicating the beginning of a single vertex record. */ -void read_vertex_begin(); + /*! reads a message indicating the end of a single vertex record. */ + void read_vertex_end(); -/*! reads a message indicating the end of a single vertex record. */ -void read_vertex_end(); + /*! reads and returns a vertex index. */ + std::size_t read_vertex_index(); -/*! reads and returns a vertex index. */ -std::size_t read_vertex_index(); + /*! reads a point. */ + void read_point(Point_2& p); -/*! reads a point. */ -void read_point(Point_2& p); + /*! reads an auxiliary vertex-data object and associates it with the vertex + * `v`. + */ + void read_vertex_data(Vertex_handle v); -/*! reads an auxiliary vertex-data object and associates it with the vertex `v`. - */ -void read_vertex_data(Vertex_handle v); + /*! reads a message indicating the beginning of a single edge record. */ + void read_edge_begin(); -/*! reads a message indicating the beginning of a single edge record. */ -void read_edge_begin(); + /*! reads a message indicating the end of a single edge record. */ + void read_edge_end(); -/*! reads a message indicating the end of a single edge record. */ -void read_edge_end(); + /*! reads and returns halfedge index. */ + std::size_t read_halfedge_index(); -/*! reads and returns halfedge index. */ -std::size_t read_halfedge_index(); + /*! reads an \f$x\f$-monotone curve. */ + void read_x_monotone_curve(X_monotone_curve_2& c); -/*! reads an \f$ x\f$-monotone curve. */ -void read_x_monotone_curve(X_monotone_curve_2& c); + /*! reads an auxiliary halfedge-data object and associates it with the + * halfedge `he`. + */ + void read_halfedge_data(Halfedge_handle he); -/*! reads an auxiliary halfedge-data object and associates it with the halfedge - * `he`. - */ -void read_halfedge_data(Halfedge_handle he); + /*! reads a message indicating the beginning of a single face record. */ + void read_face_begin(); -/*! reads a message indicating the beginning of a single face record. */ -void read_face_begin(); + /*! reads a message indicating the end of a single face record. */ + void read_face_end(); -/*! reads a message indicating the end of a single face record. */ -void read_face_end(); + /*! reads a message indicating the beginning of the container of outer CCBs of + * the current face. + */ + void read_outer_ccbs_begin(); -/*! reads a message indicating the beginning of the container of outer CCBs of - * the current face. - */ -void read_outer_ccbs_begin(); + /*! reads a message indicating the end of of the container of outer CCBs of + * the current face. + */ + void read_outer_ccbs_end(); -/*! reads a message indicating the end of of the container of outer CCBs of the - * current face. - */ -void read_outer_ccbs_end(); + /*! reads a message indicating the beginning of the container of inner CCBs of + * the current face. + */ + void read_inner_ccbs_begin(); -/*! reads a message indicating the beginning of the container of inner CCBs of - * the current face. - */ -void read_inner_ccbs_begin(); + /*! reads a message indicating the end of of the container of inner CCBs of the + * current face. + */ + void read_inner_ccbs_end(); -/*! reads a message indicating the end of of the container of inner CCBs of the - * current face. - */ -void read_inner_ccbs_end(); + /*! reads a message indicating the beginning of the container of outer CCBs of + * the current face. + */ + void read_outer_ccb_begin(); -/*! reads a message indicating the beginning of the container of outer CCBs of - * the current face. - */ -void read_outer_ccb_begin(); + /*! reads a message indicating the end of the outer CCB of the current face. + */ + void read_outer_ccb_end(); -/*! reads a message indicating the end of the outer CCB of the current face. */ -void read_outer_ccb_end(); + /*! reads a message indicating the beginning of the container of holes inside + * the current face. + */ + void read_holes_begin(); -/*! reads a message indicating the beginning of the container of holes inside - * the current face. - */ -void read_holes_begin(); + /*! reads a message indicating the end of the container of holes inside the + * current face. + */ + void read_holes_end(); -/*! reads a message indicating the end of the container of holes inside the - * current face. - */ -void read_holes_end(); + /*! reads a message indicating the beginning a connected component boundary. + */ + void read_ccb_halfedges_begin(); -/*! reads a message indicating the beginning a connected component boundary. */ -void read_ccb_halfedges_begin(); + /*! reads a message indicating the end of a connected component boundary. + */ + void read_ccb_halfedges_end(); -/*! reads a message indicating the end of a connected component boundary. - */ -void read_ccb_halfedges_end(); + /*! reads a message indicating the beginning of the container of isolated + * vertices inside the current face. + */ + void read_isolated_vertices_begin(); -/*! reads a message indicating the beginning of the container of isolated - * vertices inside the current face. - */ -void read_isolated_vertices_begin(); + /*! reads a message indicating the end of the container of isolated vertices + * inside the current face. + */ + void read_isolated_vertices_end(); -/*! reads a message indicating the end of the container of isolated vertices - * inside the current face. - */ -void read_isolated_vertices_end(); + /*! reads an auxiliary face-data object and associates it with the face `f`. + */ + void read_face_data(Face_handle f); -/*! reads an auxiliary face-data object and associates it with the face `f`. */ -void read_face_data(Face_handle f); - -/// @} - -}; /* end ArrangementInputFormatter */ + /// @} +}; /* end AosInputFormatter */ diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosLandmarkTraits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosLandmarkTraits_2.h index 673d553e69d..daf4f0ff873 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosLandmarkTraits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosLandmarkTraits_2.h @@ -1,15 +1,15 @@ /*! \ingroup PkgArrangementOnSurface2ConceptsTraits * \cgalConcept * - * The concept `ArrangementLandmarkTraits_2` refines the traits concepts - * `ArrangementApproximateTraits_2` and - * `ArrangementConstructXMonotoneCurveTraits_2`. The type of an arrangement + * The concept `AosLandmarkTraits_2` refines the traits concepts + * `AosApproximateTraits_2` and + * `AosConstructXMonotoneCurveTraits_2`. The type of an arrangement * associated with the landmark point-location strategy (see * `CGAL::Arr_landmarks_point_location`) must be an instance of the * `CGAL::Arrangement_2` class template, where the Traits parameter * is substituted by a model of this concept. * - * \cgalRefines{ArrangementApproximateTraits_2,ArrangementConstructXMonotoneCurveTraits_2} + * \cgalRefines{AosApproximateTraits_2,AosConstructXMonotoneCurveTraits_2} * * \cgalHasModelsBegin * \cgalHasModels{CGAL::Arr_conic_traits_2} @@ -22,12 +22,11 @@ * \cgalHasModels{CGAL::Arr_rational_function_traits_2} * \cgalHasModelsEnd * - * \sa `ArrangementXMonotoneTraits_2` and - * `ArrangementTraits_2` + * \sa `AosXMonotoneTraits_2` + * \sa `AosTraits_2` */ -class ArrangementLandmarkTraits_2 { +class AosLandmarkTraits_2 { public: - /// \name Types /// @{ /// @} @@ -39,5 +38,4 @@ public: /// \name Accessing Functor Objects /// @{ /// @} - }; diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosLeftSideTraits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosLeftSideTraits_2.h index 3b01d80db4f..a80522d84bf 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosLeftSideTraits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosLeftSideTraits_2.h @@ -1,8 +1,7 @@ -/*! - * \ingroup PkgArrangementOnSurface2ConceptsTraits +/*! \ingroup PkgArrangementOnSurface2ConceptsTraits * \cgalConcept * - * `ArrangementLeftSideTraits_2` is an abstract concept. It generalizes all + * `AosLeftSideTraits_2` is an abstract concept. It generalizes all * concepts that handle curves that either reach or approach the left boundary * side of the parameter space. (An "abstract" concept is a concept that is * useless on its own.) Only a combination of this concept and additional @@ -10,14 +9,14 @@ * boundary sides (that is, right, bottom, and top) are purposeful, and can have * models. * - * \cgalRefines{ArrangementVerticalSideTraits_2} + * \cgalRefines{AosVerticalSideTraits_2} * - * \sa `ArrangementRightSideTraits_2`, - * `ArrangementBottomSideTraits_2`, and - * `ArrangementTopSideTraits_2` + * \sa `AosRightSideTraits_2`, + * `AosBottomSideTraits_2`, and + * `AosTopSideTraits_2` */ -class ArrangementLeftSideTraits_2 { +class AosLeftSideTraits_2 { public: /// \name Categories /// @{ diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosOpenBottomTraits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosOpenBottomTraits_2.h index c53f51ef056..6c3b26de8f6 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosOpenBottomTraits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosOpenBottomTraits_2.h @@ -1,24 +1,23 @@ -/*! - * \ingroup PkgArrangementOnSurface2ConceptsTraits +/*! \ingroup PkgArrangementOnSurface2ConceptsTraits * \cgalConcept * - * A model of the concept `ArrangementOpenBottomTraits_2` must be used when the + * A model of the concept `AosOpenBottomTraits_2` must be used when the * parameter space of the surface, the arrangement is embedded on, is open on * the bottom side and curves inserted into the arrangement are expected to * reach this boundary side. A model of this concept can handle curves that * reach the bottom boundary side when it is open. * - * \cgalRefines{ArrangementBottomSideTraits_2} + * \cgalRefines{AosBottomSideTraits_2} * - * \sa `ArrangementOpenLeftTraits_2`, - * `ArrangementOpenRightTraits_2`, - * `ArrangementOpenTopTraits_2`, - * `ArrangementClosedBottomTraits_2`, - * `ArrangementContractedBottomTraits_2`, and - * `ArrangementIdentifiedHorizontalTraits_2` + * \sa `AosOpenLeftTraits_2`, + * `AosOpenRightTraits_2`, + * `AosOpenTopTraits_2`, + * `AosClosedBottomTraits_2`, + * `AosContractedBottomTraits_2`, and + * `AosIdentifiedHorizontalTraits_2` */ -class ArrangementOpenBottomTraits_2 { +class AosOpenBottomTraits_2 { public: /// \name Categories /// @{ diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosOpenBoundaryTraits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosOpenBoundaryTraits_2.h index 7cce69c075d..246df377069 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosOpenBoundaryTraits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosOpenBoundaryTraits_2.h @@ -1,43 +1,41 @@ /*! \ingroup PkgArrangementOnSurface2ConceptsTraits * \cgalConcept * - * Several predicates are required to handle \f$ x\f$-monotone curves that + * Several predicates are required to handle \f$x\f$-monotone curves that * approach infinity and thus approach the boundary of the parameter * space. These predicates are sufficient to handle not only curves embedded in * an unbounded parameter space, but also curves embedded in a bounded parameter - * space with open boundaries. Models of the concept - * `ArrangementOpenBoundaryTraits_2` handle curves that approach the boundary of - * a parameter space. This concept refines the concept - * `ArrangementBasicTraits_2`. The arrangement template instantiated with a - * traits class that models this concept can handle \f$ x\f$-monotone curves - * that are unbounded in any direction. The concept - * `ArrangementOpenBoundaryTraits_2`, nonetheless, also supports planar \f$ - * x\f$-monotone curves that reach the boundary of an open yet bounded parameter - * space. + * space with open boundaries. Models of the concept `AosOpenBoundaryTraits_2` + * handle curves that approach the boundary of a parameter space. This concept + * refines the concept `AosBasicTraits_2`. The arrangement template instantiated + * with a traits class that models this concept can handle \f$x\f$-monotone + * curves that are unbounded in any direction. The concept + * `AosOpenBoundaryTraits_2`, nonetheless, also supports planar \f$x\f$-monotone + * curves that reach the boundary of an open yet bounded parameter space. * - * An \f$ x\f$-monotone curve may be closed, in which case its endpoints + * An \f$x\f$-monotone curve may be closed, in which case its endpoints * are representable as `Point_2` objects, or open at the boundary of the * parameter space. It can have one open end and one closed end (e.g., a - * ray). The nature of the \f$ x\f$-monotone curves, whether they are expected + * ray). The nature of the \f$x\f$-monotone curves, whether they are expected * to be closed or not at any one of the four boundary-sides, is conveyed * through the definition of the four nested types `Left_side_category`, * `Right_side_category`, `Bottom_side_category`, and `Top_side_category`. If * some curves handled by a model of the concept - * `ArrangementOpenBoundaryTraits_2` are expected to be open on the left, the + * `AosOpenBoundaryTraits_2` are expected to be open on the left, the * nested type `Left_side_category` must be convertible to * `CGAL::Arr_open_side_tag`. Similarly, if some curves handled by the concept * are expected to be open on the right, open at the bottom, or open at the top, * the corresponding nested type must be convertible to * `CGAL::Arr_open_side_tag`. A model of the concept - * `ArrangementOpenBoundaryTraits_2` must have all the four categories + * `AosOpenBoundaryTraits_2` must have all the four categories * convertible to `CGAL::Arr_open_side_tag`.\cgalFootnote{We intend to introduce * more concepts that require only a subset of the categories to be convertible - * to \cgalFootnoteCode{CGAL::Arr_open_side_tag}.} In this case the \dcel of the arrangement - * instantiated with the model is initialized with an implicit bounding - * rectangle. When the parameter space is bounded, it is the exact geometric - * embedding of the implicit bounding rectangle. + * to \cgalFootnoteCode{CGAL::Arr_open_side_tag}.} In this case the \dcel of the + * arrangement instantiated with the model is initialized with an implicit + * bounding rectangle. When the parameter space is bounded, it is the exact + * geometric embedding of the implicit bounding rectangle. * - * \cgalRefines{ArrangementBasicTraits_2} + * \cgalRefines{AosBasicTraits_2} * * \cgalHasModelsBegin * \cgalHasModels{CGAL::Arr_linear_traits_2} @@ -47,27 +45,26 @@ * \cgalHasModels{CGAL::Arr_consolidated_curve_data_traits_2} * \cgalHasModelsEnd * - * \sa `ArrangementBasicTraits_2` - * \sa `ArrangementXMonotoneTraits_2` - * \sa `ArrangementLandmarkTraits_2` - * \sa `ArrangementTraits_2` + * \sa `AosBasicTraits_2` + * \sa `AosXMonotoneTraits_2` + * \sa `AosLandmarkTraits_2` + * \sa `AosTraits_2` */ -class ArrangementOpenBoundaryTraits_2 { +class AosOpenBoundaryTraits_2 { public: - /// \name Categories /// @{ - //! Must be convertible to `CGAL::Arr_open_side_tag`. + /// Must be convertible to `CGAL::Arr_open_side_tag`. typedef unspecified_type Left_side_category; - //! Must be convertible to `CGAL::Arr_open_side_tag`. + /// Must be convertible to `CGAL::Arr_open_side_tag`. typedef unspecified_type Bottom_side_category; - //! Must be convertible to `CGAL::Arr_open_side_tag`. + /// Must be convertible to `CGAL::Arr_open_side_tag`. typedef unspecified_type Top_side_category; - //! Must be convertible to `CGAL::Arr_open_side_tag`. + /// Must be convertible to `CGAL::Arr_open_side_tag`. typedef unspecified_type Right_side_category; /// @} @@ -75,14 +72,14 @@ public: /// \name Functor Types /// @{ - /*! models the concept `ArrTraits::ParameterSpaceInX_2`. Required only if the + /*! models the concept `AosTraits::ParameterSpaceInX_2`. Required only if the * traits class supports unbounded curves that approach the left or the right * sides (the `Left_side_category` or the `Right_side_category` categories are * convertible to `CGAL::Arr_open_side_tag`). */ typedef unspecified_type Parameter_space_in_x_2; - /*! models the concept `ArrTraits::CompareYNearBoundary_2`. + /*! models the concept `AosTraits::CompareYNearBoundary_2`. * Required only if the traits class supports unbounded curves that approach * the left or the right sides (the `Left_side_category` or the * `Right_side_category` categories are convertible to @@ -90,7 +87,7 @@ public: */ typedef unspecified_type Compare_y_near_boundary_2; - /*! models the concept `ArrTraits::ParameterSpaceInY_2`. + /*! models the concept `AosTraits::ParameterSpaceInY_2`. * Required only if the traits class supports unbounded curves that approach * the bottom or the top sides (the `Bottom_side_category` or the * `Top_side_category` categories are convertible to @@ -98,14 +95,14 @@ public: */ typedef unspecified_type Parameter_space_in_y_2; - /*! models the concept `ArrTraits::CompareXOnBoundaryOfCurveEnd_2`. Required + /*! models the concept `AosTraits::CompareXOnBoundaryOfCurveEnd_2`. Required * only if the traits class supports unbounded curves that approach the bottom * or the top sides (the `Bottom_side_category` or the `Top_side_category` * categories are convertible to `CGAL::Arr_open_side_tag`). */ typedef unspecified_type Compare_x_on_boundary_2; - /*! models the concept `ArrTraits::CompareXNearBoundary_2`. Required only if + /*! models the concept `AosTraits::CompareXNearBoundary_2`. Required only if * the traits class supports unbounded curves that approach the bottom or the * top sides (the `Bottom_side_category` or the `Top_side_category` categories * are convertible to `CGAL::Arr_open_side_tag`). @@ -117,21 +114,20 @@ public: /// \name Accessing Functor Objects /// @{ - /*! */ + /// Parameter_space_in_x_2 parameter_space_in_x_2_object() const; - /*! */ + /// Compare_y_near_boundary_2 compare_y_near_boundary_2_object() const; - /*! */ + /// Parameter_space_in_y_2 parameter_space_in_y_2_object() const; - /*! */ + /// Compare_x_on_boundary_2 compare_x_on_boundary_2_object() const; - /*! */ + /// Compare_x_near_boundary_2 compare_x_near_boundary_2_object() const; /// @} - -}; /* end ArrangementOpenBoundaryTraits_2 */ +}; /* end AosOpenBoundaryTraits_2 */ diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosOutputFormatter.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosOutputFormatter.h index bb1846ad8f5..ea79ba8eea2 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosOutputFormatter.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosOutputFormatter.h @@ -1,197 +1,193 @@ - -/*! -\ingroup PkgArrangementOnSurface2Concepts -\cgalConcept - -A model for the `ArrangementOutputFormatter` concept supports a set of functions that enable -writing an arrangement to an output stream using a specific format. - -\cgalHasModelsBegin -\cgalHasModels{CGAL::Arr_text_formatter} -\cgalHasModels{CGAL::Arr_face_extended_text_formatter} -\cgalHasModels{CGAL::Arr_extended_dcel_text_formatter} -\cgalHasModelsEnd - -*/ - -class ArrangementOutputFormatter { +/*! \ingroup PkgArrangementOnSurface2Concepts + * \cgalConcept + * + * A model for the `AosOutputFormatter` concept supports a set of functions that + * enable writing an arrangement to an output stream using a specific format. + * + * \cgalHasModelsBegin + * \cgalHasModels{CGAL::Arr_text_formatter} + * \cgalHasModels{CGAL::Arr_face_extended_text_formatter} + * \cgalHasModels{CGAL::Arr_extended_dcel_text_formatter} + * \cgalHasModelsEnd + */ +class AosOutputFormatter { public: + /// \name Types + /// @{ -/// \name Types -/// @{ + /// the type of arrangement to output. + typedef unspecified_type Arrangement_2; -/*! the type of arrangement to output. */ -typedef unspecified_type Arrangement_2; + /// the point type. + typedef typename Arrangement_2::Point_2 Point_2; -/*! the point type. */ -typedef typename Arrangement_2::Point_2 Point_2; + /// the \f$x\f$-monotone curve type. + typedef typename Arrangement_2::X_monotone_curve_2 X_monotone_curve_2; -/*! the \f$ x\f$-monotone curve type. */ -typedef typename Arrangement_2::X_monotone_curve_2 X_monotone_curve_2; + /// + typedef typename Arrangement_2::Size Size; -/*! */ -typedef typename Arrangement_2::Size Size; + /// + typedef typename Arrangement_2::Vertex_const_handle Vertex_const_handle; -/*! */ -typedef typename Arrangement_2::Vertex_const_handle Vertex_const_handle; + /// + typedef typename Arrangement_2::Halfedge_const_handle Halfedge_const_handle; -/*! */ -typedef typename Arrangement_2::Halfedge_const_handle Halfedge_const_handle; + /// + typedef typename Arrangement_2::Face_const_handle Face_const_handle; -/*! */ -typedef typename Arrangement_2::Face_const_handle Face_const_handle; + /// @} -/// @} + /// \name Creation + /// @{ -/// \name Creation -/// @{ + /*! default constructor. */ + Arr_out_formatter(); -/*! default constructor. */ -Arr_out_formatter(); + /*! constructs a formatter that writes to `os`. */ + Arr_out_formatter(std::ostream& os); -/*! constructs a formatter that writes to `os`. */ -Arr_out_formatter (std::ostream& os); + /*! directs `outf` to write to `os`. */ + void set_out(std::ostream& os); -/*! directs `outf` to write to `os`. */ -void set_out (std::ostream& os); + /// @} -/// @} + /// \name Access Functions + /// @{ -/// \name Access Functions -/// @{ + /*! + returns the stream that `outf` writes to. + \pre `outf` is directed to a valid output stream. + */ + std::ostream& out(); -/*! -returns the stream that `outf` writes to. -\pre `outf` is directed to a valid output stream. -*/ -std::ostream& out (); + /// @} -/// @} + /// \name Formatted Output Functions + /// @{ -/// \name Formatted Output Functions -/// @{ + /*! writes a message indicating the beginning of the arrangement. */ + void write_arrangement_begin(); -/*! writes a message indicating the beginning of the arrangement. */ -void write_arrangement_begin (); + /*! writes a message indicating the end of the arrangement. */ + void write_arrangement_end(); -/*! writes a message indicating the end of the arrangement. */ -void write_arrangement_end (); + /*! writes a size value, preceded by a given label. */ + void write_size(const char *label, Size size); -/*! writes a size value, preceded by a given label. */ -void write_size (const char *label, Size size); + /*! writes a message indicating the beginning of the vertex records. */ + void write_vertices_begin(); -/*! writes a message indicating the beginning of the vertex records. */ -void write_vertices_begin(); + /*! writes a message indicating the end of the vertex records. */ + void write_vertices_end(); -/*! writes a message indicating the end of the vertex records. */ -void write_vertices_end(); + /*! writes a message indicating the beginning of the edge records. */ + void write_edges_begin(); -/*! writes a message indicating the beginning of the edge records. */ -void write_edges_begin(); + /*! writes a message indicating the end of the edge records. */ + void write_edges_end(); -/*! writes a message indicating the end of the edge records. */ -void write_edges_end(); + /*! writes a message indicating the beginning of the face records. */ + void write_faces_begin(); -/*! writes a message indicating the beginning of the face records. */ -void write_faces_begin(); + /*! writes a message indicating the end of the face records. */ + void write_faces_end(); -/*! writes a message indicating the end of the face records. */ -void write_faces_end(); + /*! writes a message indicating the beginning of a single vertex record. */ + void write_vertex_begin(); -/*! writes a message indicating the beginning of a single vertex record. */ -void write_vertex_begin(); + /*! writes a message indicating the end of a single vertex record. */ + void write_vertex_end(); -/*! writes a message indicating the end of a single vertex record. */ -void write_vertex_end(); + /*! writes a vertex index. */ + void write_vertex_index(std::size_t idx); -/*! writes a vertex index. */ -void write_vertex_index (std::size_t idx); + /*! writes a point. */ + void write_point(const Point_2& p); -/*! writes a point. */ -void write_point (const Point_2& p); + /*! writes the auxiliary data associated with the vertex. */ + void write_vertex_data(Vertex_const_handle v); -/*! writes the auxiliary data associated with the vertex. */ -void write_vertex_data (Vertex_const_handle v); + /*! writes a message indicating the beginning of a single edge record. */ + void write_edge_begin(); -/*! writes a message indicating the beginning of a single edge record. */ -void write_edge_begin(); + /*! writes a message indicating the end of a single edge record. */ + void write_edge_end(); -/*! writes a message indicating the end of a single edge record. */ -void write_edge_end(); + /*! writes a halfedge index. */ + void write_halfedge_index(std::size_t idx); -/*! writes a halfedge index. */ -void write_halfedge_index (std::size_t idx); + /*! writes an \f$x\f$-monotone curve. */ + void write_x_monotone_curve(const X_monotone_curve_2& c); -/*! writes an \f$ x\f$-monotone curve. */ -void write_x_monotone_curve (const X_monotone_curve_2& c); + /*! writes the auxiliary data associated with the halfedge. */ + void write_halfedge_data(Halfedge_const_handle he); -/*! writes the auxiliary data associated with the halfedge. */ -void write_halfedge_data (Halfedge_const_handle he); + /*! writes a message indicating the beginning of a single face record. */ + void write_face_begin(); -/*! writes a message indicating the beginning of a single face record. */ -void write_face_begin(); + /*! writes a message indicating the end of a single face record. */ + void write_face_end(); -/*! writes a message indicating the end of a single face record. */ -void write_face_end(); + /*! writes a message indicating the beginning of the container of outer CCBs + * of the current face. + */ + void write_outer_ccbs_begin(); -/*! writes a message indicating the beginning of the container of outer CCBs of - * the current face. - */ -void write_outer_ccbs_begin(); + /*! writes a message indicating the end of the container of outer ccbs of the + * current face. + */ + void write_outer_ccbs_end(); -/*! writes a message indicating the end of the container of outer ccbs of the - * current face. - */ -void write_outer_ccbs_end(); + /*! writes a message indicating the beginning of the container of inner CCBs + * of the current face. + */ + void write_inner_ccbs_begin(); -/*! writes a message indicating the beginning of the container of inner CCBs of - * the current face. - */ -void write_inner_ccbs_begin(); + /*! writes a message indicating the end of the container of inner ccbs of the + * current face. + */ + void write_inner_ccbs_end(); -/*! writes a message indicating the end of the container of inner ccbs of the - * current face. - */ -void write_inner_ccbs_end(); + /*! writes a message indicating the beginning of the outer CCB of the current + * face. + */ + void write_outer_ccb_begin(); -/*! writes a message indicating the beginning of the outer CCB of the current - * face. - */ -void write_outer_ccb_begin(); + /*! writes a message indicating the end of the outer CCB of the current face. + */ + void write_outer_ccb_end(); -/*! writes a message indicating the end of the outer CCB of the current face. */ -void write_outer_ccb_end(); + /*! writes a message indicating the beginning of the container of holes inside + * the current face. + */ + void write_holes_begin(); -/*! writes a message indicating the beginning of the container of holes inside - * the current face. - */ -void write_holes_begin(); + /*! writes a message indicating the end of the container of holes inside the + * current face. + */ + void write_holes_end(); -/*! writes a message indicating the end of the container of holes inside the - * current face. - */ -void write_holes_end(); + /*! writes a message indicating the beginning a connected component's boundary. + */ + void write_ccb_halfedges_begin(); -/*! writes a message indicating the beginning a connected component's boundary. - */ -void write_ccb_halfedges_begin(); + /*! writes a message indicating the end of a connected component's boundary. + */ + void write_ccb_halfedges_end(); -/*! writes a message indicating the end of a connected component's boundary. */ -void write_ccb_halfedges_end(); + /*! writes a message indicating the beginning of the container of isolated + * vertices inside the current face. + */ + void write_isolated_vertices_begin(); -/*! writes a message indicating the beginning of the container of isolated - * vertices inside the current face. - */ -void write_isolated_vertices_begin(); + /*! writes a message indicating the end of the container of isolated vertices + * inside the current face. + */ + void write_isolated_vertices_end(); -/*! writes a message indicating the end of the container of isolated vertices - * inside the current face. - */ -void write_isolated_vertices_end(); + /*! writes the auxiliary data associated with the face. */ + void write_face_data(Face_const_handle f); -/*! writes the auxiliary data associated with the face. */ -void write_face_data (Face_const_handle f); - -/// @} - -}; /* end ArrangementOutputFormatter */ + /// @} +}; /* end AosOutputFormatter */ diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosPointLocation_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosPointLocation_2.h index 5840d853bfe..fe02f149abb 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosPointLocation_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosPointLocation_2.h @@ -1,100 +1,84 @@ - -/*! -\ingroup PkgArrangementOnSurface2Concepts -\cgalConcept - -A model of the `ArrangementPointLocation_2` concept can answer point-location queries on -an arrangement attached to it. Namely, given a `Arrangement_2::Point_2` -object, representing a point in the plane, it returns the arrangement cell -containing it. In the general case, the query point is contained inside an -arrangement face, but in degenerate situations it may lie on an edge or -coincide with an arrangement vertex. - -\cgalHasModelsBegin -\cgalHasModels{CGAL::Arr_naive_point_location} -\cgalHasModels{CGAL::Arr_walk_along_line_point_location} -\cgalHasModels{CGAL::Arr_trapezoid_ric_point_location} -\cgalHasModels{CGAL::Arr_landmarks_point_location} -\cgalHasModelsEnd - -\sa `CGAL::Arr_naive_point_location` -\sa `CGAL::Arr_walk_along_line_point_location` -\sa `CGAL::Arr_trapezoid_ric_point_location` -\sa `CGAL::Arr_landmarks_point_location` -\sa `CGAL::Arr_point_location_result` - -*/ - -class ArrangementPointLocation_2 { +/*! \ingroup PkgArrangementOnSurface2Concepts + * \cgalConcept + * + * A model of the `AosPointLocation_2` concept can answer point-location queries + * on an arrangement attached to it. Namely, given a `Arrangement_2::Point_2` + * object, representing a point in the plane, it returns the arrangement cell + * containing it. In the general case, the query point is contained inside an + * arrangement face, but in degenerate situations it may lie on an edge or + * coincide with an arrangement vertex. + * + * \cgalHasModelsBegin + * \cgalHasModels{CGAL::Arr_naive_point_location} + * \cgalHasModels{CGAL::Arr_walk_along_line_point_location} + * \cgalHasModels{CGAL::Arr_trapezoid_ric_point_location} + * \cgalHasModels{CGAL::Arr_landmarks_point_location} + * \cgalHasModelsEnd + * + * \sa `CGAL::Arr_naive_point_location` + * \sa `CGAL::Arr_walk_along_line_point_location` + * \sa `CGAL::Arr_trapezoid_ric_point_location` + * \sa `CGAL::Arr_landmarks_point_location` + * \sa `CGAL::Arr_point_location_result` + */ +class AosPointLocation_2 { public: + /// \name Types + /// @{ -/// \name Types -/// @{ + //! the associated arrangement type. + typedef unspecified_type Arrangement_2; -/*! -the associated arrangement type. -*/ -typedef unspecified_type Arrangement_2; + //! equivalent to `Arrangement_2::Point_2`. + typedef unspecified_type Point_2; -/*! -equivalent to `Arrangement_2::Point_2`. -*/ -typedef unspecified_type Point_2; + /// @} -/// @} + /// \name Creation + /// @{ -/// \name Creation -/// @{ + /*! default constructor. + */ + AosPointLocation_2(); -/*! -default constructor. -*/ -ArrangementPointLocation_2(); + /*! constructs a point-location object `pl` attached to the given + * arrangement `arr`. + */ + AosPointLocation_2 (const Arrangement_2& arr); -/*! -constructs a point-location object `pl` attached to the given -arrangement `arr`. -*/ -ArrangementPointLocation_2 (const Arrangement_2& arr); + /// @} -/// @} + /// \name Query Functions + /// @{ -/// \name Query Functions -/// @{ + /*! locates the arrangement cell that contains the query point `q` + * and returns a discriminated union container of the following bounded + * types: + * + *
        + *
      • `Arrangement_2::Face_const_handle`, in case `q` is + * contained inside an arrangement face; + *
      • `Arrangement_2::Halfedge_const_handle`, in case `q` lies + * on an arrangement edge; + *
      • `Arrangement_2::Vertex_const_handle`, in case `q` coincides + * with an arrangement vertex. + *
      + * \pre `pl` is attached to a valid arrangement object. + */ + Arr_point_location_result::Type locate(const Point_2& q) const; -/*! -locates the arrangement cell that contains the query point `q` -and returns a discriminated union container of the following bounded -types: + /// @} -
        -
      • `Arrangement_2::Face_const_handle`, in case `q` is -contained inside an arrangement face; -
      • `Arrangement_2::Halfedge_const_handle`, in case `q` lies -on an arrangement edge; -
      • `Arrangement_2::Vertex_const_handle`, in case `q` coincides -with an arrangement vertex. -
      -\pre `pl` is attached to a valid arrangement object. -*/ -Arr_point_location_result::Type locate(const Point_2& q) const; + /// \name Operations + /// @{ -/// @} + /*! attaches `pl` to the given arrangement `arr`. + */ + void attach (const Arrangement_2& arr); -/// \name Operations -/// @{ - -/*! -attaches `pl` to the given arrangement `arr`. -*/ -void attach (const Arrangement_2& arr); - -/*! -detaches `pl` from the arrangement it is currently attached to. -*/ -void detach (); - -/// @} - -}; /* end ArrangementPointLocation_2 */ + /*! detaches `pl` from the arrangement it is currently attached to. + */ + void detach (); + /// @} +}; /* end AosPointLocation_2 */ diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosRightSideTraits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosRightSideTraits_2.h index 689d2b7af2d..342991cf059 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosRightSideTraits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosRightSideTraits_2.h @@ -1,8 +1,7 @@ -/*! - * \ingroup PkgArrangementOnSurface2ConceptsTraits +/*! \ingroup PkgArrangementOnSurface2ConceptsTraits * \cgalConcept * - * `ArrangementRightSideTraits_2` is an abstract concept. It generalizes all + * `AosRightSideTraits_2` is an abstract concept. It generalizes all * concepts that handle curves that either reach or approach the right boundary * side of the parameter space. (An "abstract" concept is a concept that is * useless on its own.) Only a combination of this concept and additional @@ -10,14 +9,13 @@ * boundary sides (that is, left, bottom, and top) are purposeful, and can have * models. * - * \cgalRefines{ArrangementVerticalSideTraits_2} + * \cgalRefines{AosVerticalSideTraits_2} * - * \sa `ArrangementLeftSideTraits_2`, - * `ArrangementBottomSideTraits_2`, and - * `ArrangementTopSideTraits_2` + * \sa `AosLeftSideTraits_2` + * \sa `AosBottomSideTraits_2` + * \sa `AosTopSideTraits_2` */ - -class ArrangementRightSideTraits_2 { +class AosRightSideTraits_2 { public: /// \name Categories /// @{ diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosSphericalBoundaryTraits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosSphericalBoundaryTraits_2.h index 25fde7ef42d..e5ed46d6f4d 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosSphericalBoundaryTraits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosSphericalBoundaryTraits_2.h @@ -1,45 +1,42 @@ -/*! - * \ingroup PkgArrangementOnSurface2ConceptsTraits +/*! \ingroup PkgArrangementOnSurface2ConceptsTraits * \cgalConcept * - * Models of the concept `ArrangementSphericalBoundaryTraits_2` handle curves on + * Models of the concept `AosSphericalBoundaryTraits_2` handle curves on * a sphere or a surface that is topological equivalent to a sphere. The sphere * is oriented in such a way that the boundary of the rectangular parameter * space, the sphere is the mapping of which, is identified on the left and * right sides and contracted at the top and bottom sides. * - * \cgalRefines{ArrangementBasicTraits_2,ArrangementIdentifiedVerticalTraits_2, - * ArrangementContractedBottomTraits_2,ArrangementContractedTopTraits_2} + * \cgalRefines{AosBasicTraits_2,AosIdentifiedVerticalTraits_2, + * AosContractedBottomTraits_2,AosContractedTopTraits_2} * * \cgalHasModelsBegin * \cgalHasModels{CGAL::Arr_geodesic_arc_on_sphere_traits_2} * \cgalHasModelsEnd * - * \sa `ArrangementOpenBoundaryTraits_2` - * \sa `ArrangementBasicTraits_2` - * \sa `ArrangementIdentifiedVerticalTraits_2` - * \sa `ArrangementContractedBottomTraits_2` - * \sa `ArrangementContractedTopTraits_2` - * \sa `ArrangementHorizontalSideTraits_2` - * \sa `ArrangementVerticalSideTraits_2` + * \sa `AosOpenBoundaryTraits_2` + * \sa `AosBasicTraits_2` + * \sa `AosIdentifiedVerticalTraits_2` + * \sa `AosContractedBottomTraits_2` + * \sa `AosContractedTopTraits_2` + * \sa `AosHorizontalSideTraits_2` + * \sa `AosVerticalSideTraits_2` */ - -class ArrangementSphericalBoundaryTraits_2 { +class AosSphericalBoundaryTraits_2 { public: - /// \name Categories /// @{ - //! Must be convertible to `CGAL::Arr_identified_side_tag`. + /// Must be convertible to `CGAL::Arr_identified_side_tag`. typedef unspecified_type Left_side_category; - //! Must be convertible to `CGAL::Arr_identified_side_tag`. + /// Must be convertible to `CGAL::Arr_identified_side_tag`. typedef unspecified_type Bottom_side_category; - //! Must be convertible to `CGAL::Arr_contracted_side_tag`. + /// Must be convertible to `CGAL::Arr_contracted_side_tag`. typedef unspecified_type Top_side_category; - //! Must be convertible to `CGAL::Arr_contracted_side_tag`. + /// Must be convertible to `CGAL::Arr_contracted_side_tag`. typedef unspecified_type Right_side_category; /// @} @@ -47,25 +44,25 @@ public: /// \name Functor Types /// @{ - /// models the concept `ArrTraits::ParameterSpaceInX_2`. + /// models the concept `AosTraits::ParameterSpaceInX_2`. typedef unspecified_type Parameter_space_in_x_2; - /// models the concept `ArrTraits::CompareXOnBoundaryOfCurveEnd_2`. + /// models the concept `AosTraits::CompareXOnBoundaryOfCurveEnd_2`. typedef unspecified_type Compare_x_on_boundary_2; - /// models the concept `ArrTraits::CompareXNearBoundary_2`. + /// models the concept `AosTraits::CompareXNearBoundary_2`. typedef unspecified_type Compare_x_near_boundary_2; - /// models the concept `ArrTraits::ParameterSpaceInY_2`. + /// models the concept `AosTraits::ParameterSpaceInY_2`. typedef unspecified_type Parameter_space_in_y_2; - /// models the concept `ArrTraits::CompareYOnBoundary_2`. + /// models the concept `AosTraits::CompareYOnBoundary_2`. typedef unspecified_type Compare_y_on_boundary_2; - /// models the concept `ArrTraits::CompareYNearBoundary_2`. + /// models the concept `AosTraits::CompareYNearBoundary_2`. typedef unspecified_type Compare_y_near_boundary_2; - /// models the concept `ArrTraits::IsOnYIdentification_2`. + /// models the concept `AosTraits::IsOnYIdentification_2`. typedef unspecified_type Is_on_y_identification_2; /// @} @@ -73,26 +70,26 @@ public: /// \name Accessing Functor Objects /// @{ - /*! */ + /// Parameter_space_in_x_2 parameter_space_in_x_2_object() const; - /*! */ + /// Compare_y_on_boundary_2 compare_y_on_boundary_2_object() const; - /*! */ + /// Compare_y_near_boundary_2 compare_y_near_boundary_2_object() const; - /*! */ + /// Parameter_space_in_y_2 parameter_space_in_y_2_object() const; - /*! */ + /// Compare_x_on_boundary_2 compare_x_on_boundary_2_object() const; - /*! */ + /// Compare_x_near_boundary_2 compare_x_near_boundary_2_object() const; - /*! */ + /// Is_on_y_identification_2 is_on_y_identification_2_object() const; - /// @} -}; /* end ArrangementSphericalBoundaryTraits_2 */ + /// @} +}; /* end AosSphericalBoundaryTraits_2 */ diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTopSideTraits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTopSideTraits_2.h index 94614dfc81a..251385cfbed 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTopSideTraits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTopSideTraits_2.h @@ -1,8 +1,7 @@ -/*! - * \ingroup PkgArrangementOnSurface2ConceptsTraits +/*! \ingroup PkgArrangementOnSurface2ConceptsTraits * \cgalConcept * - * `ArrangementTopSideTraits_2` is an abstract concept. It generalizes all + * `AosTopSideTraits_2` is an abstract concept. It generalizes all * concepts that handle curves that either reach or approach the top boundary * side of the parameter space. (An "abstract" concept is a concept that is * useless on its own.) Only a combination of this concept and additional @@ -10,14 +9,13 @@ * boundary sides (that is, left, right, and bottom) are purposeful, and can * have models. * - * \cgalRefines{ArrangementHorizontalSideTraits_2} + * \cgalRefines{AosHorizontalSideTraits_2} * - * \sa `ArrangementLeftSideTraits_2`, - * `ArrangementRightSideTraits_2`, and - * `ArrangementBottomSideTraits_2` + * \sa `AosLeftSideTraits_2` + * \sa `AosRightSideTraits_2` + * \sa `AosBottomSideTraits_2` */ - -class ArrangementTopSideTraits_2 { +class AosTopSideTraits_2 { public: /// \name Categories /// @{ diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTopologyTraits.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTopologyTraits.h index bf0c5121709..1dd1caf27b3 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTopologyTraits.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTopologyTraits.h @@ -29,16 +29,15 @@ * \sa `Arrangement_on_surface_2` */ -class ArrangementTopologyTraits { +class AosTopologyTraits { public: - /// \name Types /// @{ - /*! */ + /// typedef unspecified_type Geometry_traits_2; - /*! */ + /// typedef unspecified_type Dcel; /// @} diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--Approximate_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--Approximate_2.h index 3a43a08c1a2..46becfd597e 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--Approximate_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--Approximate_2.h @@ -1,4 +1,4 @@ -namespace ArrTraits { +namespace AosTraits { /*! \ingroup PkgArrangementOnSurface2ConceptsFunctionObjects * \cgalConcept @@ -6,12 +6,11 @@ namespace ArrTraits { * \cgalRefines{Functor} * * \cgalHasModelsBegin - * \cgalHasModels{ArrangementApproximateTraits_2::Approximate_2} + * \cgalHasModels{AosApproximateTraits_2::Approximate_2} * \cgalHasModelsEnd */ class Approximate_2 { public: - /// \name Operations /// A model of this concept must provide: /// @{ @@ -19,10 +18,9 @@ public: /*! obtains an approximation of `p`'s \f$x\f$-coordinate (if `i == 0`), or of * `p`'s \f$y\f$-coordinate (if `i == 1`). */ - CGAL::Approximate_number_type operator()(ArrTraits::Point_2 p, int i); + CGAL::Approximate_number_type operator()(AosTraits::Point_2 p, int i); /// @} - -}; /* end ArrTraits::Approximate_2 */ +}; /* end AosTraits::Approximate_2 */ } diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--AreMergeable_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--AreMergeable_2.h index 8c9f51309ab..5969ea3ccee 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--AreMergeable_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--AreMergeable_2.h @@ -1,4 +1,4 @@ -namespace ArrTraits { +namespace AosTraits { /*! \ingroup PkgArrangementOnSurface2ConceptsFunctionObjects * \cgalConcept @@ -6,12 +6,11 @@ namespace ArrTraits { * \cgalRefines{Functor} * * \cgalHasModelsBegin - * \cgalHasModels{ArrangementXMonotoneTraits_2::Are_mergeable_2} + * \cgalHasModels{AosXMonotoneTraits_2::Are_mergeable_2} * \cgalHasModelsEnd */ class AreMergeable_2 { public: - /// \name Operations /// A model of this concept must provide: /// @{ @@ -22,11 +21,10 @@ public: * share a common endpoint, and they do not bend to form a * non-\f$x\f$-monotone curve. */ - bool operator()(ArrTraits::X_monotone_curve_2 xc1, - ArrTraits::X_monotone_curve_2 xc2); + bool operator()(AosTraits::X_monotone_curve_2 xc1, + AosTraits::X_monotone_curve_2 xc2); /// @} - -}; /* end ArrTraits::AreMergeable_2 */ +}; /* end AosTraits::AreMergeable_2 */ } diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--CompareXNearBoundary_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--CompareXNearBoundary_2.h index ad6f44f179a..c24b8d93242 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--CompareXNearBoundary_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--CompareXNearBoundary_2.h @@ -1,4 +1,4 @@ -namespace ArrTraits { +namespace AosTraits { /*! \ingroup PkgArrangementOnSurface2ConceptsFunctionObjects * \cgalConcept @@ -6,12 +6,11 @@ namespace ArrTraits { * \cgalRefines{AdaptableTernaryFunction} * * \cgalHasModelsBegin - * \cgalHasModels{ArrangementOpenBoundaryTraits_2::Compare_x_near_boundary_} + * \cgalHasModels{AosOpenBoundaryTraits_2::Compare_x_near_boundary_} * \cgalHasModelsEnd */ class CompareXNearBoundary_2 { public: - /// \name Operations /// A model of this concept must provide: /// @{ @@ -24,26 +23,29 @@ public: * precisely, compares the \f$x\f$-coordinates of the horizontal projection * of a point \f$p\f$ onto `xcv1` and `xcv2`. If `xcv1` and `xcv2` approach * the bottom boundary-side, \f$p\f$ is located far to the bottom, such that - * the result is invariant under a translation of \f$ p\f$ farther to the + * the result is invariant under a translation of \f$p\f$ farther to the * bottom. If `xcv1` and `xcv2` approach the top boundary-side, \f$p\f$ is * located far to the top in a similar manner. * - * \pre The \f$x\f$-coordinates of the limits of the curves at their - * respective ends are equal. That is, `compare_x_on_boundary_2`(`xcv1`, - * `xcv2`, `ce`) = `CGAL::EQUAL`. + * \pre The \f$x\f$-coordinates of the boundary of the curves at their + * respective ends are equal. That is, + * \link AosHorizontalSideTraits_2::Compare_x_on_boundary_2 + * `compare_x_on_boundary_2`\endlink(`xcv1`, `xcv2`, `ce`) = `CGAL::EQUAL`. * - * \pre \link ArrangementHorizontalSideTraits_2::Parameter_space_in_y_2 `parameter_space_in_y_2`\endlink(`xcv1`, `ce`) = - * \link ArrangementHorizontalSideTraits_2::Parameter_space_in_y_2 `parameter_space_in_y_2`\endlink(`xcv2`, `ce`). + * \pre \link AosHorizontalSideTraits_2::Parameter_space_in_y_2 + * `parameter_space_in_y_2`\endlink(`xcv1`, `ce`) = + * \link AosHorizontalSideTraits_2::Parameter_space_in_y_2 + * `parameter_space_in_y_2`\endlink(`xcv2`, `ce`). * - * \pre \link ArrangementHorizontalSideTraits_2::Parameter_space_in_y_2 `parameter_space_in_y_2`\endlink(`xcv1`, `ce`) \f$ \neq\f$ + * \pre \link AosHorizontalSideTraits_2::Parameter_space_in_y_2 + * `parameter_space_in_y_2`\endlink(`xcv1`, `ce`) \f$\neq\f$ * `CGAL::ARR_INTERIOR`. */ - Comparison_result operator()(const ArrTraits::X_monotone_curve_2& xcv1, - const ArrTraits::X_monotone_curve_2& xcv2, + Comparison_result operator()(const AosTraits::X_monotone_curve_2& xcv1, + const AosTraits::X_monotone_curve_2& xcv2, CGAL::Arr_curve_end ce); /// @} - -}; /* end ArrTraits::CompareXNearBoundary_2 */ +}; /* end AosTraits::CompareXNearBoundary_2 */ } diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--CompareXOnBoundaryOfCurveEnd_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--CompareXOnBoundaryOfCurveEnd_2.h index 28208660fec..e24c6e03622 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--CompareXOnBoundaryOfCurveEnd_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--CompareXOnBoundaryOfCurveEnd_2.h @@ -1,4 +1,4 @@ -namespace ArrTraits { +namespace AosTraits { /*! \ingroup PkgArrangementOnSurface2ConceptsFunctionObjects * \cgalConcept @@ -6,71 +6,69 @@ namespace ArrTraits { * \cgalRefines{AdaptableFunctor} * * \cgalHasModelsBegin - * \cgalHasModels{ArrangementHorizontalSideTraits_2::Compare_x_on_boundary_2} - * \cgalHasModels{ArrangementOpenBoundaryTraits_2::Compare_x_on_boundary_2} - * \cgalHasModels{ArrangementSphericalBoundaryTraits_2::Compare_x_on_boundary_2} + * \cgalHasModels{AosHorizontalSideTraits_2::Compare_x_on_boundary_2} + * \cgalHasModels{AosOpenBoundaryTraits_2::Compare_x_on_boundary_2} + * \cgalHasModels{AosSphericalBoundaryTraits_2::Compare_x_on_boundary_2} * \cgalHasModelsEnd */ class CompareXOnBoundaryOfCurveEnd_2 { public: - /// \name Operations /// A model of this concept must provide: /// @{ /*! Given a point `p`, an \f$x\f$-monotone curve `xcv`, and an * enumeration `ce` that specifies either the minimum or the maximum end of - * the curve where the curve has a vertical asymptote, compares the \f$ - * x\f$-coordinate of `p` and the \f$x\f$-coordinate of the limit of the + * the curve where the curve has a vertical asymptote, compares the + * \f$x\f$-coordinate of `p` and the \f$x\f$-coordinate of the limit of the * curve at its specified end. The variable `xcv` identifies the parametric * curve \f$c(t) = (x(t), y(t))\f$ defined over an open or half-open interval - * with endpoints \f$ 0\f$ and \f$ 1\f$. The enumeration `ce` identifies an - * open end \f$d \in\{0,1\}\f$ of \f$c\f$. Formally, compares the \f$ - * x\f$-coordinate of `p` and \f$ \lim_{t \rightarrow d} x(t)\f$. Returns + * with endpoints \f$0\f$ and \f$1\f$. The enumeration `ce` identifies an + * open end \f$d \in\{0,1\}\f$ of \f$c\f$. Formally, compares the + * \f$x\f$-coordinate of `p` and \f$\lim_{t \rightarrow d} x(t)\f$. Returns * `CGAL::SMALLER`, `CGAL::EQUAL`, or `CGAL::LARGER` accordingly. * - * \pre \link ArrangementHorizontalSideTraits_2::Parameter_space_in_y_2 `Parameter_space_in_y_2`\endlink (`xcv`, `ce`) \f$\neq\f$ `CGAL::ARR_INTERIOR`. + * \pre \link AosHorizontalSideTraits_2::Parameter_space_in_y_2 `Parameter_space_in_y_2`\endlink(`xcv`, `ce`) \f$\neq\f$ `CGAL::ARR_INTERIOR`. * * \pre If the parameter space is unbounded, \f$c\f$ has a vertical asymptote - * at its \f$ d\f$-end; that is, - * \link ArrangementVerticalSideTraits_2::Parameter_space_in_x_2 `Parameter_space_in_x_2`\endlink(`xcv`, `ce`) = `CGAL::ARR_INTERIOR`. + * at its \f$d\f$-end; that is, + * \link AosVerticalSideTraits_2::Parameter_space_in_x_2 `Parameter_space_in_x_2`\endlink(`xcv`, `ce`) = `CGAL::ARR_INTERIOR`. */ - Comparison_result operator()(const ArrTraits::Point_2& p, - const ArrTraits::X_monotone_curve_2& xcv, + Comparison_result operator()(const AosTraits::Point_2& p, + const AosTraits::X_monotone_curve_2& xcv, CGAL::Arr_curve_end ce); -/*! Given two \f$ x\f$-monotone curves `xcv1` and `xcv2` and two indices `ce1` - * and `ce2` that specify either the minimum or the maximum ends of `xcv1` and - * `xcv2`, respectively, where the curves have vertical asymptotes, compares the - * \f$ x\f$-coordinates of the limits of the curves at their specified - * ends. The variables `xcv1` and `xcv2` identify the parametric curves \f$ - * c_1(t) = (x_1(t),y_1(t))\f$ and \f$ c_2(t) = (x_2(t),y_2(t))\f$, - * respectively, defined over open or half-open intervals with endpoints \f$ - * 0\f$ and \f$ 1\f$. The indices `ce1` and `ce2` identify open ends \f$ d_1 - * \in\{0,1\}\f$ and \f$ d_2 \in\{0,1\}\f$ of \f$ c_1\f$ and \f$ c_2\f$, - * respectively. Formally, compares \f$ \lim_{t \rightarrow d_1} x_1(t)\f$ and - * \f$\lim_{t \rightarrow d_2} x_2(t)\f$. Returns `CGAL::SMALLER`, - * `CGAL::EQUAL`, or `CGAL::LARGER` accordingly. - * - * \pre \link ArrangementHorizontalSideTraits_2::Parameter_space_in_y_2 `Parameter_space_in_y_2`\endlink(`xcv1`, `ce1`) \f$\neq\f$ `CGAL::ARR_INTERIOR`. - * - * \pre \link ArrangementHorizontalSideTraits_2::Parameter_space_in_y_2 `Parameter_space_in_y_2`\endlink(`xcv2`, `ce2`) \f$\neq\f$ `CGAL::ARR_INTERIOR`. - * - * \pre If the parameter space is unbounded, \f$c_1\f$ has a vertical - * asymptote at its respective end; that is, - * \link ArrangementVerticalSideTraits_2::Parameter_space_in_x_2 `Parameter_space_in_x_2`\endlink(`xcv1`, `ce1`) = `CGAL::ARR_INTERIOR`. - * - * \pre If the parameter space is unbounded, \f$c_2\f$ has a vertical asymptote - * at its respective end; that is, - * \link ArrangementVerticalSideTraits_2::Parameter_space_in_x_2 `Parameter_space_in_x_2`\endlink(`xcv2`, `ce2`) = `CGAL::ARR_INTERIOR`. - */ -Comparison_result operator()(const ArrTraits::X_monotone_curve_2& xcv1, - CGAL::Arr_curve_end ce1, - const ArrTraits::X_monotone_curve_2& xcv2, - CGAL::Arr_curve_end ce2); + /*! Given two \f$x\f$-monotone curves `xcv1` and `xcv2` and two indices `ce1` + * and `ce2` that specify either the minimum or the maximum ends of `xcv1` and + * `xcv2`, respectively, where the curves have vertical asymptotes, compares + * the \f$x\f$-coordinates of the limits of the curves at their specified + * ends. The variables `xcv1` and `xcv2` identify the parametric curves + * \f$c_1(t) = (x_1(t),y_1(t))\f$ and \f$c_2(t) = (x_2(t),y_2(t))\f$, + * respectively, defined over open or half-open intervals with endpoints + * \f$0\f$ and \f$1\f$. The indices `ce1` and `ce2` identify open ends + * \f$d_1\in\{0,1\}\f$ and \f$d_2 \in\{0,1\}\f$ of \f$c_1\f$ and \f$c_2\f$, + * respectively. Formally, compares \f$\lim_{t \rightarrow d_1} x_1(t)\f$ and + * \f$\lim_{t \rightarrow d_2} x_2(t)\f$. Returns `CGAL::SMALLER`, + * `CGAL::EQUAL`, or `CGAL::LARGER` accordingly. + * + * \pre \link AosHorizontalSideTraits_2::Parameter_space_in_y_2 `Parameter_space_in_y_2`\endlink(`xcv1`, `ce1`) \f$\neq\f$ `CGAL::ARR_INTERIOR`. + * + * \pre \link AosHorizontalSideTraits_2::Parameter_space_in_y_2 `Parameter_space_in_y_2`\endlink(`xcv2`, `ce2`) \f$\neq\f$ `CGAL::ARR_INTERIOR`. + * + * \pre If the parameter space is unbounded, \f$c_1\f$ has a vertical + * asymptote at its respective end; that is, + * \link AosVerticalSideTraits_2::Parameter_space_in_x_2 `Parameter_space_in_x_2`\endlink(`xcv1`, `ce1`) = `CGAL::ARR_INTERIOR`. + * + * \pre If the parameter space is unbounded, \f$c_2\f$ has a vertical asymptote + * at its respective end; that is, + * \link AosVerticalSideTraits_2::Parameter_space_in_x_2 `Parameter_space_in_x_2`\endlink(`xcv2`, `ce2`) = `CGAL::ARR_INTERIOR`. + */ + Comparison_result operator()(const AosTraits::X_monotone_curve_2& xcv1, + CGAL::Arr_curve_end ce1, + const AosTraits::X_monotone_curve_2& xcv2, + CGAL::Arr_curve_end ce2); -/// @} - -}; /* end ArrTraits::CompareXOnBoundaryOfCurveEnd_2 */ + /// @} +}; /* end AosTraits::CompareXOnBoundaryOfCurveEnd_2 */ } diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--CompareXOnBoundary_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--CompareXOnBoundary_2.h index af30ebbfb93..4fbaa082f64 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--CompareXOnBoundary_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--CompareXOnBoundary_2.h @@ -1,4 +1,4 @@ -namespace ArrTraits { +namespace AosTraits { /*! \ingroup PkgArrangementOnSurface2ConceptsFunctionObjects * \cgalConcept @@ -6,9 +6,9 @@ namespace ArrTraits { * \cgalRefines{AdaptableFunctor} * * \cgalHasModelsBegin - * \cgalHasModels{ArrangementClosedBottomTraits_2::Compare_x_on_boundary_2} - * \cgalHasModels{ArrangementClosedTopTraits_2::Compare_x_on_boundary_2} - * \cgalHasModels{ArrangementIdentifiedHorizontalTraits_2::Compare_x_on_boundary_2} + * \cgalHasModels{AosClosedBottomTraits_2::Compare_x_on_boundary_2} + * \cgalHasModels{AosClosedTopTraits_2::Compare_x_on_boundary_2} + * \cgalHasModels{AosIdentifiedHorizontalTraits_2::Compare_x_on_boundary_2} * \cgalHasModelsEnd */ class CompareXOnBoundary_2 { @@ -23,16 +23,16 @@ public: * x\f$-coordinate of `p1` and the \f$x\f$-coordinate of `p2`. Returns * `CGAL::SMALLER`, `CGAL::EQUAL`, or `CGAL::LARGER` accordingly. * - * \pre \link ArrangementHorizontalSideTraits_2::Parameter_space_in_y_2 + * \pre \link AosHorizontalSideTraits_2::Parameter_space_in_y_2 * `Parameter_space_in_y_2`\endlink (`p1`) \f$\neq\f$ `CGAL::ARR_INTERIOR` or - * \link ArrangementHorizontalSideTraits_2::Parameter_space_in_y_2 + * \link AosHorizontalSideTraits_2::Parameter_space_in_y_2 * `Parameter_space_in_y_2`\endlink (`p2`) \f$\neq\f$ `CGAL::ARR_INTERIOR`. */ - Comparison_result operator()(const ArrTraits::Point_2& p1, - const ArrTraits::Point_2& p2); + Comparison_result operator()(const AosTraits::Point_2& p1, + const AosTraits::Point_2& p2); /// @} -}; /* end ArrTraits::CompareXOnBoundaryOfCurveEnd_2 */ +}; /* end AosTraits::CompareXOnBoundaryOfCurveEnd_2 */ } diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--CompareX_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--CompareX_2.h index 466869d5a01..117a467f0c9 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--CompareX_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--CompareX_2.h @@ -1,16 +1,16 @@ -namespace ArrTraits { +namespace AosTraits { + /*! \ingroup PkgArrangementOnSurface2ConceptsFunctionObjects * \cgalConcept * * \cgalRefines{AdaptableBinaryFunction} * * \cgalHasModelsBegin - * \cgalHasModels{ArrangementBasicTraits_2::Compare_x_2} + * \cgalHasModels{AosBasicTraits_2::Compare_x_2} * \cgalHasModelsEnd */ class CompareX_2 { public: - /// \name Operations /// A model of this concept must provide: /// @{ @@ -18,10 +18,9 @@ public: /*! returns `CGAL::SMALLER`, `CGAL::EQUAL`, or `CGAL::LARGER` according to the * \f$x\f$-ordering of points `p1` and `p2`. */ - Comparison_result operator()(ArrTraits::Point_2 p1, ArrTraits::Point_2 p2); + Comparison_result operator()(AosTraits::Point_2 p1, AosTraits::Point_2 p2); /// @} - -}; /* end ArrTraits::CompareX_2 */ +}; /* end AosTraits::CompareX_2 */ } diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--CompareXy_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--CompareXy_2.h index db282c6d238..10f3ce75cda 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--CompareXy_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--CompareXy_2.h @@ -1,4 +1,4 @@ -namespace ArrTraits { +namespace AosTraits { /*! \ingroup PkgArrangementOnSurface2ConceptsFunctionObjects * \cgalConcept @@ -6,12 +6,11 @@ namespace ArrTraits { * \cgalRefines{AdaptableBinaryFunction} * * \cgalHasModelsBegin - * \cgalHasModels{ArrangementBasicTraits_2::Compare_xy_2} + * \cgalHasModels{AosBasicTraits_2::Compare_xy_2} * \cgalHasModelsEnd */ class CompareXy_2 { public: - /// \name Operations /// A model of this concept must provide: /// @{ @@ -19,10 +18,9 @@ public: /*! returns `CGAL::SMALLER`, `CGAL::EQUAL`, or `CGAL::LARGER` according * to the lexicographic \f$xy\f$-order of the points `p1` and `p2`. */ - Comparison_result operator()(ArrTraits::Point_2 p1, ArrTraits::Point_2 p2); + Comparison_result operator()(AosTraits::Point_2 p1, AosTraits::Point_2 p2); /// @} - -}; /* end ArrTraits::CompareXy_2 */ +}; /* end AosTraits::CompareXy_2 */ } diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--CompareYAtXLeft_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--CompareYAtXLeft_2.h index f49c04d0ec1..428de11c5cc 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--CompareYAtXLeft_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--CompareYAtXLeft_2.h @@ -1,4 +1,4 @@ -namespace ArrTraits { +namespace AosTraits { /*! \ingroup PkgArrangementOnSurface2ConceptsFunctionObjects * \cgalConcept @@ -6,29 +6,27 @@ namespace ArrTraits { * \cgalRefines{AdaptableTernaryFunction} * * \cgalHasModelsBegin - * \cgalHasModels{ArrangementBasicTraits_2::Compare_y_at_x_left_2} + * \cgalHasModels{AosBasicTraits_2::Compare_y_at_x_left_2} * \cgalHasModelsEnd */ class CompareYAtXLeft_2 { public: - /// \name Operations /// A model of this concept must provide: /// @{ /*! accepts two \f$x\f$-monotone curves `xc1` and `xc2` that have a common - * right endpoint `p`, and returns `CGAL::SMALLER, CGAL::EQUAL` or + * right endpoint `p`, and returns `CGAL::SMALLER`, `CGAL::EQUAL` or * `CGAL::LARGER` according to the relative position of the two curves * immediately to the left of \f$p\f$. Note that in case one of the * \f$x\f$-monotone curves is a vertical segment (emanating downward from * `p`), it is always considered to be below the other curve. */ - Comparison_result operator()(ArrTraits::X_monotone_curve_2 xc1, - ArrTraits::X_monotone_curve_2 xc2, - ArrTraits::Point_2 p); + Comparison_result operator()(AosTraits::X_monotone_curve_2 xc1, + AosTraits::X_monotone_curve_2 xc2, + AosTraits::Point_2 p); /// @} - -}; /* end ArrTraits::CompareYAtXLeft_2 */ +}; /* end AosTraits::CompareYAtXLeft_2 */ } diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--CompareYAtXRight_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--CompareYAtXRight_2.h index 62fe93cdc3a..5f95bd0c84a 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--CompareYAtXRight_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--CompareYAtXRight_2.h @@ -1,4 +1,4 @@ -namespace ArrTraits { +namespace AosTraits { /*! \ingroup PkgArrangementOnSurface2ConceptsFunctionObjects * \cgalConcept @@ -6,29 +6,27 @@ namespace ArrTraits { * \cgalRefines{AdaptableTernaryFunction} * * \cgalHasModelsBegin - * \cgalHasModels{ArrangementBasicTraits_2::Compare_y_at_x_right_2} + * \cgalHasModels{AosBasicTraits_2::Compare_y_at_x_right_2} * \cgalHasModelsEnd */ class CompareYAtXRight_2 { public: - /// \name Operations /// A model of this concept must provide: /// @{ /*! accepts two \f$x\f$-monotone curves `xc1` and `xc2` - * that have a common left endpoint `p`, and returns `CGAL::SMALLER, - * CGAL::EQUAL` or `CGAL::LARGER` according to the relative position of the + * that have a common left endpoint `p`, and returns `CGAL::SMALLER`, + * `CGAL::EQUAL` or `CGAL::LARGER` according to the relative position of the * two curves immediately to the right of \f$p\f$. Note that in case one of * the \f$x\f$-monotone curves is a vertical segment emanating upward from * `p`, it is always considered to be above the other curve. */ - Comparison_result operator()(ArrTraits::X_monotone_curve_2 xc1, - ArrTraits::X_monotone_curve_2 xc2, - ArrTraits::Point_2 p); + Comparison_result operator()(AosTraits::X_monotone_curve_2 xc1, + AosTraits::X_monotone_curve_2 xc2, + AosTraits::Point_2 p); /// @} - -}; /* end ArrTraits::CompareYAtXRight_2 */ +}; /* end AosTraits::CompareYAtXRight_2 */ } diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--CompareYAtX_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--CompareYAtX_2.h index bc8d1d81573..e884e8e2cca 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--CompareYAtX_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--CompareYAtX_2.h @@ -1,4 +1,4 @@ -namespace ArrTraits { +namespace AosTraits { /*! \ingroup PkgArrangementOnSurface2ConceptsFunctionObjects * \cgalConcept @@ -6,12 +6,11 @@ namespace ArrTraits { * \cgalRefines{AdaptableBinaryFunction} * * \cgalHasModelsBegin - * \cgalHasModels{ArrangementBasicTraits_2::Compare_y_at_x_2} + * \cgalHasModels{AosBasicTraits_2::Compare_y_at_x_2} * \cgalHasModelsEnd */ class CompareYAtX_2 { public: - /// \name Operations /// A model of this concept must provide: /// @{ @@ -20,11 +19,10 @@ public: * of `p` on `xc`, and returns `CGAL::SMALLER`, `CGAL::EQUAL`, or * `CGAL::LARGER` according to the result. */ - Comparison_result operator()(ArrTraits::Point_2 p, - ArrTraits::X_monotone_curve_2 xc); + Comparison_result operator()(AosTraits::Point_2 p, + AosTraits::X_monotone_curve_2 xc); /// @} - -}; /* end ArrTraits::CompareYAtX_2 */ +}; /* end AosTraits::CompareYAtX_2 */ } diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--CompareYNearBoundary_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--CompareYNearBoundary_2.h index cb11491e316..06b77ba1568 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--CompareYNearBoundary_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--CompareYNearBoundary_2.h @@ -1,4 +1,4 @@ -namespace ArrTraits { +namespace AosTraits { /*! \ingroup PkgArrangementOnSurface2ConceptsFunctionObjects * \cgalConcept @@ -6,12 +6,11 @@ namespace ArrTraits { * \cgalRefines{AdaptableTernaryFunction} * * \cgalHasModelsBegin - * \cgalHasModels{ArrangementOpenBoundaryTraits_2::Compare_y_near_boundary_2} + * \cgalHasModels{AosOpenBoundaryTraits_2::Compare_y_near_boundary_2} * \cgalHasModelsEnd */ class CompareYNearBoundary_2 { public: - /// \name Operations /// A model of this concept must provide: /// @{ @@ -30,18 +29,17 @@ public: * to `xcv2` and `ce`. In that case \f$p\f$ is located far to the right in a * similar manner. * - * \pre \link ArrangementVerticalSideTraits_2::Parameter_space_in_x_2 `parameter_space_in_x_2`\endlink(`xcv2`, `ce`) = - * \link ArrangementVerticalSideTraits_2::Parameter_space_in_x_2 `parameter_space_in_x_2`\endlink(`xcv1`, `ce`). + * \pre \link AosVerticalSideTraits_2::Parameter_space_in_x_2 `parameter_space_in_x_2`\endlink(`xcv2`, `ce`) = + * \link AosVerticalSideTraits_2::Parameter_space_in_x_2 `parameter_space_in_x_2`\endlink(`xcv1`, `ce`). * - * \pre \link ArrangementVerticalSideTraits_2::Parameter_space_in_x_2 `parameter_space_in_x_2`\endlink(`xcv1`, `ce`) \f$\neq\f$ + * \pre \link AosVerticalSideTraits_2::Parameter_space_in_x_2 `parameter_space_in_x_2`\endlink(`xcv1`, `ce`) \f$\neq\f$ * `CGAL::ARR_INTERIOR`. */ - Comparison_result operator()(const ArrTraits::X_monotone_curve_2& xcv1, - const ArrTraits::X_monotone_curve_2& xcv2, + Comparison_result operator()(const AosTraits::X_monotone_curve_2& xcv1, + const AosTraits::X_monotone_curve_2& xcv2, CGAL::Arr_curve_end ce); /// @} - -}; /* end ArrTraits::CompareYNearBoundary_2 */ +}; /* end AosTraits::CompareYNearBoundary_2 */ } diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--CompareYOnBoundary_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--CompareYOnBoundary_2.h index 206458c178b..8ad41f9bf32 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--CompareYOnBoundary_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--CompareYOnBoundary_2.h @@ -1,4 +1,4 @@ -namespace ArrTraits { +namespace AosTraits { /*! \ingroup PkgArrangementOnSurface2ConceptsFunctionObjects * \cgalConcept @@ -6,34 +6,34 @@ namespace ArrTraits { * \cgalRefines{AdaptableBinaryFunction} * * \cgalHasModelsBegin - * \cgalHasModels{ArrangementClosedLeftTraits_2::Compare_y_on_boundary_2} - * \cgalHasModels{ArrangementClosedRightTraits_2::Compare_y_on_boundary_2} - * \cgalHasModels{ArrangementIdentifiedVerticalTraits_2::Compare_y_on_boundary_2} - * \cgalHasModels{ArrangementSphericalBoundaryTraits_2::Compare_y_on_boundary_2} + * \cgalHasModels{AosClosedLeftTraits_2::Compare_y_on_boundary_2} + * \cgalHasModels{AosClosedRightTraits_2::Compare_y_on_boundary_2} + * \cgalHasModels{AosIdentifiedVerticalTraits_2::Compare_y_on_boundary_2} + * \cgalHasModels{AosSphericalBoundaryTraits_2::Compare_y_on_boundary_2} * \cgalHasModelsEnd */ class CompareYOnBoundary_2 { public: - /// \name Operations /// A model of this concept must provide: /// @{ /*! Given two points `p1` and `p2`, such that either `p1` or `p2` (or both) - * lie on the bottom or top boundary of the parameter space, compares the \f$ - * y\f$-coordinate of `p1` and the \f$y\f$-coordinate of `p2`. Returns + * lie on the bottom or top boundary of the parameter space, compares the + * \f$y\f$-coordinate of `p1` and the \f$y\f$-coordinate of `p2`. Returns * `CGAL::SMALLER`, `CGAL::EQUAL`, or `CGAL::LARGER` accordingly. * - * \pre \link ArrangementVerticalSideTraits_2::Parameter_space_in_x_2 - * `Parameter_space_in_x_2`\endlink (`p1`) \f$\neq\f$ `CGAL::ARR_INTERIOR` or - * \link ArrangementVerticalSideTraits_2::Parameter_space_in_x_2 - * `Parameter_space_in_x_2`\endlink (`p2`) \f$\neq\f$ `CGAL::ARR_INTERIOR`. + * \pre \link AosVerticalSideTraits_2::Parameter_space_in_x_2 + * `Parameter_space_in_x_2`\endlink(`p1`) \f$\neq\f$ + * `CGAL::ARR_INTERIOR` or + * \link AosVerticalSideTraits_2::Parameter_space_in_x_2 + * `Parameter_space_in_x_2`\endlink(`p2`) \f$\neq\f$ + * `CGAL::ARR_INTERIOR`. */ - Comparison_result operator()(const ArrTraits::Point_2& p1, - const ArrTraits::Point_2& p2); + Comparison_result operator()(const AosTraits::Point_2& p1, + const AosTraits::Point_2& p2); -/// @} - -}; /* end ArrTraits::CompareYOnBoundary_2 */ + /// @} +}; /* end AosTraits::CompareYOnBoundary_2 */ } diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--ConstructCurve_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--ConstructCurve_2.h index 12a1109a33b..771afd0ed93 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--ConstructCurve_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--ConstructCurve_2.h @@ -1,4 +1,4 @@ -namespace ArrTraits { +namespace AosTraits { /*! \ingroup PkgArrangementOnSurface2ConceptsFunctionObjects * \cgalConcept @@ -6,23 +6,20 @@ namespace ArrTraits { * \cgalRefines{Functor} * * \cgalHasModelsBegin - * \cgalHasModels{ArrangementConstructCurveTraits_2::Construct_curve_2} + * \cgalHasModels{AosConstructCurveTraits_2::Construct_curve_2} * \cgalHasModelsEnd */ class ConstructCurve_2 { public: - /// \name Operations /// A model of this concept must provide: /// @{ - /*! returns a curve connecting `p1` and `p2` (i.e., the - * two input points are its endpoints). + /*! returns a curve connecting `p1` and `p2` (i.e., the two input points + * are its endpoints). */ - ArrTraits::Curve_2 operator()(ArrTraits::Point_2 p1, ArrTraits::Point_2 p2); - + AosTraits::Curve_2 operator()(AosTraits::Point_2 p1, AosTraits::Point_2 p2); /// @} - -}; /* end ArrTraits::ConstructCurve_2 */ +}; /* end AosTraits::ConstructCurve_2 */ } diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--ConstructMaxVertex_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--ConstructMaxVertex_2.h index 85d379693bf..970e0e15151 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--ConstructMaxVertex_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--ConstructMaxVertex_2.h @@ -1,4 +1,4 @@ -namespace ArrTraits { +namespace AosTraits { /*! \ingroup PkgArrangementOnSurface2ConceptsFunctionObjects * \cgalConcept @@ -6,22 +6,20 @@ namespace ArrTraits { * \cgalRefines{AdaptableUnaryFunction} * * \cgalHasModelsBegin - * \cgalHasModels{ArrangementBasicTraits_2::Construct_max_vertex_2} + * \cgalHasModels{AosBasicTraits_2::Construct_max_vertex_2} * \cgalHasModelsEnd */ class ConstructMaxVertex_2 { public: - /// \name Operations /// A model of this concept must provide: /// @{ /*! returns the lexicographically larger (right) endpoint of `xc`. */ - ArrTraits::Point_2 operator()(ArrTraits::X_monotone_curve_2 xc); + AosTraits::Point_2 operator()(AosTraits::X_monotone_curve_2 xc); /// @} - -}; /* end ArrTraits::ConstructMaxVertex_2 */ +}; /* end AosTraits::ConstructMaxVertex_2 */ } diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--ConstructMinVertex_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--ConstructMinVertex_2.h index f9f8f3b99ac..c78fdaa3cf3 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--ConstructMinVertex_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--ConstructMinVertex_2.h @@ -1,4 +1,4 @@ -namespace ArrTraits { +namespace AosTraits { /*! \ingroup PkgArrangementOnSurface2ConceptsFunctionObjects * \cgalConcept @@ -6,7 +6,7 @@ namespace ArrTraits { * \cgalRefines{AdaptableUnaryFunction} * * \cgalHasModelsBegin - * \cgalHasModels{ArrangementBasicTraits_2::Construct_min_vertex_2} + * \cgalHasModels{AosBasicTraits_2::Construct_min_vertex_2} * \cgalHasModelsEnd */ class ConstructMinVertex_2 { @@ -18,10 +18,10 @@ public: /*! returns the lexicographically smaller (left) endpoint of `xc`. */ - ArrTraits::Point_2 operator()(ArrTraits::X_monotone_curve_2 xc); + AosTraits::Point_2 operator()(AosTraits::X_monotone_curve_2 xc); /// @} -}; /* end ArrTraits::ConstructMinVertex_2 */ +}; /* end AosTraits::ConstructMinVertex_2 */ } diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--ConstructXMonotoneCurve_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--ConstructXMonotoneCurve_2.h index 39c1e7b42e5..31e4428183f 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--ConstructXMonotoneCurve_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--ConstructXMonotoneCurve_2.h @@ -1,4 +1,4 @@ -namespace ArrTraits { +namespace AosTraits { /*! \ingroup PkgArrangementOnSurface2ConceptsFunctionObjects * \cgalConcept @@ -6,12 +6,11 @@ namespace ArrTraits { * \cgalRefines{Functor} * * \cgalHasModelsBegin - * \cgalHasModels{ArrangementConstructXMonotoneCurveTraits_2::Construct_x_monotone_curve_2} + * \cgalHasModels{AosConstructXMonotoneCurveTraits_2::Construct_x_monotone_curve_2} * \cgalHasModelsEnd */ class ConstructXMonotoneCurve_2 { public: - /// \name Operations /// A model of this concept must provide: /// @{ @@ -19,11 +18,10 @@ public: /*! returns an \f$x\f$-monotone curve connecting `p1` and `p2` (i.e., the * two input points are its endpoints). */ - ArrTraits::X_monotone_curve_2 operator()(ArrTraits::Point_2 p1, - ArrTraits::Point_2 p2); + AosTraits::X_monotone_curve_2 operator()(AosTraits::Point_2 p1, + AosTraits::Point_2 p2); /// @} - -}; /* end ArrTraits::ConstructXMonotoneCurve_2 */ +}; /* end AosTraits::ConstructXMonotoneCurve_2 */ } diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--Curve_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--Curve_2.h index 5268f489519..c09afb827a4 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--Curve_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--Curve_2.h @@ -1,4 +1,4 @@ -namespace ArrTraits { +namespace AosTraits { /*! \ingroup PkgArrangementOnSurface2ConceptsGeometricObjects * \cgalConcept @@ -7,12 +7,9 @@ namespace ArrTraits { * * \cgalRefines{CopyConstructible,Assignable,DefaultConstructible} * \cgalHasModelsBegin - * \cgalHasModels{ArrangementTraits_2::Curve_2} + * \cgalHasModels{AosTraits_2::Curve_2} * \cgalHasModelsEnd */ -class Curve_2 { -public: - -}; /* end ArrTraits::Curve_2 */ +class Curve_2 {}; } diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--Equal_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--Equal_2.h index ed6d47ed592..027e53a786a 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--Equal_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--Equal_2.h @@ -1,4 +1,4 @@ -namespace ArrTraits { +namespace AosTraits { /*! \ingroup PkgArrangementOnSurface2ConceptsFunctionObjects * \cgalConcept @@ -6,28 +6,26 @@ namespace ArrTraits { * \cgalRefines{AdaptableBinaryFunction} * * \cgalHasModelsBegin - * \cgalHasModels{ArrangementBasicTraits_2::Equal_2} + * \cgalHasModels{AosBasicTraits_2::Equal_2} * \cgalHasModelsEnd */ class Equal_2 { public: - /// \name Operations /// A model of this concept must provide: /// @{ /*! determines whether `p1` and `p2` are geometrically equivalent. */ - bool operator()(ArrTraits::Point_2 p1, ArrTraits::Point_2 p2); + bool operator()(AosTraits::Point_2 p1, AosTraits::Point_2 p2); - /*! determines whether `xc1` and `xc2` are geometrically equivalent (have the - * same graph). + /*! determines whether `xc1` and `xc2` are geometrically equivalent + * (have the same graph). */ - bool operator()(ArrTraits::X_monotone_curve_2 xc1, - ArrTraits::X_monotone_curve_2 xc2); + bool operator()(AosTraits::X_monotone_curve_2 xc1, + AosTraits::X_monotone_curve_2 xc2); /// @} - -}; /* end ArrTraits::Equal_2 */ +}; /* end AosTraits::Equal_2 */ } diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--Intersect_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--Intersect_2.h index f13a26422e9..4fa6e0bbb25 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--Intersect_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--Intersect_2.h @@ -1,4 +1,4 @@ -namespace ArrTraits { +namespace AosTraits { /*! \ingroup PkgArrangementOnSurface2ConceptsFunctionObjects * \cgalConcept @@ -6,7 +6,7 @@ namespace ArrTraits { * \cgalRefines{Functor} * * \cgalHasModelsBegin - * \cgalHasModels{ArrangementXMonotoneTraits_2::Intersect_2} + * \cgalHasModels{AosXMonotoneTraits_2::Intersect_2} * \cgalHasModelsEnd */ class Intersect_2 { @@ -40,17 +40,17 @@ public: * nondeterministic. * * \pre Dereferencing `oi` must yield an object of type - * `std::optional>`, - * where `%Point_2` is a model of `ArrTraits::Point_2` and - * `X_monotone_curve_2` is a model of `ArrTraits::XMonotoneCurve_2`. + * `std::optional>`, + * where `%Point_2` is a model of `AosTraits::Point_2` and + * `X_monotone_curve_2` is a model of `AosTraits::XMonotoneCurve_2`. */ template - OutputIterator operator()(ArrTraits::X_monotone_curve_2 xc1, - ArrTraits::X_monotone_curve_2 xc2, + OutputIterator operator()(AosTraits::X_monotone_curve_2 xc1, + AosTraits::X_monotone_curve_2 xc2, OutputIterator& oi); -/// @} + /// @} -}; /* end ArrTraits::Intersect_2 */ +}; /* end AosTraits::Intersect_2 */ } diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--IsOnXIdentification_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--IsOnXIdentification_2.h index 351ae415352..026bd99d0da 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--IsOnXIdentification_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--IsOnXIdentification_2.h @@ -1,4 +1,4 @@ -namespace ArrTraits { +namespace AosTraits { /*! \ingroup PkgArrangementOnSurface2ConceptsFunctionObjects * \cgalConcept @@ -6,12 +6,11 @@ namespace ArrTraits { * \cgalRefines{AdaptableUnaryFunction} * * \cgalHasModelsBegin - * \cgalHasModels{ArrangementIdentifiedHorizontalTraits_2::Is_on_x_identification_2} + * \cgalHasModels{AosIdentifiedHorizontalTraits_2::Is_on_x_identification_2} * \cgalHasModelsEnd */ class IsOnXIdentification_2 { public: - /// \name Operations /// A model of this concept must provide: /// @{ @@ -19,15 +18,14 @@ public: /*! determines whether the point `p` lies on the vertical identification * curve. */ - bool operator()(ArrTraits::Point& point) const; + bool operator()(AosTraits::Point& point) const; /*! determines whether the curve `cv` lies on the vertical identification * curve. */ - bool operator()(ArrTraits::const X_monotone_curve_2& cv) const; + bool operator()(AosTraits::const X_monotone_curve_2& cv) const; /// @} - -}; /* end ArrTraits::IsOnXIdentification_2 */ +}; /* end AosTraits::IsOnXIdentification_2 */ } diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--IsOnYIdentification_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--IsOnYIdentification_2.h index 5ca8c772233..b2360e98ab0 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--IsOnYIdentification_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--IsOnYIdentification_2.h @@ -1,4 +1,4 @@ -namespace ArrTraits { +namespace AosTraits { /*! \ingroup PkgArrangementOnSurface2ConceptsFunctionObjects * \cgalConcept @@ -6,12 +6,11 @@ namespace ArrTraits { * \cgalRefines{AdaptableUnaryFunction} * * \cgalHasModelsBegin - * \cgalHasModels{ArrangementIdentifiedVerticalTraits_2::Is_on_y_identification_2} + * \cgalHasModels{AosIdentifiedVerticalTraits_2::Is_on_y_identification_2} * \cgalHasModelsEnd */ class IsOnYIdentification_2 { public: - /// \name Operations /// A model of this concept must provide: /// @{ @@ -19,15 +18,14 @@ public: /*! determines whether the point `p` lies on the horizontal identification * curve. */ - bool operator()(ArrTraits::Point& point) const; + bool operator()(AosTraits::Point& point) const; /*! determines whether the curve `cv` lies on the horizontal identification * curve. */ - bool operator()(ArrTraits::const X_monotone_curve_2& cv) const; + bool operator()(AosTraits::const X_monotone_curve_2& cv) const; /// @} - -}; /* end ArrTraits::IsOnYIdentification_2 */ +}; /* end AosTraits::IsOnYIdentification_2 */ } diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--IsVertical_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--IsVertical_2.h index e6894c911cf..811f4ca5efa 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--IsVertical_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--IsVertical_2.h @@ -1,4 +1,4 @@ -namespace ArrTraits { +namespace AosTraits { /*! \ingroup PkgArrangementOnSurface2ConceptsFunctionObjects * \cgalConcept @@ -6,22 +6,20 @@ namespace ArrTraits { * \cgalRefines{AdaptableUnaryFunction} * * \cgalHasModelsBegin - * \cgalHasModels{ArrangementBasicTraits_2::Is_vertical_2} + * \cgalHasModels{AosBasicTraits_2::Is_vertical_2} * \cgalHasModelsEnd */ class IsVertical_2 { public: - /// \name Operations /// A model of this concept must provide: /// @{ /*! determines whether `xc` is a vertical segment. */ - bool operator()(ArrTraits::X_monotone_curve_2 xc); + bool operator()(AosTraits::X_monotone_curve_2 xc); /// @} - -}; /* end ArrTraits::IsVertical_2 */ +}; /* end AosTraits::IsVertical_2 */ } diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--MakeXMonotone_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--MakeXMonotone_2.h index a86290bd333..da38e1f9f84 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--MakeXMonotone_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--MakeXMonotone_2.h @@ -1,4 +1,4 @@ -namespace ArrTraits { +namespace AosTraits { /*! \ingroup PkgArrangementOnSurface2ConceptsFunctionObjects * \cgalConcept @@ -6,7 +6,7 @@ namespace ArrTraits { * \cgalRefines{Functor} * * \cgalHasModelsBegin - * \cgalHasModels{ArrangementTraits_2::Make_x_monotone_2} + * \cgalHasModels{AosTraits_2::Make_x_monotone_2} * \cgalHasModelsEnd */ class MakeXMonotone_2 { @@ -27,13 +27,13 @@ public: * * \pre Dereferencing `oi` must yield a polymorphic object of type * `std::variant<%Point_2, X_monotone_curve_2>`, where `%Point_2` is a model - * of `ArrTraits::Point_2` and `X_monotone_curve_2` is a model of - * `ArrTraits::XMonotoneCurve_2`. + * of `AosTraits::Point_2` and `X_monotone_curve_2` is a model of + * `AosTraits::XMonotoneCurve_2`. */ template - OutputIterator operator()(ArrTraits::Curve_2 c, OutputIterator oi); + OutputIterator operator()(AosTraits::Curve_2 c, OutputIterator oi); /// @} -}; /* end ArrTraits::MakeXMonotone_2 */ +}; /* end AosTraits::MakeXMonotone_2 */ } diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--Merge_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--Merge_2.h index 0ff9c3ff392..6c8bbdf153f 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--Merge_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--Merge_2.h @@ -1,4 +1,4 @@ -namespace ArrTraits { +namespace AosTraits { /*! \ingroup PkgArrangementOnSurface2ConceptsFunctionObjects * \cgalConcept @@ -6,27 +6,25 @@ namespace ArrTraits { * \cgalRefines{Functor} * * \cgalHasModelsBegin - * \cgalHasModels{ArrangementXMonotoneTraits_2::Merge_2} + * \cgalHasModels{AosXMonotoneTraits_2::Merge_2} * \cgalHasModelsEnd */ class Merge_2 { public: - /// \name Operations /// A model of this concept must provide: /// @{ - /*! accepts two mergeable \f$ x\f$-monotone curves `xc1` and `xc2` + /*! accepts two mergeable \f$x\f$-monotone curves `xc1` and `xc2` * and assigns `xc` with the merged curve. * * \pre `are_mergeable_2`(`xc1`, `xc2`) is true. */ - void merge(ArrTraits::X_monotone_curve_2 xc1, - ArrTraits::X_monotone_curve_2 xc2, - ArrTraits::X_monotone_curve_2& xc); + void merge(AosTraits::X_monotone_curve_2 xc1, + AosTraits::X_monotone_curve_2 xc2, + AosTraits::X_monotone_curve_2& xc); /// @} - -}; /* end ArrTraits::Merge_2 */ +}; /* end AosTraits::Merge_2 */ } diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--ParameterSpaceInX_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--ParameterSpaceInX_2.h index 3f0c55da195..af9e3380718 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--ParameterSpaceInX_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--ParameterSpaceInX_2.h @@ -1,4 +1,4 @@ -namespace ArrTraits { +namespace AosTraits { /*! \ingroup PkgArrangementOnSurface2ConceptsFunctionObjects * \cgalConcept @@ -6,21 +6,20 @@ namespace ArrTraits { * \cgalRefines{AdaptableBinaryFunction} * * \cgalHasModelsBegin - * \cgalHasModels{ArrangementVerticalSideTraits_2::Parameter_space_in_x_2} - * \cgalHasModels{ArrangementOpenBoundaryTraits_2::Parameter_space_in_x_2} - * \cgalHasModels{ArrangementSphericalBoundaryTraits_2::Parameter_space_in_x_2} + * \cgalHasModels{AosVerticalSideTraits_2::Parameter_space_in_x_2} + * \cgalHasModels{AosOpenBoundaryTraits_2::Parameter_space_in_x_2} + * \cgalHasModels{AosSphericalBoundaryTraits_2::Parameter_space_in_x_2} * \cgalHasModelsEnd */ class ParameterSpaceInX_2 { public: - /// \name Operations /// A model of this concept must provide: /// @{ /*! Given an \f$x\f$-monotone curve `xcv` and an enumeration `ce` * that specifies either the minimum or the maximum end of the curve, - * determines the location of the curve end along the \f$ x\f$-dimension. The + * determines the location of the curve end along the \f$x\f$-dimension. The * variable `xcv` identifies the parametric curve \f$c(t) = (x(t), y(t))\f$ * defined over an open or half-open interval with endpoints \f$0\f$ and * \f$1\f$. The enumeration `ce` identifies an open end \f$d \in\{0,1\}\f$ of @@ -31,19 +30,18 @@ public: * `CGAL::ARR_LEFT_BOUNDARY`, `CGAL::ARR_RIGHT_BOUNDARY`, or * `CGAL::ARR_INTERIOR`, accordingly. * - * \post If `ArrTraits::Left_side_category` is convertible to + * \post If `AosTraits::Left_side_category` is convertible to * `CGAL::Arr_oblivious_side_tag` then the result is not * `CGAL::ARR_LEFT_BOUNDARY`. * - * \post If `ArrTraits::Right_side_category` is convertible to + * \post If `AosTraits::Right_side_category` is convertible to * `CGAL::Arr_oblivious_side_tag` then the result is not * `CGAL::ARR_RIGHT_BOUNDARY`. */ - CGAL::Arr_parameter_space operator()(const ArrTraits::X_monotone_curve_2& xcv, + CGAL::Arr_parameter_space operator()(const AosTraits::X_monotone_curve_2& xcv, CGAL::Arr_curve_end ce); /// @} - -}; /* end ArrTraits::ParameterSpaceInX_2 */ +}; /* end AosTraits::ParameterSpaceInX_2 */ } diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--ParameterSpaceInY_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--ParameterSpaceInY_2.h index c598003b214..a8354c2dd98 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--ParameterSpaceInY_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--ParameterSpaceInY_2.h @@ -1,4 +1,4 @@ -namespace ArrTraits { +namespace AosTraits { /*! \ingroup PkgArrangementOnSurface2ConceptsFunctionObjects * \cgalConcept @@ -6,14 +6,13 @@ namespace ArrTraits { * \cgalRefines{AdaptableBinaryFunction} * * \cgalHasModelsBegin - * \cgalHasModels{ArrangementHorizontalSideTraits_2::Parameter_space_in_y_2} - * \cgalHasModels{ArrangementOpenBoundaryTraits_2::Parameter_space_in_y_2} - * \cgalHasModels{ArrangementSphericalBoundaryTraits_2::Parameter_space_in_y_2} + * \cgalHasModels{AosHorizontalSideTraits_2::Parameter_space_in_y_2} + * \cgalHasModels{AosOpenBoundaryTraits_2::Parameter_space_in_y_2} + * \cgalHasModels{AosSphericalBoundaryTraits_2::Parameter_space_in_y_2} * \cgalHasModelsEnd */ class ParameterSpaceInY_2 { public: - /// \name Operations /// A model of this concept must provide: /// @{ @@ -22,7 +21,7 @@ public: * that specifies either the minimum or the maximum end of the curve, * determines the location of the curve end along the \f$y\f$-dimension. The * variable `xcv` identifies the parametric curve \f$c(t) = (x(t),y(t))\f$ - * defined over an open or half-open interval with endpoints \f$ 0\f$ and + * defined over an open or half-open interval with endpoints \f$0\f$ and * \f$1\f$. The enumeration `ce` identifies an open end \f$d \in\{0,1\}\f$ of * \f$c\f$. Formally, determines whether \f$\lim_{t \rightarrow d} y(t)\f$ * evaluates to \f$b_b\f$, \f$b_t\f$, or a value in between, where \f$b_b\f$ @@ -30,19 +29,18 @@ public: * of the parameter space, respectively. Returns `CGAL::ARR_BOTTOM_BOUNDARY`, * `CGAL::ARR_TOP_BOUNDARY`, or `CGAL::ARR_INTERIOR`, accordingly. * - * \post If `ArrTraits::Bottom_side_category` is convertible to + * \post If `AosTraits::Bottom_side_category` is convertible to * `CGAL::Arr_oblivious_side_tag` then the result is not * `CGAL::ARR_BOTTOM_BOUNDARY` . * - * \post If `ArrTraits::Top_side_category` is convertible to + * \post If `AosTraits::Top_side_category` is convertible to * `CGAL::Arr_oblivious_side_tag` then the result is not * `CGAL::ARR_TOP_BOUNDARY`. */ - CGAL::Arr_parameter_space operator()(const ArrTraits::X_monotone_curve_2& xcv, + CGAL::Arr_parameter_space operator()(const AosTraits::X_monotone_curve_2& xcv, CGAL::Arr_curve_end ce); -/// @} - -}; /* end ArrTraits::ParameterSpaceInY_2 */ + /// @} +}; /* end AosTraits::ParameterSpaceInY_2 */ } diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--Point_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--Point_2.h index 337ccf35ae5..8854a4a2ffa 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--Point_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--Point_2.h @@ -1,4 +1,4 @@ -namespace ArrTraits { +namespace AosTraits { /*! \ingroup PkgArrangementOnSurface2ConceptsGeometricObjects * \cgalConcept @@ -8,12 +8,9 @@ namespace ArrTraits { * \cgalRefines{CopyConstructible,Assignable,DefaultConstructible} * * \cgalHasModelsBegin - * \cgalHasModels{ArrangementBasicTraits_2::Point_2} + * \cgalHasModels{AosBasicTraits_2::Point_2} * \cgalHasModelsEnd */ -class Point_2 { -public: - -}; /* end ArrTraits::Point_2 */ +class Point_2 {}; } diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--Split_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--Split_2.h index 68a833aa549..b789dcb991c 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--Split_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--Split_2.h @@ -1,11 +1,12 @@ -namespace ArrTraits { +namespace AosTraits { + /*! \ingroup PkgArrangementOnSurface2ConceptsFunctionObjects * \cgalConcept * * \cgalRefines{Functor} * * \cgalHasModelsBegin - * \cgalHasModels{ArrangementXMonotoneTraits_2::Split_2} + * \cgalHasModels{AosXMonotoneTraits_2::Split_2} * \cgalHasModelsEnd */ class Split_2 { @@ -18,13 +19,12 @@ public: * splits `xc` at the split point into two subcurves `xc1` and `xc2`, such * that `p` is `xc1`'s right endpoint and `xc2`'s left endpoint. */ - void operator()(ArrTraits::X_monotone_curve_2 xc, - ArrTraits::Point_2 p, - ArrTraits::X_monotone_curve_2& xc1, - ArrTraits::X_monotone_curve_2& xc2); + void operator()(AosTraits::X_monotone_curve_2 xc, + AosTraits::Point_2 p, + AosTraits::X_monotone_curve_2& xc1, + AosTraits::X_monotone_curve_2& xc2); /// @} - -}; /* end ArrTraits::Split_2 */ +}; /* end AosTraits::Split_2 */ } diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--XMonotoneCurve_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--XMonotoneCurve_2.h index 3b61bb2dca4..dc21fbee02d 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--XMonotoneCurve_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--XMonotoneCurve_2.h @@ -1,4 +1,5 @@ -namespace ArrTraits { +namespace AosTraits { + /*! \ingroup PkgArrangementOnSurface2ConceptsGeometricObjects * \cgalConcept * @@ -7,12 +8,9 @@ namespace ArrTraits { * \cgalRefines{CopyConstructible,Assignable,DefaultConstructible} * * \cgalHasModelsBegin - * \cgalHasModels{ArrangementBasicTraits_2::X_monotone_curve_2} + * \cgalHasModels{AosBasicTraits_2::X_monotone_curve_2} * \cgalHasModelsEnd */ -class XMonotoneCurve_2 { -public: - -}; /* end ArrTraits::XMonotoneCurve_2 */ +class XMonotoneCurve_2 {}; } diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits_2.h index e7f2288b560..48a516342c7 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits_2.h @@ -1,90 +1,77 @@ - -/*! -\ingroup PkgArrangementOnSurface2ConceptsTraits -\cgalConcept - -The concept `ArrangementTraits_2` allows the construction of arrangement -of general planar curves. Models of this concept are used -by the free \link PkgArrangementOnSurface2Insert `CGAL::insert()` \endlink functions of the arrangement package and -by the `CGAL::Arrangement_with_history_2` class. - -A model of this concept must define the nested `Curve_2` type, which -represents a general planar curve that is not necessarily \f$ x\f$-monotone -and is not necessarily connected. Such curves are eventually subdivided into -\f$ x\f$-monotone subcurves and isolated points (represented by the `Point_2` -and `X_monotone_curve_2` types, defined in the basic traits concept). - -A model of the concept `ArrangementTraits_2` that handles arbitrary curves, -which are always \f$ x\f$-monotone, such as a traits class that handles -linear curves may define the nested types `Curve_2` and -`X_monotone_curve_2` to be of equivalent types. Moreover, defining -them as of equivalent types is advantageous, as it enables a generic -simple implementation of the nested Functor -`Make_x_monotone_2`. - -On the other hand, a model of the `ArrangementTraits_2` concept that handles -arbitrary curves, which may be not \f$ x\f$-monotone must define the -`Curve_2` and `X_monotone_curve_2` nested types to be of -different types to allow proper dispatching of the free functions -that accept such curves, such as `intsert()`. - -\cgalRefines{ArrangementXMonotoneTraits_2} - -\cgalHasModelsBegin -\cgalHasModels{CGAL::Arr_segment_traits_2} -\cgalHasModels{CGAL::Arr_non_caching_segment_traits_2} -\cgalHasModels{CGAL::Arr_linear_traits_2} -\cgalHasModels{CGAL::Arr_polyline_traits_2} -\cgalHasModels{CGAL::Arr_circle_segment_traits_2} -\cgalHasModels{CGAL::Arr_line_arc_traits_2} -\cgalHasModels{CGAL::Arr_circular_arc_traits_2} -\cgalHasModels{CGAL::Arr_circular_line_arc_traits_2} -\cgalHasModels{CGAL::Arr_conic_traits_2} -\cgalHasModels{CGAL::Arr_rational_function_traits_2} -\cgalHasModels{CGAL::Arr_Bezier_curve_traits_2} -\cgalHasModels{CGAL::Arr_algebraic_segment_traits_2} -\cgalHasModels{CGAL::Arr_curve_data_traits_2} -\cgalHasModels{CGAL::Arr_consolidated_curve_data_traits_2} -\cgalHasModelsEnd - -\sa `ArrangementBasicTraits_2` -\sa `ArrangementXMonotoneTraits_2` -\sa `ArrangementLandmarkTraits_2` - -*/ - -class ArrangementTraits_2 { +/*! \ingroup PkgArrangementOnSurface2ConceptsTraits \cgalConcept + * + * The concept `AosTraits_2` allows the construction of arrangement of + * general planar curves. Models of this concept are used by the free + * \link PkgArrangementOnSurface2Insert `CGAL::insert()` \endlink functions of + * the arrangement package and by the `CGAL::Arrangement_with_history_2` class. + * + * A model of this concept must define the nested `Curve_2` type, which + * represents a general planar curve that is not necessarily \f$x\f$-monotone + * and is not necessarily connected. Such curves are eventually subdivided into + * \f$x\f$-monotone subcurves and isolated points (represented by the `Point_2` + * and `X_monotone_curve_2` types, defined in the basic traits concept). + * + * A model of the concept `AosTraits_2` that handles arbitrary curves, + * which are always \f$x\f$-monotone, such as a traits class that handles + * linear curves may define the nested types `Curve_2` and + * `X_monotone_curve_2` to be of equivalent types. Moreover, defining + * them as of equivalent types is advantageous, as it enables a generic + * simple implementation of the nested Functor + * `Make_x_monotone_2`. + * + * On the other hand, a model of the `AosTraits_2` concept that handles + * arbitrary curves, which may be not \f$x\f$-monotone must define the + * `Curve_2` and `X_monotone_curve_2` nested types to be of + * different types to allow proper dispatching of the free functions + * that accept such curves, such as `intsert()`. + * + * \cgalRefines{AosXMonotoneTraits_2} + * + * \cgalHasModelsBegin + * \cgalHasModels{CGAL::Arr_segment_traits_2} + * \cgalHasModels{CGAL::Arr_non_caching_segment_traits_2} + * \cgalHasModels{CGAL::Arr_linear_traits_2} + * \cgalHasModels{CGAL::Arr_polyline_traits_2} + * \cgalHasModels{CGAL::Arr_circle_segment_traits_2} + * \cgalHasModels{CGAL::Arr_line_arc_traits_2} + * \cgalHasModels{CGAL::Arr_circular_arc_traits_2} + * \cgalHasModels{CGAL::Arr_circular_line_arc_traits_2} + * \cgalHasModels{CGAL::Arr_conic_traits_2} + * \cgalHasModels{CGAL::Arr_rational_function_traits_2} + * \cgalHasModels{CGAL::Arr_Bezier_curve_traits_2} + * \cgalHasModels{CGAL::Arr_algebraic_segment_traits_2} + * \cgalHasModels{CGAL::Arr_curve_data_traits_2} + * \cgalHasModels{CGAL::Arr_consolidated_curve_data_traits_2} + * \cgalHasModelsEnd + * + * \sa `AosBasicTraits_2` + * \sa `AosXMonotoneTraits_2` + * \sa `AosLandmarkTraits_2` + */ +class AosTraits_2 { public: + /// \name Types + /// @{ -/// \name Types -/// @{ + ///! models the concept `AosTraits::Curve_2`. + typedef unspecified_type Curve_2; -/*! -models the concept `ArrTraits::Curve_2`. -*/ -typedef unspecified_type Curve_2; + /// @} -/// @} + /// \name Functor Types + /// @{ -/// \name Functor Types -/// @{ + /// models the concept `AosTraits::MakeXMonotone_2`. + typedef unspecified_type Make_x_monotone_2; -/*! -models the concept `ArrTraits::MakeXMonotone_2`. -*/ -typedef unspecified_type Make_x_monotone_2; + /// @} -/// @} + /// \name Accessing Functor Objects + /// @{ -/// \name Accessing Functor Objects -/// @{ - -/*! - -*/ -Make_x_monotone_2 make_x_monotone_2_object() const; - -/// @} - -}; /* end ArrangementTraits_2 */ + /*! + */ + Make_x_monotone_2 make_x_monotone_2_object() const; + /// @} +}; /* end AosTraits_2 */ diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosVerticalRayShoot_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosVerticalRayShoot_2.h index 8ee996a9b0a..bd488ffe20a 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosVerticalRayShoot_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosVerticalRayShoot_2.h @@ -1,126 +1,111 @@ - -/*! -\ingroup PkgArrangementOnSurface2Concepts -\cgalConcept - -A model of the `ArrangementVerticalRayShoot_2` concept can answer vertical ray-shooting -queries on an arrangement attached to it. Namely, given a -`Arrangement_2::Point_2` object, representing a point in the plane, -it returns the arrangement feature (edge or vertex) that lies -strictly above it (or below it). By "strictly" we mean that if the -query point lies on an arrangement edge (or on an arrangement vertex) -this edge will not be the query result, but the feature lying -above or below it. (An exception to this rule is the degenerate case -where the query point lies in the interior of a vertical edge.) Note -that it may happen that the query point lies above the upper envelope -(or below the lower envelope) of the arrangement, and the vertical ray -emanating from the query point goes to infinity without hitting any -arrangement feature on its way. In this case the unbounded face is -returned. - -\cgalHasModelsBegin -\cgalHasModels{CGAL::Arr_naive_point_location} -\cgalHasModels{CGAL::Arr_walk_along_line_point_location} -\cgalHasModels{CGAL::Arr_trapezoid_ric_point_location} -\cgalHasModels{CGAL::Arr_landmarks_point_location} -\cgalHasModelsEnd - -\sa `CGAL::Arr_naive_point_location` -\sa `CGAL::Arr_walk_along_line_point_location` -\sa `CGAL::Arr_trapezoid_ric_point_location` -\sa `CGAL::Arr_landmarks_point_location` -\sa `CGAL::Arr_point_location_result` -*/ - -class ArrangementVerticalRayShoot_2 { +/*! \ingroup PkgArrangementOnSurface2Concepts + * \cgalConcept + * + * A model of the `AosVerticalRayShoot_2` concept can answer vertical + * ray-shooting queries on an arrangement attached to it. Namely, given a + * `Arrangement_2::Point_2` object, representing a point in the plane, it + * returns the arrangement feature (edge or vertex) that lies strictly above it + * (or below it). By "strictly" we mean that if the query point lies on an + * arrangement edge (or on an arrangement vertex) this edge will not be + * the query result, but the feature lying above or below it. (An exception to + * this rule is the degenerate case where the query point lies in the interior + * of a vertical edge.) Note that it may happen that the query point lies above + * the upper envelope (or below the lower envelope) of the arrangement, and the + * vertical ray emanating from the query point goes to infinity without hitting + * any arrangement feature on its way. In this case the unbounded face is + * returned. + * + * \cgalHasModelsBegin + * \cgalHasModels{CGAL::Arr_naive_point_location} + * \cgalHasModels{CGAL::Arr_walk_along_line_point_location} + * \cgalHasModels{CGAL::Arr_trapezoid_ric_point_location} + * \cgalHasModels{CGAL::Arr_landmarks_point_location} + * \cgalHasModelsEnd + * + * \sa `CGAL::Arr_naive_point_location` + * \sa `CGAL::Arr_walk_along_line_point_location` + * \sa `CGAL::Arr_trapezoid_ric_point_location` + * \sa `CGAL::Arr_landmarks_point_location` + * \sa `CGAL::Arr_point_location_result` + */ +class AosVerticalRayShoot_2 { public: + /// \name Types + /// @{ -/// \name Types -/// @{ + //! the associated arrangement type. + typedef unspecified_type Arrangement_2; -/*! -the associated arrangement type. -*/ -typedef unspecified_type Arrangement_2; + //! equivalent to `Arrangement_2::Point_2`. + typedef unspecified_type Point_2; -/*! -equivalent to `Arrangement_2::Point_2`. -*/ -typedef unspecified_type Point_2; + /// @} -/// @} + /// \name Creation + /// @{ -/// \name Creation -/// @{ + /*! default constructor. + */ + AosVerticalRayShoot_2(); -/*! -default constructor. -*/ -ArrangementVerticalRayShoot_2(); + /*! constructs a ray-shooting object `rs` attached to the given arrangement + * `arr`. + */ + AosVerticalRayShoot_2 (const Arrangement_2& arr); -/*! -constructs a ray-shooting object `rs` attached to the given -arrangement `arr`. -*/ -ArrangementVerticalRayShoot_2 (const Arrangement_2& arr); + /// @} -/// @} + /// \name Query Functions + /// @{ -/// \name Query Functions -/// @{ + /*! locates the arrangement feature that is first hit by an upward-directed + * vertical ray emanating from the query point `q`, and returns a handle for + * this feature. The function returns a + * discriminated union container of the following bounded types: + * + *
        + *
      • `Arrangement_2::Halfedge_const_handle`, in case the vertical + * ray hits an arrangement edge; + *
      • `Arrangement_2::Vertex_const_handle`, in case the vertical + * ray hits an arrangement vertex. + *
      • `Arrangement_2::Face_const_handle` for the unbounded arrangement + * face, in case `q` lies above the upper envelope of the arrangement. + *
      + * + * \pre `rs` is attached to a valid arrangement instance. + */ + Arr_point_location_result::Type ray_shoot_up(const Point_2& q) const; -/*! -locates the arrangement feature that is first hit by an upward-directed -vertical ray emanating from the query point `q`, -and returns a handle for this feature. The function returns a -discriminated union container of the following bounded types: -
        -
      • `Arrangement_2::Halfedge_const_handle`, in case the vertical -ray hits an arrangement edge; -
      • `Arrangement_2::Vertex_const_handle`, in case the vertical -ray hits an arrangement vertex. -
      • `Arrangement_2::Face_const_handle` for the unbounded arrangement -face, in case `q` lies above the upper envelope of the -arrangement. -
      -\pre `rs` is attached to a valid arrangement instance. -*/ -Arr_point_location_result::Type ray_shoot_up(const Point_2& q) const; + /*! locates the arrangement feature that is first hit by a downward-directed + * vertical ray emanating from the query point `q`, and returns a handle for + * this feature. The function returns a discriminated union container of the + * following bounded types: + * + *
        + *
      • `Arrangement_2::Halfedge_const_handle`, in case the vertical + * ray hits an arrangement edge; + *
      • `Arrangement_2::Vertex_const_handle`, in case the vertical + * ray hits an arrangement vertex. + *
      • `Arrangement_2::Face_const_handle` for the unbounded arrangement + * face, in case `q` lies below the lower envelope of the arrangement. + *
      + * + * \pre `rs` is attached to a valid arrangement instance. + */ + Arr_point_location_result::Type ray_shoot_down(const Point_2& q) const; -/*! -locates the arrangement feature that is first hit by a downward-directed -vertical ray emanating from the query point `q`, -and returns a handle for this feature. The function returns a -discriminated union container of the following bounded types: -
        -
      • `Arrangement_2::Halfedge_const_handle`, in case the vertical -ray hits an arrangement edge; -
      • `Arrangement_2::Vertex_const_handle`, in case the vertical -ray hits an arrangement vertex. -
      • `Arrangement_2::Face_const_handle` for the unbounded arrangement -face, in case `q` lies below the lower envelope of the -arrangement. -
      -\pre `rs` is attached to a valid arrangement instance. -*/ -Arr_point_location_result::Type ray_shoot_down (const Point_2& q) const; + /// @} -/// @} + /// \name Operations + /// @{ -/// \name Operations -/// @{ + /*! attaches `rs` to the given arrangement `arr`. + */ + void attach (const Arrangement_2& arr); -/*! -attaches `rs` to the given arrangement `arr`. -*/ -void attach (const Arrangement_2& arr); - -/*! -detaches `rs` from the arrangement it is currently attached to. -*/ -void detach (); - -/// @} - -}; /* end ArrangementVerticalRayShoot_2 */ + /*! detaches `rs` from the arrangement it is currently attached to. + */ + void detach (); + /// @} +}; /* end AosVerticalRayShoot_2 */ diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosVerticalSideTraits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosVerticalSideTraits_2.h index 88802d7ad61..0f474e380b6 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosVerticalSideTraits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosVerticalSideTraits_2.h @@ -1,7 +1,7 @@ /*! \ingroup PkgArrangementOnSurface2ConceptsTraits * \cgalConcept * - * `ArrangementVerticalSideTraits_2` is an abstract concept. It generalizes all + * `AosVerticalSideTraits_2` is an abstract concept. It generalizes all * concepts that handle curves that either reach or approach either the left or * right sizeds of the boundary of the parameter space. (An "abstract" concept * is a concept that is useless on its own.) Only a combination of this concept @@ -9,7 +9,7 @@ * remaining boundary sides (that is, bottom and top) are purposeful, and can * have models. * - * \cgalRefines{ArrangementBasicTraits_2} + * \cgalRefines{AosBasicTraits_2} * * \cgalHasModelsBegin * \cgalHasModels{CGAL::Arr_linear_traits_2} @@ -18,11 +18,10 @@ * \cgalHasModels{CGAL::Arr_geodesic_arc_on_sphere_traits_2} * \cgalHasModelsEnd * - * \sa `ArrangementVerticalSideTraits_2` + * \sa `AosVerticalSideTraits_2` */ -class ArrangementVerticalSideTraits_2 { +class AosVerticalSideTraits_2 { public: - /// \name Categories /// @{ /// @} @@ -34,10 +33,10 @@ public: /// \name Functor Types /// @{ - /// models the concept `ArrTraits::ParameterSpaceInX_2`. + /// models the concept `AosTraits::ParameterSpaceInX_2`. typedef unspecified_type Parameter_space_in_x_2; - /// models the concept `ArrTraits::CompareYNearBoundary_2`. + /// models the concept `AosTraits::CompareYNearBoundary_2`. typedef unspecified_type Compare_y_near_boundary_2; /// @} @@ -47,5 +46,4 @@ public: Parameter_space_in_x_2 parameter_space_in_x_2_object() const; Compare_y_near_boundary_2 compare_y_near_boundary_2_object() const; /// @} - -}; /* end ArrangementHorizontalSideTraits_2 */ +}; /* end AosHorizontalSideTraits_2 */ diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosWithHistoryInputFormatter.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosWithHistoryInputFormatter.h index 0e6ec4d3af8..31336368078 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosWithHistoryInputFormatter.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosWithHistoryInputFormatter.h @@ -1,78 +1,62 @@ - -/*! -\ingroup PkgArrangementOnSurface2Concepts -\cgalConcept - -A model for the `ArrangementWithHistoryInputFormatter` concept supports a set of functions that enable -reading an arrangement-with-history instance from an input stream using a -specific format. - -\cgalRefines{ArrangementInputFormatter} - -\cgalHasModelsBegin -\cgalHasModels{CGAL::Arr_with_history_text_formatter} -\cgalHasModelsEnd - -*/ - -class ArrangementWithHistoryInputFormatter { +/*! \ingroup PkgArrangementOnSurface2Concepts + * \cgalConcept + * + * A model for the `AosWithHistoryInputFormatter` concept supports a set of + * functions that enable reading an arrangement-with-history instance from an + * input stream using a specific format. + * + * \cgalRefines{AosInputFormatter} + * + * \cgalHasModelsBegin + * \cgalHasModels{CGAL::Arr_with_history_text_formatter} + * \cgalHasModelsEnd + */ +class AosWithHistoryInputFormatter { public: + /// \name Types + /// @{ -/// \name Types -/// @{ + /*! the type of arrangement to input. + */ + typedef unspecified_type Arr_with_history_2; -/*! -the type of arrangement to input. -*/ -typedef unspecified_type Arr_with_history_2; + /*! the inducing curve type. + */ + typedef typename Arrangement_2::Curve_2 Curve_2; -/*! -the inducing curve type. -*/ -typedef typename Arrangement_2::Curve_2 Curve_2; + /// @} -/// @} + /// \name Formatted Input Functions + /// @{ -/// \name Formatted Input Functions -/// @{ + /*! reads a message indicating the beginning of the inducing curves. + */ + void read_curves_begin(); -/*! -reads a message indicating the beginning of the inducing curves. -*/ -void read_curves_begin(); + /*! reads a message indicating the end of the inducing curves. + */ + void read_curves_end(); -/*! -reads a message indicating the end of the inducing curves. -*/ -void read_curves_end(); + /*! reads a message indicating the beginning of a single curve record. + */ + void read_curve_begin(); -/*! -reads a message indicating the beginning of a single curve record. -*/ -void read_curve_begin(); + /*! reads a message indicating the end of a single curve record. + */ + void read_curve_end(); -/*! -reads a message indicating the end of a single curve record. -*/ -void read_curve_end(); + /*! reads a curve. + */ + void read_curve(Curve_2& c); -/*! -reads a curve. -*/ -void read_curve (Curve_2& c); + /*! reads a message indicating the beginning of the set of edges + * induced by the current curve. + */ + void read_induced_edges_begin(); -/*! -reads a message indicating the beginning of the set of edges -induced by the current curve. -*/ -void read_induced_edges_begin(); - -/*! -reads a message indicating the end of the induced edges set. -*/ -void read_induced_edges_end(); - -/// @} - -}; /* end ArrangementWithHistoryInputFormatter */ + /*! reads a message indicating the end of the induced edges set. + */ + void read_induced_edges_end(); + /// @} +}; /* end AosWithHistoryInputFormatter */ diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosWithHistoryOutputFormatter.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosWithHistoryOutputFormatter.h index 2aa87cc1d95..b72d935a8a2 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosWithHistoryOutputFormatter.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosWithHistoryOutputFormatter.h @@ -1,21 +1,19 @@ +/*! \ingroup PkgArrangementOnSurface2Concepts + * \cgalConcept -/*! -\ingroup PkgArrangementOnSurface2Concepts -\cgalConcept - -A model for the `ArrangementWithHistoryOutputFormatter` concept supports a set of functions that enable +A model for the `AosWithHistoryOutputFormatter` concept supports a set of functions that enable writing an arrangement-with-history instance to an output stream using a specific format. -\cgalRefines{ArrangementOutputFormatter} +\cgalRefines{AosOutputFormatter} \cgalHasModelsBegin -\cgalHasModels{CGAL::Arr_with_history_text_formatter} +\cgalHasModels{CGAL::Arr_with_history_text_formatter} \cgalHasModelsEnd */ -class ArrangementWithHistoryOutputFormatter { +class AosWithHistoryOutputFormatter { public: /// \name Types @@ -74,5 +72,4 @@ void write_induced_edges_end(); /// @} -}; /* end ArrangementWithHistoryOutputFormatter */ - +}; /* end AosWithHistoryOutputFormatter */ diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosXMonotoneTraits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosXMonotoneTraits_2.h index 88cc075b5b1..c03fad48b2a 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosXMonotoneTraits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosXMonotoneTraits_2.h @@ -1,136 +1,113 @@ - -/*! -\ingroup PkgArrangementOnSurface2ConceptsTraits -\cgalConcept - -The concept `ArrangementXMonotoneTraits_2` refines the basic arrangement-traits concept. -A model of this concept is able to handle \f$ x\f$-monotone curves that -intersect in their interior (and points that coincide with curve -interiors). This is necessary for constructing arrangements of sets of -intersecting \f$ x\f$-monotone curves. - -As the resulting structure, represented by the `Arrangement_2` class, -stores pairwise interior-disjoint curves, the input curves are split at -the intersection points before being inserted into the arrangement. -A model of this refined concept therefore needs to compute the intersections -(and possibly overlaps) between two \f$ x\f$-monotone curves and to support -curve splitting. - -\cgalRefines{ArrangementBasicTraits_2} - -\cgalHasModelsBegin -\cgalHasModels{CGAL::Arr_segment_traits_2} -\cgalHasModels{CGAL::Arr_non_caching_segment_traits_2} -\cgalHasModels{CGAL::Arr_linear_traits_2} -\cgalHasModels{CGAL::Arr_polyline_traits_2} -\cgalHasModels{CGAL::Arr_circle_segment_traits_2} -\cgalHasModels{CGAL::Arr_line_arc_traits_2} -\cgalHasModels{CGAL::Arr_circular_arc_traits_2} -\cgalHasModels{CGAL::Arr_circular_line_arc_traits_2} -\cgalHasModels{CGAL::Arr_conic_traits_2} -\cgalHasModels{CGAL::Arr_rational_function_traits_2} -\cgalHasModels{CGAL::Arr_Bezier_curve_traits_2} -\cgalHasModels{CGAL::Arr_algebraic_segment_traits_2} -\cgalHasModels{CGAL::Arr_curve_data_traits_2} -\cgalHasModels{CGAL::Arr_consolidated_curve_data_traits_2} -\cgalHasModelsEnd - -\sa `ArrangementBasicTraits_2` - -*/ - -class ArrangementXMonotoneTraits_2 { +/*! \ingroup PkgArrangementOnSurface2ConceptsTraits + * \cgalConcept + * + * The concept `AosXMonotoneTraits_2` refines the basic arrangement-traits + * concept. A model of this concept is able to handle \f$x\f$-monotone curves + * that intersect in their interior (and points that coincide with curve + * interiors). This is necessary for constructing arrangements of sets of + * intersecting \f$x\f$-monotone curves. + * + * As the resulting structure, represented by the `Arrangement_2` class, stores + * pairwise interior-disjoint curves, the input curves are split at the + * intersection points before being inserted into the arrangement. A model of + * this refined concept therefore needs to compute the intersections (and + * possibly overlaps) between two \f$x\f$-monotone curves and to support curve + * splitting. + * + * \cgalRefines{AosBasicTraits_2} + * + * \cgalHasModelsBegin + * \cgalHasModels{CGAL::Arr_segment_traits_2} + * \cgalHasModels{CGAL::Arr_non_caching_segment_traits_2} + * \cgalHasModels{CGAL::Arr_linear_traits_2} + * \cgalHasModels{CGAL::Arr_polyline_traits_2} + * \cgalHasModels{CGAL::Arr_circle_segment_traits_2} + * \cgalHasModels{CGAL::Arr_line_arc_traits_2} + * \cgalHasModels{CGAL::Arr_circular_arc_traits_2} + * \cgalHasModels{CGAL::Arr_circular_line_arc_traits_2} + * \cgalHasModels{CGAL::Arr_conic_traits_2} + * \cgalHasModels{CGAL::Arr_rational_function_traits_2} + * \cgalHasModels{CGAL::Arr_Bezier_curve_traits_2} + * \cgalHasModels{CGAL::Arr_algebraic_segment_traits_2} + * \cgalHasModels{CGAL::Arr_curve_data_traits_2} + * \cgalHasModels{CGAL::Arr_consolidated_curve_data_traits_2} + * \cgalHasModelsEnd + * + * \sa `AosBasicTraits_2` + */ +class AosXMonotoneTraits_2 { public: + /// \name Types + /// @{ -/// \name Types -/// @{ + /// the multiplicity type. + typedef unspecified_type Multiplicity; -/*! -the multiplicity type. -*/ -typedef unspecified_type Multiplicity; + /// @} -/// @} + /// \name Tags + /// @{ -/// \name Tags -/// @{ + /*! indicates whether the nested functors `Are_mergeable_2` and `Merge_2` + * are provided. + */ + typedef unspecified_type Has_merge_category; -/*! -indicates whether the nested functors `Are_mergeable_2` and -`Merge_2` are provided. -*/ -typedef unspecified_type Has_merge_category; + /// @} -/// @} + /// \name Functor Types + /// @{ -/// \name Functor Types -/// @{ + /// models the concept `AosTraits::Intersect_2`. + typedef unspecified_type Intersect_2; -/*! -models the concept `ArrTraits::Intersect_2`. -*/ -typedef unspecified_type Intersect_2; + /// models the concept `AosTraits::Split_2`. + typedef unspecified_type Split_2; -/*! -models the concept `ArrTraits::Split_2`. -*/ -typedef unspecified_type Split_2; + /// @} -/// @} + /// \name + /// \attention The two following function-object types are + /// optional. If they are supported, the `Has_merge_category` tag + /// should be defined as `Tag_true` and otherwise as `Tag_false`. + /// @{ -/// \name -/// \attention The two following function-object types are -/// optional. If they are supported, the `Has_merge_category` tag -/// should be defined as `Tag_true` and otherwise as `Tag_false`. -/// @{ + /*! models the concept `AosTraits::AreMergeable_2`. + */ + typedef unspecified_type Are_mergeable_2; -/*! -models the concept `ArrTraits::AreMergeable_2`. + /*! models the concept `AosTraits::Merge_2`. + */ + typedef unspecified_type Merge_2; + /// @} + /// \name Accessing Functor Objects + /// @{ -*/ -typedef unspecified_type Are_mergeable_2; + /*! + */ + Intersect_2 intersect_2_object() const; -/*! -models the concept `ArrTraits::Merge_2`. -*/ -typedef unspecified_type Merge_2; + /*! + */ + Split_2 split_2_object() const; -/// @} + /// @} -/// \name Accessing Functor Objects -/// @{ + /// \name + /// The two following methods are optional. If they are supported, the + /// `Has_merge_category` tag should be defined as `Tag_true` and otherwise + /// as `Tag_false`. + /// @{ -/*! + /*! + */ + Are_mergeable_2 are_mergeable_2_object() const; -*/ -Intersect_2 intersect_2_object() const; - -/*! - -*/ -Split_2 split_2_object() const; - -/// @} - -/// \name -/// The two following methods are optional. If they are supported, the -/// `Has_merge_category` tag should be defined as `Tag_true` and otherwise -/// as `Tag_false`. -/// @{ - -/*! - -*/ -Are_mergeable_2 are_mergeable_2_object() const; - -/*! - -*/ -Merge_2 merge_2_object() const; - -/// @} - -}; /* end ArrangementXMonotoneTraits_2 */ + /*! + */ + Merge_2 merge_2_object() const; + /// @} +}; /* end AosXMonotoneTraits_2 */ diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/OverlayTraits.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/OverlayTraits.h index 137ccd40de4..ec00686e66b 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/OverlayTraits.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/OverlayTraits.h @@ -1,185 +1,151 @@ - -/*! -\ingroup PkgArrangementOnSurface2ConceptsTraits -\cgalConcept - -A model for the `OverlayTraits` should be able to operate on records (namely, -vertices, halfedges and faces) of two input \dcel classes, named -`Dcel_A` and `Dcel_B`, and construct the records of an output \dcel class, referred to as `Dcel_R`. - -Models for the concept are used by the global `overlay()` function to -maintain the auxiliary data stored with the \dcel records of the resulting -overlaid arrangement, based on the contents of the input records. - -\cgalHasModelsBegin -\cgalHasModels{CGAL::Arr_default_overlay_traits} -\cgalHasModels{CGAL::Arr_face_overlay_traits} -\cgalHasModelsEnd - -\sa `overlay` - -*/ - +/*! \ingroup PkgArrangementOnSurface2ConceptsTraits + * \cgalConcept + * + * A model for the `OverlayTraits` should be able to operate on records (namely, + * vertices, halfedges and faces) of two input \dcel classes, named `Dcel_A` and + * `Dcel_B`, and construct the records of an output \dcel class, referred to as + * `Dcel_R`. + * + * Models for the concept are used by the global `overlay()` function to + * maintain the auxiliary data stored with the \dcel records of the resulting + * overlaid arrangement, based on the contents of the input records. + * + * \cgalHasModelsBegin + * \cgalHasModels{CGAL::Arr_default_overlay_traits} + * \cgalHasModels{CGAL::Arr_face_overlay_traits} + * \cgalHasModelsEnd + * + * \sa `overlay` + */ class OverlayTraits { public: + /// \name Types + /// @{ -/// \name Types -/// @{ + //! a constant handle a vertex in `Dcel_A`. + typedef unspecified_type Vertex_handle_A; -/*! -a constant handle a vertex in `Dcel_A`. -*/ -typedef unspecified_type Vertex_handle_A; + //! a constant handle to a halfedge in `Dcel_A`. + typedef unspecified_type Halfedge_handle_A; -/*! -a constant handle to a halfedge in `Dcel_A`. -*/ -typedef unspecified_type Halfedge_handle_A; + //! a constant handle to a face `Dcel_A`. + typedef unspecified_type Face_handle_A; -/*! -a constant handle to a face `Dcel_A`. -*/ -typedef unspecified_type Face_handle_A; + //! a constant handle to a vertex in `Dcel_B`. + typedef unspecified_type Vertex_handle_B; -/*! -a constant handle to a vertex in `Dcel_B`. -*/ -typedef unspecified_type Vertex_handle_B; + //! a constant handle to a halfedge in `Dcel_B`. + typedef unspecified_type Halfedge_handle_B; -/*! -a constant handle to a halfedge in `Dcel_B`. -*/ -typedef unspecified_type Halfedge_handle_B; + //! a constant handle to a face in `Dcel_B`. + typedef unspecified_type Face_handle_B; -/*! -a constant handle to a face in `Dcel_B`. -*/ -typedef unspecified_type Face_handle_B; + //! a handle to a vertex in `Dcel_R`. + typedef unspecified_type Vertex_handle_R; -/*! -a handle to a vertex in `Dcel_R`. -*/ -typedef unspecified_type Vertex_handle_R; + //! a handle to a halfedge in `Dcel_R`. + typedef unspecified_type Halfedge_handle_R; -/*! -a handle to a halfedge in `Dcel_R`. -*/ -typedef unspecified_type Halfedge_handle_R; + //! a handle to a faces in `Dcel_R`. + typedef unspecified_type Face_handle_R; -/*! -a handle to a faces in `Dcel_R`. -*/ -typedef unspecified_type Face_handle_R; + /// @} -/// @} + /// \name Vertex Creation + /// Whenever a vertex in the overlaid arrangement is created, one of + /// the following functions is called in order to attach the + /// appropriate auxiliary data to this vertex: + /// @{ -/// \name Vertex Creation -/// Whenever a vertex in the overlaid arrangement is created, one of -/// the following functions is called in order to attach the -/// appropriate auxiliary data to this vertex: -/// @{ + /*! constructs the vertex `v` induced by the coinciding vertices + * `v1` and `v2`. + */ + void create_vertex(Vertex_handle_A v1, + Vertex_handle_B v2, + Vertex_handle_R v) const; -/*! -constructs the vertex `v` induced by the coinciding vertices -`v1` and `v2`. -*/ -void create_vertex (Vertex_handle_A v1, -Vertex_handle_B v2, -Vertex_handle_R v) const; + /*! constructs the vertex `v` induced by the vertex `v1` that lies on + * the halfedge `e2`. + */ + void create_vertex(Vertex_handle_A v1, + Halfedge_handle_B e2, + Vertex_handle_R v) const; -/*! -constructs the vertex `v` induced by the vertex `v1` that lies on -the halfedge `e2`. -*/ -void create_vertex (Vertex_handle_A v1, -Halfedge_handle_B e2, -Vertex_handle_R v) const; + /*! constructs the vertex `v` induced by the vertex `v1` that lies + * inside the face `f2`. + */ + void create_vertex(Vertex_handle_A v1, + Face_handle_B f2, + Vertex_handle_R v) const; -/*! -constructs the vertex `v` induced by the vertex `v1` that lies -inside the face `f2`. -*/ -void create_vertex (Vertex_handle_A v1, -Face_handle_B f2, -Vertex_handle_R v) const; + /*! constructs the vertex `v` induced by the vertex `v2` that lies on + * the halfedge `e1`. + */ + void create_vertex(Halfedge_handle_A e1, + Vertex_handle_B v2, + Vertex_handle_R v) const; -/*! -constructs the vertex `v` induced by the vertex `v2` that lies on -the halfedge `e1`. -*/ -void create_vertex (Halfedge_handle_A e1, -Vertex_handle_B v2, -Vertex_handle_R v) const; + /*! constructs the vertex `v` induced by the vertex `v2` that lies + * inside the face `f1`. + */ + void create_vertex(Face_handle_A f1, + Vertex_handle_B v2, + Vertex_handle_R v) const; -/*! -constructs the vertex `v` induced by the vertex `v2` that lies -inside the face `f1`. -*/ -void create_vertex (Face_handle_A f1, -Vertex_handle_B v2, -Vertex_handle_R v) const; + /*! constructs the vertex `v` induced by the intersection of the + halfedges `e1` and `e2`. + */ + void create_vertex(Halfedge_handle_A e1, + Halfedge_handle_B e2, + Vertex_handle_R v) const; + /// @} -/*! -constructs the vertex `v` induced by the intersection of the -halfedges `e1` and `e2`. -*/ -void create_vertex (Halfedge_handle_A e1, -Halfedge_handle_B e2, -Vertex_handle_R v) const; -/// @} + /// \name Edge Creation + /// Whenever an edge in the overlaid arrangement is created, one of + /// the following functions is called in order to attach the + /// appropriate auxiliary data to this vertex. Note that an edge is + /// created after both its end-vertices are created, (and the + /// corresponding `create_vertex()` methods were invoked). In all + /// cases, the edge is represented by a halfedge `e` directed in + /// lexicographic decreasing order (from right to left). The + /// `create_edge()` method should attach auxiliary data to the twin + /// halfedge (namely to `e->twin()`) as well: + /// @{ -/// \name Edge Creation -/// Whenever an edge in the overlaid arrangement is created, one of -/// the following functions is called in order to attach the -/// appropriate auxiliary data to this vertex. Note that an edge is -/// created after both its end-vertices are created, (and the -/// corresponding `create_vertex()` methods were invoked). In all -/// cases, the edge is represented by a halfedge `e` directed in -/// lexicographic decreasing order (from right to left). The -/// `create_edge()` method should attach auxiliary data to the twin -/// halfedge (namely to `e->twin()`) as well: -/// @{ + /*! constructs the halfedge `e` induced by an overlap between the + * halfedges `e1` and `e2`. + */ + void create_edge(Halfedge_handle_A e1, + Halfedge_handle_B e2, + Halfedge_handle_R e) const; -/*! -constructs the halfedge `e` induced by an overlap between the -halfedges `e1` and `e2`. -*/ -void create_edge (Halfedge_handle_A e1, -Halfedge_handle_B e2, -Halfedge_handle_R e) const; + /*! constructs the halfedge `e` induced by the halfedge `e1` that lies + * inside the face `f2`. + */ + void create_edge(Halfedge_handle_A e1, + Face_handle_B f2, + Halfedge_handle_R e) const; -/*! -constructs the halfedge `e` induced by the halfedge `e1` that lies -inside the face `f2`. -*/ -void create_edge (Halfedge_handle_A e1, -Face_handle_B f2, -Halfedge_handle_R e) const; + /*! constructs the halfedge `e` induced by the halfedge `e2` that lies + * inside the face `f1`. + */ + void create_edge(Face_handle_A f1, + Halfedge_handle_B e2, + Halfedge_handle_R e) const; + /// @} + /// \name Face Creation + /// The following function is invoked whenever a new face is + /// created. It is guaranteed that all halfedges along the face + /// boundary have already been created an have their auxiliary data + /// fields attached to them: + /// @{ -/*! -constructs the halfedge `e` induced by the halfedge `e2` that lies -inside the face `f1`. -*/ -void create_edge (Face_handle_A f1, -Halfedge_handle_B e2, -Halfedge_handle_R e) const; -/// @} -/// \name Face Creation -/// The following function is invoked whenever a new face is -/// created. It is guaranteed that all halfedges along the face -/// boundary have already been created an have their auxiliary data -/// fields attached to them: -/// @{ - -/*! -constructs the face `f` induced by the an overlap between the -faces `f1` and `f2`. -*/ -void create_face (Face_handle_A f1, -Face_handle_B f2, -Face_handle_R f) const; - -/// @} + /*! constructs the face `f` induced by the an overlap between the + * faces `f1` and `f2`. + */ + void create_face(Face_handle_A f1, + Face_handle_B f2, + Face_handle_R f) const; + /// @} }; /* end OverlayTraits */ - diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/PackageDescription.txt b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/PackageDescription.txt index 1a82a431b56..2b9606a9977 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/PackageDescription.txt +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/PackageDescription.txt @@ -5,7 +5,7 @@ /// \cgalConceptNamespace /// The namespace containing concepts specific to Arrangements. -namespace ArrTraits {} +namespace AosTraits {} /// \defgroup PkgArrangementOnSurface2ConceptsTopologyTraits Topology Traits Concepts /// \ingroup PkgArrangementOnSurface2Concepts @@ -82,11 +82,11 @@ namespace ArrTraits {} \cgalPkgShortInfoEnd \cgalPkgDescriptionEnd -Given a set \f$ \mathcal{C}\f$ of planar curves, the arrangement +Given a set \f$\mathcal{C}\f$ of planar curves, the arrangement \f$ {\mathcal A}({\mathcal C})\f$ is the subdivision of the plane induced -by the curves in \f$ \mathcal{C}\f$ into maximally connected cells. The cells -can be \f$ 0\f$-dimensional (vertices), \f$ 1\f$-dimensional (edges) -or \f$ 2\f$-dimensional (faces). +by the curves in \f$\mathcal{C}\f$ into maximally connected cells. The cells +can be \f$0\f$-dimensional (vertices), \f$1\f$-dimensional (edges) +or \f$2\f$-dimensional (faces). The class `Arrangement_2` encapsulates a data structure that maintains arrangements of arbitrary bounded planar curves. It comes @@ -112,85 +112,86 @@ implemented as peripheral classes or as free (global) functions. \cgalCRPSection{Concepts} -- `ArrangementDcel` -- `ArrangementDcelWithRebind` -- `ArrangementDcelVertex` -- `ArrangementDcelHalfedge` -- `ArrangementDcelFace` -- `ArrangementDcelOuterCcb` -- `ArrangementDcelInnerCcb` -- `ArrangementDcelIsolatedVertex` -- `ArrangementBasicTopologyTraits` -- `ArrangementBasicTraits_2` -- `ArrangementConstructXMonotoneCurveTraits_2` -- `ArrangementConstructCurveTraits_2` -- `ArrangementLandmarkTraits_2` -- `ArrangementXMonotoneTraits_2` -- `ArrangementTraits_2` -- `ArrangementHorizontalSideTraits_2` -- `ArrangementVerticalSideTraits_2` -- `ArrangementIdentifiedVerticalTraits_2` -- `ArrangementIdentifiedHorizontalTraits_2` -- `ArrangementOpenBoundaryTraits_2` -- `ArrangementSphericalBoundaryTraits_2` -- `ArrangementInputFormatter` -- `ArrangementOutputFormatter` -- `ArrangementWithHistoryInputFormatter` -- `ArrangementWithHistoryOutputFormatter` -- `ArrangementPointLocation_2` -- `ArrangementVerticalRayShoot_2` -- `ArrangementOpenLeftTraits_2` -- `ArrangementOpenRightTraits_2` -- `ArrangementOpenBottomTraits_2` -- `ArrangementOpenTopTraits_2` -- `ArrangementClosedLeftTraits_2` -- `ArrangementClosedRightTraits_2` -- `ArrangementClosedBottomTraits_2` -- `ArrangementClosedTopTraits_2` -- `ArrangementContractedLeftTraits_2` -- `ArrangementContractedRightTraits_2` -- `ArrangementContractedBottomTraits_2` -- `ArrangementContractedTopTraits_2` -- `ArrangementLeftSideTraits_2` -- `ArrangementRightSideTraits_2` -- `ArrangementBottomSideTraits_2` -- `ArrangementTopSideTraits_2` -- `ArrangementTopologyTraits` +- `AosApproximateTraits_2` +- `AosBasicTopologyTraits` +- `AosBasicTraits_2` +- `AosBottomSideTraits_2` +- `AosClosedBottomTraits_2` +- `AosClosedLeftTraits_2` +- `AosClosedRightTraits_2` +- `AosClosedTopTraits_2` +- `AosConstructCurveTraits_2` +- `AosConstructXMonotoneCurveTraits_2` +- `AosContractedBottomTraits_2` +- `AosContractedLeftTraits_2` +- `AosContractedRightTraits_2` +- `AosContractedTopTraits_2` +- `AosDcel` +- `AosDcelFace` +- `AosDcelHalfedge` +- `AosDcelInnerCcb` +- `AosDcelIsolatedVertex` +- `AosDcelOuterCcb` +- `AosDcelVertex` +- `AosDcelWithRebind` +- `AosHorizontalSideTraits_2` +- `AosIdentifiedHorizontalTraits_2` +- `AosIdentifiedVerticalTraits_2` +- `AosInputFormatter` +- `AosLandmarkTraits_2` +- `AosLeftSideTraits_2` +- `AosOpenBottomTraits_2` +- `AosOpenBoundaryTraits_2` +- `AosOpenLeftTraits_2` +- `AosOpenRightTraits_2` +- `AosOpenTopTraits_2` +- `AosOutputFormatter` +- `AosPointLocation_2` +- `AosRightSideTraits_2` +- `AosSphericalBoundaryTraits_2` +- `AosTopologyTraits` +- `AosTopSideTraits_2` +- `AosTraits_2` +- `AosVerticalRayShoot_2` +- `AosVerticalSideTraits_2` +- `AosWithHistoryInputFormatter` +- `AosWithHistoryOutputFormatter` +- `AosXMonotoneTraits_2` \cgalCRPSection{Geometric Object Concepts} -- `ArrTraits::Point_2` -- `ArrTraits::XMonotoneCurve_2` -- `ArrTraits::Curve_2` +- `AosTraits::Point_2` +- `AosTraits::XMonotoneCurve_2` +- `AosTraits::Curve_2` \cgalCRPSection{Function Object Concepts} -- `ArrTraits::CompareX_2` -- `ArrTraits::CompareXy_2` -- `ArrTraits::ConstructMinVertex_2` -- `ArrTraits::ConstructMaxVertex_2` -- `ArrTraits::IsVertical_2` -- `ArrTraits::IsOnXIdentification_2` -- `ArrTraits::IsOnYIdentification_2` -- `ArrTraits::CompareYAtX_2` -- `ArrTraits::CompareYAtXLeft_2` -- `ArrTraits::CompareYAtXRight_2` -- `ArrTraits::Equal_2` -- `ArrTraits::ParameterSpaceInX_2` -- `ArrTraits::ParameterSpaceInY_2` -- `ArrTraits::CompareXOnBoundary_2` -- `ArrTraits::CompareYOnBoundary_2` -- `ArrTraits::CompareXNearBoundary_2` -- `ArrTraits::CompareYNearBoundary_2` -- `ArrTraits::CompareXOnBoundaryOfCurveEnd_2` -- `ArrTraits::Intersect_2` -- `ArrTraits::Split_2` -- `ArrTraits::AreMergeable_2` -- `ArrTraits::Merge_2` -- `ArrTraits::MakeXMonotone_2` -- `ArrTraits::Approximate_2` -- `ArrTraits::ConstructXMonotoneCurve_2` -- `ArrTraits::ConstructCurve_2` +- `AosTraits::CompareX_2` +- `AosTraits::CompareXy_2` +- `AosTraits::ConstructMinVertex_2` +- `AosTraits::ConstructMaxVertex_2` +- `AosTraits::IsVertical_2` +- `AosTraits::IsOnXIdentification_2` +- `AosTraits::IsOnYIdentification_2` +- `AosTraits::CompareYAtX_2` +- `AosTraits::CompareYAtXLeft_2` +- `AosTraits::CompareYAtXRight_2` +- `AosTraits::Equal_2` +- `AosTraits::ParameterSpaceInX_2` +- `AosTraits::ParameterSpaceInY_2` +- `AosTraits::CompareXOnBoundary_2` +- `AosTraits::CompareYOnBoundary_2` +- `AosTraits::CompareXNearBoundary_2` +- `AosTraits::CompareYNearBoundary_2` +- `AosTraits::CompareXOnBoundaryOfCurveEnd_2` +- `AosTraits::Intersect_2` +- `AosTraits::Split_2` +- `AosTraits::AreMergeable_2` +- `AosTraits::Merge_2` +- `AosTraits::MakeXMonotone_2` +- `AosTraits::Approximate_2` +- `AosTraits::ConstructXMonotoneCurve_2` +- `AosTraits::ConstructCurve_2` \cgalCRPSection{Classes} diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/fig_src/central_concept_cluster.tex b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/fig_src/central_concept_cluster.tex index 17589bef685..7c453859f46 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/fig_src/central_concept_cluster.tex +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/fig_src/central_concept_cluster.tex @@ -8,11 +8,11 @@ fill=white,blur shadow,rounded corners,align=center}} \begin{document} \begin{forest} - [\name{ArrangementBasicTraits\_2}, + [\name{AosBasicTraits\_2}, forked edges, for tree={concept,edge={-latex}} - [\name{ArrangementXMonotoneTraits\_2} - [\name{ArrangementTraits\_2}] + [\name{AosXMonotoneTraits\_2} + [\name{AosTraits\_2}] ] ] \end{forest} diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/fig_src/identified_clusters.tex b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/fig_src/identified_clusters.tex index 8276d12593e..59b1f663b73 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/fig_src/identified_clusters.tex +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/fig_src/identified_clusters.tex @@ -5,14 +5,14 @@ \psset{treevshift=0,unit=1em,xunit=2em,yunit=1em,everytree={},etcratio=.75,triratio=.5} \jtree[everylabel=\sl,xunit=70pt,arrows=->] \! = {} - <4wideleft>[scaleby=2.24 0,arrows=-,linestyle=none]{\psframebox{\concept{ArrangementLeftSideTraits\_2}}}@lt !lt + <4wideleft>[scaleby=2.24 0,arrows=-,linestyle=none]{\psframebox{\concept{AosLeftSideTraits\_2}}}@lt !lt ^[scaleby=1.15 0,arrows=-,linestyle=none]{\psframebox{\concept{ArrangemenRightSideTraits\_2}}}@rt !rt ^[scaleby=1.15 0,arrows=-,linestyle=none]{\psframebox{\concept{ArrangemenBottomSideTraits\_2}}}@bt !bt ^<4wideright>[scaleby=2.26 0,arrows=-,linestyle=none]{\psframebox{\concept{ArrangemenTopSideTraits\_2}}}@tt !tt . - \!lt = [scaleby=1.08 1]{\psframebox{\concept{ArrangementIdentifiedVerticalTraits\_2}}}@ivt !ivt + \!lt = [scaleby=1.08 1]{\psframebox{\concept{AosIdentifiedVerticalTraits\_2}}}@ivt !ivt . - \!bt = [scaleby=1.17 1]{\psframebox{\concept{ArrangementIdentifiedHorizontalTraits\_2}}}@iht !iht + \!bt = [scaleby=1.17 1]{\psframebox{\concept{AosIdentifiedHorizontalTraits\_2}}}@iht !iht . \ncline{rt:b}{ivt:t} \ncline{tt:b}{iht:t} diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/fig_src/landmark_concept_cluster.tex b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/fig_src/landmark_concept_cluster.tex index 60a04859ea5..f85659c3a0a 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/fig_src/landmark_concept_cluster.tex +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/fig_src/landmark_concept_cluster.tex @@ -8,14 +8,14 @@ fill=white,blur shadow,rounded corners,align=center}} \begin{document} \begin{forest} - [\name{ArrangementBasicTraits\_2},name=abt, + [\name{AosBasicTraits\_2},name=abt, % forked edges, for tree={concept,edge={-latex}} - [\name{ArrangementApproximateTraits\_2} + [\name{AosApproximateTraits\_2} [,phantom] - [\name{ArrangementLandmarkTraits\_2},name=alt,before drawing tree={x=0}] + [\name{AosLandmarkTraits\_2},name=alt,before drawing tree={x=0}] ] - [\name{ArrangementConstructXMonotoneCurveTraits\_2},name=acxmt] + [\name{AosConstructXMonotoneCurveTraits\_2},name=acxmt] ] \draw[-latex] (acxmt) to (alt); \end{forest} diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/fig_src/left_side_cluster.tex b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/fig_src/left_side_cluster.tex index 1cf36b78cec..f46f94e0805 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/fig_src/left_side_cluster.tex +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/fig_src/left_side_cluster.tex @@ -4,11 +4,11 @@ \begin{document} \psset{treevshift=0,unit=1em,xunit=2em,yunit=1em,everytree={},etcratio=.75,triratio=.5} \jtree[everylabel=\sl,xunit=70pt,arrows=->] - \! = {\psframebox{\concept{ArrangementLeftSideTraits\_2}}} - <4wideleft>[scaleby=2.44 1]{\psframebox{\concept{ArrangementOpenLeftTraits\_2}}}@ult !ult - ^[scaleby=1.37 1]{\psframebox{\concept{ArrangementClosedLeftTraits\_2}}}@urt !urt - ^[scaleby=1.12 1]{\psframebox{\concept{ArrangementContractedLeftTraits\_2}}}@ubt !ubt - ^<4wideright>[scaleby=2.56 1]{\psframebox{\concept{ArrangementIdentifiedVerticalTraits\_2}}}@utt !utt + \! = {\psframebox{\concept{AosLeftSideTraits\_2}}} + <4wideleft>[scaleby=2.44 1]{\psframebox{\concept{AosOpenLeftTraits\_2}}}@ult !ult + ^[scaleby=1.37 1]{\psframebox{\concept{AosClosedLeftTraits\_2}}}@urt !urt + ^[scaleby=1.12 1]{\psframebox{\concept{AosContractedLeftTraits\_2}}}@ubt !ubt + ^<4wideright>[scaleby=2.56 1]{\psframebox{\concept{AosIdentifiedVerticalTraits\_2}}}@utt !utt . \endjtree \psset{treevshift=0,unit=1cm,xunit=1cm,yunit=1cm,everytree={}, diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/fig_src/open_concept_hierarchy.tex b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/fig_src/open_concept_hierarchy.tex index c44d6ebe93e..1cc69a6cfc3 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/fig_src/open_concept_hierarchy.tex +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/fig_src/open_concept_hierarchy.tex @@ -5,12 +5,12 @@ \psset{treevshift=0,unit=1em,xunit=2em,yunit=1em,everytree={},etcratio=.75,triratio=.5} \jtree[everylabel=\sl,xunit=70pt,arrows=->] \! = {} - <4wideleft>[scaleby=2.35 0,arrows=-,linestyle=none]{\psframebox{\concept{ArrangementOpenLeftTraits\_2}}}@ult !ult - ^[scaleby=1.21 0,arrows=-,linestyle=none]{\psframebox{\concept{ArrangemenOpenRightTraits\_2}}}@urt !urt - ^[scaleby=1.18 0,arrows=-,linestyle=none]{\psframebox{\concept{ArrangemenOpenBottomTraits\_2}}}@ubt !ubt - ^<4wideright>[scaleby=2.35 0,arrows=-,linestyle=none]{\psframebox{\concept{ArrangemenOpenTopTraits\_2}}}@utt !utt + <4wideleft>[scaleby=2.35 0,arrows=-,linestyle=none]{\psframebox{\concept{AosOpenLeftTraits\_2}}}@ult !ult + ^[scaleby=1.21 0,arrows=-,linestyle=none]{\psframebox{\concept{AosOpenRightTraits\_2}}}@urt !urt + ^[scaleby=1.18 0,arrows=-,linestyle=none]{\psframebox{\concept{AosOpenBottomTraits\_2}}}@ubt !ubt + ^<4wideright>[scaleby=2.35 0,arrows=-,linestyle=none]{\psframebox{\concept{AosOpenTopTraits\_2}}}@utt !utt . - \!ult = <4wideright>[scaleby=2.10 1]{\psframebox{\concept{ArrangementOpenBoundaryTraits\_2}}}@ut !ut + \!ult = <4wideright>[scaleby=2.10 1]{\psframebox{\concept{AosOpenBoundaryTraits\_2}}}@ut !ut . \ncline{urt:b}{ut:t} \ncline{ubt:b}{ut:t} diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/fig_src/side_clusters.tex b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/fig_src/side_clusters.tex index 141b2c2ed33..2c54693f17f 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/fig_src/side_clusters.tex +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/fig_src/side_clusters.tex @@ -5,14 +5,14 @@ \psset{treevshift=0,unit=1em,xunit=2em,yunit=1em,everytree={},etcratio=.75,triratio=.5} \jtree[everylabel=\sl,xunit=70pt,arrows=->] \! = {} - [scaleby=2.31 0,arrows=-,linestyle=none]{\psframebox{\concept{ArrangementVerticalSideTraits\_2}}}@vst !vst + [scaleby=2.31 0,arrows=-,linestyle=none]{\psframebox{\concept{AosVerticalSideTraits\_2}}}@vst !vst ^[scaleby=2.31 0,arrows=-,linestyle=none]{\psframebox{\concept{ArrangemenHorizontalSideTraits\_2}}}@hst !hst . - \!hst = [scaleby=1.15 1]{\psframebox{\concept{ArrangementBottomSideTraits\_2}}}@bst !bst - ^[scaleby=1.15 1]{\psframebox{\concept{ArrangementTopSideTraits\_2}}}@tst !tst + \!hst = [scaleby=1.15 1]{\psframebox{\concept{AosBottomSideTraits\_2}}}@bst !bst + ^[scaleby=1.15 1]{\psframebox{\concept{AosTopSideTraits\_2}}}@tst !tst . - \!vst = [scaleby=1.12 1]{\psframebox{\concept{ArrangementLeftSideTraits\_2}}}@lst !lst - ^[scaleby=1.12 1]{\psframebox{\concept{ArrangementRightSideTraits\_2}}}@rst !rst + \!vst = [scaleby=1.12 1]{\psframebox{\concept{AosLeftSideTraits\_2}}}@lst !lst + ^[scaleby=1.12 1]{\psframebox{\concept{AosRightSideTraits\_2}}}@rst !rst . \endjtree \psset{treevshift=0,unit=1cm,xunit=1cm,yunit=1cm,everytree={}, diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/fig_src/spherical_concept_hierarchy.tex b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/fig_src/spherical_concept_hierarchy.tex index bdb8ce0845a..63bfb2e66e1 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/fig_src/spherical_concept_hierarchy.tex +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/fig_src/spherical_concept_hierarchy.tex @@ -5,11 +5,11 @@ \psset{treevshift=0,unit=1em,xunit=2em,yunit=1em,everytree={},etcratio=.75,triratio=.5} \jtree[everylabel=\sl,xunit=70pt,arrows=->] \! = {} - [scaleby=2.81 0,arrows=-,linestyle=none]{\psframebox{\concept{ArrangementIdentifiedVerticalTraits\_2}}}@uvt !uvt - ^[scaleby=1 0,arrows=-,linestyle=none]{\psframebox{\concept{ArrangementContractedBottomTraits\_2}}}@ubt !ubt - ^[scaleby=2.73 0,arrows=-,linestyle=none]{\psframebox{\concept{ArrangementContractedTopTraits\_2}}}@utt !utt + [scaleby=2.81 0,arrows=-,linestyle=none]{\psframebox{\concept{AosIdentifiedVerticalTraits\_2}}}@uvt !uvt + ^[scaleby=1 0,arrows=-,linestyle=none]{\psframebox{\concept{AosContractedBottomTraits\_2}}}@ubt !ubt + ^[scaleby=2.73 0,arrows=-,linestyle=none]{\psframebox{\concept{AosContractedTopTraits\_2}}}@utt !utt . - \!ubt = [scaleby=1 1]{\psframebox{\concept{ArrangementSphericalBoundaryTraits\_2}}}@ut !ut + \!ubt = [scaleby=1 1]{\psframebox{\concept{AosSphericalBoundaryTraits\_2}}}@ut !ut . \ncline{uvt:b}{ut:t} \ncline{utt:b}{ut:t} From 35321e38bac48b1d13500747dfe495a3cb2a3d68 Mon Sep 17 00:00:00 2001 From: Efi Fogel Date: Wed, 28 Aug 2024 15:49:05 +0300 Subject: [PATCH 03/63] Renamed concept AosApproximateTraits_2 => AosApproximatePointTraits_2 to make room for the new AosApproximateTraits_2 concept --- .../Arrangement_on_surface_2.txt | 12 ++++++------ .../CGAL/Arr_polycurve_traits_2.h | 10 ++++------ .../CGAL/Arr_polyline_traits_2.h | 7 ++++--- ...imateTraits_2.h => AosApproximatePointTraits_2.h} | 4 ++-- .../Concepts/AosConstructXMonotoneCurveTraits_2.h | 2 +- .../Concepts/AosLandmarkTraits_2.h | 4 ++-- .../Concepts/AosTraits--Approximate_2.h | 2 +- .../Arrangement_on_surface_2/PackageDescription.txt | 2 +- .../fig_src/landmark_concept_cluster.tex | 2 +- 9 files changed, 22 insertions(+), 23 deletions(-) rename Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/{AosApproximateTraits_2.h => AosApproximatePointTraits_2.h} (91%) diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Arrangement_on_surface_2.txt b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Arrangement_on_surface_2.txt index ff97c34c384..f91e2d46607 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Arrangement_on_surface_2.txt +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Arrangement_on_surface_2.txt @@ -3487,11 +3487,11 @@ where the `GeomTraits` parameter is substituted by a model of the concept `AosLandmarkTraits_2`. (Naturally, it can also model either the `AosXMonotoneTraits_2` concept or the `AosTraits_2` concept.) The `AosLandmarkTraits_2` -concept refines the two concepts `AosApproximateTraits_2` and +concept refines the two concepts `AosApproximatePointTraits_2` and `AosConstructXMonotoneCurveTraits_2`. Each of these two concepts, in turn, refines the concept `AosBasicTraits_2`. -A model of the `AosApproximateTraits_2` concept must define a +A model of the `AosApproximatePointTraits_2` concept must define a fixed precision number type (typically the double-precision floating-point `double`) and support the operation below (in addition to fulfilling the requirements listed by the `AosBasicTraits_2` @@ -3499,7 +3499,7 @@ concept).
      -
      \link AosApproximateTraits_2::Approximate_2 `Approximate_2`\endlink: +
      \link AosApproximatePointTraits_2::Approximate_2 `Approximate_2`\endlink:
      Given a point `p`, approximate the \f$x\f$ and \f$y\f$-coordinates of `p` using a not necessarily multi-precision number type. We use this operation for approximate @@ -4251,10 +4251,10 @@ a geometry-traits class that models the same four concepts. We refer to the type that substitutes the template parameter `SubcurveTraits_2` as the subcurve traits hereafter. If, in addition, the subcurve traits also models the concept -`AosApproximateTraits_2` then the instantiated +`AosApproximatePointTraits_2` then the instantiated `Arr_polyline_traits_2` type models the concept -`AosApproximateTraits_2` as well. (By definition, modeling the -concepts `AosApproximateTraits_2` and +`AosApproximatePointTraits_2` as well. (By definition, modeling the +concepts `AosApproximatePointTraits_2` and `AosConstructXMonotoneCurveTraits_2` implies modeling the concept `AosLandmarkTraits_2`.) Similarly, if the subcurve traits also models the concept `AosOpenBoundaryTraits_2` then diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_polycurve_traits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_polycurve_traits_2.h index 1068f58dd7d..2a1fad853ae 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_polycurve_traits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_polycurve_traits_2.h @@ -28,7 +28,7 @@ namespace CGAL { * - `AosDirectionalXMonotoneTraits_2`. * * If, in addition, the SubcurveTraits_2 models the concept - * `AosApproximateTraits_2` then `Arr_polycurve_traits_2` models this + * `AosApproximatePointTraits_2` then `Arr_polycurve_traits_2` models this * concept as well. The same holds for the concept * `AosOpenBoundaryTraits_2`. If no type is provided, then * `Arr_segment_traits_2` (instantiated with @@ -74,7 +74,7 @@ namespace CGAL { * included. * * \cgalModels{AosTraits_2,AosDirectionalXMonotoneTraits_2, - * AosApproximateTraits_2 (if the type that substitutes + * AosApproximatePointTraits_2 (if the type that substitutes * the template parameter `SubcurveTraits_2` models the concept as well)} * * \sa `Arr_algebraic_segment_traits_2` @@ -286,13 +286,11 @@ public: /// \name Types /// @{ - /*! The container of the subcurves that comprises the polycurve. - */ + /// The container of the subcurves that comprises the polycurve. typedef typename std::vector Subcurves_container; public: - /*! The size of the container that comprises the polycurve. - */ + /// The size of the container that comprises the polycurve. typedef typename Subcurves_container::size_type Size; typedef typename Subcurves_container::size_type size_type; diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_polyline_traits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_polyline_traits_2.h index ea9dff66c90..31599102e75 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_polyline_traits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_polyline_traits_2.h @@ -36,7 +36,7 @@ namespace CGAL { * - `AosConstructCurveTraits_2`. * * If, in addition, the GeometryTraits_2 models the concept - * `AosApproximateTraits_2` then `Arr_polycurve_traits_2` models + * `AosApproximatePointTraits_2` then `Arr_polycurve_traits_2` models * this concept as well. The same holds for the concept * `AosOpenBoundaryTraits_2`. If no type is provided, then * `Arr_segment_traits_2` (instantiated with @@ -77,8 +77,9 @@ namespace CGAL { * the macro `CGAL_ALWAYS_LEFT_TO_RIGHT` to 1 before any \cgal header is * included. * - * \cgalModels{AosTraits_2,AosDirectionalXMonotoneTraits_2,AosConstructXMonotoneCurveTraits_2,AosConstructCurveTraits_2,AosApproximateTraits_2 (if the type that substitutes - * the template parameter `SegmentTraits_2` models the concept as well)} + * \cgalModels{AosTraits_2,AosDirectionalXMonotoneTraits_2,AosConstructXMonotoneCurveTraits_2,AosConstructCurveTraits_2,AosApproximatePointTraits_2 + * (if the type that substitutes the template parameter `SegmentTraits_2` + * models the concept as well)} * * \sa `Arr_polycurve_traits_2` * \sa `Arr_Bezier_curve_traits_2` diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosApproximateTraits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosApproximatePointTraits_2.h similarity index 91% rename from Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosApproximateTraits_2.h rename to Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosApproximatePointTraits_2.h index 87b94427249..2c00cd3004c 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosApproximateTraits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosApproximatePointTraits_2.h @@ -1,7 +1,7 @@ /*! \ingroup PkgArrangementOnSurface2ConceptsTraits * \cgalConcept * - * The concept `AosApproximateTraits_2` refines the basic traits concept + * The concept `AosApproximatePointTraits_2` refines the basic traits concept * `AosBasicTraits_2`. A model of this concept is able to approximate a point. * * \cgalRefines{AosBasicTraits_2} @@ -21,7 +21,7 @@ * \sa `AosXMonotoneTraits_2` * \sa `AosTraits_2` */ -class AosApproximateTraits_2 { +class AosApproximatePointTraits_2 { public: /// \name Types /// @{ diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosConstructXMonotoneCurveTraits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosConstructXMonotoneCurveTraits_2.h index 9530063050c..66261e41f76 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosConstructXMonotoneCurveTraits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosConstructXMonotoneCurveTraits_2.h @@ -17,7 +17,7 @@ * \cgalHasModels{CGAL::Arr_rational_function_traits_2} * \cgalHasModelsEnd * - * \sa `AosApproximateTraits_2` + * \sa `AosApproximatePointTraits_2` * \sa `AosXMonotoneTraits_2` * \sa `AosTraits_2` * \sa `AosConstructCurveTraits_2` diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosLandmarkTraits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosLandmarkTraits_2.h index daf4f0ff873..a397e520631 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosLandmarkTraits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosLandmarkTraits_2.h @@ -2,14 +2,14 @@ * \cgalConcept * * The concept `AosLandmarkTraits_2` refines the traits concepts - * `AosApproximateTraits_2` and + * `AosApproximatePointTraits_2` and * `AosConstructXMonotoneCurveTraits_2`. The type of an arrangement * associated with the landmark point-location strategy (see * `CGAL::Arr_landmarks_point_location`) must be an instance of the * `CGAL::Arrangement_2` class template, where the Traits parameter * is substituted by a model of this concept. * - * \cgalRefines{AosApproximateTraits_2,AosConstructXMonotoneCurveTraits_2} + * \cgalRefines{AosApproximatePointTraits_2,AosConstructXMonotoneCurveTraits_2} * * \cgalHasModelsBegin * \cgalHasModels{CGAL::Arr_conic_traits_2} diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--Approximate_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--Approximate_2.h index 46becfd597e..be9fe4443e0 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--Approximate_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--Approximate_2.h @@ -6,7 +6,7 @@ namespace AosTraits { * \cgalRefines{Functor} * * \cgalHasModelsBegin - * \cgalHasModels{AosApproximateTraits_2::Approximate_2} + * \cgalHasModels{AosApproximatePointTraits_2::Approximate_2} * \cgalHasModelsEnd */ class Approximate_2 { diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/PackageDescription.txt b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/PackageDescription.txt index 2b9606a9977..774d15e834a 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/PackageDescription.txt +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/PackageDescription.txt @@ -112,7 +112,7 @@ implemented as peripheral classes or as free (global) functions. \cgalCRPSection{Concepts} -- `AosApproximateTraits_2` +- `AosApproximatePointTraits_2` - `AosBasicTopologyTraits` - `AosBasicTraits_2` - `AosBottomSideTraits_2` diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/fig_src/landmark_concept_cluster.tex b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/fig_src/landmark_concept_cluster.tex index f85659c3a0a..eeb9e0e589e 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/fig_src/landmark_concept_cluster.tex +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/fig_src/landmark_concept_cluster.tex @@ -11,7 +11,7 @@ [\name{AosBasicTraits\_2},name=abt, % forked edges, for tree={concept,edge={-latex}} - [\name{AosApproximateTraits\_2} + [\name{AosApproximatePointTraits\_2} [,phantom] [\name{AosLandmarkTraits\_2},name=alt,before drawing tree={x=0}] ] From 37e892df1d097eec0e0db71de263a13b0033985d Mon Sep 17 00:00:00 2001 From: Efi Fogel Date: Wed, 28 Aug 2024 17:25:11 +0300 Subject: [PATCH 04/63] Fixed typo --- .../Arrangement_on_surface_2/CGAL/Arr_polycurve_traits_2.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_polycurve_traits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_polycurve_traits_2.h index 2a1fad853ae..c8e05ebdc6a 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_polycurve_traits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_polycurve_traits_2.h @@ -50,7 +50,7 @@ namespace CGAL { * without loss of precision), in order to avoid robustness problems, although * other inexact number types could be used at the user's own risk. * - * A polycurve that comprises \f$n > 0\f$ subcurves has \f$n+1f$ subcurve + * A polycurve that comprises \f$n > 0\f$ subcurves has \f$n+1\f$ subcurve * end-points, and they are represented as objects of type * `SubcurveTraits_2::Point_2`. Since the notion of a \a vertex is reserved to * 0-dimensional elements of an arrangement, we use, in this context, the @@ -73,9 +73,7 @@ namespace CGAL { * set the macro `CGAL_ALWAYS_LEFT_TO_RIGHT` to 1 before any \cgal header is * included. * - * \cgalModels{AosTraits_2,AosDirectionalXMonotoneTraits_2, - * AosApproximatePointTraits_2 (if the type that substitutes - * the template parameter `SubcurveTraits_2` models the concept as well)} + * \cgalModels{AosTraits_2,AosDirectionalXMonotoneTraits_2,AosApproximatePointTraits_2 (if the type that substitutes the template parameter `SubcurveTraits_2` models the concept as well)} * * \sa `Arr_algebraic_segment_traits_2` * \sa `Arr_Bezier_curve_traits_2` From d8e4cc40be8466a1ab50f803a1ea973f2550efff Mon Sep 17 00:00:00 2001 From: Efi Fogel Date: Wed, 28 Aug 2024 19:38:52 +0300 Subject: [PATCH 05/63] Introduced new concept AosApproximateTraits_2 --- .../Arrangement_on_surface_2.txt | 597 ++++++++++-------- .../CGAL/Arr_circle_segment_traits_2.h | 2 +- .../CGAL/Arr_conic_traits_2.h | 54 +- .../Arr_geodesic_arc_on_sphere_traits_2.h | 2 +- .../CGAL/Arr_polyline_traits_2.h | 8 +- .../CGAL/Arr_segment_traits_2.h | 2 +- .../Concepts/AosApproximatePointTraits_2.h | 1 + .../Concepts/AosApproximateTraits_2.h | 50 ++ .../Concepts/AosTraits--Approximate_2.h | 28 + .../PackageDescription.txt | 31 +- 10 files changed, 429 insertions(+), 346 deletions(-) create mode 100644 Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosApproximateTraits_2.h diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Arrangement_on_surface_2.txt b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Arrangement_on_surface_2.txt index f91e2d46607..0179a49386e 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Arrangement_on_surface_2.txt +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Arrangement_on_surface_2.txt @@ -9,9 +9,9 @@ namespace CGAL { \authors Ron Wein, Eric Berberich, Efi Fogel, Dan Halperin, Michael Hemmer, Oren Salzman, and Baruch Zukerman - + \section aos_sec-intro Introduction - + Geometric arrangements, or arrangements for short, are subdivisions of some space induced by geometric objects. @@ -42,9 +42,9 @@ computational-geometry literature and have many applications; see, e.g., \cgalCite{as-aa-00}, \cgalCite{cgal:bfhks-apsca-10}, \cgalCite{cgal:bfhmw-apsgf-10}, and \cgalCite{cgal:h-a-04}. - + \subsection aos_ssec-intro-sep Separation of Topology and Geometry - + The use of the generic programming paradigm enables a convenient separation of the topology and the geometry of data @@ -123,9 +123,9 @@ themselves. The precise minimal sets of requirements the actual traits classes must conform to are organized as a hierarchy of concepts; see Section \ref aos_sec-geom_traits. - + \subsection aos_ssec-intro-well_behaved Well-Behaved Curves - + What constitutes valid curves that can be handled by the \ref PkgArrangementOnSurface2 package is discussed in detail in Section @@ -172,9 +172,9 @@ Remarks - + \subsection aos_ssec-intro-outline Outline - + In Section \ref aos_sec-basic we provide the minimum material you need to know in order to use \cgal 2D arrangements in the plane. In Section @@ -207,9 +207,9 @@ to apply the graph algorithms implemented in the Boost Graph Library to arrangement types. Finally, in Section \ref aos_sec-tips we provide some tips that can be applied to expedite computation. - + \section aos_sec-basic Basic Arrangements - + We start with a formal definition of two-dimensional arrangements, and proceed with an introduction to the data structure used to represent @@ -220,9 +220,9 @@ describe a central component in the \ref PkgArrangementOnSurface2 package, namely, the `Arrangement_2` class-template, which can be used to represent arrangements in the plane. - + \subsection aos_ssec-basic-dcel Representation of Arrangements: The Dcel - + Given a set \f$\mathcal{C}\f$ of curves embedded in a two-dimensional surface, the arrangement \f$\mathcal{A}(\mathcal{C})\f$ is @@ -346,7 +346,7 @@ theoretically, the former are degenerate holes. See \dcel features. For more details on the \dcel data structure see \cgalCite{bkos-cgaa-00} Chapter 2. - + \cgalFigureBegin{aos_fig-arr_segs,arr_segs.png} An arrangement of interior-disjoint line segments with some of the \dcel records that represent it. The unbounded face \f$f_0\f$ has @@ -364,11 +364,11 @@ adjacent faces \f$f_3\f$ and \f$f_4\f$, while the other hole comprises of two edges. \f$f_1\f$ also contains two isolated vertices \f$u_1\f$ and \f$u_2\f$ in its interior. \cgalFigureEnd - + - + \subsection aos_ssec-basic-arr_class The Arrangement Class Template - + One of the main components of the \ref PkgArrangementOnSurface2 package is the `Arrangement_2` class template. An @@ -502,9 +502,9 @@ int main() { } \endcode - + \subsection arr_ssectraverse Traversing the Arrangement - + The simplest and most fundamental arrangement operations are the various traversal methods, which allow users to systematically go over @@ -573,9 +573,9 @@ The call \link Arrangement_on_surface_2::non_const_handle() `non_const_handle()`\endlink can be issued only if the arrangement object `arr` is mutable; see, e.g., Section \ref arr_ssecpl. - + \subsubsection arr_sssectr_vertex Traversal Methods for an Arrangement Vertex - + A vertex \f$v\f$ of an arrangement induced by bounded curves is always associated with a geometric entity, namely with an \link @@ -625,9 +625,9 @@ If \f$v\f$ is an isolated vertex, the call \link Arrangement_on_surface_2::Vertex::face() `v->face()`\endlink can be used to obtain the face that contains \f$v\f$. - + \subsubsection arr_sssectr_halfedge Traversal Methods for an Arrangement Halfedge - + A halfedge \f$e\f$ of an arrangement induced by bounded curves is associated with an \link Arrangement_on_surface_2::X_monotone_curve_2 @@ -698,9 +698,9 @@ void print_ccb(typename Arrangement::Ccb_halfedge_const_circulator circ) { } \endcode - + \subsubsection arr_sssectr_face Traversal Methods for an Arrangement Face - + An `Arrangement_2` object `arr` that identifies an arrangement of bounded curves always has a single unbounded face. The call \link @@ -811,9 +811,9 @@ void print_arrangement (const Arrangement_2& arr) { } \endcode - + \subsection arr_ssecmodify Modifying the Arrangement - + In this section we review the various member functions of the `Arrangement_2` class that allow users to modify the topological @@ -834,9 +834,9 @@ terms of the specialized insertion functions, we start by describing the fundamental functionality of the arrangement class, and describe the operation of the free functions in Section \ref arr_secgl_funcs. - + \subsection arr_sssecmf_insert_cv Inserting Pairwise Disjoint x-Monotone Curves - + The most trivial functions that allow users to modify the arrangement are the specialized functions for the insertion of an \f$x\f$-monotone @@ -858,7 +858,7 @@ free functions that operate on the arrangement and the inserted curve(s); see Section \ref arr_secgl_funcs for more details and examples. - + \cgalFigureBegin{aos_fig-insert,insert.png} Illustrations of the various specialized insertion procedures. The inserted \f$x\f$-monotone curve is drawn as a dashed line, surrounded @@ -874,7 +874,7 @@ endpoints of which correspond to existing vertices \f$u_1\f$ and \f$f'\f$. The hole \f$h_1\f$, which belonged to \f$f\f$ before the insertion, becomes a hole in this new face. \cgalFigureEnd - + When an \f$x\f$-monotone curve is inserted into an existing arrangement, such that the interior of this curve is disjoint from the @@ -965,14 +965,14 @@ halfedge directed from \f$v_1\f$ to \f$v_2\f$.
    - + \cgalFigureBegin{aos_fig-edge_insertion,edge_insertion.png} The arrangement of the line segments \f$s_1, \ldots, s_5\f$ constructed in \ref Arrangement_on_surface_2/edge_insertion.cpp. The arrows mark the direction of the halfedges returned from the various insertion functions. \cgalFigureEnd - + The program below demonstrates the usage of the four specialized insertion functions. It creates an arrangement of five line segments @@ -1030,9 +1030,9 @@ using Halfedge_handle = Arrangement::Halfedge_handle; using Face_handle = Arrangement::Face_handle; \endcode - + \subsection arr_sssecmf_iso_verts Manipulating Isolated Vertices - + Isolated points are simpler geometric entities than curves, and indeed the member functions that manipulate them are easier to understand. @@ -1052,14 +1052,14 @@ function accepts a handle to an isolated vertex and removes it from the arrangement. - + \cgalFigureBegin{aos_fig-isolated_vertices,isolated_vertices.png} An arrangement of line segments containing three isolated vertices, as constructed in \ref Arrangement_on_surface_2/isolated_vertices.cpp. The vertices \f$u_2\f$ and \f$u_3\f$ are eventually removed from the arrangement. \cgalFigureEnd - + The following program demonstrates the usage of the arrangement member-functions for manipulating isolated vertices. It first inserts @@ -1073,9 +1073,9 @@ isolated vertices that are still contained in the unbounded face \cgalExample{Arrangement_on_surface_2/isolated_vertices.cpp} - + \subsection arr_sssecmf_halfedges Manipulating Halfedges - + While reading the previous subsection you learned how to insert new points that induce isolated vertices into the arrangement. You may @@ -1136,7 +1136,7 @@ Arrangement_on_surface_2::remove_edge `remove_edge()`\endlink indicating whether the source or the target vertices are to be removed should they become isolated. - + \cgalFigureBegin{aos_fig-edge_manipulation,edge_manipulation.png} The three steps of the example program \ref Arrangement_on_surface_2/edge_manipulation.cpp. In Step (a) it @@ -1148,7 +1148,7 @@ arrangement, rendering its end vertices \f$u_1\f$ and \f$u_2\f$ redundant. We therefore remove these vertices by merging their incident edges and go back to the arrangement depicted in (a). \cgalFigureEnd - + The following example program shows how the edge-manipulation functions can be used. The program works in three steps, as @@ -1197,9 +1197,9 @@ point coordinates, we can replace the point \f$(\frac{20}{40}, equivalent point with normalized coordinates, namely \f$(\frac{1}{2}, 3)\f$. - + \subsection arr_sssecadv_insert Advanced Insertion Functions - + \cgalAdvancedBegin @@ -1255,14 +1255,14 @@ respectively, that correspond to the curve endpoints. The other one accepts a handle to one vertex and a handle to the predecessor halfedge around the other vertex. - + \cgalFigureBegin{aos_fig-special_edge_insertion,special_edge_insertion.png} An arrangement of line segments, as constructed in \ref Arrangement_on_surface_2/special_edge_insertion.cpp. Note that \f$p_0\f$ is initially inserted as an isolated point and later on connected to the other four vertices. \cgalFigureEnd - + The following program shows how to construct the arrangement depicted in \cgalFigureRef{aos_fig-special_edge_insertion} using the specialized @@ -1279,9 +1279,9 @@ in the public interface of the arrangement class. Instead, the arrangement operations; see more details in the Reference Manual. \cgalAdvancedEnd - + \section arr_secqueries Issuing Queries on an Arrangement - + One of the most useful query types defined on arrangements is the point-location query: Given a point, find the arrangement @@ -1295,9 +1295,9 @@ play an important role in the incremental construction of arrangements Section \ref arr_secgl_funcs). Therefore, it is crucial to have the ability to answer such queries effectively. - + \subsection arr_ssecpl Point-Location Queries - + Recall that the arrangement representation is decoupled from the geometric algorithms that operate on it. Thus, the `Arrangement_2` @@ -1395,9 +1395,9 @@ void print_point_location } \endcode - + \subsection aos_sssec-pl_strategy Choosing a Point-Location Strategy - + Each of the various point-location class templates employs a different algorithm or strategy\cgalFootnote{The term strategy @@ -1517,7 +1517,7 @@ dynamic and is frequently going through changes, the `Arr_trapezoid_ric_point_location` class template should be the selected point-location strategy. - + \cgalFigureBegin{aos_fig-point_location,point_location.png} The arrangement of line segments, as constructed in \ref Arrangement_on_surface_2/point_location.cpp, \ref @@ -1526,7 +1526,7 @@ Arrangement_on_surface_2/batched_point_location.cpp. The arrangement vertices are drawn as small rings, while the query points \f$q_1, \ldots, q_6\f$ are drawn as crosses. \cgalFigureEnd - + The program listed below constructs a simple arrangement of five line segments that form a pentagonal face, with a single isolated @@ -1544,9 +1544,9 @@ Note that the program uses the `locate_point()` function template to locate a point and nicely print the result of each query; see \ref lst_pl "code example" in Section \ref arr_ssecpl. - + \subsection arr_ssecray_shoot Vertical Ray Shooting - + Another query frequently issued on arrangements is the vertical ray-shooting query: Given a query point, which arrangement cell @@ -1621,9 +1621,9 @@ arrangement and the query points are exactly the same as in \cgalFigureRef{aos_fig-point_location}. \cgalExample{Arrangement_on_surface_2/vertical_ray_shooting.cpp} - + \subsection arr_ssecbatched_pl Batched Point-Location - + Suppose that at a given moment our application has to issue a relatively large number \f$m\f$ of point-location queries on a @@ -1663,9 +1663,9 @@ is essentially equivalent to the six separate queries performed in \ref arr_ssecpl. \cgalExample{Arrangement_on_surface_2/batched_point_location.cpp} - + \section arr_secgl_funcs Free Functions - + The `Arrangement_on_surface_2` class template is used to represent subdivisions of two-dimensional surfaces induced by curves that lie on @@ -1686,9 +1686,9 @@ defines the minimal set of geometric primitives, among other things, required to perform the algorithms of the surface-sweep and zone-construction frameworks. - + \subsection arr_ssec_zone The Zone Construction Algorithm - + Given an arrangement of curves \f$\mathcal{A} = \mathcal{A}(\mathcal{C})\f$ embedded in a two-dimensional surface, the @@ -1707,9 +1707,9 @@ operations that incrementally construct arrangements induced by sets of curves that lie in two-dimensional surfaces. For simplicity, however, we continue to consider arrangements embedded in the plane. - + - + Section \ref aos_ssec-basic-arr_class explains how to construct arrangements of \f$x\f$-monotone curves that are pairwise disjoint in @@ -1718,9 +1718,9 @@ arrangement is known. Here we relax this constraint, and allow the location of the inserted \f$x\f$-monotone curve endpoints to be unknown at the time of insertion. - + \subsubsection arr_sssecinsert_non_x Inserting Pairwise Disjoint Curves - + We retain, for the moment, the requirement that the interior of the inserted curve is disjoint from all existing arrangement edges and @@ -1761,9 +1761,9 @@ the walk point-location type, namely, an instance of the `Arr_walk_along_line_point_location` class template, and uses it to insert the curve. - + \subsubsection arr_sssecinsert_x_mon Inserting X-monotone Curves - + The time it takes to insert a curve \f$c\f$ using the `insert_non_intersecting_curve()` function template is the sum of the @@ -1797,7 +1797,7 @@ the variant `CGAL::insert<>(arr, c)` is also available). The running-time of this insertion function is proportional to the complexity of the zone of the curve \f$c\f$. - + \cgalAdvancedBegin In some cases users may have a prior knowledge of the location of the left endpoint of the \f$x\f$-monotone curve \f$c\f$ they wish to insert, so they can perform the insertion without @@ -1814,11 +1814,11 @@ Arrangement_on_surface_2::Halfedge_const_handle Arrangement_on_surface_2::Face_const_handle `Face_const_handle`\endlink; see also Section \ref arr_ssecpl. \cgalAdvancedEnd - + - + \subsubsection aos_ssec-insert_gen Inserting General Curves - + So far, all the examples have constructed arrangements of line segments, where the `Arrangement_2` template was instantiated with an @@ -1860,9 +1860,9 @@ performs the insertion of the curve \f$c\f$ that does not need to be `pl`, or use the default walk point-location strategy by calling `CGAL::insert<>(arr, c)`. - + \subsubsection arr_sssecinsert_point Inserting Points - + The `Arrangement_2` class template has a member function that inserts a point as an isolated vertex in a given face. The free function @@ -1892,11 +1892,11 @@ template instantiated with a traits class that models the `AosXMonotoneTraits_2` concept, as the insertion operation may involve the splitting of curves. - + \subsubsection arr_sssecinsert_ex Inserting Intersecting Line Segments (code example) - + - + \cgalFigureBegin{aos_fig-incremental_insertion,incremental_insertion.png} An arrangement of five intersecting line segments, as constructed in \ref Arrangement_on_surface_2/incremental_insertion.cpp and @@ -1906,7 +1906,7 @@ vertices that correspond to intersection points are marked by circles. The query point \f$q\f$ is marked with a cross and the face that contains it is shaded. \cgalFigureEnd - + The program below constructs an arrangement of five intersecting line-segments \f$s_1, \ldots, s_5\f$. It is known that \f$s_1\f$ and @@ -1940,9 +1940,9 @@ quantitative measures of the arrangement; see \ref lst_paz \cgalExample{Arrangement_on_surface_2/incremental_insertion.cpp} - + \subsection arr_ssseczone Other Zone Related Functions - + In this section we have described so far free functions that insert curves and points into a given arrangement. Now we describe functions @@ -1985,9 +1985,9 @@ instance of the `Arr_walk_along_line_point_location` class template, and uses it to locate the endpoint. The traits type must model the `AosXMonotoneTraits_2` concept. - + \subsection arr_ssec_sweep The Surface-Sweep Algorithm - + The famous plane-sweep algorithm introduced by Bentley and Ottmann was originally formulated for sets of line segments in the plane. The \ref @@ -2004,9 +2004,9 @@ this section, such as aggregately constructing an arrangement induced by a set of curves that lie in a two-dimensional surface and outputting the overlay of two arrangements. - + - + Given a set of \f$n\f$ input curves, you can insert the curves in the set into an arrangement incrementally one by one. However, the \ref @@ -2071,7 +2071,7 @@ edges in the arrangement. If \f$n\f$ is very small compared to insert the curves one by one. For larger input sets, we use the aggregate insertion procedures. - + \cgalFigureBegin{aos_fig-global_insertion,global_insertion.png} An arrangement of intersecting line segments, as constructed in \ref Arrangement_on_surface_2/global_insertion.cpp. The segments of @@ -2079,7 +2079,7 @@ Arrangement_on_surface_2/global_insertion.cpp. The segments of \f$\mathcal{S}_2\f$ are drawn in dark dashed lines. Note that the segment \f$s\f$ (light dashed line) overlaps one of the segments in \f$\mathcal{S}_1\f$. \cgalFigureEnd - + The program below aggregately construct an arrangement of a set \f$\mathcal{S}_1\f$ containing five line segments (drawn as solid @@ -2124,9 +2124,9 @@ The `CGAL::insert_non_intersecting_curves<>()` function template aggregately inserts a set of \f$x\f$-monotone pairwise interior-disjoint curves into an arrangement. - + \subsection arr_ssecgl_remove Removing Vertices and Edges - + The free functions `remove_vertex()` and `remove_edge()` handle the removal of vertices and edges from an arrangement, respectively. The @@ -2170,9 +2170,9 @@ and \f$s_4\f$. \cgalExample{Arrangement_on_surface_2/global_removal.cpp} - + \subsection arr_ssec_decompose Vertical Decomposition - + As you have already seen, an arrangement face may have a fairly complicated structure; its outer boundary may be very large, and it @@ -2207,7 +2207,7 @@ vertex and the remaining one is vertical. - + \cgalFigureBegin{aos_fig-bounded_vd,bounded_vertical_decomposition.png} An arrangement of four line segments and its vertical decomposition into pseudo trapezoids, as constructed in \ref @@ -2215,7 +2215,7 @@ Arrangement_on_surface_2/bounded_vertical_decomposition.cpp. The segments of the arrangement are drawn in solid blue lines and the segments of the vertical decomposition are drawn in dark dotted lines. \cgalFigureEnd - + In the case of an arrangement of line segments, two-dimensional cells of the former type are trapezoids (as they have a pair of parallel @@ -2287,9 +2287,9 @@ above (respectively below) \f$v\f$ returned by the function template \cgalAdvancedEnd - + \section aos_sec-unbounded Arrangements of Unbounded Curves - + All the arrangements constructed and manipulated in previous chapters were induced only by line segments, which are, in particular, bounded @@ -2301,9 +2301,9 @@ this section to lines and rays. However, the discussion in this section, as well as the software described, apply more generally to arbitrary curves in two-dimensional surfaces. - + \subsection aos_ssec-unbounded-rep Representing Arrangements of Unbounded Curves - + Given a set \f$\mathcal{C}\f$ of unbounded curves, a simple approach for representing the arrangement induced by \f$\mathcal{C}\f$ would be @@ -2318,7 +2318,7 @@ we are not given all the curves inducing the arrangement in advance, then the choice of a good bounding rectangle may change as more curves are introduced. - + \cgalFigureBegin{aos_fig-unb_dcel,unb_dcel.png} A \dcel representing an arrangement of four lines. Halfedges are drawn as thin arrows. The vertices \f$v_1, \ldots, v_8\f$ lie at @@ -2330,7 +2330,7 @@ that bounds the actual arrangement. The four fictitious vertices \f$v_{\rm bl}, v_{\rm tl}, v_{\rm br}\f$ and \f$v_{\rm tr}\f$ represent the four corners of the imaginary bounding rectangle. \cgalFigureEnd - + Instead of an explicit approach, we use an implicit bounding rectangle embedded in the \dcel structure. \cgalFigureRef{aos_fig-unb_dcel} @@ -2402,13 +2402,13 @@ bounding rectangle as follows: - + \cgalFigureBegin{aos_fig-unb_asymptote,unb_asymptote.png} The portions of a horizontal line, a vertical line, and two rectangular hyperbolas with horizontal and vertical asymptotes confined to the imaginary bounding rectangle. \cgalFigureEnd - + A vertex (at infinity) of Type 2 or Type 3 above always has three incident edges---one concrete edge that is associated with an @@ -2434,9 +2434,9 @@ that all input curves that induce a particular arrangement are bounded, define your arrangement accordingly. That is, use a traits class that does not support unbounded curves. - + \subsubsection arr_sssecunb_basic Basic Manipulation and Traversal Methods - + The types \link Arrangement_on_surface_2::Vertex `Vertex`\endlink, \link Arrangement_on_surface_2::Halfedge `Halfedge`\endlink, and \link @@ -2639,12 +2639,12 @@ defined by the traits class-template `Arr_linear_traits_2` to be the corresponding types of the kernel used to instantiate the traits class-template; see Paragraph \ref arr_sssectr_linear. - + \cgalFigureBegin{aos_fig-unbounded_non_intersecting,unbounded_non_intersecting.png} An arrangement of unbounded linear objects, as constructed in \ref Arrangement_on_surface_2/unbounded_non_intersecting.cpp. \cgalFigureEnd - + The first three curves, \f$c_1\f$, \f$c_2\f$, and \f$c_3\f$, are inserted using the specialized insertion functions for @@ -2693,9 +2693,9 @@ using Halfedge_handle = Arrangement::Halfedge_handle; using Face_handle = Arrangement::Face_handle; \endcode - + \subsubsection arr_sssec-unb_global Free Functions - + All the free functions that operate on arrangements of bounded curves (see Section \ref arr_secgl_funcs) can also be applied to arrangements @@ -2721,9 +2721,9 @@ point has finite coordinates. Note that all the point-location strategies mentioned above, except the trapezoidal map strategy, are capable of handling arrangements of unbounded curves. - + \subsection arr_ssec-unb_duality Point-Line Duality - + In the following example we show how an arrangement of unbounded lines is utilized to solve the following problem: Given a set of points, @@ -2749,9 +2749,9 @@ introduced, and inserted into the arrangement. This operation is followed by a test that verifies that a vertex of degree greater than \f$4\f$ exists. - + \section aos_sec-curved_surfaces Arrangements on Curved Surfaces - + We are given a surface \f$S\f$ in \f$\mathbb{R}^3\f$ and a set \f$\mathcal{C}\f$ of curves embedded in this surface. The curves @@ -2795,9 +2795,9 @@ Various two-dimensional parametric surfaces, arrangements on which are supported by the framework. \cgalFigureCaptionEnd - + \subsection aos_ssec-curved_surfaces-parameteric Parametric Surfaces - + We use \f$\overline{\mathbb{R}}\f$ to denote the compactified real line \f$\mathbb{R} \cup \{-\infty,+\infty\}\f$. The mapping @@ -2936,9 +2936,9 @@ t_2\f$. For instance, every Meridian curve of a sphere parameterized as above is vertical. An \f$x\f$-monotone curve is either vertical or strongly \f$x\f$-monotone. - + \subsection aos_ssec-curved_surfaces-aos_class The Arrangement on Surface Class Template - + The class template `Arrangement_on_surface_2` can be used to represent a 2D arrangement embedded in a 3D @@ -3002,9 +3002,9 @@ Sites are drawn in red and Voronoi edges are drawn in blue. (d) A degenerate power diagram of 14 sites on the sphere. \cgalFigureCaptionEnd - + \subsection aos_ssec-curved_surfaces-basic Basic Manipulation and Traversal Methods - + The types \link Arrangement_on_surface_2::Vertex `Vertex`\endlink, \link Arrangement_on_surface_2::Halfedge `Halfedge`\endlink, and \link @@ -3181,9 +3181,9 @@ bool is_in_x_range(const typename GeometryTraits::X_monotone_curve_2& c, \cgalAdvancedEnd - + \section aos_sec-geom_traits The Geometry Traits - + A geometry traits class encapsulates the definitions of the geometric entities and the implementation of the geometric predicates and @@ -3224,9 +3224,9 @@ geometric traits classes. A decorator of a traits class attaches auxiliary data to the geometric objects handled by the original traits class, thereby extending it. - + \subsection aos_ssec-geom_traits-concepts The Hierarchy of the Geometry Traits Concepts - + A hierarchy of related concepts can be viewed as a directed acyclic graph, where a node of the graph represents a concept and an arc @@ -3240,15 +3240,15 @@ clusters of the graph and describe the relations between them. \cgalFigureRef{aos_fig-central_concept_cluster} depicts the central cluster. - + \cgalFigureBegin{aos_fig-central_concept_cluster,central_concept_cluster.png} The hierarchy of the main geometry traits concepts. \cgalFigureEnd - + - + \subsubsection aos_sssec-geom_traits-concepts_basic The Basic Concept - + A model of the basic concept `AosBasicTraits_2` needs to define the types \link AosBasicTraits_2::Point_2 @@ -3355,9 +3355,9 @@ Each of those types must be convertible to the type `Arr_oblivious_side_tag` for the class to be a model of the concept `AosBasicTraits_2`. - + \subsubsection aos_sssec-geom_traits-concepts_intersecting Intersections - + Constructing an arrangement induced by \f$x\f$-monotone curves that may intersect in their interior requires operations that are not part @@ -3433,9 +3433,9 @@ Otherwise, it is not possible to merge \f$x\f$-monotone curve and redundant vertices may be left in the arrangement due to the removal of edges. - + \subsubsection aos_sssec-geom_traits-concepts_arbitrary Supporting Arbitrary Curves - + The concept `AosTraits_2` refines the `AosXMonotoneTraits_2` concept. A model of the refined concept @@ -3469,16 +3469,16 @@ AosTraits_2::Curve_2 `Curve_2`\endlink or a range of objects of that type. In all other cases it is sufficient to use a model of the `AosXMonotoneTraits_2` concept. - + \subsubsection aos_sssec-tr_landmarks_concept The Landmark Concept - + - + \cgalFigureBegin{aos_fig-landmark_concept_cluster,landmark_concept_cluster.png} The traits-concept hierarchy for arrangements associated with the landmark point-location strategy. \cgalFigureEnd - + The type of an arrangement associated with the landmark point-location strategy (see Section \ref arr_ssecpl) must be an instance of the @@ -3525,15 +3525,10 @@ an \f$x\f$-monotone curve connecting \f$p_1\f$ and \f$p_2\f$. Most traits classes model the `AosTraits_2` concept, and some also model the `AosLandmarkTraits_2` concept. - -\subsubsection aos_sssec-tr_additional_concepts The Construct Curve Concept - - The concept `AosConstructCurveTraits_2` refines the concept -`AosTraits_2`. A model of the -`AosConstructCurveTraits_2` concept must support the operation -below (in addition to fulfilling the requirements listed by the -`AosTraits_2` concept). +`AosBasicTraits_2`. A model of the `AosConstructCurveTraits_2` concept +must support the operation below (in addition to fulfilling the +requirements listed by the `AosBasicTraits_2` concept).
    \link AosConstructCurveTraits_2::Construct_curve_2 `Construct_curve_2`\endlink: @@ -3548,9 +3543,63 @@ when `Arr_polyline_traits_2` is instantiated must be a geometry-traits class that models the concept `AosConstructCurveTraits_2` to enable the construction of polylines from a sequence of two or more points. - + +\subsubsection aos_sssec-tr_approximatetion_concept Supporting Approximations of Curves + + +Operations on arrangements are guaranteed to be robust only if the +operations of the geometry traits used to carry out the high-level +operations are robust. Geometry traits constructors are guaranteed to +be robust only if the kernel in use supports exact constructions, such +as the Epec kernel. Even if you only intend to perform point-location +queries on an arrangement induced by a collection of curves, you need +an exact-construction kernel, if the curves are not pairwise disjoint +in their interiors. However, when using an exact-construction kernel +you still may desire to perform (independent) operations on +approximations of the points or the interior-disjoint \f$x\f$-monotone +curves of the arrangements in order to gain speed, for example drawing +the arrangement on a raster window. Naturally, reconstructing an +arrangement from the approximations of its points and +interior-disjoint \f$x\f$-monotone curves, may result with an arrangement +of a different topology, or even worse, intersections in the interior +of the curves. + +The `AosApproximateTraits_2` refines the concept +`AosApproximatePointTraits_2`. In addition to the type +`Approximate_number_type` required by the latter, a model of the +`AosApproximateTraits_2` concept must define the types +`Approximate_kernel` and `Approximate_point_2`, which are +typically defined as `CGAL::Cartesian` +and `Approximate_kernel::Point_2`, respectively. Also, it +must support the operations below (in addition to the operation +required by the concept `AosApproximatePointTraits_2`). + +
    +
    \link AosApproximateTraits_2::Approximate_2 `Approximate_2`\endlink: +
    This operation is overloaded with three versions. The first one + returns an approximation of the \f$x\f$- or \f$y\f$-coordinates of a given + point as required by the concept `AosApproximatePointTraits_2`; see + Section \ref aos_sssec-tr_landmarks_concept. The description of the remaining + two follow. + + (i) Given a point \f$p\f$, obtain an approximation of \f$p\f$, which is an + object of type `Approximate_point_2`. This is trivially + implemented using the first version. + + (ii) Given an \f$x\f$-monotone curve \f$c\f$, a small number \f$\epsilon\f$ of + type `Approximate_number_type` that serves as an error bound, an + output iterator associated with a container + of approximate points, and a flag that indicates whether to + approximate \f$c\f$ starting from its smallest lexicographic endpoint, + compute a polyline that approximates \f$c\f$ in the indicated + direction, such that the largest distance between \f$c\f$ and the + polyline is not larger than \f$\epsilon\f$. The polyline is + represented as a sequence of approximate points. +
    + + \subsubsection aos_ssec-traits-curved Supporting Unbounded Curves or Curved Surfaces - + We descend to the bottom level of the hierarchy. The refinements described in this section provide the requirements imposed on traits @@ -3622,13 +3671,13 @@ Section \ref arr_ssectr_segs) only handle bounded curves. Thus, the four category types nested in these models are defined to be `Arr_oblivious_side_tag`. - + \cgalFigureBegin{aos_fig-open_concept_hierarchy,open_concept_hierarchy.png} Bottom portion of the refinement hierarchy of the geometry-traits concepts for curves embedded in an open surface, for instance, the entire plane. \cgalFigureEnd - + Several predicates are required to handle \f$x\f$-monotone curves that approach the boundary of the parameter space. These predicates are @@ -3650,12 +3699,12 @@ instantiated with a model of the `AosOpenBoundaryTraits_2` concept.\cgalFootnote{A curve that reaches the boundary of the parameter space in this case is open and unbounded.} - + \cgalFigureBegin{aos_fig-spherical_concept_hierarchy,spherical_concept_hierarchy.png} Bottom portion of the refinement hierarchy of the geometry-traits concepts for curves embedded in a sphere-like parameterized surface \cgalFigureEnd - + A suitable geometry-traits component for arrangements embedded in surfaces homeomorphic to a sphere is a model of the combined concept @@ -3664,14 +3713,14 @@ surfaces homeomorphic to a sphere is a model of the combined concept vertical sides of the parameter space are identified and the two horizontal sides are contracted. - + \cgalFigureBegin{aos_fig-left_side_cluster,left_side_cluster.png} Top portion of the refinement hierarchy of the geometry-traits concepts for curves that either reach the left side of the boundary of the parameter space or approach it. A similar hierarchy also exists for the right, bottom, and top sides. \cgalFigureEnd - + The shared requirements for the four options of a side are collected in abstract layers called `AosLeftSideTraits_2`, @@ -3679,14 +3728,14 @@ in abstract layers called `AosLeftSideTraits_2`, `AosTopSideTraits_2`; see, e.g., \cgalFigureRef{aos_fig-left_side_cluster}. - + \cgalFigureBegin{aos_fig-side_clusters,side_clusters.png} Top portion of the refinement hierarchy of the geometry-traits concepts for curves that either reach the vertical sides of the boundary of the parameter space or approach it, and similarly for curves that either reach or approach horizontal sides. \cgalFigureEnd - + The shared requirements for the options of opposite sides are collected in two additional abstract layers called @@ -3694,14 +3743,14 @@ collected in two additional abstract layers called `AosHorizontalSideTraits_2`; see \cgalFigureRef{aos_fig-side_clusters}. - + \cgalFigureBegin{aos_fig-identified_clusters,identified_clusters.png} Top portion of the refinement hierarchy of the geometry-traits concepts for curves that reach the identified vertical sides of the parameter space and for curves that reach the identified horizontal sides of the parameter space. \cgalFigureEnd - + Individual concepts for curves that reach the identified left side of the parameter space and for curves that reach the identified right @@ -4016,9 +4065,9 @@ boundary.
    - + \subsection aos_ssec-geom_traits-models Models of the Geometry Traits Concepts - + In this section we review the traits classes that are models of concepts introduced in the previous sections. They handle line @@ -4028,9 +4077,9 @@ subsection describes decorators for geometric traits classes distributed with \cgal, which extend geometric traits-classes by attaching auxiliary data with the geometric objects. - + \subsubsection arr_ssectr_segs Traits Classes for Line Segments and Linear Objects - + There are two distinct traits classes that handle line segments. One caches information in the curve records (see Section \ref @@ -4043,9 +4092,9 @@ intersections). Another model handles not only (bounded) line segments, but also rays and lines; see Section \ref arr_sssectr_linear. - + \paragraph arr_sssectr_caching_segs The Caching Segment-Traits Class - + An instance of the `Arr_segment_traits_2` class template used in most example programs so far is instantiated by substituting the @@ -4109,13 +4158,13 @@ predefined filtered kernel `Exact_predicates_exact_constructions_kernel` is used to instantiate the line-segment traits class. - + \cgalFigureBegin{aos_figpredef_kernels,fan_grids.png,Europe.png} (a) An arrangement of \f$104\f$ line segments from the input file `fan_grids.dat`. (b) An arrangement of more than \f$3000\f$ interior disjoint line segments, defined in the input file `Europe.dat`. \cgalFigureEnd - + In the following example we use the predefined `Exact_predicates_exact_constructions_kernel` for instantiating our @@ -4129,9 +4178,9 @@ in \cgalFigureRef{aos_figpredef_kernels} (a): \cgalExample{Arrangement_on_surface_2/predefined_kernel.cpp} - + \paragraph arr_sssectr_non_caching_segs The Non-Caching Segment-Traits Class - + The arrangement package offers an alternative segment-traits class template that handles line segments, namely the @@ -4184,9 +4233,9 @@ the map of Europe, as depicted in \cgalExample{Arrangement_on_surface_2/predefined_kernel_non_intersecting.cpp} - + \paragraph arr_sssectr_linear The Linear-Traits Class - + The `Arr_linear_traits_2` class used in Section \ref aos_sec-unbounded for demonstrating the construction of arrangements @@ -4211,9 +4260,9 @@ cast a curve into a `Kernel::Line_2`, a `Kernel::Ray_2`, or a class, the linear-curve traits class uses caching techniques to speed up its predicate evaluations and object constructions. - + \subsubsection arr_ssectr_polylines The Polyline and Polycurve Traits Classes - + Polylines are continuous piecewise linear curves. Polylines are of particular interest, as they can be used to approximate more complex @@ -4230,9 +4279,9 @@ handles continuous piecewise curves that are not necessarily linear and are not subject to the aforementioned constraint; see Section \ref arr_sssectr_polycurves. - + \paragraph arr_sssectr_polylines The Polyline Traits Class - + The `Arr_polyline_traits_2` class template handles polylines. It models the following four concepts: @@ -4355,7 +4404,7 @@ attached to each individual segment; see Section \ref arr_ssecmeta_tr. This makes it possible to associate different data objects with the different segments that compose a polyline. - + \cgalFigureBegin{aos_fig-polylines,polylines.png} An arrangement of three polylines, as constructed in \ref @@ -4367,7 +4416,7 @@ the polyline \f$\pi_2\f$ is split into three \f$x\f$-monotone polylines, and that the two curves \f$\pi_1\f$ and \f$\pi_3\f$ have two overlapping sections---an impossible scenario in arrangements of line segments. \cgalFigureEnd - + The following example program constructs an arrangement of three polylines, \f$\pi_1\f$, \f$\pi_2\f$, and \f$\pi_3\f$, as depicted in @@ -4407,9 +4456,9 @@ using Polyline = Traits::Curve_2; using Arrangement = CGAL::Arrangement_2; \endcode - + \paragraph arr_sssectr_polycurves The Polycurve Traits Class - + The traits class `Arr_polycurve_traits_2` handles piecewise curves that are not necessarily linear, such as conic arcs, @@ -4429,9 +4478,9 @@ it does not support the operations that (i) construct a polycurve from a sequence of points, and (ii) push a point at the back or at the front of a non-empty polycurve. - + \subsubsection arr_ssectr_algebraic Traits Classes for Algebraic Curves - + A curve in our context is typically (but not necessarily) defined as the zero set of a bivariate nonzero polynomial with rational (or, @@ -4463,9 +4512,9 @@ developed. As a general rule, you should always use the minimal traits model that still satisfies your needs, as the most dedicated model is most likely to be the most efficient. - + \paragraph arr_sssectr_circ_seg Circular Arcs and Line Segments - + Arrangement of circular arcs and of line segments are very useful and frequently arise in applications, where curves of interleaved line @@ -4549,7 +4598,7 @@ typically algebraic numbers of degree 2, is \a not the same as the `Kernel::Point_2` type. The coordinates of a point are represented using the number type `CoordNT`, nested in the traits class-template. - + \cgalFigureBegin{aos_fig-circles,circles.png} An arrangement of three circles constructed in \ref Arrangement_on_surface_2/circles.cpp. Each circle is split into two @@ -4558,7 +4607,7 @@ disks. Rings mark vertices that correspond to intersection points. The vertex \f$v_{\rm max}\f$ is a common intersection point of all three circles. \cgalFigureEnd - + In the following example an arrangement of three full circles is constructed, as shown in \cgalFigureRef{aos_fig-circles}. Each Index is @@ -4625,14 +4674,14 @@ interior point that lies on the arc in between its endpoints. In this case, all three points are required to have rational coordinates; namely, they are all given as `Kernel::Point_2` objects. - + \cgalFigureBegin{aos_fig-circular_arcs,circular_arcs.png} An arrangement of two full circles, two line segments, and three circular arcs as constructed in \ref Arrangement_on_surface_2/circular_arcs.cpp. Endpoints are drawn as red disks and intersection points are drawn as rings. \cgalFigureEnd - + The following example demonstrates the usage of the various construction methods for circular arcs and line segments. The @@ -4662,9 +4711,9 @@ their performance, and use the most suitable for your case. which I should choose one over the other --> - + \paragraph arr_sssectr_conic A Traits Class for Conic Arcs - + A conic curve is an algebraic curve of degree 2. Namely, it is the locus of all points \f$(x,y)\f$ satisfying the equation \f$c:\ @@ -4780,11 +4829,11 @@ Arr_conic_traits_2::X_monotone_curve_2 `X_monotone_curve_2`\endlink classes also support basic access functions such as `source()`, `target()`, and `%orientation()`. - + \cgalFigureBegin{aos_fig-conics,conics.png} An arrangement of mixed conic arcs, as constructed in conics.cpp \cgalFigureEnd - + The following example demonstrates the usage of the various constructors for conic arcs. The resulting arrangement is depicted in @@ -4832,12 +4881,12 @@ using X_monotone_conic_arc = Traits::X_monotone_curve_2; using Arrangement = CGAL::Arrangement_2; \endcode - + \cgalFigureBegin{aos_fig-conic_multiplicities,conic_multiplicities.png} An arrangement of a circular arc and an hyperbolic arc, as constructed in \ref Arrangement_on_surface_2/conic_multiplicities.cpp. \cgalFigureEnd - + The last example in this section demonstrates how the conic-traits class can handle intersection points with multiplicity. The resulting @@ -4855,9 +4904,9 @@ they have another intersection point at \cgalExample{Arrangement_on_surface_2/conic_multiplicities.cpp} - + \paragraph arr_sssectr_ratfunc A Traits Class for Arcs of Rational Functions - + A rational function is given by the equation \f$y = \frac{P(x)}{Q(x)}\f$, where \f$P\f$ and \f$Q\f$ are polynomials of @@ -4886,12 +4935,12 @@ Note that it is not a model of `AosLandmarkTraits_2` concept, so it is impossible to use the landmark point-location strategy with this traits class. - + \cgalFigureBegin{aos_fig-rat_func_singular,rational_function_singular.png} An arrangement of an arc of a rational functions that has singularities at \f$x = 1\f$ and at \f$x = 2\f$. \cgalFigureEnd - + A rational arc is always \f$x\f$-monotone in the mathematical sense. However, it is not necessarily continuous, as it may have @@ -4982,12 +5031,12 @@ cache is automatically cleaned up from time to time. The amortized clean up costs are constant. In addition, there is also a separate member function that cleans up the cache upon request. - + \cgalFigureBegin{aos_fig-rational_functions,rational_functions.png} An arrangement of four arcs of rational functions, as constructed in \ref Arrangement_on_surface_2/rational_functions.cpp. \cgalFigureEnd - + The following example demonstrates the construction of an arrangement induced by rational arcs depicted in @@ -4996,12 +5045,12 @@ for polynomial arcs and for rational arcs. \cgalExample{Arrangement_on_surface_2/rational_functions.cpp} - + \cgalFigureBegin{aos_fig-unbounded_rational_functions,unbounded_rational_functions.png} An arrangement of six arcs of rational functions, as constructed in \ref Arrangement_on_surface_2/unbounded_rational_functions.cpp. \cgalFigureEnd - + The following example demonstrates the construction of an arrangement of six rational arcs, four unbounded arcs and two bounded ones, as @@ -5033,9 +5082,9 @@ polynomial coefficients as well as polynomials. The coefficients in a given range must be in the order of the degrees of the corresponding variables starting from the constant term. - + \paragraph arr_sssectr_bez A Traits Class for Planar Bézier Curves - + A planar Bézier curve \f$B\f$ is a parametric curve defined by a sequence of control points \f$p_0, \ldots, @@ -5113,12 +5162,12 @@ models the concept `AosTraits_2` (but it does not model the concept `AosDirectionalXMonotoneTraits_2`, which enables Boolean set operations; see Package \ref PkgBooleanSetOperations2Ref. - + \cgalFigureBegin{aos_fig-bezier_curves,bezier_curves.png} An arrangement of ten Bézier curves of degree \f$5\f$, as constructed in \ref Arrangement_on_surface_2/Bezier_curves.cpp. \cgalFigureEnd - + The following example reads a set of Bézier curves from an input file, where each file is specified by an integer stating its @@ -5130,9 +5179,9 @@ each; their resulting arrangement is depicted in \cgalExample{Arrangement_on_surface_2/Bezier_curves.cpp} - + \paragraph arr_sssectr_alg A Traits Class for Planar Algebraic Curves of Arbitrary Degree - + The traits class, namely `Arr_algebraic_segment_traits_2`, is based on the `Algebraic_kernel_d_1` class template, which models the @@ -5198,13 +5247,13 @@ constructed in a few convenient ways, some are exemplified by the programs listed below. Consult the reference guide for the complete set of options. - + \cgalFigureBegin{aos_fig-algebraic_curves,algebraic_curves.png} An arrangement of algebraic curves of degrees \f$1\f$, \f$2\f$, \f$3\f$, and \f$6\f$, as constructed in \ref Arrangement_on_surface_2/algebraic_curves.cpp. \cgalFigureEnd - + The following examples computes the arrangement depicted in in \cgalFigureRef{aos_fig-algebraic_curves}. The arrangement is induced @@ -5295,7 +5344,7 @@ segments. Notice that six vertices split the curve into the corresponding \f$x\f$-monotone segments into terminal segments. \cgalAdvancedEnd - + \cgalFigureBegin{aos_fig-algebraic_curves_decomposition,algebraic_curves_decomposition.png} The critical \f$x\f$-coordinates of an algebraic curve (dashed @@ -5303,7 +5352,7 @@ lines), and its decomposition into terminal segments (in different colors). The segment from \f$p\f$ to \f$q\f$ consists of the union of three terminal segments. \cgalFigureEnd - + The type `Algebraic_real_1` must be defined by any model of the `AlgebraicKernel_d_1` concept. The traits class-template @@ -5344,13 +5393,13 @@ type `Algebraic_real_1` can be obtained, we advise caution with that option, since computing an explicit representation of the \f$y\f$-coordinate can be rather expensive. - + \cgalFigureBegin{aos_fig-algebraic_segments,algebraic_segments.png} An arrangement of algebraic segments (solid lines), as constructed in \ref Arrangement_on_surface_2/algebraic_segments.cpp. The supporting curves are drawn as dashed lines. \cgalFigureEnd - + The following code exemplifies the method to construct points and the various methods to construct algebraic segments. The computed @@ -5358,9 +5407,9 @@ arrangement is depicted in \cgalFigureRef{aos_fig-algebraic_segments}. \cgalExample{Arrangement_on_surface_2/algebraic_segments.cpp} - + \subsubsection arr_ssectr_spherical Arcs of Great Circles Embedded in the Sphere - + A great circle of a sphere is the intersection of the sphere and a plane that passes through the center point of the sphere. For all @@ -5419,7 +5468,7 @@ The following example constructs an arrangement induced by 12 arcs of great circles embedded in the sphere. The arrangement is depicted in \cgalFigureRef{spherical_insert}. - + \cgalFigureBegin{spherical_insert,spherical_insert.png} An arrangement induced by 12 arcs of great circles, as constructed in \ref Arrangement_on_surface_2/spherical_insert.cpp. The number of @@ -5430,7 +5479,7 @@ with the identification curve induces a vertex at in green. The north and south poles are drawn as little spheres. The identification curve is drawn as a gray tube. \cgalFigureEnd - + \cgalExample{Arrangement_on_surface_2/spherical_insert.cpp} @@ -5454,17 +5503,17 @@ point of the arc. See \cgalFigureRef{aos_fig-right_hand_rule} for an illustration of the right-hand rule, which depicts the relation between the arc and the normal. - + \cgalFigureBegin{aos_fig-right_hand_rule,right_hand_rule.png} To use the right hand rule, point your right thumb in the direction of the normal and curl your fingers in the direction of the arc starting with source endpoint and ending at the target endpoint. \cgalFigureEnd - + - + \subsection arr_ssecmeta_tr Traits-Class Decorators - + Geometric traits-class decorators allow you to attach auxiliary data to the geometric objects (curves and to points). The data is @@ -5576,14 +5625,14 @@ and \f$c_2\f$ with associated data sets \f$S_1\f$ and \f$S_2\f$, respectively, the overlapping subcurve is associated with the consolidated set \f$S_1 \cup S_2\f$. - + \cgalFigureBegin{aos_fig-consolidated_curve_data,consolidated_curve_data.png} An arrangement of six red and blue segments, as constructed in \ref Arrangement_on_surface_2/consolidated_curve_data.cpp. Disks correspond to red-blue intersection points, while circles mark the endpoints of red-blue overlaps. \cgalFigureEnd - + The following example uses `Arr_segment_traits_2` as the base-traits class, attaching an additional color field to the segments @@ -5599,12 +5648,12 @@ endpoints are also drawn as black discs) \cgalExample{Arrangement_on_surface_2/consolidated_curve_data.cpp} - + \cgalFigureBegin{aos_fig-generic_curve_data,generic_curve_data.png} An arrangement of four polylines, named A-D, as constructed in \ref Arrangement_on_surface_2/generic_curve_data.cpp. \cgalFigureEnd - + The following example uses `Arr_polyline_traits_2` as the base-traits class, attaching an additional name field to each polyline @@ -5637,9 +5686,9 @@ the curve-data traits: \cgalExample{Arrangement_on_surface_2/dual_with_data.cpp} - + \section aos_sec-topol_traits The Topology Traits - + A topology traits class encapsulates the definitions of the topological entities and the implementation of the functions that handle these topological entities, used by the @@ -5671,9 +5720,9 @@ arrangement embedded on a sphere defined over a parameter space, the left and right boundary sides of which are identified, and the top and bottom boundary sides are contracted. - + \section arr_sec_extending Extending the Arrangement - + Developing applications that use arrangements to solve problems that are a bit more complicated than the problems presented in previous @@ -5683,9 +5732,9 @@ arrangement with auxiliary, usually non-geometric, data. In this chapter we describe several ways to extend an arrangement data structure. - + \subsection arr_ssecnotif The Notification Mechanism - + In some cases it is essential to know exactly what happens inside a specific arrangement object. For example, when a new curve is inserted @@ -5823,14 +5872,14 @@ up-to-date. In addition, you can define your own observer classes, inheriting from the base observer class and overriding the relevant notification functions, as required by their applications. - + \cgalFigureBegin{aos_fig-observer,observer.png} An arrangement of six line segments, as constructed in \ref Arrangement_on_surface_2/observer.cpp. The halfedge \f$e_v\f$ (dashed) is eventually removed, so that the final arrangement consists of four faces (one unbounded and three bounded ones). \cgalFigureEnd - + The following example shows how to define and use an observer class. The observer in the example responds to changes in the @@ -5857,9 +5906,9 @@ Observers are especially useful when the \dcel records are extended and store additional data-fields, since they help update this data stored in these fields, as the following sections reveal. - + \subsection arr_ssecex_dcel Extending the DCEL - + For many applications of the \ref PkgArrangementOnSurface2 package it is necessary to store additional information (perhaps of non-geometric @@ -5887,9 +5936,9 @@ class associates points with vertices and \f$x\f$-monotone curves with halfedges, but nothing more. In this section we show how to use alternative \dcel types to extend the desired \dcel records. - + \subsubsection arr_sssecex_dcel_face Extending the DCEL Faces - + The `Arr_face_extended_dcel` class-template is used to associate auxiliary data field of type `FaceData` to each face @@ -5909,7 +5958,7 @@ face or merged with another face). In such cases one can use an arrangement observer tailored for this task, which receives updates whenever a face is modified and sets its data field accordingly. - + \cgalFigureBegin{aos_fig-dcel_extension,dcel_extension.png} An arrangement of six line segments, as constructed in \ref Arrangement_on_surface_2/face_extension.cpp and \ref @@ -5919,7 +5968,7 @@ directed, so they are drawn as arrows directed from the source to the target). The indices associated with the halfedges in \ref Arrangement_on_surface_2/face_extension.cpp are shown in brackets. \cgalFigureEnd - + The next example constructs an arrangement that contains seven bounded faces induced by six line segments, \f$s_1, \ldots, s_6\f$, as shown @@ -5936,9 +5985,9 @@ similar observer to a non-empty arrangement.} \cgalExample{Arrangement_on_surface_2/face_extension.cpp} - + \subsubsection arr_sssecex_dcel_all Extending All DCEL Records - + As you continue to use arrangements to solve various problems you will find out that the ability to extend the face records is @@ -6059,9 +6108,9 @@ class Arr_map_dcel : public \cgalAdvancedEnd - + \subsection arr_ssecoverlay Overlaying Arrangements - + Assume that we are given two geographic maps represented as arrangements, with some data objects attached to their faces, @@ -6126,7 +6175,7 @@ is possible to obtain the same result using the standard insertion-operations instead, but, as mentioned above, this is less efficient. - + \cgalFigureBegin{aos_figex_overlay,overlay.png} Overlaying two simple arrangements of line segments, as done in \ref Arrangement_on_surface_2/overlay.cpp and \ref @@ -6135,7 +6184,7 @@ Arrangement_on_surface_2/face_extension_overlay.cpp the two bounded faces are considered as marked, and the octagonal face which is the intersection of the two marked faces is denoted by \f$f_0\f$. \cgalFigureEnd - + The next program constructs two simple arrangements; each comprises four line segments that form a square, as depicted in @@ -6219,12 +6268,12 @@ arrangement depicted in \cgalFigureRef{aos_figex_overlay}. \cgalExample{Arrangement_on_surface_2/face_extension_overlay.cpp} - + \cgalFigureBegin{aos_figex_overlay_unbounded,overlay_unbounded.png} Overlaying two arrangements of lines that have unbounded faces, as done in \ref Arrangement_on_surface_2/overlay_unbounded.cpp. \cgalFigureEnd - + The next example, depicted in \cgalFigureRef{aos_figex_overlay_unbounded}, demonstrates the face @@ -6353,7 +6402,7 @@ template struct Overlay_color_traits { }; \endcode - + \cgalFigureBegin{aos_figex_overlay_color,overlay_color.png} The overlay of two extended arrangements]{The overlay (c) of two @@ -6362,7 +6411,7 @@ with a color. The color of each feature of the overlay arrangement is the blend of the colors of the two inducing features. \cgalFigureEnd - + The example program listed below computes the overlay, depicted in \cgalFigureRef{aos_figex_overlay_color}, of the two arrangements @@ -6378,9 +6427,9 @@ of the colors attached to the inducing features. \cgalExample{Arrangement_on_surface_2/overlay_color.cpp} - + \subsection arr_ssecarr_with_hist Storing the Curve History - + When you constructs an arrangement induced by a set \f$\mathcal{C}\f$ of arbitrary two-dimensional curves, you end up with a collection @@ -6418,9 +6467,9 @@ arrangements with history. However, the explanation applies also to `Arrangement_on_surface_with_history_2<>`, as the type of the embedding surface is irrelevant to the discussion. - + \subsubsection arr_sssecarrwh_traverse Traversing an Arrangement with History - + The `Arrangement_with_history_2` class template extends the `Arrangement_2` class template. Thus, all the iterator and circulator @@ -6493,9 +6542,9 @@ edges and the consolidated curve-set. You may also employ an overlay-traits class to maintain any type of auxiliary data stored with the \dcel cells; see Section \ref arr_ssecoverlay. - + \subsubsection arr_sssecmodif_traverse Modifying an Arrangement with History - + The `Arrangement_with_history_2` class template extends the `Arrangement_2` class template; thus, it inherits the fundamental @@ -6568,14 +6617,14 @@ arrangement-with-history object in order to get detailed notifications of the changes the arrangements undergoes; see Section \ref arr_ssecnotif for the details). - + \cgalFigureBegin{aos_fig-curve_history,curve_history.png} An arrangement with history as constructed in \ref Arrangement_on_surface_2/curve_history.cpp. Note that \f$s_1\f$ and \f$s_3\f$ overlap over two edges. The point-location query points \f$q_1\f$, \f$q_2\f$, and \f$q_3\f$ are drawn as lightly shaded dots. \cgalFigureEnd - + In the following example we construct a simple arrangement of six line segments, as depicted in \cgalFigureRef{aos_fig-curve_history}, while @@ -6589,7 +6638,7 @@ auxiliary function `locate_point()` defined in the header file \cgalExample{Arrangement_on_surface_2/curve_history.cpp} - + \cgalFigureBegin{aos_fig-edge_manipulation_curve_hostory,edge_manipulation_curve_history.png} An arrangement with history of nine circles as constructed in \ref Arrangement_on_surface_2/edge_manipulation_curve_history.cpp. Note the @@ -6598,7 +6647,7 @@ subdivide this circle into an upper half and a lower half, each consists of 9 edges. The large circle \f$c_0\f$ is eventually removed from the arrangement, with all 18 edges it induces. \cgalFigureEnd - + The following example demonstrates the usage of the free `remove_curve()` function. We construct an arrangement of nine @@ -6612,9 +6661,9 @@ member functions when operating on an arrangement-with-history object. \cgalExample{Arrangement_on_surface_2/edge_manipulation_curve_history.cpp} - + \section aos_sec-io Input/Output Streams and Visualization - + In some cases, one would like to save an arrangement object constructed by some application, so that later on it can be @@ -6622,9 +6671,9 @@ restored. In other cases one would like to create nice drawings that represent arrangements constructed by some application. These drawings can be hard printed or displayed on a computer screen. - + \subsection aos_ssec-io-stream Input/Output Stream - + Consider an arrangement that represents a very complicated geographical map, and assume that there are various applications that need to answer @@ -6661,9 +6710,9 @@ a file. \cgalExample{Arrangement_on_surface_2/io.cpp} - + \subsection arr_ssecarr_io_aux_data Arrangements with Auxiliary Data - + \cgalAdvancedBegin The inserter and extractor both ignore any auxiliary data stored with the arrangement features. Thus, they are @@ -6717,9 +6766,9 @@ Doing so, you can define other I/O formats, such as an XML-based format or a binary format. \cgalAdvancedEnd - + \subsection arr_ssecarr_io_hist Arrangements with Curve History - + Section \ref arr_ssecarr_with_hist introduces the `Arrangement_with_history_2` class, which saves the @@ -6758,9 +6807,9 @@ arrangement formatter class (see Section \ref arr_ssecarr_io_aux_data) and defines a simple textual input/output format. \cgalAdvancedEnd - + \subsection arr_ssecarr_io_vis Drawing an Arrangement - + An arrangement data structure can be visualized by calling the \link PkgArrangementOnSurface2Draw CGAL::draw() \endlink function as shown in the following example. This function opens a new window showing the given arrangement. A call to this function is blocking; that is, the program continues execution only after the user closes the window. @@ -6776,9 +6825,9 @@ of 14 vertices, 15 edges, and 3 faces. Notice that the colors are generated at r \cgalFigureEnd - + \section aos_sec-bgl Adapting to Boost Graphs - + \boost\cgalFootnote{See also \boost's homepage at: \cgalFootnoteCode{www.boost.org}.} is a collection of portable \cpp libraries @@ -6802,9 +6851,9 @@ graph vertex with each \dcel face, such that two vertices are connected, iff there is a \dcel halfedge that connects the two corresponding faces. - + \subsection arr_ssecbgl_primal The Primal Arrangement Representation - + Arrangement instances are adapted to \boost graphs by specializing the \link BGLArgtGT `boost::graph_traits` \endlink template for @@ -6909,13 +6958,13 @@ template struct Edge_length { }; \endcode - + \cgalFigureBegin{aos_fig-bgl_primal_adapter,bgl_primal_adapter.png} An arrangement of seven line segments, as constructed by \ref Arrangement_on_surface_2/bgl_primal_adapter.cpp and \ref Arrangement_on_surface_2/bgl_dual_adapter.cpp. \cgalFigureEnd - + In the following example we construct an arrangement of seven line segments, as shown in \cgalFigureRef{aos_fig-bgl_primal_adapter}. @@ -6931,9 +6980,9 @@ squared distances of the vertex from \f$v_0\f$. \cgalExample{Arrangement_on_surface_2/bgl_primal_adapter.cpp} - + \subsection arr_ssecbgl_dual The Dual Arrangement Representation - + An arrangement instance can be represented as a graph other than the one described in the previous section. A dual-graph representation @@ -6998,7 +7047,7 @@ public: }; \endcode - + \cgalFigureBegin{aos_fig-bgl_dual_adapter,bgl_dual_adapter.png} An arrangement of seven line segments, as constructed by \ref Arrangement_on_surface_2/bgl_dual_adapter.cpp and its dual face graph, @@ -7006,7 +7055,7 @@ where every arrangement face is a vertex of the graph. The index of a dual vertex is the discovery time of a breadth-first search applied to the face graph, starting from the unbounded face \f$f_0\f$. \cgalFigureEnd - + The following example constructs the same arrangement constructed by the program coded in \ref @@ -7025,9 +7074,9 @@ is discovered at time \f$0\f$, the neighboring faces \f$f_1\f$, \cgalExample{Arrangement_on_surface_2/bgl_dual_adapter.cpp} - + \section aos_sec-tips How To Speed Up Your Computation - + Before the specific tips, we remind you that compiling programs with debug flags disabled and with optimization flags enabled significantly @@ -7128,9 +7177,9 @@ be avoided by storing the results obtained by the first call, and reusing them when needed. - + \section aos_sec-design Design and Implementation History - + The code of this package is the result of a long development process. Initially (and until version 3.1), the code was spread among several diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_circle_segment_traits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_circle_segment_traits_2.h index 4a9739925f4..94efdc30945 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_circle_segment_traits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_circle_segment_traits_2.h @@ -32,7 +32,7 @@ namespace CGAL { * same direction as a precondition. Moreover, `Arr_circle_segment_traits_2` * supports the merging of curves of opposite directions. * - * \cgalModels{AosTraits_2,AosDirectionalXMonotoneTraits_2} + * \cgalModels{AosTraits_2,AosApproximateTraits_2,AosDirectionalXMonotoneTraits_2} * */ template diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_conic_traits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_conic_traits_2.h index c14387ca411..d9f80d16c16 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_conic_traits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_conic_traits_2.h @@ -80,7 +80,7 @@ namespace CGAL { * to have the same direction as a precondition. Moreover, `Arr_conic_traits_2` * supports the merging of curves of opposite directions. * - * \cgalModels{AosTraits_2,AosLandmarkTraits_2,AosDirectionalXMonotoneTraits_2} + * \cgalModels{AosTraits_2,AosLandmarkTraits_2,AosApproximateTraits_2,AosDirectionalXMonotoneTraits_2} * * \cgalHeading{Types} */ @@ -438,56 +438,13 @@ public: Bbox_2 operator()(const X_monotone_curve_2& xcv) const { return bbox(xcv); } }; - /*! \name Auxiliary Functor definitions, used gor, e.g., the landmarks - * point-location strategy and the drawing function. + /*! \name Auxiliary Functor definitions. */ - //@{ + /// @{ typedef double Approximate_number_type; typedef CGAL::Cartesian Approximate_kernel; typedef Approximate_kernel::Point_2 Approximate_point_2; - - /*! \class Approximate_2 - * A functor that approximates a point and an \f$x\f$-monotone curve. - */ - class Approximate_2 { - public: - /*! Obtain an approximation of a point coordinate. - * \param p The exact point. - * \param i The coordinate index (either 0 or 1). - * \pre `i` is either 0 or 1. - * \return An approximation of p's \f$x\f$-coordinate (if `i` == 0), or an - * approximation of p's \f$y\f$-coordinate (if `i` == 1). - */ - Approximate_number_type operator()(const Point_2& p, int i) const; - - /*! Obtain an approximation of a point. - * \param p The exact point. - */ - Approximate_point_2 operator()(const Point_2& p) const; - - /*! approximates a given \f$x\f$-monotone curve. It computes a sequence of - * approximate points that represent an approximate polyline, and inserts - * them into an output container given through an output iterator. The - * first and last points in the sequence are always approximations of the - * endpoints of the given arc. - * - * \param oi An output iterator for the output container. - * \param error The error bound of the polyline approximation. This is the - * Hausdorff distance between the arc and the polyline that - * approximates the arc. - * \param xcv The exact \f$x\f$-monotone arc. - * \param l2r A Boolean flag that indicates whether the arc direction is - * left to right. - * \return The past-the-end iterator of the output container. - * - * \pre Dereferencing `oi` must yield an object of type - * `Arr_conic_traits_2::Approximate_point_2`. - */ - template - OutputIterator operator()(OutputIterator oi, double error, - const X_monotone_curve_2& xcv, - bool l2r = true) const; - }; + /// @} /*! \class Trim_2 * A functor that trims a conic arc. @@ -521,9 +478,6 @@ public: /*! Obtain a `Trim_2` functor. */ Trim_2 trim_2_object() const; - /*! Obtain an `Approximate_2` functor. */ - Approximate_2 approximate_2_object() const; - /// @} }; /* end Arr_conic_traits_2 */ diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_geodesic_arc_on_sphere_traits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_geodesic_arc_on_sphere_traits_2.h index 03dbe6483f0..35c55eeb083 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_geodesic_arc_on_sphere_traits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_geodesic_arc_on_sphere_traits_2.h @@ -39,7 +39,7 @@ namespace CGAL { * normalized vector \f$(x,y)\f$ in the \f$xy\f$-plane that bisects the * identification curve. - * \cgalModels{AosTraits_2,AosLandmarkTraits_2,AosSphericalBoundaryTraits_2} + * \cgalModels{AosTraits_2,AosLandmarkTraits_2,AosApproximateTraits_2,AosSphericalBoundaryTraits_2} */ template class Arr_geodesic_arc_on_sphere_traits_2 { diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_polyline_traits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_polyline_traits_2.h index 31599102e75..a8b8b662f98 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_polyline_traits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_polyline_traits_2.h @@ -36,9 +36,9 @@ namespace CGAL { * - `AosConstructCurveTraits_2`. * * If, in addition, the GeometryTraits_2 models the concept - * `AosApproximatePointTraits_2` then `Arr_polycurve_traits_2` models - * this concept as well. The same holds for the concept - * `AosOpenBoundaryTraits_2`. If no type is provided, then + * `AosApproximateTraits_2` (or `AosApproximatePointTraits_2`) then + * `Arr_polycurve_traits_2` models this concept as well. The same holds for the + * concept `AosOpenBoundaryTraits_2`. If no type is provided, then * `Arr_segment_traits_2` (instantiated with * `Exact_predicates_exact_constructions_kernel` as the kernel) is used. * Otherwise, @@ -77,7 +77,7 @@ namespace CGAL { * the macro `CGAL_ALWAYS_LEFT_TO_RIGHT` to 1 before any \cgal header is * included. * - * \cgalModels{AosTraits_2,AosDirectionalXMonotoneTraits_2,AosConstructXMonotoneCurveTraits_2,AosConstructCurveTraits_2,AosApproximatePointTraits_2 + * \cgalModels{AosTraits_2,AosDirectionalXMonotoneTraits_2,AosConstructXMonotoneCurveTraits_2,AosConstructCurveTraits_2,AosApproximateTraits_2 * (if the type that substitutes the template parameter `SegmentTraits_2` * models the concept as well)} * diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_segment_traits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_segment_traits_2.h index 3e4b41412ac..4cad261f35d 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_segment_traits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_segment_traits_2.h @@ -52,7 +52,7 @@ namespace CGAL { * same direction as a precondition. Moreover, `Arr_segment_traits_2` supports * the merging of curves of opposite directions. * - * \cgalModels{AosTraits_2,AosLandmarkTraits_2,AosDirectionalXMonotoneTraits_2} + * \cgalModels{AosTraits_2,AosLandmarkTraits_2,AosApproximateTraits_2,AosDirectionalXMonotoneTraits_2} */ template class Arr_segment_traits_2 : public Kernel { diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosApproximatePointTraits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosApproximatePointTraits_2.h index 2c00cd3004c..90b53ff56e5 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosApproximatePointTraits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosApproximatePointTraits_2.h @@ -7,6 +7,7 @@ * \cgalRefines{AosBasicTraits_2} * * \cgalHasModelsBegin + * \cgalHasModels{CGAL::Arr_circle_segment_traits_2} * \cgalHasModels{CGAL::Arr_conic_traits_2} * \cgalHasModels{CGAL::Arr_geodesic_arc_on_sphere_traits_2} * \cgalHasModels{CGAL::Arr_linear_traits_2} diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosApproximateTraits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosApproximateTraits_2.h new file mode 100644 index 00000000000..99fca89cba1 --- /dev/null +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosApproximateTraits_2.h @@ -0,0 +1,50 @@ +/*! \ingroup PkgArrangementOnSurface2ConceptsTraits + * \cgalConcept + * + * The concept `AosApproximateTraits_2` refines the concept + * `AosApproximatePointTraits_2`. A model of this concept is able to + * approximate a point and a curve (in addition to the ability to apprximate the + * coordinates of a point). + * + * \cgalRefines{AosApproximatePointTraits_2} + * + * \cgalHasModelsBegin + * \cgalHasModels{CGAL::Arr_circle_segment_traits_2} + * \cgalHasModels{CGAL::Arr_conic_traits_2} + * \cgalHasModels{CGAL::Arr_geodesic_arc_on_sphere_traits_2} + * \cgalHasModels{CGAL::Arr_polyline_traits_2} + * \cgalHasModels{CGAL::Arr_segment_traits_2} + * \cgalHasModelsEnd + * + * \sa `AosApproximatePointTraits_2` + * \sa `draw()` + */ +class AosApproximateTraits_2 { +public: + /// \name Types + /// @{ + + //! the approximate kernel. + typedef unspecified_type Approximate_kernel; + + //! the approximate point. + typedef unspecified_type Approximate_point_2; + + /// @} + + /// \name Functor Types + /// @{ + + /// models the concept `AosTraits::Approximate_2`. + typedef unspecified_type Approximate_2; + + /// @} + + /// \name Accessing Functor Objects + /// @{ + + /// + Approximate_2 approximate_2_object() const; + + /// @} +} diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--Approximate_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--Approximate_2.h index be9fe4443e0..a9712000aa9 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--Approximate_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--Approximate_2.h @@ -7,6 +7,7 @@ namespace AosTraits { * * \cgalHasModelsBegin * \cgalHasModels{AosApproximatePointTraits_2::Approximate_2} + * \cgalHasModels{AosApproximateTraits_2::Approximate_2} * \cgalHasModelsEnd */ class Approximate_2 { @@ -17,9 +18,36 @@ public: /*! obtains an approximation of `p`'s \f$x\f$-coordinate (if `i == 0`), or of * `p`'s \f$y\f$-coordinate (if `i == 1`). + * \pre `i` is either 0 or 1. */ CGAL::Approximate_number_type operator()(AosTraits::Point_2 p, int i); + /*! obtains an approximation of `p`. + */ + CGAL::Approximate_point_2 operator()(AosTraits::Point_2 p); + + /*! approximates a given \f$x\f$-monotone curve. It computes a sequence of + * approximate points that represent an approximate polyline, and inserts + * them into an output container given through an output iterator. The + * first and last points in the sequence are always approximations of the + * endpoints of the given curve. + * + * \param xcv The exact \f$x\f$-monotone curve. + * \param error The error bound of the polyline approximation. This is the + * Hausdorff distance between the curve and the polyline that + * approximates the curve. + * \param oi An output iterator for the output container. + * \param l2r A Boolean flag that indicates whether the curve direction is + * left to right. + * \return The past-the-end iterator of the output container. + * + * \pre Dereferencing `oi` must yield an object of type + * `Arr_conic_traits_2::Approximate_point_2`. + */ + template + OutputIterator operator()(const X_monotone_curve_2& xcv, double error, + OutputIterator oi, bool l2r = true) const; + /// @} }; /* end AosTraits::Approximate_2 */ diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/PackageDescription.txt b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/PackageDescription.txt index 774d15e834a..7566c274787 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/PackageDescription.txt +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/PackageDescription.txt @@ -112,6 +112,7 @@ implemented as peripheral classes or as free (global) functions. \cgalCRPSection{Concepts} +- `AosApproximateTraits_2` - `AosApproximatePointTraits_2` - `AosBasicTopologyTraits` - `AosBasicTraits_2` @@ -166,32 +167,32 @@ implemented as peripheral classes or as free (global) functions. \cgalCRPSection{Function Object Concepts} +- `AosTraits::Approximate_2` +- `AosTraits::AreMergeable_2` - `AosTraits::CompareX_2` - `AosTraits::CompareXy_2` -- `AosTraits::ConstructMinVertex_2` -- `AosTraits::ConstructMaxVertex_2` -- `AosTraits::IsVertical_2` -- `AosTraits::IsOnXIdentification_2` -- `AosTraits::IsOnYIdentification_2` - `AosTraits::CompareYAtX_2` - `AosTraits::CompareYAtXLeft_2` - `AosTraits::CompareYAtXRight_2` -- `AosTraits::Equal_2` -- `AosTraits::ParameterSpaceInX_2` -- `AosTraits::ParameterSpaceInY_2` +- `AosTraits::ConstructMinVertex_2` +- `AosTraits::ConstructMaxVertex_2` - `AosTraits::CompareXOnBoundary_2` - `AosTraits::CompareYOnBoundary_2` - `AosTraits::CompareXNearBoundary_2` - `AosTraits::CompareYNearBoundary_2` - `AosTraits::CompareXOnBoundaryOfCurveEnd_2` -- `AosTraits::Intersect_2` -- `AosTraits::Split_2` -- `AosTraits::AreMergeable_2` -- `AosTraits::Merge_2` -- `AosTraits::MakeXMonotone_2` -- `AosTraits::Approximate_2` -- `AosTraits::ConstructXMonotoneCurve_2` - `AosTraits::ConstructCurve_2` +- `AosTraits::ConstructXMonotoneCurve_2` +- `AosTraits::Equal_2` +- `AosTraits::Intersect_2` +- `AosTraits::IsVertical_2` +- `AosTraits::IsOnXIdentification_2` +- `AosTraits::IsOnYIdentification_2` +- `AosTraits::MakeXMonotone_2` +- `AosTraits::Merge_2` +- `AosTraits::ParameterSpaceInX_2` +- `AosTraits::ParameterSpaceInY_2` +- `AosTraits::Split_2` \cgalCRPSection{Classes} From d2eda3e94a58f933cdd114c679a2ac8a797cad9c Mon Sep 17 00:00:00 2001 From: Efi Fogel Date: Wed, 28 Aug 2024 20:43:03 +0300 Subject: [PATCH 06/63] Updated figures; changed prefix of concepts Arrangement... => Aos... --- .../Arrangement_on_surface_2.txt | 5 +- .../fig/central_concept_cluster.png | Bin 2237 -> 5706 bytes .../fig/identified_clusters.png | Bin 6495 -> 9476 bytes .../fig/landmark_concept_cluster.png | Bin 4482 -> 9034 bytes .../fig/left_side_cluster.png | Bin 6384 -> 8441 bytes .../fig/open_concept_hierarchy.png | Bin 3952 -> 9014 bytes .../fig/side_clusters.png | Bin 3884 -> 9376 bytes .../fig/spherical_concept_hierarchy.png | Bin 6025 -> 17961 bytes .../fig_src/identified_clusters.tex | 42 ++++++++++------- .../fig_src/left_side_cluster.png | Bin 3889 -> 8441 bytes .../fig_src/left_side_cluster.tex | 25 +++++----- .../fig_src/open_concept_hierarchy.tex | 34 +++++++------- .../fig_src/side_clusters.tex | 33 +++++++------ .../fig_src/spherical_concept_hierarchy.tex | 44 ++++++++++++------ 14 files changed, 108 insertions(+), 75 deletions(-) diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Arrangement_on_surface_2.txt b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Arrangement_on_surface_2.txt index 0179a49386e..2256387b2cd 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Arrangement_on_surface_2.txt +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Arrangement_on_surface_2.txt @@ -3701,8 +3701,9 @@ parameter space in this case is open and unbounded.} \cgalFigureBegin{aos_fig-spherical_concept_hierarchy,spherical_concept_hierarchy.png} -Bottom portion of the refinement hierarchy of the geometry-traits -concepts for curves embedded in a sphere-like parameterized surface +The entire spherical boundary cluster of the refinement hierarchy of the +geometry-traits concepts for curves embedded in a sphere-like parameterized +surface. \cgalFigureEnd diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/fig/central_concept_cluster.png b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/fig/central_concept_cluster.png index 8f47fe2dde188005dd3339bac332b39a4ca12d02..5cd2a04bdcfa62b79514e4937dc7e7f91f055b0d 100644 GIT binary patch literal 5706 zcmZ{o1yI|;x9@19wNuC@v(5j_zA03cOU1?gkGKi0s6_}G6` z(E$Mf@QB?-QBl{$&JF-jMWm)W=_Z@fqW6!bHY4RI6{2+&6S-f6q>!6&j#Yk<+sM^b za*b)h<@pdJqV!1#hxSb>>pP_<#2>?OX`tb}xWC&xsrBSdJrI*-WN9PVZ%1S3JMUG}^7f!b z5H%6t8P^rV+qEriRRrt&zKOKHTD7j`>y4-{L z(1(O!HRMkV<%K^{7C+vUQzmDqi+TnW`^i8QrcmI_`RI2Dq##$9!jK3o@2yL9LJWP} zhC3I5Ul2VaE`oPU8W=&5@nGEMp$XpK=qW)0SY+VRsfS1o(R%0Qfh9Ivv`!b}0riEb z6bbQC`oS|?a@H=n6bg%oI1dUkHadjDgP%slV?lT8j0EZ?S$u$xmh+|E|xXhjgjbgV@)zLt-9xKQy7!y(@i@;b87U z@J%rtl`qCTXVTU*Jqq_^-_sxaczvjM`1(;+L_tI}s1Q^Os_)T4xNxUc z$a{ZQ);%sqe=#nn5{W2PUmm+?$Zf!%el^X;sOU86cOvdjaqDyiuwYY56-hfuA4vO} z)&bYV@nksH>>csyC~VX#}U({1*S& z)4!9xnc~O#F=-<0G-)tNnl(TRW)#ow#Dz}hNs;6`S7l0@Ogm3o;0@M9Sp{j!>-|t; zQ7X`1s_6R4syJ#Sq+P3dSoklNQtOu)mr=RqX3`jODO+;4rnQk^Kqjk$pM%pX$*ROE z&gw(zv=8~}dFt7}slZ{}=C9NnH5*mH#ihk-RcV!f3(r&;tA~sd^kj?Y%Ves5j1i7t zzKxa(4JJ7rn!Nr>^EZRtbX@r*xZd&@MWg)j8+Em}$##|K*Y|~tMHb%zRS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2iki{>E8ngb3$Ypf57=x^(jA>3)vN>?Gt3M}6!*;b*@Dwht~j?M+SiV0Om zJ@;vt#^%fmC)l*RUE8bazECQtO@Wmhmyv7BC5iucY5(U&XPQ%!r{@gz8Vw?~>(A#c zYn<>)-Z-B%852!fc%|kS|G}}0GI4uvNqSd;j_;CUEl@o|#!I%1qu;cAE6neor%gvi z=-qDRDdN2Z@vrj|a_-!%;8E%U)64W?TZ!W>YJ8k1PGZdm@|+7D|9HtKhMf4??|O~L z+be!r`^I>jOtXglBzHQY(KaHRf5av{N9`9w6QXCb8zNv z-QsU0cX2sDrkb#0)Vu8y(9%fe=HjLi_vKX!wZVq^c!d&?-XtOy0DTzTSQlobt8e5C zH$uVa%m;n+7<96-xFT#~zp8(&8|4-@kOEnFhugH;IJT{fFQq9 z!QlYh*a&K95^josns7CAVEIq-in#>IeM|cUS0afV5F7-Yv$oZRLk*SW?U3QzI)Ju0 KYyIMsXY4<~#RK>N diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/fig/identified_clusters.png b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/fig/identified_clusters.png index da89fbebdd57fbc5e583dcb4b6a2598b1a1eb834..e109ecba1fbfc44ee0e55e867e0e861413e6ab01 100644 GIT binary patch literal 9476 zcmZ{K2T&AW@aB+_ELq~h4+%;J0m)HvmYgN7l3^E?oFqvS1SAI)BqKS4paPOvGAs#F-ZU5KJ|w2 zi?Ty;m7=TXZ+1CnZw>L|V3KEo{KD8)j)%Xt)e~7>+y{?1Dp|F!`2jOt0OY#EZ#fn4 z-ouo=8Z**%X|DPZ0Eq7$2w`X3`+ZF%CdLoJ+>piP#5Bl%;2rvqA1kekS`46B!U&Kf zn*lB$xNMjheVEPGc$|QeHM1CgsVt8ZpqWpVjhnM1*@RgcKEK3Ei<=lqrV*Adi@gwv zgCAB+_NY)!Fp2y#$)@ZJGWwcG28d`MJwcd!ffMJ0-yxm_IXVwt5*WzAbSO>;y-8Xy zQ4zQWQKMqQSh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+8ImI-<%JL*Iryy|2)tu-p_5fcsxRpmfMx6Nq7?lVTn&F6g#sO#fSu#?AMBmAm* z9FOCC+k5$6c7jQ5`a-oaOaI&{34;aswK@(xjyW^55xGwZ-EyY|U-P5>VuTHOOB`fU z?wH`jjOi@ zpt^7;HZb&Lpp_k&I#fhQ4_lhx%H-?D9A^+O6T8b?Uw&m#h;%GyOFL(`&=qgS63dF@ zQud7->xwMD@%RjsB{AIVgT(xLkQI4i$51RCooL+o1vN;w;;Ojjt^f3AcJW~2`^$2N`da17|e#n-{lsI%v^gfJKAb$j4x9#$Yxm?Da&2iAk!5d z9Lb)U^9f@ubY8qqo7%*>iD&yU7qmUSx)^3t*sRGGY{I?Hp!f3dbNXUWN-pPUa=5e4XT zHOLNX(0co_u~}X!9oZ#M`aS^rBdq*g9Q|Dtoc&x$0w5(JDGQa5flA4kOUfun!4;(B zMJ1#aBqY##F|hv!@bq?Ze-QldfaMCsg#QA3TplQByPLW`x$7O^<>K!3@UC|d046DO zTUIVe9)4R+MpQynqM~C=3^hL7 Hb%_2SLWo|5 diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/fig/left_side_cluster.png b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/fig/left_side_cluster.png index aef6892be92447728fc3e47e12f8e8066a76cbcc..6b61310c82505f72f8b68d023a2c6fa01ca46a56 100644 GIT binary patch literal 8441 zcmZ{qbyQT*xA-qZmkfe{w1AW#9Rf1MAR#FX(t?zuba#V@go1PlC zUfJGLJOKbgcBH(#Ceqv-0F*w&$6IU0=~H*_9!hP5%G{NEuPOhT`(eNrr~&6_;SZVh zbWH`D@LI^Dh;U(rPYPJnM)54~6ex*520^G?f_Wgl^^W(nWc3{|_tQ@qV2!uQ-b3~` z&a3mzL+1`y%;CY7ZGGOaU(~mvd!p~tQ1;_sI3qI?+V_uKurcEec?-JTn#53FWn^O*yQR_LdL|tBT6>KU+i!{?Y-Oh zD~9iiR(U0GJEvZDSsNEsi9`Q8B7*$FI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<{onsAn7h!)p1$MXck+??Wta7AA2mdTY@uPDOEs zdV$)Ox!8gmW4rhE$v!MJzvM&GOu&Ymp&GcQVw~&BNh9%;Zg`|l|diEG80(x`R zB?$%STLn1U2RNyq{hY1@AR{dUm5{y~%H}dq6&Yz2S!FS485L>iudj-K|E~Z~Z$~%h zkpDZN?i6Hw6(IPZ6MP(NW p;R?_4|M3=1e*SLWUI0SRKmsZ$$IEG`5`5(cjPy] - \! = {} - <4wideleft>[scaleby=2.24 0,arrows=-,linestyle=none]{\psframebox{\concept{AosLeftSideTraits\_2}}}@lt !lt - ^[scaleby=1.15 0,arrows=-,linestyle=none]{\psframebox{\concept{ArrangemenRightSideTraits\_2}}}@rt !rt - ^[scaleby=1.15 0,arrows=-,linestyle=none]{\psframebox{\concept{ArrangemenBottomSideTraits\_2}}}@bt !bt - ^<4wideright>[scaleby=2.26 0,arrows=-,linestyle=none]{\psframebox{\concept{ArrangemenTopSideTraits\_2}}}@tt !tt - . - \!lt = [scaleby=1.08 1]{\psframebox{\concept{AosIdentifiedVerticalTraits\_2}}}@ivt !ivt - . - \!bt = [scaleby=1.17 1]{\psframebox{\concept{AosIdentifiedHorizontalTraits\_2}}}@iht !iht - . - \ncline{rt:b}{ivt:t} - \ncline{tt:b}{iht:t} - \endjtree - \psset{treevshift=0,unit=1cm,xunit=1cm,yunit=1cm,everytree={}, - etcratio=.75,triratio=.5} +\begin{forest} + [,phantom,for tree={concept,edge={-Stealth}} + [,phantom + [\name{AosLeftSideTraits\_2} + [,phantom] + [\name{AosIdentifiedVerticalTraits\_2},name=ivt] + ] + [\name{AosRightSideTraits\_2},name=rst] + ] + [,phantom + [\name{AosBottomSideTraits\_2} + [,phantom] + [\name{AosIdentifiedHorizontalTraits\_2},name=iht] + ] + [\name{AosTopSideTraits\_2},name=tst] + ] + ] + \draw[-Stealth] (rst) to (ivt); + \draw[-Stealth] (tst) to (iht); + \end{forest} \end{document} diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/fig_src/left_side_cluster.png b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/fig_src/left_side_cluster.png index 6908e84c4e9b140c5a7b46b50039ca0ebd605976..6b61310c82505f72f8b68d023a2c6fa01ca46a56 100644 GIT binary patch literal 8441 zcmZ{qbyQT*xA-qZmkfe{w1AW#9Rf1MAR#FX(t?zuba#V@go1PlC zUfJGLJOKbgcBH(#Ceqv-0F*w&$6IU0=~H*_9!hP5%G{NEuPOhT`(eNrr~&6_;SZVh zbWH`D@LI^Dh;U(rPYPJnM)54~6ex*520^G?f_Wgl^^W(nWc3{|_tQ@qV2!uQ-b3~` z&a3mzL+1`y%;CY7ZGGOaU(~mvd!p~tQ1;_sI3qI?+V_uKurcEec?-JTn#53FWn^O*yQR_LdL|tBT6>KU+i!{?Y-Oh zD~9iiR(U0GJEvZDSsNEsi9`Q8B7*$FIIpbtyEdQ4Ja~5NKV+@&s_BmxFy#y|Up9L! z#se-p5SfdSmm0QpC0~31iJd(moa9@tAMvE51ObqB89Yu1;wzy`AUQvFLMxRxK)rzF zBMY4Z&Y1DoAXvX4b*A{7fPyKLI6;97?;Akv>%BC*^aZI}NO3TF;V}(fOdwP>C{YGy zJ`k56s1$lXTUPMX-EVg`WS&9k%ERcH#eUNf1<7T-;Uw%0aLP*8B-bHA$hvA$91*+R zsfWyk;AOoZ78l08CiM*=Pr^Z&;p$;eyr1UBcMJ7hJa!OHBU)=c-!lQ5d#};Xuy^lF zREmUnF>#L`0%d8J`9f|S66HWn#zyl&4(GS-Hz=3l-_N?==r-hc9>`fxod>jkeZ$GF zLT&lM>DhVK*$0))iQ^}f$MKvsOkaZXghdK zPD$4Lk+^kt8j`R;GqZmF!6ar?dMlw^8fO|*SY71(PF2&@QoWxfy7=!xk6XjcP-VDN zDqG5154WIhcP|+gJGmAk9inSZjqW}sdl~(%%ea$tG1r0E!?96f9WiA9nogW6UxdC$e$jVqtPK-?DW&RD=uvg{WM6Cl31Lb|R>*sJHoOd8(W&+U z$(>Lj>-z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+b+c2KVIACtn!tdX>B^by!-O8gaebeJ>9gGu~jxHP<`=$j>6x=eEe?IE!ySh}% zkfRYr@g?cT>}4Kdq|mn5k_C=ydkL@$_V0zkof~ec?cpqHdF{508!@!O^G|FS3R0_d zW&b{23;UUVqHI&1UObZ5vG)tPr}WNz6B7^#lj5`C?u;6&7CAi0_ob(eG>M+G4V*b~4a+pUMARX_I*4RwvOiVS>zZN>nYF;Lc&RbgL&V-0}Z0Q9bs)S$*=2B0oGvS+p z-`43j2Py*haXnK3`|Gm#NgJ_iq?7R_MjLG_5*NPGv=SIbxENlTyw?WYmMJyIIS@ay z2MYf_C|uK>j%W%D@B>dvlFot;5jg^teKWSFJ((}66W&F;67BzUo*y5WwKH!pd$U2~ z{u_bRe~$7fCtG#}{d9wXoOF)Y{|^8(o+`24b<^_?Cav`>#pM$ z0#MPsp(v-K7NQK7Q&5E}Koz9=BOJ~M(4U_E5H_xl0zLhF0Tz0] - \! = {\psframebox{\concept{AosLeftSideTraits\_2}}} - <4wideleft>[scaleby=2.44 1]{\psframebox{\concept{AosOpenLeftTraits\_2}}}@ult !ult - ^[scaleby=1.37 1]{\psframebox{\concept{AosClosedLeftTraits\_2}}}@urt !urt - ^[scaleby=1.12 1]{\psframebox{\concept{AosContractedLeftTraits\_2}}}@ubt !ubt - ^<4wideright>[scaleby=2.56 1]{\psframebox{\concept{AosIdentifiedVerticalTraits\_2}}}@utt !utt - . - \endjtree - \psset{treevshift=0,unit=1cm,xunit=1cm,yunit=1cm,everytree={}, - etcratio=.75,triratio=.5} +\begin{forest} + [\name{AosLeftSideTraits\_2},before drawing tree={x=0pt}, + for tree={concept,edge={-Stealth}} + [{\name{AosOpenLeftTraits\_2}}] + [{\name{AosClosedLeftTraits\_2}}] + [{\name{AosContractedLeftTraits\_2}}] + [{\name{AosIdentifiedLeftTraits\_2}}] + ] +\end{forest} \end{document} diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/fig_src/open_concept_hierarchy.tex b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/fig_src/open_concept_hierarchy.tex index 1cc69a6cfc3..4107460f723 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/fig_src/open_concept_hierarchy.tex +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/fig_src/open_concept_hierarchy.tex @@ -1,21 +1,23 @@ \documentclass[12pt]{standalone} \input{header} +\usepackage[edges]{forest} +\usetikzlibrary{shadows.blur,arrows.meta} \pagestyle{empty} +\def\name#1{\textsf{\it #1}} +\tikzset{concept/.style={rectangle split,rectangle split parts=1,draw, + fill=white,blur shadow,rounded corners,align=center}} \begin{document} - \psset{treevshift=0,unit=1em,xunit=2em,yunit=1em,everytree={},etcratio=.75,triratio=.5} - \jtree[everylabel=\sl,xunit=70pt,arrows=->] - \! = {} - <4wideleft>[scaleby=2.35 0,arrows=-,linestyle=none]{\psframebox{\concept{AosOpenLeftTraits\_2}}}@ult !ult - ^[scaleby=1.21 0,arrows=-,linestyle=none]{\psframebox{\concept{AosOpenRightTraits\_2}}}@urt !urt - ^[scaleby=1.18 0,arrows=-,linestyle=none]{\psframebox{\concept{AosOpenBottomTraits\_2}}}@ubt !ubt - ^<4wideright>[scaleby=2.35 0,arrows=-,linestyle=none]{\psframebox{\concept{AosOpenTopTraits\_2}}}@utt !utt - . - \!ult = <4wideright>[scaleby=2.10 1]{\psframebox{\concept{AosOpenBoundaryTraits\_2}}}@ut !ut - . - \ncline{urt:b}{ut:t} - \ncline{ubt:b}{ut:t} - \ncline{utt:b}{ut:t} - \endjtree - \psset{treevshift=0,unit=1cm,xunit=1cm,yunit=1cm,everytree={}, - etcratio=.75,triratio=.5} +\begin{forest} + [,phantom,before drawing tree={x=0pt},for tree={concept,edge={-Stealth}} + [{\name{AosOpenLeftTraits\_2}},name=olt + [\name{AosOpenBoundaryTraits\_2},name=oyt,before drawing tree={x=0pt}] + ] + [{\name{AosOpenRightTraits\_2}},name=ort] + [{\name{AosOpenBottomTraits\_2}},name=obt] + [{\name{AosOpenTopTraits\_2}},name=ott] + ] + \draw[-Stealth] (ort) to (oyt); + \draw[-Stealth] (obt) to (oyt); + \draw[-Stealth] (ott) to (oyt); +\end{forest} \end{document} diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/fig_src/side_clusters.tex b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/fig_src/side_clusters.tex index 2c54693f17f..05ee3493476 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/fig_src/side_clusters.tex +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/fig_src/side_clusters.tex @@ -1,20 +1,23 @@ \documentclass[12pt]{standalone} \input{header} +\usepackage[edges]{forest} +\usetikzlibrary{shadows.blur,arrows.meta} \pagestyle{empty} +\def\name#1{\textsf{\it #1}} +\tikzset{concept/.style={rectangle split,rectangle split parts=1,draw, + fill=white,blur shadow,rounded corners,align=center}} \begin{document} - \psset{treevshift=0,unit=1em,xunit=2em,yunit=1em,everytree={},etcratio=.75,triratio=.5} - \jtree[everylabel=\sl,xunit=70pt,arrows=->] - \! = {} - [scaleby=2.31 0,arrows=-,linestyle=none]{\psframebox{\concept{AosVerticalSideTraits\_2}}}@vst !vst - ^[scaleby=2.31 0,arrows=-,linestyle=none]{\psframebox{\concept{ArrangemenHorizontalSideTraits\_2}}}@hst !hst - . - \!hst = [scaleby=1.15 1]{\psframebox{\concept{AosBottomSideTraits\_2}}}@bst !bst - ^[scaleby=1.15 1]{\psframebox{\concept{AosTopSideTraits\_2}}}@tst !tst - . - \!vst = [scaleby=1.12 1]{\psframebox{\concept{AosLeftSideTraits\_2}}}@lst !lst - ^[scaleby=1.12 1]{\psframebox{\concept{AosRightSideTraits\_2}}}@rst !rst - . - \endjtree - \psset{treevshift=0,unit=1cm,xunit=1cm,yunit=1cm,everytree={}, - etcratio=.75,triratio=.5} +\begin{forest} + [,phantom,before drawing tree={x=0pt}, + for tree={concept,edge={-Stealth}} + [\name{AosVerticalSideTraits\_2} + [\name{AosLeftSideTraits\_2}] + [\name{AosRightSideTraits\_2}] + ] + [\name{AosHorizontalSideTraits\_2} + [\name{AosBottomSideTraits\_2}] + [\name{AosTopologyTraits\_2}] + ] + ] +\end{forest} \end{document} diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/fig_src/spherical_concept_hierarchy.tex b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/fig_src/spherical_concept_hierarchy.tex index 63bfb2e66e1..aeafefc7a52 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/fig_src/spherical_concept_hierarchy.tex +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/fig_src/spherical_concept_hierarchy.tex @@ -1,19 +1,35 @@ \documentclass[12pt]{standalone} \input{header} +\usepackage[edges]{forest} +\usetikzlibrary{shadows.blur,arrows.meta} \pagestyle{empty} +\def\name#1{\textsf{\it #1}} +\tikzset{concept/.style={rectangle split,rectangle split parts=1,draw, + fill=white,blur shadow,rounded corners,align=center}} \begin{document} - \psset{treevshift=0,unit=1em,xunit=2em,yunit=1em,everytree={},etcratio=.75,triratio=.5} - \jtree[everylabel=\sl,xunit=70pt,arrows=->] - \! = {} - [scaleby=2.81 0,arrows=-,linestyle=none]{\psframebox{\concept{AosIdentifiedVerticalTraits\_2}}}@uvt !uvt - ^[scaleby=1 0,arrows=-,linestyle=none]{\psframebox{\concept{AosContractedBottomTraits\_2}}}@ubt !ubt - ^[scaleby=2.73 0,arrows=-,linestyle=none]{\psframebox{\concept{AosContractedTopTraits\_2}}}@utt !utt - . - \!ubt = [scaleby=1 1]{\psframebox{\concept{AosSphericalBoundaryTraits\_2}}}@ut !ut - . - \ncline{uvt:b}{ut:t} - \ncline{utt:b}{ut:t} - \endjtree - \psset{treevshift=0,unit=1cm,xunit=1cm,yunit=1cm,everytree={}, - etcratio=.75,triratio=.5} + \begin{forest} + [\name{AosBasicTraits\_2},name=abt,before drawing tree={x=0pt},for tree={concept,edge={-Stealth}} + [\name{AosVerticalSideTraits\_2} + [\name{AosLeftSideTraits\_2} + [,phantom] + [\name{AosIdentifiedVerticalTraits\_2},name=ivt + [,phantom] + [\name{AosSphericalBoundaryTraits\_2},name=sbt,before drawing tree={x=0pt}] + ] + ] + [\name{AosRightSideTraits\_2},name=rst] + ] + [\name{AosHorizontalSideTraits\_2},before drawing tree={x-=1.5em} + [\name{AosBottomSideTraits\_2} + [\name{AosContractedBottomTraits\_2},name=cbt,before drawing tree={x-=3em}] + ] + [\name{AosTopSideTraits\_2},before drawing tree={x-=3em} + [\name{AosContractedTopTraits\_2},name=ctt,before drawing tree={x-=3em}] + ] + ] + ] + \draw[-Stealth] (cbt) to (sbt); + \draw[-Stealth] (ctt) to (sbt); + \draw[-Stealth] (rst) to (ivt); + \end{forest} \end{document} From db7673b1161daa97d293a844752991a927f69892 Mon Sep 17 00:00:00 2001 From: Efi Fogel Date: Wed, 28 Aug 2024 20:56:56 +0300 Subject: [PATCH 07/63] Renamed cpncepy prefix Arrangement... => Aos... --- .../Boolean_set_operations_2.txt | 20 ++--- .../CGAL/Boolean_set_operations_2.h | 84 +++++++++---------- .../CGAL/General_polygon_2.h | 8 +- .../CGAL/General_polygon_set_2.h | 2 +- .../CGAL/Gps_traits_2.h | 4 +- ..._2.h => AosDirectionalXMonotoneTraits_2.h} | 19 ++--- .../ArrDirectionalTraits--AreMergeable_2.h | 2 +- ...rDirectionalTraits--CompareEndpointsXy_2.h | 2 +- ...rrDirectionalTraits--ConstructOpposite_2.h | 2 +- .../ArrDirectionalTraits--Intersect_2.h | 2 +- .../Concepts/ArrDirectionalTraits--Merge_2.h | 2 +- .../Concepts/ArrDirectionalTraits--Split_2.h | 2 +- .../Concepts/GeneralPolygonSetDcel.h | 5 +- .../Concepts/GeneralPolygonSetDcelFace.h | 6 +- .../Concepts/GeneralPolygonSetDcelHalfedge.h | 6 +- .../Concepts/GeneralPolygonSetTraits_2.h | 4 +- .../PackageDescription.txt | 2 +- 17 files changed, 85 insertions(+), 87 deletions(-) rename Boolean_set_operations_2/doc/Boolean_set_operations_2/Concepts/{ArrangementDirectionalXMonotoneTraits_2.h => AosDirectionalXMonotoneTraits_2.h} (80%) diff --git a/Boolean_set_operations_2/doc/Boolean_set_operations_2/Boolean_set_operations_2.txt b/Boolean_set_operations_2/doc/Boolean_set_operations_2/Boolean_set_operations_2.txt index d03add5708a..cb0527fe30f 100644 --- a/Boolean_set_operations_2/doc/Boolean_set_operations_2/Boolean_set_operations_2.txt +++ b/Boolean_set_operations_2/doc/Boolean_set_operations_2/Boolean_set_operations_2.txt @@ -669,10 +669,10 @@ The traits class used to instantiate the `General_polygon_set_2` class template must model the concept `GeneralPolygonSetTraits_2`, and is tailored to handle a specific family of curves. The concept `GeneralPolygonSetTraits_2` refines the concept -`ArrangementDirectionalXMonotoneTraits_2` specified next. +`AosDirectionalXMonotoneTraits_2` specified next. -The concept `ArrangementDirectionalXMonotoneTraits_2` refines the -concept `ArrangementXMonotoneTraits_2` (see +The concept `AosDirectionalXMonotoneTraits_2` refines the +concept `AosXMonotoneTraits_2` (see Section \ref arr_sssecinsert_x_mon in the 2D Arrangements package). Thus, a model of this concept must define the type `X_monotone_curve_2`, which represents an \f$ x\f$-monotone curve, and the type `Point_2`, @@ -687,7 +687,7 @@ curve is not required to have a designated source and target, it i smaller) and the right (lexicographically larger) endpoints of a given curve. -The `ArrangementDirectionalXMonotoneTraits_2` concept treats its +The `AosDirectionalXMonotoneTraits_2` concept treats its \f$ x\f$-monotone curves as directed objects. It thus requires two additional operations on \f$ x\f$-monotone curves:
      @@ -702,10 +702,10 @@ The traits classes `Arr_segment_traits_2`, `Arr_conic_traits_2` and `Arr_rational_function_traits_2`, which are bundled in the `Arrangement_2` package and distributed with \cgal, are all models of the refined concept -`ArrangementDirectionalXMonotoneTraits_2`.\cgalFootnote{The \cgalFootnoteCode{Arr_polyline_traits_2} class is not a model of the, \cgalFootnoteCode{ArrangementDirectionalXMonotoneTraits_2} concept, as the \f$ x\f$-monotone curve it defines is always directed from left to right. Thus, an opposite curve cannot be constructed. However, it is not very useful to construct a polygon whose edges are polylines, as an ordinary polygon with linear edges can represent the same entity.} +`AosDirectionalXMonotoneTraits_2`.\cgalFootnote{The \cgalFootnoteCode{Arr_polyline_traits_2} class is not a model of the, \cgalFootnoteCode{AosDirectionalXMonotoneTraits_2} concept, as the \f$ x\f$-monotone curve it defines is always directed from left to right. Thus, an opposite curve cannot be constructed. However, it is not very useful to construct a polygon whose edges are polylines, as an ordinary polygon with linear edges can represent the same entity.} Just as with the case of computations using models of the -`ArrangementXMonotoneTraits_2` concept, operations are robust only +`AosXMonotoneTraits_2` concept, operations are robust only when exact arithmetic is used. When inexact arithmetic is used, (nearly) degenerate configurations may result in abnormal termination of the program or even incorrect results. @@ -761,7 +761,7 @@ curves. The class-template `General_polygon_2` models the concept `GeneralPolygon_2`. Its sole template parameter must be instantiated with a model of the concept -`ArrangementDirectionalXMonotoneTraits_2` from which it obtains the +`AosDirectionalXMonotoneTraits_2` from which it obtains the `X_monotone_curve_2` type. It uses the geometric operations on this type provided by such a model to maintain a container of directed curves of type `X_monotone_curve_2`, which represents a @@ -772,7 +772,7 @@ The class-template models the concept `GeneralPolygonSetTraits_2`, and can be used to instantiate the class template `General_polygon_set_2`. It serves as an adapter for a geometric traits class, which models the -concept `ArrangementDirectionalXMonotoneTraits_2`. +concept `AosDirectionalXMonotoneTraits_2`. It can be used for performing set-operations on general polygons. The implementation of the adapter is rather simple, as it is derived from the instantiated template-parameter `ArrXMonotoneTraits_2` @@ -781,13 +781,13 @@ the methods provided by the instantiated parameter `GeneralPolygon`, which is a model of the concept `GeneralPolygon_2`. By default, the `GeneralPolygon` parameter is defined as -`General_polygon_2`. +`General_polygon_2`. The code excerpt listed below defines a general-polygon set type that can be used to perform Boolean set-operations on point sets bounded by the \f$ x\f$-monotone curve type defined by the arrangement-traits class `Arr_traits_2`, which is some representative model of the concept -`ArrangementDirectionalXMonotoneTraits_2`. +`AosDirectionalXMonotoneTraits_2`. \code{.cpp} #include diff --git a/Boolean_set_operations_2/doc/Boolean_set_operations_2/CGAL/Boolean_set_operations_2.h b/Boolean_set_operations_2/doc/Boolean_set_operations_2/CGAL/Boolean_set_operations_2.h index 39faf23e21a..4fd5c2c9e38 100644 --- a/Boolean_set_operations_2/doc/Boolean_set_operations_2/CGAL/Boolean_set_operations_2.h +++ b/Boolean_set_operations_2/doc/Boolean_set_operations_2/CGAL/Boolean_set_operations_2.h @@ -90,7 +90,7 @@ void complement(const Polygon_2& pgn, * \param pgn the input polygon. * \param res the complement of \p pgn. * \pre `%ArrTraits` must be a model of the concept - * `ArrangementDirectionalXMonotoneTraits_2`. + * `AosDirectionalXMonotoneTraits_2`. */ template void @@ -136,7 +136,7 @@ OutputIterator complement(const Polygon_with_holes_2& pgn, * `General_polygon_with_holes_2<>`. * \return the past-the-end iterator of the output container. * \pre `%ArrTraits` must be a model of the concept - * `ArrangementDirectionalXMonotoneTraits_2`. + * `AosDirectionalXMonotoneTraits_2`. */ template OutputIterator @@ -161,7 +161,7 @@ void complement(const Polygon_2& pgn, * \param res the resulting complement of \p pgn * \param traits a traits object. * \pre `%ArrTraits` must be a model of the concept - * `ArrangementDirectionalXMonotoneTraits_2`. + * `AosDirectionalXMonotoneTraits_2`. * \pre `GpsTraits` must be a model of the concept `GeneralPolygonSetTraits_2`. */ template @@ -193,7 +193,7 @@ OutputIterator complement(const Polygon_with_holes_2& pgn, * \param traits a traits object. * \return the past-the-end iterator of the output container. * \pre `%ArrTraits` must be a model of the concept - * `ArrangementDirectionalXMonotoneTraits_2`. + * `AosDirectionalXMonotoneTraits_2`. * \pre `GpsTraits` must be a model of the concept `GeneralPolygonSetTraits_2`. */ template @@ -438,7 +438,7 @@ OutputIterator difference(const Polygon_with_holes_2& pgn1, * Its dereference type must be convertibe to * `General_polygon_with_holes_2>`. * \return the past-the-end iterator of the output container. - * \pre `%ArrTraits` must be a model of the concept `ArrangementDirectionalXMonotoneTraits_2`. + * \pre `%ArrTraits` must be a model of the concept `AosDirectionalXMonotoneTraits_2`. */ template OutputIterator difference(const General_polygon_2& pgn1, @@ -454,7 +454,7 @@ OutputIterator difference(const General_polygon_2& pgn1, * `General_polygon_with_holes_2>`. * \return the past-the-end iterator of the output container. * \pre `%ArrTraits` must be a model of the concept - * `ArrangementDirectionalXMonotoneTraits_2`. + * `AosDirectionalXMonotoneTraits_2`. */ template OutputIterator @@ -471,7 +471,7 @@ difference(const General_polygon_with_holes_2>& pgn * `General_polygon_with_holes_2>`. * \return the past-the-end iterator of the output container. * \pre `%ArrTraits` must be a model of the concept - * `ArrangementDirectionalXMonotoneTraits_2`. + * `AosDirectionalXMonotoneTraits_2`. */ template OutputIterator @@ -578,7 +578,7 @@ OutputIterator difference(const Polygon_with_holes_2& pgn1, * \param traits a traits object. * \return the past-the-end iterator of the output container. * \pre `%ArrTraits` must be a model of the concept - * `ArrangementDirectionalXMonotoneTraits_2`. + * `AosDirectionalXMonotoneTraits_2`. * \pre GpsTraits must be a model of `GeneralPolygonSetTraits_2`. */ template @@ -597,7 +597,7 @@ OutputIterator difference(const General_polygon_2& pgn1, * \param traits a traits object. * \return the past-the-end iterator of the output container. * \pre `%ArrTraits` must be a model of the concept - * `ArrangementDirectionalXMonotoneTraits_2`. + * `AosDirectionalXMonotoneTraits_2`. * \pre GpsTraits must be a model of `GeneralPolygonSetTraits_2`. */ template @@ -617,7 +617,7 @@ difference(const General_polygon_with_holes_2>& pgn * \param traits a traits object. * \return the past-the-end iterator of the output container. * \pre `%ArrTraits` must be a model of the concept - * `ArrangementDirectionalXMonotoneTraits_2`. + * `AosDirectionalXMonotoneTraits_2`. * \pre GpsTraits must be a model of `GeneralPolygonSetTraits_2`. */ template @@ -858,7 +858,7 @@ bool do_intersect(const Polygon_with_holes_2& pgn1, * \return `true` if `pgn1` and `pgn2` intersect in their interior and `false` * otherwise. * \pre `%ArrTraits` must be a model of the concept - * `ArrangementDirectionalXMonotoneTraits_2`. + * `AosDirectionalXMonotoneTraits_2`. */ template bool do_intersect(const General_polygon_2& pgn1, @@ -870,7 +870,7 @@ bool do_intersect(const General_polygon_2& pgn1, * \return `true` if `pgn1` and `pgn2` intersect in their interior and `false` * otherwise. * \pre `%ArrTraits` must be a model of the concept - * `ArrangementDirectionalXMonotoneTraits_2`. + * `AosDirectionalXMonotoneTraits_2`. */ template bool @@ -883,7 +883,7 @@ do_intersect(const General_polygon_2& pgn1, * \return `true` if `pgn1` and `pgn2` intersect in their interior and `false` * otherwise. * \pre `%ArrTraits` must be a model of the concept - * `ArrangementDirectionalXMonotoneTraits_2`. + * `AosDirectionalXMonotoneTraits_2`. */ template bool do_intersect(const General_polygon_with_holes_2>& pgn1, @@ -1058,7 +1058,7 @@ bool do_intersect(const Polygon_with_holes_2& pgn1, * otherwise. * \pre `GpsTraits` must be a model of the concept `GeneralPolygonSetTraits_2`. * \pre `%ArrTraits` must be a model of the concept - * `ArrangementDirectionalXMonotoneTraits_2`. + * `AosDirectionalXMonotoneTraits_2`. */ template bool do_intersect(const General_polygon_2& pgn1, @@ -1073,7 +1073,7 @@ bool do_intersect(const General_polygon_2& pgn1, * otherwise. * \pre `GpsTraits` must be a model of the concept `GeneralPolygonSetTraits_2`. * \pre `%ArrTraits` must be a model of the concept - * `ArrangementDirectionalXMonotoneTraits_2`. + * `AosDirectionalXMonotoneTraits_2`. */ template bool @@ -1089,7 +1089,7 @@ do_intersect(const General_polygon_2& pgn1, * otherwise. * \pre `GpsTraits` must be a model of the concept `GeneralPolygonSetTraits_2`. * \pre `%ArrTraits` must be a model of the concept - * `ArrangementDirectionalXMonotoneTraits_2`. + * `AosDirectionalXMonotoneTraits_2`. */ template bool @@ -1415,7 +1415,7 @@ OutputIterator intersection(const Polygon_with_holes_2& pgn1, * `General_polygon_with_holes_2>`. * \return the past-the-end iterator of the output container. * \pre `%ArrTraits` must be a model of the concept - * `ArrangementDirectionalXMonotoneTraits_2`. + * `AosDirectionalXMonotoneTraits_2`. */ template OutputIterator intersection(const General_polygon_2& pgn1, @@ -1431,7 +1431,7 @@ OutputIterator intersection(const General_polygon_2& pgn1, * `General_polygon_with_holes_2>`. * \return the past-the-end iterator of the output container. * \pre `%ArrTraits` must be a model of the concept - * `ArrangementDirectionalXMonotoneTraits_2`. + * `AosDirectionalXMonotoneTraits_2`. */ template OutputIterator @@ -1448,7 +1448,7 @@ intersection(const General_polygon_with_holes_2>& p * `General_polygon_with_holes_2>`. * \return the past-the-end iterator of the output container. * \pre `%ArrTraits` must be a model of the concept - * `ArrangementDirectionalXMonotoneTraits_2`. + * `AosDirectionalXMonotoneTraits_2`. */ template OutputIterator @@ -1672,7 +1672,7 @@ intersection(const Polygon_with_holes_2& pgn1, * \param traits a traits object. * \return the past-the-end iterator of the output container. * \pre `%ArrTraits` must be a model of the concept - * `ArrangementDirectionalXMonotoneTraits_2`. + * `AosDirectionalXMonotoneTraits_2`. * \pre GpsTraits must be a model of `GeneralPolygonSetTraits_2`. */ template @@ -1693,7 +1693,7 @@ OutputIterator intersection(const General_polygon_2& pgn1, * \param traits a traits object. * \return the past-the-end iterator of the output container. * \pre `%ArrTraits` must be a model of the concept - * `ArrangementDirectionalXMonotoneTraits_2`. + * `AosDirectionalXMonotoneTraits_2`. * \pre GpsTraits must be a model of `GeneralPolygonSetTraits_2`. */ template @@ -1715,7 +1715,7 @@ intersection(const General_polygon_with_holes_2>& p * \param traits a traits object. * \return the past-the-end iterator of the output container. * \pre `%ArrTraits` must be a model of the concept - * `ArrangementDirectionalXMonotoneTraits_2`. + * `AosDirectionalXMonotoneTraits_2`. * \pre GpsTraits must be a model of `GeneralPolygonSetTraits_2`. */ template @@ -2026,7 +2026,7 @@ bool join(const Polygon_with_holes_2& pgn1, * \param res the resulting union of \p pgn1 and \p pgn2. * \return `true` if the two input polygons overlap. * \pre `%ArrTraits` must be a model of the concept - * `ArrangementDirectionalXMonotoneTraits_2`. + * `AosDirectionalXMonotoneTraits_2`. */ template bool join(const General_polygon_2& pgn1, @@ -2039,7 +2039,7 @@ bool join(const General_polygon_2& pgn1, * \param res the resulting union of \p pgn1 and \p pgn2. * \return `true` if the two input polygons overlap. * \pre `%ArrTraits` must be a model of the concept - * `ArrangementDirectionalXMonotoneTraits_2`. + * `AosDirectionalXMonotoneTraits_2`. */ template bool @@ -2053,7 +2053,7 @@ join(const General_polygon_2& pgn1, * \param res the resulting union of \p pgn1 and \p pgn2. * \return `true` if the two input polygons overlap. * \pre `%ArrTraits` must be a model of the concept - * `ArrangementDirectionalXMonotoneTraits_2`. + * `AosDirectionalXMonotoneTraits_2`. */ template bool @@ -2217,7 +2217,7 @@ bool join(const Polygon_with_holes_2& pgn2, * \param traits a traits object. * \return `true` if the two input polygons overlap. * \pre `%ArrTraits` must be a model of the concept - * `ArrangementDirectionalXMonotoneTraits_2`. + * `AosDirectionalXMonotoneTraits_2`. * \pre `GpsTraits` must be a model of the concept `GeneralPolygonSetTraits_2`. */ template @@ -2234,7 +2234,7 @@ bool join(const General_polygon_2& pgn1, * \param traits a traits object. * \return `true` if the two input polygons overlap. * \pre `%ArrTraits` must be a model of the concept - * `ArrangementDirectionalXMonotoneTraits_2`. + * `AosDirectionalXMonotoneTraits_2`. * \pre `GpsTraits` must be a model of the concept `GeneralPolygonSetTraits_2`. */ template @@ -2252,7 +2252,7 @@ join(const General_polygon_2& pgn1, * \param traits a traits object. * \return `true` if the two input polygons overlap. * \pre `%ArrTraits` must be a model of the concept - * `ArrangementDirectionalXMonotoneTraits_2`. + * `AosDirectionalXMonotoneTraits_2`. * \pre `GpsTraits` must be a model of the concept `GeneralPolygonSetTraits_2`. */ template @@ -2568,7 +2568,7 @@ oriented_side(const Polygon_with_holes_2& pgn1, * \param pgn1 1st the input polygon. * \param pgn2 the 2nd input polygon. * \pre `%ArrTraits` must be a model of the concept - * `ArrangementDirectionalXMonotoneTraits_2`. + * `AosDirectionalXMonotoneTraits_2`. */ template Oriented_side oriented_side(const General_polygon_2& pgn1, @@ -2578,7 +2578,7 @@ Oriented_side oriented_side(const General_polygon_2& pgn1, * \param pgn1 the 1st input polygon. * \param pgn2 the 2nd input polygon. * \pre `%ArrTraits` must be a model of the concept - * `ArrangementDirectionalXMonotoneTraits_2`. + * `AosDirectionalXMonotoneTraits_2`. */ template Oriented_side @@ -2589,7 +2589,7 @@ oriented_side(const General_polygon_2& pgn1, * \param pgn1 the 1st input polygon. * \param pgn2 the 2nd input polygon. * \pre `%ArrTraits` must be a model of the concept - * `ArrangementDirectionalXMonotoneTraits_2`. + * `AosDirectionalXMonotoneTraits_2`. */ template Oriented_side @@ -2655,7 +2655,7 @@ Oriented_side oriented_side(const Polygon_with_holes_2& pgn1, * \param pgn2 the 2nd input polygon. * \param traits a traits object. * \pre `%ArrTraits` must be a model of the concept - * `ArrangementDirectionalXMonotoneTraits_2`. + * `AosDirectionalXMonotoneTraits_2`. * \pre `GpsTraits` must be a model of the concept `GeneralPolygonSetTraits_2`. * */ @@ -2669,7 +2669,7 @@ Oriented_side oriented_side(const General_polygon_2& pgn1, * \param pgn2 the 2nd input polygon. * \param traits a traits object. * \pre `%ArrTraits` must be a model of the concept - * `ArrangementDirectionalXMonotoneTraits_2`. + * `AosDirectionalXMonotoneTraits_2`. * \pre `GpsTraits` must be a model of the concept `GeneralPolygonSetTraits_2`. * */ @@ -2684,7 +2684,7 @@ oriented_side(const General_polygon_2& pgn1, * \param pgn2 the 2nd input polygon. * \param traits a traits object. * \pre `%ArrTraits` must be a model of the concept - * `ArrangementDirectionalXMonotoneTraits_2`. + * `AosDirectionalXMonotoneTraits_2`. * \pre `GpsTraits` must be a model of the concept `GeneralPolygonSetTraits_2`. * */ @@ -2727,7 +2727,7 @@ Oriented_side oriented_side(const Point_2& p, * \param p the input point. * \param pgn the input polygon. * \pre `%ArrTraits` must be a model of the concept - * `ArrangementDirectionalXMonotoneTraits_2`. + * `AosDirectionalXMonotoneTraits_2`. */ template Oriented_side oriented_side(const Point_2& p, @@ -2770,7 +2770,7 @@ Oriented_side oriented_side(const Point_2& p, * \param pgn the input polygon. * \param traits a traits object. * \pre `%ArrTraits` must be a model of the concept - * `ArrangementDirectionalXMonotoneTraits_2`. + * `AosDirectionalXMonotoneTraits_2`. * \pre `GpsTraits` must be a model of the concept `GeneralPolygonSetTraits_2`. */ template @@ -3063,7 +3063,7 @@ symmetric_difference(const Polygon_with_holes_2& pgn1, * `General_polygon_with_holes_2>`. * \return the past-the-end iterator of the output container. * \pre `%ArrTraits` must be a model of the concept - * `ArrangementDirectionalXMonotoneTraits_2`. + * `AosDirectionalXMonotoneTraits_2`. */ template OutputIterator symmetric_difference(const General_polygon_2& pgn1, @@ -3081,7 +3081,7 @@ OutputIterator symmetric_difference(const General_polygon_2& pgn1, * `General_polygon_with_holes_2>`. * \return the past-the-end iterator of the output container. * \pre `%ArrTraits` must be a model of the concept - * `ArrangementDirectionalXMonotoneTraits_2`. + * `AosDirectionalXMonotoneTraits_2`. */ template OutputIterator @@ -3100,7 +3100,7 @@ symmetric_difference(const General_polygon_with_holes_2>`. * \return the past-the-end iterator of the output container. * \pre `%ArrTraits` must be a model of the concept - * `ArrangementDirectionalXMonotoneTraits_2`. + * `AosDirectionalXMonotoneTraits_2`. */ template OutputIterator @@ -3332,7 +3332,7 @@ symmetric_difference(const Polygon_with_holes_2& pgn1, * \param traits a traits object. * \return the past-the-end iterator of the output container. * \pre `%ArrTraits` must be a model of the concept - * `ArrangementDirectionalXMonotoneTraits_2`. + * `AosDirectionalXMonotoneTraits_2`. * \pre GpsTraits must be a model of `GeneralPolygonSetTraits_2`. */ template @@ -3353,7 +3353,7 @@ OutputIterator symmetric_difference(const General_polygon_2& pgn1, * \param traits a traits object. * \return the past-the-end iterator of the output container. * \pre `%ArrTraits` must be a model of the concept - * `ArrangementDirectionalXMonotoneTraits_2`. + * `AosDirectionalXMonotoneTraits_2`. * \pre GpsTraits must be a model of `GeneralPolygonSetTraits_2`. */ template @@ -3375,7 +3375,7 @@ symmetric_difference(const General_polygon_with_holes_2 diff --git a/Boolean_set_operations_2/doc/Boolean_set_operations_2/CGAL/General_polygon_2.h b/Boolean_set_operations_2/doc/Boolean_set_operations_2/CGAL/General_polygon_2.h index c5c628cc757..ac8899ed76e 100644 --- a/Boolean_set_operations_2/doc/Boolean_set_operations_2/CGAL/General_polygon_2.h +++ b/Boolean_set_operations_2/doc/Boolean_set_operations_2/CGAL/General_polygon_2.h @@ -7,10 +7,10 @@ namespace CGAL { The class `General_polygon_2` models the concept `GeneralPolygon_2`. It represents a simple general-polygon. It is parameterized with the type `ArrTraits` that models the concept -`ArrangementDirectionalXMonotoneTraits_2`. The latter is a refinement -of the concept `ArrangementXMonotoneTraits_2`. In addition to the -requirements of the concept `ArrangementXMonotoneTraits_2`, a -model of the concept `ArrangementDirectionalXMonotoneTraits_2` must +`AosDirectionalXMonotoneTraits_2`. The latter is a refinement +of the concept `AosXMonotoneTraits_2`. In addition to the +requirements of the concept `AosXMonotoneTraits_2`, a +model of the concept `AosDirectionalXMonotoneTraits_2` must support the following functions:
      • Given an \f$ x\f$-monotone curve, construct its opposite curve. diff --git a/Boolean_set_operations_2/doc/Boolean_set_operations_2/CGAL/General_polygon_set_2.h b/Boolean_set_operations_2/doc/Boolean_set_operations_2/CGAL/General_polygon_set_2.h index 7490789ba66..f65b5d11004 100644 --- a/Boolean_set_operations_2/doc/Boolean_set_operations_2/CGAL/General_polygon_set_2.h +++ b/Boolean_set_operations_2/doc/Boolean_set_operations_2/CGAL/General_polygon_set_2.h @@ -50,7 +50,7 @@ boundary and the holes are also pairwise disjoint, except perhaps at the vertices. \sa `Arrangement_2` -\sa `ArrangementXMonotoneTraits_2` +\sa `AosXMonotoneTraits_2` \sa `Nef_polyhedron_2` */ diff --git a/Boolean_set_operations_2/doc/Boolean_set_operations_2/CGAL/Gps_traits_2.h b/Boolean_set_operations_2/doc/Boolean_set_operations_2/CGAL/Gps_traits_2.h index 6d65a9e5e43..ca47397e6a2 100644 --- a/Boolean_set_operations_2/doc/Boolean_set_operations_2/CGAL/Gps_traits_2.h +++ b/Boolean_set_operations_2/doc/Boolean_set_operations_2/CGAL/Gps_traits_2.h @@ -7,8 +7,8 @@ namespace CGAL { The traits class `Gps_traits_2` models the concept `GeneralPolygonSetTraits_2`. It inherits from the instantiated type of the template parameter `ArrTraits`, which must model the -concept `ArrangementDirectionalXMonotoneTraits_2`, (which in turn refines -the concept `ArrangementXMonotoneTraits_2`). The template parameter +concept `AosDirectionalXMonotoneTraits_2`, (which in turn refines +the concept `AosXMonotoneTraits_2`). The template parameter `GeneralPolygon_t` must be instantiated with a model of the concept of `GpsTraitsGeneralPolygon_2`. By default, the latter is instantiated by `CGAL::General_polygon_2`. diff --git a/Boolean_set_operations_2/doc/Boolean_set_operations_2/Concepts/ArrangementDirectionalXMonotoneTraits_2.h b/Boolean_set_operations_2/doc/Boolean_set_operations_2/Concepts/AosDirectionalXMonotoneTraits_2.h similarity index 80% rename from Boolean_set_operations_2/doc/Boolean_set_operations_2/Concepts/ArrangementDirectionalXMonotoneTraits_2.h rename to Boolean_set_operations_2/doc/Boolean_set_operations_2/Concepts/AosDirectionalXMonotoneTraits_2.h index 3278e482000..1f2e9dac658 100644 --- a/Boolean_set_operations_2/doc/Boolean_set_operations_2/Concepts/ArrangementDirectionalXMonotoneTraits_2.h +++ b/Boolean_set_operations_2/doc/Boolean_set_operations_2/Concepts/AosDirectionalXMonotoneTraits_2.h @@ -7,14 +7,14 @@ This concept refines the basic arrangement \f$ x\f$-monotone traits concept. A model of this concept is able to handle directed \f$ x\f$-monotone curves that intersect in their interior. Namely, an instance of the `X_monotone_curve_2` type defined by a model of the concept -`ArrangementXMonotoneTraits_2` is only required to have a left +`AosXMonotoneTraits_2` is only required to have a left (lexicographically smaller) endpoint and a right endpoint. If the traits class is also a model of -`ArrangementDirectionalXMonotoneTraits_2`, the \f$ x\f$-monotone curve is +`AosDirectionalXMonotoneTraits_2`, the \f$ x\f$-monotone curve is also required to have a direction, namely one of these two endpoint serves as its source and the other as its target. -\cgalRefines{ArrangementXMonotoneTraits_2} +\cgalRefines{AosXMonotoneTraits_2} \cgalHasModelsBegin \cgalHasModels{CGAL::Arr_segment_traits_2} @@ -26,11 +26,11 @@ as its source and the other as its target. \cgalHasModels{CGAL::Arr_algebraic_segment_traits_2} \cgalHasModelsEnd -\sa `ArrangementXMonotoneTraits_2` +\sa `AosXMonotoneTraits_2` */ -class ArrangementDirectionalXMonotoneTraits_2 { +class AosDirectionalXMonotoneTraits_2 { public: /// \name Functor Types @@ -74,17 +74,17 @@ typedef unspecified_type Merge_2; /*! default constructor. */ -ArrangementDirectionalXMonotoneTraits_2(); +AosDirectionalXMonotoneTraits_2(); /*! copy constructor */ -ArrangementDirectionalXMonotoneTraits_2(ArrangementDirectionalXMonotoneTraits_2 other); +AosDirectionalXMonotoneTraits_2(AosDirectionalXMonotoneTraits_2 other); /*! assignment operator. */ -ArrangementDirectionalXMonotoneTraits_2 operator=(other); +AosDirectionalXMonotoneTraits_2 operator=(other); /// @} @@ -103,5 +103,4 @@ Construct_opposite_2 construct_opposite_2_object(); /// @} -}; /* end ArrangementDirectionalXMonotoneTraits_2 */ - +}; /* end AosDirectionalXMonotoneTraits_2 */ diff --git a/Boolean_set_operations_2/doc/Boolean_set_operations_2/Concepts/ArrDirectionalTraits--AreMergeable_2.h b/Boolean_set_operations_2/doc/Boolean_set_operations_2/Concepts/ArrDirectionalTraits--AreMergeable_2.h index 65fd4f347a8..93f15a825bf 100644 --- a/Boolean_set_operations_2/doc/Boolean_set_operations_2/Concepts/ArrDirectionalTraits--AreMergeable_2.h +++ b/Boolean_set_operations_2/doc/Boolean_set_operations_2/Concepts/ArrDirectionalTraits--AreMergeable_2.h @@ -6,7 +6,7 @@ namespace ArrDirectionalTraits { \cgalRefines{AdaptableBinaryFunction} \cgalHasModelsBegin -\cgalHasModels{ArrangementDirectionalXMonotoneTraits_2::Are_mergeable_2} +\cgalHasModels{AosDirectionalXMonotoneTraits_2::Are_mergeable_2} \cgalHasModelsEnd */ diff --git a/Boolean_set_operations_2/doc/Boolean_set_operations_2/Concepts/ArrDirectionalTraits--CompareEndpointsXy_2.h b/Boolean_set_operations_2/doc/Boolean_set_operations_2/Concepts/ArrDirectionalTraits--CompareEndpointsXy_2.h index e7714c04561..daf5b7a705c 100644 --- a/Boolean_set_operations_2/doc/Boolean_set_operations_2/Concepts/ArrDirectionalTraits--CompareEndpointsXy_2.h +++ b/Boolean_set_operations_2/doc/Boolean_set_operations_2/Concepts/ArrDirectionalTraits--CompareEndpointsXy_2.h @@ -7,7 +7,7 @@ namespace ArrDirectionalTraits { \cgalRefines{AdaptableUnaryFunction} \cgalHasModelsBegin -\cgalHasModels{ArrangementDirectionalXMonotoneTraits_2::Compare_endpoints_xy_2} +\cgalHasModels{AosDirectionalXMonotoneTraits_2::Compare_endpoints_xy_2} \cgalHasModelsEnd */ diff --git a/Boolean_set_operations_2/doc/Boolean_set_operations_2/Concepts/ArrDirectionalTraits--ConstructOpposite_2.h b/Boolean_set_operations_2/doc/Boolean_set_operations_2/Concepts/ArrDirectionalTraits--ConstructOpposite_2.h index 92ee2585b2d..c61205872cb 100644 --- a/Boolean_set_operations_2/doc/Boolean_set_operations_2/Concepts/ArrDirectionalTraits--ConstructOpposite_2.h +++ b/Boolean_set_operations_2/doc/Boolean_set_operations_2/Concepts/ArrDirectionalTraits--ConstructOpposite_2.h @@ -7,7 +7,7 @@ namespace ArrDirectionalTraits { \cgalRefines{AdaptableUnaryFunction} \cgalHasModelsBegin -\cgalHasModels{ArrangementDirectionalXMonotoneTraits_2::Construct_opposite_2} +\cgalHasModels{AosDirectionalXMonotoneTraits_2::Construct_opposite_2} \cgalHasModelsEnd */ diff --git a/Boolean_set_operations_2/doc/Boolean_set_operations_2/Concepts/ArrDirectionalTraits--Intersect_2.h b/Boolean_set_operations_2/doc/Boolean_set_operations_2/Concepts/ArrDirectionalTraits--Intersect_2.h index 35c4fdf3273..4b6fcea1cc0 100644 --- a/Boolean_set_operations_2/doc/Boolean_set_operations_2/Concepts/ArrDirectionalTraits--Intersect_2.h +++ b/Boolean_set_operations_2/doc/Boolean_set_operations_2/Concepts/ArrDirectionalTraits--Intersect_2.h @@ -6,7 +6,7 @@ namespace ArrDirectionalTraits { \cgalRefines{AdaptableBinaryFunction} \cgalHasModelsBegin -\cgalHasModels{ArrangementDirectionalXMonotoneTraits_2::Intersect_2} +\cgalHasModels{AosDirectionalXMonotoneTraits_2::Intersect_2} \cgalHasModelsEnd */ diff --git a/Boolean_set_operations_2/doc/Boolean_set_operations_2/Concepts/ArrDirectionalTraits--Merge_2.h b/Boolean_set_operations_2/doc/Boolean_set_operations_2/Concepts/ArrDirectionalTraits--Merge_2.h index 18f8f26e936..fa931a25d70 100644 --- a/Boolean_set_operations_2/doc/Boolean_set_operations_2/Concepts/ArrDirectionalTraits--Merge_2.h +++ b/Boolean_set_operations_2/doc/Boolean_set_operations_2/Concepts/ArrDirectionalTraits--Merge_2.h @@ -6,7 +6,7 @@ namespace ArrDirectionalTraits { \cgalRefines{AdaptableBinaryFunction} \cgalHasModelsBegin -\cgalHasModels{ArrangementDirectionalXMonotoneTraits_2::Merge_2} +\cgalHasModels{AosDirectionalXMonotoneTraits_2::Merge_2} \cgalHasModelsEnd */ diff --git a/Boolean_set_operations_2/doc/Boolean_set_operations_2/Concepts/ArrDirectionalTraits--Split_2.h b/Boolean_set_operations_2/doc/Boolean_set_operations_2/Concepts/ArrDirectionalTraits--Split_2.h index 5d6529d4862..8cb1a811b3f 100644 --- a/Boolean_set_operations_2/doc/Boolean_set_operations_2/Concepts/ArrDirectionalTraits--Split_2.h +++ b/Boolean_set_operations_2/doc/Boolean_set_operations_2/Concepts/ArrDirectionalTraits--Split_2.h @@ -6,7 +6,7 @@ namespace ArrDirectionalTraits { \cgalRefines{AdaptableUnaryFunction} \cgalHasModelsBegin -\cgalHasModels{ArrangementDirectionalXMonotoneTraits_2::Split_2} +\cgalHasModels{AosDirectionalXMonotoneTraits_2::Split_2} \cgalHasModelsEnd */ diff --git a/Boolean_set_operations_2/doc/Boolean_set_operations_2/Concepts/GeneralPolygonSetDcel.h b/Boolean_set_operations_2/doc/Boolean_set_operations_2/Concepts/GeneralPolygonSetDcel.h index 6d28d6afbf4..2df5a74cbda 100644 --- a/Boolean_set_operations_2/doc/Boolean_set_operations_2/Concepts/GeneralPolygonSetDcel.h +++ b/Boolean_set_operations_2/doc/Boolean_set_operations_2/Concepts/GeneralPolygonSetDcel.h @@ -9,12 +9,12 @@ It maintains the incidence relation among them. The halfedges are ordered in pairs sometimes referred to as twins, such that each halfedge pair represent an edge. -A model of the `GeneralPolygonSetDcel` simply refines `ArrangementDcel`, +A model of the `GeneralPolygonSetDcel` simply refines `AosDcel`, the `Halfedge` and `Face` types being models of the concepts `GeneralPolygonSetDcelHalfedge` and `GeneralPolygonSetDcelFace` respectively -\cgalRefines{ArrangementDcel} +\cgalRefines{AosDcel} \cgalHasModelsBegin \cgalHasModels{CGAL::Gps_default_dcel} @@ -28,4 +28,3 @@ respectively class GeneralPolygonSetDcel {}; /* end GeneralPolygonSetDcel */ - diff --git a/Boolean_set_operations_2/doc/Boolean_set_operations_2/Concepts/GeneralPolygonSetDcelFace.h b/Boolean_set_operations_2/doc/Boolean_set_operations_2/Concepts/GeneralPolygonSetDcelFace.h index 01a99bce20e..5201673abe7 100644 --- a/Boolean_set_operations_2/doc/Boolean_set_operations_2/Concepts/GeneralPolygonSetDcelFace.h +++ b/Boolean_set_operations_2/doc/Boolean_set_operations_2/Concepts/GeneralPolygonSetDcelFace.h @@ -7,14 +7,14 @@ A face record in a \em Dcel data structure used by the `General_polygon_set_2` and `Polygon_set_2` template classes to represent the underlying internal `Arrangement_2` data structure. -\cgalRefines{ArrangementDcelFace} +\cgalRefines{AosDcelFace} \cgalHasModelsBegin \cgalHasModels{CGAL::Gps_face_base} \cgalHasModelsEnd -\sa `ArrangementDcel` -\sa `ArrangementDcelVertex` +\sa `AosDcel` +\sa `AosDcelVertex` \sa `GeneralPolygonSetDcelHalfedge` */ diff --git a/Boolean_set_operations_2/doc/Boolean_set_operations_2/Concepts/GeneralPolygonSetDcelHalfedge.h b/Boolean_set_operations_2/doc/Boolean_set_operations_2/Concepts/GeneralPolygonSetDcelHalfedge.h index a21a5fd8b7f..975fc355f4c 100644 --- a/Boolean_set_operations_2/doc/Boolean_set_operations_2/Concepts/GeneralPolygonSetDcelHalfedge.h +++ b/Boolean_set_operations_2/doc/Boolean_set_operations_2/Concepts/GeneralPolygonSetDcelHalfedge.h @@ -6,14 +6,14 @@ A halfedge record in a \em Dcel data structure used by the `General_polygon_set_2` and `Polygon_set_2` template classes to represent the underlying internal `Arrangement_2` data structure. -\cgalRefines{ArrangementDcelHalfedge} +\cgalRefines{AosDcelHalfedge} \cgalHasModelsBegin \cgalHasModels{CGAL::Gps_face_halfedge} \cgalHasModelsEnd -\sa `ArrangementDcel` -\sa `ArrangementDcelVertex` +\sa `AosDcel` +\sa `AosDcelVertex` \sa `GeneralPolygonSetDcelFace` */ diff --git a/Boolean_set_operations_2/doc/Boolean_set_operations_2/Concepts/GeneralPolygonSetTraits_2.h b/Boolean_set_operations_2/doc/Boolean_set_operations_2/Concepts/GeneralPolygonSetTraits_2.h index 2c8966d8239..a1c48bf7217 100644 --- a/Boolean_set_operations_2/doc/Boolean_set_operations_2/Concepts/GeneralPolygonSetTraits_2.h +++ b/Boolean_set_operations_2/doc/Boolean_set_operations_2/Concepts/GeneralPolygonSetTraits_2.h @@ -11,7 +11,7 @@ a type that represents a general polygon and another one that represents general polygon with holes. It also requires operations that operate on these types. -\cgalRefines{ArrangementDirectionalXMonotoneTraits_2} +\cgalRefines{AosDirectionalXMonotoneTraits_2} \cgalHasModelsBegin \cgalHasModels{CGAL::Gps_segment_traits_2} @@ -19,7 +19,7 @@ types. \cgalHasModels{CGAL::Gps_traits_2} \cgalHasModelsEnd -\sa `ArrangementDirectionalXMonotoneTraits_2` +\sa `AosDirectionalXMonotoneTraits_2` */ diff --git a/Boolean_set_operations_2/doc/Boolean_set_operations_2/PackageDescription.txt b/Boolean_set_operations_2/doc/Boolean_set_operations_2/PackageDescription.txt index a562dd4e48a..9dca99e32af 100644 --- a/Boolean_set_operations_2/doc/Boolean_set_operations_2/PackageDescription.txt +++ b/Boolean_set_operations_2/doc/Boolean_set_operations_2/PackageDescription.txt @@ -42,7 +42,7 @@ containment predicates. - `GpsTraitsGeneralPolygon_2` - `GpsTraitsGeneralPolygonWithHoles_2` - `GeneralPolygon_2` -- `ArrangementDirectionalXMonotoneTraits_2` +- `AosDirectionalXMonotoneTraits_2` - `GeneralPolygonSetTraits_2` - `GeneralPolygonSetDcel` - `GeneralPolygonSetDcelFace` From 71a89e94ca77628b23c9e7c3d41371053dfeb602 Mon Sep 17 00:00:00 2001 From: Efi Fogel Date: Wed, 28 Aug 2024 20:58:45 +0300 Subject: [PATCH 08/63] Changed prefix of concept names Arrangement... => Aos... --- Surface_sweep_2/doc/Surface_sweep_2/Surface_sweep_2.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Surface_sweep_2/doc/Surface_sweep_2/Surface_sweep_2.txt b/Surface_sweep_2/doc/Surface_sweep_2/Surface_sweep_2.txt index 097490409ba..9e16de9d1b9 100644 --- a/Surface_sweep_2/doc/Surface_sweep_2/Surface_sweep_2.txt +++ b/Surface_sweep_2/doc/Surface_sweep_2/Surface_sweep_2.txt @@ -33,7 +33,7 @@ all degenerate cases, including overlapping curves, vertical segments, and tangency between curves. The robustness of the algorithm is guaranteed if the functions are instantiated with a traits class that employs certified computations. This traits class must be a model of -the `ArrangementTraits_2` concept - see the Chapter \ref +the `AosTraits_2` concept - see the Chapter \ref chapterArrangement_on_surface_2 "2D Arrangements" for more details. The complexity of the surface-sweep algorithm is \cgalBigO{(n + From 0d72f17992edc3346de59d29f0d4c20498571749 Mon Sep 17 00:00:00 2001 From: Efi Fogel Date: Wed, 28 Aug 2024 21:00:44 +0300 Subject: [PATCH 09/63] Changed prefix of name of concepts Arrangement... => Aos... --- Minkowski_sum_2/doc/Minkowski_sum_2/Minkowski_sum_2.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Minkowski_sum_2/doc/Minkowski_sum_2/Minkowski_sum_2.txt b/Minkowski_sum_2/doc/Minkowski_sum_2/Minkowski_sum_2.txt index ca7ec155a42..e8007276ac5 100644 --- a/Minkowski_sum_2/doc/Minkowski_sum_2/Minkowski_sum_2.txt +++ b/Minkowski_sum_2/doc/Minkowski_sum_2/Minkowski_sum_2.txt @@ -562,7 +562,7 @@ function template computes the offset of a given polygon \f$ P\f$ by a rational radius \f$ r\f$ in an exact manner. The input polygon \f$ P\f$ must be either simple or degenerate consisting of two vertices (representing a line segment). The `traits` argument must model the -concept `ArrangementTraits_2` and it should be capable of handling +concept `AosTraits_2` and it should be capable of handling conic arcs in an exact manner---using an instance of the `Arr_conic_traits_2` class template with the number types provided by the \core library is the preferred option; see \ref arr_sssectr_conic @@ -631,7 +631,7 @@ Similarly, the function template \link inset_polygon_2() `inset_polygon_2(P, r, traits, oi)` \endlink computes the exact inset of \f$ P\f$ with radius \f$ r\f$, and returns its output through the given output iterator `oi`. The `traits` parameter -must model the concept `ArrangementTraits_2` and it should be capable of +must model the concept `AosTraits_2` and it should be capable of handling conic arcs in an exact manner, whereas the value-type of `oi` must be an instance of `Gps_traits_2::Polygon_2`. From 24400d82269889bc09b9b25b12f7cfd6c0a1bce4 Mon Sep 17 00:00:00 2001 From: Efi Fogel Date: Wed, 28 Aug 2024 21:34:54 +0300 Subject: [PATCH 10/63] Changed prefix of names of concepts Arrangement... => Aos... --- .../CGAL/Arr_circular_arc_traits_2.h | 2 +- .../doc/Arrangement_on_surface_2/CGAL/Arr_enums.h | 2 +- .../CGAL/Arr_line_arc_traits_2.h | 2 +- .../CGAL/Arr_rational_function_traits_2.h | 10 +++++----- .../doc/Arrangement_on_surface_2/CGAL/Arr_tags.h | 2 +- .../include/CGAL/Arr_algebraic_segment_traits_2.h | 2 +- .../include/CGAL/Arr_counting_traits_2.h | 2 +- ...rr_directional_non_caching_segment_basic_traits_2.h | 10 +++++----- .../CGAL/Arr_non_caching_segment_basic_traits_2.h | 4 ++-- .../include/CGAL/Arr_non_caching_segment_traits_2.h | 6 +++--- .../include/CGAL/Arr_polycurve_basic_traits_2.h | 2 +- .../include/CGAL/Arr_tracing_traits_2.h | 2 +- .../include/CGAL/Arrangement_2/Arr_traits_adaptor_2.h | 2 +- .../Curved_kernel_via_analysis_2_impl.h | 6 +++--- .../Filtered_curved_kernel_via_analysis_2_impl.h | 2 +- .../Concepts/CircularKernel--MakeXMonotone_2.h | 3 +-- .../Concepts/CircularKernel--MakeXYMonotone_2.h | 3 +-- Envelope_2/doc/Envelope_2/CGAL/Envelope_diagram_1.h | 4 ++-- Envelope_2/doc/Envelope_2/CGAL/envelope_2.h | 4 ++-- Envelope_2/doc/Envelope_2/Envelope_2.txt | 7 +++---- Envelope_3/doc/Envelope_3/Concepts/EnvelopeTraits_3.h | 4 ++-- .../Snap_rounding_2/Concepts/SnapRoundingTraits_2.h | 2 +- .../Surface_sweep_2/CGAL/Surface_sweep_2_algorithms.h | 7 +++---- 23 files changed, 43 insertions(+), 47 deletions(-) diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_circular_arc_traits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_circular_arc_traits_2.h index fb7945956e2..922b499fff1 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_circular_arc_traits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_circular_arc_traits_2.h @@ -6,7 +6,7 @@ namespace CGAL { * of concept `CircularKernel`. * It provides curves of type `CGAL::Circular_arc_2`. * - * \cgalModels{ArrangementTraits_2} + * \cgalModels{AosTraits_2} */ template class Arr_circular_arc_traits_2 {}; diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_enums.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_enums.h index 9a599f50c75..122054cbcb9 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_enums.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_enums.h @@ -6,7 +6,7 @@ namespace CGAL { * \f$x\f$-monotone curve. It is used by models geometry traits concept that * handle boundary conditions. * - * \sa `ArrangementOpenBoundaryTraits_2` + * \sa `AosOpenBoundaryTraits_2` */ enum Arr_curve_end { ARR_MIN_END, ARR_MAX_END }; diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_line_arc_traits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_line_arc_traits_2.h index 777088a4c89..78101a83ad7 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_line_arc_traits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_line_arc_traits_2.h @@ -6,7 +6,7 @@ namespace CGAL { * model of concept `CircularKernel`. It provides curves of type * `CGAL::Line_arc_2`. * - * \cgalModels{ArrangementTraits_2} + * \cgalModels{AosTraits_2} */ template class Arr_line_arc_traits_2 {}; diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_rational_function_traits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_rational_function_traits_2.h index 617244fe75a..b92da4595ba 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_rational_function_traits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_rational_function_traits_2.h @@ -3,11 +3,11 @@ namespace CGAL { /*! \ingroup PkgArrangementOnSurface2TraitsClasses * * The traits class `Arr_rational_function_traits_2` is a model of the - * `ArrangementTraits_2` concept. It handles bounded and unbounded arcs of + * `AosTraits_2` concept. It handles bounded and unbounded arcs of * rational functions, referred to as rational arcs (in particular, such * an arc may correspond to the entire graph of a rational function). It * supports bounded and unbounded arcs. Thus, it is also a model of the concept - * `ArrangementOpenBoundaryTraits_2`. The traits class enables the construction + * `AosOpenBoundaryTraits_2`. The traits class enables the construction * and maintenance of arrangements of such arcs. * * A rational function \f$y = \frac{P(x)}{Q(x)}\f$ is defined by two polynomials @@ -19,7 +19,7 @@ namespace CGAL { * functions are represented by the nested type `Curve_2`. Note that a rational * function may be not continuous since roots of \f$Q\f$ induce vertical * asymptotes, which would contradict the notion of an \f$x\f$-monotone curve as - * it is introduced by the `ArrangementTraits_2` concept. Thus, continuous + * it is introduced by the `AosTraits_2` concept. Thus, continuous * portions of rational functions are represented by the nested type * `X_monotone_curve_2`, which is different from `Curve_2`. Constructors for * both classes are provided by the traits. A `Curve_2` may be split up into @@ -43,12 +43,12 @@ namespace CGAL { * cleans up the cache on demand. * * While `Arr_rational_function_traits_2` models the concept - * `ArrangementDirectionalXMonotoneTraits_2`, the implementation of the + * `AosDirectionalXMonotoneTraits_2`, the implementation of the * `Are_mergeable_2` operation does not enforce the input curves to have the * same direction as a precondition. Moreover, `Arr_rational_function_traits_2` * supports the merging of curves of opposite directions. * - * \cgalModels{ArrangementTraits_2,ArrangementDirectionalXMonotoneTraits_2,ArrangementOpenBoundaryTraits_2} + * \cgalModels{AosTraits_2,AosDirectionalXMonotoneTraits_2,AosOpenBoundaryTraits_2} */ template class Arr_rational_function_traits_2 { diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_tags.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_tags.h index e2430129309..db8a50a9a68 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_tags.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_tags.h @@ -17,7 +17,7 @@ namespace CGAL { * \sa `Arr_closed_side_tag` * \sa `Arr_contracted_side_tag` * \sa `Arr_identified_side_tag` - * \sa `ArrangementBasicTraits_2` + * \sa `AosBasicTraits_2` */ struct Arr_oblivious_side_tag {}; diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_algebraic_segment_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_algebraic_segment_traits_2.h index 03566eaa919..d6314e100f3 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_algebraic_segment_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_algebraic_segment_traits_2.h @@ -75,7 +75,7 @@ public: typedef typename Algebraic_kernel_d_2::Polynomial_2 Polynomial_2; - /// public types for ArrangementTraits_2 + /// public types for AosTraits_2 typedef typename Algebraic_kernel_d_2::Curve_analysis_2 Curve_2; diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_counting_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_counting_traits_2.h index 4707748fff6..d3676fd325e 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_counting_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_counting_traits_2.h @@ -36,7 +36,7 @@ namespace CGAL { /*! \class - * A model of the ArrangementTraits_2 concept that counts the methods invoked. + * A model of the AosTraits_2 concept that counts the methods invoked. */ template class Arr_counting_traits_2 : public Base_traits { diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_directional_non_caching_segment_basic_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_directional_non_caching_segment_basic_traits_2.h index 86895503ff4..79f53789d56 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_directional_non_caching_segment_basic_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_directional_non_caching_segment_basic_traits_2.h @@ -22,10 +22,10 @@ namespace CGAL { /*! \class * A model of the following concepts: - * 1. ArrangementBasicTraits_2, - * 2. ArrangementDirectionalXMonotoneTraits_2, - * 4. ArrangementConstructXMonotoneCurveTraits_2, and - * 3. ArrangementOpenBoundaryTraits_2 + * 1. AosBasicTraits_2, + * 2. AosDirectionalXMonotoneTraits_2, + * 4. AosConstructXMonotoneCurveTraits_2, and + * 3. AosOpenBoundaryTraits_2 * It handles linear curves. */ template @@ -43,7 +43,7 @@ public: Arr_directional_non_caching_segment_basic_traits_2() : Base() {} /// \name Types and functors inherited from the base, required by the - // ArrangementBasicTraits_2 concept. + // AosBasicTraits_2 concept. //@{ // Traits types: diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_non_caching_segment_basic_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_non_caching_segment_basic_traits_2.h index f394e3adf86..b3895989a6c 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_non_caching_segment_basic_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_non_caching_segment_basic_traits_2.h @@ -25,7 +25,7 @@ /*! \file The basic non-caching segment traits-class for the arrangement * package. This traits class handles x-monotone non-intersecting segments. - * It is a model of the ArrangementBasicTraits_2 concept. The class is + * It is a model of the AosBasicTraits_2 concept. The class is * templated by a kernel and inherits from it all the types and many of the * functors required by the concept it models. */ @@ -41,7 +41,7 @@ namespace CGAL { /*! \class - * A model of the ArrangementBasicTraits_2 concept that handles x-monotone + * A model of the AosBasicTraits_2 concept that handles x-monotone * non-intersecting line segments. */ template diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_non_caching_segment_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_non_caching_segment_traits_2.h index 58acefda211..dec8c0db50a 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_non_caching_segment_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_non_caching_segment_traits_2.h @@ -20,10 +20,10 @@ /*! \file The non-caching segment traits-class for the arrangement package. * This traits class handles general segments. It is a model of the - * ArrangementTraits_2 concept, a refinement of the ArrangementBasicTraits_2 + * AosTraits_2 concept, a refinement of the AosBasicTraits_2 * concept. The class is templated by a kernel and inherits from the * Arr_non_caching_segment_basic_traits_2 class instantiated with the kernel - - * a model of the ArrangementBasicTraits_2 concept. It defined a few additional + * a model of the AosBasicTraits_2 concept. It defined a few additional * functors required by the concept it models. */ @@ -38,7 +38,7 @@ namespace CGAL { /*! \class - * A model of the ArrangementTraits_2 concept that handles general + * A model of the AosTraits_2 concept that handles general * line segments. */ template diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_polycurve_basic_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_polycurve_basic_traits_2.h index 30c326b1876..0980cc68312 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_polycurve_basic_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_polycurve_basic_traits_2.h @@ -1037,7 +1037,7 @@ public: //@} /// \name Types and functors defined here, required by the - // ArrangementDirectionalXMonotoneTraits_2 concept. + // AosDirectionalXMonotoneTraits_2 concept. //@{ Compare_endpoints_xy_2 compare_endpoints_xy_2_object() const diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_tracing_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_tracing_traits_2.h index 66dd1834a8c..7744756c6f0 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_tracing_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_tracing_traits_2.h @@ -35,7 +35,7 @@ namespace CGAL { /*! \class - * A model of the ArrangementTraits_2 concept that counts the methods invoked. + * A model of the AosTraits_2 concept that counts the methods invoked. */ template class Arr_tracing_traits_2 : public Base_traits { diff --git a/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arr_traits_adaptor_2.h b/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arr_traits_adaptor_2.h index 97c9b5b0f5b..63d157519a5 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arr_traits_adaptor_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arr_traits_adaptor_2.h @@ -2177,7 +2177,7 @@ public: CGAL_precondition(is_in_x_range(xcv1, xcv2)); /* The traits class which the basic traits adaptor accepts as a template - * parameter is a model of the ArrangementBasicTraits_2 concept so it + * parameter is a model of the AosBasicTraits_2 concept so it * needs not to support intersections at all, therefore it is complicated * to check if the x-curves are disjoint in their interiors. Moreover, * compare_y_position functor is called only from the arrangement class diff --git a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Curved_kernel_via_analysis_2_impl.h b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Curved_kernel_via_analysis_2_impl.h index cbc2a9ad81a..26117033c04 100644 --- a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Curved_kernel_via_analysis_2_impl.h +++ b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Curved_kernel_via_analysis_2_impl.h @@ -64,7 +64,7 @@ public: BaseCKvA::Curved_kernel_via_analysis_2> Functor_base; }; - //!\name Embedded types to fulfill \c ArrangementTraits_2 concept + //!\name Embedded types to fulfill \c AosTraits_2 concept //! type of curve that can be analyzed typedef typename Curve_kernel_2::Curve_analysis_2 Curve_2; @@ -245,14 +245,14 @@ public: }; public: - //!\name Embedded types to fulfill \c ArrangementTraits_2 concept + //!\name Embedded types to fulfill \c AosTraits_2 concept //!@{ typedef internal::Point_2< Self > Point_2; typedef internal::Arc_2< Self > Arc_2; - //! type of weakly x-monotone arc for \c ArrangementTraits_2 + //! type of weakly x-monotone arc for \c AosTraits_2 typedef Arc_2 X_monotone_curve_2; //!@} diff --git a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Filtered_curved_kernel_via_analysis_2_impl.h b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Filtered_curved_kernel_via_analysis_2_impl.h index 34eb19ae4b2..6353425cd4c 100644 --- a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Filtered_curved_kernel_via_analysis_2_impl.h +++ b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Filtered_curved_kernel_via_analysis_2_impl.h @@ -716,7 +716,7 @@ public: //! type of an arc on generic curve typedef internal::Arc_2< Self > Arc_2; - //! type of weakly x-monotone arc for \c ArrangementTraits_2 + //! type of weakly x-monotone arc for \c AosTraits_2 typedef Arc_2 X_monotone_curve_2; //!@} diff --git a/Circular_kernel_2/doc/Circular_kernel_2/Concepts/CircularKernel--MakeXMonotone_2.h b/Circular_kernel_2/doc/Circular_kernel_2/Concepts/CircularKernel--MakeXMonotone_2.h index 0767ad52573..d47fd62c986 100644 --- a/Circular_kernel_2/doc/Circular_kernel_2/Concepts/CircularKernel--MakeXMonotone_2.h +++ b/Circular_kernel_2/doc/Circular_kernel_2/Concepts/CircularKernel--MakeXMonotone_2.h @@ -18,7 +18,7 @@ public: Splits the arc `ca` into `x`-monotone arcs that are returned through the output iterator. Note that, to ensure an easy interface with the `Arrangement_2` package, the arcs are returned as `CGAL::Object`'s -(see the `ArrangementTraits_2` concept). +(see the `AosTraits_2` concept). */ template < class OutputIterator > OutputIterator @@ -27,4 +27,3 @@ operator()(const CircularKernel::Circular_arc_2 &ca, OutputIterator oit); /// @} }; /* end CircularKernel::MakeXMonotone_2 */ - diff --git a/Circular_kernel_2/doc/Circular_kernel_2/Concepts/CircularKernel--MakeXYMonotone_2.h b/Circular_kernel_2/doc/Circular_kernel_2/Concepts/CircularKernel--MakeXYMonotone_2.h index 7e454234f27..5cbed951333 100644 --- a/Circular_kernel_2/doc/Circular_kernel_2/Concepts/CircularKernel--MakeXYMonotone_2.h +++ b/Circular_kernel_2/doc/Circular_kernel_2/Concepts/CircularKernel--MakeXYMonotone_2.h @@ -18,7 +18,7 @@ public: Splits the arc `ca` into `y`-monotone arcs that are returned through the output iterator. Note that, to ensure an easy interface with the `Arrangement_2` package, the arcs are returned as `CGAL::Object`'s -(see the `ArrangementTraits_2` concept). +(see the `AosTraits_2` concept). */ template < class OutputIterator > OutputIterator @@ -27,4 +27,3 @@ operator()(const CircularKernel::Circular_arc_2 &ca, OutputIterator oit); /// @} }; /* end CircularKernel::MakeXYMonotone_2 */ - diff --git a/Envelope_2/doc/Envelope_2/CGAL/Envelope_diagram_1.h b/Envelope_2/doc/Envelope_2/CGAL/Envelope_diagram_1.h index abb127ae839..9bc1b4f9710 100644 --- a/Envelope_2/doc/Envelope_2/CGAL/Envelope_diagram_1.h +++ b/Envelope_2/doc/Envelope_2/CGAL/Envelope_diagram_1.h @@ -11,9 +11,9 @@ time, and the space needed to store the diagram class is linear in the complexity of the envelope. The envelope-diagram class is parameterized by a traits class, which is a -model of the `ArrangementXMonotoneTraits_2` concept, in case we handle +model of the `AosXMonotoneTraits_2` concept, in case we handle only envelopes of \f$ x\f$-monotone curves, or of the refined -`ArrangementTraits_2` concept in case we handle arbitrary planar curves. +`AosTraits_2` concept in case we handle arbitrary planar curves. \cgalModels{EnvelopeDiagram_1} diff --git a/Envelope_2/doc/Envelope_2/CGAL/envelope_2.h b/Envelope_2/doc/Envelope_2/CGAL/envelope_2.h index 347374d63e2..75ad86a2970 100644 --- a/Envelope_2/doc/Envelope_2/CGAL/envelope_2.h +++ b/Envelope_2/doc/Envelope_2/CGAL/envelope_2.h @@ -48,7 +48,7 @@ The lower envelope is represented using the output minimization diagram `diag`. \tparam InputIterator must be an input iterator with value type `EnvelopeDiagram::X_monotone_curve_2`. \tparam EnvelopeDiagram must be a model of the concept `EnvelopeDiagram_1`. -\tparam Traits must be a model of the concept `ArrangementXMonotoneTraits_2`. +\tparam Traits must be a model of the concept `AosXMonotoneTraits_2`. */ template void lower_envelope_x_monotone_2 @@ -107,7 +107,7 @@ The upper envelope is represented using the output maximization diagram `diag`. \tparam InputIterator must be an input iterator with value type `EnvelopeDiagram::X_monotone_curve_2`. \tparam EnvelopeDiagram must be a model of the concept `EnvelopeDiagram_1`. -\tparam Traits must be a model of the concept `ArrangementXMonotoneTraits_2`. +\tparam Traits must be a model of the concept `AosXMonotoneTraits_2`. */ template void upper_envelope_x_monotone_2 diff --git a/Envelope_2/doc/Envelope_2/Envelope_2.txt b/Envelope_2/doc/Envelope_2/Envelope_2.txt index 13e94452c13..0bdc3a95a17 100644 --- a/Envelope_2/doc/Envelope_2/Envelope_2.txt +++ b/Envelope_2/doc/Envelope_2/Envelope_2.txt @@ -136,11 +136,11 @@ Any model of the `EnvelopeDiagram_1` concept must define a geometric traits class, which in turn defines the `Point_2` and `X_monotone_curve_2` types defined with the diagram features. The geometric traits class must be a model of the -`ArrangementXMonotoneTraits_2` concept in case we construct +`AosXMonotoneTraits_2` concept in case we construct envelopes of \f$ x\f$-monotone curves. If we are interested in handling arbitrary (not necessarily \f$ x\f$-monotone) curves, the traits class -must be a model of the `ArrangementTraits_2` concept. This -concepts refined the `ArrangementXMonotoneTraits_2` concept; +must be a model of the `AosTraits_2` concept. This +concepts refined the `AosXMonotoneTraits_2` concept; a traits class that models this concepts must also defines a `Curve_2` type, representing an arbitrary planar curve, and provide a functor for subdividing such curves into \f$ x\f$-monotone @@ -199,4 +199,3 @@ that compute envelopes of arbitrary curves. */ } /* namespace CGAL */ - diff --git a/Envelope_3/doc/Envelope_3/Concepts/EnvelopeTraits_3.h b/Envelope_3/doc/Envelope_3/Concepts/EnvelopeTraits_3.h index fc72154073a..7c9b36b783f 100644 --- a/Envelope_3/doc/Envelope_3/Concepts/EnvelopeTraits_3.h +++ b/Envelope_3/doc/Envelope_3/Concepts/EnvelopeTraits_3.h @@ -3,7 +3,7 @@ * * This concept defines the minimal set of geometric predicates and operations * needed to compute the envelope of a set of arbitrary surfaces in \f$ - * \mathbb{R}^3\f$. It refines the `ArrangementXMonotoneTraits_2` concept. In + * \mathbb{R}^3\f$. It refines the `AosXMonotoneTraits_2` concept. In * addition to the `Point_2` and `X_monotone_curve_2` types and the * `Has_boundary_category` category tag listed in the base concept, it also * lists the `Surface_3` and `Xy_monotone_surface_3` types, which represent @@ -12,7 +12,7 @@ * operations usually involve the projection of 3D objects onto the \f$ * xy\f$-plane. * - * \cgalRefines{ArrangementXMonotoneTraits_2} + * \cgalRefines{AosXMonotoneTraits_2} * * \cgalHasModelsBegin * \cgalHasModels{CGAL::Env_triangle_traits_3} diff --git a/Snap_rounding_2/doc/Snap_rounding_2/Concepts/SnapRoundingTraits_2.h b/Snap_rounding_2/doc/Snap_rounding_2/Concepts/SnapRoundingTraits_2.h index 5cc0f58e596..a63d3f20095 100644 --- a/Snap_rounding_2/doc/Snap_rounding_2/Concepts/SnapRoundingTraits_2.h +++ b/Snap_rounding_2/doc/Snap_rounding_2/Concepts/SnapRoundingTraits_2.h @@ -9,7 +9,7 @@ the free function \ref CGAL::snap_rounding_2() `CGAL::snap_rounding_2} diff --git a/Surface_sweep_2/doc/Surface_sweep_2/CGAL/Surface_sweep_2_algorithms.h b/Surface_sweep_2/doc/Surface_sweep_2/CGAL/Surface_sweep_2_algorithms.h index 9e8ecee5e02..5175bb1fa82 100644 --- a/Surface_sweep_2/doc/Surface_sweep_2/CGAL/Surface_sweep_2_algorithms.h +++ b/Surface_sweep_2/doc/Surface_sweep_2/CGAL/Surface_sweep_2_algorithms.h @@ -27,7 +27,7 @@ input curves. When the flag `report_endpoints` is `true`, this function reports all the curve endpoints as well. If a curve endpoint is also an intersection point, it is reported once (regardless of the value of the `report_endpoints` flag). The `Traits` type -must be a model of the `ArrangementTraits_2` concept, such that the +must be a model of the `AosTraits_2` concept, such that the value-type of `InputIterator` is `Traits::Curve_2`, and the value-type of `OutputIterator` is `Traits::Point_2`. The output points are reported in an increasing \f$ xy\f$-lexicographical order. @@ -64,7 +64,7 @@ disjoint in their interior, as induced by the input curves. If the flag `multiple_overlaps` is `true`, then a subcurve that represents an overlap of \f$ k\f$ input curves is reported \f$ k\f$ times; otherwise, each subcurve is reported only once. The `Traits` type must be a model -of the `ArrangementTraits_2` concept, such that the value-type of +of the `AosTraits_2` concept, such that the value-type of `InputIterator` is `Traits::Curve_2`, and the value-type of `OutputIterator` is `Traits::X_monotone_curve_2`. */ @@ -94,7 +94,7 @@ Given a range of curves, check whether there is at least one pair of curves that intersect in their interior. The function returns `true` if such a pair is found, and `false` if all curves are pairwise disjoint in their interior. The `Traits` type must be a model -of the `ArrangementTraits_2` concept, such that the value-type of +of the `AosTraits_2` concept, such that the value-type of `InputIterator` is `Traits::Curve_2`. */ template @@ -103,4 +103,3 @@ bool do_curves_intersect (InputIterator curves_begin, Traits traits = Default_traits()); } /* namespace CGAL */ - From 4df46ba01f536a6059d8506a3dcf40194bf161e0 Mon Sep 17 00:00:00 2001 From: Efi Fogel Date: Thu, 29 Aug 2024 19:11:45 +0300 Subject: [PATCH 11/63] Added std namespace to size_t --- .../Arrangement_on_surface_2.txt | 2 +- .../CGAL/Arr_Bezier_curve_traits_2.h | 2 +- .../CGAL/Arr_polycurve_traits_2.h | 2 +- .../CGAL/Arrangement_on_surface_2.h | 2 +- .../Arrangement_on_surface_2/Concepts/AosDcel.h | 2 +- .../Concepts/AosDcelFace.h | 16 +++++++--------- 6 files changed, 12 insertions(+), 14 deletions(-) diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Arrangement_on_surface_2.txt b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Arrangement_on_surface_2.txt index 2256387b2cd..d07ea8ba7d0 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Arrangement_on_surface_2.txt +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Arrangement_on_surface_2.txt @@ -766,7 +766,7 @@ void print_face(typename Arrangement::Face_const_handle f) { } // Print the boundary of each of the holes. - size_t index = 1; + std::size_t index = 1; for (auto hi = f->holes_begin(); hi != f->holes_end(); ++hi) { std::cout << " Hole #" << index++ << ": "; print_ccb(*hi); diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_Bezier_curve_traits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_Bezier_curve_traits_2.h index 7e5c1ac3ef3..1aa4748aee9 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_Bezier_curve_traits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_Bezier_curve_traits_2.h @@ -100,7 +100,7 @@ public: /*! returns the number of control points that define `B`. */ - size_t number_of_control_points() const; + std::size_t number_of_control_points() const; /*! returns the \f$k\f$th control point. Note that the first control point * equals the curve source, while the last control point equals its diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_polycurve_traits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_polycurve_traits_2.h index c8e05ebdc6a..fc838b1c868 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_polycurve_traits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_polycurve_traits_2.h @@ -412,7 +412,7 @@ public: * \f$n\f$ is the number of subcurves. */ typename SubcurveTraits_2::X_monotone_curve_2 - operator[](size_t k) const; + operator[](std::size_t k) const; /*! Obtain the bounding box of the polycurve. */ diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arrangement_on_surface_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arrangement_on_surface_2.h index b5b99619fbd..d04c076b8e2 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arrangement_on_surface_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arrangement_on_surface_2.h @@ -84,7 +84,7 @@ public: /// the \f$x\f$-monotone curve type, as defined by the traits class. typedef typename Geometry_traits_2::X_monotone_curve_2 X_monotone_curve_2; - /// the size type (equivalent to `size_t`). + /// the size type (equivalent to `std::size_t`). typedef typename Dcel::Size Size; /*! \ingroup PkgArrangementOnSurface2DCEL diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosDcel.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosDcel.h index 6f663c086b4..ccbca2074c2 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosDcel.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosDcel.h @@ -55,7 +55,7 @@ public: /// the isolated vertex type. typedef unspecified_type Isolated_vertex; - /// used to represent size values (e.g., `size_t`). + /// used to represent size values (e.g., `std::size_t`). typedef unspecified_type Size; /// a bidirectional iterator over the vertices. Its value-type is `Vertex`. diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosDcelFace.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosDcelFace.h index c7577f1722f..595f69cf54d 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosDcelFace.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosDcelFace.h @@ -1,5 +1,4 @@ -/*! - * \ingroup PkgArrangementOnSurface2ConceptsDCEL +/*! \ingroup PkgArrangementOnSurface2ConceptsDCEL * \cgalConcept * * A face record in a \dcel data structure. A face represents a region, which @@ -14,7 +13,6 @@ * \sa `AosDcelVertex` * \sa `AosDcelHalfedge` */ - class AosDcelFace { public: /// \name Types @@ -23,10 +21,10 @@ public: /// `Isolated_vertex_const_iterator` are also defined. /// @{ - /*! the corresponding \dcel vertex type. */ + //! the corresponding \dcel vertex type. typedef unspecified_type Vertex; - /*! the corresponding \dcel halfedge type. */ + //! the corresponding \dcel halfedge type. typedef unspecified_type Halfedge; /*! a bidirectional iterator over the outer CCBs of the face. Its value-type @@ -78,7 +76,7 @@ public: /*! obtains the number of outer CCBs of `f`. In case of planar arrangement * this is either 0 or 1. */ - size_t number_of_outer_ccbs() const; + std::size_t number_of_outer_ccbs() const; /*! obtains a begin iterator for the outer CCBs of `f`. */ Outer_ccb_iterator outer_ccbs_begin(); @@ -87,7 +85,7 @@ public: Outer_ccb_iterator outer_ccbs_end(); /*! obtains the number of inner CCBs of `f`. */ - size_t number_of_inner_ccbs() const; + std::size_t number_of_inner_ccbs() const; /*! obtains a begin iterator for the inner CCBs of `f`. */ Inner_ccb_iterator inner_ccbs_begin(); @@ -96,7 +94,7 @@ public: Inner_ccb_iterator inner_ccbs_end(); /*! obtains the number of holes (i.e., inner CCBs) inside `f`. */ - size_t number_of_holes() const; + std::size_t number_of_holes() const; /*! obtains a begin-iterator for the holes (i.e., inner CCBs) of `f`. */ Hole_iterator holes_begin(); @@ -105,7 +103,7 @@ public: Hole_iterator holes_end(); /*! obtains the number of isolated vertices inside `f`. */ - size_t number_of_isolated_vertices() const; + std::size_t number_of_isolated_vertices() const; /*! obtains a begin-iterator for the isolated vertices inside `f`. */ Isolated_vertex_iterator isolated_vertices_begin(); From b80e1717cd448e151780d1ba879acdd568e4c826 Mon Sep 17 00:00:00 2001 From: Efi Fogel Date: Wed, 22 Jan 2025 01:28:25 +0200 Subject: [PATCH 12/63] Cleaned up --- .../Arrangement_on_surface_2.txt | 2 +- .../CGAL/Arr_Bezier_curve_traits_2.h | 2 +- .../doc/Arrangement_on_surface_2/CGAL/Arr_accessor.h | 8 ++++---- .../CGAL/Arr_algebraic_segment_traits_2.h | 4 ++-- .../CGAL/Arr_circle_segment_traits_2.h | 2 +- .../CGAL/Arr_conic_traits_2.h | 12 ++++++------ .../CGAL/Arr_linear_traits_2.h | 2 +- .../CGAL/Arr_rational_function_traits_2.h | 4 ++-- .../CGAL/Arr_segment_traits_2.h | 2 +- .../CGAL/Arr_trapezoid_ric_point_location.h | 4 ++-- .../Arrangement_on_surface_2/CGAL/Arrangement_2.h | 4 ++-- .../CGAL/Arrangement_on_surface_2.h | 7 ++++--- 12 files changed, 27 insertions(+), 26 deletions(-) diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Arrangement_on_surface_2.txt b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Arrangement_on_surface_2.txt index 20267328c5a..856d074ddc5 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Arrangement_on_surface_2.txt +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Arrangement_on_surface_2.txt @@ -5739,7 +5739,7 @@ topological entities and the implementation of the functions that handle these topological entities, used by the `Arrangement_on_surface_2` class template and by the peripheral modules. Every topology traits class -must model the basic concept `ArrangementBasicTopologyTraits`. A model +must model the basic concept `AosBasicTopologyTraits`. A model of this basic concept holds the (\dcel) data structure used to represent the arrangement cells (i.e., vertices, edges, and facets) and the incidence relations between them. At this point we do not diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_Bezier_curve_traits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_Bezier_curve_traits_2.h index 1aa4748aee9..671cb517e79 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_Bezier_curve_traits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_Bezier_curve_traits_2.h @@ -250,7 +250,7 @@ public: /// \name Creation /// @{ - /*! Trims the given x-monotone curve to an from src to tgt. + /*! Trims the given \f$x\f$-monotone curve to an from `src` to `tgt`. * * \ pre `src` and `tgt` lies on the curve */ diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_accessor.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_accessor.h index 45cf6a39a48..922ebd42db8 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_accessor.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_accessor.h @@ -238,8 +238,8 @@ Halfedge_handle insert_from_vertex_ex(const X_monotone_curve_2& c, Halfedge_handle modify_edge_ex(Halfedge_handle e, const X_monotone_curve_2& c); /*! splits a given edge into two at the split point `p`, and associate the - * x-monotone curves `c1` and `c2` with the resulting edges, such that `c1` - * connects `he->source()` with `p` and `c2` connects `p` with + * \f$x\f$-monotone curves `c1` and `c2` with the resulting edges, such that + * `c1` connects `he->source()` with `p` and `c2` connects `p` with * `he->target()`. The function return a handle to the split halfedge directed * from `he->source()` to the split point `p`. * @@ -251,8 +251,8 @@ Halfedge_handle insert_from_vertex_ex(const X_monotone_curve_2& c, const X_monotone_curve_2& c2); /*! splits a given edge into two at by the vertex `v`, and associate the - * x-monotone curves `c1` and `c2` with the resulting edges, such that `c1` - * connects `he->source()` with `v` and `c2` connects `v` with + * \f$x\f$-monotone curves `c1` and `c2` with the resulting edges, such that + * `c1` connects `he->source()` with `v` and `c2` connects `v` with * `he->target()`. The function return a handle to the split halfedge directed * from `he->source()` to `v`. * diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_algebraic_segment_traits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_algebraic_segment_traits_2.h index 868df9c31c3..c57c2661e1e 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_algebraic_segment_traits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_algebraic_segment_traits_2.h @@ -108,7 +108,7 @@ public: * counted from the bottom, starting with zero. * * \pre (`cv` must not have a vertical line at `x`, - * and \f$0\leq arcno < c\f$, where \f$ c\f$ is the number of points + * and \f$0\leq arcno < c\f$, where \f$c\f$ is the number of points * in the fiber of `cv` at `x`.) */ Point_2 operator()(Algebraic_real_1 x, Curve_2 cv, int arcno); @@ -276,7 +276,7 @@ public: */ int arcno() const; - /*! returns double-approximations of the \f$ x\f$- and \f$ y\f$-coordinates. + /*! returns double-approximations of the \f$x\f$- and \f$y\f$-coordinates. */ std::pair to_double() const; diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_circle_segment_traits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_circle_segment_traits_2.h index a0528cf1919..ed407c1a02b 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_circle_segment_traits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_circle_segment_traits_2.h @@ -315,7 +315,7 @@ public: /// \name Creation /// @{ - /*! trims the given x-monotone curve to an from src to tgt. + /*! trims the given \f$x\f$-monotone curve to an from `src` to `tgt`. * \ pre `src` and `tgt` lies on the curve */ X_monotone_curve_2(const X_monotone_curve_2& xcv, diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_conic_traits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_conic_traits_2.h index ff2286ef683..33a5f127a31 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_conic_traits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_conic_traits_2.h @@ -30,12 +30,12 @@ namespace CGAL { *
      • A full ellipse (or a circle) \f$C\f$. * *
      • The tuple \f$\langle C, p_s, p_t, o \rangle\f$, where \f$C\f$ is the - * supporting conic curve, with the arc endpoints being \f$p_s\f$ and \f$ - * p_t\f$ (the source and target points, respectively). The orientation \f$o\f$ - * indicates whether we proceed from \f$p_s\f$ to \f$p_t\f$ in a clockwise or - * in a counterclockwise direction. Note that \f$C\f$ may also correspond to a - * line or to pair of lines---in this case \f$o\f$ may specify a `COLLINEAR` - * orientation. + * supporting conic curve, with the arc endpoints being \f$p_s\f$ and + * \f$p_t\f$ (the source and target points, respectively). The orientation + * \f$o\f$ indicates whether we proceed from \f$p_s\f$ to \f$p_t\f$ in a + * clockwise or in a counterclockwise direction. Note that \f$C\f$ may also + * correspond to a line or to pair of lines---in this case \f$o\f$ may specify a + * `COLLINEAR` orientation. * *
      * diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_linear_traits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_linear_traits_2.h index 916b3e2bbdb..8a26dc62256 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_linear_traits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_linear_traits_2.h @@ -144,7 +144,7 @@ public: /// \name Creation /// @{ - /*! trims the given x-monotone curve to an from src to tgt. + /*! trims the given \f$x\f$-monotone curve to an from `src` to `tgt`. * \ pre `src` and `tgt` lies on the curve */ X_monotone_curve_2 operator()(const X_monotone_curve_2& xcv, diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_rational_function_traits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_rational_function_traits_2.h index 87a83ddc548..42ca89c6d4a 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_rational_function_traits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_rational_function_traits_2.h @@ -160,8 +160,8 @@ public: /*! constructs a curve representing the rational function \f$y = P(x)/Q(x)\f$. * The function is defined over the interval - * \f$ I=[x,+\infty)\f$ if \f$right\f$ is true and - * \f$ I=(-\infty,x]\f$ otherwise. + * \f$I=[x,+\infty)\f$ if \f$right\f$ is true and + * \f$I=(-\infty,x]\f$ otherwise. */ Curve_2 operator()(Polynomial_1 P, Polynomial_1 Q, const Algebraic_real_1& x, bool right) const; diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_segment_traits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_segment_traits_2.h index 40583d72cd4..3d2826da6f5 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_segment_traits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_segment_traits_2.h @@ -114,7 +114,7 @@ public: /// \name Creation /// @{ - /*! trims the given x-monotone curve to an from src to tgt. + /*! trims the given \f$x\f$-monotone curve to an from `src` to `tgt`. * * \ pre `src` and `tgt` lies on the curve */ diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_trapezoid_ric_point_location.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_trapezoid_ric_point_location.h index 7c4ccf1b37f..a3aa5e30fed 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_trapezoid_ric_point_location.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_trapezoid_ric_point_location.h @@ -36,14 +36,14 @@ public: /// \name Creation /// @{ - /*! If with_guarantees is set to true, the construction performs rebuilds in + /*! If `with_guarantees` is set to true, the construction performs rebuilds in * order to guarantee a resulting structure with linear size and logarithmic * query time. Otherwise the structure has expected linear size and expected * logarithmic query time. */ Arr_trapezoid_ric_point_location(bool with_guarantees = true); - /*! Constructs a point location search structure for the given arrangement. + /*! constructs a point location search structure for the given arrangement. * If with_guarantees is set to true, the construction performs rebuilds in * order to guarantee a resulting structure with linear size and logarithmic * query time. Otherwise the structure has expected linear size and expected diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arrangement_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arrangement_2.h index 32c7644b450..70b3f35aafa 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arrangement_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arrangement_2.h @@ -250,7 +250,7 @@ void insert(Arrangement_2& arr, *
    • The instantiated `Traits` class must model the restricted * `AosBasicTraits_2` concept, as no intersections are computed. *
    • The point-location object `pl` must model the - * `ArrangementPointLocation_2` concept. + * `AosPointLocation_2` concept. *
    */ template @@ -301,7 +301,7 @@ void insert_non_intersecting_curves(Arrangement_2& arr, * by this concept are required. In fact the traits class must model the * `AosBasicTraits_2` concept, and support the splitting functionality. *
  • The point-location object `pl`, must model the - * `ArrangementPointLocation_2` concept. + * `AosPointLocation_2` concept. * */ template diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arrangement_on_surface_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arrangement_on_surface_2.h index d04c076b8e2..7a8eaa70b17 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arrangement_on_surface_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arrangement_on_surface_2.h @@ -972,9 +972,10 @@ public: /*! merges the edges represented by `e1` and `e2` into * a single edge, associated with the given merged curve `c`. Denote `e1`'s * end-vertices as \f$u_1\f$ and \f$v\f$, while `e2`'s end-vertices are - * denoted \f$u_2\f$ and \f$v\f$. The function removes the common vertex \f$ - * v\f$ returns a handle for one of the merged halfedges, directed from \f$ - * u_1\f$ to \f$u_2\f$. + * denoted \f$u_2\f$ and \f$v\f$. The function removes the common vertex + * \f$v\f$ returns a handle for one of the merged halfedges, directed from + * \f$u_1\f$ to \f$u_2\f$. + * * \pre `e1` and `e2` share a common end-vertex, such that the two other * end-vertices of the two edges are associated with `c`'s endpoints. */ From 19954c5d73acd3ca72d4e42ff68dd4af370cf5fb Mon Sep 17 00:00:00 2001 From: Efi Fogel Date: Wed, 22 Jan 2025 12:37:35 +0200 Subject: [PATCH 13/63] Fixed compiler complain about missing return value --- .../CGAL/Surface_sweep_2/Arr_basic_insertion_traits_2.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_basic_insertion_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_basic_insertion_traits_2.h index e1accd10731..b6090350941 100644 --- a/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_basic_insertion_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_basic_insertion_traits_2.h @@ -251,7 +251,7 @@ public: // vertex to the extended point. if (! vh->is_at_open_boundary() && m_base_equal(base_p, vh->point())) return (Point_2(base_p, vh)); - else return (Point_2(base_p)); + return (Point_2(base_p)); } }; @@ -308,7 +308,7 @@ public: // vertex to the extended point. if (! vh->is_at_open_boundary() && m_base_equal(base_p, vh->point())) return (Point_2(base_p, vh)); - else return (Point_2(base_p)); + return (Point_2(base_p)); } }; From 5706cbd85ff62fe3f6c986c04fa4b24229cfe90c Mon Sep 17 00:00:00 2001 From: Efi Fogel Date: Wed, 22 Jan 2025 12:43:19 +0200 Subject: [PATCH 14/63] Cleaned up --- .../include/CGAL/Arr_dcel_base.h | 37 +++++++++---------- 1 file changed, 18 insertions(+), 19 deletions(-) diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_dcel_base.h b/Arrangement_on_surface_2/include/CGAL/Arr_dcel_base.h index f38156da2af..0e986fc78bb 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_dcel_base.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_dcel_base.h @@ -40,24 +40,24 @@ namespace CGAL { inline void* _clean_pointer(const void* p) { - static_assert(sizeof(void*) == sizeof(size_t)); - const size_t mask = ~1; - const size_t val = (reinterpret_cast(p) & mask); + static_assert(sizeof(void*) == sizeof(std::size_t)); + const std::size_t mask = ~1; + const std::size_t val = (reinterpret_cast(p) & mask); return (reinterpret_cast(val)); } inline void* _set_lsb(const void* p) { - const size_t mask = 1; - const size_t val = (reinterpret_cast(p) | mask); + const std::size_t mask = 1; + const std::size_t val = (reinterpret_cast(p) | mask); return (reinterpret_cast( val)); } inline bool _is_lsb_set(const void* p) { - const size_t mask = 1; - const size_t val = reinterpret_cast(p); + const std::size_t mask = 1; + const std::size_t val = reinterpret_cast(p); return ((val & mask) != 0); } @@ -565,7 +565,7 @@ public: Outer_ccb_const_iterator; /*! obtains the number of outer CCBs the face has. */ - size_t number_of_outer_ccbs() const { return (this->outer_ccbs.size()); } + std::size_t number_of_outer_ccbs() const { return (this->outer_ccbs.size()); } /*! obtains an iterator for the first outer CCB of the face. */ Outer_ccb_iterator outer_ccbs_begin() { return (this->outer_ccbs.begin()); } @@ -601,7 +601,7 @@ public: typedef Inner_ccb_const_iterator Hole_const_iterator; /*! obtains the number of inner CCBs the face has. */ - size_t number_of_inner_ccbs() const { return (this->inner_ccbs.size()); } + std::size_t number_of_inner_ccbs() const { return (this->inner_ccbs.size()); } /*! obtains an iterator for the first inner CCB of the face. */ Inner_ccb_iterator inner_ccbs_begin() { return (this->inner_ccbs.begin()); } @@ -646,7 +646,7 @@ public: } // Backward compatibility: - size_t number_of_holes() const { return number_of_inner_ccbs(); } + std::size_t number_of_holes() const { return number_of_inner_ccbs(); } Hole_iterator holes_begin() { return inner_ccbs_begin(); } Hole_iterator holes_end() { return inner_ccbs_end(); } Hole_const_iterator holes_begin() const { return inner_ccbs_begin(); } @@ -669,7 +669,7 @@ public: Isolated_vertex_const_iterator; /*! obtains the number of isloated vertices inside the face. */ - size_t number_of_isolated_vertices() const + std::size_t number_of_isolated_vertices() const { return (this->iso_verts.size()); } /*! obtains an iterator for the first isloated vertex inside the face. */ @@ -986,13 +986,13 @@ protected: typedef In_place_list Inner_ccb_list; typedef In_place_list Iso_vert_list; - typedef std::allocator_traits Allocator_traits; - typedef typename Allocator_traits::template rebind_alloc Vertex_allocator; - typedef typename Allocator_traits::template rebind_alloc Halfedge_allocator; - typedef typename Allocator_traits::template rebind_alloc Face_allocator; - typedef typename Allocator_traits::template rebind_alloc Outer_ccb_allocator; - typedef typename Allocator_traits::template rebind_alloc Inner_ccb_allocator; - typedef typename Allocator_traits::template rebind_alloc Iso_vert_allocator; + typedef std::allocator_traits Allocator_traits; + typedef typename Allocator_traits::template rebind_alloc Vertex_allocator; + typedef typename Allocator_traits::template rebind_alloc Halfedge_allocator; + typedef typename Allocator_traits::template rebind_alloc Face_allocator; + typedef typename Allocator_traits::template rebind_alloc Outer_ccb_allocator; + typedef typename Allocator_traits::template rebind_alloc Inner_ccb_allocator; + typedef typename Allocator_traits::template rebind_alloc Iso_vert_allocator; public: typedef typename Halfedge_list::size_type Size; @@ -1002,7 +1002,6 @@ public: typedef std::bidirectional_iterator_tag iterator_category; protected: - Vertex_list vertices; // The vertices container. Halfedge_list halfedges; // The halfedges container. Face_list faces; // The faces container. From 39192337bdd307f2cc446a6e89dc06aa8116332b Mon Sep 17 00:00:00 2001 From: Efi Fogel Date: Wed, 22 Jan 2025 12:43:33 +0200 Subject: [PATCH 15/63] Fixed extending DCEL records for arrangements with history (and similar derivations of Arrangement_2). --- .../include/CGAL/Arr_extended_dcel.h | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_extended_dcel.h b/Arrangement_on_surface_2/include/CGAL/Arr_extended_dcel.h index da68eb331be..0f9b28f3cdd 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_extended_dcel.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_extended_dcel.h @@ -61,8 +61,10 @@ public: template struct rebind { - using Point_2 = Point_; - using other = typename Vertex_base::template rebind; + using Pnt = Point_; + using Rebind_vertex_base = typename Vertex_base::template rebind; + using Other_vertex_base = typename Rebind_vertex_base::other; + using other = Arr_extended_vertex; }; }; @@ -101,8 +103,10 @@ public: template struct rebind { - using X_monotonote_curve_2 = XMonotoneCurve; - using other = typename Halfedge_base::template rebind; + using Xcv = XMonotoneCurve; + using Rebind_halfedge_base = typename Halfedge_base::template rebind; + using Other_halfedge_base = typename Rebind_halfedge_base::other; + using other = Arr_extended_halfedge; }; }; From 898f933d285c70446e872f3f46e4daef25ca8195 Mon Sep 17 00:00:00 2001 From: Efi Fogel Date: Wed, 22 Jan 2025 13:26:41 +0200 Subject: [PATCH 16/63] Added a comment about a fix of a bug in the Arrangement_on_surface_2 package --- Installation/CHANGES.md | 1 + 1 file changed, 1 insertion(+) diff --git a/Installation/CHANGES.md b/Installation/CHANGES.md index f95d719aa56..bfb5d37f939 100644 --- a/Installation/CHANGES.md +++ b/Installation/CHANGES.md @@ -11,6 +11,7 @@ - Introduces two traits decorators, namely `Arr_tracing_traits_2` and `Arr_counting_traits_2`, which can be used to extract debugging and informative metadata about the traits in use while a program is being executed. - Fixed the Landmark point-location strategy so that it can be applied to arrangements on a sphere. +- Fixed a bug in the extensions of vertex and halfedge types of the DCEL when used to instantiate Arrangement_with_history_2 or similar arrangement classes that derive from Arrangement_2. ## [Release 6.0.1](https://github.com/CGAL/cgal/releases/tag/v6.0.1) From 017dacaf264e854bf6e8a470d8ccddf9d351b1c6 Mon Sep 17 00:00:00 2001 From: Efi Fogel Date: Wed, 22 Jan 2025 14:22:47 +0200 Subject: [PATCH 17/63] Announced the introduction of the new AosApproximatePointTraits_2 concept --- Installation/CHANGES.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Installation/CHANGES.md b/Installation/CHANGES.md index f95d719aa56..1633b57adb8 100644 --- a/Installation/CHANGES.md +++ b/Installation/CHANGES.md @@ -11,6 +11,10 @@ - Introduces two traits decorators, namely `Arr_tracing_traits_2` and `Arr_counting_traits_2`, which can be used to extract debugging and informative metadata about the traits in use while a program is being executed. - Fixed the Landmark point-location strategy so that it can be applied to arrangements on a sphere. +- Renamed the prefix of the names of all concepts in the Arrangement_on_surface_2 package from "Arrangement" to "Aos". +- Renamed the old concept `AosApproximateTraits_2` to `AosApproximatePointTraits_2` to make room for the new concept `AosApproximateTraits_2`. This concept requires the provision of a functor called `Approximate_2` that has an operator that approximates the coordinates of a point. +- Introduced a new concept called `AosApproximateTraits_2`. It refines the concept `AosApproximatePointTraits_2`. This concept requires the provision of a functor called `Approximate_2`. In addition to an operator that approximates the coordinates of a point, it also requires the provision of (i) an operator that approximates a points, and (ii) an operator that approximates a curve. +- Changed all "typedef" style statements in the user manual to "using" style. (Observe that a similar update to the examples has already been made in a previous release.) ## [Release 6.0.1](https://github.com/CGAL/cgal/releases/tag/v6.0.1) From b9915fed106648e813b82946c18c0fd071bd3b9d Mon Sep 17 00:00:00 2001 From: Efi Fogel Date: Wed, 22 Jan 2025 17:09:20 +0200 Subject: [PATCH 18/63] Fixed typo --- .../Arrangement_on_surface_2/Concepts/AosApproximateTraits_2.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosApproximateTraits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosApproximateTraits_2.h index 99fca89cba1..503fbd889e0 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosApproximateTraits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosApproximateTraits_2.h @@ -3,7 +3,7 @@ * * The concept `AosApproximateTraits_2` refines the concept * `AosApproximatePointTraits_2`. A model of this concept is able to - * approximate a point and a curve (in addition to the ability to apprximate the + * approximate a point and a curve (in addition to the ability to approximate the * coordinates of a point). * * \cgalRefines{AosApproximatePointTraits_2} From bf4fce5e610938fbf341f66ceb21acd7f52c1fc6 Mon Sep 17 00:00:00 2001 From: Efi Fogel Date: Thu, 23 Jan 2025 17:23:01 +0200 Subject: [PATCH 19/63] Removed the requirement for Approximate_kernel --- .../Arrangement_on_surface_2.txt | 11 +++++------ .../Concepts/AosApproximateTraits_2.h | 3 --- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Arrangement_on_surface_2.txt b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Arrangement_on_surface_2.txt index 856d074ddc5..e065e920abf 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Arrangement_on_surface_2.txt +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Arrangement_on_surface_2.txt @@ -3573,12 +3573,11 @@ of the curves. The `AosApproximateTraits_2` refines the concept `AosApproximatePointTraits_2`. In addition to the type `Approximate_number_type` required by the latter, a model of the -`AosApproximateTraits_2` concept must define the types -`Approximate_kernel` and `Approximate_point_2`, which are -typically defined as `CGAL::Cartesian` -and `Approximate_kernel::Point_2`, respectively. Also, it -must support the operations below (in addition to the operation -required by the concept `AosApproximatePointTraits_2`). +`AosApproximateTraits_2` concept must define the type +`Approximate_point_2`, which is typically defined as +`CGAL::Cartesian::Point_2`. Also, it must +support the operations below (in addition to the operation required by +the concept `AosApproximatePointTraits_2`).
    \link AosApproximateTraits_2::Approximate_2 `Approximate_2`\endlink: diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosApproximateTraits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosApproximateTraits_2.h index 503fbd889e0..2020e723039 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosApproximateTraits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosApproximateTraits_2.h @@ -24,9 +24,6 @@ public: /// \name Types /// @{ - //! the approximate kernel. - typedef unspecified_type Approximate_kernel; - //! the approximate point. typedef unspecified_type Approximate_point_2; From 207352e7a12d490dd7c6360304e4ef21cd5632d8 Mon Sep 17 00:00:00 2001 From: Efi Fogel Date: Mon, 3 Feb 2025 13:09:22 +0200 Subject: [PATCH 20/63] Fixed typo --- .../doc/Arrangement_on_surface_2/Arrangement_on_surface_2.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Arrangement_on_surface_2.txt b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Arrangement_on_surface_2.txt index 856d074ddc5..05dcb05956f 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Arrangement_on_surface_2.txt +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Arrangement_on_surface_2.txt @@ -3570,7 +3570,7 @@ interior-disjoint \f$x\f$-monotone curves, may result with an arrangement of a different topology, or even worse, intersections in the interior of the curves. -The `AosApproximateTraits_2` refines the concept +The concept `AosApproximateTraits_2` refines the concept `AosApproximatePointTraits_2`. In addition to the type `Approximate_number_type` required by the latter, a model of the `AosApproximateTraits_2` concept must define the types From 73d79f8194422fa135e6573cedff3ca8feff864b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Valque?= Date: Tue, 18 Feb 2025 13:36:55 +0100 Subject: [PATCH 21/63] compare square distance Seg3 Seg3 --- .../CGAL/Distance_3/Segment_3_Segment_3.h | 112 ++++++++++++++++-- .../CGAL/Distance_3/Triangle_3_Triangle_3.h | 42 +++++++ 2 files changed, 146 insertions(+), 8 deletions(-) diff --git a/Distance_3/include/CGAL/Distance_3/Segment_3_Segment_3.h b/Distance_3/include/CGAL/Distance_3/Segment_3_Segment_3.h index ad933787204..12bba07926e 100644 --- a/Distance_3/include/CGAL/Distance_3/Segment_3_Segment_3.h +++ b/Distance_3/include/CGAL/Distance_3/Segment_3_Segment_3.h @@ -59,14 +59,6 @@ squared_distance(const typename K::Segment_3& s1, const Vector_3 v1 = cv(p1, q1), v2 = cv(p2, q2); const Vector_3 p1p2 = cv(p1, p2); - // @todo compute these only when needed? - const FT a = sp(v1, v1); - const FT b = - sp(v1, v2); - const FT c = - b; - const FT d = - sp(v2, v2); - const FT e = sp(v1, p1p2); - const FT f = sp(v2, p1p2); - if(p1 == q1) { if(p2 == q2) @@ -77,6 +69,9 @@ squared_distance(const typename K::Segment_3& s1, return res; } + const FT d = - sp(v2, v2); + const FT f = sp(v2, p1p2); + CGAL_assertion(d < 0); res.x = 0; @@ -87,6 +82,9 @@ squared_distance(const typename K::Segment_3& s1, } else if(p2 == q2) { + const FT a = sp(v1, v1); + const FT e = sp(v1, p1p2); + CGAL_assertion(a > 0); res.y = 0; @@ -96,6 +94,13 @@ squared_distance(const typename K::Segment_3& s1, return res; } + const FT a = sp(v1, v1); + const FT b = - sp(v1, v2); + const FT c = - b; + const FT d = - sp(v2, v2); + const FT e = sp(v1, p1p2); + const FT f = sp(v2, p1p2); + CGAL_assertion(a > 0 && d < 0); const FT det = a*d - b*c; @@ -135,6 +140,97 @@ squared_distance(const typename K::Segment_3& s1, return res; } +// Using Lumelsky, 'On Fast Computation of Distance Between Line Segments' 1984 +template +typename K::Comparison_result +compare_squared_distance(const typename K::Segment_3& s1, + const typename K::Segment_3& s2, + const typename K::FT& dist, + const K& k) +{ + typedef typename K::FT FT; + typedef typename K::Point_3 Point_3; + typedef typename K::Vector_3 Vector_3; + + typename K::Construct_vertex_3 vertex = k.construct_vertex_3_object(); + typename K::Construct_vector_3 cv = k.construct_vector_3_object(); + typename K::Compute_scalar_product_3 sp = k.compute_scalar_product_3_object(); + typename K::Compute_squared_distance_3 sq_dist = k.compute_squared_distance_3_object(); + + const Point_3& p1 = vertex(s1, 0); + const Point_3& q1 = vertex(s1, 1); + const Point_3& p2 = vertex(s2, 0); + const Point_3& q2 = vertex(s2, 1); + const Vector_3 v1 = cv(p1, q1), v2 = cv(p2, q2); + const Vector_3 p1p2 = cv(p1, p2); + + //If degenerate segment, compare distance point segment + if(p1 == q1) + if(p2 == q2) + return compare_square_distance(p1,p2,dist,k); + else + return compare_square_distance(p1,s2,dist,k); + else if(p2 == q2) + return compare_square_distance(s1,p2,dist,k); + + //Compare distance between the lines + const Vector_3 normal = wcross(v1, v2, k); + const Vector_3 diff = p1p2; + + //If the lines are at distance more than d, the segment do not be at distance less than d + typename K::Comparison_result res_ll=compare_squared_distance(v1.supporting_line(), v2.supporting_line(), dist, k); + if(res_ll==LARGER) + return LARGER; //Early exit + + //Compute distance between the segments + //Since we already compare the distance between the lines, we care about only the cases where + //the distance are realized by vertices aka res.x or res.y are 0 or 1 + + const FT a = sp(v1, v1); + const FT b = - sp(v1, v2); + const FT c = - b; + const FT d = - sp(v2, v2); + const FT e = sp(v1, p1p2); + const FT f = sp(v2, p1p2); + + CGAL_assertion(a > 0 && d < 0); + const FT det = a*d - b*c; + const FT res_x; + if(det == 0) + res_x = 0; + else + res_x = boost::algorithm::clamp((e*d - b*f) / det, 0, 1); + + FT xc = res_x*c; + // res.y = (f - xc) / d, by definition, but building it up more efficiently + if(f > xc) // y < 0 <=> f - xc / d < 0 <=> f - xc > 0 (since d is -||v2||) + { + // res_y = 0; + res_x = boost::algorithm::clamp(e/a, 0, 1); // (e + y*c) / a + return compare(sq_dist(p1+res_x*v1,p2), dist); + } + else // y >= 0 + { + FT n = f - xc; // delay the division by d + if(n < d) // y > 1 <=> n / d > 1 <=> n < d (once again, important to note that d is negative!) + { + // res_y = 1; + res_x = boost::algorithm::clamp((e + c) / a, 0, 1); // (e + y*c) / a + return compare(sq_dist(p1+res_x*v1,p2), dist); + } + else if(res_x==0 || res_x==1) // 0 <= y <= 1 + { + FT res_y = n / d; + return compare(sq_dist(p1 + res_x*v1, p2 + res_y*v2), dist); + } + else + { + //Already computed by distance line line + return res_ll; + } + } +} + } // namespace internal } // namespace Distance_3 diff --git a/Distance_3/include/CGAL/Distance_3/Triangle_3_Triangle_3.h b/Distance_3/include/CGAL/Distance_3/Triangle_3_Triangle_3.h index f6bf77fd39b..f5e66c37d21 100644 --- a/Distance_3/include/CGAL/Distance_3/Triangle_3_Triangle_3.h +++ b/Distance_3/include/CGAL/Distance_3/Triangle_3_Triangle_3.h @@ -213,8 +213,50 @@ squared_distance(const typename K::Triangle_3& tr1, #endif } +template +typename K::Comparison_result +compare_squared_distance(const typename K::Triangle_3& tr1, + const typename K::Triangle_3& tr2, + const typename K::FT& d, + const K& k) +{ + typedef typename K::FT FT; + + typename K::Construct_vertex_3 vertex = k.construct_vertex_3_object(); + + bool tr_contains_proj_p=[](const typename K::Triangle_3& tr, const typename K::Point_3 &p) + { + typename K::Point_3 p_proj= tr.supporting_plane().projection(p); + return tr.has_on(p_proj); + }; + + typename K::Comparison_result temp_res(CGAL::LARGER); + + std::pair, bool> ss_res; + for(int i=0; i<3; ++i) + { + for(int j=0; j<3; ++j) + { + if(CGAL::possibly(CGAL::compare_squared_distance(Line_3(vertex(tr1, i%3), vertex(tr1, (i+1)%3)),Line_3(vertex(tr2, j%3), vertex(tr2, (j+1)%3)),d)!=CGAL::LARGER)) + { + typename K::comparison_result res_seg_seg= CGAL::compare_squared_distance(Segment_3(vertex(tr1, i%3), vertex(tr1, (i+1)%3)),Segment_3(vertex(tr2, j%3), vertex(tr2, (j+1)%3)),d); + if(is_certain(res_seg_seg) && res_seg_seg==CGAL::SMALLER) + return CGAL::SMALLER; + } + } + + typename K::comparison_result res_v_pl= CGAL::compare_squared_distance(vertex(tr1, i), tr2.supporting_plane(),d); + if(tr_contains_proj_p(tr2, vertex(tr1, i))) + if(res_v_pl==CGAL::SMALLER) + return CGAL::SMALLER; + + } + +} + } // namespace internal + template inline typename K::FT From d7c9cce0b9693feeba008a82f907545cf455586e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Valque?= Date: Tue, 18 Feb 2025 18:57:48 +0100 Subject: [PATCH 22/63] Compare squared distance with point --- .../include/CGAL/Distance_3/Line_3_Line_3.h | 21 +++ .../include/CGAL/Distance_3/Point_3_Line_3.h | 42 ++++++ .../include/CGAL/Distance_3/Point_3_Plane_3.h | 41 ++++++ .../include/CGAL/Distance_3/Point_3_Point_3.h | 11 ++ .../include/CGAL/Distance_3/Point_3_Ray_3.h | 55 ++++++++ .../CGAL/Distance_3/Point_3_Segment_3.h | 70 +++++++++ .../CGAL/Distance_3/Point_3_Triangle_3.h | 133 ++++++++++++++++++ .../CGAL/Distance_3/Segment_3_Segment_3.h | 20 +-- .../internal/squared_distance_utils_3.h | 10 ++ Distance_3/include/CGAL/squared_distance_3.h | 2 +- .../include/CGAL/Kernel/function_objects.h | 3 +- 11 files changed, 396 insertions(+), 12 deletions(-) diff --git a/Distance_3/include/CGAL/Distance_3/Line_3_Line_3.h b/Distance_3/include/CGAL/Distance_3/Line_3_Line_3.h index 03495be04fa..85f181af18a 100644 --- a/Distance_3/include/CGAL/Distance_3/Line_3_Line_3.h +++ b/Distance_3/include/CGAL/Distance_3/Line_3_Line_3.h @@ -45,6 +45,16 @@ squared_distance(const typename K::Line_3& line1, return squared_distance_to_plane(normal, diff, k); } +template +typename K::Comparison_result +compare_squared_distance(const typename K::Line_3& line1, + const typename K::Line_3& line2, + const K& k, + const typename K::FT& d2) +{ + return compare(squared_distance(line1,line2,k),d2); +} + } // namespace internal template @@ -56,6 +66,17 @@ squared_distance(const Line_3& line1, return K().compute_squared_distance_3_object()(line1, line2); } +template +inline +typename K::Comparison_result +compare_squared_distance(const Line_3& line1, + const Line_3& line2, + const typename K::FT& d2) +{ + return K().compare_squared_distance_3_object()(line1,line2,d2); +} + + } // namespace CGAL #endif // CGAL_DISTANCE_3_LINE_3_LINE_3_H diff --git a/Distance_3/include/CGAL/Distance_3/Point_3_Line_3.h b/Distance_3/include/CGAL/Distance_3/Point_3_Line_3.h index 0d1527c48a7..e202cb3bdd3 100644 --- a/Distance_3/include/CGAL/Distance_3/Point_3_Line_3.h +++ b/Distance_3/include/CGAL/Distance_3/Point_3_Line_3.h @@ -66,6 +66,28 @@ squared_distance(const typename K::Line_3& line, return squared_distance(pt, line, k); } +template +inline +typename K::Comparison_result +compare_squared_distance(const typename K::Point_3& pt, + const typename K::Line_3& line, + const K& k, + const typename K::FT& d2) +{ + return compare(squared_distance(pt, line, k), d2); +} + +template +inline +typename K::Comparison_result +compare_squared_distance(const typename K::Line_3& line, + const typename K::Point_3& pt, + const K& k, + const typename K::FT& d2) +{ + return compare(squared_distance(pt, line, k), d2); +} + } // namespace internal template @@ -86,6 +108,26 @@ squared_distance(const Line_3& line, return K().compute_squared_distance_3_object()(line, pt); } +template +inline +typename K::Comparison_result +compare_squared_distance(const Point_3& pt, + const Line_3& line, + const typename K::FT& d2) +{ + return K().compare_squared_distance_3_object()(pt, line, d2); +} + +template +inline +typename K::Comparison_result +compare_squared_distance(const Line_3& line, + const Point_3& pt, + const typename K::FT& d2) +{ + return K().compare_squared_distance_3_object()(line, pt, d2); +} + } // namespace CGAL #endif // CGAL_DISTANCE_3_POINT_3_LINE_3_H diff --git a/Distance_3/include/CGAL/Distance_3/Point_3_Plane_3.h b/Distance_3/include/CGAL/Distance_3/Point_3_Plane_3.h index 7544a72d963..41107dfac3e 100644 --- a/Distance_3/include/CGAL/Distance_3/Point_3_Plane_3.h +++ b/Distance_3/include/CGAL/Distance_3/Point_3_Plane_3.h @@ -48,6 +48,26 @@ squared_distance(const typename K::Plane_3& plane, return squared_distance(pt, plane, k); } +template +inline typename K::Comparison_result +compare_squared_distance(const typename K::Point_3& pt, + const typename K::Plane_3& plane, + const K& k, + const typename K::FT& d2) +{ + return compare(squared_distance(pt, plane, k), d2); +} + +template +inline typename K::Comparison_result +compare_squared_distance(const typename K::Plane_3& plane, + const typename K::Point_3& pt, + const K& k, + const typename K::FT& d2) +{ + return compare_squared_distance(pt, plane, k, d2); +} + } // namespace internal template @@ -68,6 +88,27 @@ squared_distance(const Plane_3& plane, return K().compute_squared_distance_3_object()(plane, pt); } +template +inline +typename K::Comparison_result +compare_squared_distance(const Point_3& pt, + const Plane_3& pl, + const typename K::FT& d2) +{ + return K().compare_squared_distance_3_object()(pt, pl, d2); +} + +template +inline +typename K::Comparison_result +compare_squared_distance(const Plane_3& pl, + const Point_3& pt, + const typename K::FT& d2) +{ + return K().compare_squared_distance_3_object()(pl, pt, d2); +} + + } // namespace CGAL #endif // CGAL_DISTANCE_3_POINT_3_PLANE_3_H diff --git a/Distance_3/include/CGAL/Distance_3/Point_3_Point_3.h b/Distance_3/include/CGAL/Distance_3/Point_3_Point_3.h index 6b307e571c7..ec5102e8bee 100644 --- a/Distance_3/include/CGAL/Distance_3/Point_3_Point_3.h +++ b/Distance_3/include/CGAL/Distance_3/Point_3_Point_3.h @@ -32,6 +32,17 @@ squared_distance(const typename K::Point_3& pt1, return k.compute_squared_distance_3_object()(pt1, pt2); } +template +inline +typename K::Comparison_result +compare_squared_distance(const typename K::Point_3& pt1, + const typename K::Point_3& pt2, + const K& k, + const typename K::FT& d2) +{ + return compare(k.compute_squared_distance_3_object()(pt1, pt2), d2); +} + } // namespace internal template diff --git a/Distance_3/include/CGAL/Distance_3/Point_3_Ray_3.h b/Distance_3/include/CGAL/Distance_3/Point_3_Ray_3.h index 7eff899b0eb..71332a693b5 100644 --- a/Distance_3/include/CGAL/Distance_3/Point_3_Ray_3.h +++ b/Distance_3/include/CGAL/Distance_3/Point_3_Ray_3.h @@ -87,6 +87,40 @@ squared_distance(const typename K::Ray_3& ray, return squared_distance(pt, ray, k); } +template +typename K::Comparison_result +compare_squared_distance(const typename K::Point_3& pt, + const typename K::Ray_3& ray, + const K& k, + const typename K::FT &d2) +{ + typedef typename K::Vector_3 Vector_3; + + typename K::Construct_vector_3 vector = k.construct_vector_3_object(); + + const Vector_3 dir = ray.direction().vector(); + const Vector_3 diff = vector(ray.source(), pt); + + const typename K::Comparison_result res_pl = compare_squared_distance_to_line(dir, diff, k, d2); + if(res_pl==LARGER) + return LARGER; + + if(!is_acute_angle(dir, diff, k)) + return compare(diff*diff, d2); + + return res_pl; +} + +template +typename K::Comparison_result +compare_squared_distance(const typename K::Ray_3& ray, + const typename K::Point_3& pt, + const K& k, + const typename K::FT &d2) +{ + return compare_squared_distance(pt, ray, k, d2); +} + } // namespace internal template @@ -107,6 +141,27 @@ squared_distance(const Ray_3& ray, return K().compute_squared_distance_3_object()(ray, pt); } +template +inline +typename K::Comparison_result +compare_squared_distance(const Point_3& pt, + const Ray_3& ray, + const typename K::FT& d2) +{ + return K().compare_squared_distance_3_object()(pt, ray, d2); +} + +template +inline +typename K::Comparison_result +compare_squared_distance(const Ray_3& ray, + const Point_3& pt, + const typename K::FT& d2) +{ + return K().compare_squared_distance_3_object()(ray, pt, d2); +} + + } // namespace CGAL #endif // CGAL_DISTANCE_3_POINT_3_RAY_3_H diff --git a/Distance_3/include/CGAL/Distance_3/Point_3_Segment_3.h b/Distance_3/include/CGAL/Distance_3/Point_3_Segment_3.h index 554c0a58d2d..5188a13622a 100644 --- a/Distance_3/include/CGAL/Distance_3/Point_3_Segment_3.h +++ b/Distance_3/include/CGAL/Distance_3/Point_3_Segment_3.h @@ -108,6 +108,56 @@ squared_distance(const typename K::Segment_3& seg, return squared_distance(pt, seg, k); } +template +typename K::Comparison_result +compare_squared_distance(const typename K::Point_3& pt, + const typename K::Segment_3& seg, + const K& k, + const typename K::FT &d2) +{ + typedef typename K::RT RT; + typedef typename K::FT FT; + typedef typename K::Vector_3 Vector_3; + + typename K::Construct_vector_3 vector = k.construct_vector_3_object(); + + // assert that the segment is valid (non zero length). + + const Vector_3 diff = vector(seg.source(), pt); + const Vector_3 segvec = vector(seg.source(), seg.target()); + + //We first compare the distance of the point and the line + const typename K::Comparison_result res_pl= compare_squared_distance_to_line(segvec, diff, k, d2); + + //If greater than d2, we early exit + if(res_pl==LARGER) + return LARGER; + + //If distance is realized by the source + const RT d = wdot(diff, segvec, k); + if(d <= RT(0)) + return compare(FT(diff*diff), d2); + + //If distance is realized by the target + const RT e = wdot(segvec, segvec, k); + if(wmult((K*)0, d, segvec.hw()) > wmult((K*)0, e, diff.hw())) + return compare_squared_distance(pt, seg.target(), k, d2); + + //If distance is realized by the interior, it is equal to the one of the line + return res_pl; +} + +template +inline +typename K::Comparison_result +compare_squared_distance(const typename K::Segment_3& seg, + const typename K::Point_3& pt, + const K& k, + const typename K::FT &d2) +{ + return compare_squared_distance(pt, seg, k, d2); +} + } // namespace internal template @@ -128,6 +178,26 @@ squared_distance(const Segment_3& seg, return K().compute_squared_distance_3_object()(seg, pt); } +template +inline +typename K::Comparison_result +compare_squared_distance(const Point_3& pt, + const Segment_3& seg, + const typename K::FT &d2) +{ + return K().compare_squared_distance_3_object()(pt, seg, d2); +} + +template +inline +typename K::Comparison_result +compare_squared_distance(const Segment_3& seg, + const Point_3& pt, + const typename K::FT &d2) +{ + return K().compare_squared_distance_3_object()(seg, pt, d2); +} + } // namespace CGAL #endif // CGAL_DISTANCE_3_POINT_3_SEGMENT_3_H diff --git a/Distance_3/include/CGAL/Distance_3/Point_3_Triangle_3.h b/Distance_3/include/CGAL/Distance_3/Point_3_Triangle_3.h index 8b58e9a81a6..18de39c4024 100644 --- a/Distance_3/include/CGAL/Distance_3/Point_3_Triangle_3.h +++ b/Distance_3/include/CGAL/Distance_3/Point_3_Triangle_3.h @@ -292,6 +292,118 @@ squared_distance(const typename K::Triangle_3& t, return squared_distance(pt, t, k); } +template +inline typename K::Comparison_result +compare_squared_distance_to_triangle(const typename K::Point_3& pt, + const typename K::Point_3& t0, + const typename K::Point_3& t1, + const typename K::Point_3& t2, + const K& k, + const typename K::Ft &d2, + bool& inside) +{ + // typedef typename K::Vector_3 Vector_3; + + // typename K::Construct_segment_3 segment = k.construct_segment_3_object(); + // typename K::Construct_vector_3 vector = k.construct_vector_3_object(); + // typename K::Compute_squared_distance_3 sq_dist = k.compute_squared_distance_3_object(); + + // const Vector_3 e1 = vector(t0, t1); + // const Vector_3 oe3 = vector(t0, t2); + // const Vector_3 normal = wcross(e1, oe3, k); + + // if(normal == NULL_VECTOR) + // { + // // The case normal == NULL_VECTOR covers the case when the triangle + // // is colinear, or even more degenerate. In that case, we can + // // simply take also the distance to the three segments. + // // + // // Note that in the degenerate case, at most 2 edges cover the full triangle, + // // and only two distances could be used, but leaving 3 for the case of + // // inexact constructions as it might improve the accuracy. + // typename K::FT d1 = sq_dist(pt, segment(t2, t0)); + // typename K::FT d2 = sq_dist(pt, segment(t1, t2)); + // typename K::FT d3 = sq_dist(pt, segment(t0, t1)); + + // return (std::min)((std::min)(d1, d2), d3); + // } + + // if(!on_left_of_triangle_edge(pt, normal, t0, t1, k)) + // { + // if(!on_left_of_triangle_edge(pt, normal, t1, t2, k)) + // { + // // can't be to the right of all three segments + // return (std::min)(sq_dist(pt, segment(t0, t1)), sq_dist(pt, segment(t1, t2))); + // } + // else // on_left_of_triangle_edge(pt, normal, t1, t2, k) + // { + // if(!on_left_of_triangle_edge(pt, normal, t2, t0, k)) + // { + // return (std::min)(sq_dist(pt, segment(t0, t1)), sq_dist(pt, segment(t2, t0))); + // } + // else // on_left_of_triangle_edge(pt, normal, t2, t0, k) + // { + // return sq_dist(pt, segment(t0, t1)); + // } + // } + // } + // else // on_left_of_triangle_edge(pt, normal, t0, t1, k) + // { + // if(!on_left_of_triangle_edge(pt, normal, t1, t2, k)) + // { + // if(!on_left_of_triangle_edge(pt, normal, t2, t0, k)) + // { + // return (std::min)(sq_dist(pt, segment(t1, t2)), sq_dist(pt, segment(t2, t0))); + // } + // else // on_left_of_triangle_edge(pt, normal, t2, t0, k) + // { + // return sq_dist(pt, segment(t1, t2)); + // } + // } + // else // on_left_of_triangle_edge(pt, normal, t1, t2, k) + // { + // if(!on_left_of_triangle_edge(pt, normal, t2, t0, k)) + // { + // return sq_dist(pt, segment(t2, t0)); + // } + // else // on_left_of_triangle_edge(pt, normal, t2, t0, k) + // { + // inside = true; + // return squared_distance_to_plane(normal, vector(t0, pt), k); + // } + // } + // } +} + +template +typename K::Comparison_result +compute_squared_distance(const typename K::Point_3& pt, + const typename K::Triangle_3& t, + const K& k, + const typename K::FT& d2) +{ + typename K::Construct_vertex_3 vertex = k.construct_vertex_3_object(); + + bool unused_inside = false; + return compare_squared_distance_to_triangle(pt, + vertex(t, 0), + vertex(t, 1), + vertex(t, 2), + k, + d2, + unused_inside); +} + +template +typename K::Comparison_result +compute_squared_distance(const typename K::Triangle_3& t, + const typename K::Point_3& pt, + const K& k, + const typename K::FT& d2) +{ + return compute_squared_distance(pt, t, k, d2); +} + } // namespace internal template @@ -303,6 +415,7 @@ squared_distance(const Point_3& pt, return K().compute_squared_distance_3_object()(pt, t); } + template inline typename K::FT @@ -312,6 +425,26 @@ squared_distance(const Triangle_3& t, return K().compute_squared_distance_3_object()(t, pt); } +template +inline +typename K::Comparison_result +compare_squared_distance(const Point_3& pt, + const Triangle_3& t, + const typename K::FT& d2) +{ + return K().compare_squared_distance_3_object()(pt, t, d2); +} + +template +inline +typename K::Comparison_result +compare_squared_distance(const Triangle_3& t, + const Point_3& pt, + const typename K::FT &d2) +{ + return K().compare_squared_distance_3_object()(t, pt, d2); +} + } // namespace CGAL #endif // CGAL_DISTANCE_3_POINT_3_TRIANGLE_3_H diff --git a/Distance_3/include/CGAL/Distance_3/Segment_3_Segment_3.h b/Distance_3/include/CGAL/Distance_3/Segment_3_Segment_3.h index 12bba07926e..e993eb94ba8 100644 --- a/Distance_3/include/CGAL/Distance_3/Segment_3_Segment_3.h +++ b/Distance_3/include/CGAL/Distance_3/Segment_3_Segment_3.h @@ -145,8 +145,8 @@ template typename K::Comparison_result compare_squared_distance(const typename K::Segment_3& s1, const typename K::Segment_3& s2, - const typename K::FT& dist, - const K& k) + const K& k, + const typename K::FT& d2) { typedef typename K::FT FT; typedef typename K::Point_3 Point_3; @@ -164,21 +164,21 @@ compare_squared_distance(const typename K::Segment_3& s1, const Vector_3 v1 = cv(p1, q1), v2 = cv(p2, q2); const Vector_3 p1p2 = cv(p1, p2); - //If degenerate segment, compare distance point segment + //If degenerate segment, compare distance between the point and the other segment if(p1 == q1) if(p2 == q2) - return compare_square_distance(p1,p2,dist,k); + return compare_square_distance(p1,p2,k,d2); else - return compare_square_distance(p1,s2,dist,k); + return compare_square_distance(p1,s2,k,d2); else if(p2 == q2) - return compare_square_distance(s1,p2,dist,k); + return compare_square_distance(s1,p2,k,d2); //Compare distance between the lines const Vector_3 normal = wcross(v1, v2, k); const Vector_3 diff = p1p2; //If the lines are at distance more than d, the segment do not be at distance less than d - typename K::Comparison_result res_ll=compare_squared_distance(v1.supporting_line(), v2.supporting_line(), dist, k); + typename K::Comparison_result res_ll=compare_squared_distance(v1.supporting_line(), v2.supporting_line(), k, d2); if(res_ll==LARGER) return LARGER; //Early exit @@ -207,7 +207,7 @@ compare_squared_distance(const typename K::Segment_3& s1, { // res_y = 0; res_x = boost::algorithm::clamp(e/a, 0, 1); // (e + y*c) / a - return compare(sq_dist(p1+res_x*v1,p2), dist); + return compare(sq_dist(p1+res_x*v1,p2), d2); } else // y >= 0 { @@ -216,12 +216,12 @@ compare_squared_distance(const typename K::Segment_3& s1, { // res_y = 1; res_x = boost::algorithm::clamp((e + c) / a, 0, 1); // (e + y*c) / a - return compare(sq_dist(p1+res_x*v1,p2), dist); + return compare(sq_dist(p1+res_x*v1,p2), d2); } else if(res_x==0 || res_x==1) // 0 <= y <= 1 { FT res_y = n / d; - return compare(sq_dist(p1 + res_x*v1, p2 + res_y*v2), dist); + return compare(sq_dist(p1 + res_x*v1, p2 + res_y*v2), d2); } else { diff --git a/Distance_3/include/CGAL/Distance_3/internal/squared_distance_utils_3.h b/Distance_3/include/CGAL/Distance_3/internal/squared_distance_utils_3.h index 7dbf82e246e..38844ecab54 100644 --- a/Distance_3/include/CGAL/Distance_3/internal/squared_distance_utils_3.h +++ b/Distance_3/include/CGAL/Distance_3/internal/squared_distance_utils_3.h @@ -221,6 +221,16 @@ squared_distance_to_line(const typename K::Vector_3& dir, return Rational_traits().make_rational(num, den); } +template +typename K::Comparison_result +compare_squared_distance_to_line(const typename K::Vector_3& dir, + const typename K::Vector_3& diff, + const K& k, + const typename K::FT &d2) +{ + return compare(squared_distance_to_line(dir,diff,k),d2); +} + template inline bool diff --git a/Distance_3/include/CGAL/squared_distance_3.h b/Distance_3/include/CGAL/squared_distance_3.h index 69436bbe6dc..1cf8feb0bfc 100644 --- a/Distance_3/include/CGAL/squared_distance_3.h +++ b/Distance_3/include/CGAL/squared_distance_3.h @@ -20,9 +20,9 @@ #include #include +#include #include #include -#include #include #include #include diff --git a/Kernel_23/include/CGAL/Kernel/function_objects.h b/Kernel_23/include/CGAL/Kernel/function_objects.h index c49094aefb2..f88a4ea4c2b 100644 --- a/Kernel_23/include/CGAL/Kernel/function_objects.h +++ b/Kernel_23/include/CGAL/Kernel/function_objects.h @@ -937,7 +937,8 @@ namespace CommonKernelFunctors { Needs_FT operator()(const T1& p, const T2& q, const FT& d2) const { - return CGAL::compare(internal::squared_distance(p, q, K()), d2); + // return CGAL::compare(internal::squared_distance(p, q, K()), d2); + return internal::compare_squared_distance(p, q, K(), d2); } template From 8bdc4b4f5d25035083e98ef7fcc9c52387869a97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Valque?= Date: Wed, 19 Feb 2025 11:55:57 +0100 Subject: [PATCH 23/63] add test_compare_distance_3.cpp --- .../CGAL/Distance_3/Point_3_Triangle_3.h | 2 +- .../Distance_3/test_compare_distance_3.cpp | 698 ++++++++++++++++++ 2 files changed, 699 insertions(+), 1 deletion(-) create mode 100644 Distance_3/test/Distance_3/test_compare_distance_3.cpp diff --git a/Distance_3/include/CGAL/Distance_3/Point_3_Triangle_3.h b/Distance_3/include/CGAL/Distance_3/Point_3_Triangle_3.h index 18de39c4024..02002ff2600 100644 --- a/Distance_3/include/CGAL/Distance_3/Point_3_Triangle_3.h +++ b/Distance_3/include/CGAL/Distance_3/Point_3_Triangle_3.h @@ -293,7 +293,7 @@ squared_distance(const typename K::Triangle_3& t, } template -inline typename K::Comparison_result +typename K::Comparison_result compare_squared_distance_to_triangle(const typename K::Point_3& pt, const typename K::Point_3& t0, const typename K::Point_3& t1, diff --git a/Distance_3/test/Distance_3/test_compare_distance_3.cpp b/Distance_3/test/Distance_3/test_compare_distance_3.cpp new file mode 100644 index 00000000000..dfc2e1c8ae9 --- /dev/null +++ b/Distance_3/test/Distance_3/test_compare_distance_3.cpp @@ -0,0 +1,698 @@ +#include +#include +#include +#include +#include +#include + +#include + +#include +#include + +// #define CGAL_USE_GTE_AS_SANITY_CHECK +#ifdef CGAL_USE_GTE_AS_SANITY_CHECK +#include +#include +#endif + +#include +#include + +struct randomint +{ + randomint() ; + int get() const { return sequence[cur]; } + int next() { + cur = (cur + 1) % 11; + return get(); + } + +private: + int sequence[11]; + int cur; +}; + +inline randomint::randomint() +{ + cur = 0; + sequence[0] = 19; + sequence[1] = 5; + sequence[2] = 17; + sequence[3] = 13; + sequence[4] = 29; + sequence[5] = 2; + sequence[6] = 23; + sequence[7] = 31; + sequence[8] = 3; + sequence[9] = 37; + sequence[10] = 11; +} + +randomint ri; + +template +struct Test +{ + typedef typename K::RT RT; + typedef typename K::FT FT; + typedef typename K::Comparison_result Comparison_result; + typedef typename K::Point_3 P; + typedef typename K::Segment_3 S; + typedef typename K::Vector_3 V; + typedef typename K::Ray_3 R; + typedef typename K::Line_3 L; + typedef typename K::Triangle_3 T; + typedef typename K::Plane_3 Pl; + typedef typename K::Tetrahedron_3 Tet; + typedef typename K::Iso_cuboid_3 Cub; + +private: + CGAL::Random& r; + const double epsilon = 1e-14; + int N = 10; + double m = 0, M = 1; + +public: + Test(CGAL::Random& r, const double epsilon) : r(r), epsilon(epsilon) { } + +private: + inline RT to_nt(int d) const { return RT(d); } + + P p(int x, int y, int z) + { + int w = ri.next(); + return P(to_nt(x*w), to_nt(y*w), to_nt(z*w), to_nt(w)); + } + + P random_point() const + { + return P(FT(r.get_double(m, M)), FT(r.get_double(m, M)), FT(r.get_double(m, M))); + } + + Pl pl(int a, int b, int c, int d) + { + int w = ri.next(); + return Pl(to_nt(a*w), to_nt(b*w), to_nt(c*w), to_nt(d*w)); + } + +private: + template + bool are_equal(const Type& t1, const Type& t2, const bool verbose = true) + { + const FT diff = CGAL::abs(t1 - t2); + if(diff > std::numeric_limits::epsilon() && + diff > epsilon * (CGAL::abs(t1) + CGAL::abs(t2))) + { + if(verbose) + { + std::cerr << "Approximate comparison failed (t1|t2): got " << t1 << " but expected " << t2 << std::endl; + std::cerr << "Diff: " << CGAL::abs(t1 - t2) << " vs eps: " << epsilon * (CGAL::abs(t1) + CGAL::abs(t2)) << std::endl; + } + return false; + } + + return true; + } + + template + void check_compare_squared_distance(const O1& o1, const O2& o2, const FT& d, const Comparison_result& expected_result) + { + const FT res_o1o2 = CGAL::compare_squared_distance(o1, o2, d); + const FT res_o2o1 = CGAL::compare_squared_distance(o2, o1, d); + + assert(res_o1o2 == expected_result); + assert(res_o2o1 == expected_result); + } + +private: + void P_P() + { + std::cout << "Point - Point" << std::endl; + check_compare_squared_distance(p(0, 0, 0), p(0, 0, 0), 0, CGAL::EQUAL); + check_compare_squared_distance(p(0, 0, 0), p(0, 0, 0), 1, CGAL::SMALLER); + check_compare_squared_distance(p(3, 5, 7), p(0, 0, 0), 83, CGAL::EQUAL); + check_compare_squared_distance(p(3, 5, 7), p(0, 0, 0), 80, CGAL::LARGER); + } + + void P_S() + { + std::cout << "Point - Segment" << std::endl; + check_compare_squared_distance(p(0, 1, 2), S{p(-3, 0, 0), p( 2, 0, 0)}, 4, CGAL::LARGER); + check_compare_squared_distance(p(0, 1, 2), S{p(-3, 0, 0), p( 2, 0, 0)}, 5, CGAL::EQUAL); + check_compare_squared_distance(p(0, 1, 2), S{p(-3, 0, 0), p( 2, 0, 0)}, 6, CGAL::SMALLER); + + check_compare_squared_distance(p(0, 1, 2), S{p( 3, 0, 0), p( 2, 0, 0)}, 8, CGAL::LARGER); + check_compare_squared_distance(p(0, 1, 2), S{p( 3, 0, 0), p( 2, 0, 0)}, 9, CGAL::EQUAL); + check_compare_squared_distance(p(0, 1, 2), S{p( 3, 0, 0), p( 2, 0, 0)}, 10, CGAL::SMALLER); + check_compare_squared_distance(p(0, 1, 2), S{p( 2, 0, 0), p( 3, 0, 0)}, 10, CGAL::SMALLER); + + check_compare_squared_distance(p(6, 1, 2), S{p( 2, 0, 0), p( 3, 0, 0)}, 13, CGAL::LARGER); + check_compare_squared_distance(p(6, 1, 2), S{p( 2, 0, 0), p( 3, 0, 0)}, 14, CGAL::EQUAL); + check_compare_squared_distance(p(6, 1, 2), S{p( 2, 0, 0), p( 3, 0, 0)}, 15, CGAL::SMALLER); + } + +// void P_T() +// { +// std::cout << "Point - Triangle" << std::endl; +// check_squared_distance(p(0, 1, 2), T{p(0, 0, 0), p(2, 0, 0), p(0, 2, 0)}, 4); + +// T t(p(0,0,0), p(3,0,0), p(3,3,0)); +// check_squared_distance (p(-1, -1, 0), t, 2); +// check_squared_distance (p(-1, 0, 0), t, 1); +// check_squared_distance (p(0, 0, 0), t, 0); +// check_squared_distance (p(1, 0, 0), t, 0); +// check_squared_distance (p(4, 0, 0), t, 1); +// check_squared_distance (p(1, -1, 0), t, 1); +// check_squared_distance (p(1, 1, 1), t, 1); +// check_squared_distance (p(1, 0, 1), t, 1); +// check_squared_distance (p(0, 0, 1), t, 1); + +// // Degenerate +// check_squared_distance (p(1, 2, 3), T(p(4,3,2), p(4,3,2), p(4,3,2)), squared_distance(p(1, 2, 3), p(4,3,2))); +// check_squared_distance (p(1, 2, 3), T(p(4,3,2), p(10,12,3), p(4,3,2)), squared_distance(p(1, 2, 3), p(4,3,2))); +// check_squared_distance (p(0, 0, 0), T(p(4,3,2), p(4,-3,-2), p(4,3,2)), squared_distance(p(0, 0, 0), p(4,0,0))); + +// // On the triangle +// check_squared_distance (p(7, 1, -5), T(p(2,9,8), p(-4,-3,-5), p(7, 1, -5)), 0); // vertex +// check_squared_distance (p(7, 1, -5), T(p(14,2,-10), p(-7,-1,5), p(8, 3, -1)), 0); // edge +// check_squared_distance (p(1, 4, -3), T(p(0,-8,-3), p(-5,14,-3), p(10, 1, -3)), 0); // face + +// // General +// check_squared_distance (p(-15, 1, 0), T(p(-10, 1, 0), p(0,0,0), p(10,0,0)), 25); +// check_squared_distance (p(-5, 0, 0), T(p(-10, 1, 0), p(0,0,0), p(10,0,0)), squared_distance(p(-5, 0, 0), S(p(-10, 1, 0), p(0,0,0)))); +// check_squared_distance (p(0, -3, 0), T(p(-10, 1, 0), p(0,0,0), p(10,0,0)), 9); +// check_squared_distance (p(3, -3, 0), T(p(-10, 1, 0), p(0,0,0), p(10,0,0)), squared_distance(p(3, -3, 0), S(p(0,0,0), p(10,0,0)))); +// check_squared_distance (p(16, 1, 1), T(p(-10, 1, 0), p(0,0,0), p(10,0,0)), 38); +// check_squared_distance (p(5, 5, 2), T(p(-10, 1, 0), p(0,0,0), p(10,0,0)), squared_distance(p(5, 5, 2), S(p(10,0,0), p(-10,1,0)))); + +// for(int i=0; i1) in the code +// for(int j=-2;j<4; j+=2) +// { +// for(int k=-3;k<3; k+=2) +// { +// P p2{j, k, z}; +// P p3{j, k+2, z}; + +// // to explicit the expected distances +// if(j == -2 && k == -3) +// check_squared_distance(S{p0, p1}, S{p2, p3}, CGAL::squared_distance(p3, p0)); +// else if(j == -2 && k == -1) +// check_squared_distance(S{p0, p1}, S{p2, p3}, 1); +// else if(j == -2 && k == 1) +// check_squared_distance(S{p0, p1}, S{p2, p3}, CGAL::squared_distance(p2, p0)); +// else if(j == 0 && k == -3) +// check_squared_distance(S{p0, p1}, S{p2, p3}, 1); +// else if(j == 0 && k == -1) +// check_squared_distance(S{p0, p1}, S{p2, p3}, 0); +// else if(j == 0 && k == 1) +// check_squared_distance(S{p0, p1}, S{p2, p3}, 1); +// else if(j == 2 && k == -3) +// check_squared_distance(S{p0, p1}, S{p2, p3}, CGAL::squared_distance(p3, p1)); +// else if(j == 2 && k == -1) +// check_squared_distance(S{p0, p1}, S{p2, p3}, 1); +// else if(j == 2 && k == 1) +// check_squared_distance(S{p0, p1}, S{p2, p3}, CGAL::squared_distance(p2, p1)); +// } +// } + +// for(int i=0; i, gte::Segment<3, FT> > GTE_SS_checker; +// gte::Segment<3, FT> gte_s1{{p8.x(), p8.y(), p8.z()}, {p9.x(), p9.y(), p9.z()}}; +// gte::Segment<3, FT> gte_s2{{p3.x(), p3.y(), p3.z()}, {p2.x(), p2.y(), p2.z()}}; +// auto gte_res = GTE_SS_checker(gte_s1, gte_s2); +// std::cout << "-------" << std::endl; +// std::cout << "old: " << CGAL::internal::squared_distance_old(s89, s32, K()) << std::endl; +// std::cout << "dist (GTE) : " << gte_res.sqrDistance << std::endl; +// #endif + +// // Because do_intersect() with constructions is likely to return 'false' even for overlaps +// assert(are_equal(CGAL::squared_distance(s89, s32), result, false /*verbose*/) || +// are_equal(CGAL::squared_distance(s32, s89), FT(0))); +// } + +// // completely generic +// S s1{p0, p1}, s2{p2, p3}; +// do_intersect_check(s1, s2); + +// #ifdef CGAL_USE_GTE_AS_SANITY_CHECK +// gte::DCPQuery, gte::Segment<3, FT> > GTE_SS_checker; +// gte::Segment<3, FT> gte_s1{{p0.x(), p0.y(), p0.z()}, {p1.x(), p1.y(), p1.z()}}; +// gte::Segment<3, FT> gte_s2{{p2.x(), p2.y(), p2.z()}, {p3.x(), p3.y(), p3.z()}}; +// auto gte_res = GTE_SS_checker(gte_s1, gte_s2); + +// std::cout << "dist (CGAL) : " << CGAL::squared_distance(s1, s2) << std::endl; +// std::cout << "dist (GTE) : " << gte_res.sqrDistance << std::endl; +// assert(are_equal(CGAL::squared_distance(s1, s2), gte_res.sqrDistance)); +// #endif +// } + +// // a few brute force checks: sample a segments and use squared_distance(P3, S3) +// for(int i=0; i<10; ++i) +// { +// P p0 = random_point(); +// P p1 = random_point(); +// P p2 = random_point(); +// P p3 = random_point(); + +// S s01{p0, p1}; +// S s23{p2, p3}; + +// FT upper_bound = CGAL::squared_distance(p0, p2); + +// V p01 = V{p0, p1} / FT(N); +// for(int l=0; l, gte::Triangle3 > GTE_TT_checker; +// gte::Triangle3 gte_tr1{{p0.x(), p0.y(), p0.z()}, {p1.x(), p1.y(), p1.z()}, {p2.x(), p2.y(), p2.z()}}; +// gte::Triangle3 gte_tr2{{p3.x(), p3.y(), p3.z()}, {p4.x(), p4.y(), p4.z()}, {p5.x(), p5.y(), p5.z()}}; +// auto gte_res = GTE_TT_checker(gte_tr1, gte_tr2); + +// std::cout << "dist (CGAL) : " << CGAL::squared_distance(tr1, tr2) << std::endl; +// std::cout << "dist (GTE) : " << gte_res.sqrDistance << std::endl; +// std::cout << "diff CGAL GTE : " << (gte_res.sqrDistance - CGAL::squared_distance(tr1, tr2)) << std::endl; + +// // don't assert on purpose, GTE has slightly (10^-30 different results, even with an exact NT) +// are_equal(CGAL::squared_distance(tr1, tr2), gte_res.sqrDistance); +// #endif +// } +// } + +public: + void run() + { + std::cout << "Kernel: " << typeid(K).name() << std::endl; + + P_P(); + P_S(); + P_R(); + P_L(); + // P_T(); + P_Pl(); + // P_Tet(); + + // S_S(); + // S_R(); + // S_L(); + // S_Pl(); + + // R_R(); + // R_L(); + // R_Pl(); + + L_L(); + // L_Pl(); + + // T_T(); + + // Pl_Pl(); + } +}; + +int main() +{ + std::cout.precision(17); + std::cerr.precision(17); + + std::cout << "3D Distance tests" << std::endl; + + CGAL::Random r; + std::cout << "random seed = " << r.get_seed() << std::endl; + + // @todo Some tests are too difficult for these kernels +// Test >(r, 1e-5).run(); +// Test >(r, 1e-5).run(); +// Test > >(r, 1e-5).run(); + + Test >(r, 0).run(); + + const double epick_eps = 10 * std::numeric_limits::epsilon(); + Test(r, epick_eps).run(); + + Test(r, 0).run(); + + std::cout << "Done!" << std::endl; + + return EXIT_SUCCESS; +} From 0436efa118e780c80fd02ceb2e960ef6fede0a83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Valque?= Date: Wed, 19 Feb 2025 19:26:09 +0100 Subject: [PATCH 24/63] macro for global_function_distance --- .../include/CGAL/Distance_3/Line_3_Line_3.h | 20 - .../include/CGAL/Distance_3/Line_3_Plane_3.h | 38 +- .../include/CGAL/Distance_3/Plane_3_Plane_3.h | 15 +- .../include/CGAL/Distance_3/Point_3_Line_3.h | 40 +- .../include/CGAL/Distance_3/Point_3_Plane_3.h | 43 +- .../include/CGAL/Distance_3/Point_3_Point_3.h | 9 - .../include/CGAL/Distance_3/Point_3_Ray_3.h | 40 +- .../CGAL/Distance_3/Point_3_Segment_3.h | 57 +- .../CGAL/Distance_3/Segment_3_Segment_3.h | 198 +++--- .../CGAL/Distance_3/Triangle_3_Triangle_3.h | 10 +- .../CGAL/global_functions_distance_3.h | 99 +++ Distance_3/include/CGAL/squared_distance_3.h | 2 + .../Distance_3/test_compare_distance_3.cpp | 668 +++++++++--------- .../include/CGAL/Kernel/function_objects.h | 6 +- .../include/CGAL/Kernel/global_functions_3.h | 10 - 15 files changed, 584 insertions(+), 671 deletions(-) create mode 100644 Distance_3/include/CGAL/global_functions_distance_3.h diff --git a/Distance_3/include/CGAL/Distance_3/Line_3_Line_3.h b/Distance_3/include/CGAL/Distance_3/Line_3_Line_3.h index 85f181af18a..a27c6b7aaa6 100644 --- a/Distance_3/include/CGAL/Distance_3/Line_3_Line_3.h +++ b/Distance_3/include/CGAL/Distance_3/Line_3_Line_3.h @@ -57,26 +57,6 @@ compare_squared_distance(const typename K::Line_3& line1, } // namespace internal -template -inline -typename K::FT -squared_distance(const Line_3& line1, - const Line_3& line2) -{ - return K().compute_squared_distance_3_object()(line1, line2); -} - -template -inline -typename K::Comparison_result -compare_squared_distance(const Line_3& line1, - const Line_3& line2, - const typename K::FT& d2) -{ - return K().compare_squared_distance_3_object()(line1,line2,d2); -} - - } // namespace CGAL #endif // CGAL_DISTANCE_3_LINE_3_LINE_3_H diff --git a/Distance_3/include/CGAL/Distance_3/Line_3_Plane_3.h b/Distance_3/include/CGAL/Distance_3/Line_3_Plane_3.h index 6bb4d125c59..df4a14ef8ed 100644 --- a/Distance_3/include/CGAL/Distance_3/Line_3_Plane_3.h +++ b/Distance_3/include/CGAL/Distance_3/Line_3_Plane_3.h @@ -61,26 +61,28 @@ squared_distance(const typename K::Plane_3& pl, return squared_distance(l, pl, k); } +template +inline typename K::Comparison_result +compare_squared_distance(const typename K::Line_3& l, + const typename K::Plane_3& pl, + const K& k, + const typename K::FT& d2) +{ + return compare(squared_distance(l, pl, k), d2); +} + +template +inline typename K::Comparison_result +compare_squared_distance(const typename K::Plane_3& pl, + const typename K::Line_3& l, + const K& k, + const typename K::FT& d2) +{ + return compare_squared_distance(l, pl, k, d2); +} + } // namespace internal -template -inline -typename K::FT -squared_distance(const Line_3& line, - const Plane_3& plane) -{ - return K().compute_squared_distance_3_object()(line, plane); -} - -template -inline -typename K::FT -squared_distance(const Plane_3& plane, - const Line_3& line) -{ - return K().compute_squared_distance_3_object()(plane, line); -} - } // namespace CGAL #endif // CGAL_DISTANCE_3_LINE_3_PLANE_3_H diff --git a/Distance_3/include/CGAL/Distance_3/Plane_3_Plane_3.h b/Distance_3/include/CGAL/Distance_3/Plane_3_Plane_3.h index d18fb366b7f..4ddb7ad1702 100644 --- a/Distance_3/include/CGAL/Distance_3/Plane_3_Plane_3.h +++ b/Distance_3/include/CGAL/Distance_3/Plane_3_Plane_3.h @@ -39,17 +39,18 @@ squared_distance(const typename K::Plane_3& plane1, return sq_dist(plane1.point(), plane2); } -} // namespace internal - template -inline -typename K::FT -squared_distance(const Plane_3& plane1, - const Plane_3& plane2) +inline typename K::Comparison_result +compare_squared_distance(const typename K::Plane_3& plane1, + const typename K::Plane_3& plane2, + const K& k, + const typename K::FT& d2) { - return K().compute_squared_distance_3_object()(plane1, plane2); + return compare(squared_distance(plane1,plane2,k), d2); } +} // namespace internal + } // namespace CGAL #endif // CGAL_DISTANCE_3_PLANE_3_PLANE_3_H diff --git a/Distance_3/include/CGAL/Distance_3/Point_3_Line_3.h b/Distance_3/include/CGAL/Distance_3/Point_3_Line_3.h index e202cb3bdd3..b265894c910 100644 --- a/Distance_3/include/CGAL/Distance_3/Point_3_Line_3.h +++ b/Distance_3/include/CGAL/Distance_3/Point_3_Line_3.h @@ -85,49 +85,11 @@ compare_squared_distance(const typename K::Line_3& line, const K& k, const typename K::FT& d2) { - return compare(squared_distance(pt, line, k), d2); + return compare_squared_distance(pt, line, k, d2); } } // namespace internal -template -inline -typename K::FT -squared_distance(const Point_3& pt, - const Line_3& line) -{ - return K().compute_squared_distance_3_object()(pt, line); -} - -template -inline -typename K::FT -squared_distance(const Line_3& line, - const Point_3& pt) -{ - return K().compute_squared_distance_3_object()(line, pt); -} - -template -inline -typename K::Comparison_result -compare_squared_distance(const Point_3& pt, - const Line_3& line, - const typename K::FT& d2) -{ - return K().compare_squared_distance_3_object()(pt, line, d2); -} - -template -inline -typename K::Comparison_result -compare_squared_distance(const Line_3& line, - const Point_3& pt, - const typename K::FT& d2) -{ - return K().compare_squared_distance_3_object()(line, pt, d2); -} - } // namespace CGAL #endif // CGAL_DISTANCE_3_POINT_3_LINE_3_H diff --git a/Distance_3/include/CGAL/Distance_3/Point_3_Plane_3.h b/Distance_3/include/CGAL/Distance_3/Point_3_Plane_3.h index 41107dfac3e..921b13a446f 100644 --- a/Distance_3/include/CGAL/Distance_3/Point_3_Plane_3.h +++ b/Distance_3/include/CGAL/Distance_3/Point_3_Plane_3.h @@ -68,47 +68,6 @@ compare_squared_distance(const typename K::Plane_3& plane, return compare_squared_distance(pt, plane, k, d2); } -} // namespace internal - -template -inline -typename K::FT -squared_distance(const Point_3& pt, - const Plane_3& plane) -{ - return K().compute_squared_distance_3_object()(pt, plane); -} - -template -inline -typename K::FT -squared_distance(const Plane_3& plane, - const Point_3& pt) -{ - return K().compute_squared_distance_3_object()(plane, pt); -} - -template -inline -typename K::Comparison_result -compare_squared_distance(const Point_3& pt, - const Plane_3& pl, - const typename K::FT& d2) -{ - return K().compare_squared_distance_3_object()(pt, pl, d2); -} - -template -inline -typename K::Comparison_result -compare_squared_distance(const Plane_3& pl, - const Point_3& pt, - const typename K::FT& d2) -{ - return K().compare_squared_distance_3_object()(pl, pt, d2); -} - - -} // namespace CGAL +} } // namespace CGAL::internal #endif // CGAL_DISTANCE_3_POINT_3_PLANE_3_H diff --git a/Distance_3/include/CGAL/Distance_3/Point_3_Point_3.h b/Distance_3/include/CGAL/Distance_3/Point_3_Point_3.h index ec5102e8bee..4d7de336e31 100644 --- a/Distance_3/include/CGAL/Distance_3/Point_3_Point_3.h +++ b/Distance_3/include/CGAL/Distance_3/Point_3_Point_3.h @@ -45,15 +45,6 @@ compare_squared_distance(const typename K::Point_3& pt1, } // namespace internal -template -inline -typename K::FT -squared_distance(const Point_3& pt1, - const Point_3& pt2) -{ - return internal::squared_distance(pt1, pt2, K()); -} - } // namespace CGAL #endif // CGAL_DISTANCE_3_POINT_3_POINT_3_H diff --git a/Distance_3/include/CGAL/Distance_3/Point_3_Ray_3.h b/Distance_3/include/CGAL/Distance_3/Point_3_Ray_3.h index 71332a693b5..cb2bdd7401d 100644 --- a/Distance_3/include/CGAL/Distance_3/Point_3_Ray_3.h +++ b/Distance_3/include/CGAL/Distance_3/Point_3_Ray_3.h @@ -101,6 +101,7 @@ compare_squared_distance(const typename K::Point_3& pt, const Vector_3 dir = ray.direction().vector(); const Vector_3 diff = vector(ray.source(), pt); + //Compare first the distance to the line, if larger we can exit early const typename K::Comparison_result res_pl = compare_squared_distance_to_line(dir, diff, k, d2); if(res_pl==LARGER) return LARGER; @@ -123,45 +124,6 @@ compare_squared_distance(const typename K::Ray_3& ray, } // namespace internal -template -inline -typename K::FT -squared_distance(const Point_3& pt, - const Ray_3& ray) -{ - return K().compute_squared_distance_3_object()(pt, ray); -} - -template -inline -typename K::FT -squared_distance(const Ray_3& ray, - const Point_3& pt) -{ - return K().compute_squared_distance_3_object()(ray, pt); -} - -template -inline -typename K::Comparison_result -compare_squared_distance(const Point_3& pt, - const Ray_3& ray, - const typename K::FT& d2) -{ - return K().compare_squared_distance_3_object()(pt, ray, d2); -} - -template -inline -typename K::Comparison_result -compare_squared_distance(const Ray_3& ray, - const Point_3& pt, - const typename K::FT& d2) -{ - return K().compare_squared_distance_3_object()(ray, pt, d2); -} - - } // namespace CGAL #endif // CGAL_DISTANCE_3_POINT_3_RAY_3_H diff --git a/Distance_3/include/CGAL/Distance_3/Point_3_Segment_3.h b/Distance_3/include/CGAL/Distance_3/Point_3_Segment_3.h index 5188a13622a..1a94bee31f5 100644 --- a/Distance_3/include/CGAL/Distance_3/Point_3_Segment_3.h +++ b/Distance_3/include/CGAL/Distance_3/Point_3_Segment_3.h @@ -79,6 +79,7 @@ squared_distance(const typename K::Point_3& pt, typedef typename K::Vector_3 Vector_3; typename K::Construct_vector_3 vector = k.construct_vector_3_object(); + typename K::Compute_squared_distance_3 sq_dist = k.compute_squared_distance_3_object(); // assert that the segment is valid (non zero length). const Vector_3 diff = vector(seg.source(), pt); @@ -90,7 +91,7 @@ squared_distance(const typename K::Point_3& pt, const RT e = wdot(segvec, segvec, k); if(wmult((K*)0, d, segvec.hw()) > wmult((K*)0, e, diff.hw())) - return squared_distance(pt, seg.target(), k); + return sq_dist(pt, seg.target()); // This is an expanded call to squared_distance_to_line() to avoid recomputing 'e' const Vector_3 wcr = wcross(segvec, diff, k); @@ -113,37 +114,35 @@ typename K::Comparison_result compare_squared_distance(const typename K::Point_3& pt, const typename K::Segment_3& seg, const K& k, - const typename K::FT &d2) + const typename K::FT& d2) { typedef typename K::RT RT; typedef typename K::FT FT; typedef typename K::Vector_3 Vector_3; typename K::Construct_vector_3 vector = k.construct_vector_3_object(); + typename K::Compare_squared_distance_3 csq_dist = k.compare_squared_distance_3_object(); // assert that the segment is valid (non zero length). - const Vector_3 diff = vector(seg.source(), pt); const Vector_3 segvec = vector(seg.source(), seg.target()); - //We first compare the distance of the point and the line + //Compare first the distance to the line, if larger we can exit early const typename K::Comparison_result res_pl= compare_squared_distance_to_line(segvec, diff, k, d2); - - //If greater than d2, we early exit if(res_pl==LARGER) return LARGER; - //If distance is realized by the source + //If the distance is realized by the source const RT d = wdot(diff, segvec, k); if(d <= RT(0)) return compare(FT(diff*diff), d2); - //If distance is realized by the target + //If the distance is realized by the target const RT e = wdot(segvec, segvec, k); if(wmult((K*)0, d, segvec.hw()) > wmult((K*)0, e, diff.hw())) - return compare_squared_distance(pt, seg.target(), k, d2); + return csq_dist(pt, seg.target(), d2); - //If distance is realized by the interior, it is equal to the one of the line + //If the distance is realized by the interior return res_pl; } @@ -160,44 +159,6 @@ compare_squared_distance(const typename K::Segment_3& seg, } // namespace internal -template -inline -typename K::FT -squared_distance(const Point_3& pt, - const Segment_3& seg) -{ - return K().compute_squared_distance_3_object()(pt, seg); -} - -template -inline -typename K::FT -squared_distance(const Segment_3& seg, - const Point_3& pt) -{ - return K().compute_squared_distance_3_object()(seg, pt); -} - -template -inline -typename K::Comparison_result -compare_squared_distance(const Point_3& pt, - const Segment_3& seg, - const typename K::FT &d2) -{ - return K().compare_squared_distance_3_object()(pt, seg, d2); -} - -template -inline -typename K::Comparison_result -compare_squared_distance(const Segment_3& seg, - const Point_3& pt, - const typename K::FT &d2) -{ - return K().compare_squared_distance_3_object()(seg, pt, d2); -} - } // namespace CGAL #endif // CGAL_DISTANCE_3_POINT_3_SEGMENT_3_H diff --git a/Distance_3/include/CGAL/Distance_3/Segment_3_Segment_3.h b/Distance_3/include/CGAL/Distance_3/Segment_3_Segment_3.h index e993eb94ba8..5c9562c53bb 100644 --- a/Distance_3/include/CGAL/Distance_3/Segment_3_Segment_3.h +++ b/Distance_3/include/CGAL/Distance_3/Segment_3_Segment_3.h @@ -140,97 +140,6 @@ squared_distance(const typename K::Segment_3& s1, return res; } -// Using Lumelsky, 'On Fast Computation of Distance Between Line Segments' 1984 -template -typename K::Comparison_result -compare_squared_distance(const typename K::Segment_3& s1, - const typename K::Segment_3& s2, - const K& k, - const typename K::FT& d2) -{ - typedef typename K::FT FT; - typedef typename K::Point_3 Point_3; - typedef typename K::Vector_3 Vector_3; - - typename K::Construct_vertex_3 vertex = k.construct_vertex_3_object(); - typename K::Construct_vector_3 cv = k.construct_vector_3_object(); - typename K::Compute_scalar_product_3 sp = k.compute_scalar_product_3_object(); - typename K::Compute_squared_distance_3 sq_dist = k.compute_squared_distance_3_object(); - - const Point_3& p1 = vertex(s1, 0); - const Point_3& q1 = vertex(s1, 1); - const Point_3& p2 = vertex(s2, 0); - const Point_3& q2 = vertex(s2, 1); - const Vector_3 v1 = cv(p1, q1), v2 = cv(p2, q2); - const Vector_3 p1p2 = cv(p1, p2); - - //If degenerate segment, compare distance between the point and the other segment - if(p1 == q1) - if(p2 == q2) - return compare_square_distance(p1,p2,k,d2); - else - return compare_square_distance(p1,s2,k,d2); - else if(p2 == q2) - return compare_square_distance(s1,p2,k,d2); - - //Compare distance between the lines - const Vector_3 normal = wcross(v1, v2, k); - const Vector_3 diff = p1p2; - - //If the lines are at distance more than d, the segment do not be at distance less than d - typename K::Comparison_result res_ll=compare_squared_distance(v1.supporting_line(), v2.supporting_line(), k, d2); - if(res_ll==LARGER) - return LARGER; //Early exit - - //Compute distance between the segments - //Since we already compare the distance between the lines, we care about only the cases where - //the distance are realized by vertices aka res.x or res.y are 0 or 1 - - const FT a = sp(v1, v1); - const FT b = - sp(v1, v2); - const FT c = - b; - const FT d = - sp(v2, v2); - const FT e = sp(v1, p1p2); - const FT f = sp(v2, p1p2); - - CGAL_assertion(a > 0 && d < 0); - const FT det = a*d - b*c; - const FT res_x; - if(det == 0) - res_x = 0; - else - res_x = boost::algorithm::clamp((e*d - b*f) / det, 0, 1); - - FT xc = res_x*c; - // res.y = (f - xc) / d, by definition, but building it up more efficiently - if(f > xc) // y < 0 <=> f - xc / d < 0 <=> f - xc > 0 (since d is -||v2||) - { - // res_y = 0; - res_x = boost::algorithm::clamp(e/a, 0, 1); // (e + y*c) / a - return compare(sq_dist(p1+res_x*v1,p2), d2); - } - else // y >= 0 - { - FT n = f - xc; // delay the division by d - if(n < d) // y > 1 <=> n / d > 1 <=> n < d (once again, important to note that d is negative!) - { - // res_y = 1; - res_x = boost::algorithm::clamp((e + c) / a, 0, 1); // (e + y*c) / a - return compare(sq_dist(p1+res_x*v1,p2), d2); - } - else if(res_x==0 || res_x==1) // 0 <= y <= 1 - { - FT res_y = n / d; - return compare(sq_dist(p1 + res_x*v1, p2 + res_y*v2), d2); - } - else - { - //Already computed by distance line line - return res_ll; - } - } -} - } // namespace internal } // namespace Distance_3 @@ -279,26 +188,97 @@ squared_distance(const typename K::Segment_3& seg1, return res.squared_distance; } +template +typename K::Comparison_result +compare_squared_distance(const typename K::Segment_3& s1, + const typename K::Segment_3& s2, + const K& k, + const typename K::FT& d2) +{ + typedef typename K::FT FT; + typedef typename K::Point_3 Point_3; + typedef typename K::Vector_3 Vector_3; + + typename K::Construct_vertex_3 vertex = k.construct_vertex_3_object(); + typename K::Construct_vector_3 cv = k.construct_vector_3_object(); + typename K::Compute_scalar_product_3 sp = k.compute_scalar_product_3_object(); + typename K::Compute_squared_distance_3 sq_dist = k.compute_squared_distance_3_object(); + typename K::Compare_squared_distance_3 csq_dist = k.compare_squared_distance_3_object(); + + const Point_3& p1 = vertex(s1, 0); + const Point_3& q1 = vertex(s1, 1); + const Point_3& p2 = vertex(s2, 0); + const Point_3& q2 = vertex(s2, 1); + const Vector_3 v1 = cv(p1, q1), v2 = cv(p2, q2); + const Vector_3 p1p2 = cv(p1, p2); + + // If degenerate segment, compare the distance between the point and the other segment + if(p1 == q1) + if(p2 == q2) + return csq_dist(p1,p2,d2); + else + return csq_dist(p1,s2,d2); + else if(p2 == q2) + return csq_dist(s1,p2,d2); + + const Vector_3 normal = wcross(v1, v2, k); + const Vector_3 diff = p1p2; + + // Compare first the distance between the lines, if larger we can exit early + typename K::Comparison_result res_ll=csq_dist(s1.supporting_line(), s2.supporting_line(), d2); + if(is_certain(res_ll) && res_ll==LARGER) + return LARGER; + + // Compute the distance between the segments + // TODO some factorization with above function? only the last case is different + + const FT a = sp(v1, v1); + const FT b = - sp(v1, v2); + const FT c = - b; + const FT d = - sp(v2, v2); + const FT e = sp(v1, p1p2); + const FT f = sp(v2, p1p2); + + CGAL_assertion(a > 0 && d < 0); + const FT det = a*d - b*c; + FT res_x; + if(det == 0) + res_x = 0; + else + res_x = boost::algorithm::clamp((e*d - b*f) / det, 0, 1); + + FT xc = res_x*c; + // res.y = (f - xc) / d, by definition, but building it up more efficiently + if(f > xc) // y < 0 <=> f - xc / d < 0 <=> f - xc > 0 (since d is -||v2||) + { + // res_y = 0; + res_x = boost::algorithm::clamp(e/a, 0, 1); // (e + y*c) / a + return compare(sq_dist(p1+res_x*v1,p2), d2); + } + else // y >= 0 + { + FT n = f - xc; // delay the division by d + if(n < d) // y > 1 <=> n / d > 1 <=> n < d (once again, important to note that d is negative!) + { + // res_y = 1; + res_x = boost::algorithm::clamp((e + c) / a, 0, 1); // (e + y*c) / a + return compare(sq_dist(p1+res_x*v1,p2), d2); + } + else if(res_x==0 || res_x==1) // 0 <= y <= 1 + { + FT res_y = n / d; + return compare(sq_dist(p1 + res_x*v1, p2 + res_y*v2), d2); + } + else + { + //Already computed by distance line line + return res_ll; + } + } +} + } // namespace internal -template -inline -typename K::FT -squared_distance_parallel(const Segment_3& seg1, - const Segment_3& seg2) -{ - return internal::squared_distance_parallel(seg1, seg2, K()); -} - -template -inline -typename K::FT -squared_distance(const Segment_3& seg1, - const Segment_3& seg2) -{ - return K().compute_squared_distance_3_object()(seg1, seg2); -} - } // namespace CGAL #endif // CGAL_DISTANCE_3_SEGMENT_3_SEGMENT_3_H diff --git a/Distance_3/include/CGAL/Distance_3/Triangle_3_Triangle_3.h b/Distance_3/include/CGAL/Distance_3/Triangle_3_Triangle_3.h index f5e66c37d21..2d0106bf9e9 100644 --- a/Distance_3/include/CGAL/Distance_3/Triangle_3_Triangle_3.h +++ b/Distance_3/include/CGAL/Distance_3/Triangle_3_Triangle_3.h @@ -217,8 +217,8 @@ template typename K::Comparison_result compare_squared_distance(const typename K::Triangle_3& tr1, const typename K::Triangle_3& tr2, - const typename K::FT& d, - const K& k) + const K& k, + const typename K::FT& d2) { typedef typename K::FT FT; @@ -237,15 +237,15 @@ compare_squared_distance(const typename K::Triangle_3& tr1, { for(int j=0; j<3; ++j) { - if(CGAL::possibly(CGAL::compare_squared_distance(Line_3(vertex(tr1, i%3), vertex(tr1, (i+1)%3)),Line_3(vertex(tr2, j%3), vertex(tr2, (j+1)%3)),d)!=CGAL::LARGER)) + if(CGAL::possibly(CGAL::compare_squared_distance(Line_3(vertex(tr1, i%3), vertex(tr1, (i+1)%3)),Line_3(vertex(tr2, j%3), vertex(tr2, (j+1)%3)),d2)!=CGAL::LARGER)) { - typename K::comparison_result res_seg_seg= CGAL::compare_squared_distance(Segment_3(vertex(tr1, i%3), vertex(tr1, (i+1)%3)),Segment_3(vertex(tr2, j%3), vertex(tr2, (j+1)%3)),d); + typename K::comparison_result res_seg_seg= CGAL::compare_squared_distance(Segment_3(vertex(tr1, i%3), vertex(tr1, (i+1)%3)),Segment_3(vertex(tr2, j%3), vertex(tr2, (j+1)%3)),d2); if(is_certain(res_seg_seg) && res_seg_seg==CGAL::SMALLER) return CGAL::SMALLER; } } - typename K::comparison_result res_v_pl= CGAL::compare_squared_distance(vertex(tr1, i), tr2.supporting_plane(),d); + typename K::comparison_result res_v_pl= CGAL::compare_squared_distance(vertex(tr1, i), tr2.supporting_plane(),d2); if(tr_contains_proj_p(tr2, vertex(tr1, i))) if(res_v_pl==CGAL::SMALLER) return CGAL::SMALLER; diff --git a/Distance_3/include/CGAL/global_functions_distance_3.h b/Distance_3/include/CGAL/global_functions_distance_3.h new file mode 100644 index 00000000000..9dd35ef5c55 --- /dev/null +++ b/Distance_3/include/CGAL/global_functions_distance_3.h @@ -0,0 +1,99 @@ +// Copyright (c) 2025 +// GeometryFactory (France), +// +// This file is part of CGAL (www.cgal.org) +// +// $URL$ +// $Id$ +// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial +// +// +// Author(s) : Léo Valque + +#ifndef CGAL_KERNEL_GLOBAL_FUNCTIONS_DISTANCE_3_H +#define CGAL_KERNEL_GLOBAL_FUNCTIONS_DISTANCE_3_H + +// Distance functions calling the kernel functor. + +#define CGAL_SQUARED_DISTANCE_FUNCTION(A, B) \ +template \ +inline \ +typename K::FT \ +squared_distance(const A& a, const B& b) \ +{ \ + return K().compute_squared_distance_3_object()(a, b); \ +} \ +template \ +inline \ +typename K::FT \ +squared_distance(const B& a, const A& b) \ +{ \ + return K().compute_squared_distance_3_object()(b, a); \ +} + +#define CGAL_SQUARED_DISTANCE_FUNCTION_SELF(A) \ +template \ +inline \ +typename K::FT \ +squared_distance(const A& a, const A& b) \ +{ \ + return K().compute_squared_distance_3_object()(a, b); \ +} + +#define CGAL_COMPARE_SQUARED_DISTANCE_FUNCTION(A, B) \ +template \ +inline \ +typename K::Comparison_result \ +compare_squared_distance(const A& a, \ + const B& b, \ + const typename K::FT& d2) \ +{ \ + return K().compare_squared_distance_3_object()(a, b, d2); \ +} \ +template \ +inline \ +typename K::Comparison_result \ +compare_squared_distance(const B& b, \ + const A& a, \ + const typename K::FT& d2) \ +{ \ + return K().compare_squared_distance_3_object()(b, a, d2); \ +} + +#define CGAL_COMPARE_SQUARED_DISTANCE_FUNCTION_SELF(A) \ +template \ +inline \ +typename K::Comparison_result \ +compare_squared_distance(const A& a, \ + const A& b, \ + const typename K::FT& d2) \ +{ \ + return K().compare_squared_distance_3_object()(a, b, d2); \ +} + +#define CGAL_COMPUTE_AND_COMPARE_SQUARED_DISTANCE_FUNCTION_SELF(A) \ +CGAL_SQUARED_DISTANCE_FUNCTION_SELF(A) \ +CGAL_COMPARE_SQUARED_DISTANCE_FUNCTION_SELF(A) + +#define CGAL_COMPUTE_AND_COMPARE_SQUARED_DISTANCE_FUNCTION(A, B) \ +CGAL_SQUARED_DISTANCE_FUNCTION(A, B) \ +CGAL_COMPARE_SQUARED_DISTANCE_FUNCTION(A, B) + +namespace CGAL { + +CGAL_COMPUTE_AND_COMPARE_SQUARED_DISTANCE_FUNCTION_SELF(Point_3) +CGAL_COMPUTE_AND_COMPARE_SQUARED_DISTANCE_FUNCTION_SELF(Segment_3) +CGAL_COMPUTE_AND_COMPARE_SQUARED_DISTANCE_FUNCTION_SELF(Line_3) +CGAL_COMPUTE_AND_COMPARE_SQUARED_DISTANCE_FUNCTION_SELF(Plane_3) + +CGAL_COMPUTE_AND_COMPARE_SQUARED_DISTANCE_FUNCTION(Point_3, Line_3) +CGAL_COMPUTE_AND_COMPARE_SQUARED_DISTANCE_FUNCTION(Point_3, Ray_3) +CGAL_COMPUTE_AND_COMPARE_SQUARED_DISTANCE_FUNCTION(Point_3, Segment_3) + +CGAL_COMPUTE_AND_COMPARE_SQUARED_DISTANCE_FUNCTION(Point_3, Plane_3) + +CGAL_COMPUTE_AND_COMPARE_SQUARED_DISTANCE_FUNCTION(Line_3, Plane_3) + +} //namespace CGAL + +#endif // CGAL_KERNEL_GLOBAL_FUNCTIONS_DISTANCE_3_H \ No newline at end of file diff --git a/Distance_3/include/CGAL/squared_distance_3.h b/Distance_3/include/CGAL/squared_distance_3.h index 1cf8feb0bfc..f2e51c4b51f 100644 --- a/Distance_3/include/CGAL/squared_distance_3.h +++ b/Distance_3/include/CGAL/squared_distance_3.h @@ -45,4 +45,6 @@ #include +#include + #endif // CGAL_DISTANCE_3_H diff --git a/Distance_3/test/Distance_3/test_compare_distance_3.cpp b/Distance_3/test/Distance_3/test_compare_distance_3.cpp index dfc2e1c8ae9..29380eaf32a 100644 --- a/Distance_3/test/Distance_3/test_compare_distance_3.cpp +++ b/Distance_3/test/Distance_3/test_compare_distance_3.cpp @@ -115,76 +115,112 @@ private: return true; } - template - void check_compare_squared_distance(const O1& o1, const O2& o2, const FT& d, const Comparison_result& expected_result) - { - const FT res_o1o2 = CGAL::compare_squared_distance(o1, o2, d); - const FT res_o2o1 = CGAL::compare_squared_distance(o2, o1, d); + void do_intersect_check(const P&, const P&) { } - assert(res_o1o2 == expected_result); - assert(res_o2o1 == expected_result); + template + void do_intersect_check(const P& p, const O2& o2) + { + if(!o2.is_degenerate() && CGAL::do_intersect(p, o2)) + { + assert(are_equal(CGAL::squared_distance(p, o2), FT(0))); + assert(are_equal(CGAL::squared_distance(o2, p), FT(0))); + } + } + + template + void do_intersect_check(const O1& o1, const O2& o2) + { + if(!o1.is_degenerate() && !o2.is_degenerate() && CGAL::do_intersect(o1, o2)) + { + assert(are_equal(CGAL::squared_distance(o1, o2), FT(0))); + assert(are_equal(CGAL::squared_distance(o2, o1), FT(0))); + } + } + + template + void check_compare_squared_distance(const O1& o1, const O2& o2, const FT& expected_result) + { + // const FT res_o1o2 = K().compare_squared_distance_3_object()(o1, o2, expected_result); + // const FT res_o2o1 = K().compare_squared_distance_3_object()(o2, o1, expected_result); + + const bool res_e_o1o2 = (CGAL::compare_squared_distance(o1, o2, expected_result) == CGAL::EQUAL); + const bool res_e_o2o1 = (CGAL::compare_squared_distance(o2, o1, expected_result) == CGAL::EQUAL); + const bool res_s_o1o2 = (CGAL::compare_squared_distance(o1, o2, expected_result+1) == CGAL::SMALLER); + const bool res_s_o2o1 = (CGAL::compare_squared_distance(o2, o1, expected_result+1) == CGAL::SMALLER); + const bool res_l_o1o2 = (CGAL::compare_squared_distance(o1, o2, expected_result-1) == CGAL::LARGER); + const bool res_l_o2o1 = (CGAL::compare_squared_distance(o2, o1, expected_result-1) == CGAL::LARGER); + + assert(res_e_o1o2); + assert(res_e_o2o1); + assert(res_s_o1o2); + assert(res_s_o2o1); + assert(res_l_o1o2); + assert(res_l_o2o1); + } + + template + void check_compare_squared_distance_with_bound(const O1& o1, const O2& o2, const FT& upper_bound) + { + // const FT res_o1o2 = K().compare_squared_distance_3_object()(o1, o2, expected_result); + // const FT res_o2o1 = K().compare_squared_distance_3_object()(o2, o1, expected_result); + + const bool res_o1o2 = (CGAL::compare_squared_distance(o1, o2, upper_bound) == CGAL::SMALLER); + const bool res_o2o1 = (CGAL::compare_squared_distance(o2, o1, upper_bound) == CGAL::SMALLER); + + assert(res_o1o2); + assert(res_o2o1); } private: void P_P() { std::cout << "Point - Point" << std::endl; - check_compare_squared_distance(p(0, 0, 0), p(0, 0, 0), 0, CGAL::EQUAL); - check_compare_squared_distance(p(0, 0, 0), p(0, 0, 0), 1, CGAL::SMALLER); - check_compare_squared_distance(p(3, 5, 7), p(0, 0, 0), 83, CGAL::EQUAL); - check_compare_squared_distance(p(3, 5, 7), p(0, 0, 0), 80, CGAL::LARGER); + check_compare_squared_distance(p(0, 0, 0), p(0, 0, 0), 0); + check_compare_squared_distance(p(3, 5, 7), p(0, 0, 0), 83); } void P_S() { std::cout << "Point - Segment" << std::endl; - check_compare_squared_distance(p(0, 1, 2), S{p(-3, 0, 0), p( 2, 0, 0)}, 4, CGAL::LARGER); - check_compare_squared_distance(p(0, 1, 2), S{p(-3, 0, 0), p( 2, 0, 0)}, 5, CGAL::EQUAL); - check_compare_squared_distance(p(0, 1, 2), S{p(-3, 0, 0), p( 2, 0, 0)}, 6, CGAL::SMALLER); - - check_compare_squared_distance(p(0, 1, 2), S{p( 3, 0, 0), p( 2, 0, 0)}, 8, CGAL::LARGER); - check_compare_squared_distance(p(0, 1, 2), S{p( 3, 0, 0), p( 2, 0, 0)}, 9, CGAL::EQUAL); - check_compare_squared_distance(p(0, 1, 2), S{p( 3, 0, 0), p( 2, 0, 0)}, 10, CGAL::SMALLER); - check_compare_squared_distance(p(0, 1, 2), S{p( 2, 0, 0), p( 3, 0, 0)}, 10, CGAL::SMALLER); - - check_compare_squared_distance(p(6, 1, 2), S{p( 2, 0, 0), p( 3, 0, 0)}, 13, CGAL::LARGER); - check_compare_squared_distance(p(6, 1, 2), S{p( 2, 0, 0), p( 3, 0, 0)}, 14, CGAL::EQUAL); - check_compare_squared_distance(p(6, 1, 2), S{p( 2, 0, 0), p( 3, 0, 0)}, 15, CGAL::SMALLER); + check_compare_squared_distance(p(0, 1, 2), S{p(-3, 0, 0), p( 2, 0, 0)}, 5); + check_compare_squared_distance(p(0, 1, 2), S{p( 3, 0, 0), p( 2, 0, 0)}, 9); + check_compare_squared_distance(p(0, 1, 2), S{p( 2, 0, 0), p( 3, 0, 0)}, 9); + check_compare_squared_distance(p(6, 1, 2), S{p( 2, 0, 0), p( 3, 0, 0)}, 14); } // void P_T() // { // std::cout << "Point - Triangle" << std::endl; -// check_squared_distance(p(0, 1, 2), T{p(0, 0, 0), p(2, 0, 0), p(0, 2, 0)}, 4); +// check_compare_squared_distance(p(0, 1, 2), T{p(0, 0, 0), p(2, 0, 0), p(0, 2, 0)}, 4); // T t(p(0,0,0), p(3,0,0), p(3,3,0)); -// check_squared_distance (p(-1, -1, 0), t, 2); -// check_squared_distance (p(-1, 0, 0), t, 1); -// check_squared_distance (p(0, 0, 0), t, 0); -// check_squared_distance (p(1, 0, 0), t, 0); -// check_squared_distance (p(4, 0, 0), t, 1); -// check_squared_distance (p(1, -1, 0), t, 1); -// check_squared_distance (p(1, 1, 1), t, 1); -// check_squared_distance (p(1, 0, 1), t, 1); -// check_squared_distance (p(0, 0, 1), t, 1); +// check_compare_squared_distance (p(-1, -1, 0), t, 2); +// check_compare_squared_distance (p(-1, 0, 0), t, 1); +// check_compare_squared_distance (p(0, 0, 0), t, 0); +// check_compare_squared_distance (p(1, 0, 0), t, 0); +// check_compare_squared_distance (p(4, 0, 0), t, 1); +// check_compare_squared_distance (p(1, -1, 0), t, 1); +// check_compare_squared_distance (p(1, 1, 1), t, 1); +// check_compare_squared_distance (p(1, 0, 1), t, 1); +// check_compare_squared_distance (p(0, 0, 1), t, 1); // // Degenerate -// check_squared_distance (p(1, 2, 3), T(p(4,3,2), p(4,3,2), p(4,3,2)), squared_distance(p(1, 2, 3), p(4,3,2))); -// check_squared_distance (p(1, 2, 3), T(p(4,3,2), p(10,12,3), p(4,3,2)), squared_distance(p(1, 2, 3), p(4,3,2))); -// check_squared_distance (p(0, 0, 0), T(p(4,3,2), p(4,-3,-2), p(4,3,2)), squared_distance(p(0, 0, 0), p(4,0,0))); +// check_compare_squared_distance (p(1, 2, 3), T(p(4,3,2), p(4,3,2), p(4,3,2)), squared_distance(p(1, 2, 3), p(4,3,2))); +// check_compare_squared_distance (p(1, 2, 3), T(p(4,3,2), p(10,12,3), p(4,3,2)), squared_distance(p(1, 2, 3), p(4,3,2))); +// check_compare_squared_distance (p(0, 0, 0), T(p(4,3,2), p(4,-3,-2), p(4,3,2)), squared_distance(p(0, 0, 0), p(4,0,0))); // // On the triangle -// check_squared_distance (p(7, 1, -5), T(p(2,9,8), p(-4,-3,-5), p(7, 1, -5)), 0); // vertex -// check_squared_distance (p(7, 1, -5), T(p(14,2,-10), p(-7,-1,5), p(8, 3, -1)), 0); // edge -// check_squared_distance (p(1, 4, -3), T(p(0,-8,-3), p(-5,14,-3), p(10, 1, -3)), 0); // face +// check_compare_squared_distance (p(7, 1, -5), T(p(2,9,8), p(-4,-3,-5), p(7, 1, -5)), 0); // vertex +// check_compare_squared_distance (p(7, 1, -5), T(p(14,2,-10), p(-7,-1,5), p(8, 3, -1)), 0); // edge +// check_compare_squared_distance (p(1, 4, -3), T(p(0,-8,-3), p(-5,14,-3), p(10, 1, -3)), 0); // face // // General -// check_squared_distance (p(-15, 1, 0), T(p(-10, 1, 0), p(0,0,0), p(10,0,0)), 25); -// check_squared_distance (p(-5, 0, 0), T(p(-10, 1, 0), p(0,0,0), p(10,0,0)), squared_distance(p(-5, 0, 0), S(p(-10, 1, 0), p(0,0,0)))); -// check_squared_distance (p(0, -3, 0), T(p(-10, 1, 0), p(0,0,0), p(10,0,0)), 9); -// check_squared_distance (p(3, -3, 0), T(p(-10, 1, 0), p(0,0,0), p(10,0,0)), squared_distance(p(3, -3, 0), S(p(0,0,0), p(10,0,0)))); -// check_squared_distance (p(16, 1, 1), T(p(-10, 1, 0), p(0,0,0), p(10,0,0)), 38); -// check_squared_distance (p(5, 5, 2), T(p(-10, 1, 0), p(0,0,0), p(10,0,0)), squared_distance(p(5, 5, 2), S(p(10,0,0), p(-10,1,0)))); +// check_compare_squared_distance (p(-15, 1, 0), T(p(-10, 1, 0), p(0,0,0), p(10,0,0)), 25); +// check_compare_squared_distance (p(-5, 0, 0), T(p(-10, 1, 0), p(0,0,0), p(10,0,0)), squared_distance(p(-5, 0, 0), S(p(-10, 1, 0), p(0,0,0)))); +// check_compare_squared_distance (p(0, -3, 0), T(p(-10, 1, 0), p(0,0,0), p(10,0,0)), 9); +// check_compare_squared_distance (p(3, -3, 0), T(p(-10, 1, 0), p(0,0,0), p(10,0,0)), squared_distance(p(3, -3, 0), S(p(0,0,0), p(10,0,0)))); +// check_compare_squared_distance (p(16, 1, 1), T(p(-10, 1, 0), p(0,0,0), p(10,0,0)), 38); +// check_compare_squared_distance (p(5, 5, 2), T(p(-10, 1, 0), p(0,0,0), p(10,0,0)), squared_distance(p(5, 5, 2), S(p(10,0,0), p(-10,1,0)))); // for(int i=0; i1) in the code -// for(int j=-2;j<4; j+=2) -// { -// for(int k=-3;k<3; k+=2) -// { -// P p2{j, k, z}; -// P p3{j, k+2, z}; + // translations of (0, -1, z) -- (0, 1, z) to have all variations of x&y (<0, [0;1]; >1) in the code + for(int j=-2;j<4; j+=2) + { + for(int k=-3;k<3; k+=2) + { + P p2{j, k, z}; + P p3{j, k+2, z}; -// // to explicit the expected distances -// if(j == -2 && k == -3) -// check_squared_distance(S{p0, p1}, S{p2, p3}, CGAL::squared_distance(p3, p0)); -// else if(j == -2 && k == -1) -// check_squared_distance(S{p0, p1}, S{p2, p3}, 1); -// else if(j == -2 && k == 1) -// check_squared_distance(S{p0, p1}, S{p2, p3}, CGAL::squared_distance(p2, p0)); -// else if(j == 0 && k == -3) -// check_squared_distance(S{p0, p1}, S{p2, p3}, 1); -// else if(j == 0 && k == -1) -// check_squared_distance(S{p0, p1}, S{p2, p3}, 0); -// else if(j == 0 && k == 1) -// check_squared_distance(S{p0, p1}, S{p2, p3}, 1); -// else if(j == 2 && k == -3) -// check_squared_distance(S{p0, p1}, S{p2, p3}, CGAL::squared_distance(p3, p1)); -// else if(j == 2 && k == -1) -// check_squared_distance(S{p0, p1}, S{p2, p3}, 1); -// else if(j == 2 && k == 1) -// check_squared_distance(S{p0, p1}, S{p2, p3}, CGAL::squared_distance(p2, p1)); -// } -// } + // to explicit the expected distances + if(j == -2 && k == -3) + check_compare_squared_distance(S{p0, p1}, S{p2, p3}, CGAL::squared_distance(p3, p0)); + else if(j == -2 && k == -1) + check_compare_squared_distance(S{p0, p1}, S{p2, p3}, 1); + else if(j == -2 && k == 1) + check_compare_squared_distance(S{p0, p1}, S{p2, p3}, CGAL::squared_distance(p2, p0)); + else if(j == 0 && k == -3) + check_compare_squared_distance(S{p0, p1}, S{p2, p3}, 1); + else if(j == 0 && k == -1) + check_compare_squared_distance(S{p0, p1}, S{p2, p3}, 0); + else if(j == 0 && k == 1) + check_compare_squared_distance(S{p0, p1}, S{p2, p3}, 1); + else if(j == 2 && k == -3) + check_compare_squared_distance(S{p0, p1}, S{p2, p3}, CGAL::squared_distance(p3, p1)); + else if(j == 2 && k == -1) + check_compare_squared_distance(S{p0, p1}, S{p2, p3}, 1); + else if(j == 2 && k == 1) + check_compare_squared_distance(S{p0, p1}, S{p2, p3}, CGAL::squared_distance(p2, p1)); + } + } -// for(int i=0; i, gte::Segment<3, FT> > GTE_SS_checker; -// gte::Segment<3, FT> gte_s1{{p8.x(), p8.y(), p8.z()}, {p9.x(), p9.y(), p9.z()}}; -// gte::Segment<3, FT> gte_s2{{p3.x(), p3.y(), p3.z()}, {p2.x(), p2.y(), p2.z()}}; -// auto gte_res = GTE_SS_checker(gte_s1, gte_s2); -// std::cout << "-------" << std::endl; -// std::cout << "old: " << CGAL::internal::squared_distance_old(s89, s32, K()) << std::endl; -// std::cout << "dist (GTE) : " << gte_res.sqrDistance << std::endl; -// #endif +#ifdef CGAL_USE_GTE_AS_SANITY_CHECK + gte::DCPQuery, gte::Segment<3, FT> > GTE_SS_checker; + gte::Segment<3, FT> gte_s1{{p8.x(), p8.y(), p8.z()}, {p9.x(), p9.y(), p9.z()}}; + gte::Segment<3, FT> gte_s2{{p3.x(), p3.y(), p3.z()}, {p2.x(), p2.y(), p2.z()}}; + auto gte_res = GTE_SS_checker(gte_s1, gte_s2); + std::cout << "-------" << std::endl; + std::cout << "old: " << CGAL::internal::squared_distance_old(s89, s32, K()) << std::endl; + std::cout << "dist (GTE) : " << gte_res.sqrDistance << std::endl; +#endif -// // Because do_intersect() with constructions is likely to return 'false' even for overlaps -// assert(are_equal(CGAL::squared_distance(s89, s32), result, false /*verbose*/) || -// are_equal(CGAL::squared_distance(s32, s89), FT(0))); -// } + // Because do_intersect() with constructions is likely to return 'false' even for overlaps + assert(are_equal(CGAL::squared_distance(s89, s32), result, false /*verbose*/) || + are_equal(CGAL::squared_distance(s32, s89), FT(0))); + } -// // completely generic -// S s1{p0, p1}, s2{p2, p3}; -// do_intersect_check(s1, s2); + // completely generic + S s1{p0, p1}, s2{p2, p3}; + do_intersect_check(s1, s2); -// #ifdef CGAL_USE_GTE_AS_SANITY_CHECK -// gte::DCPQuery, gte::Segment<3, FT> > GTE_SS_checker; -// gte::Segment<3, FT> gte_s1{{p0.x(), p0.y(), p0.z()}, {p1.x(), p1.y(), p1.z()}}; -// gte::Segment<3, FT> gte_s2{{p2.x(), p2.y(), p2.z()}, {p3.x(), p3.y(), p3.z()}}; -// auto gte_res = GTE_SS_checker(gte_s1, gte_s2); +#ifdef CGAL_USE_GTE_AS_SANITY_CHECK + gte::DCPQuery, gte::Segment<3, FT> > GTE_SS_checker; + gte::Segment<3, FT> gte_s1{{p0.x(), p0.y(), p0.z()}, {p1.x(), p1.y(), p1.z()}}; + gte::Segment<3, FT> gte_s2{{p2.x(), p2.y(), p2.z()}, {p3.x(), p3.y(), p3.z()}}; + auto gte_res = GTE_SS_checker(gte_s1, gte_s2); -// std::cout << "dist (CGAL) : " << CGAL::squared_distance(s1, s2) << std::endl; -// std::cout << "dist (GTE) : " << gte_res.sqrDistance << std::endl; -// assert(are_equal(CGAL::squared_distance(s1, s2), gte_res.sqrDistance)); -// #endif -// } + std::cout << "dist (CGAL) : " << CGAL::squared_distance(s1, s2) << std::endl; + std::cout << "dist (GTE) : " << gte_res.sqrDistance << std::endl; + assert(are_equal(CGAL::squared_distance(s1, s2), gte_res.sqrDistance)); +#endif + } -// // a few brute force checks: sample a segments and use squared_distance(P3, S3) -// for(int i=0; i<10; ++i) -// { -// P p0 = random_point(); -// P p1 = random_point(); -// P p2 = random_point(); -// P p3 = random_point(); + // a few brute force checks: sample a segments and use squared_distance(P3, S3) + for(int i=0; i<10; ++i) + { + P p0 = random_point(); + P p1 = random_point(); + P p2 = random_point(); + P p3 = random_point(); -// S s01{p0, p1}; -// S s23{p2, p3}; + S s01{p0, p1}; + S s23{p2, p3}; -// FT upper_bound = CGAL::squared_distance(p0, p2); + FT upper_bound = CGAL::squared_distance(p0, p2); -// V p01 = V{p0, p1} / FT(N); -// for(int l=0; l >(r, 1e-5).run(); // Test > >(r, 1e-5).run(); - Test >(r, 0).run(); + // Test >(r, 0).run(); const double epick_eps = 10 * std::numeric_limits::epsilon(); Test(r, epick_eps).run(); diff --git a/Kernel_23/include/CGAL/Kernel/function_objects.h b/Kernel_23/include/CGAL/Kernel/function_objects.h index f88a4ea4c2b..7c7de293777 100644 --- a/Kernel_23/include/CGAL/Kernel/function_objects.h +++ b/Kernel_23/include/CGAL/Kernel/function_objects.h @@ -945,8 +945,10 @@ namespace CommonKernelFunctors { Needs_FT operator()(const T1& p, const T2& q, const T3& r, const T4& s) const { - return CGAL::compare(internal::squared_distance(p, q, K()), - internal::squared_distance(r, s, K())); + // return internal::compare_squared_distance(p, q, K(), internal::squared_distance(p, q, K())); + return internal::compare_squared_distance(p, q, K(), internal::squared_distance(r, s, K())); + // return CGAL::compare(internal::squared_distance(p, q, K()), + // internal::squared_distance(r, s, K())); } }; diff --git a/Kernel_23/include/CGAL/Kernel/global_functions_3.h b/Kernel_23/include/CGAL/Kernel/global_functions_3.h index 6fb9b975647..b660dd84f05 100644 --- a/Kernel_23/include/CGAL/Kernel/global_functions_3.h +++ b/Kernel_23/include/CGAL/Kernel/global_functions_3.h @@ -412,16 +412,6 @@ compare_slope(const Point_3 &p, return internal::compare_slope(p, q, r, s, K()); } -template < class K > -inline -typename K::Comparison_result -compare_squared_distance(const Point_3 &p, - const Point_3 &q, - const typename K::FT &d2) -{ - return internal::compare_squared_distance(p, q, d2, K()); -} - template < class K > inline typename K::Comparison_result From f08b5dceda2852a6b1328ae31d89b766c9f83262 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Valque?= Date: Thu, 20 Feb 2025 17:56:02 +0100 Subject: [PATCH 25/63] csq_dist Point Triangle + Debug --- .../CGAL/Distance_3/Point_3_Segment_3.h | 6 +- .../CGAL/Distance_3/Point_3_Triangle_3.h | 195 ++++++++---------- .../CGAL/Distance_3/Segment_3_Segment_3.h | 3 +- .../internal/squared_distance_utils_3.h | 43 +++- .../CGAL/global_functions_distance_3.h | 1 + .../Distance_3/test_compare_distance_3.cpp | 163 +++++++++------ 6 files changed, 238 insertions(+), 173 deletions(-) diff --git a/Distance_3/include/CGAL/Distance_3/Point_3_Segment_3.h b/Distance_3/include/CGAL/Distance_3/Point_3_Segment_3.h index 1a94bee31f5..aa76b52e66c 100644 --- a/Distance_3/include/CGAL/Distance_3/Point_3_Segment_3.h +++ b/Distance_3/include/CGAL/Distance_3/Point_3_Segment_3.h @@ -127,7 +127,11 @@ compare_squared_distance(const typename K::Point_3& pt, const Vector_3 diff = vector(seg.source(), pt); const Vector_3 segvec = vector(seg.source(), seg.target()); - //Compare first the distance to the line, if larger we can exit early + // If the segment is degen + if(seg.source()==seg.target()) + return csq_dist(pt, seg.source(), d2); + + // Compare first the distance to the line, if larger we can exit early const typename K::Comparison_result res_pl= compare_squared_distance_to_line(segvec, diff, k, d2); if(res_pl==LARGER) return LARGER; diff --git a/Distance_3/include/CGAL/Distance_3/Point_3_Triangle_3.h b/Distance_3/include/CGAL/Distance_3/Point_3_Triangle_3.h index 02002ff2600..5ca5242e428 100644 --- a/Distance_3/include/CGAL/Distance_3/Point_3_Triangle_3.h +++ b/Distance_3/include/CGAL/Distance_3/Point_3_Triangle_3.h @@ -299,85 +299,101 @@ compare_squared_distance_to_triangle(const typename K::Point_3& pt, const typename K::Point_3& t1, const typename K::Point_3& t2, const K& k, - const typename K::Ft &d2, + const typename K::FT &d2, bool& inside) { - // typedef typename K::Vector_3 Vector_3; + typedef typename K::Vector_3 Vector_3; - // typename K::Construct_segment_3 segment = k.construct_segment_3_object(); - // typename K::Construct_vector_3 vector = k.construct_vector_3_object(); - // typename K::Compute_squared_distance_3 sq_dist = k.compute_squared_distance_3_object(); + typename K::Construct_segment_3 segment = k.construct_segment_3_object(); + typename K::Construct_vector_3 vector = k.construct_vector_3_object(); + typename K::Compute_squared_distance_3 sq_dist = k.compute_squared_distance_3_object(); + typename K::Compare_squared_distance_3 csq_dist = k.compare_squared_distance_3_object(); - // const Vector_3 e1 = vector(t0, t1); - // const Vector_3 oe3 = vector(t0, t2); - // const Vector_3 normal = wcross(e1, oe3, k); + const Vector_3 e1 = vector(t0, t1); + const Vector_3 oe3 = vector(t0, t2); + const Vector_3 normal = wcross(e1, oe3, k); + const Vector_3 diff = vector(pt, t0); - // if(normal == NULL_VECTOR) - // { - // // The case normal == NULL_VECTOR covers the case when the triangle - // // is colinear, or even more degenerate. In that case, we can - // // simply take also the distance to the three segments. - // // - // // Note that in the degenerate case, at most 2 edges cover the full triangle, - // // and only two distances could be used, but leaving 3 for the case of - // // inexact constructions as it might improve the accuracy. - // typename K::FT d1 = sq_dist(pt, segment(t2, t0)); - // typename K::FT d2 = sq_dist(pt, segment(t1, t2)); - // typename K::FT d3 = sq_dist(pt, segment(t0, t1)); + if(normal == NULL_VECTOR) + { + // The case normal == NULL_VECTOR covers the case when the triangle + // is colinear, or even more degenerate. In that case, we can + // simply take also the distance to the three segments. + // + // Note that in the degenerate case, at most 2 edges cover the full triangle, + // and only two distances could be used + typename K::Comparison_result res1 = csq_dist(pt, segment(t2, t0), d2); + if(is_certain(res1) && (res1 == SMALLER)) + return SMALLER; + typename K::Comparison_result res2 = csq_dist(pt, segment(t1, t2), d2); + return smaller_of(res1,res2); + } - // return (std::min)((std::min)(d1, d2), d3); - // } + // Compare first the distance to the plane, if larger we can exit early + typename K::Comparison_result res_p_pl = compare(squared_distance_to_plane(normal, vector(t0, pt), k), d2); + if(is_certain(res_p_pl) && res_p_pl==LARGER) + return LARGER; - // if(!on_left_of_triangle_edge(pt, normal, t0, t1, k)) - // { - // if(!on_left_of_triangle_edge(pt, normal, t1, t2, k)) - // { - // // can't be to the right of all three segments - // return (std::min)(sq_dist(pt, segment(t0, t1)), sq_dist(pt, segment(t1, t2))); - // } - // else // on_left_of_triangle_edge(pt, normal, t1, t2, k) - // { - // if(!on_left_of_triangle_edge(pt, normal, t2, t0, k)) - // { - // return (std::min)(sq_dist(pt, segment(t0, t1)), sq_dist(pt, segment(t2, t0))); - // } - // else // on_left_of_triangle_edge(pt, normal, t2, t0, k) - // { - // return sq_dist(pt, segment(t0, t1)); - // } - // } - // } - // else // on_left_of_triangle_edge(pt, normal, t0, t1, k) - // { - // if(!on_left_of_triangle_edge(pt, normal, t1, t2, k)) - // { - // if(!on_left_of_triangle_edge(pt, normal, t2, t0, k)) - // { - // return (std::min)(sq_dist(pt, segment(t1, t2)), sq_dist(pt, segment(t2, t0))); - // } - // else // on_left_of_triangle_edge(pt, normal, t2, t0, k) - // { - // return sq_dist(pt, segment(t1, t2)); - // } - // } - // else // on_left_of_triangle_edge(pt, normal, t1, t2, k) - // { - // if(!on_left_of_triangle_edge(pt, normal, t2, t0, k)) - // { - // return sq_dist(pt, segment(t2, t0)); - // } - // else // on_left_of_triangle_edge(pt, normal, t2, t0, k) - // { - // inside = true; - // return squared_distance_to_plane(normal, vector(t0, pt), k); - // } - // } - // } + //If we are smaller when compare to a segment, we can exit early + if(!on_left_of_triangle_edge(pt, normal, t0, t1, k)) + { + typename K::Comparison_result res_p_s1 = csq_dist(pt, segment(t0, t1), d2); + if(res_p_s1==SMALLER) + return SMALLER; + if(!on_left_of_triangle_edge(pt, normal, t1, t2, k)) + { + // can't be to the right of all three segments + typename K::Comparison_result res_p_s2 = csq_dist(pt, segment(t1, t2), d2); + return smaller_of(res_p_s1, res_p_s2); + } + else // on_left_of_triangle_edge(pt, normal, t1, t2, k) + { + if(!on_left_of_triangle_edge(pt, normal, t2, t0, k)) + { + typename K::Comparison_result res_p_s3 = csq_dist(pt, segment(t2, t0), d2); + return smaller_of(res_p_s1, res_p_s3); + } + else // on_left_of_triangle_edge(pt, normal, t2, t0, k) + { + return res_p_s1; + } + } + } + else // on_left_of_triangle_edge(pt, normal, t0, t1, k) + { + if(!on_left_of_triangle_edge(pt, normal, t1, t2, k)) + { + typename K::Comparison_result res_p_s2 = csq_dist(pt, segment(t1, t2), d2); + if(res_p_s2 == SMALLER) + return SMALLER; + if(!on_left_of_triangle_edge(pt, normal, t2, t0, k)) + { + typename K::Comparison_result res_p_s3 = csq_dist(pt, segment(t2, t0), d2); + return smaller_of(res_p_s2, res_p_s3); + } + else // on_left_of_triangle_edge(pt, normal, t2, t0, k) + { + return res_p_s2; + } + } + else // on_left_of_triangle_edge(pt, normal, t1, t2, k) + { + if(!on_left_of_triangle_edge(pt, normal, t2, t0, k)) + { + return csq_dist(pt, segment(t2, t0), d2); + } + else // on_left_of_triangle_edge(pt, normal, t2, t0, k) + { + inside = true; + return res_p_pl; + } + } + } } template typename K::Comparison_result -compute_squared_distance(const typename K::Point_3& pt, +compare_squared_distance(const typename K::Point_3& pt, const typename K::Triangle_3& t, const K& k, const typename K::FT& d2) @@ -396,55 +412,16 @@ compute_squared_distance(const typename K::Point_3& pt, template typename K::Comparison_result -compute_squared_distance(const typename K::Triangle_3& t, +compare_squared_distance(const typename K::Triangle_3& t, const typename K::Point_3& pt, const K& k, const typename K::FT& d2) { - return compute_squared_distance(pt, t, k, d2); + return compare_squared_distance(pt, t, k, d2); } } // namespace internal -template -inline -typename K::FT -squared_distance(const Point_3& pt, - const Triangle_3& t) -{ - return K().compute_squared_distance_3_object()(pt, t); -} - - -template -inline -typename K::FT -squared_distance(const Triangle_3& t, - const Point_3& pt) -{ - return K().compute_squared_distance_3_object()(t, pt); -} - -template -inline -typename K::Comparison_result -compare_squared_distance(const Point_3& pt, - const Triangle_3& t, - const typename K::FT& d2) -{ - return K().compare_squared_distance_3_object()(pt, t, d2); -} - -template -inline -typename K::Comparison_result -compare_squared_distance(const Triangle_3& t, - const Point_3& pt, - const typename K::FT &d2) -{ - return K().compare_squared_distance_3_object()(t, pt, d2); -} - } // namespace CGAL #endif // CGAL_DISTANCE_3_POINT_3_TRIANGLE_3_H diff --git a/Distance_3/include/CGAL/Distance_3/Segment_3_Segment_3.h b/Distance_3/include/CGAL/Distance_3/Segment_3_Segment_3.h index 5c9562c53bb..310fd80f1e2 100644 --- a/Distance_3/include/CGAL/Distance_3/Segment_3_Segment_3.h +++ b/Distance_3/include/CGAL/Distance_3/Segment_3_Segment_3.h @@ -198,6 +198,7 @@ compare_squared_distance(const typename K::Segment_3& s1, typedef typename K::FT FT; typedef typename K::Point_3 Point_3; typedef typename K::Vector_3 Vector_3; + typedef typename K::Line_3 Line_3; typename K::Construct_vertex_3 vertex = k.construct_vertex_3_object(); typename K::Construct_vector_3 cv = k.construct_vector_3_object(); @@ -262,7 +263,7 @@ compare_squared_distance(const typename K::Segment_3& s1, { // res_y = 1; res_x = boost::algorithm::clamp((e + c) / a, 0, 1); // (e + y*c) / a - return compare(sq_dist(p1+res_x*v1,p2), d2); + return compare(sq_dist(p1+res_x*v1,p2+v2), d2); } else if(res_x==0 || res_x==1) // 0 <= y <= 1 { diff --git a/Distance_3/include/CGAL/Distance_3/internal/squared_distance_utils_3.h b/Distance_3/include/CGAL/Distance_3/internal/squared_distance_utils_3.h index 38844ecab54..43e11bdf4ab 100644 --- a/Distance_3/include/CGAL/Distance_3/internal/squared_distance_utils_3.h +++ b/Distance_3/include/CGAL/Distance_3/internal/squared_distance_utils_3.h @@ -26,6 +26,16 @@ namespace CGAL { namespace internal { +template +K_Comparison_result smaller_of(const K_Comparison_result a, const K_Comparison_result b) +{ + if((a==SMALLER) || (b==SMALLER)) + return SMALLER; + if((a==EQUAL) || (b==EQUAL)) + return EQUAL; + return LARGER; +} + template bool is_null(const typename K::Vector_3 &v, const K&) { @@ -39,7 +49,10 @@ wdot(const typename K::Vector_3 &u, const typename K::Vector_3 &v, const K&) { - return (u.hx()*v.hx() + u.hy()*v.hy() + u.hz()*v.hz()); + if constexpr(std::is_same()) + return std::fma(u.hx(), v.hx(), std::fma(u.hy(), v.hy(), u.hz()*v.hz())); + else + return (u.hx()*v.hx() + u.hy()*v.hy() + u.hz()*v.hz()); } template @@ -84,6 +97,24 @@ wdot(const typename K::Point_3 &p, return wdot_tag(p, q, r, k, tag); } +static double diff_of_products(const double a, const double b, const double c, const double d) +{ +#if 1 + double w = d * c; + double e = std::fma(c, -d, w); + double f = std::fma(a, b, -w); + return f + e; +#else + return std::fma(a, b, -c*d); +#endif +} + +template +static OFT diff_of_products(const OFT& a, const OFT& b, const OFT& c, const OFT& d) +{ + return a*b - c*d; +} + template typename K::Vector_3 wcross(const typename K::Vector_3 &u, @@ -91,10 +122,14 @@ wcross(const typename K::Vector_3 &u, const K&) { typedef typename K::Vector_3 Vector_3; + // return Vector_3( + // u.hy()*v.hz() - u.hz()*v.hy(), + // u.hz()*v.hx() - u.hx()*v.hz(), + // u.hx()*v.hy() - u.hy()*v.hx()); return Vector_3( - u.hy()*v.hz() - u.hz()*v.hy(), - u.hz()*v.hx() - u.hx()*v.hz(), - u.hx()*v.hy() - u.hy()*v.hx()); + diff_of_products(u.hy(),v.hz(),u.hz(),v.hy()), + diff_of_products(u.hz(),v.hx(),u.hx(),v.hz()), + diff_of_products(u.hx(),v.hy(),u.hy(),v.hx())); } template diff --git a/Distance_3/include/CGAL/global_functions_distance_3.h b/Distance_3/include/CGAL/global_functions_distance_3.h index 9dd35ef5c55..4dbac75e2f6 100644 --- a/Distance_3/include/CGAL/global_functions_distance_3.h +++ b/Distance_3/include/CGAL/global_functions_distance_3.h @@ -89,6 +89,7 @@ CGAL_COMPUTE_AND_COMPARE_SQUARED_DISTANCE_FUNCTION_SELF(Plane_3) CGAL_COMPUTE_AND_COMPARE_SQUARED_DISTANCE_FUNCTION(Point_3, Line_3) CGAL_COMPUTE_AND_COMPARE_SQUARED_DISTANCE_FUNCTION(Point_3, Ray_3) CGAL_COMPUTE_AND_COMPARE_SQUARED_DISTANCE_FUNCTION(Point_3, Segment_3) +CGAL_COMPUTE_AND_COMPARE_SQUARED_DISTANCE_FUNCTION(Point_3, Triangle_3) CGAL_COMPUTE_AND_COMPARE_SQUARED_DISTANCE_FUNCTION(Point_3, Plane_3) diff --git a/Distance_3/test/Distance_3/test_compare_distance_3.cpp b/Distance_3/test/Distance_3/test_compare_distance_3.cpp index 29380eaf32a..0e057eb22a5 100644 --- a/Distance_3/test/Distance_3/test_compare_distance_3.cpp +++ b/Distance_3/test/Distance_3/test_compare_distance_3.cpp @@ -7,6 +7,8 @@ #include +#include + #include #include @@ -143,15 +145,35 @@ private: // const FT res_o1o2 = K().compare_squared_distance_3_object()(o1, o2, expected_result); // const FT res_o2o1 = K().compare_squared_distance_3_object()(o2, o1, expected_result); + // std::cout << std::endl << "Test" << std::endl; + + // std::cout << o1 << std::endl << o2 << std::endl; + // std::cout << CGAL::squared_distance(o1, o2) << std::endl; + // std::cout << CGAL::squared_distance( CGAL::Cartesian_converter()(o1) , + // CGAL::Cartesian_converter()(o2)) << std::endl; + + // if constexpr(std::is_same()){ + // if(expected_result != 0){ + // std::cout << CGAL::squared_distance(o1.supporting_line(), o2.supporting_line()) << std::endl; + // std::cout << CGAL::squared_distance( CGAL::Cartesian_converter()(o1.supporting_line()) , + // CGAL::Cartesian_converter()(o2.supporting_line())) << std::endl; + // } + // } + // std::cout << CGAL::SMALLER << CGAL::EQUAL << CGAL::LARGER << std::endl; + const bool res_e_o1o2 = (CGAL::compare_squared_distance(o1, o2, expected_result) == CGAL::EQUAL); const bool res_e_o2o1 = (CGAL::compare_squared_distance(o2, o1, expected_result) == CGAL::EQUAL); - const bool res_s_o1o2 = (CGAL::compare_squared_distance(o1, o2, expected_result+1) == CGAL::SMALLER); - const bool res_s_o2o1 = (CGAL::compare_squared_distance(o2, o1, expected_result+1) == CGAL::SMALLER); - const bool res_l_o1o2 = (CGAL::compare_squared_distance(o1, o2, expected_result-1) == CGAL::LARGER); - const bool res_l_o2o1 = (CGAL::compare_squared_distance(o2, o1, expected_result-1) == CGAL::LARGER); + const bool res_s_o1o2 = (CGAL::compare_squared_distance(o1, o2, expected_result*(1+epsilon)+1) == CGAL::SMALLER); + const bool res_s_o2o1 = (CGAL::compare_squared_distance(o2, o1, expected_result*(1+epsilon)+1) == CGAL::SMALLER); + const bool res_l_o1o2 = (CGAL::compare_squared_distance(o1, o2, expected_result*(1-epsilon)-1) == CGAL::LARGER); + const bool res_l_o2o1 = (CGAL::compare_squared_distance(o2, o1, expected_result*(1-epsilon)-1) == CGAL::LARGER); - assert(res_e_o1o2); - assert(res_e_o2o1); + // The equal result is guaranted only on exact construction kernel + if(epsilon==0) + { + assert(res_e_o1o2); + assert(res_e_o2o1); + } assert(res_s_o1o2); assert(res_s_o2o1); assert(res_l_o1o2); @@ -164,8 +186,10 @@ private: // const FT res_o1o2 = K().compare_squared_distance_3_object()(o1, o2, expected_result); // const FT res_o2o1 = K().compare_squared_distance_3_object()(o2, o1, expected_result); - const bool res_o1o2 = (CGAL::compare_squared_distance(o1, o2, upper_bound) == CGAL::SMALLER); - const bool res_o2o1 = (CGAL::compare_squared_distance(o2, o1, upper_bound) == CGAL::SMALLER); + const FT up = upper_bound * (1 + epsilon) + std::numeric_limits::epsilon(); + + const bool res_o1o2 = (CGAL::compare_squared_distance(o1, o2, up) == CGAL::SMALLER); + const bool res_o2o1 = (CGAL::compare_squared_distance(o2, o1, up) == CGAL::SMALLER); assert(res_o1o2); assert(res_o2o1); @@ -188,61 +212,61 @@ private: check_compare_squared_distance(p(6, 1, 2), S{p( 2, 0, 0), p( 3, 0, 0)}, 14); } -// void P_T() -// { -// std::cout << "Point - Triangle" << std::endl; -// check_compare_squared_distance(p(0, 1, 2), T{p(0, 0, 0), p(2, 0, 0), p(0, 2, 0)}, 4); + void P_T() + { + std::cout << "Point - Triangle" << std::endl; + check_compare_squared_distance(p(0, 1, 2), T{p(0, 0, 0), p(2, 0, 0), p(0, 2, 0)}, 4); -// T t(p(0,0,0), p(3,0,0), p(3,3,0)); -// check_compare_squared_distance (p(-1, -1, 0), t, 2); -// check_compare_squared_distance (p(-1, 0, 0), t, 1); -// check_compare_squared_distance (p(0, 0, 0), t, 0); -// check_compare_squared_distance (p(1, 0, 0), t, 0); -// check_compare_squared_distance (p(4, 0, 0), t, 1); -// check_compare_squared_distance (p(1, -1, 0), t, 1); -// check_compare_squared_distance (p(1, 1, 1), t, 1); -// check_compare_squared_distance (p(1, 0, 1), t, 1); -// check_compare_squared_distance (p(0, 0, 1), t, 1); + T t(p(0,0,0), p(3,0,0), p(3,3,0)); + check_compare_squared_distance (p(-1, -1, 0), t, 2); + check_compare_squared_distance (p(-1, 0, 0), t, 1); + check_compare_squared_distance (p(0, 0, 0), t, 0); + check_compare_squared_distance (p(1, 0, 0), t, 0); + check_compare_squared_distance (p(4, 0, 0), t, 1); + check_compare_squared_distance (p(1, -1, 0), t, 1); + check_compare_squared_distance (p(1, 1, 1), t, 1); + check_compare_squared_distance (p(1, 0, 1), t, 1); + check_compare_squared_distance (p(0, 0, 1), t, 1); -// // Degenerate -// check_compare_squared_distance (p(1, 2, 3), T(p(4,3,2), p(4,3,2), p(4,3,2)), squared_distance(p(1, 2, 3), p(4,3,2))); -// check_compare_squared_distance (p(1, 2, 3), T(p(4,3,2), p(10,12,3), p(4,3,2)), squared_distance(p(1, 2, 3), p(4,3,2))); -// check_compare_squared_distance (p(0, 0, 0), T(p(4,3,2), p(4,-3,-2), p(4,3,2)), squared_distance(p(0, 0, 0), p(4,0,0))); + // // Degenerate + check_compare_squared_distance (p(1, 2, 3), T(p(4,3,2), p(4,3,2), p(4,3,2)), squared_distance(p(1, 2, 3), p(4,3,2))); + check_compare_squared_distance (p(1, 2, 3), T(p(4,3,2), p(10,12,3), p(4,3,2)), squared_distance(p(1, 2, 3), p(4,3,2))); + check_compare_squared_distance (p(0, 0, 0), T(p(4,3,2), p(4,-3,-2), p(4,3,2)), squared_distance(p(0, 0, 0), p(4,0,0))); -// // On the triangle -// check_compare_squared_distance (p(7, 1, -5), T(p(2,9,8), p(-4,-3,-5), p(7, 1, -5)), 0); // vertex -// check_compare_squared_distance (p(7, 1, -5), T(p(14,2,-10), p(-7,-1,5), p(8, 3, -1)), 0); // edge -// check_compare_squared_distance (p(1, 4, -3), T(p(0,-8,-3), p(-5,14,-3), p(10, 1, -3)), 0); // face + // On the triangle + check_compare_squared_distance (p(7, 1, -5), T(p(2,9,8), p(-4,-3,-5), p(7, 1, -5)), 0); // vertex + check_compare_squared_distance (p(7, 1, -5), T(p(14,2,-10), p(-7,-1,5), p(8, 3, -1)), 0); // edge + check_compare_squared_distance (p(1, 4, -3), T(p(0,-8,-3), p(-5,14,-3), p(10, 1, -3)), 0); // face -// // General -// check_compare_squared_distance (p(-15, 1, 0), T(p(-10, 1, 0), p(0,0,0), p(10,0,0)), 25); -// check_compare_squared_distance (p(-5, 0, 0), T(p(-10, 1, 0), p(0,0,0), p(10,0,0)), squared_distance(p(-5, 0, 0), S(p(-10, 1, 0), p(0,0,0)))); -// check_compare_squared_distance (p(0, -3, 0), T(p(-10, 1, 0), p(0,0,0), p(10,0,0)), 9); -// check_compare_squared_distance (p(3, -3, 0), T(p(-10, 1, 0), p(0,0,0), p(10,0,0)), squared_distance(p(3, -3, 0), S(p(0,0,0), p(10,0,0)))); -// check_compare_squared_distance (p(16, 1, 1), T(p(-10, 1, 0), p(0,0,0), p(10,0,0)), 38); -// check_compare_squared_distance (p(5, 5, 2), T(p(-10, 1, 0), p(0,0,0), p(10,0,0)), squared_distance(p(5, 5, 2), S(p(10,0,0), p(-10,1,0)))); + // General + check_compare_squared_distance (p(-15, 1, 0), T(p(-10, 1, 0), p(0,0,0), p(10,0,0)), 25); + check_compare_squared_distance (p(-5, 0, 0), T(p(-10, 1, 0), p(0,0,0), p(10,0,0)), squared_distance(p(-5, 0, 0), S(p(-10, 1, 0), p(0,0,0)))); + check_compare_squared_distance (p(0, -3, 0), T(p(-10, 1, 0), p(0,0,0), p(10,0,0)), 9); + check_compare_squared_distance (p(3, -3, 0), T(p(-10, 1, 0), p(0,0,0), p(10,0,0)), squared_distance(p(3, -3, 0), S(p(0,0,0), p(10,0,0)))); + check_compare_squared_distance (p(16, 1, 1), T(p(-10, 1, 0), p(0,0,0), p(10,0,0)), 38); + check_compare_squared_distance (p(5, 5, 2), T(p(-10, 1, 0), p(0,0,0), p(10,0,0)), squared_distance(p(5, 5, 2), S(p(10,0,0), p(-10,1,0)))); -// for(int i=0; i Date: Fri, 21 Feb 2025 17:43:13 +0100 Subject: [PATCH 27/63] Debug CSG Point Tetrahedron --- .../CGAL/Distance_3/Point_3_Tetrahedron_3.h | 18 ++++++-- .../CGAL/Distance_3/Triangle_3_Triangle_3.h | 46 +++++++------------ .../CGAL/global_functions_distance_3.h | 3 +- .../Distance_3/test_compare_distance_3.cpp | 10 ++-- 4 files changed, 38 insertions(+), 39 deletions(-) diff --git a/Distance_3/include/CGAL/Distance_3/Point_3_Tetrahedron_3.h b/Distance_3/include/CGAL/Distance_3/Point_3_Tetrahedron_3.h index aff5010f755..e4505ec0f30 100644 --- a/Distance_3/include/CGAL/Distance_3/Point_3_Tetrahedron_3.h +++ b/Distance_3/include/CGAL/Distance_3/Point_3_Tetrahedron_3.h @@ -144,7 +144,6 @@ squared_distance(const typename K::Tetrahedron_3& tet, } template -inline typename K::Comparison_result compare_squared_distance(const typename K::Point_3& pt, const typename K::Tetrahedron_3& tet, @@ -192,7 +191,7 @@ compare_squared_distance(const typename K::Point_3& pt, { on_bounded_side = false; const typename K::Comparison_result temp_res = compare_squared_distance_to_triangle(pt, t0, t3, t1, k, d2, inside_or_far_to_the_plane); - if(inside_or_far_to_the_plane || res==SMALLER) + if(inside_or_far_to_the_plane || temp_res==SMALLER) return temp_res; res = smaller_of(res, temp_res); } @@ -201,7 +200,7 @@ compare_squared_distance(const typename K::Point_3& pt, { on_bounded_side = false; const typename K::Comparison_result temp_res = compare_squared_distance_to_triangle(pt, t1, t3, t2, k, d2, inside_or_far_to_the_plane); - if(inside_or_far_to_the_plane || res==SMALLER) + if(inside_or_far_to_the_plane || temp_res==SMALLER) return temp_res; res = smaller_of(res, temp_res); } @@ -210,7 +209,7 @@ compare_squared_distance(const typename K::Point_3& pt, { on_bounded_side = false; const typename K::Comparison_result temp_res = compare_squared_distance_to_triangle(pt, t2, t3, t0, k, d2, inside_or_far_to_the_plane); - if(inside_or_far_to_the_plane || res==SMALLER) + if(inside_or_far_to_the_plane || temp_res==SMALLER) return temp_res; res = smaller_of(res, temp_res); } @@ -221,6 +220,17 @@ compare_squared_distance(const typename K::Point_3& pt, return res; } +template +inline +typename K::Comparison_result +compare_squared_distance(const typename K::Tetrahedron_3& tet, + const typename K::Point_3& pt, + const K& k, + const typename K::FT& d2) +{ + return compare_squared_distance(pt, tet, k, d2); +} + } // namespace internal } // namespace CGAL diff --git a/Distance_3/include/CGAL/Distance_3/Triangle_3_Triangle_3.h b/Distance_3/include/CGAL/Distance_3/Triangle_3_Triangle_3.h index 2d0106bf9e9..13ab22eba3c 100644 --- a/Distance_3/include/CGAL/Distance_3/Triangle_3_Triangle_3.h +++ b/Distance_3/include/CGAL/Distance_3/Triangle_3_Triangle_3.h @@ -218,54 +218,42 @@ typename K::Comparison_result compare_squared_distance(const typename K::Triangle_3& tr1, const typename K::Triangle_3& tr2, const K& k, - const typename K::FT& d2) + const typename K::FT& d2, + bool are_triangles_known_to_be_disjoint) { typedef typename K::FT FT; typename K::Construct_vertex_3 vertex = k.construct_vertex_3_object(); + typename K::Compare_squared_distance_3 csq_dist = k.compare_squared_distance_3_object(); - bool tr_contains_proj_p=[](const typename K::Triangle_3& tr, const typename K::Point_3 &p) - { - typename K::Point_3 p_proj= tr.supporting_plane().projection(p); - return tr.has_on(p_proj); - }; + typename K::Comparison_result res(LARGER); - typename K::Comparison_result temp_res(CGAL::LARGER); - - std::pair, bool> ss_res; for(int i=0; i<3; ++i) { for(int j=0; j<3; ++j) { - if(CGAL::possibly(CGAL::compare_squared_distance(Line_3(vertex(tr1, i%3), vertex(tr1, (i+1)%3)),Line_3(vertex(tr2, j%3), vertex(tr2, (j+1)%3)),d2)!=CGAL::LARGER)) - { - typename K::comparison_result res_seg_seg= CGAL::compare_squared_distance(Segment_3(vertex(tr1, i%3), vertex(tr1, (i+1)%3)),Segment_3(vertex(tr2, j%3), vertex(tr2, (j+1)%3)),d2); - if(is_certain(res_seg_seg) && res_seg_seg==CGAL::SMALLER) - return CGAL::SMALLER; - } + typename K::Comparison_result temp_res_ss=csq_dist(Segment_3(vertex(tr1, i%3), vertex(tr1, (i+1)%3)),Segment_3(vertex(tr2, j%3), vertex(tr2, (j+1)%3)),d2); + if(temp_res_ss==SMALLER) + return SMALLER; + smaller_of(res, temp_res_ss); } - typename K::comparison_result res_v_pl= CGAL::compare_squared_distance(vertex(tr1, i), tr2.supporting_plane(),d2); - if(tr_contains_proj_p(tr2, vertex(tr1, i))) - if(res_v_pl==CGAL::SMALLER) - return CGAL::SMALLER; + typename K::comparison_result temp_res_v_pl= csq_dist(vertex(tr1, i), tr2,d2); + if(temp_res_v_pl==SMALLER) + return SMALLER; + smaller_of(res, temp_res_v_pl); } + if(!are_triangles_known_to_be_disjoint){ + //TODO check are disjoint + } + return res; + } } // namespace internal - -template -inline -typename K::FT -squared_distance(const Triangle_3& tr1, - const Triangle_3& tr2) -{ - return K().compute_squared_distance_3_object()(tr1, tr2); -} - } // namespace CGAL #endif // CGAL_DISTANCE_3_TRIANGLE_3_TRIANGLE_3_H diff --git a/Distance_3/include/CGAL/global_functions_distance_3.h b/Distance_3/include/CGAL/global_functions_distance_3.h index 0a6bdb7d957..68c975be0ea 100644 --- a/Distance_3/include/CGAL/global_functions_distance_3.h +++ b/Distance_3/include/CGAL/global_functions_distance_3.h @@ -82,9 +82,10 @@ CGAL_COMPARE_SQUARED_DISTANCE_FUNCTION(A, B) namespace CGAL { CGAL_COMPUTE_AND_COMPARE_SQUARED_DISTANCE_FUNCTION_SELF(Point_3) +CGAL_COMPUTE_AND_COMPARE_SQUARED_DISTANCE_FUNCTION_SELF(Plane_3) CGAL_COMPUTE_AND_COMPARE_SQUARED_DISTANCE_FUNCTION_SELF(Segment_3) CGAL_COMPUTE_AND_COMPARE_SQUARED_DISTANCE_FUNCTION_SELF(Line_3) -CGAL_COMPUTE_AND_COMPARE_SQUARED_DISTANCE_FUNCTION_SELF(Plane_3) +CGAL_COMPUTE_AND_COMPARE_SQUARED_DISTANCE_FUNCTION_SELF(Triangle_3) CGAL_COMPUTE_AND_COMPARE_SQUARED_DISTANCE_FUNCTION(Point_3, Line_3) CGAL_COMPUTE_AND_COMPARE_SQUARED_DISTANCE_FUNCTION(Point_3, Ray_3) diff --git a/Distance_3/test/Distance_3/test_compare_distance_3.cpp b/Distance_3/test/Distance_3/test_compare_distance_3.cpp index 44abf29e1a2..12f7909a26a 100644 --- a/Distance_3/test/Distance_3/test_compare_distance_3.cpp +++ b/Distance_3/test/Distance_3/test_compare_distance_3.cpp @@ -188,8 +188,8 @@ private: const FT up = upper_bound * (1 + epsilon) + std::numeric_limits::epsilon(); - const bool res_o1o2 = (CGAL::compare_squared_distance(o1, o2, up) == CGAL::SMALLER); - const bool res_o2o1 = (CGAL::compare_squared_distance(o2, o1, up) == CGAL::SMALLER); + const bool res_o1o2 = (CGAL::compare_squared_distance(o1, o2, up) != CGAL::LARGER); + const bool res_o2o1 = (CGAL::compare_squared_distance(o2, o1, up) != CGAL::LARGER); assert(res_o1o2); assert(res_o2o1); @@ -744,7 +744,7 @@ public: P_L(); P_T(); P_Pl(); - // P_Tet(); + P_Tet(); S_S(); // S_R(); @@ -771,8 +771,8 @@ int main() std::cout << "3D Distance tests" << std::endl; - // CGAL::Random r(1740056029); - CGAL::Random r; + CGAL::Random r(1740152576); + // CGAL::Random r; std::cout << "random seed = " << r.get_seed() << std::endl; // @todo Some tests are too difficult for these kernels From 1363d00bae0e6dc6d70faab9e8e9dd59cf6e92d0 Mon Sep 17 00:00:00 2001 From: Efi Fogel Date: Tue, 25 Feb 2025 12:10:15 +0200 Subject: [PATCH 28/63] Fixed typo (move \cgalConcept) to a separate line --- .../doc/Arrangement_on_surface_2/Concepts/AosTraits_2.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits_2.h index 48a516342c7..c65fd9ee100 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits_2.h @@ -1,4 +1,5 @@ -/*! \ingroup PkgArrangementOnSurface2ConceptsTraits \cgalConcept +/*! \ingroup PkgArrangementOnSurface2ConceptsTraits + * \cgalConcept * * The concept `AosTraits_2` allows the construction of arrangement of * general planar curves. Models of this concept are used by the free From bf4e61e4e5e1013cf2a2db25735b70b1a17fe803 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Valque?= Date: Wed, 26 Feb 2025 18:44:08 +0100 Subject: [PATCH 29/63] First bench --- .../include/CGAL/Distance_3/Ray_3_Line_3.h | 38 +- .../include/CGAL/Distance_3/Ray_3_Plane_3.h | 38 +- .../include/CGAL/Distance_3/Ray_3_Ray_3.h | 19 +- .../CGAL/Distance_3/Segment_3_Line_3.h | 129 +++++-- .../CGAL/Distance_3/Segment_3_Plane_3.h | 41 +- .../include/CGAL/Distance_3/Segment_3_Ray_3.h | 104 +---- .../CGAL/Distance_3/Triangle_3_Triangle_3.h | 35 +- .../CGAL/global_functions_distance_3.h | 15 +- .../Distance_3/test_compare_distance_3.cpp | 357 +++++++++--------- 9 files changed, 387 insertions(+), 389 deletions(-) diff --git a/Distance_3/include/CGAL/Distance_3/Ray_3_Line_3.h b/Distance_3/include/CGAL/Distance_3/Ray_3_Line_3.h index d4b51b59cbe..ed431f63128 100644 --- a/Distance_3/include/CGAL/Distance_3/Ray_3_Line_3.h +++ b/Distance_3/include/CGAL/Distance_3/Ray_3_Line_3.h @@ -77,26 +77,28 @@ squared_distance(const typename K::Line_3& line, return squared_distance(ray, line, k); } +template +typename K::Comparison_result +compare_squared_distance(const typename K::Ray_3& ray, + const typename K::Line_3& line, + const K& k, + const typename K::FT& d2) +{ + return compare(squared_distance(ray, line, k), d2); +} + +template +typename K::Comparison_result +compare_squared_distance(const typename K::Line_3& line, + const typename K::Ray_3& ray, + const K& k, + const typename K::FT& d2) +{ + return compare_squared_distance(ray, line, k, d2); +} + } // namespace internal -template -inline -typename K::FT -squared_distance(const Line_3& line, - const Ray_3& ray) -{ - return K().compute_squared_distance_3_object()(line, ray); -} - -template -inline -typename K::FT -squared_distance(const Ray_3& ray, - const Line_3& line) -{ - return K().compute_squared_distance_3_object()(ray, line); -} - } // namespace CGAL #endif // CGAL_DISTANCE_3_RAY_3_LINE_3_H diff --git a/Distance_3/include/CGAL/Distance_3/Ray_3_Plane_3.h b/Distance_3/include/CGAL/Distance_3/Ray_3_Plane_3.h index bdc9a956146..eb2a4810a32 100644 --- a/Distance_3/include/CGAL/Distance_3/Ray_3_Plane_3.h +++ b/Distance_3/include/CGAL/Distance_3/Ray_3_Plane_3.h @@ -72,26 +72,28 @@ squared_distance(const typename K::Plane_3& plane, return squared_distance(ray, plane, k); } +template +typename K::Comparison_result +compare_squared_distance(const typename K::Ray_3& ray, + const typename K::Plane_3& plane, + const K& k, + const typename K::FT& d2) +{ + return compare(squared_distance(ray, plane, k), d2); +} + +template +typename K::Comparison_result +compare_squared_distance(const typename K::Plane_3& plane, + const typename K::Ray_3& ray, + const K& k, + const typename K::FT& d2) +{ + return compare_squared_distance(ray, plane, k, d2); +} + } // namespace internal -template -inline -typename K::FT -squared_distance(const Ray_3& ray, - const Plane_3& plane) -{ - return K().compute_squared_distance_3_object()(ray, plane); -} - -template -inline -typename K::FT -squared_distance(const Plane_3& plane, - const Ray_3& ray) -{ - return K().compute_squared_distance_3_object()(plane, ray); -} - } // namespace CGAL #endif // CGAL_DISTANCE_3_RAY_3_PLANE_3_H diff --git a/Distance_3/include/CGAL/Distance_3/Ray_3_Ray_3.h b/Distance_3/include/CGAL/Distance_3/Ray_3_Ray_3.h index 8ca1eca308c..9367e095e92 100644 --- a/Distance_3/include/CGAL/Distance_3/Ray_3_Ray_3.h +++ b/Distance_3/include/CGAL/Distance_3/Ray_3_Ray_3.h @@ -117,6 +117,16 @@ squared_distance(const typename K::Ray_3& ray1, } } +template +typename K::Comparison_result +compare_squared_distance(const typename K::Ray_3& ray1, + const typename K::Ray_3& ray2, + const K& k, + const typename K::FT& d2) +{ + return compare(squared_distance(ray1, ray2, k), d2); +} + } // namespace internal template @@ -129,15 +139,6 @@ ray_ray_squared_distance_parallel(const Vector_3& ray1dir, return internal::ray_ray_squared_distance_parallel(ray1dir, ray2dir, s1_min_s2, K()); } -template -inline -typename K::FT -squared_distance(const Ray_3& ray1, - const Ray_3& ray2) -{ - return K().compute_squared_distance_3_object()(ray1, ray2); -} - } // namespace CGAL #endif // CGAL_DISTANCE_3_RAY_3_RAY_3_H diff --git a/Distance_3/include/CGAL/Distance_3/Segment_3_Line_3.h b/Distance_3/include/CGAL/Distance_3/Segment_3_Line_3.h index 5781c5ceb74..6fa52ef1f4e 100644 --- a/Distance_3/include/CGAL/Distance_3/Segment_3_Line_3.h +++ b/Distance_3/include/CGAL/Distance_3/Segment_3_Line_3.h @@ -38,6 +38,8 @@ squared_distance(const typename K::Segment_3& seg, typename K::Construct_vector_3 vector = k.construct_vector_3_object(); typename K::Compute_squared_distance_3 sq_dist = k.compute_squared_distance_3_object(); + //Probably writable with less if than currently + const Point_3& linepoint = line.point(); const Point_3& start = seg.source(); const Point_3& end = seg.target(); @@ -60,26 +62,31 @@ squared_distance(const typename K::Segment_3& seg, const RT sdm_ss2l = wdot(perpend2line, start_min_lp, k); const RT sdm_se2l = wdot(perpend2line, end_min_lp, k); - if(sdm_ss2l < RT(0)) { - crossing = (sdm_se2l >= RT(0)); - } else { - if(sdm_se2l <= RT(0)) { - crossing = true; - } else { - crossing = (sdm_ss2l == RT(0)); - } - } + // if(sdm_ss2l < RT(0)) { + // crossing = (sdm_se2l >= RT(0)); + // } else { + // if(sdm_se2l <= RT(0)) { + // crossing = true; + // } else { + // crossing = (sdm_ss2l == RT(0)); + // } + // } + crossing = (sdm_ss2l*sdm_se2l) <= RT(0); - if(crossing) { + // if(crossing) { + // return squared_distance_to_plane(normal, start_min_lp, k); + // } else { + // const RT dm = distance_measure_sub(sdm_ss2l, sdm_se2l, start_min_lp, end_min_lp, k); + // if(dm <= RT(0)) { + // return squared_distance_to_line(linedir, start_min_lp, k); + // } else { + // return squared_distance_to_line(linedir, end_min_lp, k); + // } + // } + if(crossing) return squared_distance_to_plane(normal, start_min_lp, k); - } else { - const RT dm = distance_measure_sub(sdm_ss2l, sdm_se2l, start_min_lp, end_min_lp, k); - if(dm <= RT(0)) { - return squared_distance_to_line(linedir, start_min_lp, k); - } else { - return squared_distance_to_line(linedir, end_min_lp, k); - } - } + else + return min(squared_distance_to_line(linedir, start_min_lp, k), squared_distance_to_line(linedir, end_min_lp, k)); } template @@ -91,25 +98,77 @@ squared_distance(const typename K::Line_3& line, return squared_distance(seg, line, k); } +template +typename K::Comparison_result +compare_squared_distance(const typename K::Segment_3& seg, + const typename K::Line_3& line, + const K& k, + const typename K::FT& d2) +{ + // typedef typename K::RT RT; + // typedef typename K::Point_3 Point_3; + // typedef typename K::Vector_3 Vector_3; + + // typename K::Construct_vector_3 vector = k.construct_vector_3_object(); + // typename K::Compare_squared_distance_3 csq_dist = k.compare_squared_distance_3_object(); + + // const Point_3& linepoint = line.point(); + // const Point_3& start = seg.source(); + // const Point_3& end = seg.target(); + + // if(start == end) + // return csq_dist(start, line, d2); + + // const Vector_3 linedir = line.direction().vector(); + // const Vector_3 segdir = seg.direction().vector(); + // const Vector_3 normal = wcross(segdir, linedir, k); + + // if(is_null(normal, k)) + // return compare(squared_distance_to_line(linedir, vector(linepoint,start), k), d2); + + // bool crossing; + + // const Vector_3 perpend2line = wcross(linedir, normal, k); + // const Vector_3 start_min_lp = vector(linepoint, start); + // const Vector_3 end_min_lp = vector(linepoint, end); + // const RT sdm_ss2l = wdot(perpend2line, start_min_lp, k); + // const RT sdm_se2l = wdot(perpend2line, end_min_lp, k); + + // if(sdm_ss2l < RT(0)) { + // crossing = (sdm_se2l >= RT(0)); + // } else { + // if(sdm_se2l <= RT(0)) { + // crossing = true; + // } else { + // crossing = (sdm_ss2l == RT(0)); + // } + // } + + // if(crossing) { + // return squared_distance_to_plane(normal, start_min_lp, k); + // } else { + // const RT dm = distance_measure_sub(sdm_ss2l, sdm_se2l, start_min_lp, end_min_lp, k); + // if(dm <= RT(0)) { + // return squared_distance_to_line(linedir, start_min_lp, k); + // } else { + // return squared_distance_to_line(linedir, end_min_lp, k); + // } + // } + return compare(squared_distance(seg, line, k), d2); +} + +template +typename K::Comparison_result +compare_squared_distance(const typename K::Line_3& line, + const typename K::Segment_3& seg, + const K& k, + const typename K::FT& d2) +{ + return compare_squared_distance(seg, line, k, d2); +} + } // namespace internal -template -inline -typename K::FT -squared_distance(const Segment_3& seg, - const Line_3& line) -{ - return K().compute_squared_distance_3_object()(seg, line); -} - -template -inline -typename K::FT -squared_distance(const Line_3& line, - const Segment_3& seg) -{ - return K().compute_squared_distance_3_object()(line, seg); -} } // namespace CGAL diff --git a/Distance_3/include/CGAL/Distance_3/Segment_3_Plane_3.h b/Distance_3/include/CGAL/Distance_3/Segment_3_Plane_3.h index 1c8d6799556..4b46049940c 100644 --- a/Distance_3/include/CGAL/Distance_3/Segment_3_Plane_3.h +++ b/Distance_3/include/CGAL/Distance_3/Segment_3_Plane_3.h @@ -37,12 +37,13 @@ squared_distance(const typename K::Segment_3 &seg, typedef typename K::Point_3 Point_3; typename K::Construct_vector_3 vector = k.construct_vector_3_object(); + typename K::Compute_squared_distance_3 sq_dist = k.compute_squared_distance_3_object(); const Point_3& start = seg.start(); const Point_3& end = seg.end(); if (start == end) - return squared_distance(start, plane, k); + return sq_dist(start, plane); const Point_3& planepoint = plane.point(); const Vector_3 start_min_pp = vector(planepoint, start); @@ -83,26 +84,28 @@ squared_distance(const typename K::Plane_3& plane, return squared_distance(seg, plane, k); } +template +typename K::Comparison_result +compare_squared_distance(const typename K::Segment_3 &seg, + const typename K::Plane_3 &plane, + const K& k, + const typename K::FT& d2) +{ + return compare(squared_distance(seg, plane, k), d2); +} + +template +inline typename K::Comparison_result +compare_squared_distance(const typename K::Plane_3& plane, + const typename K::Segment_3& seg, + const K& k, + const typename K::FT& d2) +{ + return compare_squared_distance(seg, plane, k, d2); +} + } // namespace internal -template -inline -typename K::FT -squared_distance(const Segment_3& seg, - const Plane_3& plane) -{ - return K().compute_squared_distance_3_object()(seg, plane); -} - -template -inline -typename K::FT -squared_distance(const Plane_3& plane, - const Segment_3& seg) -{ - return K().compute_squared_distance_3_object()(plane, seg); -} - } // namespace CGAL #endif // CGAL_DISTANCE_3_SEGMENT_3_PLANE_3_H diff --git a/Distance_3/include/CGAL/Distance_3/Segment_3_Ray_3.h b/Distance_3/include/CGAL/Distance_3/Segment_3_Ray_3.h index f787fc11056..be3d14ba4f2 100644 --- a/Distance_3/include/CGAL/Distance_3/Segment_3_Ray_3.h +++ b/Distance_3/include/CGAL/Distance_3/Segment_3_Ray_3.h @@ -168,6 +168,16 @@ squared_distance(const typename K::Ray_3& ray, return squared_distance(seg, ray, k); } +template +typename K::Comparison_result +compare_squared_distance(const typename K::Ray_3& ray, + const typename K::Segment_3& seg, + const K& k, + const typename K::FT& d2) +{ + return compare(squared_distance(ray, seg, k), d2); +} + template typename K::Comparison_result compare_squared_distance(const typename K::Segment_3& seg, @@ -175,99 +185,7 @@ compare_squared_distance(const typename K::Segment_3& seg, const K& k, const typename K::FT& d2) { - typedef typename K::RT RT; - typedef typename K::FT FT; - typedef typename K::Point_3 Point_3; - typedef typename K::Vector_3 Vector_3; - - typename K::Construct_vector_3 vector = k.construct_vector_3_object(); - typename K::Compute_squared_distance_3 sq_dist = k.compute_squared_distance_3_object(); - - const Point_3& ss = seg.source(); - const Point_3& se = seg.target(); - - if(ss == se) - return sq_dist(ss, ray); - - const Vector_3 raydir = ray.direction().vector(); - const Vector_3 segdir = seg.direction().vector(); - const Vector_3 normal = wcross(segdir, raydir, k); - - if(is_null(normal, k)) - return squared_distance_parallel(seg, ray, k); - - bool crossing1, crossing2; - - const Vector_3 perpend2seg = wcross(segdir, normal, k); - const Vector_3 perpend2ray = wcross(raydir, normal, k); - const Vector_3 ss_min_rs = vector(ray.source(), ss); - const Vector_3 se_min_rs = vector(ray.source(), se); - const RT sdm_ss2r = wdot(perpend2ray, ss_min_rs, k); - const RT sdm_se2r = wdot(perpend2ray, se_min_rs, k); - - if(sdm_ss2r < RT(0)) - { - crossing1 = (sdm_se2r >= RT(0)); - } - else - { - if(sdm_se2r <= RT(0)) - crossing1 = true; - else - crossing1 = (sdm_ss2r == RT(0)); - } - - const RT sdm_rs2s = - wdot(perpend2seg, ss_min_rs, k); - const RT sdm_re2s = wdot(perpend2seg, raydir, k); - if(sdm_rs2s < RT(0)) - { - crossing2 = (sdm_re2s >= RT(0)); - } else - { - if(sdm_re2s <= RT(0)) - crossing2 = true; - else - crossing2 = (sdm_rs2s == RT(0)); - } - - if(crossing1) - { - if(crossing2) - return squared_distance_to_plane(normal, ss_min_rs, k); - - return sq_dist(ray.source(), seg); - } - else - { - if(crossing2) - { - const RT dm = distance_measure_sub(sdm_ss2r, sdm_se2r, ss_min_rs, se_min_rs, k); - if(dm < RT(0)) - { - return sq_dist(ss, ray); - } - else - { - if(dm > RT(0)) - return sq_dist(se, ray); - else - // parallel, should not happen (no crossing) - return squared_distance_parallel(seg, ray, k); - } - } - else - { - const RT dm = distance_measure_sub(sdm_ss2r, sdm_se2r, ss_min_rs, se_min_rs, k); - if(dm == RT(0)) - return squared_distance_parallel(seg, ray, k); - - const FT min1 = (dm < RT(0)) ? sq_dist(ss, ray) - : sq_dist(se, ray); - const FT min2 = sq_dist(ray.source(), seg); - - return (min1 < min2) ? min1 : min2; - } - } + return compare_squared_distance(ray, seg, k, d2); } } // namespace internal diff --git a/Distance_3/include/CGAL/Distance_3/Triangle_3_Triangle_3.h b/Distance_3/include/CGAL/Distance_3/Triangle_3_Triangle_3.h index 13ab22eba3c..64e115b13a8 100644 --- a/Distance_3/include/CGAL/Distance_3/Triangle_3_Triangle_3.h +++ b/Distance_3/include/CGAL/Distance_3/Triangle_3_Triangle_3.h @@ -215,13 +215,13 @@ squared_distance(const typename K::Triangle_3& tr1, template typename K::Comparison_result -compare_squared_distance(const typename K::Triangle_3& tr1, - const typename K::Triangle_3& tr2, - const K& k, - const typename K::FT& d2, - bool are_triangles_known_to_be_disjoint) +compare_squared_distance_disjoint(const typename K::Triangle_3& tr1, + const typename K::Triangle_3& tr2, + const K& k, + const typename K::FT& d2) { typedef typename K::FT FT; + typedef typename K::Segment_3 Segment_3; typename K::Construct_vertex_3 vertex = k.construct_vertex_3_object(); typename K::Compare_squared_distance_3 csq_dist = k.compare_squared_distance_3_object(); @@ -235,23 +235,32 @@ compare_squared_distance(const typename K::Triangle_3& tr1, typename K::Comparison_result temp_res_ss=csq_dist(Segment_3(vertex(tr1, i%3), vertex(tr1, (i+1)%3)),Segment_3(vertex(tr2, j%3), vertex(tr2, (j+1)%3)),d2); if(temp_res_ss==SMALLER) return SMALLER; - smaller_of(res, temp_res_ss); + res=smaller_of(res, temp_res_ss); } - typename K::comparison_result temp_res_v_pl= csq_dist(vertex(tr1, i), tr2,d2); + typename K::Comparison_result temp_res_v_pl= csq_dist(vertex(tr1, i), tr2,d2); if(temp_res_v_pl==SMALLER) - return SMALLER; - smaller_of(res, temp_res_v_pl); + return SMALLER; + res=smaller_of(res, temp_res_v_pl); } - - if(!are_triangles_known_to_be_disjoint){ - //TODO check are disjoint - } return res; } +template +typename K::Comparison_result +compare_squared_distance(const typename K::Triangle_3& tr1, + const typename K::Triangle_3& tr2, + const K& k, + const typename K::FT& d2){ + if(tr1.is_degenerate() || tr2.is_degenerate()) + return compare(squared_distance(tr1,tr2, k), d2); + if(do_intersect(tr1, tr2)) + return compare(typename K::FT(0), d2); + return compare_squared_distance_disjoint(tr1, tr2, k, d2); +} + } // namespace internal } // namespace CGAL diff --git a/Distance_3/include/CGAL/global_functions_distance_3.h b/Distance_3/include/CGAL/global_functions_distance_3.h index 68c975be0ea..b4868ddc930 100644 --- a/Distance_3/include/CGAL/global_functions_distance_3.h +++ b/Distance_3/include/CGAL/global_functions_distance_3.h @@ -94,10 +94,21 @@ CGAL_COMPUTE_AND_COMPARE_SQUARED_DISTANCE_FUNCTION(Point_3, Plane_3) CGAL_COMPUTE_AND_COMPARE_SQUARED_DISTANCE_FUNCTION(Point_3, Triangle_3) CGAL_COMPUTE_AND_COMPARE_SQUARED_DISTANCE_FUNCTION(Point_3, Tetrahedron_3) -CGAL_COMPUTE_AND_COMPARE_SQUARED_DISTANCE_FUNCTION(Segment_3, Ray_3) - CGAL_COMPUTE_AND_COMPARE_SQUARED_DISTANCE_FUNCTION(Line_3, Plane_3) +//Not yet modify + +CGAL_COMPUTE_AND_COMPARE_SQUARED_DISTANCE_FUNCTION(Segment_3, Line_3) +CGAL_COMPUTE_AND_COMPARE_SQUARED_DISTANCE_FUNCTION(Segment_3, Ray_3) +CGAL_COMPUTE_AND_COMPARE_SQUARED_DISTANCE_FUNCTION(Segment_3, Plane_3) +// CGAL_COMPUTE_AND_COMPARE_SQUARED_DISTANCE_FUNCTION(Segment_3, Triangle_3) + +CGAL_COMPUTE_AND_COMPARE_SQUARED_DISTANCE_FUNCTION(Ray_3, Line_3) +CGAL_COMPUTE_AND_COMPARE_SQUARED_DISTANCE_FUNCTION(Ray_3, Plane_3) +CGAL_COMPUTE_AND_COMPARE_SQUARED_DISTANCE_FUNCTION_SELF(Ray_3) + + + } //namespace CGAL #endif // CGAL_KERNEL_GLOBAL_FUNCTIONS_DISTANCE_3_H \ No newline at end of file diff --git a/Distance_3/test/Distance_3/test_compare_distance_3.cpp b/Distance_3/test/Distance_3/test_compare_distance_3.cpp index 12f7909a26a..79c995e7497 100644 --- a/Distance_3/test/Distance_3/test_compare_distance_3.cpp +++ b/Distance_3/test/Distance_3/test_compare_distance_3.cpp @@ -148,18 +148,9 @@ private: // std::cout << std::endl << "Test" << std::endl; // std::cout << o1 << std::endl << o2 << std::endl; - // std::cout << CGAL::squared_distance(o1, o2) << std::endl; - // std::cout << CGAL::squared_distance( CGAL::Cartesian_converter()(o1) , - // CGAL::Cartesian_converter()(o2)) << std::endl; - - // if constexpr(std::is_same()){ - // if(expected_result != 0){ - // std::cout << CGAL::squared_distance(o1.supporting_line(), o2.supporting_line()) << std::endl; - // std::cout << CGAL::squared_distance( CGAL::Cartesian_converter()(o1.supporting_line()) , - // CGAL::Cartesian_converter()(o2.supporting_line())) << std::endl; - // } - // } + // std::cout << CGAL::squared_distance(o1, o2) << " " << expected_result << std::endl; // std::cout << CGAL::SMALLER << CGAL::EQUAL << CGAL::LARGER << std::endl; + // std::cout << CGAL::compare_squared_distance(o1, o2, expected_result) << std::endl; const bool res_e_o1o2 = (CGAL::compare_squared_distance(o1, o2, expected_result) == CGAL::EQUAL); const bool res_e_o2o1 = (CGAL::compare_squared_distance(o2, o1, expected_result) == CGAL::EQUAL); @@ -497,31 +488,31 @@ private: check_compare_squared_distance_with_bound(p( -8, -7, 0), R{p(23, -27, 2), p( -17, 16, 2)}, 86.368512613); } -// void R_R() -// { -// // Note : the values are not verified by hand -// std::cout << "Ray - Ray" << std::endl; -// check_compare_squared_distance_with_bound(R{p( 0, 0, 30), p( 0, 30, 30)}, R{p(100, -100, 0), p( 200, 1, 0)}, 20899.504975002); -// check_compare_squared_distance(R{p( 1, 0, 0), p( 0, 0, 0)}, R{p( 1, 3, 3), p( 0, 0, 3)}, 9); -// check_compare_squared_distance(R{p( 0, 0, 0), p( 1, 0, 0)}, R{p( 0, 0, 2), p( -1, 0, 2)}, 4); -// } + void R_R() + { + // Note : the values are not verified by hand + std::cout << "Ray - Ray" << std::endl; + check_compare_squared_distance_with_bound(R{p( 0, 0, 30), p( 0, 30, 30)}, R{p(100, -100, 0), p( 200, 1, 0)}, 20899.504975002); + check_compare_squared_distance(R{p( 1, 0, 0), p( 0, 0, 0)}, R{p( 1, 3, 3), p( 0, 0, 3)}, 9); + check_compare_squared_distance(R{p( 0, 0, 0), p( 1, 0, 0)}, R{p( 0, 0, 2), p( -1, 0, 2)}, 4); + } -// void S_R() -// { -// // Note : the values are not verified by hand -// std::cout << "Segment - Ray" << std::endl; -// check_compare_squared_distance_with_bound(S{p( 0, 0, 30), p( 0, 30, 30)}, R{p(100, -100, 0), p( 200, 1, 0)}, 20899.504975002); -// } + void S_R() + { + // Note : the values are not verified by hand + std::cout << "Segment - Ray" << std::endl; + check_compare_squared_distance_with_bound(S{p( 0, 0, 30), p( 0, 30, 30)}, R{p(100, -100, 0), p( 200, 1, 0)}, 20899.504975002); + } -// void R_L() -// { -// // Note : the values are not verified by hand -// std::cout << "Ray - Line" << std::endl; -// check_compare_squared_distance_with_bound(R{p( 0, 0, 30), p( 0, 30, 30)}, L{p(100, -100, 0), p( 200, 1, 0)}, 20899.504975002); -// check_compare_squared_distance(R{p(10, 0, 0), p( 20, 0, 0)}, L{p( 0, 0, 3), p( 0, 3, 3)}, 109); -// check_compare_squared_distance(R{p( 1, 0, 0), p( 0, 0, 0)}, L{p( 1, 3, 3), p( 0, 0, 3)}, 9); -// check_compare_squared_distance(R{p( 0, 0, 0), p( 1, 0, 0)}, L{p( 0, 0, 2), p( -1, 0, 2)}, 4); -// } + void R_L() + { + // Note : the values are not verified by hand + std::cout << "Ray - Line" << std::endl; + check_compare_squared_distance_with_bound(R{p( 0, 0, 30), p( 0, 30, 30)}, L{p(100, -100, 0), p( 200, 1, 0)}, 20899.504975002); + check_compare_squared_distance(R{p(10, 0, 0), p( 20, 0, 0)}, L{p( 0, 0, 3), p( 0, 3, 3)}, 109); + check_compare_squared_distance(R{p( 1, 0, 0), p( 0, 0, 0)}, L{p( 1, 3, 3), p( 0, 0, 3)}, 9); + check_compare_squared_distance(R{p( 0, 0, 0), p( 1, 0, 0)}, L{p( 0, 0, 2), p( -1, 0, 2)}, 4); + } void P_L() { @@ -530,14 +521,14 @@ private: check_compare_squared_distance(p( 0, 0, 2), L{p( 0, 0, 0), p( 1, 2, 0)}, 4); } -// void S_L() -// { -// // Note : the values are not verified by hand -// std::cout << "Segment - Line" << std::endl; -// check_compare_squared_distance(S{p( 1, 0, 0), p( 0, 0, 0)}, L{p( 1, 3, 3), p( 0, 0, 3)}, 9); -// check_compare_squared_distance(S{p(-90, 0, 0), p(-10, 0, 0)}, L{p( 0, 0, 3), p( 0, 3, 3)}, 109); -// check_compare_squared_distance(S{p( 0, 0, 0), p( 1, 0, 0)}, L{p( 0, 0, 2), p( -1, 0, 2)}, 4); -// } + void S_L() + { + // Note : the values are not verified by hand + std::cout << "Segment - Line" << std::endl; + check_compare_squared_distance(S{p( 1, 0, 0), p( 0, 0, 0)}, L{p( 1, 3, 3), p( 0, 0, 3)}, 9); + check_compare_squared_distance(S{p(-90, 0, 0), p(-10, 0, 0)}, L{p( 0, 0, 3), p( 0, 3, 3)}, 109); + check_compare_squared_distance(S{p( 0, 0, 0), p( 1, 0, 0)}, L{p( 0, 0, 2), p( -1, 0, 2)}, 4); + } void L_L() { @@ -554,19 +545,19 @@ private: check_compare_squared_distance(p(2, 5, 3), Pl(0, 1, 0, 0), 25); } -// void S_Pl() -// { -// std::cout << "Segment - Plane" << std::endl; -// check_compare_squared_distance(S{p(2, -3, 3), p( 3,-7, 4)}, pl(0, 1, 0, 0), 9); -// } + void S_Pl() + { + std::cout << "Segment - Plane" << std::endl; + check_compare_squared_distance(S{p(2, -3, 3), p( 3,-7, 4)}, pl(0, 1, 0, 0), 9); + } -// void R_Pl() -// { -// std::cout << "Ray - Plane" << std::endl; -// check_compare_squared_distance(R{p(2, -4, 3), p( 3,-4, 4)}, Pl(0, 1, 0, 0), 16); -// check_compare_squared_distance(R{p(2, -4, 3), p( 3, 4, 4)}, Pl(0, 1, 0, 0), 0); -// check_compare_squared_distance(R{p(2, -4, 3), p( 3,-8, 4)}, Pl(0, 1, 0, 0), 16); -// } + void R_Pl() + { + std::cout << "Ray - Plane" << std::endl; + check_compare_squared_distance(R{p(2, -4, 3), p( 3,-4, 4)}, Pl(0, 1, 0, 0), 16); + check_compare_squared_distance(R{p(2, -4, 3), p( 3, 4, 4)}, Pl(0, 1, 0, 0), 0); + check_compare_squared_distance(R{p(2, -4, 3), p( 3,-8, 4)}, Pl(0, 1, 0, 0), 16); + } void L_Pl() { @@ -587,151 +578,153 @@ private: check_compare_squared_distance(Pl(-2, 1, 1, 0), Pl(2, 1, 3, 0), 0); } -// void T_T() -// { -// std::cout << "Triangle - Triangle" << std::endl; + void T_T() + { + std::cout << "Triangle - Triangle" << std::endl; -// // min between vertices (hardcoded) -// check_compare_squared_distance(T{p(0,0,0), p(1,0,0), p(0,1,0)}, T{p(0,0,2), p(-1,0,2), p(0,-1,2)}, 4); -// check_compare_squared_distance(T{p(0,0,0), p(1,0,0), p(0,1,0)}, T{p(-1,0,2), p(0,0,2), p(0,-1,2)}, 4); + // min between vertices (hardcoded) + check_compare_squared_distance(T{p(0,0,0), p(1,0,0), p(0,1,0)}, T{p(0,0,2), p(-1,0,2), p(0,-1,2)}, 4); + check_compare_squared_distance(T{p(0,0,0), p(1,0,0), p(0,1,0)}, T{p(-1,0,2), p(0,0,2), p(0,-1,2)}, 4); -// check_compare_squared_distance(T{p(1,2,3), P{FT(4.2),FT(5.3),-6}, p(7,-8,9)}, -// T{P{FT(10.1), 12, -10}, p(15, 14, -12), p(19, 45, -20)}, -// CGAL::squared_distance(P{FT(4.2),FT(5.3),-6}, P{FT(10.1), 12, -10})); + check_compare_squared_distance(T{p(1,2,3), P{FT(4.2),FT(5.3),-6}, p(7,-8,9)}, + T{P{FT(10.1), 12, -10}, p(15, 14, -12), p(19, 45, -20)}, + CGAL::squared_distance(P{FT(4.2),FT(5.3),-6}, P{FT(10.1), 12, -10})); -// // min vertex-edge (hardcoded) -// check_compare_squared_distance(T{p(0,0,0), p(1,0,0), p(0,1,0)}, T{p(1,1,0), p(2,1,0), p(1,2,0)}, 0.5); -// check_compare_squared_distance(T{p(0,0,0), p(2,0,0), p(0,2,0)}, T{p(0,-1,1), p(2,0,1), p(2,-1,1)}, 1); + // min vertex-edge (hardcoded) + check_compare_squared_distance(T{p(0,0,0), p(1,0,0), p(0,1,0)}, T{p(1,1,0), p(2,1,0), p(1,2,0)}, 0.5); + check_compare_squared_distance(T{p(0,0,0), p(2,0,0), p(0,2,0)}, T{p(0,-1,1), p(2,0,1), p(2,-1,1)}, 1); -// for(int i=0; i, gte::Triangle3 > GTE_TT_checker; -// gte::Triangle3 gte_tr1{{p0.x(), p0.y(), p0.z()}, {p1.x(), p1.y(), p1.z()}, {p2.x(), p2.y(), p2.z()}}; -// gte::Triangle3 gte_tr2{{p3.x(), p3.y(), p3.z()}, {p4.x(), p4.y(), p4.z()}, {p5.x(), p5.y(), p5.z()}}; -// auto gte_res = GTE_TT_checker(gte_tr1, gte_tr2); + // generic triangles + T tr1{p0, p1, p2}, tr2{p3, p4, p5}; + do_intersect_check(tr1, tr2); -// std::cout << "dist (CGAL) : " << CGAL::squared_distance(tr1, tr2) << std::endl; -// std::cout << "dist (GTE) : " << gte_res.sqrDistance << std::endl; -// std::cout << "diff CGAL GTE : " << (gte_res.sqrDistance - CGAL::squared_distance(tr1, tr2)) << std::endl; +#ifdef CGAL_USE_GTE_AS_SANITY_CHECK + gte::DCPQuery, gte::Triangle3 > GTE_TT_checker; + gte::Triangle3 gte_tr1{{p0.x(), p0.y(), p0.z()}, {p1.x(), p1.y(), p1.z()}, {p2.x(), p2.y(), p2.z()}}; + gte::Triangle3 gte_tr2{{p3.x(), p3.y(), p3.z()}, {p4.x(), p4.y(), p4.z()}, {p5.x(), p5.y(), p5.z()}}; + auto gte_res = GTE_TT_checker(gte_tr1, gte_tr2); -// // don't assert on purpose, GTE has slightly (10^-30 different results, even with an exact NT) -// are_equal(CGAL::squared_distance(tr1, tr2), gte_res.sqrDistance); -// #endif -// } -// } + std::cout << "dist (CGAL) : " << CGAL::squared_distance(tr1, tr2) << std::endl; + std::cout << "dist (GTE) : " << gte_res.sqrDistance << std::endl; + std::cout << "diff CGAL GTE : " << (gte_res.sqrDistance - CGAL::squared_distance(tr1, tr2)) << std::endl; + + // don't assert on purpose, GTE has slightly (10^-30 different results, even with an exact NT) + are_equal(CGAL::squared_distance(tr1, tr2), gte_res.sqrDistance); +#endif + } + } public: void run() @@ -747,18 +740,18 @@ public: P_Tet(); S_S(); - // S_R(); - // S_L(); - // S_Pl(); + S_R(); + S_L(); + S_Pl(); - // R_R(); - // R_L(); - // R_Pl(); + R_R(); + R_L(); + R_Pl(); L_L(); L_Pl(); - // T_T(); + T_T(); Pl_Pl(); } From fbf588e936ce41a1ef0cdf0ba17502c65fe6295c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Valque?= Date: Thu, 27 Feb 2025 10:58:53 +0100 Subject: [PATCH 30/63] Get back on CSQ Point-Segment, new was slower --- .../CGAL/Distance_3/Point_3_Segment_3.h | 33 +------------------ 1 file changed, 1 insertion(+), 32 deletions(-) diff --git a/Distance_3/include/CGAL/Distance_3/Point_3_Segment_3.h b/Distance_3/include/CGAL/Distance_3/Point_3_Segment_3.h index aa76b52e66c..f13fa5ae5de 100644 --- a/Distance_3/include/CGAL/Distance_3/Point_3_Segment_3.h +++ b/Distance_3/include/CGAL/Distance_3/Point_3_Segment_3.h @@ -116,38 +116,7 @@ compare_squared_distance(const typename K::Point_3& pt, const K& k, const typename K::FT& d2) { - typedef typename K::RT RT; - typedef typename K::FT FT; - typedef typename K::Vector_3 Vector_3; - - typename K::Construct_vector_3 vector = k.construct_vector_3_object(); - typename K::Compare_squared_distance_3 csq_dist = k.compare_squared_distance_3_object(); - - // assert that the segment is valid (non zero length). - const Vector_3 diff = vector(seg.source(), pt); - const Vector_3 segvec = vector(seg.source(), seg.target()); - - // If the segment is degen - if(seg.source()==seg.target()) - return csq_dist(pt, seg.source(), d2); - - // Compare first the distance to the line, if larger we can exit early - const typename K::Comparison_result res_pl= compare_squared_distance_to_line(segvec, diff, k, d2); - if(res_pl==LARGER) - return LARGER; - - //If the distance is realized by the source - const RT d = wdot(diff, segvec, k); - if(d <= RT(0)) - return compare(FT(diff*diff), d2); - - //If the distance is realized by the target - const RT e = wdot(segvec, segvec, k); - if(wmult((K*)0, d, segvec.hw()) > wmult((K*)0, e, diff.hw())) - return csq_dist(pt, seg.target(), d2); - - //If the distance is realized by the interior - return res_pl; + return compare(squared_distance(pt, seg, k), d2); } template From 833a2bb4d080cd8524c8f96afb3cb1beb8568a85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Valque?= Date: Thu, 27 Feb 2025 18:00:40 +0100 Subject: [PATCH 31/63] Correct bug in CSQ Triangle_Triangle --- Distance_3/include/CGAL/Distance_3/Triangle_3_Triangle_3.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Distance_3/include/CGAL/Distance_3/Triangle_3_Triangle_3.h b/Distance_3/include/CGAL/Distance_3/Triangle_3_Triangle_3.h index 64e115b13a8..119af808e72 100644 --- a/Distance_3/include/CGAL/Distance_3/Triangle_3_Triangle_3.h +++ b/Distance_3/include/CGAL/Distance_3/Triangle_3_Triangle_3.h @@ -243,6 +243,10 @@ compare_squared_distance_disjoint(const typename K::Triangle_3& tr1, return SMALLER; res=smaller_of(res, temp_res_v_pl); + temp_res_v_pl= csq_dist(vertex(tr2, i), tr1,d2); + if(temp_res_v_pl==SMALLER) + return SMALLER; + res=smaller_of(res, temp_res_v_pl); } return res; From 6fd52ee0d5a2e919aeb139d319e8a750c9074fff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Valque?= Date: Thu, 27 Feb 2025 18:09:43 +0100 Subject: [PATCH 32/63] benchmark --- .../benchmark/Distance_3/CMakeLists.txt | 23 ++ .../Distance_3/bench_compare_distance_3.cpp | 297 ++++++++++++++++++ .../benchmark/Distance_3/bench_distance_3.cpp | 280 +++++++++++++++++ .../Distance_3/bench_thingi10k_3.cpp | 140 +++++++++ 4 files changed, 740 insertions(+) create mode 100644 Distance_3/benchmark/Distance_3/CMakeLists.txt create mode 100644 Distance_3/benchmark/Distance_3/bench_compare_distance_3.cpp create mode 100644 Distance_3/benchmark/Distance_3/bench_distance_3.cpp create mode 100644 Distance_3/benchmark/Distance_3/bench_thingi10k_3.cpp diff --git a/Distance_3/benchmark/Distance_3/CMakeLists.txt b/Distance_3/benchmark/Distance_3/CMakeLists.txt new file mode 100644 index 00000000000..3cc6ca18f7d --- /dev/null +++ b/Distance_3/benchmark/Distance_3/CMakeLists.txt @@ -0,0 +1,23 @@ +# Created by the script cgal_create_cmake_script +# This is the CMake script for compiling a CGAL application. + +cmake_minimum_required(VERSION 3.12...3.31) +project(Distance_3_Benchs) + +find_package(CGAL REQUIRED) + +if(MSVC) + # Turn off a VC++ warning on a potential division by zero + # in Cartesian_kernel/include/CGAL/constructions/kernel_ftC3.h + # where CGAL_assume() does not help + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4723") +endif() + +# create a target per cppfile +file( + GLOB cppfiles + RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp) +foreach(cppfile ${cppfiles}) + create_single_source_cgal_program("${cppfile}") +endforeach() diff --git a/Distance_3/benchmark/Distance_3/bench_compare_distance_3.cpp b/Distance_3/benchmark/Distance_3/bench_compare_distance_3.cpp new file mode 100644 index 00000000000..d7005a594ab --- /dev/null +++ b/Distance_3/benchmark/Distance_3/bench_compare_distance_3.cpp @@ -0,0 +1,297 @@ +#include +#include +#include +#include +#include +#include + +#include + +#include + +#include +#include +#include + +// #define CGAL_USE_GTE_AS_SANITY_CHECK +#ifdef CGAL_USE_GTE_AS_SANITY_CHECK +#include +#include +#endif + +#include +#include + +struct randomint +{ + randomint() ; + int get() const { return sequence[cur]; } + int next() { + cur = (cur + 1) % 11; + return get(); + } + +private: + int sequence[11]; + int cur; +}; + +inline randomint::randomint() +{ + cur = 0; + sequence[0] = 19; + sequence[1] = 5; + sequence[2] = 17; + sequence[3] = 13; + sequence[4] = 29; + sequence[5] = 2; + sequence[6] = 23; + sequence[7] = 31; + sequence[8] = 3; + sequence[9] = 37; + sequence[10] = 11; +} + +randomint ri; + +template +struct Test +{ + typedef typename K::RT RT; + typedef typename K::FT FT; + typedef typename K::Comparison_result Comparison_result; + typedef typename K::Point_3 P; + typedef typename K::Segment_3 S; + typedef typename K::Vector_3 V; + typedef typename K::Ray_3 R; + typedef typename K::Line_3 L; + typedef typename K::Triangle_3 T; + typedef typename K::Plane_3 Pl; + typedef typename K::Tetrahedron_3 Tet; + typedef typename K::Iso_cuboid_3 Cub; + +private: + CGAL::Random& r; + double m = 0, M = 1; + +public: + Test(CGAL::Random& r) : r(r) { } + +private: + inline RT to_nt(int d) const { return RT(d); } + + P p(int x, int y, int z) + { + int w = ri.next(); + return P(to_nt(x*w), to_nt(y*w), to_nt(z*w), to_nt(w)); + } + + P random_point() const + { + return P(FT(r.get_double(m, M)), FT(r.get_double(m, M)), FT(r.get_double(m, M))); + } + + Pl pl(int a, int b, int c, int d) + { + int w = ri.next(); + return Pl(to_nt(a*w), to_nt(b*w), to_nt(c*w), to_nt(d*w)); + } + + +private: + void P_P(int N, FT d2) + { + std::cout << "Point - Point" << std::endl; + CGAL::Real_timer t; + t.start(); + for(int i=0; i(F& f){ + + }; + P_P(10000000, FT(0.1)); + P_S(1000000, FT(0.1)); + + std::cout << std::endl; + P_T(500000, FT(10)); + P_T(500000, FT(0.1)); + P_T(500000, FT(0.001)); + std::cout << std::endl; + + P_Tet(200000, FT(0.1)); + + std::cout << std::endl; + S_S(500000, FT(10)); + S_S(500000, FT(0.1)); + S_S(500000, FT(0.001)); + std::cout << std::endl; + S_L(500000, FT(0.1)); + + std::cout << std::endl; + T_T(500000, FT(10)); + T_T(500000, FT(0.1)); + T_T(500000, FT(0.001)); + std::cout << std::endl; + std::cout << std::endl; + } +}; + +int main(int argc, char** argv) +{ + std::cout.precision(17); + std::cerr.precision(17); + + std::cout << "3D Distance tests" << std::endl; + + CGAL::Random rp; + CGAL::Random r(argc==1?rp.get_seed():std::stoi(argv[1])); + std::cout << "random seed = " << r.get_seed() << std::endl; + + Test >(r).run(); + Test >(r).run(); +// Test > >(r).run(); + + // Test >(r).run(); + + Test(r).run(); + + Test(r).run(); + + std::cout << "Done!" << std::endl; + + return EXIT_SUCCESS; +} diff --git a/Distance_3/benchmark/Distance_3/bench_distance_3.cpp b/Distance_3/benchmark/Distance_3/bench_distance_3.cpp new file mode 100644 index 00000000000..641bd01f0ae --- /dev/null +++ b/Distance_3/benchmark/Distance_3/bench_distance_3.cpp @@ -0,0 +1,280 @@ +#include +#include +#include +#include +#include +#include + +#include + +#include + +#include +#include +#include + +// #define CGAL_USE_GTE_AS_SANITY_CHECK +#ifdef CGAL_USE_GTE_AS_SANITY_CHECK +#include +#include +#endif + +#include +#include + +struct randomint +{ + randomint() ; + int get() const { return sequence[cur]; } + int next() { + cur = (cur + 1) % 11; + return get(); + } + +private: + int sequence[11]; + int cur; +}; + +inline randomint::randomint() +{ + cur = 0; + sequence[0] = 19; + sequence[1] = 5; + sequence[2] = 17; + sequence[3] = 13; + sequence[4] = 29; + sequence[5] = 2; + sequence[6] = 23; + sequence[7] = 31; + sequence[8] = 3; + sequence[9] = 37; + sequence[10] = 11; +} + +randomint ri; + +template +struct Test +{ + typedef typename K::RT RT; + typedef typename K::FT FT; + typedef typename K::Comparison_result Comparison_result; + typedef typename K::Point_3 P; + typedef typename K::Segment_3 S; + typedef typename K::Vector_3 V; + typedef typename K::Ray_3 R; + typedef typename K::Line_3 L; + typedef typename K::Triangle_3 T; + typedef typename K::Plane_3 Pl; + typedef typename K::Tetrahedron_3 Tet; + typedef typename K::Iso_cuboid_3 Cub; + +private: + CGAL::Random& r; + double m = 0, M = 1; + +public: + Test(CGAL::Random& r) : r(r) { } + +private: + inline RT to_nt(int d) const { return RT(d); } + + P p(int x, int y, int z) + { + int w = ri.next(); + return P(to_nt(x*w), to_nt(y*w), to_nt(z*w), to_nt(w)); + } + + P random_point() const + { + return P(FT(r.get_double(m, M)), FT(r.get_double(m, M)), FT(r.get_double(m, M))); + } + + Pl pl(int a, int b, int c, int d) + { + int w = ri.next(); + return Pl(to_nt(a*w), to_nt(b*w), to_nt(c*w), to_nt(d*w)); + } + + +private: + void P_P(int N) + { + std::cout << "Point - Point" << std::endl; + CGAL::Real_timer t; + t.start(); + for(int i=0; i +#include +#include +#include +#include +#include + +#include +#include + +#include +#include + +#include + +#include +#include + + +template +struct Test +{ + typedef typename K::RT RT; + typedef typename K::FT FT; + typedef typename K::Comparison_result Comparison_result; + typedef typename K::Point_3 P; + typedef typename K::Segment_3 S; + typedef typename K::Vector_3 V; + typedef typename K::Ray_3 R; + typedef typename K::Line_3 L; + typedef typename K::Triangle_3 T; + typedef typename K::Plane_3 Pl; + typedef typename K::Tetrahedron_3 Tet; + typedef typename K::Iso_cuboid_3 Cub; + + typedef std::vector >::iterator Iterator; + typedef CGAL::Box_intersection_d::Box_with_handle_d CBox; + + size_t nb_closed_pairs; + +public: + Test() : nb_closed_pairs(0){ } + + void close_triangles(std::vector

    &points, std::vector >& triangles, FT d2){ + std::vector< CBox > boxes; + auto extend_bbox3=[&](const Iterator it, FT& d2){ + CGAL::Bbox_3 bb = points[(*it)[0]].bbox()+points[(*it)[1]].bbox()+points[(*it)[2]].bbox(); + return CGAL::Bbox_3(bb.xmin(),bb.ymin(),bb.zmin(),bb.xmax()+CGAL::to_double(d2),bb.ymax()+CGAL::to_double(d2),bb.zmax()+CGAL::to_double(d2)); + }; + + auto callback=[&](const CBox &ba, const CBox &bb){ + boost::container::small_vector &a = *(ba.handle()); + boost::container::small_vector &b = *(bb.handle()); + + std::sort(a.begin(), a.end()); + std::sort(b.begin(), b.end()); + std::vector v; + std::set_intersection(a.begin(), a.end(), b.begin(), b.end(),std::back_inserter(v)); + + if(v.size()!=0) //they have common vertices + return; + + bool comp = K().compare_squared_distance_3_object()(T(points[a[0]], points[a[1]], points[a[2]]), + T(points[b[0]], points[b[1]], points[b[2]]), + d2)!=CGAL::LARGER; + if(comp) + { + nb_closed_pairs++; + } + }; + + for(Iterator it=triangles.begin(); it!=triangles.end(); ++it) + boxes.emplace_back(extend_bbox3(it, d2), it); + + CGAL::box_self_intersection_d(boxes.begin(), boxes.end(), callback); + } + + void run(std::string filename, FT d2) + { + nb_closed_pairs=0; + std::vector

    input_points; + std::vector> input_triangles; + + if (!CGAL::IO::read_polygon_soup(filename, input_points, input_triangles)) + { + std::cerr << "Cannot read " << filename << "\n"; + return; + } + CGAL::Real_timer t; + t.start(); + close_triangles(input_points, input_triangles, d2); + t.stop(); + std::cout << "#points = " << input_points.size() << " and #triangles = " << input_triangles.size() << " has " << nb_closed_pairs << " pairs at squared distance " << d2 << " in " << t.time() << " sec." << std::endl; + } +}; + +int main(int argc, char** argv) +{ + const std::string filename = argc == 1 ? CGAL::data_file_path("meshes/elephant.off") + : std::string(argv[1]); + + // const std::string out_file = argc <= 2 ? "rounded_soup.off" + // : std::string(argv[2]); + + std::cout.precision(17); + std::cerr.precision(17); + + std::cout << "3D Distance bench" << std::endl; + + std::vector input_points; + std::vector> input_triangles; + + if (!CGAL::IO::read_polygon_soup(filename, input_points, input_triangles)) + { + std::cerr << "Cannot read " << filename << "\n"; + return 1; + } + CGAL::Bbox_3 bb = CGAL::bbox_3(input_points.begin(), input_points.end()); + double max= (std::max)((std::max)(bb.xmax()-bb.xmin(),bb.ymax()-bb.ymin()),bb.zmax()-bb.zmin()); + +// Test >().run(filename); +// Test >().run(filename); +// Test > >(r).run(); + + // Test >(r).run(); + + // Test().run(filename, max*max); + // Test().run(filename, 10*max*max/input_points.size()); + Test().run(filename, 100*max/input_points.size()); + Test().run(filename, max/input_points.size()); + Test().run(filename, max/(100*input_points.size())); + + Test().run(filename, 100*max/input_points.size()); + Test().run(filename, max/input_points.size()); + Test().run(filename, max/(100*input_points.size())); + + std::cout << "Done!" << std::endl; + + return EXIT_SUCCESS; +} From 91f29df1068587da74e47c9238876eea87fb044c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Valque?= Date: Fri, 28 Feb 2025 13:58:12 +0100 Subject: [PATCH 33/63] Cleaning of the files, remove useless comments, correct indent and tab --- .../Distance_3/bench_thingi10k_3.cpp | 25 +++++-- .../include/CGAL/Distance_3/Plane_3_Plane_3.h | 2 +- .../include/CGAL/Distance_3/Point_3_Ray_3.h | 17 +---- .../CGAL/Distance_3/Point_3_Segment_3.h | 1 + .../CGAL/Distance_3/Point_3_Tetrahedron_3.h | 4 ++ .../CGAL/Distance_3/Point_3_Triangle_3.h | 3 + .../CGAL/Distance_3/Segment_3_Line_3.h | 69 +------------------ .../CGAL/Distance_3/Segment_3_Segment_3.h | 4 ++ .../CGAL/Distance_3/Triangle_3_Triangle_3.h | 12 +++- .../internal/squared_distance_utils_3.h | 35 +--------- .../CGAL/global_functions_distance_3.h | 15 ++-- .../test/Distance_3/test_distance_3.cpp | 3 - .../include/CGAL/Kernel/function_objects.h | 4 -- 13 files changed, 49 insertions(+), 145 deletions(-) diff --git a/Distance_3/benchmark/Distance_3/bench_thingi10k_3.cpp b/Distance_3/benchmark/Distance_3/bench_thingi10k_3.cpp index 70fe503d513..f2b17155f89 100644 --- a/Distance_3/benchmark/Distance_3/bench_thingi10k_3.cpp +++ b/Distance_3/benchmark/Distance_3/bench_thingi10k_3.cpp @@ -107,7 +107,7 @@ int main(int argc, char** argv) std::cout << "3D Distance bench" << std::endl; - std::vector input_points; + std::vector::Point_3> input_points; std::vector> input_triangles; if (!CGAL::IO::read_polygon_soup(filename, input_points, input_triangles)) @@ -126,13 +126,24 @@ int main(int argc, char** argv) // Test().run(filename, max*max); // Test().run(filename, 10*max*max/input_points.size()); - Test().run(filename, 100*max/input_points.size()); - Test().run(filename, max/input_points.size()); - Test().run(filename, max/(100*input_points.size())); - Test().run(filename, 100*max/input_points.size()); - Test().run(filename, max/input_points.size()); - Test().run(filename, max/(100*input_points.size())); + double average_length=0; + double min_sq_length=CGAL::squared_distance(input_points[input_triangles[0][0]],input_points[input_triangles[0][1]]); + for(auto &tr: input_triangles){ + for(int i=0; i<3; ++i){ + double l=CGAL::squared_distance(input_points[tr[i]], input_points[tr[(i+1)%3]]); + min_sq_length=(std::min)(min_sq_length, l); + average_length+=std::sqrt(l); + } + } + average_length/=(3*input_triangles.size()); + + // Test().run(filename, 100*max/input_points.size()); + Test().run(filename, average_length*average_length/256); + Test().run(filename, min_sq_length*4); + + Test().run(filename, average_length*average_length/256); + Test().run(filename, min_sq_length*4); std::cout << "Done!" << std::endl; diff --git a/Distance_3/include/CGAL/Distance_3/Plane_3_Plane_3.h b/Distance_3/include/CGAL/Distance_3/Plane_3_Plane_3.h index 4ddb7ad1702..6331d938d82 100644 --- a/Distance_3/include/CGAL/Distance_3/Plane_3_Plane_3.h +++ b/Distance_3/include/CGAL/Distance_3/Plane_3_Plane_3.h @@ -46,7 +46,7 @@ compare_squared_distance(const typename K::Plane_3& plane1, const K& k, const typename K::FT& d2) { - return compare(squared_distance(plane1,plane2,k), d2); + return compare(squared_distance(plane1,plane2,k), d2); } } // namespace internal diff --git a/Distance_3/include/CGAL/Distance_3/Point_3_Ray_3.h b/Distance_3/include/CGAL/Distance_3/Point_3_Ray_3.h index cb2bdd7401d..bb4195cbb75 100644 --- a/Distance_3/include/CGAL/Distance_3/Point_3_Ray_3.h +++ b/Distance_3/include/CGAL/Distance_3/Point_3_Ray_3.h @@ -94,22 +94,7 @@ compare_squared_distance(const typename K::Point_3& pt, const K& k, const typename K::FT &d2) { - typedef typename K::Vector_3 Vector_3; - - typename K::Construct_vector_3 vector = k.construct_vector_3_object(); - - const Vector_3 dir = ray.direction().vector(); - const Vector_3 diff = vector(ray.source(), pt); - - //Compare first the distance to the line, if larger we can exit early - const typename K::Comparison_result res_pl = compare_squared_distance_to_line(dir, diff, k, d2); - if(res_pl==LARGER) - return LARGER; - - if(!is_acute_angle(dir, diff, k)) - return compare(diff*diff, d2); - - return res_pl; + return compare(squared_distance(pt, ray, k), d2); } template diff --git a/Distance_3/include/CGAL/Distance_3/Point_3_Segment_3.h b/Distance_3/include/CGAL/Distance_3/Point_3_Segment_3.h index f13fa5ae5de..07f79bfd912 100644 --- a/Distance_3/include/CGAL/Distance_3/Point_3_Segment_3.h +++ b/Distance_3/include/CGAL/Distance_3/Point_3_Segment_3.h @@ -116,6 +116,7 @@ compare_squared_distance(const typename K::Point_3& pt, const K& k, const typename K::FT& d2) { + //Doing an early exit was slower. return compare(squared_distance(pt, seg, k), d2); } diff --git a/Distance_3/include/CGAL/Distance_3/Point_3_Tetrahedron_3.h b/Distance_3/include/CGAL/Distance_3/Point_3_Tetrahedron_3.h index e4505ec0f30..031a60a6650 100644 --- a/Distance_3/include/CGAL/Distance_3/Point_3_Tetrahedron_3.h +++ b/Distance_3/include/CGAL/Distance_3/Point_3_Tetrahedron_3.h @@ -155,6 +155,10 @@ compare_squared_distance(const typename K::Point_3& pt, typename K::Construct_vertex_3 vertex = k.construct_vertex_3_object(); typename K::Orientation_3 orientation = k.orientation_3_object(); + /* The content of this function is very similar with the one above, the difference is we can exit earlier if + we found a triangle closer than d or plane farther than d since we do not need the exact distance. + (there are also early exits in calling functions) */ + bool on_bounded_side = true; bool inside_or_far_to_the_plane = false; const Point_3& t0 = vertex(tet, 0); diff --git a/Distance_3/include/CGAL/Distance_3/Point_3_Triangle_3.h b/Distance_3/include/CGAL/Distance_3/Point_3_Triangle_3.h index 759062de81f..0f5d86f7a06 100644 --- a/Distance_3/include/CGAL/Distance_3/Point_3_Triangle_3.h +++ b/Distance_3/include/CGAL/Distance_3/Point_3_Triangle_3.h @@ -309,6 +309,9 @@ compare_squared_distance_to_triangle(const typename K::Point_3& pt, typename K::Compute_squared_distance_3 sq_dist = k.compute_squared_distance_3_object(); typename K::Compare_squared_distance_3 csq_dist = k.compare_squared_distance_3_object(); + /* The content of this function is very similar with the one above, the difference is we can exit earlier if + we found a segment closer than d or if the point is farther than d to the plane since we do not need the exact distance */ + const Vector_3 e1 = vector(t0, t1); const Vector_3 oe3 = vector(t0, t2); const Vector_3 normal = wcross(e1, oe3, k); diff --git a/Distance_3/include/CGAL/Distance_3/Segment_3_Line_3.h b/Distance_3/include/CGAL/Distance_3/Segment_3_Line_3.h index 6fa52ef1f4e..f5d3336b5d6 100644 --- a/Distance_3/include/CGAL/Distance_3/Segment_3_Line_3.h +++ b/Distance_3/include/CGAL/Distance_3/Segment_3_Line_3.h @@ -62,27 +62,8 @@ squared_distance(const typename K::Segment_3& seg, const RT sdm_ss2l = wdot(perpend2line, start_min_lp, k); const RT sdm_se2l = wdot(perpend2line, end_min_lp, k); - // if(sdm_ss2l < RT(0)) { - // crossing = (sdm_se2l >= RT(0)); - // } else { - // if(sdm_se2l <= RT(0)) { - // crossing = true; - // } else { - // crossing = (sdm_ss2l == RT(0)); - // } - // } crossing = (sdm_ss2l*sdm_se2l) <= RT(0); - // if(crossing) { - // return squared_distance_to_plane(normal, start_min_lp, k); - // } else { - // const RT dm = distance_measure_sub(sdm_ss2l, sdm_se2l, start_min_lp, end_min_lp, k); - // if(dm <= RT(0)) { - // return squared_distance_to_line(linedir, start_min_lp, k); - // } else { - // return squared_distance_to_line(linedir, end_min_lp, k); - // } - // } if(crossing) return squared_distance_to_plane(normal, start_min_lp, k); else @@ -105,55 +86,7 @@ compare_squared_distance(const typename K::Segment_3& seg, const K& k, const typename K::FT& d2) { - // typedef typename K::RT RT; - // typedef typename K::Point_3 Point_3; - // typedef typename K::Vector_3 Vector_3; - - // typename K::Construct_vector_3 vector = k.construct_vector_3_object(); - // typename K::Compare_squared_distance_3 csq_dist = k.compare_squared_distance_3_object(); - - // const Point_3& linepoint = line.point(); - // const Point_3& start = seg.source(); - // const Point_3& end = seg.target(); - - // if(start == end) - // return csq_dist(start, line, d2); - - // const Vector_3 linedir = line.direction().vector(); - // const Vector_3 segdir = seg.direction().vector(); - // const Vector_3 normal = wcross(segdir, linedir, k); - - // if(is_null(normal, k)) - // return compare(squared_distance_to_line(linedir, vector(linepoint,start), k), d2); - - // bool crossing; - - // const Vector_3 perpend2line = wcross(linedir, normal, k); - // const Vector_3 start_min_lp = vector(linepoint, start); - // const Vector_3 end_min_lp = vector(linepoint, end); - // const RT sdm_ss2l = wdot(perpend2line, start_min_lp, k); - // const RT sdm_se2l = wdot(perpend2line, end_min_lp, k); - - // if(sdm_ss2l < RT(0)) { - // crossing = (sdm_se2l >= RT(0)); - // } else { - // if(sdm_se2l <= RT(0)) { - // crossing = true; - // } else { - // crossing = (sdm_ss2l == RT(0)); - // } - // } - - // if(crossing) { - // return squared_distance_to_plane(normal, start_min_lp, k); - // } else { - // const RT dm = distance_measure_sub(sdm_ss2l, sdm_se2l, start_min_lp, end_min_lp, k); - // if(dm <= RT(0)) { - // return squared_distance_to_line(linedir, start_min_lp, k); - // } else { - // return squared_distance_to_line(linedir, end_min_lp, k); - // } - // } + // Perform an early exit was slower return compare(squared_distance(seg, line, k), d2); } diff --git a/Distance_3/include/CGAL/Distance_3/Segment_3_Segment_3.h b/Distance_3/include/CGAL/Distance_3/Segment_3_Segment_3.h index 310fd80f1e2..2808ad85fa7 100644 --- a/Distance_3/include/CGAL/Distance_3/Segment_3_Segment_3.h +++ b/Distance_3/include/CGAL/Distance_3/Segment_3_Segment_3.h @@ -206,6 +206,10 @@ compare_squared_distance(const typename K::Segment_3& s1, typename K::Compute_squared_distance_3 sq_dist = k.compute_squared_distance_3_object(); typename K::Compare_squared_distance_3 csq_dist = k.compare_squared_distance_3_object(); + /* The content of this function is very similar with the one above, the difference is we can exit earlier if + the supporting line are farther than d since we do not need the exact distance. */ + + const Point_3& p1 = vertex(s1, 0); const Point_3& q1 = vertex(s1, 1); const Point_3& p2 = vertex(s2, 0); diff --git a/Distance_3/include/CGAL/Distance_3/Triangle_3_Triangle_3.h b/Distance_3/include/CGAL/Distance_3/Triangle_3_Triangle_3.h index 119af808e72..6584e669f34 100644 --- a/Distance_3/include/CGAL/Distance_3/Triangle_3_Triangle_3.h +++ b/Distance_3/include/CGAL/Distance_3/Triangle_3_Triangle_3.h @@ -226,10 +226,14 @@ compare_squared_distance_disjoint(const typename K::Triangle_3& tr1, typename K::Construct_vertex_3 vertex = k.construct_vertex_3_object(); typename K::Compare_squared_distance_3 csq_dist = k.compare_squared_distance_3_object(); - typename K::Comparison_result res(LARGER); + typename K::Comparison_result res(LARGER); + + // The tiangle are supposed to be disjoint + assertion(!do_intersect(tr1, tr2)); for(int i=0; i<3; ++i) { + //Compare the distance between edges for(int j=0; j<3; ++j) { typename K::Comparison_result temp_res_ss=csq_dist(Segment_3(vertex(tr1, i%3), vertex(tr1, (i+1)%3)),Segment_3(vertex(tr2, j%3), vertex(tr2, (j+1)%3)),d2); @@ -238,14 +242,15 @@ compare_squared_distance_disjoint(const typename K::Triangle_3& tr1, res=smaller_of(res, temp_res_ss); } + //Compare the distance between vertices and triangles typename K::Comparison_result temp_res_v_pl= csq_dist(vertex(tr1, i), tr2,d2); if(temp_res_v_pl==SMALLER) - return SMALLER; + return SMALLER; res=smaller_of(res, temp_res_v_pl); temp_res_v_pl= csq_dist(vertex(tr2, i), tr1,d2); if(temp_res_v_pl==SMALLER) - return SMALLER; + return SMALLER; res=smaller_of(res, temp_res_v_pl); } return res; @@ -258,6 +263,7 @@ compare_squared_distance(const typename K::Triangle_3& tr1, const typename K::Triangle_3& tr2, const K& k, const typename K::FT& d2){ + //TODO did something more intelligent (sq_dist and csq_dist does not exist for Segment-Triangle) if(tr1.is_degenerate() || tr2.is_degenerate()) return compare(squared_distance(tr1,tr2, k), d2); if(do_intersect(tr1, tr2)) diff --git a/Distance_3/include/CGAL/Distance_3/internal/squared_distance_utils_3.h b/Distance_3/include/CGAL/Distance_3/internal/squared_distance_utils_3.h index c7787758a12..1c367d7fc8b 100644 --- a/Distance_3/include/CGAL/Distance_3/internal/squared_distance_utils_3.h +++ b/Distance_3/include/CGAL/Distance_3/internal/squared_distance_utils_3.h @@ -97,8 +97,10 @@ wdot(const typename K::Point_3 &p, return wdot_tag(p, q, r, k, tag); } + static double diff_of_products(const double a, const double b, const double c, const double d) { +// Kahan method, less numerical error #if 1 double w = d * c; double e = std::fma(c, -d, w); @@ -122,10 +124,6 @@ wcross(const typename K::Vector_3 &u, const K&) { typedef typename K::Vector_3 Vector_3; - // return Vector_3( - // u.hy()*v.hz() - u.hz()*v.hy(), - // u.hz()*v.hx() - u.hx()*v.hz(), - // u.hx()*v.hy() - u.hy()*v.hx()); return Vector_3( diff_of_products(u.hy(),v.hz(),u.hz(),v.hy()), diff_of_products(u.hz(),v.hx(),u.hx(),v.hz()), @@ -229,35 +227,6 @@ squared_distance_to_plane(const typename K::Vector_3& normal, return Rational_traits().make_rational(num, den); } -template -void -signed_squared_distance_to_plane_RT(const typename K::Vector_3& normal, - const typename K::Vector_3& diff, - typename K::RT& num, - typename K::RT& den, - const K& k) -{ - typedef typename K::RT RT; - RT dot, squared_length; - dot = wdot(normal, diff, k); - squared_length = wdot(normal, normal, k); - num = dot<0?-square(dot):square(dot); - den = wmult((K*)0, squared_length, diff.hw(), diff.hw()); -} - -template -typename K::FT -signed_squared_distance_to_plane(const typename K::Vector_3& normal, - const typename K::Vector_3& diff, - const K& k) -{ - typedef typename K::RT RT; - typedef typename K::FT FT; - RT num, den; - signed_squared_distance_to_plane_RT(normal, diff, num, den, k); - return Rational_traits().make_rational(num, den); -} - template void squared_distance_to_line_RT(const typename K::Vector_3& dir, diff --git a/Distance_3/include/CGAL/global_functions_distance_3.h b/Distance_3/include/CGAL/global_functions_distance_3.h index b4868ddc930..23775ec8535 100644 --- a/Distance_3/include/CGAL/global_functions_distance_3.h +++ b/Distance_3/include/CGAL/global_functions_distance_3.h @@ -82,10 +82,11 @@ CGAL_COMPARE_SQUARED_DISTANCE_FUNCTION(A, B) namespace CGAL { CGAL_COMPUTE_AND_COMPARE_SQUARED_DISTANCE_FUNCTION_SELF(Point_3) -CGAL_COMPUTE_AND_COMPARE_SQUARED_DISTANCE_FUNCTION_SELF(Plane_3) -CGAL_COMPUTE_AND_COMPARE_SQUARED_DISTANCE_FUNCTION_SELF(Segment_3) CGAL_COMPUTE_AND_COMPARE_SQUARED_DISTANCE_FUNCTION_SELF(Line_3) +CGAL_COMPUTE_AND_COMPARE_SQUARED_DISTANCE_FUNCTION_SELF(Ray_3) +CGAL_COMPUTE_AND_COMPARE_SQUARED_DISTANCE_FUNCTION_SELF(Segment_3) CGAL_COMPUTE_AND_COMPARE_SQUARED_DISTANCE_FUNCTION_SELF(Triangle_3) +CGAL_COMPUTE_AND_COMPARE_SQUARED_DISTANCE_FUNCTION_SELF(Plane_3) CGAL_COMPUTE_AND_COMPARE_SQUARED_DISTANCE_FUNCTION(Point_3, Line_3) CGAL_COMPUTE_AND_COMPARE_SQUARED_DISTANCE_FUNCTION(Point_3, Ray_3) @@ -96,18 +97,12 @@ CGAL_COMPUTE_AND_COMPARE_SQUARED_DISTANCE_FUNCTION(Point_3, Tetrahedron_3) CGAL_COMPUTE_AND_COMPARE_SQUARED_DISTANCE_FUNCTION(Line_3, Plane_3) -//Not yet modify +CGAL_COMPUTE_AND_COMPARE_SQUARED_DISTANCE_FUNCTION(Ray_3, Line_3) +CGAL_COMPUTE_AND_COMPARE_SQUARED_DISTANCE_FUNCTION(Ray_3, Plane_3) CGAL_COMPUTE_AND_COMPARE_SQUARED_DISTANCE_FUNCTION(Segment_3, Line_3) CGAL_COMPUTE_AND_COMPARE_SQUARED_DISTANCE_FUNCTION(Segment_3, Ray_3) CGAL_COMPUTE_AND_COMPARE_SQUARED_DISTANCE_FUNCTION(Segment_3, Plane_3) -// CGAL_COMPUTE_AND_COMPARE_SQUARED_DISTANCE_FUNCTION(Segment_3, Triangle_3) - -CGAL_COMPUTE_AND_COMPARE_SQUARED_DISTANCE_FUNCTION(Ray_3, Line_3) -CGAL_COMPUTE_AND_COMPARE_SQUARED_DISTANCE_FUNCTION(Ray_3, Plane_3) -CGAL_COMPUTE_AND_COMPARE_SQUARED_DISTANCE_FUNCTION_SELF(Ray_3) - - } //namespace CGAL diff --git a/Distance_3/test/Distance_3/test_distance_3.cpp b/Distance_3/test/Distance_3/test_distance_3.cpp index 4686a7cae8f..5612ef37772 100644 --- a/Distance_3/test/Distance_3/test_distance_3.cpp +++ b/Distance_3/test/Distance_3/test_distance_3.cpp @@ -266,9 +266,6 @@ private: P p3 = random_point(); P q = random_point(); - // Failed on seed (1740146243) with an inexact kernel without the bound increasing - // The failed is due of the minimum realized by an edge and the computation is slightly different - // between the distance compute between the two triangles check_squared_distance_with_bound(q, Tet(p0, p1, p2, p3), squared_distance(q, T(p0, p1, p2))*(1 + 1e-10)); check_squared_distance_with_bound(q, Tet(p0, p1, p2, p3), squared_distance(q, T(p1, p3, p2))*(1 + 1e-10)); check_squared_distance_with_bound(q, Tet(p0, p1, p2, p3), squared_distance(q, T(p0, p3, p2))*(1 + 1e-10)); diff --git a/Kernel_23/include/CGAL/Kernel/function_objects.h b/Kernel_23/include/CGAL/Kernel/function_objects.h index 7c7de293777..c932ea5acfe 100644 --- a/Kernel_23/include/CGAL/Kernel/function_objects.h +++ b/Kernel_23/include/CGAL/Kernel/function_objects.h @@ -937,7 +937,6 @@ namespace CommonKernelFunctors { Needs_FT operator()(const T1& p, const T2& q, const FT& d2) const { - // return CGAL::compare(internal::squared_distance(p, q, K()), d2); return internal::compare_squared_distance(p, q, K(), d2); } @@ -945,10 +944,7 @@ namespace CommonKernelFunctors { Needs_FT operator()(const T1& p, const T2& q, const T3& r, const T4& s) const { - // return internal::compare_squared_distance(p, q, K(), internal::squared_distance(p, q, K())); return internal::compare_squared_distance(p, q, K(), internal::squared_distance(r, s, K())); - // return CGAL::compare(internal::squared_distance(p, q, K()), - // internal::squared_distance(r, s, K())); } }; From dfc40bde2397d1c8791c423e6c8996d0a79c2674 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Valque?= Date: Fri, 28 Feb 2025 14:03:19 +0100 Subject: [PATCH 34/63] remove trailing whitespace --- Distance_3/benchmark/Distance_3/bench_thingi10k_3.cpp | 4 ++-- Distance_3/include/CGAL/Distance_3/Segment_3_Segment_3.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Distance_3/benchmark/Distance_3/bench_thingi10k_3.cpp b/Distance_3/benchmark/Distance_3/bench_thingi10k_3.cpp index f2b17155f89..d51b047226c 100644 --- a/Distance_3/benchmark/Distance_3/bench_thingi10k_3.cpp +++ b/Distance_3/benchmark/Distance_3/bench_thingi10k_3.cpp @@ -58,7 +58,7 @@ public: std::set_intersection(a.begin(), a.end(), b.begin(), b.end(),std::back_inserter(v)); if(v.size()!=0) //they have common vertices - return; + return; bool comp = K().compare_squared_distance_3_object()(T(points[a[0]], points[a[1]], points[a[2]]), T(points[b[0]], points[b[1]], points[b[2]]), @@ -68,7 +68,7 @@ public: nb_closed_pairs++; } }; - + for(Iterator it=triangles.begin(); it!=triangles.end(); ++it) boxes.emplace_back(extend_bbox3(it, d2), it); diff --git a/Distance_3/include/CGAL/Distance_3/Segment_3_Segment_3.h b/Distance_3/include/CGAL/Distance_3/Segment_3_Segment_3.h index 2808ad85fa7..4bd63cd397d 100644 --- a/Distance_3/include/CGAL/Distance_3/Segment_3_Segment_3.h +++ b/Distance_3/include/CGAL/Distance_3/Segment_3_Segment_3.h @@ -206,7 +206,7 @@ compare_squared_distance(const typename K::Segment_3& s1, typename K::Compute_squared_distance_3 sq_dist = k.compute_squared_distance_3_object(); typename K::Compare_squared_distance_3 csq_dist = k.compare_squared_distance_3_object(); - /* The content of this function is very similar with the one above, the difference is we can exit earlier if + /* The content of this function is very similar with the one above, the difference is we can exit earlier if the supporting line are farther than d since we do not need the exact distance. */ From 59e87e846812d8290a69a6235323b9a0758c0cea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Valque?= Date: Fri, 28 Feb 2025 16:09:55 +0100 Subject: [PATCH 35/63] modify test function --- .../Distance_3/bench_thingi10k_3.cpp | 38 ++++++++++++++++--- .../CGAL/Distance_3/Triangle_3_Triangle_3.h | 2 +- .../boost/graph/properties_HalfedgeDS_base.h | 2 +- 3 files changed, 35 insertions(+), 7 deletions(-) diff --git a/Distance_3/benchmark/Distance_3/bench_thingi10k_3.cpp b/Distance_3/benchmark/Distance_3/bench_thingi10k_3.cpp index d51b047226c..ad1ad41dab7 100644 --- a/Distance_3/benchmark/Distance_3/bench_thingi10k_3.cpp +++ b/Distance_3/benchmark/Distance_3/bench_thingi10k_3.cpp @@ -16,6 +16,20 @@ #include #include +template +class Old_compare_squared_distance_3 +{ + typedef typename K::FT FT; +public: + typedef typename K::Comparison_result result_type; + + template + CGAL::Needs_FT + operator()(const T1& p, const T2& q, const FT& d2) const + { + return CGAL::compare(CGAL::internal::squared_distance(p, q, K()), d2); + } +}; template struct Test @@ -41,6 +55,7 @@ struct Test public: Test() : nb_closed_pairs(0){ } + template void close_triangles(std::vector

    &points, std::vector >& triangles, FT d2){ std::vector< CBox > boxes; auto extend_bbox3=[&](const Iterator it, FT& d2){ @@ -60,9 +75,14 @@ public: if(v.size()!=0) //they have common vertices return; - bool comp = K().compare_squared_distance_3_object()(T(points[a[0]], points[a[1]], points[a[2]]), - T(points[b[0]], points[b[1]], points[b[2]]), - d2)!=CGAL::LARGER; + bool comp; + T tr1(points[a[0]], points[a[1]], points[a[2]]); + T tr2(points[b[0]], points[b[1]], points[b[2]]); + if constexpr(optimized_version) + comp = K().compare_squared_distance_3_object()(tr1, tr2, d2)!=CGAL::LARGER; + else + comp = Old_compare_squared_distance_3()(tr1, tr2, d2)!=CGAL::LARGER; + if(comp) { nb_closed_pairs++; @@ -88,9 +108,15 @@ public: } CGAL::Real_timer t; t.start(); - close_triangles(input_points, input_triangles, d2); + close_triangles(input_points, input_triangles, d2); t.stop(); - std::cout << "#points = " << input_points.size() << " and #triangles = " << input_triangles.size() << " has " << nb_closed_pairs << " pairs at squared distance " << d2 << " in " << t.time() << " sec." << std::endl; + std::cout << "New version: #points = " << input_points.size() << " and #triangles = " << input_triangles.size() << " has " << nb_closed_pairs << " pairs at squared distance " << d2 << " in " << t.time() << " sec." << std::endl; + nb_closed_pairs=0; + t.reset(); + t.start(); + close_triangles(input_points, input_triangles, d2); + t.stop(); + std::cout << "Old version: #points = " << input_points.size() << " and #triangles = " << input_triangles.size() << " has " << nb_closed_pairs << " pairs at squared distance " << d2 << " in " << t.time() << " sec." << std::endl; } }; @@ -139,9 +165,11 @@ int main(int argc, char** argv) average_length/=(3*input_triangles.size()); // Test().run(filename, 100*max/input_points.size()); + std::cout << "EPICK" << std::endl; Test().run(filename, average_length*average_length/256); Test().run(filename, min_sq_length*4); + std::cout << "EPECK" << std::endl; Test().run(filename, average_length*average_length/256); Test().run(filename, min_sq_length*4); diff --git a/Distance_3/include/CGAL/Distance_3/Triangle_3_Triangle_3.h b/Distance_3/include/CGAL/Distance_3/Triangle_3_Triangle_3.h index 6584e669f34..876e0c955ec 100644 --- a/Distance_3/include/CGAL/Distance_3/Triangle_3_Triangle_3.h +++ b/Distance_3/include/CGAL/Distance_3/Triangle_3_Triangle_3.h @@ -229,7 +229,7 @@ compare_squared_distance_disjoint(const typename K::Triangle_3& tr1, typename K::Comparison_result res(LARGER); // The tiangle are supposed to be disjoint - assertion(!do_intersect(tr1, tr2)); + assert(!do_intersect(tr1, tr2)); for(int i=0; i<3; ++i) { diff --git a/HalfedgeDS/include/CGAL/boost/graph/properties_HalfedgeDS_base.h b/HalfedgeDS/include/CGAL/boost/graph/properties_HalfedgeDS_base.h index 3863b149e4f..65eedd6652c 100644 --- a/HalfedgeDS/include/CGAL/boost/graph/properties_HalfedgeDS_base.h +++ b/HalfedgeDS/include/CGAL/boost/graph/properties_HalfedgeDS_base.h @@ -20,7 +20,7 @@ #include #include #include -#include +#include #include namespace CGAL { From 6dedfe8858d1afd3f5a01b3e39b21b2f7abfa560 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Valque?= Date: Fri, 28 Feb 2025 16:26:53 +0100 Subject: [PATCH 36/63] Correct error in include name --- Distance_3/benchmark/Distance_3/bench_thingi10k_3.cpp | 7 ++++--- .../include/CGAL/boost/graph/properties_HalfedgeDS_base.h | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Distance_3/benchmark/Distance_3/bench_thingi10k_3.cpp b/Distance_3/benchmark/Distance_3/bench_thingi10k_3.cpp index ad1ad41dab7..f90637b9564 100644 --- a/Distance_3/benchmark/Distance_3/bench_thingi10k_3.cpp +++ b/Distance_3/benchmark/Distance_3/bench_thingi10k_3.cpp @@ -164,10 +164,11 @@ int main(int argc, char** argv) } average_length/=(3*input_triangles.size()); + // Equivalent to EPECK since there are only predicates // Test().run(filename, 100*max/input_points.size()); - std::cout << "EPICK" << std::endl; - Test().run(filename, average_length*average_length/256); - Test().run(filename, min_sq_length*4); + // std::cout << "EPICK" << std::endl; + // Test().run(filename, average_length*average_length/256); + // Test().run(filename, min_sq_length*4); std::cout << "EPECK" << std::endl; Test().run(filename, average_length*average_length/256); diff --git a/HalfedgeDS/include/CGAL/boost/graph/properties_HalfedgeDS_base.h b/HalfedgeDS/include/CGAL/boost/graph/properties_HalfedgeDS_base.h index 65eedd6652c..fcb7e3a9175 100644 --- a/HalfedgeDS/include/CGAL/boost/graph/properties_HalfedgeDS_base.h +++ b/HalfedgeDS/include/CGAL/boost/graph/properties_HalfedgeDS_base.h @@ -20,7 +20,7 @@ #include #include #include -#include +#include #include namespace CGAL { From 042e2ad86233a5d25a023f8bab8dcdafbf22b9be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Valque?= Date: Mon, 3 Mar 2025 16:46:50 +0100 Subject: [PATCH 37/63] Adapt csq_dist P_T and T_T for Uncertain_result --- .../Distance_3/bench_thingi10k_3.cpp | 4 +++ .../CGAL/Distance_3/Point_3_Triangle_3.h | 8 +++--- .../include/CGAL/Distance_3/Segment_3_Ray_3.h | 2 +- .../CGAL/Distance_3/Segment_3_Segment_3.h | 12 +++++--- .../CGAL/Distance_3/Triangle_3_Triangle_3.h | 6 ++-- .../internal/squared_distance_utils_3.h | 28 ++++++++++++++----- .../package_info/HalfedgeDS/dependencies | 1 - 7 files changed, 41 insertions(+), 20 deletions(-) diff --git a/Distance_3/benchmark/Distance_3/bench_thingi10k_3.cpp b/Distance_3/benchmark/Distance_3/bench_thingi10k_3.cpp index f90637b9564..e7f5c160bf3 100644 --- a/Distance_3/benchmark/Distance_3/bench_thingi10k_3.cpp +++ b/Distance_3/benchmark/Distance_3/bench_thingi10k_3.cpp @@ -164,6 +164,10 @@ int main(int argc, char** argv) } average_length/=(3*input_triangles.size()); + std::cout << "Simple_Cartesian" << std::endl; + Test >().run(filename, average_length*average_length/256); + Test >().run(filename, min_sq_length*4); + // Equivalent to EPECK since there are only predicates // Test().run(filename, 100*max/input_points.size()); // std::cout << "EPICK" << std::endl; diff --git a/Distance_3/include/CGAL/Distance_3/Point_3_Triangle_3.h b/Distance_3/include/CGAL/Distance_3/Point_3_Triangle_3.h index 0f5d86f7a06..eae3f4d7326 100644 --- a/Distance_3/include/CGAL/Distance_3/Point_3_Triangle_3.h +++ b/Distance_3/include/CGAL/Distance_3/Point_3_Triangle_3.h @@ -326,7 +326,7 @@ compare_squared_distance_to_triangle(const typename K::Point_3& pt, // Note that in the degenerate case, at most 2 edges cover the full triangle, // and only two distances could be used typename K::Comparison_result res1 = csq_dist(pt, segment(t2, t0), d2); - if(is_certain(res1) && (res1 == SMALLER)) + if(certainly(res1 == SMALLER)) return SMALLER; typename K::Comparison_result res2 = csq_dist(pt, segment(t1, t2), d2); return smaller_of(res1,res2); @@ -334,7 +334,7 @@ compare_squared_distance_to_triangle(const typename K::Point_3& pt, // Compare first the distance to the plane, if larger we can exit early typename K::Comparison_result res_p_pl = compare(squared_distance_to_plane(normal, vector(t0, pt), k), d2); - if(is_certain(res_p_pl) && res_p_pl==LARGER) + if(certainly(res_p_pl==LARGER)) { inside_or_far_to_the_plane=true; return LARGER; @@ -344,7 +344,7 @@ compare_squared_distance_to_triangle(const typename K::Point_3& pt, if(!on_left_of_triangle_edge(pt, normal, t0, t1, k)) { typename K::Comparison_result res_p_s1 = csq_dist(pt, segment(t0, t1), d2); - if(res_p_s1==SMALLER) + if(certainly(res_p_s1==SMALLER)) return SMALLER; if(!on_left_of_triangle_edge(pt, normal, t1, t2, k)) { @@ -370,7 +370,7 @@ compare_squared_distance_to_triangle(const typename K::Point_3& pt, if(!on_left_of_triangle_edge(pt, normal, t1, t2, k)) { typename K::Comparison_result res_p_s2 = csq_dist(pt, segment(t1, t2), d2); - if(res_p_s2 == SMALLER) + if(certainly(res_p_s2 == SMALLER)) return SMALLER; if(!on_left_of_triangle_edge(pt, normal, t2, t0, k)) { diff --git a/Distance_3/include/CGAL/Distance_3/Segment_3_Ray_3.h b/Distance_3/include/CGAL/Distance_3/Segment_3_Ray_3.h index be3d14ba4f2..d35fda6d08b 100644 --- a/Distance_3/include/CGAL/Distance_3/Segment_3_Ray_3.h +++ b/Distance_3/include/CGAL/Distance_3/Segment_3_Ray_3.h @@ -73,7 +73,7 @@ squared_distance(const typename K::Segment_3& seg, const Point_3& ss = seg.source(); const Point_3& se = seg.target(); - //TODO Me semble vachement compliqué pour un truc si simple, est-ce que y'a pas moyen de s'inspirer de Lumelsky pour segment segment + //TODO This seems complicated compared to Segment_3_Segment_3.h. Consider improving by adapting Lumelsky's method for segment-segment intersection. if(ss == se) return sq_dist(ss, ray); diff --git a/Distance_3/include/CGAL/Distance_3/Segment_3_Segment_3.h b/Distance_3/include/CGAL/Distance_3/Segment_3_Segment_3.h index 4bd63cd397d..58b97d9c890 100644 --- a/Distance_3/include/CGAL/Distance_3/Segment_3_Segment_3.h +++ b/Distance_3/include/CGAL/Distance_3/Segment_3_Segment_3.h @@ -104,7 +104,7 @@ squared_distance(const typename K::Segment_3& s1, CGAL_assertion(a > 0 && d < 0); const FT det = a*d - b*c; - if(det == 0) + if(is_zero(det)) res.x = 0; else res.x = boost::algorithm::clamp((e*d - b*f) / det, 0, 1); @@ -209,7 +209,7 @@ compare_squared_distance(const typename K::Segment_3& s1, /* The content of this function is very similar with the one above, the difference is we can exit earlier if the supporting line are farther than d since we do not need the exact distance. */ - +#if 1 const Point_3& p1 = vertex(s1, 0); const Point_3& q1 = vertex(s1, 1); const Point_3& p2 = vertex(s2, 0); @@ -231,7 +231,7 @@ compare_squared_distance(const typename K::Segment_3& s1, // Compare first the distance between the lines, if larger we can exit early typename K::Comparison_result res_ll=csq_dist(s1.supporting_line(), s2.supporting_line(), d2); - if(is_certain(res_ll) && res_ll==LARGER) + if(certainly(res_ll==LARGER)) return LARGER; // Compute the distance between the segments @@ -247,7 +247,7 @@ compare_squared_distance(const typename K::Segment_3& s1, CGAL_assertion(a > 0 && d < 0); const FT det = a*d - b*c; FT res_x; - if(det == 0) + if(is_zero(det)) res_x = 0; else res_x = boost::algorithm::clamp((e*d - b*f) / det, 0, 1); @@ -280,6 +280,10 @@ compare_squared_distance(const typename K::Segment_3& s1, return res_ll; } } +#else + // Faster with Simple_cartesian, a bit slower with EPICK or EPECK specifically if d2 is small + return compare(squared_distance(s1, s2 ,k), d2); +#endif } } // namespace internal diff --git a/Distance_3/include/CGAL/Distance_3/Triangle_3_Triangle_3.h b/Distance_3/include/CGAL/Distance_3/Triangle_3_Triangle_3.h index 876e0c955ec..6728b2bca61 100644 --- a/Distance_3/include/CGAL/Distance_3/Triangle_3_Triangle_3.h +++ b/Distance_3/include/CGAL/Distance_3/Triangle_3_Triangle_3.h @@ -237,19 +237,19 @@ compare_squared_distance_disjoint(const typename K::Triangle_3& tr1, for(int j=0; j<3; ++j) { typename K::Comparison_result temp_res_ss=csq_dist(Segment_3(vertex(tr1, i%3), vertex(tr1, (i+1)%3)),Segment_3(vertex(tr2, j%3), vertex(tr2, (j+1)%3)),d2); - if(temp_res_ss==SMALLER) + if(certainly(temp_res_ss==SMALLER)) return SMALLER; res=smaller_of(res, temp_res_ss); } //Compare the distance between vertices and triangles typename K::Comparison_result temp_res_v_pl= csq_dist(vertex(tr1, i), tr2,d2); - if(temp_res_v_pl==SMALLER) + if(certainly(temp_res_v_pl==SMALLER)) return SMALLER; res=smaller_of(res, temp_res_v_pl); temp_res_v_pl= csq_dist(vertex(tr2, i), tr1,d2); - if(temp_res_v_pl==SMALLER) + if(certainly(temp_res_v_pl==SMALLER)) return SMALLER; res=smaller_of(res, temp_res_v_pl); } diff --git a/Distance_3/include/CGAL/Distance_3/internal/squared_distance_utils_3.h b/Distance_3/include/CGAL/Distance_3/internal/squared_distance_utils_3.h index 1c367d7fc8b..7aef6144006 100644 --- a/Distance_3/include/CGAL/Distance_3/internal/squared_distance_utils_3.h +++ b/Distance_3/include/CGAL/Distance_3/internal/squared_distance_utils_3.h @@ -26,14 +26,28 @@ namespace CGAL { namespace internal { -template -K_Comparison_result smaller_of(const K_Comparison_result a, const K_Comparison_result b) +inline +Comparison_result smaller_of(const Comparison_result& a, const Comparison_result& b) { - if((a==SMALLER) || (b==SMALLER)) - return SMALLER; - if((a==EQUAL) || (b==EQUAL)) - return EQUAL; - return LARGER; + return (std::min)(a,b); +} + +inline +Uncertain smaller_of(const Uncertain& a, const Uncertain& b) +{ + return Uncertain((std::min)(a.inf(),b.inf()), (std::min)(a.sup(),b.sup())); +} + +inline +Uncertain smaller_of(const Uncertain& a, const Comparison_result& b) +{ + return smaller_of(a,make_uncertain(b)); +} + +inline +Uncertain smaller_of(const Comparison_result& a, const Uncertain& b) +{ + return smaller_of(make_uncertain(a),b); } template diff --git a/HalfedgeDS/package_info/HalfedgeDS/dependencies b/HalfedgeDS/package_info/HalfedgeDS/dependencies index ffbfcd5b201..08b771effbc 100644 --- a/HalfedgeDS/package_info/HalfedgeDS/dependencies +++ b/HalfedgeDS/package_info/HalfedgeDS/dependencies @@ -1,7 +1,6 @@ Algebraic_foundations BGL Circulator -Distance_3 HalfedgeDS Hash_map Installation From 035652ae82fad0d71943ef03594eccb26bdebbd8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Mon, 3 Mar 2025 20:07:48 +0100 Subject: [PATCH 38/63] fix dependencies --- HalfedgeDS/package_info/HalfedgeDS/dependencies | 2 ++ 1 file changed, 2 insertions(+) diff --git a/HalfedgeDS/package_info/HalfedgeDS/dependencies b/HalfedgeDS/package_info/HalfedgeDS/dependencies index 08b771effbc..1015a2da048 100644 --- a/HalfedgeDS/package_info/HalfedgeDS/dependencies +++ b/HalfedgeDS/package_info/HalfedgeDS/dependencies @@ -1,6 +1,8 @@ Algebraic_foundations BGL Circulator +Distance_2 +Distance_3 HalfedgeDS Hash_map Installation From 765aa430a2c4b97fad551d2fb001b8ea1125759a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Valque?= Date: Tue, 4 Mar 2025 11:39:12 +0100 Subject: [PATCH 39/63] Fix warnings and compile error --- Distance_3/include/CGAL/Distance_3/Segment_3_Segment_3.h | 1 - Distance_3/include/CGAL/Distance_3/Triangle_3_Triangle_3.h | 1 - .../CGAL/Distance_3/internal/squared_distance_utils_3.h | 2 +- Distance_3/test/Distance_3/test_compare_distance_3.cpp | 3 +-- .../internal/tetrahedron_lines_intersections_3.h | 1 + .../include/CGAL/Polygon_mesh_processing/locate.h | 1 + 6 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Distance_3/include/CGAL/Distance_3/Segment_3_Segment_3.h b/Distance_3/include/CGAL/Distance_3/Segment_3_Segment_3.h index 58b97d9c890..d9dcb2ef91b 100644 --- a/Distance_3/include/CGAL/Distance_3/Segment_3_Segment_3.h +++ b/Distance_3/include/CGAL/Distance_3/Segment_3_Segment_3.h @@ -198,7 +198,6 @@ compare_squared_distance(const typename K::Segment_3& s1, typedef typename K::FT FT; typedef typename K::Point_3 Point_3; typedef typename K::Vector_3 Vector_3; - typedef typename K::Line_3 Line_3; typename K::Construct_vertex_3 vertex = k.construct_vertex_3_object(); typename K::Construct_vector_3 cv = k.construct_vector_3_object(); diff --git a/Distance_3/include/CGAL/Distance_3/Triangle_3_Triangle_3.h b/Distance_3/include/CGAL/Distance_3/Triangle_3_Triangle_3.h index 6728b2bca61..9bf27fb6c2a 100644 --- a/Distance_3/include/CGAL/Distance_3/Triangle_3_Triangle_3.h +++ b/Distance_3/include/CGAL/Distance_3/Triangle_3_Triangle_3.h @@ -220,7 +220,6 @@ compare_squared_distance_disjoint(const typename K::Triangle_3& tr1, const K& k, const typename K::FT& d2) { - typedef typename K::FT FT; typedef typename K::Segment_3 Segment_3; typename K::Construct_vertex_3 vertex = k.construct_vertex_3_object(); diff --git a/Distance_3/include/CGAL/Distance_3/internal/squared_distance_utils_3.h b/Distance_3/include/CGAL/Distance_3/internal/squared_distance_utils_3.h index 7aef6144006..7a1c5d94606 100644 --- a/Distance_3/include/CGAL/Distance_3/internal/squared_distance_utils_3.h +++ b/Distance_3/include/CGAL/Distance_3/internal/squared_distance_utils_3.h @@ -112,7 +112,7 @@ wdot(const typename K::Point_3 &p, } -static double diff_of_products(const double a, const double b, const double c, const double d) +static double diff_of_products(const double& a, const double& b, const double& c, const double& d) { // Kahan method, less numerical error #if 1 diff --git a/Distance_3/test/Distance_3/test_compare_distance_3.cpp b/Distance_3/test/Distance_3/test_compare_distance_3.cpp index 79c995e7497..35fab5d58eb 100644 --- a/Distance_3/test/Distance_3/test_compare_distance_3.cpp +++ b/Distance_3/test/Distance_3/test_compare_distance_3.cpp @@ -764,8 +764,7 @@ int main() std::cout << "3D Distance tests" << std::endl; - CGAL::Random r(1740152576); - // CGAL::Random r; + CGAL::Random r; std::cout << "random seed = " << r.get_seed() << std::endl; // @todo Some tests are too difficult for these kernels diff --git a/Intersections_3/include/CGAL/Intersections_3/internal/tetrahedron_lines_intersections_3.h b/Intersections_3/include/CGAL/Intersections_3/internal/tetrahedron_lines_intersections_3.h index 4aba04c9e1a..9693b6ce436 100644 --- a/Intersections_3/include/CGAL/Intersections_3/internal/tetrahedron_lines_intersections_3.h +++ b/Intersections_3/include/CGAL/Intersections_3/internal/tetrahedron_lines_intersections_3.h @@ -19,6 +19,7 @@ #include #include #include +#include #include #include diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/locate.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/locate.h index 7e804e6d094..e21e0a4a0ed 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/locate.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/locate.h @@ -28,6 +28,7 @@ #include #include #include +#include #include #include From f6dac8a08deecbe2e9ae6dd22ea02c065a716e88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Tue, 4 Mar 2025 15:48:38 +0100 Subject: [PATCH 40/63] no static and enable if --- .../CGAL/Distance_3/internal/squared_distance_utils_3.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Distance_3/include/CGAL/Distance_3/internal/squared_distance_utils_3.h b/Distance_3/include/CGAL/Distance_3/internal/squared_distance_utils_3.h index 7a1c5d94606..68842130254 100644 --- a/Distance_3/include/CGAL/Distance_3/internal/squared_distance_utils_3.h +++ b/Distance_3/include/CGAL/Distance_3/internal/squared_distance_utils_3.h @@ -21,6 +21,7 @@ #include #include #include +#include #include namespace CGAL { @@ -63,7 +64,7 @@ wdot(const typename K::Vector_3 &u, const typename K::Vector_3 &v, const K&) { - if constexpr(std::is_same()) + if constexpr(std::is_same_v) return std::fma(u.hx(), v.hx(), std::fma(u.hy(), v.hy(), u.hz()*v.hz())); else return (u.hx()*v.hx() + u.hy()*v.hy() + u.hz()*v.hz()); @@ -112,7 +113,7 @@ wdot(const typename K::Point_3 &p, } -static double diff_of_products(const double& a, const double& b, const double& c, const double& d) +double diff_of_products(const double a, const double b, const double c, const double d) { // Kahan method, less numerical error #if 1 @@ -126,7 +127,7 @@ static double diff_of_products(const double& a, const double& b, const double& c } template -static OFT diff_of_products(const OFT& a, const OFT& b, const OFT& c, const OFT& d) +OFT diff_of_products(const OFT& a, const OFT& b, const OFT& c, const OFT& d, std::enable_if_t>* = 0) { return a*b - c*d; } From a201c2ebf4b6b9b81ce7c76ecdebb7a3778d1f72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Tue, 4 Mar 2025 17:16:47 +0100 Subject: [PATCH 41/63] reordering --- .../CGAL/Distance_3/internal/squared_distance_utils_3.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Distance_3/include/CGAL/Distance_3/internal/squared_distance_utils_3.h b/Distance_3/include/CGAL/Distance_3/internal/squared_distance_utils_3.h index 68842130254..d4489a0b15b 100644 --- a/Distance_3/include/CGAL/Distance_3/internal/squared_distance_utils_3.h +++ b/Distance_3/include/CGAL/Distance_3/internal/squared_distance_utils_3.h @@ -21,9 +21,10 @@ #include #include #include -#include #include +#include + namespace CGAL { namespace internal { From 2cf7f4a52c03e3cbf773da2ab217d21911a6c84b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Tue, 4 Mar 2025 17:24:57 +0100 Subject: [PATCH 42/63] inline to avoid multiple definitions --- .../include/CGAL/Distance_3/internal/squared_distance_utils_3.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Distance_3/include/CGAL/Distance_3/internal/squared_distance_utils_3.h b/Distance_3/include/CGAL/Distance_3/internal/squared_distance_utils_3.h index d4489a0b15b..260301cf8b1 100644 --- a/Distance_3/include/CGAL/Distance_3/internal/squared_distance_utils_3.h +++ b/Distance_3/include/CGAL/Distance_3/internal/squared_distance_utils_3.h @@ -113,7 +113,7 @@ wdot(const typename K::Point_3 &p, return wdot_tag(p, q, r, k, tag); } - +inline double diff_of_products(const double a, const double b, const double c, const double d) { // Kahan method, less numerical error From 74d19c47780ba3e3b6bc7d666ea5c5dacb260d17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Valque?= Date: Wed, 5 Mar 2025 09:37:48 +0100 Subject: [PATCH 43/63] remove unused variable --- Distance_3/include/CGAL/Distance_3/Point_3_Triangle_3.h | 2 -- Distance_3/include/CGAL/Distance_3/Segment_3_Segment_3.h | 3 --- 2 files changed, 5 deletions(-) diff --git a/Distance_3/include/CGAL/Distance_3/Point_3_Triangle_3.h b/Distance_3/include/CGAL/Distance_3/Point_3_Triangle_3.h index eae3f4d7326..f9545323e4a 100644 --- a/Distance_3/include/CGAL/Distance_3/Point_3_Triangle_3.h +++ b/Distance_3/include/CGAL/Distance_3/Point_3_Triangle_3.h @@ -306,7 +306,6 @@ compare_squared_distance_to_triangle(const typename K::Point_3& pt, typename K::Construct_segment_3 segment = k.construct_segment_3_object(); typename K::Construct_vector_3 vector = k.construct_vector_3_object(); - typename K::Compute_squared_distance_3 sq_dist = k.compute_squared_distance_3_object(); typename K::Compare_squared_distance_3 csq_dist = k.compare_squared_distance_3_object(); /* The content of this function is very similar with the one above, the difference is we can exit earlier if @@ -315,7 +314,6 @@ compare_squared_distance_to_triangle(const typename K::Point_3& pt, const Vector_3 e1 = vector(t0, t1); const Vector_3 oe3 = vector(t0, t2); const Vector_3 normal = wcross(e1, oe3, k); - const Vector_3 diff = vector(pt, t0); if(normal == NULL_VECTOR) { diff --git a/Distance_3/include/CGAL/Distance_3/Segment_3_Segment_3.h b/Distance_3/include/CGAL/Distance_3/Segment_3_Segment_3.h index d9dcb2ef91b..8967e982a79 100644 --- a/Distance_3/include/CGAL/Distance_3/Segment_3_Segment_3.h +++ b/Distance_3/include/CGAL/Distance_3/Segment_3_Segment_3.h @@ -225,9 +225,6 @@ compare_squared_distance(const typename K::Segment_3& s1, else if(p2 == q2) return csq_dist(s1,p2,d2); - const Vector_3 normal = wcross(v1, v2, k); - const Vector_3 diff = p1p2; - // Compare first the distance between the lines, if larger we can exit early typename K::Comparison_result res_ll=csq_dist(s1.supporting_line(), s2.supporting_line(), d2); if(certainly(res_ll==LARGER)) From 22d372b297725934772539a710b70efa53bb62f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Valque?= Date: Thu, 6 Mar 2025 15:22:40 +0100 Subject: [PATCH 44/63] Solve bug on mac --- .../benchmark/Distance_3/bench_thingi10k_3.cpp | 18 +++--------------- .../Distance_3/test_compare_distance_3.cpp | 6 +++--- 2 files changed, 6 insertions(+), 18 deletions(-) diff --git a/Distance_3/benchmark/Distance_3/bench_thingi10k_3.cpp b/Distance_3/benchmark/Distance_3/bench_thingi10k_3.cpp index e7f5c160bf3..66ccfa28754 100644 --- a/Distance_3/benchmark/Distance_3/bench_thingi10k_3.cpp +++ b/Distance_3/benchmark/Distance_3/bench_thingi10k_3.cpp @@ -55,7 +55,6 @@ struct Test public: Test() : nb_closed_pairs(0){ } - template void close_triangles(std::vector

    &points, std::vector >& triangles, FT d2){ std::vector< CBox > boxes; auto extend_bbox3=[&](const Iterator it, FT& d2){ @@ -75,14 +74,9 @@ public: if(v.size()!=0) //they have common vertices return; - bool comp; T tr1(points[a[0]], points[a[1]], points[a[2]]); T tr2(points[b[0]], points[b[1]], points[b[2]]); - if constexpr(optimized_version) - comp = K().compare_squared_distance_3_object()(tr1, tr2, d2)!=CGAL::LARGER; - else - comp = Old_compare_squared_distance_3()(tr1, tr2, d2)!=CGAL::LARGER; - + bool comp = K().compare_squared_distance_3_object()(tr1, tr2, d2)!=CGAL::LARGER; if(comp) { nb_closed_pairs++; @@ -108,15 +102,9 @@ public: } CGAL::Real_timer t; t.start(); - close_triangles(input_points, input_triangles, d2); + close_triangles(input_points, input_triangles, d2); t.stop(); - std::cout << "New version: #points = " << input_points.size() << " and #triangles = " << input_triangles.size() << " has " << nb_closed_pairs << " pairs at squared distance " << d2 << " in " << t.time() << " sec." << std::endl; - nb_closed_pairs=0; - t.reset(); - t.start(); - close_triangles(input_points, input_triangles, d2); - t.stop(); - std::cout << "Old version: #points = " << input_points.size() << " and #triangles = " << input_triangles.size() << " has " << nb_closed_pairs << " pairs at squared distance " << d2 << " in " << t.time() << " sec." << std::endl; + std::cout << "#points = " << input_points.size() << " and #triangles = " << input_triangles.size() << " has " << nb_closed_pairs << " pairs at squared distance " << d2 << " in " << t.time() << " sec." << std::endl; } }; diff --git a/Distance_3/test/Distance_3/test_compare_distance_3.cpp b/Distance_3/test/Distance_3/test_compare_distance_3.cpp index 35fab5d58eb..a06acafbad1 100644 --- a/Distance_3/test/Distance_3/test_compare_distance_3.cpp +++ b/Distance_3/test/Distance_3/test_compare_distance_3.cpp @@ -254,9 +254,9 @@ private: { std::cout << "Point - Tetrahedron\n"; //Degenerate Tetrahedron - check_compare_squared_distance (p(1, 1, 1), Tet(p(0, 0, 0), p( 3, 0, 0), p( 0, 3, 0), p( 3, 3, 0)), 1); - check_compare_squared_distance (p(1.5, 1.5, 0), Tet(p(0, 0, 0), p( 3, 0, 0), p( 0, 3, 0), p( 3, 3, 0)), 0); - check_compare_squared_distance (p(4, 4, 0), Tet(p(0, 0, 0), p( 3, 0, 0), p( 0, 3, 0), p( 3, 3, 0)), 2); + check_compare_squared_distance (p(2, 2, 2), Tet(p(0, 0, 0), p( 6, 0, 0), p( 0, 6, 0), p( 6, 6, 0)), 4); + check_compare_squared_distance (p(3, 3, 0), Tet(p(0, 0, 0), p( 6, 0, 0), p( 0, 6, 0), p( 6, 6, 0)), 0); + check_compare_squared_distance (p(8, 8, 0), Tet(p(0, 0, 0), p( 6, 0, 0), p( 0, 6, 0), p( 6, 6, 0)), 8); //Inside Tetrahedron check_compare_squared_distance (p(1, 1, 1), Tet(p(0, 0, 0), p( 3, 0, 0), p( 0, 3, 0), p( 0, 0, 3)), 0); From 6fc8ccf51822bd1f78f6fc1cb6c00cc67b58f08d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Valque?= Date: Thu, 6 Mar 2025 15:37:23 +0100 Subject: [PATCH 45/63] fogert tp solve the previous bug in test_squared_distance --- Distance_3/test/Distance_3/test_distance_3.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Distance_3/test/Distance_3/test_distance_3.cpp b/Distance_3/test/Distance_3/test_distance_3.cpp index 5612ef37772..db899ac309f 100644 --- a/Distance_3/test/Distance_3/test_distance_3.cpp +++ b/Distance_3/test/Distance_3/test_distance_3.cpp @@ -242,9 +242,9 @@ private: { std::cout << "Point - Tetrahedron\n"; //Degenerate Tetrahedron - check_squared_distance (p(1, 1, 1), Tet(p(0, 0, 0), p( 3, 0, 0), p( 0, 3, 0), p( 3, 3, 0)), 1); - check_squared_distance (p(1.5, 1.5, 0), Tet(p(0, 0, 0), p( 3, 0, 0), p( 0, 3, 0), p( 3, 3, 0)), 0); - check_squared_distance (p(4, 4, 0), Tet(p(0, 0, 0), p( 3, 0, 0), p( 0, 3, 0), p( 3, 3, 0)), 2); + check_squared_distance (p(2, 2, 2), Tet(p(0, 0, 0), p( 6, 0, 0), p( 0, 6, 0), p( 6, 6, 0)), 4); + check_squared_distance (p(3, 3, 0), Tet(p(0, 0, 0), p( 6, 0, 0), p( 0, 6, 0), p( 6, 6, 0)), 0); + check_squared_distance (p(8, 8, 0), Tet(p(0, 0, 0), p( 6, 0, 0), p( 0, 6, 0), p( 6, 6, 0)), 8); //Inside Tetrahedron check_squared_distance (p(1, 1, 1), Tet(p(0, 0, 0), p( 3, 0, 0), p( 0, 3, 0), p( 0, 0, 3)), 0); From f1ebfd1f089c6ef695d477ea40810ed8bd8b8771 Mon Sep 17 00:00:00 2001 From: Sebastien Loriot Date: Thu, 6 Mar 2025 16:11:34 +0100 Subject: [PATCH 46/63] fix issue on macOS --- Distance_3/test/Distance_3/test_compare_distance_3.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Distance_3/test/Distance_3/test_compare_distance_3.cpp b/Distance_3/test/Distance_3/test_compare_distance_3.cpp index a06acafbad1..633cdd50771 100644 --- a/Distance_3/test/Distance_3/test_compare_distance_3.cpp +++ b/Distance_3/test/Distance_3/test_compare_distance_3.cpp @@ -103,7 +103,7 @@ private: bool are_equal(const Type& t1, const Type& t2, const bool verbose = true) { const FT diff = CGAL::abs(t1 - t2); - if(diff > std::numeric_limits::epsilon() && + if(diff > std::numeric_limits::epsilon() && diff > epsilon * (CGAL::abs(t1) + CGAL::abs(t2))) { if(verbose) @@ -177,7 +177,7 @@ private: // const FT res_o1o2 = K().compare_squared_distance_3_object()(o1, o2, expected_result); // const FT res_o2o1 = K().compare_squared_distance_3_object()(o2, o1, expected_result); - const FT up = upper_bound * (1 + epsilon) + std::numeric_limits::epsilon(); + const FT up = upper_bound * (1 + epsilon) + std::numeric_limits::epsilon(); const bool res_o1o2 = (CGAL::compare_squared_distance(o1, o2, up) != CGAL::LARGER); const bool res_o2o1 = (CGAL::compare_squared_distance(o2, o1, up) != CGAL::LARGER); From 676495c5c17e818fcdc761704fb9919fc22fe5e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Valque?= Date: Fri, 7 Mar 2025 18:12:34 +0100 Subject: [PATCH 47/63] limit to 1M pair tested in bench_thingi10K --- Distance_3/benchmark/Distance_3/bench_thingi10k_3.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Distance_3/benchmark/Distance_3/bench_thingi10k_3.cpp b/Distance_3/benchmark/Distance_3/bench_thingi10k_3.cpp index 66ccfa28754..7e29aec7a48 100644 --- a/Distance_3/benchmark/Distance_3/bench_thingi10k_3.cpp +++ b/Distance_3/benchmark/Distance_3/bench_thingi10k_3.cpp @@ -51,9 +51,10 @@ struct Test typedef CGAL::Box_intersection_d::Box_with_handle_d CBox; size_t nb_closed_pairs; + size_t nb_tested_pairs; public: - Test() : nb_closed_pairs(0){ } + Test() : nb_closed_pairs(0), nb_tested_pairs(0){ } void close_triangles(std::vector

    &points, std::vector >& triangles, FT d2){ std::vector< CBox > boxes; @@ -74,6 +75,10 @@ public: if(v.size()!=0) //they have common vertices return; + nb_tested_pairs++; + if(nb_tested_pairs>1000000) + return; + T tr1(points[a[0]], points[a[1]], points[a[2]]); T tr2(points[b[0]], points[b[1]], points[b[2]]); bool comp = K().compare_squared_distance_3_object()(tr1, tr2, d2)!=CGAL::LARGER; From 9687034ac36e26df502c2d49bd921afff5c2652b Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Fri, 14 Mar 2025 15:53:14 +0100 Subject: [PATCH 48/63] move `remove_from_complex(e)` after checking orientation otherwise it may happen that `e` is removed from complex, then Vertex_handle() is returned to cancel split, and `e` is not re-added to the complex --- .../CGAL/Tetrahedral_remeshing/internal/split_long_edges.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/split_long_edges.h b/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/split_long_edges.h index ba8da5bf4f1..d531a2093b7 100644 --- a/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/split_long_edges.h +++ b/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/split_long_edges.h @@ -78,8 +78,6 @@ typename C3t3::Vertex_handle split_edge(const typename C3t3::Edge& e, // remove complex edge before splitting const Curve_index curve_index = (dimension == 1) ? c3t3.curve_index(e) : Curve_index(); - if (dimension == 1) - c3t3.remove_from_complex(e); struct Cell_info { Subdomain_index subdomain_index_; @@ -126,6 +124,9 @@ typename C3t3::Vertex_handle split_edge(const typename C3t3::Edge& e, } while (circ != end); + if (dimension == 1) + c3t3.remove_from_complex(e); + for(Cell_handle c : inc_cells) { const int index_v1 = c->index(v1); From b0ca5f27890ed3b78806b34858b8b15781fa928b Mon Sep 17 00:00:00 2001 From: Efi Fogel Date: Sat, 15 Mar 2025 12:04:27 +0200 Subject: [PATCH 49/63] Fixed do_intersect() of curves (provided by Edkirito). --- .../CGAL/Arrangement_2/Arrangement_on_surface_2_global.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arrangement_on_surface_2_global.h b/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arrangement_on_surface_2_global.h index 5bc8054c525..1436405e4d8 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arrangement_on_surface_2_global.h +++ b/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arrangement_on_surface_2_global.h @@ -1568,7 +1568,7 @@ template bool do_intersect(Arrangement_on_surface_2& arr, - const typename GeometryTraits_2::X_monotone_curve_2& c, + const typename GeometryTraits_2::Curve_2& c, const PointLocation& pl, std::is_same::type) { typedef GeometryTraits_2 Gt2; @@ -1607,7 +1607,7 @@ do_intersect(Arrangement_on_surface_2& arr, // Check whether the isolated point lies inside a face (otherwise, // it coincides with a vertex or an edge). auto obj = pl.locate(*iso_p); - if (std::get_if(&x_obj) != nullptr) return true; + if (std::get_if(&obj) != nullptr) return true; } // If we reached here, the curve does not intersect the arrangement. From 30e5d27ffc929d2d3dbb1501f438311b0e28077f Mon Sep 17 00:00:00 2001 From: Efi Fogel Date: Sat, 15 Mar 2025 12:09:10 +0200 Subject: [PATCH 50/63] Added comment of a fix in the 2D Arrangement on Surface package --- Installation/CHANGES.md | 1 + 1 file changed, 1 insertion(+) diff --git a/Installation/CHANGES.md b/Installation/CHANGES.md index bdae9dd56fb..010aa9958b7 100644 --- a/Installation/CHANGES.md +++ b/Installation/CHANGES.md @@ -22,6 +22,7 @@ - Introduces two traits decorators, namely `Arr_tracing_traits_2` and `Arr_counting_traits_2`, which can be used to extract debugging and informative metadata about the traits in use while a program is being executed. - Fixed the Landmark point-location strategy so that it can be applied to arrangements on a sphere. +- Fixed do_intersect() of a 2D Arrangement and a curve. ### [3D Mesh Generation](https://doc.cgal.org/6.1/Manual/packages.html#PkgMesh3) From f68d7f6ea2ec14945a92eaf2c2cae770735eb5df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Fri, 4 Oct 2024 16:04:59 +0200 Subject: [PATCH 51/63] remove extra template keyword --- AABB_tree/include/CGAL/AABB_tree.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AABB_tree/include/CGAL/AABB_tree.h b/AABB_tree/include/CGAL/AABB_tree.h index 0016d4ecc09..73670a58998 100644 --- a/AABB_tree/include/CGAL/AABB_tree.h +++ b/AABB_tree/include/CGAL/AABB_tree.h @@ -553,7 +553,7 @@ public: traits.intersection(query, singleton_data()); break; default: // if(size() >= 2) - root_node()->template traversal_with_priority_and_group_traversal(m_primitives, query, traits, m_primitives.size(), 0, group_traversal_bound); + root_node()->traversal_with_priority_and_group_traversal(m_primitives, query, traits, m_primitives.size(), 0, group_traversal_bound); } } From a3266b352714eb60536431ebd4a2d5a80c25f9a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Mon, 17 Mar 2025 09:06:52 +0100 Subject: [PATCH 52/63] missing backtick --- .../Arrangement_on_surface_2/CGAL/Arr_circle_segment_traits_2.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_circle_segment_traits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_circle_segment_traits_2.h index ed407c1a02b..88b0fc1dc2b 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_circle_segment_traits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_circle_segment_traits_2.h @@ -20,7 +20,7 @@ namespace CGAL { * The nested `Point_2` type defined by the traits class is therefore * different than the `Kernel::Point_2` type. Its coordinates are of type * `CoordNT`, which an instantiation of `Sqrt_extension` where - * `NT` = `ROOT = `Kernel::FT`. Moreover, the third and fourth (hidden) + * `NT` = `ROOT` = `Kernel::FT`. Moreover, the third and fourth (hidden) * template parameters of `Sqrt_extension` are set to `CGAL::Tag_true`, * which enables efficient comparison among different extensions. * From f1b82b9dcc514072ad39b5a0dce14fad09932a44 Mon Sep 17 00:00:00 2001 From: Efi Fogel Date: Mon, 17 Mar 2025 10:10:17 +0200 Subject: [PATCH 53/63] Enhanced to test intersection with (non x-monotone) curves --- .../test_do_intersect.cpp | 62 ++++++++++--------- 1 file changed, 32 insertions(+), 30 deletions(-) diff --git a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_do_intersect.cpp b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_do_intersect.cpp index e1287e2761a..c5436ee7b89 100644 --- a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_do_intersect.cpp +++ b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_do_intersect.cpp @@ -8,47 +8,49 @@ #include #include -typedef CGAL::Quotient Number_type; -typedef CGAL::Simple_cartesian Kernel; -typedef CGAL::Arr_segment_traits_2 Traits_2; -typedef Traits_2::Point_2 Point_2; -typedef Traits_2::X_monotone_curve_2 Segment_2; -typedef CGAL::Arrangement_2 Arrangement_2; -typedef Arrangement_2::Halfedge_handle Halfedge_handle; +using Number_type = CGAL::Quotient; +using Kernel = CGAL::Simple_cartesian; +using Traits_2 = CGAL::Arr_segment_traits_2; +using Point_2 = Traits_2::Point_2; +using Segment_2 = Traits_2::X_monotone_curve_2; +using Arrangement_2 = CGAL::Arrangement_2; +using Halfedge_handle = Arrangement_2::Halfedge_handle; -#define N_SEGMENTS 3 +int main () { + Arrangement_2 arr; + using Tt = Arrangement_2::Topology_traits; + Tt::Default_point_location_strategy def_pl(arr); -int main () -{ - Arrangement_2 arr; - Segment_2 segs[N_SEGMENTS]; - bool expected_intersect[N_SEGMENTS]; - int k; + Segment_2 segs[] = { + Segment_2(Point_2(-2, -2), Point_2(-1, -1)), + Segment_2(Point_2(-1, 1), Point_2(0, 1)), + Segment_2(Point_2(-1, 0), Point_2(0, 0)) + }; - segs[0] = Segment_2 (Point_2 (-2, -2), Point_2 (-1, -1)); - segs[1] = Segment_2 (Point_2 (-1, 1), Point_2 (0, 1)); - segs[2] = Segment_2 (Point_2 (-1, 0), Point_2 (0, 0)); - - expected_intersect[0] = false; - expected_intersect[1] = true; - expected_intersect[2] = true; + bool expected_intersect[] = {false, true, true}; insert(arr, Segment_2(Point_2(0, 0), Point_2(2, 0))); insert(arr, Segment_2(Point_2(2, 0), Point_2(2, 2))); insert(arr, Segment_2(Point_2(2, 2), Point_2(0, 2))); insert(arr, Segment_2(Point_2(0, 2), Point_2(0, 0))); - for (k = 0; k < N_SEGMENTS; k++) - { - bool do_inter = do_intersect(arr, segs[k]); + size_t k = 0; + for (const auto& seg : segs) { + bool do_inter_0 = do_intersect(arr, seg); + bool do_inter_1 = do_intersect(arr, seg, def_pl, std::true_type()); + bool do_inter_2 = do_intersect(arr, seg, def_pl, std::false_type()); - std::cout << "Segment: " << segs[k]; - std::cout << " Expected: " << expected_intersect[k]; - std::cout << " Actual: " << do_inter << std::endl; + std::cout << "Segment: " << segs[k] << std::endl; + std::cout << " Expected: " << expected_intersect[k] << std::endl; + std::cout << " Actual auto: " << do_inter_0 << std::endl; + std::cout << " Actual x-monotone curve: " << do_inter_1 << std::endl; + std::cout << " Actual curve: " << do_inter_2 << std::endl; - if (expected_intersect[k] != do_inter) - return (1); + if (expected_intersect[k] != do_inter_0) return -1; + if (expected_intersect[k] != do_inter_1) return -1; + if (expected_intersect[k] != do_inter_2) return -1; + ++k; } - return (0); + return 0; } From dbcc15af3fdf6d3f4a7b6629ae81e8979b37ed8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Mon, 17 Mar 2025 09:19:02 +0100 Subject: [PATCH 54/63] fix warning --- .../doc/Arrangement_on_surface_2/Arrangement_on_surface_2.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Arrangement_on_surface_2.txt b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Arrangement_on_surface_2.txt index cd3d3328c77..0287ab3226c 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Arrangement_on_surface_2.txt +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Arrangement_on_surface_2.txt @@ -3575,7 +3575,7 @@ The concept `AosApproximateTraits_2` refines the concept `Approximate_number_type` required by the latter, a model of the `AosApproximateTraits_2` concept must define the type `Approximate_point_2`, which is typically defined as -`CGAL::Cartesian::Point_2`. Also, it must +`CGAL::Cartesian::%Point_2`. Also, it must support the operations below (in addition to the operation required by the concept `AosApproximatePointTraits_2`). From e4d5ce2210d682908c001efa7ffea59b23d290a2 Mon Sep 17 00:00:00 2001 From: Sebastien Loriot Date: Mon, 17 Mar 2025 13:50:24 +0100 Subject: [PATCH 55/63] missing eol --- Distance_3/include/CGAL/global_functions_distance_3.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Distance_3/include/CGAL/global_functions_distance_3.h b/Distance_3/include/CGAL/global_functions_distance_3.h index 23775ec8535..388867ae697 100644 --- a/Distance_3/include/CGAL/global_functions_distance_3.h +++ b/Distance_3/include/CGAL/global_functions_distance_3.h @@ -106,4 +106,4 @@ CGAL_COMPUTE_AND_COMPARE_SQUARED_DISTANCE_FUNCTION(Segment_3, Plane_3) } //namespace CGAL -#endif // CGAL_KERNEL_GLOBAL_FUNCTIONS_DISTANCE_3_H \ No newline at end of file +#endif // CGAL_KERNEL_GLOBAL_FUNCTIONS_DISTANCE_3_H From ab56f763cd882307d53c36b45ad7f97d5c5753d6 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Mon, 17 Mar 2025 14:18:46 +0100 Subject: [PATCH 56/63] sort 3rd party libs by name --- .../display-third-party-libs-versions.cmake | 28 +++++++++++++++---- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/Installation/cmake/modules/display-third-party-libs-versions.cmake b/Installation/cmake/modules/display-third-party-libs-versions.cmake index 96ef4e14992..7f7d8695797 100644 --- a/Installation/cmake/modules/display-third-party-libs-versions.cmake +++ b/Installation/cmake/modules/display-third-party-libs-versions.cmake @@ -1,9 +1,27 @@ set(LIBRARIES_TO_CHECK - Eigen3 Qt6 TBB OpenMesh Boost - GMP Threads SuiteSparse MPFI METIS - VTK SCIP OSQP LASLIB GLPK - ITT Ceres MPFR libpointmatcher ITK - OpenGR OpenCV ZLIB + Boost + Ceres + Eigen3 + GLPK + GMP + ITK + ITT + LASLIB + libpointmatcher + METIS + MPFI + MPFR + OpenCV + OpenGR + OpenMesh + OSQP + Qt6 + SCIP + SuiteSparse + TBB + Threads + VTK + ZLIB ) include(${CMAKE_CURRENT_LIST_DIR}/CGAL_TweakFindBoost.cmake) From e7fcddb27081994df753703fc6a50f9d6e0a996d Mon Sep 17 00:00:00 2001 From: albert-github Date: Mon, 17 Mar 2025 17:54:48 +0100 Subject: [PATCH 57/63] Spelling correction Spelling correction --- Distance_3/test/Distance_3/test_compare_distance_3.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Distance_3/test/Distance_3/test_compare_distance_3.cpp b/Distance_3/test/Distance_3/test_compare_distance_3.cpp index 633cdd50771..fbf0ecb32b4 100644 --- a/Distance_3/test/Distance_3/test_compare_distance_3.cpp +++ b/Distance_3/test/Distance_3/test_compare_distance_3.cpp @@ -159,7 +159,7 @@ private: const bool res_l_o1o2 = (CGAL::compare_squared_distance(o1, o2, expected_result*(1-epsilon)-1) == CGAL::LARGER); const bool res_l_o2o1 = (CGAL::compare_squared_distance(o2, o1, expected_result*(1-epsilon)-1) == CGAL::LARGER); - // The equal result is guaranted only on exact construction kernel + // The equal result is guaranteed only on exact construction kernel if(epsilon==0) { assert(res_e_o1o2); From 03dd5e01220c16697738c194be096810328e2d60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Mon, 17 Mar 2025 17:59:49 +0100 Subject: [PATCH 58/63] colinear -> collinear --- Distance_3/include/CGAL/Distance_3/Point_3_Triangle_3.h | 6 +++--- .../is_pullout_direction.h | 4 ++-- .../Single_mold_translational_casting/pullout_directions.h | 2 +- .../Single_mold_translational_casting/top_edges.h | 2 +- .../CGAL/Set_movable_separability_2/internal/Utils.h | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Distance_3/include/CGAL/Distance_3/Point_3_Triangle_3.h b/Distance_3/include/CGAL/Distance_3/Point_3_Triangle_3.h index f9545323e4a..94c2f836990 100644 --- a/Distance_3/include/CGAL/Distance_3/Point_3_Triangle_3.h +++ b/Distance_3/include/CGAL/Distance_3/Point_3_Triangle_3.h @@ -69,7 +69,7 @@ squared_distance_to_triangle_RT(const typename K::Point_3& pt, if(normal == NULL_VECTOR) { // The case normal==NULL_VECTOR covers the case when the triangle - // is colinear, or even more degenerate. In that case, we can + // is collinear, or even more degenerate. In that case, we can // simply take also the distance to the three segments. squared_distance_RT(pt, segment(t2, t0), num, den, k); @@ -206,7 +206,7 @@ squared_distance_to_triangle(const typename K::Point_3& pt, if(normal == NULL_VECTOR) { // The case normal == NULL_VECTOR covers the case when the triangle - // is colinear, or even more degenerate. In that case, we can + // is collinear, or even more degenerate. In that case, we can // simply take also the distance to the three segments. // // Note that in the degenerate case, at most 2 edges cover the full triangle, @@ -318,7 +318,7 @@ compare_squared_distance_to_triangle(const typename K::Point_3& pt, if(normal == NULL_VECTOR) { // The case normal == NULL_VECTOR covers the case when the triangle - // is colinear, or even more degenerate. In that case, we can + // is collinear, or even more degenerate. In that case, we can // simply take also the distance to the three segments. // // Note that in the degenerate case, at most 2 edges cover the full triangle, diff --git a/Set_movable_separability_2/include/CGAL/Set_movable_separability_2/Single_mold_translational_casting/is_pullout_direction.h b/Set_movable_separability_2/include/CGAL/Set_movable_separability_2/Single_mold_translational_casting/is_pullout_direction.h index a521d29ed2b..035ccbef593 100644 --- a/Set_movable_separability_2/include/CGAL/Set_movable_separability_2/Single_mold_translational_casting/is_pullout_direction.h +++ b/Set_movable_separability_2/include/CGAL/Set_movable_separability_2/Single_mold_translational_casting/is_pullout_direction.h @@ -55,7 +55,7 @@ bool is_pullout_direction { //NOT CHECKED AT ALL CGAL_precondition(pgn.is_simple()); - CGAL_precondition(!internal::is_any_edge_colinear(pgn, traits)); + CGAL_precondition(!internal::is_any_edge_collinear(pgn, traits)); auto e_it = pgn.edges_begin(); auto cc_in_between = traits.counterclockwise_in_between_2_object(); @@ -137,7 +137,7 @@ is_pullout_direction(const CGAL::Polygon_2& pgn, typedef typename Polygon_2::Edge_const_iterator Edge_iter; CGAL_precondition(pgn.is_simple()); - CGAL_precondition(!internal::is_any_edge_colinear(pgn, traits)); + CGAL_precondition(!internal::is_any_edge_collinear(pgn, traits)); Edge_iter e_it = pgn.edges_begin(); auto segment_outer_circle = diff --git a/Set_movable_separability_2/include/CGAL/Set_movable_separability_2/Single_mold_translational_casting/pullout_directions.h b/Set_movable_separability_2/include/CGAL/Set_movable_separability_2/Single_mold_translational_casting/pullout_directions.h index 7073c0392fc..bd3223fea36 100644 --- a/Set_movable_separability_2/include/CGAL/Set_movable_separability_2/Single_mold_translational_casting/pullout_directions.h +++ b/Set_movable_separability_2/include/CGAL/Set_movable_separability_2/Single_mold_translational_casting/pullout_directions.h @@ -73,7 +73,7 @@ pullout_directions CastingTraits_2& traits) { CGAL_precondition(pgn.is_simple()); - CGAL_precondition(!internal::is_any_edge_colinear(pgn, traits)); + CGAL_precondition(!internal::is_any_edge_collinear(pgn, traits)); CGAL_precondition(pgn.edges_end()!=i); typedef CastingTraits_2 Casting_traits_2; diff --git a/Set_movable_separability_2/include/CGAL/Set_movable_separability_2/Single_mold_translational_casting/top_edges.h b/Set_movable_separability_2/include/CGAL/Set_movable_separability_2/Single_mold_translational_casting/top_edges.h index 0aa6b3a92b9..748cb8214ff 100644 --- a/Set_movable_separability_2/include/CGAL/Set_movable_separability_2/Single_mold_translational_casting/top_edges.h +++ b/Set_movable_separability_2/include/CGAL/Set_movable_separability_2/Single_mold_translational_casting/top_edges.h @@ -75,7 +75,7 @@ OutputIterator top_edges(const CGAL::Polygon_2& polygon, typedef CastingTraits_2 Traits; CGAL_precondition(polygon.is_simple()); - CGAL_precondition(!internal::is_any_edge_colinear(polygon, traits)); + CGAL_precondition(!internal::is_any_edge_collinear(polygon, traits)); auto e_it = polygon.edges_begin(); auto segment_outer_circle = diff --git a/Set_movable_separability_2/include/CGAL/Set_movable_separability_2/internal/Utils.h b/Set_movable_separability_2/include/CGAL/Set_movable_separability_2/internal/Utils.h index 139e6102933..f59c53b41af 100644 --- a/Set_movable_separability_2/include/CGAL/Set_movable_separability_2/internal/Utils.h +++ b/Set_movable_separability_2/include/CGAL/Set_movable_separability_2/internal/Utils.h @@ -41,7 +41,7 @@ get_segment_outer_circle(const typename Kernel::Segment_2 seg, } template -bool is_any_edge_colinear(const CGAL::Polygon_2& pgn, Kernel& kernel) +bool is_any_edge_collinear(const CGAL::Polygon_2& pgn, Kernel& kernel) { typedef typename Kernel::Point_2 Point_2; typedef typename CGAL::Polygon_2 Polygon_2; From 1e553a2e904478fd8b1733161aa2f7d099efb15d Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Tue, 18 Mar 2025 16:17:43 +0100 Subject: [PATCH 59/63] for tetrahedra with very-very small volume (like 1e-15), split at midpoint can invert orientation this commit introduces a heuristic to try other split points, close to midpoint, and hope to find one that do not invert any incident tetrahedron to the edge to be split --- .../internal/split_long_edges.h | 130 +++++++++++++++--- 1 file changed, 108 insertions(+), 22 deletions(-) diff --git a/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/split_long_edges.h b/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/split_long_edges.h index d531a2093b7..d7240f0026a 100644 --- a/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/split_long_edges.h +++ b/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/split_long_edges.h @@ -38,6 +38,85 @@ namespace Tetrahedral_remeshing { namespace internal { + +template +bool positive_orientation_after_edge_split(const typename C3t3::Edge& e, + const typename C3t3::Cell_handle circ, + const typename C3t3::Triangulation::Geom_traits::Point_3& steiner, + const C3t3& c3t3) +{ + using Point = typename C3t3::Triangulation::Geom_traits::Point_3; + + const auto v1 = e.first->vertex(e.second); + const auto v2 = e.first->vertex(e.third); + + std::array pts = {point(circ->vertex(0)->point()), + point(circ->vertex(1)->point()), + point(circ->vertex(2)->point()), + point(circ->vertex(3)->point())}; + // 1st half-cell + const int i1 = circ->index(v1); + const Point p1 = pts[i1]; + pts[i1] = steiner; + if(CGAL::orientation(pts[0], pts[1], pts[2], pts[3]) != CGAL::POSITIVE) + return false; + + // 2nd half-cell + pts[i1] = p1; + pts[circ->index(v2)] = steiner; + if(CGAL::orientation(pts[0], pts[1], pts[2], pts[3]) != CGAL::POSITIVE) + return false; + + return true; +} + +template +std::optional +construct_steiner_point(const typename C3t3::Edge& e, + const C3t3& c3t3) +{ + using Cell_circulator = typename C3t3::Triangulation::Cell_circulator; + using Cell_handle = typename C3t3::Triangulation::Cell_handle; + using Point = typename C3t3::Triangulation::Geom_traits::Point_3; + using FT = typename C3t3::Triangulation::Geom_traits::FT; + + const auto& gt = c3t3.triangulation().geom_traits(); + const auto& tr = c3t3.triangulation(); + const auto& p1 = point(e.first->vertex(e.second)->point()); + const auto& p2 = point(e.first->vertex(e.third)->point()); + const auto vec = gt.construct_vector_3_object()(p1, p2); + + const std::array coeff = {0.33, 0.66, //1/3 and 2/3 + 0.3, 0.7, // 0.5 +/- 0.2 + 0.25, 0.75}; // 0.5 +/- 0.25 + + std::size_t attempt_id = 0; + while(attempt_id < coeff.size()) + { + Point steiner = gt.construct_translated_point_3_object()( + p1, gt.construct_scaled_vector_3_object()(vec, coeff[attempt_id])); + ++attempt_id; + + bool steiner_successful = true; + Cell_circulator circ = tr.incident_cells(e); + Cell_circulator end = circ; + do + { + Cell_handle c = circ; + if(!positive_orientation_after_edge_split(e, c, steiner, c3t3)) + { + steiner_successful = false; + break; + } + } while(++circ != end); + + if(steiner_successful) + return steiner; + } + + return std::nullopt; +} + template typename C3t3::Vertex_handle split_edge(const typename C3t3::Edge& e, CellSelector cell_selector, @@ -57,7 +136,7 @@ typename C3t3::Vertex_handle split_edge(const typename C3t3::Edge& e, const Vertex_handle v1 = e.first->vertex(e.second); const Vertex_handle v2 = e.first->vertex(e.third); - const Point m = tr.geom_traits().construct_midpoint_3_object() + Point m = tr.geom_traits().construct_midpoint_3_object() (point(v1->point()), point(v2->point())); //backup subdomain info of incident cells before making changes @@ -91,35 +170,31 @@ typename C3t3::Vertex_handle split_edge(const typename C3t3::Edge& e, boost::unordered_map> facets_info; // check orientation and collect incident cells to avoid circulating twice + bool steiner_point_found = false; boost::container::small_vector inc_cells; Cell_circulator circ = tr.incident_cells(e); Cell_circulator end = circ; do { inc_cells.push_back(circ); - if (tr.is_infinite(circ)) + if (tr.is_infinite(circ) || steiner_point_found) { ++circ; continue; } - //1st half-cell - std::array pts = { point(circ->vertex(0)->point()), - point(circ->vertex(1)->point()), - point(circ->vertex(2)->point()), - point(circ->vertex(3)->point()) }; - const int i1 = circ->index(v1); - const Point p1 = pts[i1]; - pts[i1] = m; - if(CGAL::orientation(pts[0], pts[1], pts[2], pts[3]) != CGAL::POSITIVE) - return Vertex_handle(); - - //2nd half-cell - pts[i1] = p1; - pts[circ->index(v2)] = m; - if (CGAL::orientation(pts[0], pts[1], pts[2], pts[3]) != CGAL::POSITIVE) - return Vertex_handle(); - + const Cell_handle c = circ; + if(!positive_orientation_after_edge_split(e, c, m, c3t3)) + { + const std::optional steiner = construct_steiner_point(e, c3t3); + if (steiner != std::nullopt) + { + m = *steiner; + steiner_point_found = true; + } + else + return Vertex_handle(); + } ++circ; } while (circ != end); @@ -312,6 +387,9 @@ void split_long_edges(C3T3& c3t3, #ifdef CGAL_TETRAHEDRAL_REMESHING_DEBUG debug::dump_edges(long_edges, "long_edges.polylines.txt"); + std::ofstream can_be_split_ofs("can_be_split_edges.polylines.txt"); + std::ofstream split_failed_ofs("split_failed.polylines.txt"); + std::ofstream ofs("midpoints.off"); ofs << "OFF" << std::endl; ofs << long_edges.size() << " 0 0" << std::endl; @@ -336,7 +414,11 @@ void split_long_edges(C3T3& c3t3, auto [splittable, _] = can_be_split(edge, c3t3, protect_boundaries, cell_selector); if (!splittable) continue; - +#ifdef CGAL_TETRAHEDRAL_REMESHING_DEBUG + else + can_be_split_ofs << "2 " << edge.first->vertex(edge.second)->point() + << " " << edge.first->vertex(edge.third)->point() << std::endl; +#endif visitor.before_split(tr, edge); Vertex_handle vh = split_edge(edge, cell_selector, c3t3); @@ -344,6 +426,9 @@ void split_long_edges(C3T3& c3t3, visitor.after_split(tr, vh); #ifdef CGAL_TETRAHEDRAL_REMESHING_DEBUG + else + split_failed_ofs << "2 " << edge.first->vertex(edge.second)->point() << " " + << edge.first->vertex(edge.third)->point() << std::endl; if (vh != Vertex_handle()) ofs << vh->point() << std::endl; #endif @@ -365,8 +450,9 @@ void split_long_edges(C3T3& c3t3, }//end loop on long_edges #ifdef CGAL_TETRAHEDRAL_REMESHING_DEBUG - if(ofs.is_open()) - ofs.close(); + if(can_be_split_ofs.is_open()) can_be_split_ofs.close(); + if(split_failed_ofs.is_open()) split_failed_ofs.close(); + if(ofs.is_open()) ofs.close(); #endif #ifdef CGAL_TETRAHEDRAL_REMESHING_VERBOSE From fcfae432e5e5f1ef126d2e777159b1803632ced2 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Tue, 18 Mar 2025 16:53:42 +0100 Subject: [PATCH 60/63] trailing whitespaces --- .../CGAL/Tetrahedral_remeshing/internal/split_long_edges.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/split_long_edges.h b/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/split_long_edges.h index d7240f0026a..a8816a0eab3 100644 --- a/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/split_long_edges.h +++ b/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/split_long_edges.h @@ -89,7 +89,7 @@ construct_steiner_point(const typename C3t3::Edge& e, const std::array coeff = {0.33, 0.66, //1/3 and 2/3 0.3, 0.7, // 0.5 +/- 0.2 0.25, 0.75}; // 0.5 +/- 0.25 - + std::size_t attempt_id = 0; while(attempt_id < coeff.size()) { @@ -109,7 +109,7 @@ construct_steiner_point(const typename C3t3::Edge& e, break; } } while(++circ != end); - + if(steiner_successful) return steiner; } From feaa60ff81403cbfe4a312176dec252f29063b47 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Wed, 19 Mar 2025 08:40:49 +0100 Subject: [PATCH 61/63] Remove name of parameter which is only there for matching a function --- .../CGAL/Tetrahedral_remeshing/internal/split_long_edges.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/split_long_edges.h b/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/split_long_edges.h index a8816a0eab3..8a53ed2ea9e 100644 --- a/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/split_long_edges.h +++ b/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/split_long_edges.h @@ -43,7 +43,7 @@ template bool positive_orientation_after_edge_split(const typename C3t3::Edge& e, const typename C3t3::Cell_handle circ, const typename C3t3::Triangulation::Geom_traits::Point_3& steiner, - const C3t3& c3t3) + const C3t3&) { using Point = typename C3t3::Triangulation::Geom_traits::Point_3; From 652f35794df9805278d36c28c5b214130fc1d7c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Thu, 20 Mar 2025 10:53:53 +0100 Subject: [PATCH 62/63] restore coherant orientation of faces --- SMDS_3/include/CGAL/facets_in_complex_3_to_triangle_mesh.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/SMDS_3/include/CGAL/facets_in_complex_3_to_triangle_mesh.h b/SMDS_3/include/CGAL/facets_in_complex_3_to_triangle_mesh.h index a6739367e5e..5b664df32d8 100644 --- a/SMDS_3/include/CGAL/facets_in_complex_3_to_triangle_mesh.h +++ b/SMDS_3/include/CGAL/facets_in_complex_3_to_triangle_mesh.h @@ -106,7 +106,7 @@ void facets_in_complex_3_to_triangle_soup(const C3T3& c3t3, resize(f, 3); std::size_t i = 0; - for(typename Tr::Vertex_handle v : c3t3.triangulation().vertices(Facet(c, s))) + for(typename Tr::Vertex_handle v : c3t3.triangulation().vertices(fit)) { CGAL_assertion(v != typename Tr::Vertex_handle()); CGAL_assertion(!c3t3.triangulation().is_infinite(v)); @@ -128,12 +128,12 @@ void facets_in_complex_3_to_triangle_soup(const C3T3& c3t3, if(export_all_facets) { - if((cell_sdi > opp_sdi) == (s%2 == 1)) + if(cell_sdi > opp_sdi) std::swap(f[0], f[1]); } else { - if(((cell_sdi == sd_index) == (s%2 == 1)) == normals_point_outside_of_the_subdomain) + if( (cell_sdi == sd_index) == normals_point_outside_of_the_subdomain) std::swap(f[0], f[1]); } From 648b2bf004f6fd87113afd13590deac0bb070888 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Thu, 20 Mar 2025 16:52:02 +0100 Subject: [PATCH 63/63] SMDS: Allow whitespace in the line --- SMDS_3/include/CGAL/SMDS_3/tet_soup_to_c3t3.h | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/SMDS_3/include/CGAL/SMDS_3/tet_soup_to_c3t3.h b/SMDS_3/include/CGAL/SMDS_3/tet_soup_to_c3t3.h index 7b250380193..da33e68756b 100644 --- a/SMDS_3/include/CGAL/SMDS_3/tet_soup_to_c3t3.h +++ b/SMDS_3/include/CGAL/SMDS_3/tet_soup_to_c3t3.h @@ -611,9 +611,11 @@ bool build_triangulation_from_file(std::istream& is, continue; } - if(line == "Vertices") + if(line.find("Vertices") != std::string::npos) { is >> nv; + if(verbose) + std::cerr << "Reading "<< nv << " vertices" << std::endl; for(int i=0; i> nf; + + if(verbose) + std::cerr << "Reading "<< nf << " triangles" << std::endl; + for(int i=0; i> ntet; + + if(verbose) + std::cerr << "Reading "<< ntet << " tetrahedra" << std::endl; + for(int i=0; i