Changeset 4434 in orxonox.OLD for orxonox/trunk/src/lib
- Timestamp:
- Jun 1, 2005, 11:27:12 AM (20 years ago)
- Location:
- orxonox/trunk/src/lib/particles
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/lib/particles/particle_system.cc
r4433 r4434 240 240 // rendering new position. 241 241 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; 243 247 244 248 tickPart->extForce = Vector(0,0,0); … … 450 454 451 455 // 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; 454 460 455 461 ++this->count; -
orxonox/trunk/src/lib/particles/particle_system.h
r4433 r4434 49 49 Quaternion rotation; //!< The current rotation of this particle. 50 50 float mass; //!< The mass of this particle. 51 float massRand; 51 52 float radius; //!< The current size of this particle. 52 float radius It; //!< The difference of the Size per second.53 float radiusRand; 53 54 54 55 GLfloat color [4]; //!< A Color for the particles.
Note: See TracChangeset
for help on using the changeset viewer.