Changeset 7651 in orxonox.OLD for branches/atmospheric_engine/src
- Timestamp:
- May 17, 2006, 4:05:14 PM (19 years ago)
- 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 41 41 42 42 this->init(); 43 43 44 44 if (root != NULL) 45 45 this->loadParams(root); … … 60 60 WeatherEffect::loadParams(root); 61 61 62 63 64 65 66 67 68 69 70 71 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); 72 72 } 73 73 … … 75 75 { 76 76 this->emitter = new PlaneEmitter(); 77 77 78 78 // Default values 79 79 particles = 10000; … … 86 86 randomMass = 0.3; 87 87 rate = 900; 88 velocity = - 200;89 randomVelocity = 0;88 velocity = -100; 89 randomVelocity = 5; 90 90 angle = 0; 91 91 randomAngle = 0.3; … … 93 93 snowSize = Vector2D(1200, 1200); 94 94 snowCoord = Vector(100, 600, 200); 95 95 96 96 activated = false; 97 97 } 98 99 100 98 101 99 bool SnowEffect::activate() … … 159 157 } 160 158 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 35 35 void activateSnow(); 36 36 void deactivateSnow(); 37 37 38 38 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 x Coor, 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 50 50 int particles; 51 51 std::string texture; … … 61 61 62 62 bool activated; 63 63 64 64 static SpriteParticles* snowParticles; 65 65 66 66 PlaneEmitter* emitter; 67 67 };
Note: See TracChangeset
for help on using the changeset viewer.