include/raytracer.h
branchpyrit
changeset 84 6f7fe14782c2
parent 82 930a2d3ecaed
child 90 f6a72eb99631
equal deleted inserted replaced
83:e3a2a5b26abb 84:6f7fe14782c2
    65 	int sample_queue_pos, sample_queue_size, sample_queue_count;
    65 	int sample_queue_pos, sample_queue_size, sample_queue_count;
    66 	bool end_of_samples;
    66 	bool end_of_samples;
    67 	pthread_mutex_t sample_queue_mutex, sampler_mutex;
    67 	pthread_mutex_t sample_queue_mutex, sampler_mutex;
    68 	pthread_cond_t sample_queue_cond, worker_ready_cond;
    68 	pthread_cond_t sample_queue_cond, worker_ready_cond;
    69 
    69 
    70 	Colour shader_evalulate(Ray &ray, int depth, Shape *origin_shape,
    70 	Colour shader_evalulate(const Ray &ray, int depth, Shape *origin_shape,
    71 		Float nearest_distance, Shape *nearest_shape);
    71 		Float nearest_distance, Shape *nearest_shape);
    72 	void raytracePacket(Ray *rays, Colour *results);
    72 	void raytracePacket(RayPacket &rays, Colour *results);
    73 	static void *raytrace_worker(void *d);
    73 	static void *raytrace_worker(void *d);
    74 public:
    74 public:
    75 	Raytracer(): top(NULL), camera(NULL), lights(), bg_colour(0., 0., 0.),
    75 	Raytracer(): top(NULL), camera(NULL), lights(), bg_colour(0., 0., 0.),
    76 		ao_samples(0), num_threads(2), max_depth(3), use_packets(true)
    76 		ao_samples(0), num_threads(2), max_depth(3), use_packets(true)
    77 	{
    77 	{