Search code examples
cgal

Loop the halfedge_handle around a vertex


I have a vertex_handle, and what I want to do is to get the halfedge_handles around the vertex,here is my attempt:

HV_circulator hc = v -> vertex_begin();
  do{
    hc++;
    Polyhedron::Halfedge halfedge = *hc;
    HE_handle hh = &halfedge;

    //blabla~~
  }while(hc != v -> vertex_begin());

but it seems not works good, the hh seems not waht I want to get, what should I do to convert this circulator to a halfedge_hanle, thanks


Solution

  • A halfedge circulator is convertible to a halfedge handle. Thus you simply need to write:

    Polyhedron::Halfedge_handle hh = hc;