src/rcrt/loaders/SceneLoader.h

Go to the documentation of this file.
00001 #ifndef SCENELOADER_H_
00002 #define SCENELOADER_H_
00003 
00004 #include "XMLLoader.h"
00005 #include "ObjectLoader.h"
00006 #include "CameraLoader.h"
00007 #include "LightLoader.h"
00008 #include "../Scene.h"
00009 #include "../Traceable.h"
00010 #include "../lights/Light.h"
00011 
00012 namespace rcrt
00013 {
00014 
00015 class MaterialLoader;
00016 
00020 class SceneLoader : public rcrt::XMLLoader
00021 {
00022 private:
00023         Scene scene;
00024         MaterialLoader* materials;
00025         std::vector<Traceable*> traceables;
00026         std::vector<ObjectLoader*> objects;
00027         std::vector<LightLoader*> lights;
00028         std::vector<CameraLoader*> cameras;
00029         
00030         bool initialised;
00031         bool addedTraceables;
00032         void init();
00033         void initCameras();
00034         void initObjects();
00035         void initLights();
00036         
00037 public:
00038         SceneLoader(std::string scenePath, MaterialLoader* mats = 0);
00039         virtual ~SceneLoader();
00040         
00041         Scene* getScene();
00042         //TODO better init of tracing and more camera options
00043         Camera* getCamera();
00044         
00045         bool goToFrame(const int& n);
00046         bool nextFrame();
00047         
00050         const std::vector<ObjectLoader*>& getObjectLoaders();
00051 };
00052 
00053 }
00054 
00055 #endif /*SCENELOADER_H_*/

Generated on Thu Jan 31 19:26:19 2008 for RenderingCompetitionRayTracer by  doxygen 1.5.3