Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3929 in orxonox.OLD


Ignore:
Timestamp:
Apr 21, 2005, 5:06:20 PM (19 years ago)
Author:
patrick
Message:

orxonox/branches/particle_system: implemented the abstract interface to ParticleEmitter

Location:
orxonox/branches/particleEngine/src/lib/graphics/particles
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • orxonox/branches/particleEngine/src/lib/graphics/particles/particle_emitter.cc

    r3928 r3929  
    3232   this->emissionRate = emissionRate;
    3333   this->velocity = velocity;
    34    this->ttl = ttl;
     34   this->timeToLive = ttl;
    3535}
    3636
     
    4343ParticleEmitter::~ParticleEmitter ()
    4444{}
     45
     46
     47/**
     48   \brief this start the emitter
     49*/
     50void ParticleEmitter::start() {}
     51
     52
     53/**
     54   \brief this stops the emitter
     55*/
     56void ParticleEmitter::stop() {}
     57
     58
     59
     60
     61/* these are Animation interfaces: so you can change spec values as you want */
     62
     63/**
     64   \brief set the angle of the emitter
     65   \param angle around the direction in which there are particles to be emitted
     66
     67   if you want to change the value of this variable during emission time (to make it more dynamic)
     68   you will have to use the animation class
     69*/
     70void ParticleEmitter::setAngle(float angle)
     71{}
     72
     73
     74/**
     75   \brief set the emission rate
     76   \param sets the number of particles emitted per second
     77
     78   if you want to change the value of this variable during emission time (to make it more dynamic)
     79   you will have to use the animation class
     80*/
     81void ParticleEmitter::setEmissionRate(float emissionRate)
     82{}
     83
     84
     85/**
     86   \brief sets the velocity of all particles emitted
     87   \param velocity of the emitted particles
     88
     89   if you want to change the value of this variable during emission time (to make it more dynamic)
     90   you will have to use the animation class
     91*/
     92void ParticleEmitter::setVelocity(float velocity)
     93{}
     94
     95/**
     96   \brief this set the time to life of a particle, after which it will die
     97   \param the time to live in seconds
     98
     99   if you want to change the value of this variable during emission time (to make it more dynamic)
     100   you will have to use the animation class
     101*/
     102void ParticleEmitter::setTTL(float ttl)
     103{}
     104
     105
     106/**
     107   \brief this is called from the particle emitter to give the pulse of time...
     108   \param time passed since last tick
     109*/
     110void ParticleEmitter::tick(float dt)
     111{}
  • orxonox/branches/particleEngine/src/lib/graphics/particles/particle_emitter.h

    r3927 r3929  
    2222  virtual ~ParticleEmitter(void);
    2323
     24  /* controlling the emitter: interface */
    2425  void start();
    2526  void stop();
    2627
     28  /* controlling the behavour: these can be used as Animation interfaces */
     29  void setAngle(float angle);
     30  void setEmissionRate(float emissionRate);
     31  void setVelocity(float velocity);
     32  void setTTL(float ttl);
     33
     34  /* some functions needed for internal use */
    2735  void tick(float dt);
    2836
     
    3341  float velocity;       //!< the contant speed a particle gets if been emitted
    3442  float timeToLive;     //!< this is the global time to live (ttl) definition
    35 
    3643};
    3744
Note: See TracChangeset for help on using the changeset viewer.