Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 28, 2006, 3:07:55 PM (19 years ago)
Author:
stefalie
Message:

mountain_lake: rotating of the water works

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/mountain_lake/src/world_entities/environments/mapped_water.h

    r8848 r8859  
    4545  // functions to set parameters for the water, usually they're called through loadparam
    4646  void setLightPos(float x, float y, float z) { this->lightPos = Vector(x,y,z); }
    47   void setWaterPos(float x, float y, float z) { this->waterPos = Vector(x,y,z); }
     47  void setWaterPos(float x, float y, float z) { this->waterHeight = y; this->waterVerts[0] = x; this->waterVerts[1] = z; }
    4848  void setWaterSize(float x, float z) { this->xWidth = x; this->zWidth = z; }
    4949  void setWaterAngle(float angle) { this->waterAngle = angle; }
     
    5959  void resetShininess(float shine);
    6060  void resetLightPos(float x, float y, float z);
     61  void resetWaterPos(float x, float y, float z) { this->setWaterPos(x, y, z); this->calcVerts(); }
     62  void resetWaterSize(float x, float z) { this->setWaterSize(x, z); this->calcVerts(); }
     63  void resetWaterAngle(float angle) { this->setWaterAngle(angle); this->calcVerts(); }
    6164
    6265  // fade functions
     
    6972  void initTextures();
    7073  void initShaders();
     74  void calcVerts();
    7175
    7276private:
    73   Vector              waterPos;               //!< position of the water
     77  float               waterHeight;            //!< position of the water
     78  float               waterVerts[8];          //!< coords of the 4 vertexes of the water quad
    7479  float               xWidth, zWidth;         //!< size of the water quad
    75   float               waterVerts[8];       //!< coords of the 4 vertexes of the water quad
    7680  Vector              lightPos;               //!< position of the light that is used to render the reflection
    7781  float               waterAngle;             //!< defines how much the water will be turned around the point waterPos
    7882  Vector              waterColor;             //!< color of the water
    79 
    80   Vector              newWaterColor;          //!< used to fade the water color
    81   float               colorFadeTime;
    8283
    8384  float               move;
     
    9697  Shader::Uniform*    color_uni;              //!< uniform that is used for the watercolor
    9798  Shader::Uniform*    shine_uni;              //!< uniform that is used for the specular shininessd of the water
    98  
    99  
     99
     100
     101
     102  Vector              newWaterColor;          //!< used to fade the water color
     103  float               colorFadeTime;
    100104  int tempcounter;
    101105};
Note: See TracChangeset for help on using the changeset viewer.