Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 18, 2006, 4:25:18 PM (19 years ago)
Author:
amaechler
Message:

branches/atmospheric_engine: bug fixes and cleanup

File:
1 edited

Legend:

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

    r7683 r7696  
    1616class PlaneEmitter;
    1717class PNode;
     18
     19#include "sound_buffer.h"
     20#include "sound_source.h"
    1821
    1922class SnowEffect : public WeatherEffect
     
    3639                void deactivateSnow();
    3740
     41                inline void numParticles(int n) { this->particles = n; }
     42                inline void materialTexture(const std::string& texture) { this->texture = texture; }
     43                inline void lifeSpan(float lifeSpan, float randomLifeSpan) { this->life = lifeSpan; this->randomLife = randomLifeSpan; }
     44                inline void radius(float radius, float randomRadius) { this->snowRadius = radius; this->randomRadius = randomRadius; }
     45                inline void mass(float mass, float randomMass) { this->snowMass = mass; this->randomMass = randomMass; }
     46                inline void emissionRate(float emissionRate){ this->rate = emissionRate; }
     47                inline void emissionVelocity(float velocity, float randomVelocity){ this->velocity = velocity; this->randomVelocity = randomVelocity; }
     48                inline void size(float sizeX, float sizeY) { this->snowSize = Vector2D(sizeX, sizeY); }
     49                inline void coord(float x, float y, float z) { this->snowCoord = Vector(x, y, z); }
     50    inline void wind(int force) { this->snowWindForce = force; }
     51
     52
    3853        private:
    39                 void numParticles(int n) { this->particles = n; }
    40                 void materialTexture(const std::string& texture) { this->texture = texture; }
    41                 void lifeSpan(float lifeSpan, float randomLifeSpan) { this->life = lifeSpan; this->randomLife = randomLifeSpan; }
    42                 void radius(float radius, float randomRadius) { this->snowRadius = radius; this->randomRadius = randomRadius; }
    43                 void mass(float mass, float randomMass) { this->snowMass = mass; this->randomMass = randomMass; }
    44                 void emissionRate(float emissionRate){ this->rate = emissionRate; }
    45                 void emissionVelocity(float velocity, float randomVelocity){ this->velocity = velocity; this->randomVelocity = randomVelocity; }
    46                 void size(float sizeX, float sizeY) { this->snowSize = Vector2D(sizeX, sizeY); }
    47                 void coord(float x, float y, float z) { this->snowCoord = Vector(x, y, z); }
    48     void wind(int force) { this->angle = angle*force; this->randomAngle = randomAngle*force; }
     54                int                                                                                                                             particles;
     55                std::string                                                                                             texture;
     56                float                                                                                                                   life, randomLife;
     57                float                                                                                                                           snowRadius, randomRadius;
     58                float                                                                                                                           snowMass, randomMass;
     59                float                                                                                                                   rate;
     60                float                                                                                                                   velocity, randomVelocity;
     61                float                                                                                                                   angle, randomAngle;
     62                float                                                                                                                   alpha;
     63                Vector                                                                                                                  snowCoord;
     64                Vector2D                                                                                                                snowSize;
     65                int                                                                                                                                     snowWindForce;
    4966
    50                 int particles;
    51                 std::string texture;
    52                 float life, randomLife;
    53                 float snowRadius, randomRadius;
    54                 float snowMass, randomMass;
    55                 float rate;
    56                 float velocity, randomVelocity;
    57                 float angle, randomAngle;
    58                 float alpha;
    59                 Vector snowCoord;
    60                 Vector2D snowSize;
     67                bool                                                                                                                            activated;
    6168
    62                 bool activated;
     69                PlaneEmitter*                                                                                           emitter;
    6370
    64                 static SpriteParticles* snowParticles;
     71                static SpriteParticles*                                                 snowParticles;
    6572
    66                 PlaneEmitter*          emitter;
     73                SoundSource                                                                                                     soundSource;
     74                SoundBuffer*                                                                                            windBuffer;
    6775};
    6876
Note: See TracChangeset for help on using the changeset viewer.