Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4433 in orxonox.OLD


Ignore:
Timestamp:
Jun 1, 2005, 10:47:42 AM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: no more flickering effect at the beginning

Location:
orxonox/trunk/src/lib/particles
Files:
3 edited

Legend:

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

    r4431 r4433  
    450450
    451451      //  particle->rotation = ; //! \todo rotation is once again something to be done.
    452       particles->mass = this->initialMass + (rand()/RAND_MAX -.5)* this->randomInitialMass;
    453       particles->radius = this->startRadius + (rand()/RAND_MAX-.5)*this->randomStartRadius;
    454      
    455       particles->radiusIt = (this->endRadius + (rand()/RAND_MAX-.5)*this->randomEndRadius - particles->radius) / particles->lifeTime;
     452      particles->mass = this->massAnim.getValue(0.0);
     453      particles->radius = this->radiusAnim.getValue(0.0);
    456454
    457455      ++this->count;
  • orxonox/trunk/src/lib/particles/particle_system.h

    r4431 r4433  
    9090  inline float getLifeSpan(void) const { return this->lifeSpan; };
    9191  /** \returns the starting-radius of the particles */
    92   inline float getStartRadius(void) const { return this->startRadius; };
     92  inline float getStartRadius(void) { return this->radiusAnim.getValue(0.0); };
    9393  /** \returns the end-radius of the particles */
    94   inline float getEndRadius(void) const { return this->endRadius; };
     94  inline float getEndRadius(void) { return this->radiusAnim.getValue(1.0); };
    9595  /** \returns the conserve-factor of the particles */
    9696  inline float getConserve(void) const { return this->conserve; };
     
    114114  float lifeSpan;            //!< Initial lifetime of a Particle.
    115115  float randomLifeSpan;      //!< A random value for the Lifespan (around the initial lifetime)
    116   float startRadius;         //!< The beginning Radius of the Particle
    117   float endRadius;           //!< The end Radius of the Particle
    118   float randomStartRadius;   //!< The Random start Radius (begin + rand*randomValue)
    119   float randomEndRadius;     //!< Random end value
    120116  float initialMass;         //!< The initial Mass of the Particle
    121117  float randomInitialMass;   //!< The random initial Mass of the Particle
  • orxonox/trunk/src/lib/particles/quick_animation.cc

    r4425 r4433  
    145145   \param position the position to get the value from :)
    146146*/
    147 float QuickAnimation::getValue(float position)
     147float QuickAnimation::getValue(float position) 
    148148{
    149149  if (unlikely(this->first == NULL))
Note: See TracChangeset for help on using the changeset viewer.