Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8023 in orxonox.OLD for branches/atmospheric_engine


Ignore:
Timestamp:
May 31, 2006, 1:16:43 PM (18 years ago)
Author:
hdavid
Message:

branches/atmospheric_engine: activating/deactivating fogEffect in the oxw-file works,default: deactivate

Location:
branches/atmospheric_engine/src/lib/graphics/effects
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • branches/atmospheric_engine/src/lib/graphics/effects/fog_effect.cc

    r7810 r8023  
    2020#include "glincl.h"
    2121
    22 /*#include "shell_command.h"
    23 SHELL_COMMAND(activateFog, FogEffect, FogEffect::activate)
    24         ->setAlias("aFog");
    25 SHELL_COMMAND(deactivateFog, FogEffect, FogEffect::deactivate)
    26         ->setAlias("dFog");*/
     22#include "shell_command.h"
     23
     24SHELL_COMMAND(activate, FogEffect, activateFog);
     25SHELL_COMMAND(deactivate, FogEffect, deactivateFog);
    2726
    2827using namespace std;
     
    3938                this->loadParams(root);
    4039
    41         this->activate();
     40  if( this->fogActivate )
     41         this->activate();
    4242}
    4343
     
    5757        LoadParam(root, "range", this, FogEffect, setFogRange);
    5858        LoadParam(root, "color", this, FogEffect, setFogColor);
     59  LoadParam(root, "option", this, FogEffect, setFogOption);
    5960}
    6061
     
    6263{
    6364        //default values
     65  this->fogActivate = false;
    6466        this->fogMode = GL_EXP2;
    6567        this->fogDensity = 0.001;
  • branches/atmospheric_engine/src/lib/graphics/effects/fog_effect.h

    r7810 r8023  
    2222                virtual bool activate();
    2323                virtual bool deactivate();
     24   
     25    void activateFog() { this->activate(); }
     26    void deactivateFog() { this->deactivate(); }
    2427
    2528                inline void setFogMode(const std::string& mode) { this->fogMode = this->stringToFogMode(mode); }
     
    2730                inline void setFogRange(float start, float end) { this->fogStart = start; this->fogEnd = end; }
    2831                inline void setFogColor(float r, float g, float b) { this->colorVector = Vector(r, g, b); }
     32    inline void setFogOption(const std::string& option) { if (option == "activate") this->fogActivate = true; }
    2933
    3034        private:
     
    3741                GLfloat                 fogEnd;
    3842                Vector                  colorVector;
     43    bool                     fogActivate;
    3944};
    4045
  • branches/atmospheric_engine/src/lib/graphics/effects/rain_effect.cc

    r8020 r8023  
    153153}
    154154
    155 void RainEffect::activateRain()
    156 {
    157         this->activate();
    158 }
    159 
    160 void RainEffect::deactivateRain()
    161 {
    162         this->deactivate();
    163 }
    164 
    165 
    166155void RainEffect::tick (float dt)
    167156{
  • branches/atmospheric_engine/src/lib/graphics/effects/rain_effect.h

    r8020 r8023  
    3434                virtual bool deactivate();
    3535
    36                 void activateRain();
    37                 void deactivateRain();
     36    void activateRain() { this->activate(); }
     37    void deactivateRain() { this->deactivate(); }
    3838
    3939                virtual void tick(float dt);
  • branches/atmospheric_engine/src/lib/graphics/effects/snow_effect.cc

    r8022 r8023  
    159159}
    160160
    161 void SnowEffect::activateSnow()
    162 {
    163         this->activate();
    164 }
    165 
    166 void SnowEffect::deactivateSnow()
    167 {
    168         this->deactivate();
    169 }
    170 
    171161void SnowEffect::draw() const
    172162{
  • branches/atmospheric_engine/src/lib/graphics/effects/snow_effect.h

    r8022 r8023  
    3636                virtual void tick(float dt);
    3737
    38                 void activateSnow();
    39                 void deactivateSnow();
     38    void activateSnow() { this->activate(); }
     39    void deactivateSnow() { this->deactivate(); }
    4040
    4141                inline void numParticles(int n) { this->particles = n; }
Note: See TracChangeset for help on using the changeset viewer.