Main Page   Modules   Class Hierarchy   Compound List   File List   Compound Members   File Members   Related Pages   Examples  

glt/light.h

Go to the documentation of this file.
00001 #ifndef GLT_LIGHT_H
00002 #define GLT_LIGHT_H
00003 
00004 /*
00005 
00006   GLT OpenGL C++ Toolkit      
00007   Copyright (C) 2000-2002 Nigel Stewart
00008   Email: nigels.com@gmail.com   WWW: http://www.nigels.com/glt/
00009 
00010   This library is free software; you can redistribute it and/or
00011   modify it under the terms of the GNU Lesser General Public
00012   License as published by the Free Software Foundation; either
00013   version 2.1 of the License, or (at your option) any later version.
00014 
00015   This library is distributed in the hope that it will be useful,
00016   but WITHOUT ANY WARRANTY; without even the implied warranty of
00017   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00018   Lesser General Public License for more details.
00019 
00020   You should have received a copy of the GNU Lesser General Public
00021   License along with this library; if not, write to the Free Software
00022   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 
00024 */
00025 
00039 #include <glt/gl.h>
00040 
00041 #include <iosfwd>
00042 
00043 #include <math/vector3.h>
00044 #include <glt/color.h>
00045 
00053 class GltLight
00054 {
00055 public:
00056     
00058     GltLight(const GLenum light = GL_LIGHT0,const bool getIt = false);
00060     ~GltLight();
00061 
00063     void get();
00065     void set() const;
00066 
00067     GLenum   &light();
00068     bool     &enabled();
00069     GltColor &ambient();
00070     GltColor &diffuse();
00071     GltColor &specular();
00072     Vector   &position();
00073     Vector   &spotDirection();
00074     GLfloat  &spotExponent();
00075     GLfloat  &spotCutoff();
00076     GLfloat  &attenutationConstant();
00077     GLfloat  &attenutationLinear();
00078     GLfloat  &attenutationQuadratic();
00079 
00080     const GLenum   &light() const;
00081     const bool     &enabled() const;
00082     const GltColor &ambient() const;
00083     const GltColor &diffuse() const;
00084     const GltColor &specular() const;
00085     const Vector   &position() const;
00086     const Vector   &spotDirection() const;
00087     const GLfloat  &spotExponent() const;
00088     const GLfloat  &spotCutoff() const;
00089     const GLfloat  &attenutationConstant() const;
00090     const GLfloat  &attenutationLinear() const;
00091     const GLfloat  &attenutationQuadratic() const;
00092 
00093 private:
00094 
00095     GLenum  _light;
00096     bool    _enabled;
00097 
00098     GltColor _ambient;
00099     GltColor _diffuse;
00100     GltColor _specular;
00101     Vector   _position;
00102     Vector   _spotDirection;
00103     GLfloat  _spotExponent;
00104     GLfloat  _spotCutoff;
00105     GLfloat  _attenuationConstant;
00106     GLfloat  _attenuationLinear;
00107     GLfloat  _attenuationQuadratic;
00108 
00109     const static GltColor _ambientDefault;
00110     const static GltColor _diffuseDefault;
00111     const static GltColor _specularDefault;
00112     const static Vector   _positionDefault;
00113     const static Vector   _spotDirectionDefault;
00114     const static GLfloat  _spotExponentDefault;
00115     const static GLfloat  _spotCutoffDefault;
00116     const static GLfloat  _attenuationConstantDefault;
00117     const static GLfloat  _attenuationLinearDefault;
00118     const static GLfloat  _attenuationQuadraticDefault;
00119 };
00120 
00121 #endif

Generated on Tue Nov 5 11:11:03 2002 for GLT by doxygen1.2.18