src/raytracer.cc
branchpyrit
changeset 86 ce6abe0aeeae
parent 84 6f7fe14782c2
child 90 f6a72eb99631
equal deleted inserted replaced
85:907a634e5c02 86:ce6abe0aeeae
   246 {
   246 {
   247 	Float nearest_distances[4] = {Inf,Inf,Inf,Inf};
   247 	Float nearest_distances[4] = {Inf,Inf,Inf,Inf};
   248 	Shape *nearest_shapes[4];
   248 	Shape *nearest_shapes[4];
   249 	static const Shape *origin_shapes[4] = {NULL, NULL, NULL, NULL};
   249 	static const Shape *origin_shapes[4] = {NULL, NULL, NULL, NULL};
   250 	top->packet_intersection(origin_shapes, rays, nearest_distances, nearest_shapes);
   250 	top->packet_intersection(origin_shapes, rays, nearest_distances, nearest_shapes);
   251 	Ray ray;
       
   252 
   251 
   253 	for (int i = 0; i < 4; i++)
   252 	for (int i = 0; i < 4; i++)
   254 		if (nearest_shapes[i] == NULL)
   253 		if (nearest_shapes[i] == NULL)
   255 			results[i] = bg_colour;
   254 			results[i] = bg_colour;
   256 		else
   255 		else