Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 15, 2006, 1:43:24 PM (19 years ago)
Author:
amaechler
Message:

atmospheric: void etc bugfixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/atmospheric_engine/src/lib/graphics/effects/rain_effect.h

    r8455 r8457  
    2222
    2323
    24 class RainEffect : public WeatherEffect
    25 {
    26         public:
    27                 RainEffect(const TiXmlElement* root = NULL);
    28                 virtual ~RainEffect();
     24class RainEffect : public WeatherEffect {
     25public:
     26    RainEffect(const TiXmlElement* root = NULL);
     27    virtual ~RainEffect();
    2928
    30                 virtual void loadParams(const TiXmlElement* root);
     29    virtual void loadParams(const TiXmlElement* root);
    3130
    32                 virtual void init();
     31    virtual void init();
    3332
    34                 virtual void activate();
    35                 virtual void deactivate();
     33    virtual void activate();
     34    virtual void deactivate();
    3635
    37                 inline void activateRain() { this->activate(); }
    38                 inline void deactivateRain() { this->deactivate(); }
     36    inline void activateRain() {
     37        this->activate();
     38    }
     39    inline void deactivateRain() {
     40        this->deactivate();
     41    }
    3942
    40                 virtual void tick(float dt);
     43    virtual void tick(float dt);
    4144
    42                 void startRaining();
    43                 void stopRaining();
     45    void startRaining();
     46    void stopRaining();
    4447
    45                 inline void setRainCoord(float x, float y, float z) { this->rainCoord = Vector(x, y, z); }
    46                 inline void setRainSize(float x, float y) { this->rainSize = Vector2D(x, y); }
    47                 inline void setRainRate(float rate) { this->rainRate = rate;}
    48                 inline void setRainVelocity(float velocity) { this->rainVelocity = -velocity; }
    49                 inline void setRainLife(float life) { this->rainLife = life; }
    50                 inline void setRainWind(int force) { this->rainWindForce = force; }
     48    inline void setRainCoord(float x, float y, float z) {
     49        this->rainCoord = Vector(x, y, z);
     50    }
     51    inline void setRainSize(float x, float y) {
     52        this->rainSize = Vector2D(x, y);
     53    }
     54    inline void setRainRate(float rate) {
     55        this->rainRate = rate;
     56    }
     57    inline void setRainVelocity(float velocity) {
     58        this->rainVelocity = -velocity;
     59    }
     60    inline void setRainLife(float life) {
     61        this->rainLife = life;
     62    }
     63    inline void setRainWind(int force) {
     64        this->rainWindForce = force;
     65    }
    5166
    52                 inline void setRainFadeIn(float fadein) { this->rainFadeInDuration = fadein; }
    53                 inline void setRainFadeOut(float fadeout) { this->rainFadeOutDuration = fadeout; }
     67    inline void setRainFadeIn(float fadein) {
     68        this->rainFadeInDuration = fadein;
     69    }
     70    inline void setRainFadeOut(float fadeout) {
     71        this->rainFadeOutDuration = fadeout;
     72    }
    5473
    55                 inline void setRainOption(const std::string& option) {
    56                         if (option == "moverain") this->rainMove = true;
    57                         if (option == "activate") this->rainActivate = true;
    58                 }
     74    inline void setRainOption(const std::string& option) {
     75        if (option == "moverain")
     76            this->rainMove = true;
     77        if (option == "activate")
     78            this->rainActivate = true;
     79    }
    5980
    6081
    61         private:
    62                 static SparkParticles*                  rainParticles;
    63                 ParticleEmitter*                        emitter;
     82private:
     83    static SparkParticles*      rainParticles;
     84    ParticleEmitter*      emitter;
    6485
    65                 GLfloat                                 rainFadeInDuration;
    66                 GLfloat                                 rainFadeOutDuration;
    67                 float                                   localTimer;
     86    GLfloat         rainFadeInDuration;
     87    GLfloat         rainFadeOutDuration;
     88    float         localTimer;
    6889
    69                 Vector                                  rainCoord;
    70                 Vector2D                                rainSize;
    71                 GLfloat                                 rainRate;
    72                 GLfloat                                 rainVelocity;
    73                 GLfloat                                 rainLife;
    74                 GLfloat                                 rainMaxParticles;
    75                 int                                     rainWindForce;
    76                 bool                                    rainMove;
    77                 bool                                    rainActivate;
     90    Vector          rainCoord;
     91    Vector2D        rainSize;
     92    GLfloat         rainRate;
     93    GLfloat         rainVelocity;
     94    GLfloat         rainLife;
     95    GLfloat         rainMaxParticles;
     96    int         rainWindForce;
     97    bool          rainMove;
     98    bool          rainActivate;
    7899
    79                 OrxSound::SoundSource                   soundSource;
    80                 OrxSound::SoundBuffer*                  rainBuffer;
    81                 OrxSound::SoundBuffer*                  windBuffer;
     100    OrxSound::SoundSource     soundSource;
     101    OrxSound::SoundBuffer*      rainBuffer;
     102    OrxSound::SoundBuffer*      windBuffer;
    82103
    83                 float                                   soundRainVolume;
     104    float         soundRainVolume;
    84105
    85                 LightManager*                           lightMan;
    86                 GLfloat                                 rainAmbient;
     106    LightManager*       lightMan;
     107    GLfloat         rainAmbient;
    87108
    88109};
Note: See TracChangeset for help on using the changeset viewer.