equal
deleted
inserted
replaced
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, |
|
64 Float *nearest_distances, Shape **nearest_shapes) |
|
65 { |
|
66 for (int i = 0; i < 4; i++) |
|
67 nearest_shapes[i] = nearest_intersection(origin_shapes[i], rays[i], |
|
68 nearest_distances[i]); |
|
69 } |
|
70 |
63 ostream & Container::dump(ostream &st) |
71 ostream & Container::dump(ostream &st) |
64 { |
72 { |
65 st << "(container," << shapes.size(); |
73 st << "(container," << shapes.size(); |
66 ShapeList::iterator shape; |
74 ShapeList::iterator shape; |
67 for (shape = shapes.begin(); shape != shapes.end(); shape++) |
75 for (shape = shapes.begin(); shape != shapes.end(); shape++) |