iterate the vertices around a vertex

http://doc.cgal.org/latest/BGL/group__PkgBGLIterators.html#ga7746cb7b28520877375dfff6ec7bd32c




For Surface_mesh, see http://doc.cgal.org/latest/Surface_mesh/index.html#Chapter_3D_Surface_mesh


  {  
    std::cout << "vertices around vertex " << v << std::endl;  
    CGAL::Vertex_around_target_circulator<Mesh> vbegin(m.halfedge(v),m), done(vbegin);  
  
    do {  
      std::cout << *vbegin++ << std::endl;  
    } while(vbegin != done);  
  }


For polyhedron, 


      in_edge_iterator e, e_end;
      for (CGAL::cpp11::tie(e,e_end) = in_edges(vd, *m_halfedge_graph); e != e_end; e++)
      {
        vertex_descriptor vt = source(*e, *m_halfedge_graph);
        //...
      }


你可能感兴趣的:(iterate the vertices around a vertex)