Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6825 in orxonox.OLD for trunk/src/lib/particles/box_emitter.cc


Ignore:
Timestamp:
Jan 29, 2006, 1:07:01 PM (19 years ago)
Author:
bensch
Message:

trunk: new interface to ParticleEmitters

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/particles/box_emitter.cc

    r6823 r6825  
    3333 *  standard constructor
    3434*/
    35 BoxEmitter::BoxEmitter(const Vector& size)
     35BoxEmitter::BoxEmitter(const Vector& size, float emissionRate, float velocity, float angle)
     36    :  ParticleEmitter(emissionRate, velocity, angle)
    3637{
    3738  this->init();
     
    8889    Vector randDir = Vector(rand()-RAND_MAX/2, rand()-RAND_MAX/2, rand()-RAND_MAX/2);
    8990    randDir.normalize();
    90     randDir = (this->getAbsDir()*Quaternion(angle + randomAngle *((float)rand()/RAND_MAX -.5), randDir)).apply(this->direction);
     91    randDir = (Quaternion(angle + randomAngle *((float)rand()/RAND_MAX -.5), randDir)).apply(this->getAbsDirX());
    9192    Vector velocityV = randDir.getNormalized()*this->velocity + inheritVelocity;
    9293
Note: See TracChangeset for help on using the changeset viewer.