CornellBox Class Reference

#include <CornellBox.h>

Inheritance diagram for CornellBox:

Scene GRAObject List of all members.

Public Member Functions

 CornellBox (const SDS &proto)
void addMirrorSphere (float radius=0.32)
void addCrystalicSphere (float radius=0.32)
void addSphereFlake (unsigned factor, float radius=0.32)
SceneGraphObject::OID appendModel (Parser &parser, const Matrix4 *m=NULL)
SceneGraphObject::OID appendObject (SceneGraphObject *primitive)
SceneGraphObject::OID appendLight (LightSource *light)
void build (void)
bool haveLight (void) const
Group * root (void)
virtual void __debug (void)

Protected Member Functions

void _build_walls ()
void _build_lights ()
void _create_sf_object_set (Vector3[9])
void _build_sphere_flake (unsigned, const Vector4 &, const Vector4 &, Vector3[9])

Protected Attributes

SceneGraphObject::OID _lastOID
Group _sceneGraph
bool _haveLight

Static Protected Attributes

static const int _upperLeftNear = 1
static const int _upperLeftFar = 0
static const int _upperRightFar = 3
static const int _upperRightNear = 2
static const int _lowerLeftFar = 5
static const int _lowerLeftNear = 4
static const int _lowerRightNear = 7
static const int _lowerRightFar = 6
static const float _lightScale = .35
static const Vector3 _box [8]

Detailed Description

Cornel Box scene with mirror and crystalic spheres inside +-1 cube

Definition at line 15 of file CornellBox.h.


Constructor & Destructor Documentation

CornellBox const SDS &  proto  ) 
 

Parameters:
proto prototype of the main spatial data structure

Definition at line 248 of file CornellBox.cc.

References CornellBox::_build_lights(), and CornellBox::_build_walls().


Member Function Documentation

void __debug void   )  [virtual, inherited]
 

Used only for debugging.

Definition at line 63 of file Scene.cc.

References Scene::_sceneGraph.

void _build_lights  )  [protected]
 

Definition at line 119 of file CornellBox.cc.

References CornellBox::_box, Scene::_lastOID, CornellBox::_lightScale, CornellBox::_upperLeftNear, CornellBox::_upperRightFar, CornellBox::_upperRightNear, Scene::appendLight(), and KB_CORNER.

Referenced by CornellBox::CornellBox().

void _build_sphere_flake unsigned  ,
const Vector4 &  ,
const Vector4 &  ,
Vector3  [9]
[protected]
 

Definition at line 184 of file CornellBox.cc.

References Scene::_lastOID, and Scene::appendObject().

Referenced by CornellBox::addSphereFlake().

void _build_walls  )  [protected]
 

Definition at line 34 of file CornellBox.cc.

References CornellBox::_box, Scene::_lastOID, CornellBox::_lowerLeftFar, CornellBox::_lowerLeftNear, CornellBox::_lowerRightFar, CornellBox::_lowerRightNear, CornellBox::_upperLeftFar, CornellBox::_upperLeftNear, CornellBox::_upperRightFar, CornellBox::_upperRightNear, and Scene::appendObject().

Referenced by CornellBox::CornellBox().

void _create_sf_object_set Vector3  [9]  )  [protected]
 

Definition at line 155 of file CornellBox.cc.

Referenced by CornellBox::addSphereFlake().

void addCrystalicSphere float  radius = 0.32  ) 
 

Adds crystalic sphere to the box.

Parameters:
radius spehere radius

Definition at line 269 of file CornellBox.cc.

References Scene::_lastOID, Scene::appendObject(), and KB_CORNER.

void addMirrorSphere float  radius = 0.32  ) 
 

Adds mirror sphere to the box.

Parameters:
radius spehere radius

Definition at line 257 of file CornellBox.cc.

References Scene::_lastOID, Scene::appendObject(), and KB_CORNER.

void addSphereFlake unsigned  factor,
float  radius = 0.32
 

Adds "spehere flake to the box. See also SphereFlake class.

Parameters:
factor fractal scene factor
radius radius of the biggest spehere

Definition at line 282 of file CornellBox.cc.

References CornellBox::_build_sphere_flake(), and CornellBox::_create_sf_object_set().

SceneGraphObject::OID appendLight LightSource *  light  )  [inherited]
 

Appends a light source to the scene.

Parameters:
light appended light source

Definition at line 53 of file Scene.cc.

References Scene::_haveLight, Scene::_lastOID, and Scene::_sceneGraph.

Referenced by CornellBox::_build_lights(), SphereFlake::_create_lights(), and FractalMount::_create_lights().

SceneGraphObject::OID appendModel Parser &  parser,
const Matrix4 *  m = NULL
[inherited]
 

Appends model to the scene.

