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

@@ -136,6 +136,14 @@ public:
}
/** perform some sanity checks */
bool isValid() const {
if (p1 == p2) {return false;}
if (p1 == p3) {return false;}
if (p2 == p3) {return false;}
return true;
}
/*
int rayIntersectsTriangle(float *p, float *d,
float *v0, float *v1, float *v2) {