Changeset 4493 in orxonox.OLD for orxonox/trunk/src/lib/particles/particle_emitter.cc
- Timestamp:
- Jun 3, 2005, 2:10:47 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/lib/particles/particle_emitter.cc
r4478 r4493 37 37 this->emitterSize = 1.0; 38 38 this->direction = direction; 39 this->setInheritSpeed(0); 39 40 this->setSpread(angle); 40 41 this->setEmissionRate(emissionRate); … … 157 158 else 158 159 this->emissionRate = 0.0; 160 } 161 162 /** 163 \brief how much of the speed from the ParticleEmitter should flow onto the ParticleSystem 164 \param value a Value between zero and one 165 166 if you want to change the value of this variable during emission time (to make it more dynamic) 167 you may want to use the animation class 168 */ 169 void ParticleEmitter::setInheritSpeed(float value) 170 { 171 if (unlikely(value > 1.0)) 172 this->inheritSpeed = 1; 173 else if (unlikely(value < 0.0)) 174 this->inheritSpeed = 0; 175 else 176 this->inheritSpeed = value; 159 177 } 160 178 … … 207 225 if (likely(count > 0)) 208 226 { 209 Vector inheritVelocity = this->getVelocity() * system->inheritSpeed;227 Vector inheritVelocity = this->getVelocity() * this->inheritSpeed; 210 228 for (int i = 0; i < count; i++) 211 229 // emmits from EMITTER_DOT, … … 242 260 void ParticleEmitter::debug(void) 243 261 { 244 245 } 262 PRINT(0)(" Emitter %s\n", this->getName()); 263 }
Note: See TracChangeset
for help on using the changeset viewer.