rcrt::SceneLoader Class Reference

#include <SceneLoader.h>

Inheritance diagram for rcrt::SceneLoader:

Inheritance graph
[legend]
Collaboration diagram for rcrt::SceneLoader:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 SceneLoader (std::string scenePath, MaterialLoader *mats=0)
virtual ~SceneLoader ()
ScenegetScene ()
CameragetCamera ()
bool goToFrame (const int &n)
bool nextFrame ()
const std::vector
< ObjectLoader * > & 
getObjectLoaders ()

Private Member Functions

void init ()
void initCameras ()
void initObjects ()
void initLights ()

Private Attributes

Scene scene
MaterialLoadermaterials
std::vector
< Traceable * > 
traceables
std::vector
< ObjectLoader * > 
objects
std::vector
< LightLoader * > 
lights
std::vector
< CameraLoader * > 
cameras
bool initialised
bool addedTraceables


Detailed Description

Initiates loading of all scene data.

Definition at line 20 of file SceneLoader.h.


Constructor & Destructor Documentation

rcrt::SceneLoader::SceneLoader ( std::string  scenePath,
MaterialLoader mats = 0 
)

Definition at line 8 of file SceneLoader.cpp.

rcrt::SceneLoader::~SceneLoader (  )  [virtual]

Definition at line 13 of file SceneLoader.cpp.


Member Function Documentation

void rcrt::SceneLoader::init (  )  [private]

Definition at line 17 of file SceneLoader.cpp.

References initCameras(), initialised, initLights(), initObjects(), rcrt::XMLLoader::nextStartTag(), rcrt::XMLLoader::parser, scene, and rcrt::Scene::setName().

Referenced by goToFrame(), and nextFrame().

void rcrt::SceneLoader::initCameras (  )  [private]

Definition at line 31 of file SceneLoader.cpp.

References cameras, rcrt::XMLLoader::nextStartTag(), and rcrt::XMLLoader::parser.

Referenced by init().

void rcrt::SceneLoader::initObjects (  )  [private]

Definition at line 50 of file SceneLoader.cpp.

References materials, rcrt::XMLLoader::nextStartTag(), objects, and rcrt::XMLLoader::parser.

Referenced by init().

void rcrt::SceneLoader::initLights (  )  [private]

Definition at line 66 of file SceneLoader.cpp.

References lights, rcrt::XMLLoader::nextStartTag(), and rcrt::XMLLoader::parser.

Referenced by init().

Scene * rcrt::SceneLoader::getScene (  ) 

Definition at line 81 of file SceneLoader.cpp.

References scene.

Referenced by rcrt::AnimLoader::getScene(), and testLoaders().

Camera * rcrt::SceneLoader::getCamera (  ) 

Definition at line 86 of file SceneLoader.cpp.

References cameras.

Referenced by rcrt::AnimLoader::getCamera(), and testLoaders().

bool rcrt::SceneLoader::goToFrame ( const int &  n  )  [virtual]

Loads info of frame n.

Implements rcrt::XMLLoader.

Definition at line 129 of file SceneLoader.cpp.

References addedTraceables, rcrt::Scene::addLight(), cameras, rcrt::XMLLoader::currentFrame, rcrt::Light::getObject(), init(), initialised, lights, objects, scene, rcrt::Scene::setTraceables(), and traceables.

Referenced by rcrt::AnimLoader::goToFrame().

bool rcrt::SceneLoader::nextFrame (  )  [virtual]

Loads info from next frame. If on starting tag of frame, load this one, else go to next frame starting tag and load from that.

Implements rcrt::XMLLoader.

Definition at line 96 of file SceneLoader.cpp.

References addedTraceables, rcrt::Scene::addLight(), cameras, rcrt::XMLLoader::currentFrame, rcrt::Light::getObject(), init(), initialised, lights, objects, scene, rcrt::Scene::setTraceables(), and traceables.

Referenced by rcrt::AnimLoader::nextFrame().

const vector< ObjectLoader * > & rcrt::SceneLoader::getObjectLoaders (  ) 

Just for debugging purposes.

Definition at line 91 of file SceneLoader.cpp.

References objects.


Member Data Documentation

Scene rcrt::SceneLoader::scene [private]

Definition at line 23 of file SceneLoader.h.

Referenced by getScene(), goToFrame(), init(), and nextFrame().

MaterialLoader* rcrt::SceneLoader::materials [private]

Definition at line 24 of file SceneLoader.h.

Referenced by initObjects().

std::vector<Traceable*> rcrt::SceneLoader::traceables [private]

Definition at line 25 of file SceneLoader.h.

Referenced by goToFrame(), and nextFrame().

std::vector<ObjectLoader*> rcrt::SceneLoader::objects [private]

Definition at line 26 of file SceneLoader.h.

Referenced by getObjectLoaders(), goToFrame(), initObjects(), and nextFrame().

std::vector<LightLoader*> rcrt::SceneLoader::lights [private]

Definition at line 27 of file SceneLoader.h.

Referenced by goToFrame(), initLights(), and nextFrame().

std::vector<CameraLoader*> rcrt::SceneLoader::cameras [private]

Definition at line 28 of file SceneLoader.h.

Referenced by getCamera(), goToFrame(), initCameras(), and nextFrame().

bool rcrt::SceneLoader::initialised [private]

Definition at line 30 of file SceneLoader.h.

Referenced by goToFrame(), init(), and nextFrame().

bool rcrt::SceneLoader::addedTraceables [private]

Definition at line 31 of file SceneLoader.h.

Referenced by goToFrame(), and nextFrame().


The documentation for this class was generated from the following files:
Generated on Thu Jan 31 19:32:44 2008 for RenderingCompetitionRayTracer by  doxygen 1.5.3