Changeset 3442 in orxonox.OLD for orxonox/trunk
- Timestamp:
- Mar 1, 2005, 10:04:01 PM (20 years ago)
- Location:
- orxonox/trunk/src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/base_object.cc
r3365 r3442 40 40 } 41 41 42 char* BaseObject::getClassName(void) const 43 { 44 return className; 45 } 42 46 43 47 bool BaseObject::isA (char* className) -
orxonox/trunk/src/base_object.h
r3365 r3442 18 18 19 19 void setClassName (char* className); 20 char* getClassName(void) const; 20 21 bool isA (char* className); 21 22 -
orxonox/trunk/src/light.cc
r3441 r3442 311 311 return Vector(this->currentLight->lightPosition[0], this->currentLight->lightPosition[1], this->currentLight->lightPosition[2]); 312 312 } 313 314 315 /** 316 \brief outputs debug information about the Class and its lights 317 */ 318 void Light::debug(void) 319 { 320 PRINT(0)("=================================\n"); 321 PRINT(0)("= DEBUG INFORMATION CLASS LIGHT =\n"); 322 PRINT(0)("=================================\n"); 323 PRINT(0)("Reference: %p\n", Light::singletonRef); 324 if (this->currentLight) 325 PRINT(0)("current Light Nr: %d\n", this->currentLight->lightNumber); 326 PRINT(0)("Ambient Color: %f:%f:%f\n", this->ambientColor[0], this->ambientColor[0], this->ambientColor[0]); 327 PRINT(0)("=== Lights ===\n"); 328 for (int i = 0; i < NUMBEROFLIGHTS; i++) 329 if (this->lights[i]) 330 { 331 PRINT(0)(":: %d :: -- reference %p\n", i, lights[i]); 332 if (i != lights[i]->lightNumber) 333 PRINTF(1)(" Lights are out of sync, this really should not happen,\n %d % should be equal.\n", i, lights[i]->lightNumber); 334 PRINT(0)(" Position: %f/%f/%f\n", lights[i]->lightPosition[0], lights[i]->lightPosition[1], lights[i]->lightPosition[2]); 335 PRINT(0)(" DiffuseColor: %f/%f/%f\n", lights[i]->diffuseColor[0], lights[i]->diffuseColor[1], lights[i]->diffuseColor[2]); 336 PRINT(0)(" SpecularColor: %f/%f/%f\n", lights[i]->specularColor[0], lights[i]->specularColor[1], lights[i]->specularColor[2]); 337 PRINT(0)(" Attenuation: "); 338 switch (lights[i]->attenuationType) 339 { 340 case CONSTANT: 341 PRINT(0)("constant"); 342 case LINEAR: 343 PRINT(0)("linear"); 344 break; 345 case QUADRATIC: 346 PRINT(0)("quadratic"); 347 break; 348 } 349 PRINT(0)(" with Factor %f\n", lights[i]->attenuationFactor); 350 } 351 PRINT(0)("--------------------------------\n"); 352 } -
orxonox/trunk/src/light.h
r3441 r3442 38 38 AttenuationType attenuationType;//!< The AttenuationType of this Light. 39 39 float attenuationFactor; //!< the Factor the attenuation should have. 40 41 LightValue* next;42 40 }; 43 41 … … 71 69 // get Attributes 72 70 Vector getPosition(void); 71 72 void debug(void); 73 73 }; 74 74 -
orxonox/trunk/src/world.cc
r3441 r3442 172 172 void World::load() 173 173 { 174 // LIGHT initialisation 174 175 light = Light::getInstance(); 175 176 light->addLight(0); 176 177 light->setAttenuation(QUADRATIC, 1.0); 177 light->setPosition(10.0, 100.0, 19.0); 178 light->setPosition(20.0, 10.0, 20.0); 179 light->setDiffuseColor(1,1,1); 180 // light->addLight(1); 181 // light->setPosition(20, 10, -20); 182 // light->setDiffuseColor(0,0,0); 183 light->debug(); 178 184 179 185 // BezierCurve* tmpCurve = new BezierCurve();
Note: See TracChangeset
for help on using the changeset viewer.