Scene Class Reference

High-level interface to scene representation. More...

#include <Scene.h>

Collaboration diagram for Scene:

Collaboration graph
[legend]
List of all members.

Public Member Functions

void load (std::string fileName)
 Load scene from XML file.
void applyEmission ()
 Set initial radiosity for light sources.
void divide (float size)
 Divide scene triangles to patches.
RadiosityRenderer * createRadiosityRenderer (int stepCount, float formFactorTreshold, long maxCacheSize)
 
Returns:
Return instance of RadiosityRenderer object allocated on the heap.

void save (std::string fileName)
 Save scene to XML file.
TriangleSetExt * dumpForVis ()
 
Returns:
Return instance of TriangleSetExt object containing scene triangles.


Friends

std::ostream & operator<< (std::ostream &out, Scene &scene)
 Dump all scene patches to output stream in human readable format.

Detailed Description

High-level interface to scene representation.

Definition at line 26 of file Scene.h.


Member Function Documentation

void Scene::load ( std::string  fileName  ) 

Load scene from XML file.

Parameters:
fileName Name of file to load.
Note:
Current DTD should be at http://dudka.cz/dtd/scene.dtd

void Scene::applyEmission (  ) 

Set initial radiosity for light sources.

This is a way of acceleration - you get useful output after 1st step.

void Scene::divide ( float  size  ) 

Divide scene triangles to patches.

Recursive division of triangles until they are smaller as given size.

Parameters:
size Maximum acceptable size of patch.

RadiosityRenderer* Scene::createRadiosityRenderer ( int  stepCount,
float  formFactorTreshold,
long  maxCacheSize 
)

Returns:
Return instance of RadiosityRenderer object allocated on the heap.

Parameters:
stepCount Number of radiosity computation steps.
formFactorTreshold Pair of patches with smaller form factor than formFactorTreshold will be ignored.
maxCacheSize Maximum size of patch cache (in bytes).
Note:
Maximum cache size is raw size (estimated). The real cache size can be greater.

void Scene::save ( std::string  fileName  ) 

Save scene to XML file.

Parameters:
fileName Name of file to save scene to.

TriangleSetExt* Scene::dumpForVis (  ) 

Returns:
Return instance of TriangleSetExt object containing scene triangles.

This method is used for scene visualization.


Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  out,
Scene &  scene 
) [friend]

Dump all scene patches to output stream in human readable format.

Note:
This function will not be built if NDEBUG macro is defined.
Parameters:
out Output stream to write to.
scene Reference to Scene object to dump.
Returns:
Return output stream given as parameter.

Definition at line 87 of file Scene.h.


The documentation for this class was generated from the following file:
Generated on Thu Dec 6 19:33:12 2007 for Radiosity Renderer and Visualizer by  doxygen 1.5.2