Changeset 4726 in orxonox.OLD for orxonox/trunk/src/lib/particles/particle_emitter.cc
- Timestamp:
- Jun 28, 2005, 10:33:14 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/lib/particles/particle_emitter.cc
r4725 r4726 30 30 CREATE_FACTORY(ParticleEmitter); 31 31 32 33 32 /** 34 33 \brief standard constructor … … 37 36 float velocity) 38 37 { 39 this->setClassID(CL_PARTICLE_EMITTER, "ParticleEmitter"); 40 this->type = EMITTER_DOT; 41 this->emitterSize = 1.0; 38 this->init(); 39 42 40 this->direction = direction; 43 this->setInheritSpeed(0);44 41 this->setSpread(angle); 45 42 this->setEmissionRate(emissionRate); … … 55 52 ParticleEmitter::ParticleEmitter(const TiXmlElement* root) 56 53 { 57 this->setClassID(CL_PARTICLE_EMITTER, "ParticleEmitter"); 58 59 this->saveTime = 0.0; 54 this->init(); 60 55 61 56 if (root) … … 76 71 77 72 /** 73 \brief initializes default values of a ParitcleEmitter 74 */ 75 void ParticleEmitter::init() 76 { 77 this->setClassID(CL_PARTICLE_EMITTER, "ParticleEmitter"); 78 79 this->type = PARTICLE_EMITTER_DEFAULT_TYPE; 80 this->emitterSize = PARTICLE_EMITTER_DEFAULT_SIZE; 81 this->setInheritSpeed(PARTICLE_EMITTER_DEFAULT_INHERIT_SPEED); 82 this->setEmissionRate(PARTICLE_EMITTER_DEFAULT_EMISSION_RATE); 83 this->setSize(PARTICLE_EMITTER_DEFAULT_SIZE); 84 85 this->saveTime = 0.0; 86 } 87 88 /** 78 89 \brief loads a ParticleEmitter from a XML-element 79 90 \param root the XML-element to load from … … 103 114 LoadParam<ParticleEmitter>(root, "spread", this, &ParticleEmitter::setSpread) 104 115 .describe("The angle the particles are emitted from (angle, deviation)"); 116 117 118 LoadParam<ParticleEmitter>(root, "emission-direction", this, &ParticleEmitter::setDirection); 105 119 } 106 120
Note: See TracChangeset
for help on using the changeset viewer.