3 #ifndef SCENE_H_INCLUDED
4 #define SCENE_H_INCLUDED
95 void addLight(std::shared_ptr<LightSource> light) {
135 std::vector<std::shared_ptr<LightSource> >
lights_;
Camera class header file.
Colour class header file.
LightSource class header file.
Material class header file.
NonCopyable class header file.
Object class header file.
RayIntersection class header file.
Class to store colour information.
Definition: Colour.h:25
NonCopyable class.
Definition: NonCopyable.h:27
Rays as a starting Point and Direction.
Definition: Ray.h:20
Class to store the intersection of a Ray and an Object.
Definition: RayIntersection.h:27
A Scene to be ray traced.
Definition: Scene.h:44
unsigned int maxRayDepth
Maximum number of reflected Rays to trace.
Definition: Scene.h:115
std::string filename
File to save the image to.
Definition: Scene.h:129
unsigned int renderWidth
Width in pixels of the image to render.
Definition: Scene.h:127
void setCamera(std::shared_ptr< Camera > camera)
Set the Scene's Camera.
Definition: Scene.h:73
~Scene()
Scene destructor.
Definition: Scene.cpp:13
void addLight(std::shared_ptr< LightSource > light)
Add a new LightSource.
Definition: Scene.h:95
std::vector< std::shared_ptr< LightSource > > lights_
Collection of LightSources in the Scene.
Definition: Scene.h:135
Colour computeColour(const Ray &ray, unsigned int rayDepth=0) const
Compute the Colour seen by a Ray in the Scene.
Definition: Scene.cpp:52
bool hasCamera() const
Check if the Scene has a Camera.
Definition: Scene.cpp:105
void render() const
Render an image of the Scene.
Definition: Scene.cpp:17
Colour backgroundColour
Colour for any Ray that does not hit an Object.
Definition: Scene.h:111
std::shared_ptr< Camera > camera_
Camera to render the image with.
Definition: Scene.h:133
Colour ambientLight
Ambient light level and Colour in the Scene.
Definition: Scene.h:113
RayIntersection intersect(const Ray &ray) const
Intersect a Ray with the Objects in a Scene.
Definition: Scene.cpp:37
void addObject(std::shared_ptr< Object > object)
Add a new Object.
Definition: Scene.h:84
Scene()
Default Scene constructor. This creates an empty Scene, with a black background and no ambient light....
Definition: Scene.cpp:9
std::vector< std::shared_ptr< Object > > objects_
Collection of Objects in the Scene.
Definition: Scene.h:134
unsigned int renderHeight
Height in pixels of the image to render.
Definition: Scene.h:128