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/snow_effect.h

    r8455 r8457  
    2020#include "sound_buffer.h"
    2121
    22 class SnowEffect : public WeatherEffect
    23 {
    24         public:
    25                 SnowEffect(const TiXmlElement* root = NULL);
    26                 virtual ~SnowEffect();
     22class SnowEffect : public WeatherEffect {
     23public:
     24    SnowEffect(const TiXmlElement* root = NULL);
     25    virtual ~SnowEffect();
    2726
    28                 virtual void loadParams(const TiXmlElement* root);
     27    virtual void loadParams(const TiXmlElement* root);
    2928
    30                 virtual void init();
     29    virtual void init();
    3130
    32                 virtual void activate();
    33                 virtual void deactivate();
     31    virtual void activate();
     32    virtual void deactivate();
    3433
    35                 inline void activateSnow() { this->activate(); }
    36                 inline void deactivateSnow() { this->deactivate(); }
    37                
    38                 virtual void draw() const;
    39                 virtual void tick(float dt);
     34    inline void activateSnow() {
     35        this->activate();
     36    }
     37    inline void deactivateSnow() {
     38        this->deactivate();
     39    }
     40
     41    virtual void draw() const;
     42    virtual void tick(float dt);
    4043
    4144
    42                 inline void numParticles(int n) { this->particles = n; }
    43                 inline void materialTexture(const std::string& texture) { this->texture = texture; }
    44                 inline void lifeSpan(float lifeSpan, float randomLifeSpan) { this->life = lifeSpan; this->randomLife = randomLifeSpan; }
    45                 inline void radius(float radius, float randomRadius) { this->snowRadius = radius; this->randomRadius = randomRadius; }
    46                 inline void mass(float mass, float randomMass) { this->snowMass = mass; this->randomMass = randomMass; }
    47                 inline void emissionRate(float emissionRate){ this->rate = emissionRate; }
    48                 inline void emissionVelocity(float velocity, float randomVelocity){ this->velocity = velocity; this->randomVelocity = randomVelocity; }
    49                 inline void size(float sizeX, float sizeY) { this->snowSize = Vector2D(sizeX, sizeY); }
    50                 inline void coord(float x, float y, float z) { this->snowCoord = Vector(x, y, z); }
    51                 inline void wind(int force) { this->snowWindForce = force; }
     45    inline void numParticles(int n) {
     46        this->particles = n;
     47    }
     48    inline void materialTexture(const std::string& texture) {
     49        this->texture = texture;
     50    }
     51    inline void lifeSpan(float lifeSpan, float randomLifeSpan) {
     52        this->snowLife = lifeSpan;
     53        this->randomLife = randomLifeSpan;
     54    }
     55    inline void radius(float radius, float randomRadius) {
     56        this->snowRadius = radius;
     57        this->randomRadius = randomRadius;
     58    }
     59    inline void mass(float mass, float randomMass) {
     60        this->snowMass = mass;
     61        this->randomMass = randomMass;
     62    }
     63    inline void emissionRate(float emissionRate) {
     64        this->rate = emissionRate;
     65    }
     66    inline void emissionVelocity(float velocity, float randomVelocity) {
     67        this->velocity = velocity;
     68        this->randomVelocity = randomVelocity;
     69    }
     70    inline void size(float sizeX, float sizeY) {
     71        this->snowSize = Vector2D(sizeX, sizeY);
     72    }
     73    inline void coord(float x, float y, float z) {
     74        this->snowCoord = Vector(x, y, z);
     75    }
     76    inline void wind(int force) {
     77        this->snowWindForce = force;
     78    }
    5279
    53                 inline void setSnowOption(const std::string& option) {
    54                         /*if (option == "fade") this->snowFade = true;*/
    55                         if (option == "movesnow") this->snowMove = true;
    56                         if (option == "activate") this->snowActivate = true;
    57                 }
     80    inline void setSnowOption(const std::string& option) {
     81        /*if (option == "fade") this->snowFade = true;*/
     82        if (option == "movesnow")
     83            this->snowMove = true;
     84        if (option == "activate")
     85            this->snowActivate = true;
     86    }
    5887
    5988
    60         private:
    61                 int                             particles;
    62                 std::string                     texture;
    63                 float                           life, randomLife;
    64                 float                           snowRadius, randomRadius;
    65                 float                           snowMass, randomMass;
    66                 float                           rate;
    67                 float                           velocity, randomVelocity;
    68                 float                           angle, randomAngle;
    69                 float                           alpha;
    70                 Vector                          snowCoord;
    71                 Vector2D                        snowSize;
    72                 int                             snowWindForce;
     89private:
     90    int         particles;
     91    std::string       texture;
     92    float       snowLife, randomLife;
     93    float       snowRadius, randomRadius;
     94    float       snowMass, randomMass;
     95    float         rate;
     96    float         velocity, randomVelocity;
     97    float         angle, randomAngle;
     98    float         alpha;
     99    Vector        snowCoord;
     100    Vector2D      snowSize;
     101    int       snowWindForce;
    73102
    74                 bool                            snowMove;
    75                 bool                            snowActivate;
     103    bool        snowMove;
     104    bool        snowActivate;
    76105
    77                 PlaneEmitter*                   emitter;
     106    PlaneEmitter*     emitter;
    78107
    79                 static SpriteParticles*         snowParticles;
    80                 OrxSound::SoundSource           soundSource;
    81                 OrxSound::SoundBuffer*          windBuffer;
     108    static SpriteParticles*   snowParticles;
     109    OrxSound::SoundSource   soundSource;
     110    OrxSound::SoundBuffer*    windBuffer;
    82111
    83112};
Note: See TracChangeset for help on using the changeset viewer.