Add get_ambient() to Scene
This commit is contained in:
parent
fcc6f1a718
commit
3b7f672ab3
2 changed files with 10 additions and 1 deletions
10
src/scene.cc
10
src/scene.cc
|
@ -19,7 +19,7 @@
|
|||
Scene::Scene()
|
||||
: width(640), height(480),
|
||||
max_depth(5),
|
||||
ambient(NULL),
|
||||
ambient(new AmbientLight()),
|
||||
shapes(),
|
||||
lights(),
|
||||
nrays(0),
|
||||
|
@ -74,6 +74,14 @@ Scene::get_height()
|
|||
}
|
||||
|
||||
|
||||
AmbientLight &
|
||||
Scene::get_ambient()
|
||||
const
|
||||
{
|
||||
return *ambient;
|
||||
}
|
||||
|
||||
|
||||
const Color *
|
||||
Scene::get_pixels()
|
||||
const
|
||||
|
|
|
@ -31,6 +31,7 @@ public:
|
|||
bool is_rendered() const;
|
||||
int get_width() const;
|
||||
int get_height() const;
|
||||
AmbientLight &get_ambient() const;
|
||||
const Color *get_pixels() const;
|
||||
|
||||
void read(const std::string &filename);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue