Changeset 7652 in orxonox.OLD for branches/atmospheric_engine/src/lib/graphics/effects/snow_effect.h
- Timestamp:
- May 17, 2006, 6:41:58 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/atmospheric_engine/src/lib/graphics/effects/snow_effect.h
r7651 r7652 1 1 /** 2 3 2 * @file snow_effect.h 3 */ 4 4 5 5 #ifndef _SNOW_EFFECT … … 19 19 class SnowEffect : public WeatherEffect 20 20 { 21 22 23 21 public: 22 SnowEffect(const TiXmlElement* root = NULL); 23 virtual ~SnowEffect(); 24 24 25 25 virtual void loadParams(const TiXmlElement* root); 26 26 27 27 virtual bool init(); 28 28 29 30 29 virtual bool activate(); 30 virtual bool deactivate(); 31 31 32 33 32 virtual void draw() const; 33 virtual void tick(float dt); 34 34 35 36 35 void activateSnow(); 36 void deactivateSnow(); 37 37 38 39 40 41 42 43 44 45 46 47 48 38 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 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 49 50 51 52 53 54 55 56 57 58 59 60 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; 61 61 62 62 bool activated; 63 63 64 64 static SpriteParticles* snowParticles; 65 65 66 66 PlaneEmitter* emitter; 67 67 }; 68 68
Note: See TracChangeset
for help on using the changeset viewer.