src/rcrt/loaders/MaterialLoader.h

Go to the documentation of this file.
00001 #ifndef MATERIALLOADER_H_
00002 #define MATERIALLOADER_H_
00003 
00004 #include "XMLLoader.h"
00005 #include <map>
00006 #include <complex>
00007 
00008 namespace rcrt
00009 {
00010 
00011 class Material;
00012 class BSDF;
00013 
00017 class MaterialLoader : public XMLLoader
00018 {
00019 private:
00020         std::map<std::string, Material*> materials;
00021         
00022         void init();
00023         bool initialised;
00024         
00025         std::string initBSDF(std::string name, std::complex<float> ior);
00026         std::string initWood(std::string name, std::complex<float> ior);
00027         std::string initWall(std::string name, std::complex<float> ior);
00028         std::string initFloor(std::string name, std::complex<float> ior);
00029         std::string initDielectric(std::string name, std::complex<float> ior);
00030         std::string initWater(std::string name, std::complex<float> ior);
00031         std::string initMirror(std::string name, std::complex<float> ior);
00032         std::string initImg(std::string name, std::complex<float> ior);
00033         
00034         void loadCookT(BSDF* bsdf, std::complex<float> ior);
00035         void loadPhong(BSDF* bsdf);
00036         void loadLambert(BSDF* bsdf);
00037         
00038 public:
00039         MaterialLoader(std::string matFile);
00040         virtual ~MaterialLoader();
00041         
00042         Material* getMaterial(std::string name);
00043         
00044         bool goToFrame(const int& n);
00045         bool nextFrame();
00046 };
00047 
00048 }
00049 
00050 #endif /*MATERIALLOADER_H_*/

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