added some sanity checks

This commit is contained in:
k-a-z-u
2018-07-10 17:27:18 +02:00
parent 19d9ce3961
commit dd9116086d
3 changed files with 23 additions and 0 deletions

View File

@@ -89,6 +89,14 @@ namespace Ray3D {
return res;
}
/** perform sanity checks */
bool isValid() const {
for (const Triangle3& t : triangles) {
if (!t.isValid()) {return false;}
}
return true;
}
};
}