Subject: CGAL users discussion list
List archive
- From: Roberto Lam <>
- To:
- Subject: Re: [cgal-discuss] reference to vertex from vertex iterator
- Date: Sat, 26 Sep 2009 10:13:22 +0100
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=F05Qt3yfy3TXRzu+P3NjTLjYKG5iRPiFiZR/sNp8tIQ0vzbyjjt26QooDhTh6XiZ4V tSKb70Hw04QkJOQnjvgECVOg4KETE6WZMqZtm4iyUtgVppqsRP0a2yECF53yGW+8jggA Yq62/LYCGxBIzWrls42pYofDgY3maLErNHGrw=
Hi Laurent, my mind was blocked! the answer was very obvius.
I just started with cgal a cople of weeks before and the problem was,
is, that I
didnt do in the right way. I shoud read the manual study all classes details..
Best regards
rlam
2009/9/25 Laurent Rineau (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/
> --
> You are currently subscribed to cgal-discuss.
> To unsubscribe or access the archives, go to
> https://lists-sop.inria.fr/wws/info/cgal-discuss
>
- [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.