Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Access vertices of faces in Delaunay

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Access vertices of faces in Delaunay


Chronological Thread 
  • From: Andreas Fabri <>
  • To:
  • Subject: Re: [cgal-discuss] Access vertices of faces in Delaunay
  • Date: Mon, 16 Feb 2009 18:17:13 +0100


When you insert the points one by one you can associate the index
to each vertex just after its insertion.

When you use the insert function with the iterator range, the points
get reordered in order that the insertion is fast. The reordering uses
spatial sorting documented here:
http://www.cgal.org/Manual/3.4/doc_html/cgal_manual/Spatial_sorting/Chapter_main.html


To combine spatial sorting to get it fast with your order you should have a
look at CGAL-3.4/examples/Spatial_sort/sort_indices.cpp

There you find the ingredients to insert the points one by one in an order
that makes it fast, and as you insert them one by one you can give them
the correct index according to your indexing scheme.

The rest is left as an exercise to the reader ===:>-

andreas





wrote:
Hmm. When the insertion has no order how can i ensure i keep my input order of
my points?
If i want read out the vertices or faces of the finished triangulation is this
in a non-changing order?
Because if the input is random and the output how can i ensure reliability?

coord.push_back(Point(x,y,z));
//How do i assign an index to the point which is put in the "coord" list?

at the moment i do that after the triangulation because i thought it was in
order.
// Loop through faces of triangulation and assign index to vertices
int q = 0;
for (Finite_vertices_iterator fvi = Delaunay.finite_vertices_begin();
fvi !=
Delaunay.finite_vertices_end();++fvi){
fvi->info()= q++;
}




Archive powered by MHonArc 2.6.16.

Top of Page