Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4434 in orxonox.OLD for orxonox/trunk/src


Ignore:
Timestamp:
Jun 1, 2005, 11:27:12 AM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: PerParticle-animations work as expected

Location:
orxonox/trunk/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/lib/particles/particle_system.cc

    r4433 r4434  
    240240      // rendering new position.
    241241      tickPart->position = tickPart->position + tickPart->velocity * dt;
    242       tickPart->radius = radiusAnim.getValue(tickPart->lifeCycle);
     242      tickPart->radius = radiusAnim.getValue(tickPart->lifeCycle)
     243        + randRadiusAnim.getValue(tickPart->lifeCycle) * tickPart->radiusRand;
     244
     245      tickPart->mass = massAnim.getValue(tickPart->lifeCycle)
     246        + randMassAnim.getValue(tickPart->lifeCycle) * tickPart->massRand;
    243247     
    244248      tickPart->extForce = Vector(0,0,0);
     
    450454
    451455      //  particle->rotation = ; //! \todo rotation is once again something to be done.
    452       particles->mass = this->massAnim.getValue(0.0);
    453       particles->radius = this->radiusAnim.getValue(0.0);
     456      particles->massRand = 2*(float)rand()/RAND_MAX -1;
     457      particles->radiusRand = 2* (float)rand()/RAND_MAX -1;
     458      particles->mass = this->massAnim.getValue(0.0) + this->randMassAnim.getValue(0.0)*particles->massRand;
     459      particles->radius = this->radiusAnim.getValue(0.0) + this->randRadiusAnim.getValue(0.0)*particles->radiusRand;
    454460
    455461      ++this->count;
  • orxonox/trunk/src/lib/particles/particle_system.h

    r4433 r4434  
    4949  Quaternion rotation;        //!< The current rotation of this particle.
    5050  float mass;                 //!< The mass of this particle.
     51  float massRand;
    5152  float radius;               //!< The current size of this particle.
    52   float radiusIt;             //!< The difference of the Size per second.
     53  float radiusRand;
    5354
    5455  GLfloat color [4];          //!< A Color for the particles.
  • orxonox/trunk/src/story_entities/world.cc

    r4431 r4434  
    476476  system->setLifeSpan(.5);
    477477  system->setConserve(.8);
    478   system->setRadius(0.0, 1.0, .6);
    479   system->setRadius(.2, 3, .2);
     478  system->setRadius(0.0, 1.0, .8);
     479  system->setRadius(.2, 3, 2.0);
    480480  system->setRadius(1.0, 0.0, .0);
    481481  system->setMass (0.0, 1.0);
    482482
    483   system->setColor(0, .5,0,0,.5);
    484   system->setColor(.5, 1,1,0,1);
     483  system->setColor(0, .5,0,0,1);
     484  system->setColor(.5, 1,1,0,.01);
    485485  system->setColor(1.0, 0,0,0,0);
    486486
Note: See TracChangeset for help on using the changeset viewer.