diff --git a/src/main.cpp b/src/main.cpp index 0b2845d..feb3cab 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -17,6 +17,22 @@ bool check_faces_are_triangles(MyMesh &mesh) { } +bool check_faces_arent_lonely(MyMesh &mesh) { + for (auto f_it = mesh.faces_begin(); f_it != mesh.faces_end(); ++f_it) { + auto ff_it = mesh.ff_iter(*f_it); + if (!ff_it.is_valid()) { + return false; + } + } + return true; +} + return false; + } + } + return true; +} + + int main(int argc, char *argv[]) { using namespace std; @@ -34,5 +50,14 @@ int main(int argc, char *argv[]) { cout << "non"; } cout << endl; + + cout << "Les faces ont des voisines : "; + if (check_faces_arent_lonely(mesh)) { + cout << "oui"; + } + else { + cout << "non"; + } + cout << endl; return 0; }