Page principale | Liste des namespaces | Hiérarchie des classes | Liste par ordre alphabétique | Liste des composants | Liste des fichiers | Membres des namespaces | Composants | Déclarations

ExCLight.h

Aller à la documentation de ce fichier.
00001 /************************************************************************/
00002 /* Ex Nihlo Engine by Hermanns Christophe                                                               */
00003 /************************************************************************/
00004 /* This program is free software; you can redistribute it and/or                */
00005 /* modify it under the terms of the GNU General Public License                  */
00006 /* as published by the Free Software Foundation; either version 2               */
00007 /* of the License, or (at your option) any later version.                               */
00008 /*                                                                                                                                              */
00009 /* This program is distributed in the hope that it will be useful,              */
00010 /* but WITHOUT ANY WARRANTY; without even the implied warranty of               */
00011 /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.                                 */
00012 /*                                                                                                                                              */
00013 /* See the GNU General Public License for more details.                                 */
00014 /*                                                                                                                                              */
00015 /* You should have received a copy of the GNU General Public License    */
00016 /* along with this program; if not, write to the Free Software                  */
00017 /* Foundation, Inc., 59 Temple Place - Suite 330,                                               */
00018 /* Boston, MA  02111-1307, USA.                                                                                 */
00019 /*                                                                                                                                              */
00020 /* If you use a important part of this code please send me a mail               */
00021 /* I just want to see where my code go thks :)                                                  */
00022 /************************************************************************/
00023 
00024 /************************************************************************/
00025 /* Contact                                                              */  
00026 /************************************************************************/
00027 /* ExNihilo Website :www.ploksoftware.org                               */
00028 /*                                                                      */
00029 /* Hermanns Christophe ExNihilo creator and main programmer             */
00030 /*                                                                      */
00031 /* Mail             : Data@ploksoftware.org                                                             */
00032 /* ICQ              : 8030901                                                                                   */
00033 /* MSN Messenger    : Data_7@hotmail.com                                                                */
00034 /*                                                                      */
00035 /*                                                                      */
00036 /************************************************************************/
00037 
00038 /************************************************************************/
00039 /* File Description                                                                                             */
00040 /************************************************************************/
00041 /* File Name   :ExCLight.h                                                                                              */
00042 /*                                                                                                                                              */
00043 /* Start Date   :04/20/2002                                                                                             */
00044 /*                                                                                                                                              */
00045 /* Last Update :06/20/2003                                              */
00046 /*                                                                                                                                              */
00047 /* File Description :                                                                                                   */
00048 /*                                                                      */
00049 /* For update of this file check : www.ploksoftware.org                 */
00050 /************************************************************************/
00051 
00052 #ifndef __EXCLIGHT_H__
00053 #define __EXCLIGHT_H__
00054 //------------------------------------------------------------------------
00055 //Includes
00056 //------------------------------------------------------------------------
00057 #include "ExDefine.h"
00058 //------------------------------------------------------------------------
00059 #include "Math/ExMath.h"
00060 //------------------------------------------------------------------------
00061 #include "Object/Object3D/ExCObject3D.h"
00062 //------------------------------------------------------------------------
00063 class ExCLight : public ExCObject3D
00064 {
00065 protected:
00066 //--------------------------------
00067 // Variable
00068 //--------------------------------
00069         GLenum m_LightNumber;   //Light number for opengl GL_LIGHT0 for ex.
00070         bool m_State;                   //State if Light is on or off
00071         float m_ambiant[4] ;    //Ambiant  Param R,G,B,A
00072         float m_diffuse[4] ;    //Diffuse  Param R,G,B,A
00073         float m_specular[4];    //Specular Param R,G,B,A
00074                 
00075         float m_spotExponent[1];
00076         float m_spotCutOff[1];
00077         
00078         float m_spotConstentAtt[1];
00079         float m_spotLinearAtt[1];
00080         float m_spotQuadraticAtt[1];
00081 public:
00082 //--------------------------------
00083 // Constructor // Destructor
00084 //--------------------------------
00085         ExCLight(void);
00086         ExCLight(GLenum Number);
00087         ~ExCLight(void);
00088 //--------------------------------
00089 // Methode
00090 //--------------------------------
00091         void Reset(void);
00092         void Draw(void);
00093 
00094         void SetLightNumber(GLenum light);
00095         void TurnOn(void);
00096         void TurnOff(void);
00097         inline bool GetState(void){return m_State;}
00098 
00099         void  SetAmbiant(float R,float G,float B,float A);
00100         void  SetAmbiantR(float R);
00101         void  SetAmbiantG(float G);
00102         void  SetAmbiantB(float B);
00103         void  SetAmbiantA(float A);
00104         float GetAmbiantR(void);
00105         float GetAmbiantG(void);
00106         float GetAmbiantB(void);
00107         float GetAmbiantA(void);
00108         void  IncAmbiantR(float inc);
00109         void  IncAmbiantG(float inc);
00110         void  IncAmbiantB(float inc);
00111         void  IncAmbiantA(float inc);
00112         
00113         void  SetDiffuse(float R,float G,float B,float A);
00114         void  SetDiffuseR(float R);
00115         void  SetDiffuseG(float G);
00116         void  SetDiffuseB(float B);
00117         void  SetDiffuseA(float A);
00118         float GetDiffuseR(void);
00119         float GetDiffuseG(void);
00120         float GetDiffuseB(void);
00121         float GetDiffuseA(void);
00122         void  IncDiffuseR(float inc);
00123         void  IncDiffuseG(float inc);
00124         void  IncDiffuseB(float inc);
00125         void  IncDiffuseA(float inc);
00126 
00127         void  SetSpecular(float R,float G,float B,float A);
00128         void  SetSpecularR(float R);
00129         void  SetSpecularG(float G);
00130         void  SetSpecularB(float B);
00131         void  SetSpecularA(float A);
00132         float GetSpecularR(void);
00133         float GetSpecularG(void);
00134         float GetSpecularB(void);
00135         float GetSpecularA(void);
00136         void  IncSpecularR(float inc);
00137         void  IncSpecularG(float inc);
00138         void  IncSpecularB(float inc);
00139         void  IncSpecularA(float inc);
00140 
00141         void  SetPosition(double X,double Y,double Z);
00142         void  SetPosition(double X,double Y,double Z,double W);
00143         void  SetPositionX(double X);
00144         void  SetPositionY(double Y);
00145         void  SetPositionZ(double Z);
00146         void  SetPositionW(double W);
00147         inline float GetPositionX(void){return m_Position.GetX();}
00148         inline float GetPositionY(void){return m_Position.GetY();}
00149         inline float GetPositionZ(void){return m_Position.GetZ();}
00150         inline void  IncPositionX(float inc){SetPositionX(GetPositionX()+inc);}
00151         inline void  IncPositionY(float inc){SetPositionY(GetPositionY()+inc);}
00152         inline void  IncPositionZ(float inc){SetPositionZ(GetPositionZ()+inc);}
00153         
00154         void  SetTarget(double X,double Y,double Z);
00155         void  SetTargetX(double X);
00156         void  SetTargetY(double Y);
00157         void  SetTargetZ(double Z);
00158         inline float GetTargetX(void){return m_Target.GetX();}
00159         inline float GetTargetY(void){return m_Target.GetY();}
00160         inline float GetTargetZ(void){return m_Target.GetZ();}
00161         inline void  IncTargetX(float inc){SetTargetX(GetTargetX()+inc);}
00162         inline void  IncTargetY(float inc){SetTargetY(GetTargetY()+inc);}
00163         inline void  IncTargetnZ(float inc){SetTargetZ(GetTargetZ()+inc);}
00164         
00165         void  SetSpotExponent(float Exponent);
00166         void  IncSpotExponent(float inc);
00167         float GetSpotExponent(void);
00168 
00169         void  SetSpotCutOff(float cut);
00170         void  IncSpotCutOff(float inc);
00171         float GetSpotCutOff(void);
00172 
00173         void  SetConstantAttenuation(float att);
00174         void  IncConstantAttenuation(float inc);
00175         float GetConstantAttenuation(void);
00176 
00177         void  SetLinearAttenuation(float att);
00178         void  IncLinearAttenuation(float inc);
00179         float GetLinearAttenuation(void);
00180 
00181         void  SetQuadraticAttenuation(float att);
00182         void  IncQuadraticAttenuation(float inc);
00183         float GetQuadraticAttenuation(void);
00184 };
00185 #endif //__EXCLIGHT_H__

Généré le Tue Oct 28 12:43:31 2003 pour ExNihilo par doxygen 1.3.4