implements checking for lonely faces

This commit is contained in:
ccolin 2020-09-23 15:32:11 +02:00
parent 6f60dc6173
commit c23aadadf0
1 changed files with 25 additions and 0 deletions

View File

@ -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;
}