include/raytracer.h
branchpyrit
changeset 82 930a2d3ecaed
parent 78 9569e9f35374
child 84 6f7fe14782c2
--- a/include/raytracer.h	Thu Apr 24 10:49:11 2008 +0200
+++ b/include/raytracer.h	Thu Apr 24 13:55:11 2008 +0200
@@ -57,6 +57,7 @@
 	Float ao_distance, ao_angle;
 	int num_threads;
 	int max_depth;
+	bool use_packets;
 
 	Vector3 SphereDistribute(int i, int n, Float extent, Vector3 &normal);
 
@@ -66,10 +67,13 @@
 	pthread_mutex_t sample_queue_mutex, sampler_mutex;
 	pthread_cond_t sample_queue_cond, worker_ready_cond;
 
+	Colour shader_evalulate(Ray &ray, int depth, Shape *origin_shape,
+		Float nearest_distance, Shape *nearest_shape);
+	void raytracePacket(Ray *rays, Colour *results);
 	static void *raytrace_worker(void *d);
 public:
 	Raytracer(): top(NULL), camera(NULL), lights(), bg_colour(0., 0., 0.),
-		ao_samples(0), num_threads(2), max_depth(3)
+		ao_samples(0), num_threads(2), max_depth(3), use_packets(true)
 	{
 		pthread_mutex_init(&sample_queue_mutex, NULL);
 		pthread_mutex_init(&sampler_mutex, NULL);