Subject: CGAL users discussion list
List archive
- From: schlady <>
- To:
- Subject: [cgal-discuss] Re: indices in CGAL::Delaunay_triangulation_2
- Date: Wed, 1 Dec 2010 08:01:59 -0800 (PST)
mr_hell wrote:
>
> I have some troubles with filling CGAL::Delaunay_triangulation_2 with
> vertices using info() in vertex handle.
> Normally i use this kind of code
>
> for(int i = 0; i < inp_pointscount; i++){
> Delaunay2::Vertex_handle vert =
> triangulation.insert(DelaunayPoint2(inputpoints[i].x,inputpoints[i].y));
> vert->info() = i;
> }
>
> but in this case each triangulation.insert call causes triangulation
> recalculation, so i have inp_pointscount triangulation calls instead of
> one, and it takes more time to get result.
>
> and this code
>
> triangulation.insert(pointlist.begin(), pointlist.end());
>
> int count = 0;
> for(Delaunay2::Finite_vertices_iterator v_it =
> triangulation.finite_vertices_begin(); v_it !=
> triangulation.finite_vertices_end(); ++v_it, count++)
> v_it->info() = count;
>
> doesnt work correctly.
>
> how to fill info() field, get correct results and call triangulation only
> one time?
>
Hello list,
I am also having the same problem.
I try to assign unique indices to the Delaunay vertices by using info().
Is there a way to fill the info() field by using the iterator version of the
insert method?
I also would like to know, does the vertex iterator preserve the same order
of vertices/points as I inserted them?
Cheers,
Jens
--
View this message in context:
http://cgal-discuss.949826.n4.nabble.com/indices-in-CGAL-Delaunay-triangulation-2-tp2851213p3067565.html
Sent from the cgal-discuss mailing list archive at Nabble.com.
- [cgal-discuss] Re: indices in CGAL::Delaunay_triangulation_2, schlady, 12/01/2010
- Re: [cgal-discuss] Re: indices in CGAL::Delaunay_triangulation_2, Sebastien Loriot (GeometryFactory), 12/01/2010
Archive powered by MHonArc 2.6.16.