--- a/include/raytracer.h Sat Apr 19 18:00:27 2008 +0200
+++ b/include/raytracer.h Sun Apr 20 16:48:24 2008 +0200
@@ -70,7 +70,7 @@
static void *raytrace_worker(void *d);
public:
- Raytracer(): top(NULL), camera(NULL), lights(), bg_colour(0.0, 0.0, 0.0),
+ Raytracer(): top(NULL), camera(NULL), lights(), bg_colour(0., 0., 0.),
ao_samples(0), num_threads(2), max_depth(3)
{
pthread_mutex_init(&sample_queue_mutex, NULL);
@@ -88,13 +88,14 @@
void render();
Colour raytrace(Ray &ray, int depth, Shape *origin_shape);
- void addshape(Shape *shape) { top->addShape(shape); };
- void addlight(Light *light);
+ void addShape(Shape *shape) { top->addShape(shape); };
+ void addLight(Light *light) { lights.push_back(light); };
void setSampler(Sampler *sampl) { sampler = sampl; };
void setCamera(Camera *cam) { camera = cam; };
void setTop(Container *atop) { top = atop; };
Container *getTop() { return top; };
+ void setBgColour(const Colour &bg) { bg_colour = bg; };
void setMaxDepth(int newdepth) { max_depth = newdepth; };
void ambientocclusion(int samples, Float distance, Float angle);