#include #include #include #include // loader #include // topology computation #include // half edge iterators #include using namespace vcg; class MyFace; class MyEdge; class MyVertex:public Vertex{}; class MyFace :public FaceAF{}; class MyMesh: public tri::TriMesh< std::vector, std::vector >{}; int main(int argc,char ** argv){ MyMesh m; //load the mesh vcg::tri::io::ImporterPLY::Open(m,argv[1]); //update the face-face topology vcg::tri::UpdateTopology::FaceFace(m); // declare an iterator on the mesh vcg::face::Pos he; // set as the half edge: (first face of the mesh, edge 0,vertex 0) he.Set(&*m.face.begin(),0,(*m.face.begin()).V(0)); // same vertex and edge..adjacent face he.FlipF(); //again (it went back..it it manifold) he.FlipF(); }