Changeset 8918 in orxonox.OLD for branches/mountain_lake/src/world_entities/environments/mapped_water.cc
- Timestamp:
- Jun 29, 2006, 6:53:35 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/mountain_lake/src/world_entities/environments/mapped_water.cc
r8916 r8918 21 21 #include "t_animation.h" 22 22 #include "math.h" 23 24 23 #include "glgui.h" 25 26 27 24 #include "shell_command.h" 28 25 … … 56 53 this->calcVerts(); 57 54 58 tempcounter = 0;55 // init gui 59 56 this->box = NULL; 60 57 } … … 100 97 this->move = 0; 101 98 this->move2 = this->move * this->kNormalMapScale; 99 100 // initalize fading bools 101 this->bFadeWaterHeight = false; 102 this->bFadeWaterUV = false; 103 this->bFadeWaterFlow = false; 104 this->bFadeShineSize = false; 105 this->bFadeShineStrength = false; 106 this->bFadeReflStrength = false; 107 this->bFadeRefraction = false; 108 109 this->tempcounter = 0; 102 110 } 103 111 … … 323 331 { 324 332 OrxGui::GLGuiInputLine* waterColorText = new OrxGui::GLGuiInputLine(); 325 waterColorText->setText(" Color");333 waterColorText->setText("WaterColor"); 326 334 waterColorBox->pack(waterColorText); 327 335 … … 335 343 OrxGui::GLGuiSlider* waterColorG = new OrxGui::GLGuiSlider(); 336 344 waterColorG->setRange(0, 1.0f); 337 waterColor R->setStep(0.1f);345 waterColorG->setStep(0.1f); 338 346 waterColorG->setValue(this->waterColor.y); 339 347 waterColorG->connect(SIGNAL(waterColorG, valueChanged), this, SLOT(MappedWater, resetWaterColorG)); … … 342 350 OrxGui::GLGuiSlider* waterColorB = new OrxGui::GLGuiSlider(); 343 351 waterColorB->setRange(0, 1.0f); 344 waterColor R->setStep(0.1f);352 waterColorB->setStep(0.1f); 345 353 waterColorB->setValue(this->waterColor.z); 346 354 waterColorB->connect(SIGNAL(waterColorB, valueChanged), this, SLOT(MappedWater, resetWaterColorB)); 347 355 waterColorBox->pack(waterColorB); 348 349 356 } 350 357 this->box->pack(waterColorBox); … … 440 447 this->box->pack(refractionBox); 441 448 449 OrxGui::GLGuiBox* lightPosBox = new OrxGui::GLGuiBox(OrxGui::Horizontal); 450 { 451 OrxGui::GLGuiInputLine* lightPosText = new OrxGui::GLGuiInputLine(); 452 lightPosText->setText("LightPos"); 453 lightPosBox->pack(lightPosText); 454 455 OrxGui::GLGuiSlider* lightPosX = new OrxGui::GLGuiSlider(); 456 lightPosX->setRange(-600, 600); 457 lightPosX->setValue(this->lightPos.x); 458 lightPosX->setStep(15); 459 lightPosX->connect(SIGNAL(lightPosX, valueChanged), this, SLOT(MappedWater, resetLightPosX)); 460 lightPosBox->pack(lightPosX); 461 462 OrxGui::GLGuiSlider* lightPosY = new OrxGui::GLGuiSlider(); 463 lightPosY->setRange(-600, 600); 464 lightPosY->setStep(15); 465 lightPosY->setValue(this->lightPos.y); 466 lightPosY->connect(SIGNAL(lightPosY, valueChanged), this, SLOT(MappedWater, resetLightPosY)); 467 lightPosBox->pack(lightPosY); 468 469 OrxGui::GLGuiSlider* lightPosZ = new OrxGui::GLGuiSlider(); 470 lightPosZ->setRange(-600, 600); 471 lightPosZ->setStep(15); 472 lightPosZ->setValue(this->lightPos.z); 473 lightPosZ->connect(SIGNAL(lightPosZ, valueChanged), this, SLOT(MappedWater, resetLightPosZ)); 474 lightPosBox->pack(lightPosZ); 475 } 476 this->box->pack(lightPosBox); 477 478 OrxGui::GLGuiBox* waterHeightBox = new OrxGui::GLGuiBox(OrxGui::Horizontal); 479 { 480 OrxGui::GLGuiInputLine* waterHeightText = new OrxGui::GLGuiInputLine(); 481 waterHeightText->setText("WaterHeight"); 482 waterHeightBox->pack(waterHeightText); 483 484 OrxGui::GLGuiSlider* waterHeight = new OrxGui::GLGuiSlider(); 485 waterHeight->setRange(-500, 500); 486 waterHeight->setValue(this->waterHeight); 487 waterHeight->setStep(10); 488 waterHeight->connect(SIGNAL(waterHeight, valueChanged), this, SLOT(MappedWater, setWaterHeight)); 489 waterHeightBox->pack(waterHeight); 490 } 491 this->box->pack(waterHeightBox); 442 492 } 493 443 494 this->box->showAll(); 444 495 this->box->setAbsCoor2D(300, 40); … … 446 497 OrxGui::GLGuiHandler::getInstance()->activateCursor(); 447 498 } 448 449 450 499 } 451 500 … … 598 647 } 599 648 649 if(bFadeWaterHeight) 650 { 651 this->waterHeightFader = new tAnimation<MappedWater>(this, &MappedWater::setWaterHeight); 652 this->waterHeightFader->setInfinity(ANIM_INF_CONSTANT); 653 654 this->waterHeightFader->addKeyFrame(this->waterHeight, this->waterHeightFadeTime, ANIM_LINEAR); 655 this->waterHeightFader->addKeyFrame(this->newWaterHeight, 0, ANIM_LINEAR); 656 657 bFadeWaterHeight = false; 658 this->waterHeightFader->replay(); 659 } 660 600 661 601 662 // if(this->tempcounter == 300) … … 604 665 // this->fadeWaterUV(1, 10); 605 666 // } 606 //if(this->tempcounter == 100)607 //{608 //PRINTF(0)("\n\n\n\n\n\n///////////////////////test waterchangecolor/////////////////////\n\n\n\n\n\n");609 // this->fadeWaterFlow(1, 10);610 //}667 if(this->tempcounter == 100) 668 { 669 PRINTF(0)("\n\n\n\n\n\n///////////////////////test waterchangecolor/////////////////////\n\n\n\n\n\n"); 670 this->fadeWaterHeight(0, 15); 671 } 611 672 //PRINTF(0)("counter %i/n", tempcounter); 612 673 tempcounter++;
Note: See TracChangeset
for help on using the changeset viewer.