Subject: CGAL users discussion list
List archive
- From: Daniel Duque <>
- To:
- Subject: Re: [cgal-discuss] Inserting vertices into Voronoi Diagram
- Date: Mon, 23 Nov 2009 13:00:48 +0100
- Organization: UPM
Hi,
> typedef std::vector<Vertex> Vertex_vector;
>
> Vertex_vector vv;
> Vertex_iterator vit;
> Point_2 p;
>
> for (vit = this->vertices_begin(); vit != this->vertices_end(); ++vit) {
> vv.push_back(*vit);
> }
This is wrong. You want the _points_, not the vertices. Those are going down
the loo here:
> this->clear();
You'd need a sdt::vector<Point>, then push back the _points_ on that vector:
Also, beware you may do this in a point-by-point fashion. You may insert a
new
point, then delete the old one (or perhaps, delete then insert). This is
tricky, but there is a move() function to do this, which I am currently
trying
(I think it is not documented, but it's right there in the .h source).
Best,
Daniel
- [cgal-discuss] Inserting vertices into Voronoi Diagram, chernysh, 11/23/2009
- Re: [cgal-discuss] Inserting vertices into Voronoi Diagram, chernysh, 11/23/2009
- Re: [cgal-discuss] Inserting vertices into Voronoi Diagram, Daniel Duque, 11/23/2009
- Re: [cgal-discuss] Inserting vertices into Voronoi Diagram, Bernd Gaertner, 11/23/2009
- Re: Re: [cgal-discuss] Inserting vertices into Voronoi Diagram, chernysh, 11/23/2009
- Re: [cgal-discuss] Inserting vertices into Voronoi Diagram, Sylvain Pion, 11/23/2009
Archive powered by MHonArc 2.6.16.