Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Supporting the new type of for loop

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Supporting the new type of for loop


Chronological Thread 
  • From: "Laurent Rineau (CGAL/GeometryFactory)" <>
  • To:
  • Subject: Re: [cgal-discuss] Supporting the new type of for loop
  • Date: Tue, 23 Apr 2013 16:16:59 +0200
  • Organization: GeometryFactory

Le mardi 23 avril 2013 22:07:46 杨成林 a écrit :
> I want to write like this *for(auto f : dt.finite_facets() )*. Can this be
> added to CGAL?

For Facet that would be easy to add.

But for vertices, in the following loop:

for(auto v, dt.finite_vertices())

do you expect 'v' to be of type 'Vertex_handle' or of type 'Vertex'?
Currently, the iterators returned by dt.finite_vertices_begin() and
dt.finite_vertices_end() have 'Vertex' as value type, but the iterators are
implicitly convertible to 'Vertex_handle'. As most of the API of the
triangulations use handles to manipulate vertices and cells, a variable of
type Vertex or Cell is not that useful.

--
Laurent Rineau, PhD
R&D Engineer at GeometryFactory http://www.geometryfactory.com/
Release Manager of the CGAL Project http://www.cgal.org/




Archive powered by MHonArc 2.6.18.

Top of Page