Changeset 4017 in orxonox.OLD for orxonox/trunk/src/lib/graphics/particles/particle_system.cc
- Timestamp:
- May 2, 2005, 10:49:05 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/lib/graphics/particles/particle_system.cc
r3966 r4017 229 229 glMatrixMode(GL_MODELVIEW); 230 230 // glDisable(GL_LIGHTING); 231 material->select(); 232 233 231 material->select(); 232 glDisable(GL_DEPTH_TEST); 233 Particle* drawPart = particles; 234 234 if (likely(drawPart != NULL)) 235 235 { 236 glBegin(GL_POINTS); 236 //draw in DOT mode 237 // glBegin(GL_POINTS); 237 238 while (likely(drawPart != NULL)) 238 239 { 239 // draw in DOT mode240 240 glPushMatrix(); 241 241 glTranslatef(drawPart->position.x, drawPart->position.y, drawPart->position.z); … … 243 243 glCallList(*this->glID); 244 244 245 // 245 //glVertex3f(drawPart->position.x, drawPart->position.y, drawPart->position.z); 246 246 drawPart = drawPart->next; 247 247 glPopMatrix(); 248 248 } 249 glEnd();249 // glEnd(); 250 250 } 251 // glEnable(GL_LIGHTING); 252 glEnable(GL_DEPTH_TEST); 251 253 } 252 254 … … 275 277 } 276 278 277 particles->timeToLive = this->lifeSpan + (float)(rand om()/RAND_MAX)* this->randomLifeSpan;279 particles->timeToLive = this->lifeSpan + (float)(rand()/RAND_MAX)* this->randomLifeSpan; 278 280 particles->position = position; 279 281 particles->velocity = velocity; 280 282 281 283 // particle->rotation = ; //! \todo rotation is once again something to be done. 282 particles->mass = this->initialMass + (rand om()/RAND_MAX -.5)* this->randomInitialMass;283 particles->radius = this->startRadius + (rand om()/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; 284 286 285 particles->radiusIt = (this->endRadius + (rand om()/RAND_MAX-.5)*this->randomEndRadius - particles->radius) / particles->timeToLive;287 particles->radiusIt = (this->endRadius + (rand()/RAND_MAX-.5)*this->randomEndRadius - particles->radius) / particles->timeToLive; 286 288 287 289 ++this->count; 288 290 } 289 291 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"); 291 293 } 292 294
Note: See TracChangeset
for help on using the changeset viewer.