From d8e4cc40be8466a1ab50f803a1ea973f2550efff Mon Sep 17 00:00:00 2001 From: Efi Fogel Date: Wed, 28 Aug 2024 19:38:52 +0300 Subject: [PATCH] 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}