Boundingboxes should be ready.

Next step (later) would be to properly use them other than group to lower the number of intersection calculation per ray.
This commit is contained in:
Godzil
2020-02-25 18:03:12 +00:00
parent 831a096281
commit 2ea4abdce7
21 changed files with 406 additions and 34 deletions

View File

@@ -129,10 +129,13 @@ BoundingBox Cone::getBounds()
double a = fabs(this->minCap);
double b = fabs(this->maxCap);
double limit = (a < b)?a:b;
double limit = (a > b)?a:b;
ret.min = this->objectToWorld(Point(-limit, this->minCap, -limit));
ret.max = this->objectToWorld(Point(limit, this->maxCap, limit));
ret.min.fixPoint();
ret.max.fixPoint();
return ret;
}