And CSG! \o/

Still working on a nice scene for it.
This commit is contained in:
Godzil
2020-03-06 19:00:31 +00:00
parent e57b5715e8
commit b5ee92c544
13 changed files with 591 additions and 9 deletions

View File

@@ -130,6 +130,22 @@ Intersect OBJFile::intersect(Ray r)
return ret;
}
bool OBJFile::includes(Shape *b)
{
int i;
if (this->faceGroupCount > 0)
{
for (i = 0 ; i < this->faceGroupCount ; i++)
{
if (this->faceGroupList[i] == b)
{
return true;
}
}
}
return false;
}
Intersect OBJFile::localIntersect(Ray r)
{
return Intersect();