Changeset 3951 in orxonox.OLD for orxonox/branches/particleEngine/src/lib/graphics
- Timestamp:
- Apr 25, 2005, 12:28:20 AM (20 years ago)
- Location:
- orxonox/branches/particleEngine/src/lib/graphics/particles
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/particleEngine/src/lib/graphics/particles/particle_emitter.cc
r3950 r3951 134 134 randDir.normalize(); 135 135 randDir = (this->getAbsDir()*Quaternion(angle + randomAngle *((float)random()/RAND_MAX -.5), randDir)).apply(this->direction); 136 randDir = *randDir.getNormalized() + (this->getVelocity() * system->inheritSpeed);137 138 system->addParticle(this->getAbsCoor(), randDir * velocity);136 randDir = *randDir.getNormalized()*velocity + (this->getVelocity() * system->inheritSpeed); 137 138 system->addParticle(this->getAbsCoor(), randDir); 139 139 } 140 140 } -
orxonox/branches/particleEngine/src/lib/graphics/particles/particle_system.cc
r3948 r3951 184 184 while (likely(tickPart != NULL)) 185 185 { 186 187 186 tickPart->position = tickPart->position + tickPart->velocity; 188 187 tickPart->radius += tickPart->radiusIt * dt; 189 188 190 189 // many more to come 191 192 190 193 191 … … 271 269 \param data some more data given by the emitter 272 270 */ 273 void ParticleSystem::addParticle( Vector position, Vectorvelocity, unsigned int data)271 void ParticleSystem::addParticle(const Vector& position, const Vector& velocity, unsigned int data) 274 272 { 275 273 if (this->count <= this->maxCount) … … 292 290 particles->position = position; 293 291 particles->velocity = velocity; 292 294 293 // particle->rotation = ; //! \todo rotation is once again something to be done. 295 294 particles->mass = this->initialMass + (random()/RAND_MAX -.5)* this->randomInitialMass; -
orxonox/branches/particleEngine/src/lib/graphics/particles/particle_system.h
r3944 r3951 87 87 GLuint dialectCount; //!< How many different types of particles are there in the Particle System 88 88 89 void addParticle( Vector position, Vectorvelocity, unsigned int data = 0);89 void addParticle(const Vector& position, const Vector& velocity, unsigned int data = 0); 90 90 91 91 };
Note: See TracChangeset
for help on using the changeset viewer.