Subject: CGAL users discussion list
List archive
- From: "Laurent Rineau (GeometryFactory)" <>
- To:
- Subject: Re: [cgal-discuss] reference to vertex from vertex iterator
- Date: Fri, 25 Sep 2009 19:58:48 +0200
- Organization: GeometryFactory
Le vendredi 25 septembre 2009 19:40:12,
a écrit :
> Hi,
> I would like to have a reference to a vertex described by a vertex iterator
> some thing like this:
>
> for ( Vertex_iterator v_ = tmp.vertices_begin();
> v_ != tmp.vertices_end(); ++v_){
> Vertex &vert=v_ ;
> // more code
>
> }
> with
> typedef CGAL::Simple_cartesian<double> Kernel;
> typedef CGAL::Polyhedron_3<Kernel> Polyhedron;
> typedef Polyhedron::Vertex Vertex;
If v_ is a Vertex_iterator, then *v_ is a Vertex. So the answer to your
question is:
Vertex &vert = *v_;
Why do you want to use a reference to a Vertex? I have been using CGAL for
ten
years, and I do not remember that I had once needed a reference to a Vertex.
Usually, one use handles instead (or iterators, directly).
--
Laurent Rineau, PhD
Release Manager of the CGAL Project
http://www.cgal.org/
R&D Engineer at GeometryFactory
http://www.geometryfactory.com/
- [cgal-discuss] reference to vertex from vertex iterator, robertolam, 09/25/2009
- Re: [cgal-discuss] reference to vertex from vertex iterator, Laurent Rineau (GeometryFactory), 09/25/2009
- Re: [cgal-discuss] reference to vertex from vertex iterator, Roberto Lam, 09/26/2009
- Re: [cgal-discuss] reference to vertex from vertex iterator, Laurent Rineau (GeometryFactory), 09/25/2009
Archive powered by MHonArc 2.6.16.