Changeset 7685 in orxonox.OLD for branches/atmospheric_engine/src
- Timestamp:
- May 18, 2006, 3:07:45 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/rain_effect.cc
r7682 r7685 67 67 LoadParam(root, "life", this, RainEffect, setRainLife); 68 68 LoadParam(root, "wind", this, RainEffect, setRainWind); 69 70 // LOAD_PARAM_START_CYCLE(root, element); 71 // { 72 // element->ToText(); 73 // LoadParam_CYCLE(element, "option", this, RainEffect, setRainOption); 74 // } 75 // LOAD_PARAM_END_CYCLE(element); 76 69 LoadParam(root, "option", this, RainEffect, setRainOption); 77 70 } 78 71 … … 87 80 this->rainLife = 4; 88 81 this->rainMaxParticles = this->rainRate * this->rainLife; 82 this->rainWindForce = 0; 89 83 90 84 this->emitter = new PlaneEmitter(this->rainSize); … … 119 113 this->emitter->setEmissionVelocity(this->rainVelocity); 120 114 121 this->emitter->setSpread(this->rainWindForce / 5 ,.2);115 this->emitter->setSpread(this->rainWindForce / 50, 0.2); 122 116 123 117 this->soundSource.loop(this->rainBuffer); … … 136 130 { 137 131 //float distance = (State::getCameraNode()->getAbsCoor() - rainCoord).len(); 138 139 132 // PRINTF(0)( "RainEffect, coords: %f, %f, %f\n", this->rainCoord.x, this->rainCoord.y, this->rainCoord.z ); 140 133 141 //if (this->rainMove) {142 //PRINTF(0)( "Moving Rain" );143 //this->rainCoord = State::getCameraNode()->getAbsCoor();144 //this->emitter->setRelCoor(this->rainCoord.x +150, this->rainCoord.y+700, this->rainCoord.z+150);145 //}134 if (this->rainMove) { 135 PRINTF(0)( "Moving Rain" ); 136 this->rainCoord = State::getCameraNode()->getAbsCoor(); 137 this->emitter->setRelCoor(this->rainCoord.x +150, this->rainCoord.y+700, this->rainCoord.z+150); 138 } 146 139 } -
branches/atmospheric_engine/src/lib/graphics/effects/rain_effect.h
r7682 r7685 8 8 #include "vector.h" 9 9 #include "vector2D.h" 10 #include <string> 10 11 11 12 #include "particle_system.h" … … 41 42 inline void setRainLife(float life) { this->rainLife = life; } 42 43 inline void setRainWind(int force) { this->rainWindForce = force; } 43 44 inline void setRainOption(string option) { 45 PRINTF(0)( "setting move true\n"); 46 this->rainMove = true; 47 } 44 inline void setRainOption(const std::string& option) { if (option == "moverain") this->rainMove = true; } 48 45 49 46
Note: See TracChangeset
for help on using the changeset viewer.