Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

Light.h

Go to the documentation of this file.
00001 
00040 #ifndef _AMIRE_COMMON_LIGHT_H
00041 #define _AMIRE_COMMON_LIGHT_H
00042 
00043 #include <amire/common/Defines.h>
00044 
00045 namespace amire {
00046   namespace common {
00050     class AMIRE_EXPORT_API Light : public virtual osg::Referenced {
00051     public:
00055       typedef enum {
00056         OPENGL_DEFAULTS0 = 0,
00057         OPENGL_DEFAULTS1,
00058         AMIRE_DEFAULTS
00059       } LightDefaults;
00060 
00061     private:
00062       int lightId;
00063       bool enabled;
00064       float ambient[4];
00065       float diffuse[4];
00066       float specular[4];
00067       float position[4];
00068       float spotDirection[3];
00069       float spotExponent;
00070       float spotCutoff;
00071       float constantAttenuation;
00072       float linearAttenuation;
00073       float quadricAttenuation;
00074 
00075     public:
00079       Light(LightDefaults lightDefaults = AMIRE_DEFAULTS);
00080 
00084       Light(const Light &light);
00085 
00086       virtual ~Light();
00087 
00091       void setEnabled(bool enabled = true);
00092 
00096       bool isEnabled();
00097 
00101       void setAmbient(const float ambient[4]);
00102 
00106       void setAmbient(float ambient0, float ambient1, float ambient2, float ambient3);
00107 
00111       const float *getAmbient() const;
00112 
00116       void setDiffuse(const float diffuse[4]);
00117 
00121       void setDiffuse(float diffuse0, float diffuse1, float diffuse2, float diffuse3);
00122 
00126       const float *getDiffuse() const;
00127 
00131       void setSpecular(const float specular[4]);
00132 
00136       void setSpecular(float specular0, float specular1, float specular2, float specular3);
00137 
00141       const float *getSpecular() const;
00142 
00146       void setPosition(const float position[4]);
00147 
00151       void setPosition(float position0, float position1, float position2, float position3);
00152 
00156       const float *getPosition() const;
00157 
00161       void setSpotDirection(const float spotDirection[3]);
00162 
00166       void setSpotDirection(float spotDirection0, float spotDirection1, float spotDirection2);
00167 
00171       const float *getSpotDirection() const;
00172 
00176       void setSpotExponent(float spotExponent);
00177 
00181       float getSpotExponent() const;
00182 
00186       void setSpotCutoff(float spotCutoff);
00187 
00191       float getSpotCutoff() const;
00192 
00196       void setConstantAttenuation(float constantAttenuation);
00197 
00201       float getConstantAttenuation() const;
00202 
00206       void setLinearAttenuation(float linearAttenuation);
00207 
00211       float getLinearAttenuation() const;
00212 
00216       void setQuadricAttenuation(float quadricAttenuation);
00217 
00221       float getQuadricAttenuation() const;
00222     };
00223   }
00224 }
00225 
00226 #endif

Generated on Tue May 20 17:23:53 2003 for AMIRE-Framework by doxygen1.3