Changeset 8884 in orxonox.OLD for branches/mountain_lake/src/world_entities/environments
- Timestamp:
- Jun 28, 2006, 6:21:24 PM (18 years ago)
- Location:
- branches/mountain_lake/src/world_entities/environments
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/mountain_lake/src/world_entities/environments/mapped_water.cc
r8877 r8884 19 19 #include "util/loading/resource_manager.h" 20 20 #include "state.h" 21 #include "t_animation.h" 21 22 #include "math.h" 22 23 … … 39 40 if (root != NULL) 40 41 this->loadParams(root); 42 this->newShineSize = this->shineSize; 43 41 44 42 45 /// initialization of the textures … … 92 95 this->move = 0; 93 96 this->move2 = this->move * this->kNormalMapScale; 94 95 96 97 } 97 98 … … 370 371 this->move += this->waterFlow * dt; 371 372 this->move2 = this->move * this->kNormalMapScale; 372 373 374 // if(this->tempcounter == 100) { 375 // this->resetWaterColor(1, 0, 0); 376 // resetShininess(1); 377 // resetLightPos(0, 50, 0); 378 // PRINTF(0)("test waterchangecolor "); 379 // } 380 // tempcounter++; 373 374 // fading 375 if(this->shineSize != this->newShineSize) 376 { 377 if(bFadeShineSize) 378 { 379 this->shineSizeFader = new tAnimation<MappedWater>(this, &MappedWater::resetShineSize); 380 this->shineSizeFader->setInfinity(ANIM_INF_CONSTANT); 381 382 this->shineSizeFader->addKeyFrame(this->shineSize, this->shineSizeFadeTime, ANIM_LINEAR); 383 this->shineSizeFader->addKeyFrame(this->newShineSize, 0, ANIM_LINEAR); 384 385 bFadeShineSize = false; 386 this->shineSizeFader->replay(); 387 } 388 } 389 390 if(this->tempcounter == 100) 391 { 392 PRINTF(0)("\n\n\n\n\n\n///////////////////////test waterchangecolor/////////////////////\n\n\n\n\n\n"); 393 this->fadeShineSize(1, 10); 394 } 395 //PRINTF(0)("counter %i/n", tempcounter); 396 tempcounter++; 381 397 382 398 // if(this->tempcounter == 100) { -
branches/mountain_lake/src/world_entities/environments/mapped_water.h
r8877 r8884 28 28 #include "shader.h" 29 29 30 // forward declaration 31 template <class T> class tAnimation; 30 32 31 33 class MappedWater : public WorldEntity … … 75 77 // fade functions, hacky HACK 76 78 void fadeWaterColor(float r, float g, float b, float time) {this->newWaterColor = Vector(r, g, b); this->colorFadeTime = time; } 77 void fadeShin iness(float shine, float time);79 void fadeShineSize(float shine, float time) {this->newShineSize = shine; this->shineSizeFadeTime = time; } 78 80 void fadeLightPos(float x, float y, float z, float time); 79 81 … … 120 122 Shader::Uniform* refr_uni; //!< uniform that is used for the strength of the refraction 121 123 124 // fading 125 tAnimation<MappedWater>* shineSizeFader; 126 float newShineSize; 127 float shineSizeFadeTime; 128 bool bFadeShineSize; 129 122 130 // skirmish HACK 123 131 Vector newWaterColor; //!< used to fade the water color
Note: See TracChangeset
for help on using the changeset viewer.