Changeset 7576 in orxonox.OLD for branches/atmospheric_engine/src/lib/graphics
- Timestamp:
- May 10, 2006, 5:03:37 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
r7573 r7576 19 19 20 20 #include "glincl.h" 21 #include "debug.h" 21 22 22 23 #include "state.h" … … 25 26 26 27 #include "parser/tinyxml/tinyxml.h" 28 29 //SHELL_COMMAND(activate, SnowEffect, activateSnow); 27 30 28 31 using namespace std; … … 34 37 this->setClassID(CL_SNOW_EFFECT, "SnowEffect"); 35 38 36 // this->snowMode = GL_LINEAR;37 // this->snowDensity = 0.001f;38 // this->snowStart = 10.0f;39 // this->snowEnd = 1000.0f;40 41 39 if (root != NULL) 42 40 this->loadParams(root); … … 46 44 this->activate(); 47 45 } 48 49 46 50 47 … … 69 66 bool SnowEffect::init() 70 67 { 71 Vector2D size; 72 size.x = 1200; 73 size.y = 1200; 74 this->emitter = new PlaneEmitter(size, 900, 40, 5); 68 this->emitter = new PlaneEmitter(); 75 69 } 76 70 … … 80 74 { 81 75 PRINTF(0)("Activating Snow Effect\n"); 82 /*83 SnowEffect::snowParticles = new SpriteParticles( 2000);76 77 SnowEffect::snowParticles = new SpriteParticles(10000); 84 78 SnowEffect::snowParticles->setName("SnowEffectTrailParticles"); 85 SnowEffect::snowParticles->setMaterialTexture("maps/radial-trans-noise.png"); 86 SnowEffect::snowParticles->setLifeSpan(1.0, .3); 87 SnowEffect::snowParticles->setRadius(0.0, .5); 88 SnowEffect::snowParticles->setRadius(0.2, 2.0); 89 SnowEffect::snowParticles->setRadius(.5, .8); 90 SnowEffect::snowParticles->setRadius(1.0, .8); 91 SnowEffect::snowParticles->setColor(0.0, 1,0,0,.7); 92 SnowEffect::snowParticles->setColor(0.2, .8,.8,0,.5); 93 SnowEffect::snowParticles->setColor(0.5, .8,.8,.8,.8); 94 SnowEffect::snowParticles->setColor(1.0, .8,.8,.8,.0); 79 SnowEffect::snowParticles->setMaterialTexture("maps/snow_flake_01_32x32.png"); 80 //SnowEffect::snowParticles->setSize(1); 81 SnowEffect::snowParticles->setLifeSpan(8, 2); 82 SnowEffect::snowParticles->setRadius(0.0, 5.0, 10.0); 83 SnowEffect::snowParticles->setRadius(0.2, 5.0, 10); 84 SnowEffect::snowParticles->setRadius(1.0, 5.0, 10); 85 SnowEffect::snowParticles->setMass(0, 1.0, .3); 86 SnowEffect::snowParticles->setColor(0,1, 1, 1,.5); 87 SnowEffect::snowParticles->setColor(.5, .6, .6, .6, .2); 88 SnowEffect::snowParticles->setColor(1, .0, .0, .0, .0); 89 95 90 96 91 this->emitter->setSystem(SnowEffect::snowParticles); 97 98 this->updateNode(0); 99 this->emitter->setEmissionRate(45.0); 100 this->emitter->setEmissionVelocity(0.0);*/ 92 93 // this->updateNode(0); 94 this->emitter->setEmissionRate(900); 95 this->emitter->setEmissionVelocity(150, 50); 96 this->emitter->setSpread(0, .3); 97 this->emitter->setSize(1200, 1200); 101 98 } 102 99 … … 105 102 { 106 103 PRINTF(0)("Deactivating Snow Effect\n"); 104 105 this->emitter->setSystem(NULL); 107 106 } 108 107 -
branches/atmospheric_engine/src/lib/graphics/effects/snow_effect.h
r7573 r7576 14 14 15 15 class SpriteParticles; 16 class PlaneEmitter; 16 17 17 18 class SnowEffect : public WeatherEffect … … 30 31 virtual void draw() const; 31 32 virtual void tick(float dt); 33 34 void activateSnow(); 32 35 33 36 // inline void setSnowMode(const std::string& mode) { this->snowMode = this->stringToSnowMode(mode); } … … 43 46 static SpriteParticles* snowParticles; 44 47 45 P articleEmitter* emitter;48 PlaneEmitter* emitter; 46 49 }; 47 50
Note: See TracChangeset
for help on using the changeset viewer.