Add max_depth parameter

This commit is contained in:
Eryn Wells 2013-09-11 10:33:16 -07:00
parent 2c23fb819e
commit 3a5c6cddf9
2 changed files with 8 additions and 0 deletions

View file

@ -16,6 +16,7 @@
Scene::Scene()
: width(640), height(480),
max_depth(5),
pixels(NULL)
{ }

View file

@ -42,10 +42,17 @@ public:
private:
Color trace_ray(const Ray &ray, const int depth);
// Pixel dimensions of the image.
int width, height;
// Ray tracing parameters.
int max_depth;
// Scene objects.
std::list<Shape *> shapes;
std::list<Light *> lights;
// Rendering output.
bool _is_rendered;
Color *pixels;
};