Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

branches/atmosphere_engine: cosmetics

File:
1 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 }
Note: See TracChangeset for help on using the changeset viewer.