gee_gl_light.h

Go to the documentation of this file.
00001 /* -*- C++ -*- */
00002 
00003 /* COPYRIGHT
00004  *
00005  * This file is part of the Visual Effects Engine - VEE
00006  *
00007  * Read the "VEE-LICENSE" file for the license.
00008  *
00009  * Authors & Copyright:   
00010  *
00011  * Tommi Ilmonen, Tuukka Heikura, Marko Myllymaa and 
00012  * Janne Kontkanen 2001-2004
00013  *
00014  * Additional copyrights: Tekes 2003-2004
00015  *
00016  * firstname.lastname@hut.fi
00017  *
00018  */
00019 
00020 #ifndef GEE_GL_LIGHT_H
00021 #define GEE_GL_LIGHT_H
00022 
00023 #include <ConfigReaderEmpty.hpp>
00024 
00025 #include <vee_vector4.h>
00026 
00027 #include <GL/gl.h>
00028 
00029 #include <map>
00030 #include <vector>
00031 
00038 class GEE_GlLight {
00039 public:
00040   GEE_GlLight();
00041   
00042   void apply(GLenum id);
00043   
00044   void set(ConfigReader::Chunk *values);
00045   
00046   VEE_Vector4 m_location;
00047   VEE_Vector4 m_ambient;
00048   VEE_Vector4 m_diffuse;
00049   VEE_Vector4 m_specular;
00050 };
00051 
00054 
00057 class GEE_GlLights 
00058 {
00059 public:
00060   GEE_GlLights();
00061   ~GEE_GlLights();
00062 
00063   void set(ConfigReader::Config *config);
00064 
00065   void clear();
00066 
00067   void apply(bool on, bool reset = true);
00068 
00069   void set(GLenum lightId, const GEE_GlLight & light);
00070 
00071   uint size() const { return m_lights.size(); }
00072 
00073 protected:
00074 
00075   typedef std::map<GLenum, GEE_GlLight>::iterator iterator;
00076 
00077   std::map<GLenum, GEE_GlLight> m_lights;
00078 
00079   VEE_Vector4 m_sceneAmbient;  
00080 };
00081 
00082 #endif

Generated on Mon Mar 12 21:09:00 2007 for VEE - The Visual Effects Engine by  doxygen 1.4.6