Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

toxic::Scene Class Reference

#include <scene.h>

List of all members.

Public Member Functions

 Scene ()
 ~Scene ()
 The scene deletes the root object when it is destructed.

void SetBackgroundColor (const Color3 &color)
 Background color. Default is black.

const Color3GetBackgroundColor () const
void SetRootObject (const IObject *object)
 Sets an object as the root object. A scene *must* contains a root object.

const IObjectGetRootObject () const
void SetAmbientIllumination (const Color3 &ambient)
const Color3GetAmbientIllumination () const
void InsertLight (const ILight *light)
 Light sources.

int GetLightCount () const
const ILightGetLight (int i) const
bool Trace (const Context &context, const Ray &ray, Hit *hit=0) const
bool ArePointsMutuallyVisible (const Context &context, const sheep::Point3 &origin, const sheep::Vector3 &origin_normal, const sheep::Point3 &goal, Ray::Type ray_type=Ray::VISIBILITY_RAY) const

Private Attributes

Color3 m_background_color
const IObjectm_root_object
Color3 m_ambient
std::vector< const ILight * > m_lights


Detailed Description

The scene is view-independant. It must contains at least one object (the root object).

Definition at line 45 of file scene.h.


Constructor & Destructor Documentation

Scene::Scene  ) 
 

Definition at line 27 of file scene.cpp.

Scene::~Scene  ) 
 

The scene deletes the root object when it is destructed.

Definition at line 34 of file scene.cpp.

References m_root_object.


Member Function Documentation

bool Scene::ArePointsMutuallyVisible const Context context,
const sheep::Point3 origin,
const sheep::Vector3 origin_normal,
const sheep::Point3 goal,
Ray::Type  ray_type = Ray::VISIBILITY_RAY
const [inline]
 

Parameters:
origin  World space.
origin_normal  World space.
goal  World space.

Definition at line 151 of file scene.h.

Referenced by toxic::PointLight::ComputeIrradiance(), and toxic::IAreaLight::ComputeIrradiance().

const Color3 & Scene::GetAmbientIllumination  )  const [inline]
 

Definition at line 123 of file scene.h.

Referenced by toxic::Renderer::compute_direct_illumination().

const Color3 & Scene::GetBackgroundColor  )  const [inline]
 

Definition at line 108 of file scene.h.

Referenced by toxic::Renderer::trace().

const ILight * Scene::GetLight int  i  )  const [inline]
 

Definition at line 133 of file scene.h.

Referenced by toxic::IPhotonTracer::BuildPhotonMap(), and toxic::Renderer::compute_direct_illumination().

int Scene::GetLightCount  )  const [inline]
 

Definition at line 128 of file scene.h.

Referenced by toxic::IPhotonTracer::BuildPhotonMap(), toxic::Renderer::compute_direct_illumination(), and main().

const IObject * Scene::GetRootObject  )  const [inline]
 

Definition at line 113 of file scene.h.

Referenced by toxic::Renderer::Annotate(), and main().

void Scene::InsertLight const ILight light  ) 
 

Light sources.

Definition at line 47 of file scene.cpp.

References m_lights.

void Scene::SetAmbientIllumination const Color3 ambient  )  [inline]
 

Ambient illumination. Default is none.

Todo:
Move ambient illumination to a class derived from ILight.

Definition at line 118 of file scene.h.

void Scene::SetBackgroundColor const Color3 color  ) 
 

Background color. Default is black.

Definition at line 38 of file scene.cpp.

References m_background_color.

void Scene::SetRootObject const IObject object  ) 
 

Sets an object as the root object. A scene *must* contains a root object.

Definition at line 42 of file scene.cpp.

References m_root_object.

bool Scene::Trace const Context context,
const Ray ray,
Hit hit = 0
const [inline]
 

Definition at line 139 of file scene.h.

Referenced by toxic::Sphere::ComputeIrradiance(), toxic::Renderer::final_gathering(), toxic::ThinLensCamera::Finalize(), toxic::Camera::Finalize(), toxic::Renderer::trace(), toxic::GlobalPhotonTracer::trace_photon(), and toxic::CausticsPhotonTracer::trace_photon().


Member Data Documentation

Color3 toxic::Scene::m_ambient [private]
 

Definition at line 81 of file scene.h.

Color3 toxic::Scene::m_background_color [private]
 

Definition at line 79 of file scene.h.

Referenced by SetBackgroundColor().

std::vector<const ILight *> toxic::Scene::m_lights [private]
 

Definition at line 82 of file scene.h.

Referenced by InsertLight().

const IObject* toxic::Scene::m_root_object [private]
 

Definition at line 80 of file scene.h.

Referenced by SetRootObject(), and ~Scene().


The documentation for this class was generated from the following files:
Generated on Tue May 11 01:31:58 2004 for toxic by doxygen 1.3.6