Page principale | Hiérarchie des classes | Liste alphabétique | Liste des classes | Liste des fichiers | Membres de classe

C:/Projects/ngn/include/light.h

00001 /***************************************************************************
00002  *            light.h
00003  *
00004  *  Sun Feb  1 12:12:39 2004
00005  *  Copyright  2004  thierry schartz
00006  *  thierry.schartz@bluebottle.com
00007  ****************************************************************************/
00008 /*
00009  *  This program is free software; you can redistribute it and/or modify
00010  *  it under the terms of the GNU General Public License as published by
00011  *  the Free Software Foundation; either version 2 of the License, or
00012  *  (at your option) any later version.
00013  *
00014  *  This program is distributed in the hope that it will be useful,
00015  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00016  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00017  *  GNU Library General Public License for more details.
00018  *
00019  *  You should have received a copy of the GNU General Public License
00020  *  along with this program; if not, write to the Free Software
00021  *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
00022  */
00023 
00024 #ifndef _LIGHT_H
00025 #define _LIGHT_H
00026 
00027 #ifdef WIN32
00028 #include <windows.h>
00029 #endif
00030 
00031 
00032 #include "vector3d.h"
00033 #include "color.h"
00034 
00035 namespace ngn {
00036 
00037         class Camera;
00038         
00039 
00040                 
00041                         /* \class Light
00042                          * \brief Représente une source lumineuse.
00043                          */
00044                         class NGN_API Light
00045                         {
00046                         public:
00047                                 //constructor
00048                                 Light();
00049                                 Light( const Light& other );
00050 
00052                                 void enable( const Camera& cam );
00054                                 void disable();
00055                                 
00057                                 void setPosition( const core::Vector3df& pos );
00059                                 void setPosition( float x, float y, float z );
00061                                 void setColor( const core::Colorf& color );
00063                                 void setIntensity( float intensity );
00064                                 
00066                                 const core::Vector3df& getPosition() const;
00068                                 const core::Colorf& getColor() const;
00070                                 float getIntensity() const;
00072                                 int getLightID() const;
00073                                 
00074 
00075                         private:
00076                                         
00077                                 core::Vector3df m_pos;  // position of light
00078                                 core::Colorf m_color;   // color of light
00079                                 float m_intensity;              // intensity of light
00080                                 int m_lightid;                  // id of light
00081                                 static int m_nLights;   // total number of lights
00082                         };
00083 
00084 
00085 
00086 }//ngn
00087 #endif /* _LIGHT_H */

Généré le Fri Nov 19 14:20:29 2004 pour NGN par  doxygen 1.3.9.1