As in the case of constrained triangulations, three different versions
of Delaunay constrained triangulations are offered
depending on wether the user wishes to handle
intersecting input constraints or not.
The desired version can be selected through the instantation of the
third template parameter Itag which can be one of the
following :
CGAL::No_intersection_tag if intersections of
input constraints are disallowed,
CGAL::Exact_predicates_tag allows intersections between input
constraints
and is to be used when the traits
class
provides exact predicates but approximate constructions of the
intersection points.
CGAL::Exact_intersections_tag allows intersections between input
constraints
and is to be used in conjunction
with an exact arithmetic type.
The template parameters Tds has to be instantiate with a model of TriangulationDataStructure_2. The geometric traits of a constrained Delaunay triangulation is required to provide the side_of_oriented_circle test as the geometric traits of a Delaunay triangulation and the Traits parameter has to be instantiated with a model DelaunayTriangulationTraits_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 ConstrainedTriangulationTraits_2.
A constrained Delaunay triangulation is not a Delaunay triangulation but it is a constrained triangulation. Therefore the class Constrained_Delaunay_triangulation_2<Traits,Tds,Itag> derives from the class Constrained_triangulation_2<Traits,Tds>. Also, information about the status (constrained or not) of the edges of the triangulation is stored in the faces. Thus the nested Face type of a constrained triangulation offers additonnal functionalities to deal with this information. These additional functionalities induce additional requirements on the base face class plugged into the triangulation data structure of a constrained Delaunay triangulation. The base face of a constrained Delaunay triangulation has to be a model of the concept ConstrainedTriangulationFaceBase_2.
CGAL provides a default for the template parameters. If Gt is the geometric traits parameter, the default for ConstrainedTriangulationFaceBase_2 is the class CGAL::Constrained_triangulation_face_base_2<Gt> and the default for the triangulation data structure parameter is the class CGAL::Triangulation_data_structure_2< CGAL::Triangulation_vertex_base_2<Gt>, CGAL::Constrained_triangulation_face_base_2<Gt> >. The default intersection tag is CGAL::No_intersection_tag.
#include <CGAL/Constrained_Delaunay_triangulation_2.h>
| |||
Introduces an empty constrained Delaunay triangulation cdt.
| |||
| |||
Copy constructor, all faces and vertices
are duplicated and the constrained status of edges
is copied.
| |||
| |||
Introduces a constrained triangulation, the constrained edges of which
are the edges of the list lc.
| |||
| |||
| |||
A templated constructor which introduces and builds
a constrained triangulation with constrained edges in the range
first, last. Precondition: The value_type of first and last is Constraint.
|
|
| |||
Inserts point p in the triangulation. If present f is used as an hint for the location of p. | ||||
|
| |||
Same as above except that the location of the point p to be inserted is assumed to be given by (lt,loc,i). | ||||
|
| |||
Equivalent to insert(p). | ||||
| ||||
|
| |||
Inserts the points in the range
first, last.
Returns the number of inserted points. Precondition: The value_type of first and last is Point. | ||||
|
| |||
Inserts segment ab as a constrained edge in the triangulation. | ||||
|
| |||
Inserts constraints c as above. | ||||
|
| |||
Inserts the line segment whose endpoints are the vertices va and vb as a constrained edge e in the triangulation. | ||||
|
| |||
Removes vertex v. Precondition: Vertex v is not incident to a constrained edge. | ||||
|
| |||
Make the edges incident to vertex v unconstrained edges. | ||||
|
| |||
Edge (f,i) is no longer constrained. |
|
| Checks if the triangulation is valid and if each constrained edge is consistently marked constrained in its two incident faces. |
advanced |
|
| |
Determines if edge (f,i) can be flipped. Returns true if edge (f,i) is not constrained and the circle circumscribing f contains the vertex of f->neighbor(i) opposite to edge (f,i). | ||
|
| |
Flip f and f->neighbor(i). | ||
|
| |
Makes the triangulation constrained Delaunay by flipping edges. List edges contains an initial list of edges to be flipped. The returned triangulation is constrained Delaunay if the initial list contains at least all the edges of the input triangulation that failed to be constrained Delaunay. (An edge is said to be constrained Delaunay if it is either constrained or locally Delaunay.) |
advanced |