Legacy code clean up for t values

Intersection methods push values into the t vector in ascending order, so no need to check them in TraceRay.
This commit is contained in:
Eryn Wells 2014-08-03 12:46:14 -07:00
parent 2ade996783
commit 4cbe9df324

View file

@ -228,15 +228,8 @@ Scene::trace_ray(const Ray &ray,
for (Object::Ptr s : shapes) { for (Object::Ptr s : shapes) {
ts.clear(); ts.clear();
if (s->DoesIntersect(ray, ts, mStats)) { if (s->DoesIntersect(ray, ts, mStats)) {
for (Double t : ts) { intersected_shape = s;
if (t < 1e-2) { nearest_t = ts[0];
break;
}
if (t < nearest_t) {
intersected_shape = s;
nearest_t = t;
}
}
} }
} }