Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7651 in orxonox.OLD for branches/atmospheric_engine/src


Ignore:
Timestamp:
May 17, 2006, 4:05:14 PM (19 years ago)
Author:
amaechler
Message:

branches/atmosphere_engine: cosmetics

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

Legend:

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

    r7650 r7651  
    4141
    4242  this->init();
    43  
     43
    4444  if (root != NULL)
    4545    this->loadParams(root);
     
    6060  WeatherEffect::loadParams(root);
    6161
    62    LoadParam(root, "numParticles", this, SnowEffect, numParticles);
    63    LoadParam(root, "materialTexture", this, SnowEffect, materialTexture);
    64    LoadParam(root, "lifeSpans", this, SnowEffect, lifeSpan);
    65    LoadParam(root, "radius", this, SnowEffect, radius);
    66    LoadParam(root, "mass", this, SnowEffect, mass);
    67    LoadParam(root, "emissionRate", this, SnowEffect, emissionRate);
    68    LoadParam(root, "emissionVelocity", this, SnowEffect, emissionVelocity);
    69    LoadParam(root, "spread", this, SnowEffect, spread);
    70    LoadParam(root, "size", this, SnowEffect, size);
    71    LoadParam(root, "coord", this, SnowEffect, coord);
     62  LoadParam(root, "numParticles", this, SnowEffect, numParticles);
     63  LoadParam(root, "materialTexture", this, SnowEffect, materialTexture);
     64  LoadParam(root, "lifeSpans", this, SnowEffect, lifeSpan);
     65  LoadParam(root, "radius", this, SnowEffect, radius);
     66  LoadParam(root, "mass", this, SnowEffect, mass);
     67  LoadParam(root, "emissionRate", this, SnowEffect, emissionRate);
     68  LoadParam(root, "emissionVelocity", this, SnowEffect, emissionVelocity);
     69  LoadParam(root, "spread", this, SnowEffect, spread);
     70  LoadParam(root, "size", this, SnowEffect, size);
     71  LoadParam(root, "coord", this, SnowEffect, coord);
    7272}
    7373
     
    7575{
    7676  this->emitter = new PlaneEmitter();
    77  
     77
    7878  // Default values
    7979  particles = 10000;
     
    8686  randomMass = 0.3;
    8787  rate = 900;
    88   velocity = -200;
    89   randomVelocity = 0;
     88  velocity = -100;
     89  randomVelocity = 5;
    9090  angle = 0;
    9191  randomAngle = 0.3;
     
    9393  snowSize = Vector2D(1200, 1200);
    9494  snowCoord = Vector(100, 600, 200);
    95  
     95
    9696  activated = false;
    9797}
    98 
    99 
    10098
    10199bool SnowEffect::activate()
     
    159157}
    160158
    161 void SnowEffect::numParticles(int n)
    162 {
    163   this->particles = n;
    164 }
    165 
    166 void SnowEffect::materialTexture(const std::string& texture)
    167 {
    168   this->texture = texture;
    169 }
    170 
    171 void SnowEffect::lifeSpan(float lifeSpan, float randomLifeSpan)
    172 {
    173   this->life = lifeSpan;
    174   this->randomLife = randomLifeSpan;
    175 }
    176 
    177 void SnowEffect::radius(float radius, float randomRadius)
    178 {
    179   this->snowRadius = radius;
    180   this->randomRadius = randomRadius;
    181 }
    182 
    183 void SnowEffect::mass(float mass, float randomMass)
    184 {
    185   this->snowMass = mass;
    186   this->randomMass = randomMass;
    187 }
    188 
    189 void SnowEffect::emissionRate(float emissionRate)
    190 {
    191   this->rate = emissionRate;
    192 }
    193 
    194 void SnowEffect::emissionVelocity(float velocity, float randomVelocity)
    195 {
    196   this->velocity = velocity;
    197   this->randomVelocity = randomVelocity;
    198 }
    199 
    200 void SnowEffect::spread(float angle, float randomAngle)
    201 {
    202   this->angle = angle;
    203   this->randomAngle = randomAngle;
    204 }
    205 
    206 void SnowEffect::size(float sizeX, float sizeY)
    207 {
    208   this->snowSize = Vector2D(sizeX, sizeY);
    209 }
    210 
    211 void SnowEffect::coord( float coorX, float coorY, float coorZ)
    212 {
    213   this->snowCoord = Vector(coorX, coorY, coorZ);
    214 }
  • branches/atmospheric_engine/src/lib/graphics/effects/snow_effect.h

    r7650 r7651  
    3535    void activateSnow();
    3636    void deactivateSnow();
    37    
     37
    3838  private:
    39     void numParticles(int n);
    40     void materialTexture(const std::string& texture);
    41     void lifeSpan(float lifeSpan, float randomLifeSpan);
    42     void radius(float radius, float randomRadius);
    43     void mass(float mass, float randomMass);
    44     void emissionRate(float emissionRate);
    45     void emissionVelocity(float velocity, float randomVelocity);
    46     void spread(float angle, float randomAngle);
    47     void size(float sizeX, float sizeY);
    48     void coord(float xCoor, float yCoor, float zCoor);
    49    
     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 spread(float angle, float randomAngle) { this->angle = angle; this->randomAngle = randomAngle; }
     47    void size(float sizeX, float sizeY) { this->snowSize = Vector2D(sizeX, sizeY); }
     48    void coord(float x, float y, float z) { this->snowCoord = Vector(x, y, z); }
     49
    5050    int particles;
    5151    std::string texture;
     
    6161
    6262    bool activated;
    63    
     63
    6464    static SpriteParticles* snowParticles;
    65    
     65
    6666    PlaneEmitter*          emitter;
    6767};
Note: See TracChangeset for help on using the changeset viewer.