diff -r 3239f749e394 -r f9fad94cd0cc src/raytracer.h --- a/src/raytracer.h Thu Nov 22 21:46:09 2007 +0100 +++ b/src/raytracer.h Fri Nov 23 01:24:33 2007 +0100 @@ -27,7 +27,7 @@ class Raytracer { - ShapeList shapes; + Container *top; vector lights; Colour bg_colour; int ao_samples; @@ -37,11 +37,11 @@ inline Shape *nearest_intersection(const Shape *origin_shape, const Ray &ray, float &nearest_distance); public: - Raytracer(): shapes(), lights(), bg_colour(0.0, 0.0, 0.0), ao_samples(0) {}; + Raytracer(): lights(), bg_colour(0.0, 0.0, 0.0), ao_samples(0) { top = new KdTree(); }; ~Raytracer() {}; float *render(int w, int h); Colour raytrace(Ray &ray, int depth, Shape *origin_shape); - void addshape(Shape *shape); + void addshape(Shape *shape) { top->addShape(shape); }; void addlight(Light *light); void ambientocclusion(int samples, float distance, float angle);