Started working on boundingboxes.

This commit is contained in:
Godzil
2020-02-24 18:03:25 +00:00
parent d1965caf8d
commit 3011544e8f
13 changed files with 114 additions and 3 deletions

View File

@@ -122,3 +122,13 @@ Tuple Cone::localNormalAt(Tuple point)
}
return Vector(point.x, y, point.z);
}
BoundingBox Cone::getBounds()
{
BoundingBox ret;
ret.min = this->objectToWorld(Point(-1, this->minCap, -1));
ret.max = this->objectToWorld(Point(1, this->maxCap, 1));
return ret;
}