Parameters:
parser parser of the model
m transfoprmation matrix of the model

Definition at line 7 of file Scene.cc.

References Scene::_lastOID, and Scene::_sceneGraph.

SceneGraphObject::OID appendObject SceneGraphObject *  primitive  )  [inherited]
 

Appends single object to the scene.

Parameters:
primitive appended object

Definition at line 32 of file Scene.cc.

References Scene::_lastOID, and Scene::_sceneGraph.

Referenced by CornellBox::_build_sphere_flake(), CornellBox::_build_walls(), SphereFlake::_create_spheres(), FractalMount::_create_spheres(), CornellBox::addCrystalicSphere(), CornellBox::addMirrorSphere(), and SphereFlake::SphereFlake().

void build void   )  [inline, inherited]
 

Prepares the scene for manipulation. There is no guarantee that the scene is realy created until the build() method is called. After the build() call the scene is created. Nevertheless, you _can_ still append additional primitives and/or models.

Definition at line 65 of file Scene.h.

Referenced by FractalMount::FractalMount(), and SphereFlake::SphereFlake().

bool haveLight void   )  const [inline, inherited]
 

Returns:
true if the scene has light, false otherwise

Definition at line 70 of file Scene.h.

Group* root void   )  [inline, inherited]
 

Returns:
root of the scene graph

Definition at line 75 of file Scene.h.

Referenced by RayTracing::_cast_ray(), PhotonMapShader::_create_maps_per_shape(), PhotonMapShader::_create_scene_maps(), PhotonMapShader::_emit_caustic_photon(), PhotonMapShader::_emit_global_photon(), LocalReflection::_light_visible(), RTRender::_render(), GLRender::_render(), GLPhotonMapRender::_render(), GLIrradCacheRender::_render(), GLBVRender::_render(), GLEnergyRender::_render_energy(), PhotonMapShader::distributeEnergy(), RayTracing::illuminatePoint(), PhotonTracing::illuminatePoint(), Render::renderScene(), RadShader::setScene(), Radiosity::setScene(), PhotonMapping::setScene(), and LocalReflection::setScene().


Member Data Documentation

const Vector3 _box [static, protected]
 

Initial value:

Definition at line 26 of file CornellBox.h.

Referenced by CornellBox::_build_lights(), and CornellBox::_build_walls().

bool _haveLight [protected, inherited]
 

Definition at line 22 of file Scene.h.

Referenced by Scene::appendLight().

SceneGraphObject::OID _lastOID [protected, inherited]
 

Definition at line 20 of file Scene.h.

Referenced by CornellBox::_build_lights(), CornellBox::_build_sphere_flake(), CornellBox::_build_walls(), SphereFlake::_create_spheres(), FractalMount::_create_spheres(), CornellBox::addCrystalicSphere(), CornellBox::addMirrorSphere(), Scene::appendLight(), Scene::appendModel(), Scene::appendObject(), and SphereFlake::SphereFlake().

const float _lightScale = .35 [static, protected]
 

Definition at line 25 of file CornellBox.h.

Referenced by CornellBox::_build_lights().

const int _lowerLeftFar = 5 [static, protected]
 

Definition at line 21 of file CornellBox.h.

Referenced by CornellBox::_build_walls().

const int _lowerLeftNear = 4 [static, protected]
 

Definition at line 22 of file CornellBox.h.

Referenced by CornellBox::_build_walls().

const int _lowerRightFar = 6 [static, protected]
 

Definition at line 24 of file CornellBox.h.

Referenced by CornellBox::_build_walls().

const int _lowerRightNear = 7 [static, protected]
 

Definition at line 23 of file CornellBox.h.

Referenced by CornellBox::_build_walls().

Group _sceneGraph [protected, inherited]
 

Definition at line 21 of file Scene.h.

Referenced by Scene::__debug(), Scene::appendLight(), Scene::appendModel(), and Scene::appendObject().

const int _upperLeftFar = 0 [static, protected]
 

Definition at line 18 of file CornellBox.h.

Referenced by CornellBox::_build_walls().

const int _upperLeftNear = 1 [static, protected]
 

Definition at line 17 of file CornellBox.h.

Referenced by CornellBox::_build_lights(), and CornellBox::_build_walls().

const int _upperRightFar = 3 [static, protected]
 

Definition at line 19 of file CornellBox.h.

Referenced by CornellBox::_build_lights(), and CornellBox::_build_walls().

const int _upperRightNear = 2 [static, protected]
 

Definition at line 20 of file CornellBox.h.

Referenced by CornellBox::_build_lights(), and CornellBox::_build_walls().


The documentation for this class was generated from the following files:
Generated on Tue Nov 21 15:11:43 2006 for gra by  doxygen 1.4.6