src/container.cc
branchpyrit
changeset 84 6f7fe14782c2
parent 82 930a2d3ecaed
child 91 9d66d323c354
equal deleted inserted replaced
83:e3a2a5b26abb 84:6f7fe14782c2
    58 		if (*shape != origin_shape && (*shape)->intersect(ray, nearest_distance))
    58 		if (*shape != origin_shape && (*shape)->intersect(ray, nearest_distance))
    59 			nearest_shape = *shape;
    59 			nearest_shape = *shape;
    60 	return nearest_shape;
    60 	return nearest_shape;
    61 }
    61 }
    62 
    62 
    63 void Container::packet_intersection(const Shape **origin_shapes, const Ray *rays,
    63 void Container::packet_intersection(const Shape **origin_shapes, const RayPacket &rays,
    64 	Float *nearest_distances, Shape **nearest_shapes)
    64 	Float *nearest_distances, Shape **nearest_shapes)
    65 {
    65 {
    66 	for (int i = 0; i < 4; i++)
    66 	for (int i = 0; i < 4; i++)
    67 		nearest_shapes[i] = nearest_intersection(origin_shapes[i], rays[i],
    67 		nearest_shapes[i] = nearest_intersection(origin_shapes[i], rays[i],
    68 			nearest_distances[i]);
    68 			nearest_distances[i]);