Reorder some code -- just some formatting

This commit is contained in:
Eryn Wells 2013-09-11 10:35:03 -07:00
parent 247e205827
commit 8a1934f957

View file

@ -9,6 +9,7 @@
#include <cstdio>
#include "basics.h"
#include "light.h"
#include "object.h"
#include "scene.h"
#include "writer.h"
@ -148,11 +149,12 @@ Scene::add_light(Light *light)
Color
Scene::trace_ray(const Ray &ray, const int depth)
{
// Find intersections of this ray with objects in the scene.
Shape *intersected_shape = NULL;
float *t = NULL;
float nearest_t = INFINITY;
int nints;
// Find intersections of this ray with objects in the scene.
for (Shape *s : shapes) {
nints = s->does_intersect(ray, &t);
if (nints > 0) {