Changeset 3598 in orxonox.OLD for orxonox/trunk/src/light.h
- Timestamp:
- Mar 18, 2005, 12:00:42 AM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/light.h
r3597 r3598 14 14 #include "glincl.h" 15 15 16 //! The maximum number of Lights this OpenGL-implementation supports 16 //! The maximum number of Lights this OpenGL-implementation supports. 17 17 #define NUMBEROFLIGHTS GL_MAX_LIGHTS 18 18 … … 20 20 class Vector; 21 21 22 //! A struct that holds information about a Light22 //! A class that handles Lights. The LightManager operates on this. 23 23 class Light : public WorldEntity 24 24 { 25 25 public: 26 26 Light(int lightNumber); 27 ~Light(void);27 virtual ~Light(void); 28 28 29 29 void setPosition(Vector position); … … 35 35 void setSpotCutoff(GLfloat cutoff); 36 36 37 Vector getPosition(); 38 /** \returns the lightNumber*/ 39 int getLightNumber(void) {return this->lightNumber;} 40 37 41 virtual void draw(); 38 42 43 void debug(void); 44 39 45 // attributes 40 46 private: 41 47 int lightNumber; //!< The number of this Light. 42 48 GLfloat lightPosition[4]; //!< The Position of this Light. … … 48 54 GLfloat spotDirection[4]; //!< The direction of the Spot Light. 49 55 GLfloat spotCutoff; //!< The cutoff Angle of the Light Source 50 51 void debug(void);52 56 }; 53 57 … … 81 85 void setAmbientColor(GLfloat r, GLfloat g, GLfloat b); 82 86 87 void draw(); 88 83 89 //set Attributes 84 90 void setPosition(Vector position); … … 92 98 // get Attributes 93 99 Vector getPosition(void); 94 /** 95 \returns the Position of Light 96 \param lightNumber lightnumber 97 */ 98 inline Vector getPosition(int lightNumber) 99 { 100 if (!this->lights[lightNumber]) 101 return Vector(.0,.0,.0); 102 return Vector(this->lights[lightNumber]->lightPosition[0], 103 this->lights[lightNumber]->lightPosition[1], 104 this->lights[lightNumber]->lightPosition[2]); 105 } 106 100 Vector getPosition(int lightNumber); 101 107 102 void debug(void); 108 103 };
Note: See TracChangeset
for help on using the changeset viewer.