--- a/include/raytracer.h Wed Mar 19 17:18:59 2008 +0100
+++ b/include/raytracer.h Wed Mar 26 00:52:27 2008 +0100
@@ -36,6 +36,7 @@
using namespace std;
class Raytracer;
+
struct RenderrowData {
Raytracer *rt;
int w;
@@ -43,9 +44,13 @@
Float *iter;
};
+/**
+ * main ray tracer class
+ */
class Raytracer
{
Container *top;
+ Sampler *sampler;
Camera *camera;
vector<Light*> lights;
Colour bg_colour;
@@ -60,10 +65,11 @@
public:
Raytracer(): top(NULL), camera(NULL), lights(), bg_colour(0.0, 0.0, 0.0),
ao_samples(0), num_threads(2), subsample(8), oversample(0), max_depth(3) {};
- void render(int w, int h, Float *buffer);
+ void render();
Colour raytrace(Ray &ray, int depth, Shape *origin_shape);
void addshape(Shape *shape) { top->addShape(shape); };
void addlight(Light *light);
+ void setSampler(Sampler *sampl) { sampler = sampl; };
void setCamera(Camera *cam) { camera = cam; };
void setTop(Container *atop) { top = atop; };
Container *getTop() { return top; };