Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3936 in orxonox.OLD for orxonox/branches/particleEngine


Ignore:
Timestamp:
Apr 23, 2005, 3:47:45 AM (20 years ago)
Author:
bensch
Message:

orxonox/branches/particleEngine: size should iterate

Location:
orxonox/branches/particleEngine/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • orxonox/branches/particleEngine/src/lib/graphics/particles/particle_emitter.cc

    r3935 r3936  
    131131      Vector randDir = Vector(random()-RAND_MAX/2, random()-RAND_MAX/2, random()-RAND_MAX/2);
    132132      randDir.normalize();
    133       randDir = Quaternion(angle + randomAngle *((float)random()/RAND_MAX -.5), randDir).apply(this->direction);
     133      randDir = (this->getAbsDir()*Quaternion(angle + randomAngle *((float)random()/RAND_MAX -.5), randDir)).apply(this->direction);
    134134      randDir.normalize();
    135135      system->addParticle(this->getAbsCoor(), randDir* velocity);
  • orxonox/branches/particleEngine/src/lib/graphics/particles/particle_system.cc

    r3935 r3936  
    9696     
    9797      tickPart->position = tickPart->position + tickPart->velocity;
     98      tickPart->radius + tickPart->radiusIt * dt;
    9899      // many more to come
    99      
    100 
    101100
    102101
     
    172171      particles->velocity = velocity;
    173172      //  particle->rotation = ; //! \todo rotation is once again something to be done.
    174       particles->mass = this->initialMass + (random()/RAND_MAX)* this->randomInitialMass;
    175       particles->radius = this->startRadius + (random()/RAND_MAX)*this->randomRadius;
     173      particles->mass = this->initialMass + (random()/RAND_MAX -.5)* this->randomInitialMass;
     174      particles->radius = this->startRadius + (random()/RAND_MAX-.5)*this->randomRadius;
     175     
     176      particles->radiusIt = (this->endRadius + (random()/RAND_MAX-.5)*this->randomRadius - particles->radius) / particles->timeToLive;
    176177
    177178      ++this->count;
  • orxonox/branches/particleEngine/src/lib/graphics/particles/particle_system.h

    r3934 r3936  
    3535  float mass;                 //!< The mass of this particle.
    3636  float radius;               //!< The current size of this particle.
     37  float radiusIt;             //!< The difference of the Size per second.
    3738
    3839  Particle* next;             //!< pointer to the next particle in the List. (NULL if no preceding one)
  • orxonox/branches/particleEngine/src/story_entities/world.cc

    r3935 r3936  
    377377            this->glmis->step();
    378378           
    379             testEmitter = new ParticleEmitter(Vector(-1,0,0), .1, 12400.0, 1);
     379            testEmitter = new ParticleEmitter(Vector(-1,0,0), .1, 12400.0, .5);
    380380            testEmitter->setParent(localPlayer);
    381             testEmitter->setSpread(.5, .1);
     381            testEmitter->setSpread(M_PI_4, .1);
    382382            testSystem = new ParticleSystem(100000);
    383383            testSystem->setLifeSpan(3);
Note: See TracChangeset for help on using the changeset viewer.