Changeset 4378 in orxonox.OLD for orxonox/trunk/src/lib/graphics/particles/particle_system.cc
- Timestamp:
- May 29, 2005, 2:02:56 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/lib/graphics/particles/particle_system.cc
r4377 r4378 56 56 this->setType(type, 1); 57 57 this->setColor(1.0,1.0,1.0,1.0, .5,.5,.5,.5, .0,.0,.0,.0); 58 this->setMass(1.0, 0.0); 58 59 ParticleEngine::getInstance()->addSystem(this); 59 60 } … … 182 183 183 184 /** 185 \brief sets the initial mass of any particle 186 */ 187 void ParticleSystem::setMass(float mass, float randomMass) 188 { 189 this->initialMass = mass; 190 this->randomInitialMass = randomMass; 191 } 192 193 /** 184 194 \brief sets the conserve Factor of newly created particles 185 195 */ … … 231 241 while (likely(tickPart != NULL)) 232 242 { 243 // applying force to the System. 244 tickPart->velocity += tickPart->extForce * tickPart->mass; 245 246 // rendering new position. 233 247 tickPart->position = tickPart->position + tickPart->velocity * dt; 234 248 tickPart->radius += tickPart->radiusIt * dt; 235 236 // applying force to the System. 237 tickPart->velocity += tickPart->extForce * tickPart->mass; 249 238 250 tickPart->extForce = Vector(0,0,0); 239 251
Note: See TracChangeset
for help on using the changeset viewer.