//------------------------------------------------------------------------------ // gso_Renderer class -- // (C) Piero Giubilato 2009, Berkeley Lab -- //------------------------------------------------------------------------------ //______________________________________________________________________________ // {Trace} // [File name] "gso_Renderer.h" // [Author] "Piero Giubilato" // [Version] "0.4" // [Modified by] "Piero Giubilato" // [Last revision] "21 Jan 2009" // [Language] "C++" // [Compiler] "Visual C++ 9.x" // [Member of] "Cool SEAL" // [Project] "SEAL" // [Description] "Header for the gso_Renderer class" // [Key documentation] // "Visual C++ Reference Help" // "Root reference guide" // {Trace} //______________________________________________________________________________ // Overloading check #ifndef gso_Renderer_H #define gso_Renderer_H // Standard libs // Root components #include // Application components //______________________________________________________________________________ class gso_Material { // Light support class for material properties public: // Special members gso_Material(UInt_t color, Double_t amb, Double_t diff, Double_t spec, Double_t shine) {k_Color = color; k_Amb = amb; k_Diff = diff; k_Spec = spec; k_Shine = shine;} //~gso_Material (); // Properties UInt_t k_Color; // Color Double_t k_Amb; // Ambient reflection Double_t k_Diff; // Diffuse reflection Double_t k_Spec; // Specular reflection Double_t k_Shine; // Shininess }; //______________________________________________________________________________ class gso_Renderer { private: // Light properties static UInt_t light_Mode; // 0 = parallel, 1 = point source static Double_t light_Strenght; // Strenght static TVector3 light_Vect; // Position/Direction static Double_t light_Color[3]; // Color // Material properties static Double_t mk_Amb; // Ambient reflection static Double_t mk_Diff; // Diffuse reflection static Double_t mk_Spec; // Specular reflection static Double_t mk_Shine; // Shininess // Force a singleton gso_Renderer (); ~gso_Renderer (); gso_Renderer (const gso_Renderer&) {}; gso_Renderer& operator=(gso_Renderer&) {}; public: // Default const static const Float_t kl_Default; // Standard light strenght //static const Double_t km_Amb; // Ambient reflection //static const Double_t km_Diff; // Diffuse reflection //static const Double_t km_Spec; // Specular reflection //static const Double_t km_Shine; // Shininess static const gso_Material k_Material; // Complete material // Light setting static UInt_t l_Mode(); static UInt_t l_Mode(UInt_t mode); static Double_t l_Strenght(); static Double_t l_Strenght(Double_t strenght); static void l_Vect(Float_t x, Float_t y, Float_t z); static void l_Vect(Float_t* x, Float_t* y, Float_t* z); static void l_Color(Float_t R, Float_t G, Float_t B); static void l_Color(Float_t* R, Float_t* G, Float_t* B); // Material setting static void m_Set(Double_t k_Amb, Double_t k_Diff, Double_t k_Spec, Double_t k_Shine); static void m_Set(const gso_Material* mat); //static void light_vect_Get(Float_t* x, Float_t* y, Float_t* z); // Rendering static void light_Map(Float_t* light_Map, const Float_t* surf_Map, UInt_t surf_map_Width, UInt_t surf_map_Height); }; // Overloading check #endif