Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 29, 2006, 6:13:47 PM (18 years ago)
Author:
stefalie
Message:

mountain_lake: fader gui works, fading also (but its a bit hacky)

File:
1 edited

Legend:

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

    r8906 r8916  
    1 /*!
     1 /*!
    22 * @file mapped_water.h
    33 *  worldentity for flat, cool looking, mapped water
     
    6262  void setWaterAngle(float angle) { this->waterAngle = angle; }
    6363  void setWaterColor(float r, float g, float b) { this->waterColor = Vector(r,g,b); }
    64   void setWaterUV(float uv) { this->waterUV = uv; }
    65   void setWaterFlow(float flow) { this->waterFlow = flow; };
     64  void setWaterUV(float uv) { this->waterUV = uv; this->bFadeWaterUV = false; }
     65  void setWaterFlow(float flow) { this->waterFlow = flow; this->bFadeWaterFlow = false; }
    6666  void setNormalMapScale(float scale) { this->kNormalMapScale = scale; }
    67   void setShineSize(float shine) { this->shineSize = shine; this->newShineSize = shine; }
    68   void setShineStrength(float strength) { this->shineStrength = strength; }
    69   void setReflStrength(float strength) { this->reflStrength = strength; }
    70   void setRefraction(float refraction) { this->refraction = refraction; }
     67  void setShineSize(float shine) { this->shineSize = shine; this->bFadeShineSize = false; }
     68  void setShineStrength(float strength) { this->shineStrength = strength; this->bFadeShineStrength = false; }
     69  void setReflStrength(float strength) { this->reflStrength = strength; this->bFadeReflStrength = false; }
     70  void setRefraction(float refraction) { this->refraction = refraction; this->bFadeRefraction = false;}
    7171
    7272  // functions to change water parameters during runtime
     
    7878  void resetWaterAngle(float angle) { this->setWaterAngle(angle); this->calcVerts(); }
    7979  void resetWaterColor(float r, float g, float b);
    80   void resetWaterColorR(float r);
    81   void resetWaterColorG(float g);
    82   void resetWaterColorB(float b);
     80  void resetWaterColorR(float r) { this->resetWaterColor(r, this->waterColor.y, this->waterColor.z); }
     81  void resetWaterColorG(float g) { this->resetWaterColor(this->waterColor.x, g, this->waterColor.z); }
     82  void resetWaterColorB(float b) { this->resetWaterColor(this->waterColor.x, this->waterColor.y, b); }
    8383  void resetShineSize(float shine);
    8484  void resetShineStrength(float strength);
     
    8686  void resetRefraction(float refraction);
    8787
    88   // fade functions, hacky HACK
    89   void fadeWaterColor(float r, float g, float b, float time) {  }
    90   void fadeShineSize(float shine, float time) {this->newShineSize = shine; this->shineSizeFadeTime = time; }
    91   void fadeLightPos(float x, float y, float z, float time);
     88  // fading functions
     89  void fadeWaterUV(float uv, float time) { this->newWaterUV = uv; this->waterUVFadeTime = time; this->bFadeWaterUV = true; }
     90  void fadeWaterFlow(float flow, float time) { this->newWaterFlow = flow; this->waterFlowFadeTime = time; this->bFadeWaterFlow = true; }
     91  void fadeShineSize(float shine, float time) { this->newShineSize = shine; this->shineSizeFadeTime = time; this->bFadeShineSize = true; }
     92  void fadeShineStrength(float strength, float time) { this->newShineStrength = strength; this->shineStrengthFadeTime = time; this->bFadeShineStrength = true; }
     93  void fadeReflStrength(float strength, float time) { this->newReflStrength = strength; this->reflStrengthFadeTime = time; this->bFadeReflStrength = true; }
     94  void fadeRefraction(float refraction, float time) { this->newRefraction = refraction; this->refractionFadeTime = time; this->bFadeRefraction = true; }
    9295
    9396private:
     
    134137
    135138  // fading
     139  tAnimation<MappedWater>*      waterUVFader;
     140  float                         newWaterUV;
     141  float                         waterUVFadeTime;
     142  bool                          bFadeWaterUV ;
     143  tAnimation<MappedWater>*      waterFlowFader;
     144  float                         newWaterFlow;
     145  float                         waterFlowFadeTime;
     146  bool                          bFadeWaterFlow;
    136147  tAnimation<MappedWater>*      shineSizeFader;
    137148  float                         newShineSize;
    138149  float                         shineSizeFadeTime;
    139150  bool                          bFadeShineSize;
     151  tAnimation<MappedWater>*      shineStrengthFader;
     152  float                         newShineStrength;
     153  float                         shineStrengthFadeTime;
     154  bool                          bFadeShineStrength;
     155  tAnimation<MappedWater>*      reflStrengthFader;
     156  float                         newReflStrength;
     157  float                         reflStrengthFadeTime;
     158  bool                          bFadeReflStrength;
     159  tAnimation<MappedWater>*      refractionFader;
     160  float                         newRefraction;
     161  float                         refractionFadeTime;
     162  bool                          bFadeRefraction;
    140163
    141164  OrxGui::GLGuiBox*             box;
Note: See TracChangeset for help on using the changeset viewer.