diff -r 25b7c445cf61 -r 4e0955fca797 src/raytracer.h --- a/src/raytracer.h Mon Nov 26 17:31:37 2007 +0100 +++ b/src/raytracer.h Mon Nov 26 23:12:40 2007 +0100 @@ -19,15 +19,17 @@ struct RenderrowData { Raytracer *rt; int w; - float vx, vy, dx, dy; - Vector3 eye; + Vector3 eye, dfix, dx; +#if OVERSAMPLING + Vector3 dy; +#endif float *iter; }; -//static void *renderrow(void *data); class Raytracer { Container *top; + Camera *camera; vector lights; Colour bg_colour; int ao_samples; @@ -36,13 +38,14 @@ Vector3 SphereDistribute(int i, int n, float extent, Vector3 &normal); public: - Raytracer(): lights(), bg_colour(0.0, 0.0, 0.0), ao_samples(0), num_threads(4) - { top = new KdTree(); }; + Raytracer(): camera(NULL), lights(), bg_colour(0.0, 0.0, 0.0), + ao_samples(0), num_threads(4) { top = new KdTree(); }; ~Raytracer() { delete top; }; float *render(int w, int h); Colour raytrace(Ray &ray, int depth, Shape *origin_shape); void addshape(Shape *shape) { top->addShape(shape); }; void addlight(Light *light); + void setCamera(Camera *cam) { camera = cam; }; void ambientocclusion(int samples, float distance, float angle); void setThreads(int num) { num_threads = num; };