37 int max_depth; |
37 int max_depth; |
38 |
38 |
39 Vector3 SphereDistribute(int i, int n, Float extent, Vector3 &normal); |
39 Vector3 SphereDistribute(int i, int n, Float extent, Vector3 &normal); |
40 public: |
40 public: |
41 Raytracer(): top(NULL), camera(NULL), lights(), bg_colour(0.0, 0.0, 0.0), |
41 Raytracer(): top(NULL), camera(NULL), lights(), bg_colour(0.0, 0.0, 0.0), |
42 ao_samples(0), num_threads(4), subsample(8), max_depth(4) {}; |
42 ao_samples(0), num_threads(2), subsample(8), max_depth(3) {}; |
43 void render(int w, int h, Float *buffer); |
43 void render(int w, int h, Float *buffer); |
44 Colour raytrace(Ray &ray, int depth, Shape *origin_shape); |
44 Colour raytrace(Ray &ray, int depth, Shape *origin_shape); |
45 void addshape(Shape *shape) { top->addShape(shape); }; |
45 void addshape(Shape *shape) { top->addShape(shape); }; |
46 void addlight(Light *light); |
46 void addlight(Light *light); |
47 void setCamera(Camera *cam) { camera = cam; }; |
47 void setCamera(Camera *cam) { camera = cam; }; |