src/container.cc
branchpyrit
changeset 92 9af5c039b678
parent 91 9d66d323c354
child 95 ca7d4c665531
equal deleted inserted replaced
91:9d66d323c354 92:9af5c039b678
    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 #ifndef NO_SSE
    63 #ifndef NO_SIMD
    64 void Container::packet_intersection(const Shape **origin_shapes, const RayPacket &rays,
    64 void Container::packet_intersection(const Shape* const* origin_shapes, const RayPacket &rays,
    65 	Float *nearest_distances, Shape **nearest_shapes)
    65 	Float *nearest_distances, Shape **nearest_shapes)
    66 {
    66 {
    67 	for (int i = 0; i < 4; i++)
    67 	for (int i = 0; i < 4; i++)
    68 		nearest_shapes[i] = nearest_intersection(origin_shapes[i], rays[i],
    68 		nearest_shapes[i] = nearest_intersection(origin_shapes[i], rays[i],
    69 			nearest_distances[i]);
    69 			nearest_distances[i]);