Changeset 3453 in orxonox.OLD for orxonox/trunk/src
- Timestamp:
- Mar 3, 2005, 5:56:20 PM (20 years ago)
- Location:
- orxonox/trunk/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/light.cc
r3446 r3453 303 303 glLightfv (GL_LIGHT0, GL_AMBIENT, this->ambientColor); 304 304 } 305 306 /** 307 \brief stets the direction of the Spot Light. 308 \param direction The direction of the Spot Light. 309 */ 310 void Light::setSpotDirection(Vector direction) 311 { 312 this->currentLight->spotDirection[0] = direction.x; 313 this->currentLight->spotDirection[1] = direction.y; 314 this->currentLight->spotDirection[2] = direction.z; 315 316 glLightfv(lightsV[this->currentLight->lightNumber], GL_SPOT_DIRECTION, this->currentLight->spotDirection); 317 } 318 319 320 /** 321 \brief sets the cutoff angle of the Light. 322 \param cutoff The cutoff angle. 323 */ 324 void Light::setSpotCutoff(GLfloat cutoff) 325 { 326 this->currentLight->spotCutoff = cutoff; 327 glLightf(lightsV[this->currentLight->lightNumber], GL_SPOT_CUTOFF, cutoff); 328 } 329 305 330 306 331 // get Attributes -
orxonox/trunk/src/light.h
r3446 r3453 43 43 GLfloat specularColor[4]; //!< The specular Color of this Light. 44 44 AttenuationType attenuationType;//!< The AttenuationType of this Light. 45 float attenuationFactor; //!< the Factor the attenuation should have. 45 float attenuationFactor; //!< The Factor the attenuation should have. 46 GLfloat spotDirection[4]; //!< The direction of the Spot Light. 47 GLfloat spotCutoff; //!< The cutoff Angle of the Light Source 46 48 }; 47 49 … … 73 75 void setAttenuation(AttenuationType type, float factor); 74 76 void setAmbientColor(GLfloat r, GLfloat g, GLfloat b); 77 void setSpotDirection(Vector direction); 78 void setSpotCutoff(GLfloat cutoff); 79 75 80 // get Attributes 76 81 Vector getPosition(void);
Note: See TracChangeset
for help on using the changeset viewer.