Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 16, 2005, 1:59:25 AM (20 years ago)
Author:
bensch
Message:

orxonox/trunk: particleFun draws some Particles again

File:
1 edited

Legend:

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

    r4597 r4639  
    4242  this->setEmissionRate(emissionRate);
    4343  this->setEmissionVelocity(velocity);
     44
     45  ParticleEngine::getInstance()->addEmitter(this);
    4446}
    4547
     
    129131{
    130132  if (!strcmp(type, "plane"))
    131     this->type = EMITTER_PLANE;
     133    this->setType(EMITTER_PLANE);
    132134  else if (!strcmp(type, "cube"))
    133     this->type = EMITTER_CUBE;
     135    this->setType(EMITTER_CUBE);
    134136  else if (!strcmp(type, "sphere"))
    135     this->type = EMITTER_SPHERE;
    136   else
    137     this->type = EMITTER_DOT;
     137    this->setType(EMITTER_SPHERE);
     138  else
     139    this->setType(EMITTER_DOT);
     140}
     141
     142const char* ParticleEmitter::getTypeC(void) const
     143{
     144  if (this->type == EMITTER_PLANE)
     145    return "EMITTER_PLANE";
     146  else if (this->type == EMITTER_CUBE)
     147    return "EMITTER_CUBE";
     148  else if (this->type == EMITTER_SPHERE)
     149    return "EMITTER_SPHERE";
     150  else
     151    return "EMITTER_DOT";
     152
     153
    138154}
    139155
     
    262278   \brief outputs some nice debug information
    263279*/
    264 void ParticleEmitter::debug(void)
     280void ParticleEmitter::debug(void) const
    265281{
    266282  PRINT(0)(" Emitter %s\n", this->getName());
    267 }
     283  PRINT(0)("  EmissionRate: %f, Speed: %f, SpreadAngle: %f\n", this->getEmissionRate(), this->getEmissionVelocity(), this->getSpread());
     284  PRINT(0)("  Size %f, Type: %s\n", this->getSize(), this->getTypeC());
     285}
Note: See TracChangeset for help on using the changeset viewer.