From 07e83714502ff839ba8772b16b13ed20a77f7cb5 Mon Sep 17 00:00:00 2001 From: Efi Fogel Date: Sun, 14 Jan 2007 10:18:51 +0000 Subject: [PATCH] added Gps_default_dcel and GeneralPolygonSetDcel --- .../GeneralPolygonSetDcel.tex | 51 +++++++++++++++++++ .../General_polygon_set_2.tex | 13 ++++- .../Gps_default_dcel.tex | 34 +++++++++++++ .../Boolean_set_operations_2_ref/intro.tex | 4 +- .../Boolean_set_operations_2_ref/main.tex | 1 + 5 files changed, 100 insertions(+), 3 deletions(-) create mode 100755 Boolean_set_operations_2/doc_tex/Boolean_set_operations_2_ref/GeneralPolygonSetDcel.tex create mode 100755 Boolean_set_operations_2/doc_tex/Boolean_set_operations_2_ref/Gps_default_dcel.tex diff --git a/Boolean_set_operations_2/doc_tex/Boolean_set_operations_2_ref/GeneralPolygonSetDcel.tex b/Boolean_set_operations_2/doc_tex/Boolean_set_operations_2_ref/GeneralPolygonSetDcel.tex new file mode 100755 index 00000000000..cb4a1d201ca --- /dev/null +++ b/Boolean_set_operations_2/doc_tex/Boolean_set_operations_2_ref/GeneralPolygonSetDcel.tex @@ -0,0 +1,51 @@ +\ccRefPageBegin + +\begin{ccRefConcept}{GeneralPolygonSetDcel} + +A doubly-connected edge-list (\dcel\ for short) data-structure. It consists +of three containers of records: vertices $V$, halfedges $E$, and faces $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 \ccRefName\ concept must provide the following types and +operations. (In addition to the requirements here, the local types +\ccHtmlNoLinksFrom{\ccStyle{Vertex},\ccStyle{Halfedge}, \ccStyle{Face} +\ccStyle{Hole} and \ccStyle{Isolated_vertex}} +must be models of the concepts +\ccc{ArrangementDcelVertex}\lcTex{ +(\ccRefPage{ArrangementDcelVertex})}, +\ccc{ArrangementDcelHalfedge}\lcTex{ +(\ccRefPage{ArrangementDcelHalfedge})}, +\ccc{ArrangementDcelFace}\lcTex{ +(\ccRefPage{ArrangementDcelFace})}, +\ccc{ArrangementDcelHole}\lcTex{ +(\ccRefPage{ArrangementDcelHole})} and +\ccc{ArrangementDcelIsolatedVertex}\lcTex{ +(\ccRefPage{ArrangementDcelIsolatedVertex})} respectively.) + +% \ccTypes +%======= + +\ccCreation +\ccCreationVariable{dcel} +%======================== +\ccConstructor{Gps_dcel();} + {constructs an empty \dcel.} + +% \ccAccessFunctions +%================= + +% \ccModifiers + +\ccHasModels + \ccc{Gps_default_dcel}\lcTex{ + (\ccRefPage{CGAL::Gps_default_dcel})} + +\ccSeeAlso + \ccc{ArrangementDcel}\lcTex{(\ccRefPage{ArrangementDcel})} + +\end{ccRefConcept} + +\ccRefPageEnd + diff --git a/Boolean_set_operations_2/doc_tex/Boolean_set_operations_2_ref/General_polygon_set_2.tex b/Boolean_set_operations_2/doc_tex/Boolean_set_operations_2_ref/General_polygon_set_2.tex index 979d18181f8..a80cf08d8cf 100644 --- a/Boolean_set_operations_2/doc_tex/Boolean_set_operations_2_ref/General_polygon_set_2.tex +++ b/Boolean_set_operations_2/doc_tex/Boolean_set_operations_2_ref/General_polygon_set_2.tex @@ -2,7 +2,7 @@ \begin{ccRefClass}{General_polygon_set_2} -\ccThree{General_polygon_set_2}{Polygon_2}{} +\ccThree{General_polygon_set_2}{Polygon_2}{} \ccThreeToTwo \ccDefinition @@ -12,7 +12,8 @@ point set in the plane bounded by $x$ monotone curves. Points in the set lie on the boundary or on the positive side of the curves. This class template provides methods to apply regularized Boolean set-operations and few other utility methods. An \ccc{Arrangement_2} data structure is -internally used to represent the point set. +internally used to represent the point set. The arrangement is +represented as a doubly-connected edge-list ({\sc Dcel}). The \ccc{Traits} template-parameter should be instantiated with a model of the concept \ccc{GeneralPolygonSetTraits_2}. The traits class @@ -26,6 +27,14 @@ the boundaries of the general polygons. The traits class supports geometric operations on the types above. We sometimes use the term {\em polygon} instead of general polygon for simplicity hereafter. +The \ccc{Dcel} template-parameter should be instantiated with a +model of the concept \ccc{GeneralPolygonSetDcel_2}. It is instantiated +by default with the type \ccc{Gps_dcel}. You can override this +default, with a {\sc Dcel} class you provide, typically an extension +of the \ccc{Gps_dcel} class template. Overriding the default is needed +only if you intend to obtain the undelying arrangement and process it +further. + The input and output of the Boolean set-operations methods consist of one or more general polygons, some of which may have holes. In particular, these methods operate on pairs of objects of type \ccClassTemplateName, or diff --git a/Boolean_set_operations_2/doc_tex/Boolean_set_operations_2_ref/Gps_default_dcel.tex b/Boolean_set_operations_2/doc_tex/Boolean_set_operations_2_ref/Gps_default_dcel.tex new file mode 100755 index 00000000000..406ed06c38a --- /dev/null +++ b/Boolean_set_operations_2/doc_tex/Boolean_set_operations_2_ref/Gps_default_dcel.tex @@ -0,0 +1,34 @@ +\ccRefPageBegin + +\begin{ccRefClass}{Gps_default_dcel} + +\ccDefinition +%============ +The class \ccRefName\ is the default \dcel\ class used by the +\ccc{General_polygon_set_2} (and \ccc{Polygon_set_2}) class-templates +to represent the undelying \ccc{Arrangement_2} data structure. + +\ccInclude{CGAL/Gps_default_dcel.h} + +\ccIsModel + \ccc{GeneralPolygonSetDcel} + +\ccInheritsFrom + \begin{tabbing} + \ccc{Arr_dcel_base<}\=\ccc{Arr_vertex_base,} \\ + \>\ccc{Arr_halfedge_base,}\\ + \>\ccc{Gps_face_base>} + \end{tabbing} + +\ccTypes + +\ccNestedType{template rebind} + {allows the rebinding of the \dcel\ with a different traits class \ccc{T}.} + +\ccSeeAlso + +\ccc{Arr_dcel_base}\lcTex{(\ccRefPage{CGAL::Arr_dcel_base})} + +\end{ccRefClass} + +\ccRefPageEnd diff --git a/Boolean_set_operations_2/doc_tex/Boolean_set_operations_2_ref/intro.tex b/Boolean_set_operations_2/doc_tex/Boolean_set_operations_2_ref/intro.tex index a42d4e83e89..cc1b7445017 100644 --- a/Boolean_set_operations_2/doc_tex/Boolean_set_operations_2_ref/intro.tex +++ b/Boolean_set_operations_2/doc_tex/Boolean_set_operations_2_ref/intro.tex @@ -26,6 +26,7 @@ containment predicates. \ccRefConceptPage{GeneralPolygonWithHoles_2}\\ \ccRefConceptPage{ArrangementDirectionalXMonotoneTraits_2}\\ \ccRefConceptPage{GeneralPolygonSetTraits_2} +\ccRefConceptPage{GeneralPolygonSetDcel} \subsection*{Classes} @@ -36,7 +37,8 @@ containment predicates. \ccRefIdfierPage{CGAL::General_polygon_with_holes_2}\\ \ccRefIdfierPage{CGAL::Gps_segment_traits_2}\\ \ccRefIdfierPage{CGAL::Gps_circle_segment_traits_2}\\ -\ccRefIdfierPage{CGAL::Gps_traits_2} +\ccRefIdfierPage{CGAL::Gps_traits_2}\\ +\ccRefIdfierPage{CGAL::Gps_default_dcel} \subsection*{Functions} diff --git a/Boolean_set_operations_2/doc_tex/Boolean_set_operations_2_ref/main.tex b/Boolean_set_operations_2/doc_tex/Boolean_set_operations_2_ref/main.tex index d927e137000..4b34a69edd5 100644 --- a/Boolean_set_operations_2/doc_tex/Boolean_set_operations_2_ref/main.tex +++ b/Boolean_set_operations_2/doc_tex/Boolean_set_operations_2_ref/main.tex @@ -31,6 +31,7 @@ \input{Boolean_set_operations_2_ref/Gps_segment_traits_2.tex} \input{Boolean_set_operations_2_ref/Gps_circle_segment_traits_2.tex} \input{Boolean_set_operations_2_ref/Gps_traits_2.tex} +\input{Boolean_set_operations_2_ref/Gps_default_dcel.tex} \input{Boolean_set_operations_2_ref/Bso_complement.tex} \input{Boolean_set_operations_2_ref/Bso_difference.tex} \input{Boolean_set_operations_2_ref/Bso_do_intersect.tex}