Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8848 in orxonox.OLD for branches


Ignore:
Timestamp:
Jun 28, 2006, 1:36:56 PM (18 years ago)
Author:
stefalie
Message:

mountain_lake: added coords for all 4 verts…

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

    r8828 r8848  
    4545  /// initialization of the shaders
    4646  this->initShaders();
    47  
     47
     48  /// calculation of the 4 verts of the water quad
     49  this->waterVerts[0] = this->waterPos.x;
     50  this->waterVerts[1] = this->waterPos.z;
     51  this->waterVerts[2] = this->waterVerts[0] + cos(this->waterAngle) * this->xWidth;
     52  this->waterVerts[3] = this->waterVerts[1] + sin(this->waterAngle) * this->xWidth;
     53  this->waterVerts[2] = this->waterVerts[0] - sin(this->waterAngle) * this->zWidth;
     54  this->waterVerts[3] = this->waterVerts[1] + cos(this->waterAngle) * this->zWidth;
     55  this->waterVerts[2] = this->waterVerts[0] + cos(this->waterAngle) * this->xWidth - sin(this->waterAngle) * this->zWidth;
     56  this->waterVerts[3] = this->waterVerts[1] + sin(this->waterAngle) * this->xWidth + cos(this->waterAngle) * this->zWidth;
     57
    4858  tempcounter = 0;
    4959}
     
    300310//   tempcounter++;
    301311
    302   if(this->tempcounter == 10) {
    303     this->fadeWaterColor(1, 0, 0, 10);
    304 
    305     PRINTF(0)("test waterchangecolor ");
    306     }
    307   tempcounter++;
    308 
    309   if(this->newWaterColor != this->waterColor)
    310   {
    311     float time = this->colorFadeTime / dt;
    312     float x = (this->newWaterColor.x - this->waterColor.x) * time +this->waterColor.x;
    313     float y = (this->newWaterColor.y - this->waterColor.y) * time +this->waterColor.y;
    314     float z = (this->newWaterColor.z - this->waterColor.z) * time +this->waterColor.z;
    315 
    316     this->colorFadeTime -= dt;
    317     this->resetWaterColor(x, y, z);
    318   }
    319    
     312//   if(this->tempcounter == 100) {
     313//     this->fadeWaterColor(1, 0, 0, 10);
     314//
     315//     PRINTF(0)("test waterchangecolor ");
     316//     }
     317//   tempcounter++;
     318//
     319//   if(this->newWaterColor != this->waterColor)
     320//   {
     321//     float dtime = this->colorFadeTime / dt;
     322//     Vector temp = (this->newWaterColor - this->waterColor) * dtime + this->waterColor;
     323//
     324//     temp.debug();
     325//
     326//     this->colorFadeTime -= dt;
     327//     this->resetWaterColor(temp.x, temp.y, temp.z);
     328//   }
    320329}
    321330
  • branches/mountain_lake/src/world_entities/environments/mapped_water.h

    r8828 r8848  
    7373  Vector              waterPos;               //!< position of the water
    7474  float               xWidth, zWidth;         //!< size of the water quad
     75  float               waterVerts[8];       //!< coords of the 4 vertexes of the water quad
    7576  Vector              lightPos;               //!< position of the light that is used to render the reflection
    7677  float               waterAngle;             //!< defines how much the water will be turned around the point waterPos
Note: See TracChangeset for help on using the changeset viewer.