Changeset 3599 in orxonox.OLD for orxonox/trunk/src
- Timestamp:
- Mar 18, 2005, 12:44:13 AM (20 years ago)
- Location:
- orxonox/trunk/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/light.cc
r3598 r3599 372 372 void LightManager::setPosition(GLfloat x, GLfloat y, GLfloat z) 373 373 { 374 if (!this->currentLight) 375 { 376 PRINTF(2)("no Light defined yet. Please define at least one light first befor editing.\n"); 377 return; 378 } 374 379 this->currentLight->setPosition(x, y, z); 375 380 } … … 383 388 void LightManager::setDiffuseColor(GLfloat r, GLfloat g, GLfloat b) 384 389 { 390 if (!this->currentLight) 391 { 392 PRINTF(2)("no Light defined yet. Please define at least one light first befor editing.\n"); 393 return; 394 } 385 395 this->currentLight->setDiffuseColor(r,g,b); 386 396 } … … 394 404 void LightManager::setSpecularColor(GLfloat r, GLfloat g, GLfloat b) 395 405 { 406 if (!this->currentLight) 407 { 408 PRINTF(2)("no Light defined yet. Please define at least one light first befor editing.\n"); 409 return; 410 } 396 411 this->currentLight->setSpecularColor(r, g, b); 397 412 } … … 405 420 void LightManager::setAttenuation(float constantAttenuation, float linearAttenuation, float quadraticAttenuation) 406 421 { 422 if (!this->currentLight) 423 { 424 PRINTF(2)("no Light defined yet. Please define at least one light first befor editing.\n"); 425 return; 426 } 407 427 this->currentLight->setAttenuation(constantAttenuation, linearAttenuation, quadraticAttenuation); 408 428 } … … 415 435 void LightManager::setSpotDirection(Vector direction) 416 436 { 437 if (!this->currentLight) 438 { 439 PRINTF(2)("no Light defined yet. Please define at least one light first befor editing.\n"); 440 return; 441 } 417 442 this->currentLight->setSpotDirection(direction); 418 443 } … … 424 449 void LightManager::setSpotCutoff(GLfloat cutoff) 425 450 { 451 if (!this->currentLight) 452 { 453 PRINTF(2)("no Light defined yet. Please define at least one light first befor editing.\n"); 454 return; 455 } 426 456 this->currentLight->setSpotCutoff(cutoff); 427 457 } … … 435 465 if (!this->currentLight) 436 466 { 437 PRINTF( 1)("no Light defined yet\n");467 PRINTF(2)("no Light defined yet\n"); 438 468 return Vector(.0, .0, .0); 439 469 } … … 449 479 { 450 480 if (!this->lights[lightNumber]) 451 return Vector(.0,.0,.0); 481 { 482 PRINTF(2)("no Light defined yet\n"); 483 return Vector(.0,.0,.0); 484 } 452 485 else 453 486 return this->lights[lightNumber]->getPosition(); -
orxonox/trunk/src/track_manager.cc
r3596 r3599 302 302 303 303 304 //////////////////////// /////////////305 ///// TRACKMANAGER ///// /////////////306 //////////////////////// /////////////304 //////////////////////// 305 ///// TRACKMANAGER ///// 306 //////////////////////// 307 307 /** 308 308 \brief standard constructor
Note: See TracChangeset
for help on using the changeset viewer.