Changeset 9235 in orxonox.OLD for trunk/src/world_entities/environments
- Timestamp:
- Jul 5, 2006, 4:39:02 PM (18 years ago)
- Location:
- trunk/src/world_entities/environments
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/world_entities/environments/mapped_water.cc
r9110 r9235 337 337 { 338 338 // it's not too nice, but it works fine 339 PRINTF(0)("\nMappedWater XML Code:\n<MappedWater>\n <waterpos>%f, %f, %f</waterpos>\n <watersize>%f, %f</watersize>\n <wateruv>%f</wateruv>\n <waterflow>%f</waterflow>\n <lightpos>%f, %f, %f</lightpos>\n <waterangle>%f</waterangle>\n <normalmapscale>%f</normalmapscale>\n <shinesize>%f</waterpos>\n <shinestrength>%f</shinestrength>\n <reflstrength>%f</reflstrength>\n <refraction>%f</refraction>\n <watercolor>%f, %f, %f</watercolor>\n</MappedWater>\n", this->waterVerts[0], this->waterHeight, this->waterVerts[1], this->xWidth, this->zWidth, this->waterUV, this->waterFlow, this->lightPos.x, this->lightPos.y, this->lightPos.z, this->waterAngle, this->kNormalMapScale, this->shineSize, this->shineStrength, this->reflStrength, this->refraction, this->waterColor.x, this->waterColor.y, this->waterColor.z); 339 PRINT(0)("\nMappedWater XML Code:\n<MappedWater>\n"); 340 341 PRINT(0)(" <waterpos>%f, %f, %f</waterpos>\n", this->waterVerts[0], this->waterHeight, this->waterVerts[1]); 342 PRINT(0)(" <watersize>%f, %f</watersize>\n", this->xWidth, this->zWidth); 343 PRINT(0)(" <wateruv>%f</wateruv>\n", this->waterUV); 344 PRINT(0)(" <waterflow>%f</waterflow>\n", this->waterFlow); 345 PRINT(0)(" <lightpos>%f, %f, %f</lightpos>\n", this->lightPos.x, this->lightPos.y, this->lightPos.z); 346 PRINT(0)(" <waterangle>%f</waterangle>\n", this->waterAngle); 347 PRINT(0)(" <normalmapscale>%f</normalmapscale>\n", this->kNormalMapScale); 348 PRINT(0)(" <shinesize>%f</shinesize>\n", this->shineSize); 349 PRINT(0)(" <shinestrength>%f</shinestrength>\n", this->shineStrength); 350 PRINT(0)(" <reflstrength>%f</reflstrength>\n", this->reflStrength); 351 PRINT(0)(" <refraction>%f</refraction>\n", this->refraction); 352 PRINT(0)(" <watercolor>%f, %f, %f</watercolor>\n", this->waterColor.x, this->waterColor.y, this->waterColor.z); 353 354 PRINT(0)("</MappedWater>\n"); 340 355 } 341 356 … … 475 490 476 491 OrxGui::GLGuiSlider* lightPosX = new OrxGui::GLGuiSlider(); 477 lightPosX->setRange(- 600, 600);492 lightPosX->setRange(-4000, 4000); 478 493 lightPosX->setValue(this->lightPos.x); 479 494 lightPosX->setStep(15); … … 482 497 483 498 OrxGui::GLGuiSlider* lightPosY = new OrxGui::GLGuiSlider(); 484 lightPosY->setRange(- 600, 600);499 lightPosY->setRange(-4000, 4000); 485 500 lightPosY->setStep(15); 486 501 lightPosY->setValue(this->lightPos.y); … … 489 504 490 505 OrxGui::GLGuiSlider* lightPosZ = new OrxGui::GLGuiSlider(); 491 lightPosZ->setRange(- 600, 600);506 lightPosZ->setRange(-4000, 4000); 492 507 lightPosZ->setStep(15); 493 508 lightPosZ->setValue(this->lightPos.z); … … 504 519 505 520 OrxGui::GLGuiSlider* waterHeight = new OrxGui::GLGuiSlider(); 506 waterHeight->setRange( -500, 500);521 waterHeight->setRange(100, 370); 507 522 waterHeight->setValue(this->waterHeight); 508 waterHeight->setStep( 10);523 waterHeight->setStep(4); 509 524 waterHeight->connect(SIGNAL(waterHeight, valueChanged), this, SLOT(MappedWater, setWaterHeight)); 510 525 waterHeightBox->pack(waterHeight); … … 547 562 glDisable(GL_BLEND); 548 563 564 // TODO change texture coords, so water doesnt look distorted when xWidth != zWidth 549 565 glBegin(GL_QUADS); 550 566 // The back left vertice for the water -
trunk/src/world_entities/environments/model_entity.cc
r7193 r9235 32 32 { 33 33 this->setClassID(CL_MODEL_ENTITY, "ModelEntity"); 34 this->toList(OM_ENVIRON _NOTICK);34 this->toList(OM_ENVIRON); 35 35 36 36 this->speed = NULL; … … 71 71 void ModelEntity::setMomentum (float angle, float x, float y, float z) 72 72 { 73 Vector v(x,y,z); 74 v.debug(); 75 v.normalize(); 76 v.debug(); 77 73 78 if (this->momentum == NULL) 74 79 this->momentum = new Quaternion; 75 *this->momentum = Quaternion(angle, Vector(x, y, z)); 80 *this->momentum = Quaternion(angle, v); 81 82 this->momentum->debug(); 76 83 } 77 84 … … 82 89 83 90 if (this->momentum != NULL) 84 this->shiftDir(*this->momentum * dt); 91 { 92 this->shiftDir((*this->momentum * dt ).getNormalized()); 93 //this->getAbsDir().debug(); 94 } 85 95 }
Note: See TracChangeset
for help on using the changeset viewer.