Skip to Content.
Sympa Menu

cgal-discuss - Use of Vertex_handle

Subject: CGAL users discussion list

List archive

Use of Vertex_handle


Chronological Thread 
  • From:
  • To:
  • Subject: Use of Vertex_handle
  • Date: Mon, 4 Jun 2007 08:44:25 +0200

Hello,

I have a problem trying to use a Vertex_handle: I want to navigate the
vertices of a polyhedron so I use a Halfedge_handle and I keep a std::map of
every vertex I visit, e.g.

std::map<Polyhedron::Vertex_handle, double> mymap;

Something like

Halfedge_handle = mypolyhedron.halfedges_begin();
mymap.insert(make_pair(h->vertex(), 0.0);
h = h->next();
mymap.insert(make_pair(h->vertex(), 1.0);
etc.

The problem seems to be, the temporary Vertex_handle in the above appears to
be the same object; the map won't insert the second vertex because it thinks
it is the same as the first.

Please can someone explain how to use a Vertex_handle in this kind of
situation and secondly, can you point me to where I can find the definition
of Vertex_handle and Halfedge_handle.

Many thanks

Lyndon Hill




  • Use of Vertex_handle, emptystate, 06/04/2007

Archive powered by MHonArc 2.6.16.

Top of Page