Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4347 in orxonox.OLD


Ignore:
Timestamp:
May 27, 2005, 11:54:16 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: added the ParticleEngine fix into the trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/story_entities/world.cc

    r4338 r4347  
    2121
    2222#include "orxonox.h"
     23
     24#include "state.h"
    2325
    2426#include "p_node.h"
     
    285287  this->localCamera->setName ("Camera");
    286288 
     289  State::getInstance()->setCamera(this->localCamera, this->localCamera->getTarget());
     290
    287291  GraphicsEngine::getInstance()->displayFPS(true);
    288292}
     
    455459
    456460
    457   /*
    458     ParticleSystem* system = new ParticleSystem(1000, PARTICLE_SPRITE);
    459     system->setLifeSpan(.5);
    460     system->setConserve(.99);
    461     system->setRadius(2, 0, 2, 0);
    462    
    463     ParticleEmitter* emitter = new ParticleEmitter(Vector(-1, 0, 0), M_PI_4, 100, .05);
    464     emitter->setParent(this->localPlayer);
    465    
    466     particleEngine->addConnection(emitter, system);
    467   */
     461
     462  // Creating a Test Particle System
     463  ParticleSystem* system = new ParticleSystem(100000, PARTICLE_SPRITE);
     464  system->setLifeSpan(1);
     465  system->setConserve(.8);
     466  system->setRadius(4, 3, 1, 2);
     467  system->setColor(.5,0,0,.5, 1,1,0,1, 0,0,0,0);
     468
     469  // Creating a Test Particle Emitter
     470  ParticleEmitter* emitter = new ParticleEmitter(Vector(-1, 0, 0), M_PI_4, 400, .5);
     471  emitter->setType(EMITTER_DOT);
     472  emitter->setSize(20);
     473  emitter->setParent(this->localPlayer);
     474  emitter->setRelCoor(Vector(-3,0,0));
     475 
     476  // Add the Flow from the Emitter into the System
     477  particleEngine->addConnection(emitter, system);
     478
     479
    468480  WorldEntity* testEntity = new TestEntity();
    469481  //testEntity->setRelCoor(Vector(570, 10, -15));
Note: See TracChangeset for help on using the changeset viewer.