33 float ao_distance, ao_angle; |
43 float ao_distance, ao_angle; |
34 |
44 |
35 Vector3 SphereDistribute(int i, int n, float extent, Vector3 &normal); |
45 Vector3 SphereDistribute(int i, int n, float extent, Vector3 &normal); |
36 inline Shape *nearest_intersection(const Shape *origin_shape, const Ray &ray, |
46 inline Shape *nearest_intersection(const Shape *origin_shape, const Ray &ray, |
37 float &nearest_distance); |
47 float &nearest_distance); |
38 Colour raytrace(Ray &ray, int depth, Shape *origin_shape); |
|
39 public: |
48 public: |
40 Raytracer(): shapes(), lights(), bg_colour(0.0, 0.0, 0.0), ao_samples(0) {}; |
49 Raytracer(): shapes(), lights(), bg_colour(0.0, 0.0, 0.0), ao_samples(0) {}; |
41 ~Raytracer() {}; |
50 ~Raytracer() {}; |
42 float *render(int w, int h); |
51 float *render(int w, int h); |
|
52 Colour raytrace(Ray &ray, int depth, Shape *origin_shape); |
43 void addshape(Shape *shape); |
53 void addshape(Shape *shape); |
44 void addlight(Light *light); |
54 void addlight(Light *light); |
45 |
55 |
46 void ambientocclusion(int samples, float distance, float angle); |
56 void ambientocclusion(int samples, float distance, float angle); |
47 }; |
57 }; |