Developer Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
iterators.cc
1 MyMesh mesh;
2 
3 // iterate over all vertices
4 for (MyMesh::VertexIter v_it=mesh.vertices_begin(); v_it!=mesh.vertices_end(); ++v_it)
5  ...; // do something with *v_it, v_it->, or *v_it
6 
7 // iterate over all halfedges
8 for (MyMesh::HalfedgeIter h_it=mesh.halfedges_begin(); h_it!=mesh.halfedges_end(); ++h_it)
9  ...; // do something with *h_it, h_it->, or *h_it
10 
11 // iterate over all edges
12 for (MyMesh::EdgeIter e_it=mesh.edges_begin(); e_it!=mesh.edges_end(); ++e_it)
13  ...; // do something with *e_it, e_it->, or *e_it
14 
15 // iterator over all faces
16 for (MyMesh::FaceIter f_it=mesh.faces_begin(); f_it!=mesh.faces_end(); ++f_it)
17  ...; // do something with *f_it, f_it->, or *f_it
18