mirror of https://github.com/CGAL/cgal
Triangulation_2: Add an example that stars a conflict zone
This commit is contained in:
parent
b18cd37b7f
commit
fa0a8a2bed
|
|
@ -236,7 +236,7 @@ std::pair<OutputItFaces,OutputItBoundaryEdges>
|
|||
get_conflicts_and_boundary(const Point &p,
|
||||
OutputItFaces fit,
|
||||
OutputItBoundaryEdges eit,
|
||||
Face_handle start) const;
|
||||
Face_handle start = Face_handle()) const;
|
||||
|
||||
/*!
|
||||
outputs the faces of the conflict zone of point `p` into an output iterator.
|
||||
|
|
@ -248,7 +248,7 @@ template <class OutputItFaces>
|
|||
OutputItFaces
|
||||
get_conflicts (const Point &p,
|
||||
OutputItFaces fit,
|
||||
Face_handle start) const;
|
||||
Face_handle start = Face_handle()) const;
|
||||
|
||||
/*!
|
||||
outputs the boundary edges of the conflict zone of point `p` into an output iterator.
|
||||
|
|
@ -266,7 +266,7 @@ template <class OutputItBoundaryEdges>
|
|||
OutputItBoundaryEdges
|
||||
get_boundary_of_conflicts(const Point &p,
|
||||
OutputItBoundaryEdges eit,
|
||||
Face_handle start) const;
|
||||
Face_handle start = Face_handle()) const;
|
||||
|
||||
/// @}
|
||||
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ int main( )
|
|||
dt2.insert(Point_2(10,0));
|
||||
dt2.insert(Point_2(0,10));
|
||||
|
||||
std::array<Point_2,3> points = { Point_2(2,2), Point_2(1,0), Point_2(9,9) };
|
||||
std::array<Point_2,3> points = { Point_2(2,2), Point_2(1,0), Point_2(2,2) };
|
||||
|
||||
CGAL::spatial_sort(points.begin(), points.end());
|
||||
|
||||
|
|
@ -40,19 +40,22 @@ int main( )
|
|||
std::back_inserter(edges),
|
||||
hint);
|
||||
|
||||
// Do something with the faces before the insertion
|
||||
if(faces.empty()){
|
||||
std::cout << "point " << p << " already in the triangulation" << std::endl;
|
||||
}else{
|
||||
// Do something with the faces before the insertion
|
||||
|
||||
Vertex_handle vh = dt2.star_hole(p,
|
||||
edges.begin(), edges.end(),
|
||||
faces.begin(), faces.end());
|
||||
hint = vh->face(); // we could also take any element of faces
|
||||
Vertex_handle vh = dt2.star_hole(p,
|
||||
edges.begin(), edges.end(),
|
||||
faces.begin(), faces.end());
|
||||
hint = vh->face(); // we could also take any element of faces
|
||||
|
||||
// Do something with the faces after the insertion
|
||||
Face_circulator fc = dt2.incident_faces(vh), done(fc);
|
||||
do {
|
||||
// Do something with the faces after the insertion
|
||||
Face_circulator fc = dt2.incident_faces(vh), done(fc);
|
||||
do {
|
||||
fc++;
|
||||
} while (fc != done);
|
||||
|
||||
} while (fc != done);
|
||||
}
|
||||
draw(dt2);
|
||||
}
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Reference in New Issue