src/raytracer.h
branchpyrit
changeset 16 20bceb605f48
parent 11 4d192e13ee84
child 19 4e0955fca797
--- a/src/raytracer.h	Sun Nov 25 17:58:29 2007 +0100
+++ b/src/raytracer.h	Sun Nov 25 21:47:10 2007 +0100
@@ -32,17 +32,20 @@
 	Colour bg_colour;
 	int ao_samples;
 	float ao_distance, ao_angle;
+	int num_threads;
 
 	Vector3 SphereDistribute(int i, int n, float extent, Vector3 &normal);
 public:
-	Raytracer(): lights(), bg_colour(0.0, 0.0, 0.0), ao_samples(0) { top = new KdTree(); };
-	~Raytracer() {};
+	Raytracer(): 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 ambientocclusion(int samples, float distance, float angle);
+	void setThreads(int num) { num_threads = num; };
 };
 
 #endif