% +------------------------------------------------------------------------+ % | Reference manual chapter: intro.tex (Arrangement) % +------------------------------------------------------------------------+ % | % | Package: arr (Arrangement_2) % | % +------------------------------------------------------------------------+ %+---------------------------------------------------------------------------80 %| update log %| %| 1 Jun 2003 - Ron Wein %| Clear separation of the user manual and the reference manual. %| %| 21 Jun 2000 - Shai Hirsch %| Separated from arr.tex (See previous changes in change log there). %| %+---------------------------------------------------------------------------80 % +========================================================================+ % Introduction % +========================================================================+ %\clearpage %\section{Reference Pages for 2D Arrangements} \chapter{2D Arrangements} \subsection*{Introduction} \ccRefLabel{arr_ref_intro} The arrangement class holds a planar map and a hierarchy tree. Vertices, halfedges and faces of the arrangement are derived from those of the planar map (with the additional functionality of the arrangement), in the same way that the vertices, halfedges and faces of the topological map class are derived from those of the Dcel class (see Chapter\ref{I1_ChapterTopologicalMap}). \subsection*{The Hierarchy Tree} The hierarchy tree is implemented using the \ccc{In_place_list} class (see the chapter on STL Extensions in the Support Library Manual). Every level of a curve hierarchy is a list of tree nodes.The \ccc{Curve_node} and \ccc{Edge_node} of the hierarchy derive from \ccc{Subcurve_node}. This enables the polymorphic structure of the tree. The \ccc{Subcurve_node} is derived from the \ccc{Base_node} which is a template parameter of the arrangement. This enables the addition of attributes to the nodes of the hierarchy tree by adding them inside the \ccc{Base_node}. \subsection*{Arrangement Dcel} The arrangement is parametrized with the interface class \ccc{Dcel}. The \ccc{Dcel} is a container class that defines the underlying combinatorial data structure used by the planar map. We define the concept \ccc{ArrangementDcel_2} \lcTex{(\ccRefPage{ArrangementDcel_2})} where the requirements for a \ccc{Dcel} class are defined. As part of the \ccc{Dcel} we define requirements for its vertex, halfedge and face constituents. If we consider these constituents as (informally) subconcepts of the \ccc{Dcel} concept then we have the following models for its constituents. %----------------------------------------------------- The \ccStyle{Arr_2_vertex_base} is a model for the Dcel vertex subconcept, the \mbox{\ccc{Arr_2_halfedge_base}} is a model for the Dcel halfedge subconcept and the \mbox{\ccc{Arr_2_face_base}} is a model for the Dcel face subconcept. \ccInclude{CGAL/Arr_2_bases.h} The \ccStyle{Arr_2_default_dcel} is a model of the Dcel concept described above. Its template parameter is the traits class. It is a wrapper for \ccStyle{Pm_dcel} instantiated with \mbox{\ccc{Arr_2_vertex_base}},\\ \mbox{\ccc{Arr_2_halfedge_base >}} and \mbox{\ccStyle{Arr_2_face_base}}. \ccInclude{CGAL/Arr_2_default_dcel.h} \subsection*{Models for an Arrangement Traits Class} %----------------------------------------------- We supply traits classes that support three families of curves: \begin{itemize} \item Line segments. We actually have two traits classes for line segments: \ccc{Arr_segment_traits_2} that heavily relies on the CGAL kernel and \ccc{Arr_segment_cached_traits_2}, which stores extra chached information regarding the segments to achieve faster running times. \item Polylines, which are piecewise linear curves (a sequence of line segments where each to neighboring segments share a common endpoint). The \ccc{Arr_polyline_traits_2} class is used to construct arrangements of polylines. \item Conic arcs, or bounded segments of algenraic curves of degree 2 at most (such as circles, hyperbolic arcs and line segments). The \ccc{Arr_conic_traits_2} supports this family of curves. \end{itemize} Since the requirements of the arrangement traits are a superset of the requirements of the Planar Map Traits and Planer Map with Intersection Traits, any traits class that works with arrangements can work with planar maps as well. \begin{ccTexOnly} \subsection*{Concepts} \ccRefConceptPage{ArrangementBaseNode_2}\\ \ccRefConceptPage{ArrangementDcel_2}\\ \ccRefConceptPage{ArrangementDcelHalfedge_2}\\ \ccRefConceptPage{ArrangementTraits_2}\\ \subsection*{Classes} \ccRefIdfierPage{CGAL::Arrangement_2}\\ \ccRefIdfierPage{CGAL::Arr_base_node}\\ \ccRefIdfierPage{CGAL::Arrangement_2::Subcurve_node}\\ \ccRefIdfierPage{CGAL::Arrangement_2::Curve_node}\\ \ccRefIdfierPage{CGAL::Arrangement_2::Edge_node}\\ \ccRefIdfierPage{CGAL::Arrangement_2::Halfedge}\\ \ccRefIdfierPage{CGAL::Arr_segment_traits_2}\\ \ccRefIdfierPage{CGAL::Arr_segment_cached_traits_2}\\ \ccRefIdfierPage{CGAL::Arr_polyline_traits_2}\\ \ccRefIdfierPage{CGAL::Arr_conic_traits_2}\\ \ccRefIdfierPage{CGAL::Arr_file_scanner}\\ \ccRefIdfierPage{CGAL::Arr_file_writer}\\ \subsection*{Functions} \ccRefIdfierPage{CGAL::write_arr}\\ \end{ccTexOnly}