Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 2, 2005, 10:49:05 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: merged particleSystem back into the Trunk
merged with command:
svn merge particleEngine/ ../trunk/ -r 3966:HEAD
U ../trunk/src/lib/graphics/particles/particle_emitter.cc
U ../trunk/src/lib/graphics/particles/particle_system.cc
U ../trunk/src/lib/graphics/particles/particle_system.h

as you can see, no conflicts

File:
1 edited

Legend:

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

    r3966 r4017  
    229229  glMatrixMode(GL_MODELVIEW);
    230230  //  glDisable(GL_LIGHTING);
    231   material->select();
    232 
    233   Particle* drawPart = particles;
     231  material->select(); 
     232  glDisable(GL_DEPTH_TEST);
     233 Particle* drawPart = particles;
    234234  if (likely(drawPart != NULL))
    235235    {
    236       glBegin(GL_POINTS);
     236      //draw in DOT mode
     237      //      glBegin(GL_POINTS);
    237238      while (likely(drawPart != NULL))
    238239        {
    239           // draw in DOT mode
    240240          glPushMatrix();
    241241          glTranslatef(drawPart->position.x, drawPart->position.y, drawPart->position.z);
     
    243243          glCallList(*this->glID);
    244244         
    245           //              glVertex3f(drawPart->position.x, drawPart->position.y, drawPart->position.z);
     245          //glVertex3f(drawPart->position.x, drawPart->position.y, drawPart->position.z);
    246246          drawPart = drawPart->next;
    247247          glPopMatrix();
    248248        }
    249       glEnd();
     249      //      glEnd();
    250250    }
     251  //  glEnable(GL_LIGHTING);
     252  glEnable(GL_DEPTH_TEST);
    251253}
    252254
     
    275277        }
    276278     
    277       particles->timeToLive = this->lifeSpan + (float)(random()/RAND_MAX)* this->randomLifeSpan;
     279      particles->timeToLive = this->lifeSpan + (float)(rand()/RAND_MAX)* this->randomLifeSpan;
    278280      particles->position = position;
    279281      particles->velocity = velocity;
    280282
    281283      //  particle->rotation = ; //! \todo rotation is once again something to be done.
    282       particles->mass = this->initialMass + (random()/RAND_MAX -.5)* this->randomInitialMass;
    283       particles->radius = this->startRadius + (random()/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;
    284286     
    285       particles->radiusIt = (this->endRadius + (random()/RAND_MAX-.5)*this->randomEndRadius - particles->radius) / particles->timeToLive;
     287      particles->radiusIt = (this->endRadius + (rand()/RAND_MAX-.5)*this->randomEndRadius - particles->radius) / particles->timeToLive;
    286288
    287289      ++this->count;
    288290    }
    289291  else
    290     PRINTF(4)("maximum count of particles reached not adding any more\n");
     292    PRINTF(5)("maximum count of particles reached not adding any more\n");
    291293}
    292294
Note: See TracChangeset for help on using the changeset viewer.