#include <Scene.h>
Definition at line 18 of file Scene.h.
Public Member Functions | |
Scene () | |
The constructor. | |
~Scene () | |
Destructor. | |
void | AddObject (Object *obj) |
Adds a new object to the scene. | |
void | RemoveObject (Object *obj) |
Removes an object from the scene. | |
void | AddLight (Light *light) |
Adds a new light to the scene. | |
void | RemoveLight (Light *light) |
Removes a light to the scene. | |
void | setBgColor (const ColorRGBA &c) |
Setter of the background color. | |
const ColorRGBA & | getBgColor () const |
Getter of the background color. | |
ColorRGBA | RayTrace (Ray &ray) |
Raytrace the scene. | |
bool | Intersect (Ray &ray) |
Intersects the ray within each object in the scene. | |
Data Fields | |
Timer | timer |
Global scene timer. | |
std::vector< Object * > | mObjects |
List of all objects in the scene. | |
std::vector< Light * > | mLights |
List of all lights in the scene. | |
ColorRGBA | bgColor |
The backgroundColor. | |
bool | castShadows |
Does the scene cast shadows? |
Scene::~Scene | ( | ) | [inline] |
Scene::AddObject | ( | Object * | obj | ) | [inline] |
Adds a new object to the scene.
obj | The object to be added. |
Definition at line 79 of file Scene.h.
References mObjects.
Referenced by AddObject(), and AddSphere().
Scene::RemoveObject | ( | Object * | obj | ) | [inline] |
Scene::AddLight | ( | Light * | light | ) | [inline] |
Adds a new light to the scene.
light | The light to be added. |
Definition at line 106 of file Scene.h.
References mLights, and Light::mScene.
Referenced by main().
Scene::RemoveLight | ( | Light * | light | ) | [inline] |
Scene::setBgColor | ( | const ColorRGBA & | c | ) | [inline] |
ColorRGBA & Scene::getBgColor | ( | ) | const [inline] |
Raytrace the scene.
ray | Ray to trace through the scene |
Definition at line 147 of file Scene.h.
References bgColor, Ray::bounces, Primitive::getShader(), Ray::hit, Intersect(), and Shader::Shade().
Referenced by RenderDepthOfFieldFrame(), RenderFrame(), RenderLinearFramePath(), RenderStereoFrame(), RenderSupersampledFrame(), UniAxialCrystalShader::Shade(), TransparentShader::Shade(), SteelShader::Shade(), SilverShader::Shade(), MirrorShader::Shade(), GoldShader::Shade(), FlatTransparentShader::Shade(), and CopperShader::Shade().
bool Scene::Intersect | ( | Ray & | ray | ) | [inline] |
Intersects the ray within each object in the scene.
ray | The ray to intersect with. |
Definition at line 173 of file Scene.h.
References mObjects.
Referenced by RayTrace(), PhongShader::Shade(), BumpMappedWoodPhongShader::Shade(), BumpMappedPhongShader::Shade(), and BumpMappedMarblePhongShader::Shade().
Global scene timer.
Timer timer
Definition at line 25 of file Scene.h.
Referenced by main(), RenderDepthOfFieldFrame(), RenderFrame(), RenderLinearFramePath(), RenderStereoFrame(), RenderSupersampledFrame(), PlasmaShader::Shade(), MixShader::Shade(), and CloudShader::Shade().
std::vector<Object*> Scene::mObjects |
List of all objects in the scene.
std::vector<Object*> mObjects
Definition at line 31 of file Scene.h.
Referenced by AddObject(), Intersect(), RemoveObject(), and ~Scene().
std::vector<Light*> Scene::mLights |
List of all lights in the scene.
std::vector<Light*> mLights
Definition at line 37 of file Scene.h.
Referenced by AddLight(), RemoveLight(), PhongShader::Shade(), BumpMappedWoodPhongShader::Shade(), BumpMappedPhongShader::Shade(), BumpMappedMarblePhongShader::Shade(), and ~Scene().
The backgroundColor.
ColorRGBA bgColor
Definition at line 43 of file Scene.h.
Referenced by getBgColor(), RayTrace(), and setBgColor().
bool Scene::castShadows |
Does the scene cast shadows?
bool castShadows
Definition at line 49 of file Scene.h.
Referenced by main(), PhongShader::Shade(), BumpMappedWoodPhongShader::Shade(), BumpMappedPhongShader::Shade(), and BumpMappedMarblePhongShader::Shade().