Changeset 4016 in orxonox.OLD for orxonox/branches/particleEngine/src/lib/graphics/particles
- Timestamp:
- May 2, 2005, 10:46:36 PM (20 years ago)
- Location:
- orxonox/branches/particleEngine/src/lib/graphics/particles
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/particleEngine/src/lib/graphics/particles/particle_emitter.cc
r4001 r4016 133 133 // emmits from EMITTER_DOT, 134 134 { 135 Vector randDir = Vector(rand om()-RAND_MAX/2, random()-RAND_MAX/2, random()-RAND_MAX/2);135 Vector randDir = Vector(rand()-RAND_MAX/2, rand()-RAND_MAX/2, rand()-RAND_MAX/2); 136 136 randDir.normalize(); 137 randDir = (this->getAbsDir()*Quaternion(angle + randomAngle *((float)rand om()/RAND_MAX -.5), randDir)).apply(this->direction);137 randDir = (this->getAbsDir()*Quaternion(angle + randomAngle *((float)rand()/RAND_MAX -.5), randDir)).apply(this->direction); 138 138 Vector velocityV = randDir.getNormalized()*this->velocity + inheritVelocity; 139 139 -
orxonox/branches/particleEngine/src/lib/graphics/particles/particle_system.cc
r4001 r4016 277 277 } 278 278 279 particles->timeToLive = this->lifeSpan + (float)(rand om()/RAND_MAX)* this->randomLifeSpan;279 particles->timeToLive = this->lifeSpan + (float)(rand()/RAND_MAX)* this->randomLifeSpan; 280 280 particles->position = position; 281 281 particles->velocity = velocity; 282 282 283 283 // particle->rotation = ; //! \todo rotation is once again something to be done. 284 particles->mass = this->initialMass + (rand om()/RAND_MAX -.5)* this->randomInitialMass;285 particles->radius = this->startRadius + (rand om()/RAND_MAX-.5)*this->randomStartRadius;284 particles->mass = this->initialMass + (rand()/RAND_MAX -.5)* this->randomInitialMass; 285 particles->radius = this->startRadius + (rand()/RAND_MAX-.5)*this->randomStartRadius; 286 286 287 particles->radiusIt = (this->endRadius + (rand om()/RAND_MAX-.5)*this->randomEndRadius - particles->radius) / particles->timeToLive;287 particles->radiusIt = (this->endRadius + (rand()/RAND_MAX-.5)*this->randomEndRadius - particles->radius) / particles->timeToLive; 288 288 289 289 ++this->count;
Note: See TracChangeset
for help on using the changeset viewer.