Changeset 4469 in orxonox.OLD for orxonox/trunk
- Timestamp:
- Jun 2, 2005, 1:53:08 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/lib/graphics/light.h
r4338 r4469 17 17 #define NUMBEROFLIGHTS GL_MAX_LIGHTS 18 18 19 19 20 // FORWARD DEFINITIONS // 20 21 class Vector; 22 21 23 22 24 //! A class that handles Lights. The LightManager operates on this. … … 29 31 void setPosition(Vector position); 30 32 void setPosition(GLfloat x, GLfloat y, GLfloat z); 33 Vector getPosition() const; 34 31 35 void setDiffuseColor(GLfloat r, GLfloat g, GLfloat b); 32 36 void setSpecularColor(GLfloat r, GLfloat g, GLfloat b); … … 35 39 void setSpotCutoff(GLfloat cutoff); 36 40 37 Vector getPosition() const;38 41 /** \returns the lightNumber*/ 39 42 int getLightNumber(void) const {return this->lightNumber;} … … 45 48 // attributes 46 49 private: 47 int lightNumber;//!< The number of this Light.48 GLfloat lightPosition[4];//!< The Position of this Light.49 GLfloat diffuseColor[4];//!< The Diffuse Color this Light emmits.50 GLfloat specularColor[4];//!< The specular Color of this Light.51 float constantAttenuation;//!< The Factor of the the Constant Attenuation.52 float linearAttenuation;//!< The Factor of the the Linear Attenuation.53 float quadraticAttenuation;//!< The Factor of the the Quadratic Attenuation.54 GLfloat spotDirection[4];//!< The direction of the Spot Light.55 GLfloat spotCutoff;//!< The cutoff Angle of the Light Source50 int lightNumber; //!< The number of this Light. 51 GLfloat lightPosition[4]; //!< The Position of this Light. 52 GLfloat diffuseColor[4]; //!< The Diffuse Color this Light emmits. 53 GLfloat specularColor[4]; //!< The specular Color of this Light. 54 float constantAttenuation; //!< The Factor of the the Constant Attenuation. 55 float linearAttenuation; //!< The Factor of the the Linear Attenuation. 56 float quadraticAttenuation; //!< The Factor of the the Quadratic Attenuation. 57 GLfloat spotDirection[4]; //!< The direction of the Spot Light. 58 GLfloat spotCutoff; //!< The cutoff Angle of the Light Source 56 59 }; 60 61 57 62 58 63 //! A class that handles Lights … … 98 103 class LightManager : public BaseObject 99 104 { 100 private:101 LightManager(void);102 void initLight(int LightNumber);103 104 static LightManager* singletonRef; //!< This is the LightHandlers Reference.105 GLfloat ambientColor[4]; //!< The ambient Color of the scene.106 105 107 Light** lights; //!< An array of Lenght NUMBEROFLIGHTS, that holds pointers to all LightValues.108 Light* currentLight; //!< The current Light, we are working with.109 110 106 public: 107 virtual ~LightManager(void); 111 108 static LightManager* getInstance(); 112 virtual ~LightManager(void);113 109 114 110 // set Attributes … … 139 135 140 136 void debug(void) const; 137 138 139 private: 140 LightManager(void); 141 void initLight(int LightNumber); 142 143 144 private: 145 static LightManager* singletonRef; //!< This is the LightHandlers Reference. 146 GLfloat ambientColor[4]; //!< The ambient Color of the scene. 147 148 Light** lights; //!< An array of Lenght NUMBEROFLIGHTS, that holds pointers to all LightValues. 149 Light* currentLight; //!< The current Light, we are working with. 150 141 151 }; 142 152
Note: See TracChangeset
for help on using the changeset viewer.