From 4d36e93a89c9bbae09d8896443be0072a8d5f72d Mon Sep 17 00:00:00 2001 From: Mariette Yvinec Date: Mon, 15 Apr 2002 07:02:02 +0000 Subject: [PATCH] updated doc of constrained triangulations --- ...nstrainedDelaunayTriangulationTraits_2.tex | 81 ++++++++++++ .../ConstrainedTriangulationPlusTraits_2.tex | 108 ---------------- .../ConstrainedTriangulationTraits_2.tex | 116 ++++++++++++++++++ .../Constrained_Delaunay_triangulation_2.tex | 34 ++++- .../Constrained_triangulation_2.tex | 99 +++++++++++---- .../Constrained_triangulation_plus_2.tex | 71 ++++------- .../doc_tex/Triangulation_2_ref/intro.tex | 2 +- .../doc_tex/Triangulation_2_ref/main.tex | 2 +- ...nstrainedDelaunayTriangulationTraits_2.tex | 81 ++++++++++++ .../ConstrainedTriangulationPlusTraits_2.tex | 108 ---------------- .../ConstrainedTriangulationTraits_2.tex | 116 ++++++++++++++++++ .../Constrained_Delaunay_triangulation_2.tex | 34 ++++- .../Constrained_triangulation_2.tex | 99 +++++++++++---- .../Constrained_triangulation_plus_2.tex | 71 ++++------- .../basic/Triangulation_2_ref/intro.tex | 2 +- .../basic/Triangulation_2_ref/main.tex | 2 +- 16 files changed, 664 insertions(+), 362 deletions(-) create mode 100644 Packages/Triangulation_2/doc_tex/Triangulation_2_ref/ConstrainedDelaunayTriangulationTraits_2.tex delete mode 100644 Packages/Triangulation_2/doc_tex/Triangulation_2_ref/ConstrainedTriangulationPlusTraits_2.tex create mode 100644 Packages/Triangulation_2/doc_tex/Triangulation_2_ref/ConstrainedTriangulationTraits_2.tex create mode 100644 Packages/Triangulation_2/doc_tex/basic/Triangulation_2_ref/ConstrainedDelaunayTriangulationTraits_2.tex delete mode 100644 Packages/Triangulation_2/doc_tex/basic/Triangulation_2_ref/ConstrainedTriangulationPlusTraits_2.tex create mode 100644 Packages/Triangulation_2/doc_tex/basic/Triangulation_2_ref/ConstrainedTriangulationTraits_2.tex diff --git a/Packages/Triangulation_2/doc_tex/Triangulation_2_ref/ConstrainedDelaunayTriangulationTraits_2.tex b/Packages/Triangulation_2/doc_tex/Triangulation_2_ref/ConstrainedDelaunayTriangulationTraits_2.tex new file mode 100644 index 00000000000..ef7c4eee329 --- /dev/null +++ b/Packages/Triangulation_2/doc_tex/Triangulation_2_ref/ConstrainedDelaunayTriangulationTraits_2.tex @@ -0,0 +1,81 @@ +% +------------------------------------------------------------------------+ +% | Reference manual page: DelaunayConstrainedTriangulationTraits_2.tex +% +------------------------------------------------------------------------+ +% | 05.02.2002 Mariette Yvinec +% | Package: Triangulation_2 +% | +\RCSdef{\RCSConstrainedDelaunayTriangulationTraitsRev}{$Revision$} +\RCSdefDate{\RCSConstrainedDelaunayTriangulationTraitsDate}{$Date$} +% | +%%RefPage: end of header, begin of main body +% +------------------------------------------------------------------------+ + + +\begin{ccRefConcept}{ConstrainedDelaunayTriangulationTraits_2} + +%% \ccHtmlCrossLink{} %% add further rules for cross referencing links +%% \ccHtmlIndexC[concept]{} %% add further index entries + +\ccDefinition + +The concept \ccRefName\ defines the requirements for the geometric +traits class of a Delaunay constrained triangulation +( \ccc{Delaunay_constrained_Triangulation_2}) +that support intersections of input constraints (i. e. +when the template parameter \ccc{Itag} is instantiated +by one one of the tag classes \ccc{Exact_intersections_tag} or +\ccc{Exact_predicates_tag}). This concept refines both the concept +\ccc{TriangulationTraits_2} and the concept +\ccc{ConstrainedTriangulationTraits_2}. + +\ccGeneralizes +\ccc{TriangulationTraits_2} \\ +\ccc{ConstrainedTriangulationTraits_2} + + +\ccCreation +\ccCreationVariable{traits} %% choose variable name + +\ccConstructor{ConstrainedDelaunayTriangulationTraits_2();}{default constructor.} +\ccGlue +\ccConstructor{ConstrainedDelaunayTriangulationTraits_2( + const ConstrainedDelaunayTriangulationTraits_2& dctraits);} +{Copy constructor} + +\ccMethod{ConstrainedDelaunayTriangulationTraits_2 operator= + (const ConstrainedDelaunayTriangulationTraits_2& dctraits);} +{Assignment operator.} + +\ccHasModels +The kernels of \cgal are models for this traits class. + +\ccSeeAlso +\ccc{TriangulationTraits_2} \\ +\ccc{ConstrainedTriangulationTraits_2} \\ +\ccc{Constrained_triangulation_2} \\ +\ccc{Constrained_Delaunay_triangulation_2} + + +%\ccExample + +%A short example program. +%Instead of a short program fragment, a full running program can be +%included using the +%\verb|\ccIncludeExampleCode{examples/Package/ConstrainedTriangulationPlusTraits_2_prog.C}| +%macro. The program example would be part of the source code distribution and +%also part of the automatic test suite. + +%\begin{ccExampleCode} +%void your_example_code() { +%} +%\end{ccExampleCode} + +%% \ccIncludeExampleCode{examples/Package/ConstrainedTriangulationPlusTraits_2_prog.C} + +\end{ccRefConcept} + +% +------------------------------------------------------------------------+ +%%RefPage: end of main body, begin of footer +% EOF +% +------------------------------------------------------------------------+ + diff --git a/Packages/Triangulation_2/doc_tex/Triangulation_2_ref/ConstrainedTriangulationPlusTraits_2.tex b/Packages/Triangulation_2/doc_tex/Triangulation_2_ref/ConstrainedTriangulationPlusTraits_2.tex deleted file mode 100644 index 8167d193e92..00000000000 --- a/Packages/Triangulation_2/doc_tex/Triangulation_2_ref/ConstrainedTriangulationPlusTraits_2.tex +++ /dev/null @@ -1,108 +0,0 @@ -% +------------------------------------------------------------------------+ -% | Reference manual page: ConstrainedTriangulationPlusTraits_2.tex -% +------------------------------------------------------------------------+ -% | 05.02.2002 Mariette Yvinec -% | Package: Triangulation_2 -% | -\RCSdef{\RCSConstrainedTriangulationPlusTraitsRev}{$Revision$} -\RCSdefDate{\RCSConstrainedTriangulationPlusTraitsDate}{$Date$} -% | -%%RefPage: end of header, begin of main body -% +------------------------------------------------------------------------+ - - -\begin{ccRefConcept}{ConstrainedTriangulationPlusTraits_2} - -%% \ccHtmlCrossLink{} %% add further rules for cross referencing links -%% \ccHtmlIndexC[concept]{} %% add further index entries - -\ccDefinition - -The concept \ccRefName\ defines the requirements for the traits -class of the triangulation \ccc{Tr} -plugged as first template argument of the class -\ccc{Constrained_Triangulation_Plus_2}. -The template parameter \ccc{Tr} has to be instantiated -by a constrained or Delaunay constrained triangulation -class, i. e. either by -\ccc{Constrained_Triangulation_2} -or by \ccc{Constrained_Delaunay_Triangulation_2}. -If intersections of input constraints are allowed -(i.e. the \ccc{Itag} template parameter -is either \ccc{Tag_exact_intersections} or -\ccc{Tag_exact_predicates}), the traits - class \ccc{Traits} of the base triangulation class -has to provide -an object function to compute the intersection of two -constrained segments. Therefore, the concept -\ccRefName\ is a refinement of the -the traits concept -(\ccc{TriangulationTraits_2} or \ccc{DelaunayTriangulationTraits_2}) -of the base triangulation class. - -\ccGeneralizes - -ThisConcept generalizes one of the following concept\\ -\ccc{TriangulationTraits_2} \\ -\ccc{DelaunayTriangulationTraits_2} - - -\ccTypes - -\ccNestedType{Intersect_2}{A function object whose operator() -computes the intersection of two segments : \\ -\ccc{Object_2 operator()(Segment s1, Segment s2);} -Returns the intersection of \ccc{s1} and \ccc{s2}.} - - - -\ccCreation -\ccCreationVariable{traits} %% choose variable name - -\ccConstructor{ConstrainedTriangulationPlusTraits_2();}{default constructor.} -\ccGlue -\ccConstructor{ConstrainedTriangulationPlusTraits_2( - const ConstrainedTriangulationPlusTraits_2& ctptraits);} -{Copy constructor} - -\ccMethod{ConstrainedTriangulationPlusTraits_2 operator= - (const ConstrainedTriangulationPlusTraits_2& ctptraits);} -{Assignment operator.} - - -\ccHeading{Access to constructor object} -\ccMethod{Intersect_2 intersect_2_object();}{} - -\ccHasModels -The Cartesian and homogeneous kernels provided by \cgal. - - - -\ccSeeAlso -\ccc{TriangulationTraits_2} \\ -\ccc{DelaunayTriangulationTraits_2} - - -\ccExample - -%A short example program. -%Instead of a short program fragment, a full running program can be -%included using the -%\verb|\ccIncludeExampleCode{examples/Package/ConstrainedTriangulationPlusTraits_2_prog.C}| -%macro. The program example would be part of the source code distribution and -%also part of the automatic test suite. - -%\begin{ccExampleCode} -%void your_example_code() { -%} -%\end{ccExampleCode} - -%% \ccIncludeExampleCode{examples/Package/ConstrainedTriangulationPlusTraits_2_prog.C} - -\end{ccRefConcept} - -% +------------------------------------------------------------------------+ -%%RefPage: end of main body, begin of footer -% EOF -% +------------------------------------------------------------------------+ - diff --git a/Packages/Triangulation_2/doc_tex/Triangulation_2_ref/ConstrainedTriangulationTraits_2.tex b/Packages/Triangulation_2/doc_tex/Triangulation_2_ref/ConstrainedTriangulationTraits_2.tex new file mode 100644 index 00000000000..ecfdcdac5c4 --- /dev/null +++ b/Packages/Triangulation_2/doc_tex/Triangulation_2_ref/ConstrainedTriangulationTraits_2.tex @@ -0,0 +1,116 @@ +% +------------------------------------------------------------------------+ +% | Reference manual page: ConstrainedTriangulationTraits_2.tex +% +------------------------------------------------------------------------+ +% | 05.02.2002 Mariette Yvinec +% | Package: Triangulation_2 +% | +\RCSdef{\RCSConstrainedTriangulationTraitsRev}{$Revision$} +\RCSdefDate{\RCSConstrainedTriangulationTraitsDate}{$Date$} +% | +%%RefPage: end of header, begin of main body +% +------------------------------------------------------------------------+ + + +\begin{ccRefConcept}{ConstrainedTriangulationTraits_2} + +%% \ccHtmlCrossLink{} %% add further rules for cross referencing links +%% \ccHtmlIndexC[concept]{} %% add further index entries + +\ccDefinition + +The concept \ccRefName\ defines the requirements for the geometric +traits class of a constrained triangulation +( \ccc{Constrained_Triangulation_2}) +that support intersections of input constraints (i. e. +when the template parameter \ccc{Itag} is instantiated +by one one of the tag classes \ccc{Exact_intersections_tag} or +\ccc{Exact_predicates_tag}). This concept refines the concept +\ccc{TriangulationTraits_2}, adding requirement for function objects +to compute the intersection points of two constraints. +When \ccc{Exact_predicates_tag}) is used, the insertion of constraint may +also require additionnal types +to compute the square distance between a point and a line + + +\ccGeneralizes +\ccc{TriangulationTraits_2} + + +\ccTypes + +\ccNestedType{Intersect_2}{A function object whose operator() +computes the intersection of two segments : \\ +\ccc{Object_2 operator()(Segment s1, Segment s2);} +Returns the intersection of \ccc{s1} and \ccc{s2}.} + +The geometric traits of constrained triangulation is instantiated with +the intersection tag \ccc{Exact_predicates_tag} +is also required to provide the following types~: +\ccNestedType{Line_2}{The line type.} +\ccGlue +\ccNestedType{Construct_line_2} {A function object whose operator() +constructs a line (type \ccc{Line_2}) from two points +(type \ccc{Point_2}).} +\ccGlue +\ccNestedType{Compute_squared_distance_2}{A function object with an +operator() designed to compute the squared distance between +a line (type \ccc{Line_2}) and a point (type \ccc{Point_2}).} + + +\ccCreation +\ccCreationVariable{traits} %% choose variable name + +\ccConstructor{ConstrainedTriangulationTraits_2();}{default constructor.} +\ccGlue +\ccConstructor{ConstrainedTriangulationTraits_2( + const ConstrainedTriangulationPlusTraits_2& cttraits);} +{Copy constructor} + +\ccMethod{ConstrainedTriangulationTraits_2 operator= + (const ConstrainedTriangulationTraits_2& cttraits);} +{Assignment operator.} + + +\ccHeading{Access to constructor object} +\ccMethod{Intersect_2 intersect_2_object();}{} +\ccMethod{Construct_line_2 construct_line_2_object();}{required when +the intersection tag is \ccc{Exact_predicates_tag}.} +\ccMethod{Compute_squared_distance_2 +compute_squared_distance_2_object();} +{required when +the intersection tag is \ccc{Exact_predicates_tag}.} + + +\ccHasModels +The kernels of \cgal are models for this traits class. + + + +\ccSeeAlso +\ccc{TriangulationTraits_2} \\ +\ccc{ConstrainedTriangulationTraits_2} + + +%\ccExample + +%A short example program. +%Instead of a short program fragment, a full running program can be +%included using the +%\verb|\ccIncludeExampleCode{examples/Package/ConstrainedTriangulationPlusTraits_2_prog.C}| +%macro. The program example would be part of the source code distribution and +%also part of the automatic test suite. + +%\begin{ccExampleCode} +%void your_example_code() { +%} +%\end{ccExampleCode} + +%% \ccIncludeExampleCode{examples/Package/ConstrainedTriangulationPlusTraits_2_prog.C} + +\end{ccRefConcept} + +% +------------------------------------------------------------------------+ +%%RefPage: end of main body, begin of footer +% EOF +% +------------------------------------------------------------------------+ + diff --git a/Packages/Triangulation_2/doc_tex/Triangulation_2_ref/Constrained_Delaunay_triangulation_2.tex b/Packages/Triangulation_2/doc_tex/Triangulation_2_ref/Constrained_Delaunay_triangulation_2.tex index 97d06e4c0be..a3f49e24988 100644 --- a/Packages/Triangulation_2/doc_tex/Triangulation_2_ref/Constrained_Delaunay_triangulation_2.tex +++ b/Packages/Triangulation_2/doc_tex/Triangulation_2_ref/Constrained_Delaunay_triangulation_2.tex @@ -11,7 +11,7 @@ % +------------------------------------------------------------------------+ -\begin{ccRefClass}{Constrained_Delaunay_triangulation_2} %% add template arg's if necessary +\begin{ccRefClass}{Constrained_Delaunay_triangulation_2} %% add template arg's if necessary %% \ccHtmlCrossLink{} %% add further rules for cross referencing links %% \ccHtmlIndexC[class]{} %% add further index entries @@ -34,6 +34,25 @@ from the interior of the triangle. The class \ccRefName\ is designed to represent constrained Delaunay triangulations. +As in the case of constrained triangulations, three different versions +of Delaunay constrained triangulations are offered +and can be selected through the instantation of the +third template parameter \ccc{Itag} which can be one of the +following~: +\ccc{CGAL::No_intersection_tag} if intersections of + input constraints are disallowed,\\ +\ccc{CGAL::Exact_predicates_tag} allows intersection between input +constraints + and is to be used when the traits +class +provides exact predicates but approximate constructions of the +intersection points. +\ccc{CGAL::Exact_intersections_tag} allows intersection between input +constraints + and is to be used in conjonction +with an exact aritmetic type. + + The template parameters \ccc{Tds} has to be instantiate with a model of \ccc{Triangulation_data_structure_2}. The geometric traits @@ -43,6 +62,12 @@ of a Delaunay triangulation and the \ccc{Traits} parameter has to be instantiated with a model \ccc{Delaunay_triangulation_traits_2}. +When intersection of input constraints are supported, +the geometric traits class +is required to provide additional function object types +to compute the intersection of two segments. +and has then to be also a model of the concept +\ccc{ConstrainedTriangulationTraits_2}. A constrained Delaunay triangulation is not a Delaunay triangulation but it is a constrained triangulation. @@ -62,6 +87,8 @@ by the base face. The base face of a constrained triangulation has to be a model of the concept \ccc{ConstrainedTriangulationFaceBase_2}. + +\cgal provides a defaults for the template parameters. If \ccc{Gt} is the geometric traits parameter, the default for @@ -73,14 +100,15 @@ triangulation data structure parameter is the class CGAL::Triangulation_vertex_base_2, CGAL::Constrained_triangulation_face_base_2 >}. +The default intersection tag is \ccc{CGAL::No_intersection_tag}. \ccInclude{Constrained_Delaunay_triangulation_2.h} -\ccInheritsFrom \ccc{Constrained_triangulation_2} +\ccInheritsFrom \ccc{Constrained_triangulation_2} \ccTypes All types used in this class are inherited from the base class -\ccc{Constrained_triangulation_2}. +\ccc{Constrained_triangulation_2}. diff --git a/Packages/Triangulation_2/doc_tex/Triangulation_2_ref/Constrained_triangulation_2.tex b/Packages/Triangulation_2/doc_tex/Triangulation_2_ref/Constrained_triangulation_2.tex index 3fd7f948660..b3c62013dfe 100644 --- a/Packages/Triangulation_2/doc_tex/Triangulation_2_ref/Constrained_triangulation_2.tex +++ b/Packages/Triangulation_2/doc_tex/Triangulation_2_ref/Constrained_triangulation_2.tex @@ -11,25 +11,49 @@ % +------------------------------------------------------------------------+ -\begin{ccRefClass}{Constrained_triangulation_2} %% add template arg's if necessary +\begin{ccRefClass}{Constrained_triangulation_2} %% add template arg's if necessary %% \ccHtmlCrossLink{} %% add further rules for cross referencing links %% \ccHtmlIndexC[class]{} %% add further index entries -\ccDefinition - +\ccDefinition A constrained triangulation is a triangulation of a set of points which has to include among its edges a given set of segments joining the points. The corresponding edges are called {\em constrained edges}. -The set of points defining the vertices of the triangulation -includes the set of constrained edges endpoints. It may include other points -(considered as null length constrained edges) as well. The set of -constrained edges forms a set of segments which do not intersect -except possibly at their endpoints. Any number of constrained edges +The endpoints of constrained edges are of course vertices of the +triangulation. However the triangulation may include +include other vertices as well. +There are three versions of constrained triangulations. +In the basic version, the constrained triangulation +do not handle intersecting constraints, and the set of input +constraints is required to be a set of segments that do not intersect +except possibly at their endpoints. Any number of constrained edges are allowed to share the same endpoint. Vertical constrained edges or constrained edges with null length are allowed. +The two other versions support intersecting input constraints. +In those versions, input constraints are allowed to be +intersecting, overlapping or partially +overlapping segments. +The triangulation introduce additional vertices at each point which +is a proper intersection points of two +constraints. A single constraint intersecting other +constraints will then appear as several edges in the triangulation. +The two versions dealing with intersecting constraints, slightly differ +in the way intersecting constraints are dealt with. One of them is +designed to be robust when predicates are evaluated exactly but +constructions (i. e. intersection computations) are +approximative. +The other one is designed to be used +with an exact arithmetic (meaning exact +evaluation of predicates and exact computation of intersections.) +This last version finds its full efficiency when used in conjonction +with a constraint hierarchy data structure (which allows to avoid the +cascading of intersection computations) +as provided in the class +\ccc{Constrained_triangulation_plus_2}. See section~\ref{Section_2D_Constrained_triangulation_plus}. + \begin{ccTexOnly} \begin{center} \IpeScale{50} \Ipe{constraints.ipe} \end{center} @@ -44,10 +68,32 @@ constraints and its constrained triangulation"> The class \ccRefName\ of the CGAL library implements constrained triangulations. -The template parameters \ccc{Traits} and \ccc{Tds} -are to be instantiated with models of respectively -\ccc{TriangulationTraits_2} and -\ccc{TriangulationDdataStructure_2}. +The template parameter \ccc{Traits} +stands for a geometric traits class. It has to be a model +of the concept \ccc{TriangulationTraits_2}. +When intersection of input constraints are supported, +the geometric traits class +is required to provide additional function object types +to compute the intersection of two segments. +It has then to be a model of the concept +\ccc{ConstrainedTriangulationTraits_2}. +The template parameter \ccc{Tds} +stands for +a triangulation data structure class that has to be a model +of the concept \ccc{TriangulationDataStructure_2}. +The third parameter \ccc{Itag} is the intersection tag +which serves to choose different +strategies to deal with constraint intersections. +\cgal\ provides three valid types for this parameter : \\ +\ccc{CGAL::No_intersection_tag} disallows intersections of + input constraints,\\ +\ccc{CGAL::Exact_predicates_tag} is to be used when the traits +class +provides exact predicates but approximate constructions of the +intersection points.\\ +\ccc{CGAL::Exact_intersections_tag} is to be used in conjonction +with an exact aritmetic type. + The information about constrained edges is store in the faces of the triangulation. Thus the nested \ccc{Face} type of a constrained triangulation offers @@ -60,7 +106,11 @@ by the base face. The base face of a constrained triangulation has to be a model of the concept \ccc{ConstrainedTriangulationFaceBase_2}. -\cgal provides a defaults. If \ccc{Gt} is the geometric traits + + +\cgal\ provides a defaults for the template parameters +\ccc{Tds} and \ccc{Itag}, and for the \ccc{ConstrainedTriangulationFaceBase_2}. + If \ccc{Gt} is the geometric traits parameter, the default for \ccc{ConstrainedTriangulationFaceBase_2} is the class @@ -69,7 +119,9 @@ and the default for the triangulation data structure parameter is the class \ccc{CGAL::Triangulation_data_structure_using_list_2 < CGAL::Triangulation_vertex_base_2, - CGAL::Constrained_triangulation_face_base_2 >}. + CGAL::Constrained_triangulation_face_base_2 +>}. +The default intersection tag is \ccc{CGAL::No_intersection_tag}. \ccInclude{CGAL/Constrained_triangulation_2.h} @@ -78,11 +130,10 @@ triangulation data structure parameter is the class \ccc{Triangulation_2} \ccTypes -The only new type defined by -\ccRefName\ is a constraint type: a -constraint is represented as a pair of points. - -\ccTypedef{typedef pair Constraint;}{} +\ccTypedef{typedef pair Constraint;}{ The type of input +constraints} +\ccTypedef{typedef Itag Intersection_tag;}{Thr intersection tag which decides how +intersections between input constraints are dealt with.} @@ -99,7 +150,7 @@ constrained edges with null length are allowed. Constrained_triangulation_2& ct1)} {Copy constructor, all faces and vertices are duplicated and the constrained status of edges -is copied. This last feature is not yet implemented.} +is copied.} \ccConstructor{Constrained_triangulation_2(list& lc, const Traits& t = Traits());} @@ -156,7 +207,7 @@ for the location of \ccc{p}.} \ccPrecond The \ccc{value_type} of \ccc{first} and \ccc{last} is \ccc{Point}.} -\ccMethod{void insert(Point a, Point b);} +\ccMethod{void insert_constraint(Point a, Point b);} { Inserts points a and b, and inserts segment ab as a constraint. Removes the faces crossed by segment ab and creates new faces instead. If a vertex c lies on segment ab, constraint ab is @@ -169,7 +220,7 @@ intersect the relative interior of another constrained edge.} \ccMethod{ void push_back(const Constraint& c);} {Inserts constraints \ccc{c} as above.} -\ccMethod{ void insert(const Vertex_handle & va, const Vertex_handle & vb);} +\ccMethod{ void insert_constraint(const Vertex_handle & va, const Vertex_handle & vb);} { Inserts the line segment \ccc{s} whose endpoints are the vertices \ccc{va} and \ccc{vb} as a constrained edge \ccc{e}. The triangles intersected by s @@ -212,7 +263,9 @@ write ``C'' or ``N'' depending whether edge \ccc{CGAL::Triangulation_2}, \\ \ccc{TriangulationDataStructure_2}, \\ \ccc{TriangulationTraits_2} \\ -\ccc{ConstrainedTriangulationFaceBase_2} +\ccc{ConstrainedTriangulationTraits_2} \\ +\ccc{ConstrainedTriangulationFaceBase_2} \\ + diff --git a/Packages/Triangulation_2/doc_tex/Triangulation_2_ref/Constrained_triangulation_plus_2.tex b/Packages/Triangulation_2/doc_tex/Triangulation_2_ref/Constrained_triangulation_plus_2.tex index aaf69dc4e33..be82ca48461 100644 --- a/Packages/Triangulation_2/doc_tex/Triangulation_2_ref/Constrained_triangulation_plus_2.tex +++ b/Packages/Triangulation_2/doc_tex/Triangulation_2_ref/Constrained_triangulation_plus_2.tex @@ -11,56 +11,37 @@ % +------------------------------------------------------------------------+ -\begin{ccRefClass}{Constrained_triangulation_plus_2} %% add template arg's if necessary +\begin{ccRefClass}{Constrained_triangulation_plus_2} %% add template arg's if necessary %% \ccHtmlCrossLink{} %% add further rules for cross referencing links %% \ccHtmlIndexC[class]{} %% add further index entries The class \ccRefName\ -implements a constrained triangulation that -can deal with intersecting constraints. -The class allows as input a set of constraint segments which may be -intersecting, overlapping or partially -overlapping segments. -The class \ccRefName\ - constructs a triangulation of the arrangement -of these constraints. -To this purpose, a vertex is introduced at each intersection point, -thus refining the input constraints into subconstraints -which are edges (more precisely constrained edges) of the -triangulation. - -The class \ccRefName\ -is equipped with a data structure called the constraint hierarchy +implements a constrained triangulation +with an additional data +structure called the constraint hierarchy that keeps track of the input constraints and of their refinement in the triangulation. -Thus it is possible to retrieve, for each input constraint, the -sequence of intersection vertices added on this constraint -and, for each constrained edge of the -triangulation, the set of input constraints that overlap it. - -The class has two template parameters. The first one has to be -instantiated by a constrained triangulation or -a Delaunay constrained triangulation -class. The second parameter is an intersection tag - which allows to choose different -strategies to deal with constraint intersections. -\cgal\ provides three valid types for this parameter : \\ -the type \ccc{Tag_no_intersection} disallows intersections of - input constraints,\\ -the type \ccc{Tag_exact_intersections} is to be used in conjonction -with an exact aritmetic type \\ -the type \ccc{Tag_exact_predicates} is to be used when the traits -class of the base triangulation class -provide exact predicates but approximate constructions of the -intersection points. - -When intersections of input constraints are allowed, the traits class of the -base triangulation class -is required to provide the type -\ccc{Intersect_2}, a function object whose operator() -compute the intersection of two segments. - +The class \ccc{Constrained_triangulation_plus_2} +inherits from its template parameter Tr, which has to be instantiated +by a constraint or Delaunay constraint triangulation. +According to its intersection tag, the base class +will support intersecting input constraints or not. +When intersections of input constraints are supported, +the base class constructs a triangulation of the arrangement +of these constraints, +introducing new vertices at each proper intersection +points and refining the input constraints into subconstraints +which are edges (more precisely constrained edges) of the +triangulation. +In this context, the constraint hierarchy +keeps track of the input constraints and of their refinement +in the triangulation. This data structure keeps track of the +input constraints and maintain for each of them +the sequence of intersection vertices added on this constraint. +The constraint hierarchy also allows the user to retrieve the set +of constrained edges of the triangulation, and for each +constrained edge, the set of input constraints that overlap it. \ccInclude{CGAL/Constrained_triangulation_plus_2.h} @@ -180,13 +161,13 @@ to be given by \ccc{(lt,loc,li)}.} \ccPrecond The \ccc{value_type} of \ccc{first} and \ccc{last} is \ccc{Point}.} -\ccMethod{ void insert(Point a, Point b);} +\ccMethod{ void insert_constraint(Point a, Point b);} {Inserts the constraint segment ab in the triangulation. } \ccMethod{ void push_back(const Constraint& c);} {Inserts the constraint \ccc{c}.} -\ccMethod{ void insert(Vertex_handle va, Vertex_handle vb);} +\ccMethod{ void insert_constraint(Vertex_handle va, Vertex_handle vb);} { Inserts a constraint whose endpoints are the vertices pointed by \ccc{va} and \ccc{vb} diff --git a/Packages/Triangulation_2/doc_tex/Triangulation_2_ref/intro.tex b/Packages/Triangulation_2/doc_tex/Triangulation_2_ref/intro.tex index dd44e3783a3..d971d2bc3b7 100644 --- a/Packages/Triangulation_2/doc_tex/Triangulation_2_ref/intro.tex +++ b/Packages/Triangulation_2/doc_tex/Triangulation_2_ref/intro.tex @@ -44,7 +44,7 @@ while taking care of the combinatorial aspects of the triangulation. \ccRefConceptPage{TriangulationTraits_2} \\ \ccRefConceptPage{DelaunayTriangulationTraits_2} \\ \ccRefConceptPage{RegularTriangulationTraits_2} \\ -\ccRefConceptPage{ConstrainedTriangulationPlusTraits_2} +\ccRefConceptPage{ConstrainedTriangulationTraits_2} \subsection*{Classes} \ccRefIdfierPage{CGAL::Triangulation_2}\\ diff --git a/Packages/Triangulation_2/doc_tex/Triangulation_2_ref/main.tex b/Packages/Triangulation_2/doc_tex/Triangulation_2_ref/main.tex index dd111297cb1..7833d5db2da 100644 --- a/Packages/Triangulation_2/doc_tex/Triangulation_2_ref/main.tex +++ b/Packages/Triangulation_2/doc_tex/Triangulation_2_ref/main.tex @@ -7,7 +7,7 @@ \input{Triangulation_2_ref/intro.tex} -\input{Triangulation_2_ref/ConstrainedTriangulationPlusTraits_2.tex} +\input{Triangulation_2_ref/ConstrainedTriangulationTraits_2.tex} \input{Triangulation_2_ref/Constrained_Delaunay_triangulation_2.tex} \input{Triangulation_2_ref/Constrained_triangulation_2.tex} %\input{Triangulation_2_ref/Constrained_triangulation_demo_2.tex} diff --git a/Packages/Triangulation_2/doc_tex/basic/Triangulation_2_ref/ConstrainedDelaunayTriangulationTraits_2.tex b/Packages/Triangulation_2/doc_tex/basic/Triangulation_2_ref/ConstrainedDelaunayTriangulationTraits_2.tex new file mode 100644 index 00000000000..ef7c4eee329 --- /dev/null +++ b/Packages/Triangulation_2/doc_tex/basic/Triangulation_2_ref/ConstrainedDelaunayTriangulationTraits_2.tex @@ -0,0 +1,81 @@ +% +------------------------------------------------------------------------+ +% | Reference manual page: DelaunayConstrainedTriangulationTraits_2.tex +% +------------------------------------------------------------------------+ +% | 05.02.2002 Mariette Yvinec +% | Package: Triangulation_2 +% | +\RCSdef{\RCSConstrainedDelaunayTriangulationTraitsRev}{$Revision$} +\RCSdefDate{\RCSConstrainedDelaunayTriangulationTraitsDate}{$Date$} +% | +%%RefPage: end of header, begin of main body +% +------------------------------------------------------------------------+ + + +\begin{ccRefConcept}{ConstrainedDelaunayTriangulationTraits_2} + +%% \ccHtmlCrossLink{} %% add further rules for cross referencing links +%% \ccHtmlIndexC[concept]{} %% add further index entries + +\ccDefinition + +The concept \ccRefName\ defines the requirements for the geometric +traits class of a Delaunay constrained triangulation +( \ccc{Delaunay_constrained_Triangulation_2}) +that support intersections of input constraints (i. e. +when the template parameter \ccc{Itag} is instantiated +by one one of the tag classes \ccc{Exact_intersections_tag} or +\ccc{Exact_predicates_tag}). This concept refines both the concept +\ccc{TriangulationTraits_2} and the concept +\ccc{ConstrainedTriangulationTraits_2}. + +\ccGeneralizes +\ccc{TriangulationTraits_2} \\ +\ccc{ConstrainedTriangulationTraits_2} + + +\ccCreation +\ccCreationVariable{traits} %% choose variable name + +\ccConstructor{ConstrainedDelaunayTriangulationTraits_2();}{default constructor.} +\ccGlue +\ccConstructor{ConstrainedDelaunayTriangulationTraits_2( + const ConstrainedDelaunayTriangulationTraits_2& dctraits);} +{Copy constructor} + +\ccMethod{ConstrainedDelaunayTriangulationTraits_2 operator= + (const ConstrainedDelaunayTriangulationTraits_2& dctraits);} +{Assignment operator.} + +\ccHasModels +The kernels of \cgal are models for this traits class. + +\ccSeeAlso +\ccc{TriangulationTraits_2} \\ +\ccc{ConstrainedTriangulationTraits_2} \\ +\ccc{Constrained_triangulation_2} \\ +\ccc{Constrained_Delaunay_triangulation_2} + + +%\ccExample + +%A short example program. +%Instead of a short program fragment, a full running program can be +%included using the +%\verb|\ccIncludeExampleCode{examples/Package/ConstrainedTriangulationPlusTraits_2_prog.C}| +%macro. The program example would be part of the source code distribution and +%also part of the automatic test suite. + +%\begin{ccExampleCode} +%void your_example_code() { +%} +%\end{ccExampleCode} + +%% \ccIncludeExampleCode{examples/Package/ConstrainedTriangulationPlusTraits_2_prog.C} + +\end{ccRefConcept} + +% +------------------------------------------------------------------------+ +%%RefPage: end of main body, begin of footer +% EOF +% +------------------------------------------------------------------------+ + diff --git a/Packages/Triangulation_2/doc_tex/basic/Triangulation_2_ref/ConstrainedTriangulationPlusTraits_2.tex b/Packages/Triangulation_2/doc_tex/basic/Triangulation_2_ref/ConstrainedTriangulationPlusTraits_2.tex deleted file mode 100644 index 8167d193e92..00000000000 --- a/Packages/Triangulation_2/doc_tex/basic/Triangulation_2_ref/ConstrainedTriangulationPlusTraits_2.tex +++ /dev/null @@ -1,108 +0,0 @@ -% +------------------------------------------------------------------------+ -% | Reference manual page: ConstrainedTriangulationPlusTraits_2.tex -% +------------------------------------------------------------------------+ -% | 05.02.2002 Mariette Yvinec -% | Package: Triangulation_2 -% | -\RCSdef{\RCSConstrainedTriangulationPlusTraitsRev}{$Revision$} -\RCSdefDate{\RCSConstrainedTriangulationPlusTraitsDate}{$Date$} -% | -%%RefPage: end of header, begin of main body -% +------------------------------------------------------------------------+ - - -\begin{ccRefConcept}{ConstrainedTriangulationPlusTraits_2} - -%% \ccHtmlCrossLink{} %% add further rules for cross referencing links -%% \ccHtmlIndexC[concept]{} %% add further index entries - -\ccDefinition - -The concept \ccRefName\ defines the requirements for the traits -class of the triangulation \ccc{Tr} -plugged as first template argument of the class -\ccc{Constrained_Triangulation_Plus_2}. -The template parameter \ccc{Tr} has to be instantiated -by a constrained or Delaunay constrained triangulation -class, i. e. either by -\ccc{Constrained_Triangulation_2} -or by \ccc{Constrained_Delaunay_Triangulation_2}. -If intersections of input constraints are allowed -(i.e. the \ccc{Itag} template parameter -is either \ccc{Tag_exact_intersections} or -\ccc{Tag_exact_predicates}), the traits - class \ccc{Traits} of the base triangulation class -has to provide -an object function to compute the intersection of two -constrained segments. Therefore, the concept -\ccRefName\ is a refinement of the -the traits concept -(\ccc{TriangulationTraits_2} or \ccc{DelaunayTriangulationTraits_2}) -of the base triangulation class. - -\ccGeneralizes - -ThisConcept generalizes one of the following concept\\ -\ccc{TriangulationTraits_2} \\ -\ccc{DelaunayTriangulationTraits_2} - - -\ccTypes - -\ccNestedType{Intersect_2}{A function object whose operator() -computes the intersection of two segments : \\ -\ccc{Object_2 operator()(Segment s1, Segment s2);} -Returns the intersection of \ccc{s1} and \ccc{s2}.} - - - -\ccCreation -\ccCreationVariable{traits} %% choose variable name - -\ccConstructor{ConstrainedTriangulationPlusTraits_2();}{default constructor.} -\ccGlue -\ccConstructor{ConstrainedTriangulationPlusTraits_2( - const ConstrainedTriangulationPlusTraits_2& ctptraits);} -{Copy constructor} - -\ccMethod{ConstrainedTriangulationPlusTraits_2 operator= - (const ConstrainedTriangulationPlusTraits_2& ctptraits);} -{Assignment operator.} - - -\ccHeading{Access to constructor object} -\ccMethod{Intersect_2 intersect_2_object();}{} - -\ccHasModels -The Cartesian and homogeneous kernels provided by \cgal. - - - -\ccSeeAlso -\ccc{TriangulationTraits_2} \\ -\ccc{DelaunayTriangulationTraits_2} - - -\ccExample - -%A short example program. -%Instead of a short program fragment, a full running program can be -%included using the -%\verb|\ccIncludeExampleCode{examples/Package/ConstrainedTriangulationPlusTraits_2_prog.C}| -%macro. The program example would be part of the source code distribution and -%also part of the automatic test suite. - -%\begin{ccExampleCode} -%void your_example_code() { -%} -%\end{ccExampleCode} - -%% \ccIncludeExampleCode{examples/Package/ConstrainedTriangulationPlusTraits_2_prog.C} - -\end{ccRefConcept} - -% +------------------------------------------------------------------------+ -%%RefPage: end of main body, begin of footer -% EOF -% +------------------------------------------------------------------------+ - diff --git a/Packages/Triangulation_2/doc_tex/basic/Triangulation_2_ref/ConstrainedTriangulationTraits_2.tex b/Packages/Triangulation_2/doc_tex/basic/Triangulation_2_ref/ConstrainedTriangulationTraits_2.tex new file mode 100644 index 00000000000..ecfdcdac5c4 --- /dev/null +++ b/Packages/Triangulation_2/doc_tex/basic/Triangulation_2_ref/ConstrainedTriangulationTraits_2.tex @@ -0,0 +1,116 @@ +% +------------------------------------------------------------------------+ +% | Reference manual page: ConstrainedTriangulationTraits_2.tex +% +------------------------------------------------------------------------+ +% | 05.02.2002 Mariette Yvinec +% | Package: Triangulation_2 +% | +\RCSdef{\RCSConstrainedTriangulationTraitsRev}{$Revision$} +\RCSdefDate{\RCSConstrainedTriangulationTraitsDate}{$Date$} +% | +%%RefPage: end of header, begin of main body +% +------------------------------------------------------------------------+ + + +\begin{ccRefConcept}{ConstrainedTriangulationTraits_2} + +%% \ccHtmlCrossLink{} %% add further rules for cross referencing links +%% \ccHtmlIndexC[concept]{} %% add further index entries + +\ccDefinition + +The concept \ccRefName\ defines the requirements for the geometric +traits class of a constrained triangulation +( \ccc{Constrained_Triangulation_2}) +that support intersections of input constraints (i. e. +when the template parameter \ccc{Itag} is instantiated +by one one of the tag classes \ccc{Exact_intersections_tag} or +\ccc{Exact_predicates_tag}). This concept refines the concept +\ccc{TriangulationTraits_2}, adding requirement for function objects +to compute the intersection points of two constraints. +When \ccc{Exact_predicates_tag}) is used, the insertion of constraint may +also require additionnal types +to compute the square distance between a point and a line + + +\ccGeneralizes +\ccc{TriangulationTraits_2} + + +\ccTypes + +\ccNestedType{Intersect_2}{A function object whose operator() +computes the intersection of two segments : \\ +\ccc{Object_2 operator()(Segment s1, Segment s2);} +Returns the intersection of \ccc{s1} and \ccc{s2}.} + +The geometric traits of constrained triangulation is instantiated with +the intersection tag \ccc{Exact_predicates_tag} +is also required to provide the following types~: +\ccNestedType{Line_2}{The line type.} +\ccGlue +\ccNestedType{Construct_line_2} {A function object whose operator() +constructs a line (type \ccc{Line_2}) from two points +(type \ccc{Point_2}).} +\ccGlue +\ccNestedType{Compute_squared_distance_2}{A function object with an +operator() designed to compute the squared distance between +a line (type \ccc{Line_2}) and a point (type \ccc{Point_2}).} + + +\ccCreation +\ccCreationVariable{traits} %% choose variable name + +\ccConstructor{ConstrainedTriangulationTraits_2();}{default constructor.} +\ccGlue +\ccConstructor{ConstrainedTriangulationTraits_2( + const ConstrainedTriangulationPlusTraits_2& cttraits);} +{Copy constructor} + +\ccMethod{ConstrainedTriangulationTraits_2 operator= + (const ConstrainedTriangulationTraits_2& cttraits);} +{Assignment operator.} + + +\ccHeading{Access to constructor object} +\ccMethod{Intersect_2 intersect_2_object();}{} +\ccMethod{Construct_line_2 construct_line_2_object();}{required when +the intersection tag is \ccc{Exact_predicates_tag}.} +\ccMethod{Compute_squared_distance_2 +compute_squared_distance_2_object();} +{required when +the intersection tag is \ccc{Exact_predicates_tag}.} + + +\ccHasModels +The kernels of \cgal are models for this traits class. + + + +\ccSeeAlso +\ccc{TriangulationTraits_2} \\ +\ccc{ConstrainedTriangulationTraits_2} + + +%\ccExample + +%A short example program. +%Instead of a short program fragment, a full running program can be +%included using the +%\verb|\ccIncludeExampleCode{examples/Package/ConstrainedTriangulationPlusTraits_2_prog.C}| +%macro. The program example would be part of the source code distribution and +%also part of the automatic test suite. + +%\begin{ccExampleCode} +%void your_example_code() { +%} +%\end{ccExampleCode} + +%% \ccIncludeExampleCode{examples/Package/ConstrainedTriangulationPlusTraits_2_prog.C} + +\end{ccRefConcept} + +% +------------------------------------------------------------------------+ +%%RefPage: end of main body, begin of footer +% EOF +% +------------------------------------------------------------------------+ + diff --git a/Packages/Triangulation_2/doc_tex/basic/Triangulation_2_ref/Constrained_Delaunay_triangulation_2.tex b/Packages/Triangulation_2/doc_tex/basic/Triangulation_2_ref/Constrained_Delaunay_triangulation_2.tex index 97d06e4c0be..a3f49e24988 100644 --- a/Packages/Triangulation_2/doc_tex/basic/Triangulation_2_ref/Constrained_Delaunay_triangulation_2.tex +++ b/Packages/Triangulation_2/doc_tex/basic/Triangulation_2_ref/Constrained_Delaunay_triangulation_2.tex @@ -11,7 +11,7 @@ % +------------------------------------------------------------------------+ -\begin{ccRefClass}{Constrained_Delaunay_triangulation_2} %% add template arg's if necessary +\begin{ccRefClass}{Constrained_Delaunay_triangulation_2} %% add template arg's if necessary %% \ccHtmlCrossLink{} %% add further rules for cross referencing links %% \ccHtmlIndexC[class]{} %% add further index entries @@ -34,6 +34,25 @@ from the interior of the triangle. The class \ccRefName\ is designed to represent constrained Delaunay triangulations. +As in the case of constrained triangulations, three different versions +of Delaunay constrained triangulations are offered +and can be selected through the instantation of the +third template parameter \ccc{Itag} which can be one of the +following~: +\ccc{CGAL::No_intersection_tag} if intersections of + input constraints are disallowed,\\ +\ccc{CGAL::Exact_predicates_tag} allows intersection between input +constraints + and is to be used when the traits +class +provides exact predicates but approximate constructions of the +intersection points. +\ccc{CGAL::Exact_intersections_tag} allows intersection between input +constraints + and is to be used in conjonction +with an exact aritmetic type. + + The template parameters \ccc{Tds} has to be instantiate with a model of \ccc{Triangulation_data_structure_2}. The geometric traits @@ -43,6 +62,12 @@ of a Delaunay triangulation and the \ccc{Traits} parameter has to be instantiated with a model \ccc{Delaunay_triangulation_traits_2}. +When intersection of input constraints are supported, +the geometric traits class +is required to provide additional function object types +to compute the intersection of two segments. +and has then to be also a model of the concept +\ccc{ConstrainedTriangulationTraits_2}. A constrained Delaunay triangulation is not a Delaunay triangulation but it is a constrained triangulation. @@ -62,6 +87,8 @@ by the base face. The base face of a constrained triangulation has to be a model of the concept \ccc{ConstrainedTriangulationFaceBase_2}. + +\cgal provides a defaults for the template parameters. If \ccc{Gt} is the geometric traits parameter, the default for @@ -73,14 +100,15 @@ triangulation data structure parameter is the class CGAL::Triangulation_vertex_base_2, CGAL::Constrained_triangulation_face_base_2 >}. +The default intersection tag is \ccc{CGAL::No_intersection_tag}. \ccInclude{Constrained_Delaunay_triangulation_2.h} -\ccInheritsFrom \ccc{Constrained_triangulation_2} +\ccInheritsFrom \ccc{Constrained_triangulation_2} \ccTypes All types used in this class are inherited from the base class -\ccc{Constrained_triangulation_2}. +\ccc{Constrained_triangulation_2}. diff --git a/Packages/Triangulation_2/doc_tex/basic/Triangulation_2_ref/Constrained_triangulation_2.tex b/Packages/Triangulation_2/doc_tex/basic/Triangulation_2_ref/Constrained_triangulation_2.tex index 3fd7f948660..b3c62013dfe 100644 --- a/Packages/Triangulation_2/doc_tex/basic/Triangulation_2_ref/Constrained_triangulation_2.tex +++ b/Packages/Triangulation_2/doc_tex/basic/Triangulation_2_ref/Constrained_triangulation_2.tex @@ -11,25 +11,49 @@ % +------------------------------------------------------------------------+ -\begin{ccRefClass}{Constrained_triangulation_2} %% add template arg's if necessary +\begin{ccRefClass}{Constrained_triangulation_2} %% add template arg's if necessary %% \ccHtmlCrossLink{} %% add further rules for cross referencing links %% \ccHtmlIndexC[class]{} %% add further index entries -\ccDefinition - +\ccDefinition A constrained triangulation is a triangulation of a set of points which has to include among its edges a given set of segments joining the points. The corresponding edges are called {\em constrained edges}. -The set of points defining the vertices of the triangulation -includes the set of constrained edges endpoints. It may include other points -(considered as null length constrained edges) as well. The set of -constrained edges forms a set of segments which do not intersect -except possibly at their endpoints. Any number of constrained edges +The endpoints of constrained edges are of course vertices of the +triangulation. However the triangulation may include +include other vertices as well. +There are three versions of constrained triangulations. +In the basic version, the constrained triangulation +do not handle intersecting constraints, and the set of input +constraints is required to be a set of segments that do not intersect +except possibly at their endpoints. Any number of constrained edges are allowed to share the same endpoint. Vertical constrained edges or constrained edges with null length are allowed. +The two other versions support intersecting input constraints. +In those versions, input constraints are allowed to be +intersecting, overlapping or partially +overlapping segments. +The triangulation introduce additional vertices at each point which +is a proper intersection points of two +constraints. A single constraint intersecting other +constraints will then appear as several edges in the triangulation. +The two versions dealing with intersecting constraints, slightly differ +in the way intersecting constraints are dealt with. One of them is +designed to be robust when predicates are evaluated exactly but +constructions (i. e. intersection computations) are +approximative. +The other one is designed to be used +with an exact arithmetic (meaning exact +evaluation of predicates and exact computation of intersections.) +This last version finds its full efficiency when used in conjonction +with a constraint hierarchy data structure (which allows to avoid the +cascading of intersection computations) +as provided in the class +\ccc{Constrained_triangulation_plus_2}. See section~\ref{Section_2D_Constrained_triangulation_plus}. + \begin{ccTexOnly} \begin{center} \IpeScale{50} \Ipe{constraints.ipe} \end{center} @@ -44,10 +68,32 @@ constraints and its constrained triangulation"> The class \ccRefName\ of the CGAL library implements constrained triangulations. -The template parameters \ccc{Traits} and \ccc{Tds} -are to be instantiated with models of respectively -\ccc{TriangulationTraits_2} and -\ccc{TriangulationDdataStructure_2}. +The template parameter \ccc{Traits} +stands for a geometric traits class. It has to be a model +of the concept \ccc{TriangulationTraits_2}. +When intersection of input constraints are supported, +the geometric traits class +is required to provide additional function object types +to compute the intersection of two segments. +It has then to be a model of the concept +\ccc{ConstrainedTriangulationTraits_2}. +The template parameter \ccc{Tds} +stands for +a triangulation data structure class that has to be a model +of the concept \ccc{TriangulationDataStructure_2}. +The third parameter \ccc{Itag} is the intersection tag +which serves to choose different +strategies to deal with constraint intersections. +\cgal\ provides three valid types for this parameter : \\ +\ccc{CGAL::No_intersection_tag} disallows intersections of + input constraints,\\ +\ccc{CGAL::Exact_predicates_tag} is to be used when the traits +class +provides exact predicates but approximate constructions of the +intersection points.\\ +\ccc{CGAL::Exact_intersections_tag} is to be used in conjonction +with an exact aritmetic type. + The information about constrained edges is store in the faces of the triangulation. Thus the nested \ccc{Face} type of a constrained triangulation offers @@ -60,7 +106,11 @@ by the base face. The base face of a constrained triangulation has to be a model of the concept \ccc{ConstrainedTriangulationFaceBase_2}. -\cgal provides a defaults. If \ccc{Gt} is the geometric traits + + +\cgal\ provides a defaults for the template parameters +\ccc{Tds} and \ccc{Itag}, and for the \ccc{ConstrainedTriangulationFaceBase_2}. + If \ccc{Gt} is the geometric traits parameter, the default for \ccc{ConstrainedTriangulationFaceBase_2} is the class @@ -69,7 +119,9 @@ and the default for the triangulation data structure parameter is the class \ccc{CGAL::Triangulation_data_structure_using_list_2 < CGAL::Triangulation_vertex_base_2, - CGAL::Constrained_triangulation_face_base_2 >}. + CGAL::Constrained_triangulation_face_base_2 +>}. +The default intersection tag is \ccc{CGAL::No_intersection_tag}. \ccInclude{CGAL/Constrained_triangulation_2.h} @@ -78,11 +130,10 @@ triangulation data structure parameter is the class \ccc{Triangulation_2} \ccTypes -The only new type defined by -\ccRefName\ is a constraint type: a -constraint is represented as a pair of points. - -\ccTypedef{typedef pair Constraint;}{} +\ccTypedef{typedef pair Constraint;}{ The type of input +constraints} +\ccTypedef{typedef Itag Intersection_tag;}{Thr intersection tag which decides how +intersections between input constraints are dealt with.} @@ -99,7 +150,7 @@ constrained edges with null length are allowed. Constrained_triangulation_2& ct1)} {Copy constructor, all faces and vertices are duplicated and the constrained status of edges -is copied. This last feature is not yet implemented.} +is copied.} \ccConstructor{Constrained_triangulation_2(list& lc, const Traits& t = Traits());} @@ -156,7 +207,7 @@ for the location of \ccc{p}.} \ccPrecond The \ccc{value_type} of \ccc{first} and \ccc{last} is \ccc{Point}.} -\ccMethod{void insert(Point a, Point b);} +\ccMethod{void insert_constraint(Point a, Point b);} { Inserts points a and b, and inserts segment ab as a constraint. Removes the faces crossed by segment ab and creates new faces instead. If a vertex c lies on segment ab, constraint ab is @@ -169,7 +220,7 @@ intersect the relative interior of another constrained edge.} \ccMethod{ void push_back(const Constraint& c);} {Inserts constraints \ccc{c} as above.} -\ccMethod{ void insert(const Vertex_handle & va, const Vertex_handle & vb);} +\ccMethod{ void insert_constraint(const Vertex_handle & va, const Vertex_handle & vb);} { Inserts the line segment \ccc{s} whose endpoints are the vertices \ccc{va} and \ccc{vb} as a constrained edge \ccc{e}. The triangles intersected by s @@ -212,7 +263,9 @@ write ``C'' or ``N'' depending whether edge \ccc{CGAL::Triangulation_2}, \\ \ccc{TriangulationDataStructure_2}, \\ \ccc{TriangulationTraits_2} \\ -\ccc{ConstrainedTriangulationFaceBase_2} +\ccc{ConstrainedTriangulationTraits_2} \\ +\ccc{ConstrainedTriangulationFaceBase_2} \\ + diff --git a/Packages/Triangulation_2/doc_tex/basic/Triangulation_2_ref/Constrained_triangulation_plus_2.tex b/Packages/Triangulation_2/doc_tex/basic/Triangulation_2_ref/Constrained_triangulation_plus_2.tex index aaf69dc4e33..be82ca48461 100644 --- a/Packages/Triangulation_2/doc_tex/basic/Triangulation_2_ref/Constrained_triangulation_plus_2.tex +++ b/Packages/Triangulation_2/doc_tex/basic/Triangulation_2_ref/Constrained_triangulation_plus_2.tex @@ -11,56 +11,37 @@ % +------------------------------------------------------------------------+ -\begin{ccRefClass}{Constrained_triangulation_plus_2} %% add template arg's if necessary +\begin{ccRefClass}{Constrained_triangulation_plus_2} %% add template arg's if necessary %% \ccHtmlCrossLink{} %% add further rules for cross referencing links %% \ccHtmlIndexC[class]{} %% add further index entries The class \ccRefName\ -implements a constrained triangulation that -can deal with intersecting constraints. -The class allows as input a set of constraint segments which may be -intersecting, overlapping or partially -overlapping segments. -The class \ccRefName\ - constructs a triangulation of the arrangement -of these constraints. -To this purpose, a vertex is introduced at each intersection point, -thus refining the input constraints into subconstraints -which are edges (more precisely constrained edges) of the -triangulation. - -The class \ccRefName\ -is equipped with a data structure called the constraint hierarchy +implements a constrained triangulation +with an additional data +structure called the constraint hierarchy that keeps track of the input constraints and of their refinement in the triangulation. -Thus it is possible to retrieve, for each input constraint, the -sequence of intersection vertices added on this constraint -and, for each constrained edge of the -triangulation, the set of input constraints that overlap it. - -The class has two template parameters. The first one has to be -instantiated by a constrained triangulation or -a Delaunay constrained triangulation -class. The second parameter is an intersection tag - which allows to choose different -strategies to deal with constraint intersections. -\cgal\ provides three valid types for this parameter : \\ -the type \ccc{Tag_no_intersection} disallows intersections of - input constraints,\\ -the type \ccc{Tag_exact_intersections} is to be used in conjonction -with an exact aritmetic type \\ -the type \ccc{Tag_exact_predicates} is to be used when the traits -class of the base triangulation class -provide exact predicates but approximate constructions of the -intersection points. - -When intersections of input constraints are allowed, the traits class of the -base triangulation class -is required to provide the type -\ccc{Intersect_2}, a function object whose operator() -compute the intersection of two segments. - +The class \ccc{Constrained_triangulation_plus_2} +inherits from its template parameter Tr, which has to be instantiated +by a constraint or Delaunay constraint triangulation. +According to its intersection tag, the base class +will support intersecting input constraints or not. +When intersections of input constraints are supported, +the base class constructs a triangulation of the arrangement +of these constraints, +introducing new vertices at each proper intersection +points and refining the input constraints into subconstraints +which are edges (more precisely constrained edges) of the +triangulation. +In this context, the constraint hierarchy +keeps track of the input constraints and of their refinement +in the triangulation. This data structure keeps track of the +input constraints and maintain for each of them +the sequence of intersection vertices added on this constraint. +The constraint hierarchy also allows the user to retrieve the set +of constrained edges of the triangulation, and for each +constrained edge, the set of input constraints that overlap it. \ccInclude{CGAL/Constrained_triangulation_plus_2.h} @@ -180,13 +161,13 @@ to be given by \ccc{(lt,loc,li)}.} \ccPrecond The \ccc{value_type} of \ccc{first} and \ccc{last} is \ccc{Point}.} -\ccMethod{ void insert(Point a, Point b);} +\ccMethod{ void insert_constraint(Point a, Point b);} {Inserts the constraint segment ab in the triangulation. } \ccMethod{ void push_back(const Constraint& c);} {Inserts the constraint \ccc{c}.} -\ccMethod{ void insert(Vertex_handle va, Vertex_handle vb);} +\ccMethod{ void insert_constraint(Vertex_handle va, Vertex_handle vb);} { Inserts a constraint whose endpoints are the vertices pointed by \ccc{va} and \ccc{vb} diff --git a/Packages/Triangulation_2/doc_tex/basic/Triangulation_2_ref/intro.tex b/Packages/Triangulation_2/doc_tex/basic/Triangulation_2_ref/intro.tex index dd44e3783a3..d971d2bc3b7 100644 --- a/Packages/Triangulation_2/doc_tex/basic/Triangulation_2_ref/intro.tex +++ b/Packages/Triangulation_2/doc_tex/basic/Triangulation_2_ref/intro.tex @@ -44,7 +44,7 @@ while taking care of the combinatorial aspects of the triangulation. \ccRefConceptPage{TriangulationTraits_2} \\ \ccRefConceptPage{DelaunayTriangulationTraits_2} \\ \ccRefConceptPage{RegularTriangulationTraits_2} \\ -\ccRefConceptPage{ConstrainedTriangulationPlusTraits_2} +\ccRefConceptPage{ConstrainedTriangulationTraits_2} \subsection*{Classes} \ccRefIdfierPage{CGAL::Triangulation_2}\\ diff --git a/Packages/Triangulation_2/doc_tex/basic/Triangulation_2_ref/main.tex b/Packages/Triangulation_2/doc_tex/basic/Triangulation_2_ref/main.tex index dd111297cb1..7833d5db2da 100644 --- a/Packages/Triangulation_2/doc_tex/basic/Triangulation_2_ref/main.tex +++ b/Packages/Triangulation_2/doc_tex/basic/Triangulation_2_ref/main.tex @@ -7,7 +7,7 @@ \input{Triangulation_2_ref/intro.tex} -\input{Triangulation_2_ref/ConstrainedTriangulationPlusTraits_2.tex} +\input{Triangulation_2_ref/ConstrainedTriangulationTraits_2.tex} \input{Triangulation_2_ref/Constrained_Delaunay_triangulation_2.tex} \input{Triangulation_2_ref/Constrained_triangulation_2.tex} %\input{Triangulation_2_ref/Constrained_triangulation_demo_2.tex}