include/raytracer.h
branchpyrit
changeset 94 4c8abb8977dc
parent 93 96d65f841791
child 95 ca7d4c665531
equal deleted inserted replaced
93:96d65f841791 94:4c8abb8977dc
     1 /*
     1 /**
     2  * raytracer.h: Raytracer class
     2  * @file  raytracer.h
       
     3  * @brief The base class of the ray tracer
     3  *
     4  *
     4  * This file is part of Pyrit Ray Tracer.
     5  * This file is part of Pyrit Ray Tracer.
     5  *
     6  *
     6  * Copyright 2006, 2007, 2008  Radek Brich
     7  * Copyright 2006, 2007, 2008  Radek Brich
     7  *
     8  *
    69 	void raytracePacket(RayPacket &rays, Colour *results);
    70 	void raytracePacket(RayPacket &rays, Colour *results);
    70 #endif
    71 #endif
    71 	static void *raytrace_worker(void *d);
    72 	static void *raytrace_worker(void *d);
    72 public:
    73 public:
    73 	Raytracer(): top(NULL), camera(NULL), lights(), bg_colour(0., 0., 0.),
    74 	Raytracer(): top(NULL), camera(NULL), lights(), bg_colour(0., 0., 0.),
    74 		ao_samples(0), num_threads(2), max_depth(3), use_packets(true)
    75 		ao_samples(0), num_threads(4), max_depth(3), use_packets(true)
    75 	{
    76 	{
    76 		pthread_mutex_init(&sample_queue_mutex, NULL);
    77 		pthread_mutex_init(&sample_queue_mutex, NULL);
    77 		pthread_mutex_init(&sampler_mutex, NULL);
    78 		pthread_mutex_init(&sampler_mutex, NULL);
    78 		pthread_cond_init (&sample_queue_cond, NULL);
    79 		pthread_cond_init (&sample_queue_cond, NULL);
    79 		pthread_cond_init (&worker_ready_cond, NULL);
    80 		pthread_cond_init (&worker_ready_cond, NULL);