src/raytracer.h
branchpyrit
changeset 11 4d192e13ee84
parent 10 f9fad94cd0cc
child 16 20bceb605f48
equal deleted inserted replaced
10:f9fad94cd0cc 11:4d192e13ee84
    32 	Colour bg_colour;
    32 	Colour bg_colour;
    33 	int ao_samples;
    33 	int ao_samples;
    34 	float ao_distance, ao_angle;
    34 	float ao_distance, ao_angle;
    35 
    35 
    36 	Vector3 SphereDistribute(int i, int n, float extent, Vector3 &normal);
    36 	Vector3 SphereDistribute(int i, int n, float extent, Vector3 &normal);
    37 	inline Shape *nearest_intersection(const Shape *origin_shape, const Ray &ray,
       
    38 		float &nearest_distance);
       
    39 public:
    37 public:
    40 	Raytracer(): lights(), bg_colour(0.0, 0.0, 0.0), ao_samples(0) { top = new KdTree(); };
    38 	Raytracer(): lights(), bg_colour(0.0, 0.0, 0.0), ao_samples(0) { top = new KdTree(); };
    41 	~Raytracer() {};
    39 	~Raytracer() {};
    42 	float *render(int w, int h);
    40 	float *render(int w, int h);
    43 	Colour raytrace(Ray &ray, int depth, Shape *origin_shape);
    41 	Colour raytrace(Ray &ray, int depth, Shape *origin_shape);