Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4378 in orxonox.OLD for orxonox/trunk/src/subprojects


Ignore:
Timestamp:
May 29, 2005, 2:02:56 PM (20 years ago)
Author:
bensch
Message:

orxonox/trunk: applying force works for particle-systems again

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/subprojects/particles/particle_fun.cc

    r4370 r4378  
    2020#include "physics_engine.h"
    2121#include "particle_engine.h"
     22#include "fields.h"
    2223
    2324#define PINIT_EMISSION_RATE          50
     
    3233#define PINIT_PARTICLE_TYPE          PARTICLE_SPRITE
    3334#define PINIT_INHERIT_SPEED          0.0
    34 
     35#define PINIT_PARTICLE_MASS          1.0
    3536
    3637void Framework::moduleInit(int argc, char** argv)
    3738{
    3839  verbose = 5;
     40  ParticleEngine::getInstance();
     41  PhysicsEngine::getInstance();
     42
    3943
    4044  // Creating a Test Particle System
     
    5357  // Add the Flow from the Emitter into the System
    5458  ParticleEngine::getInstance()->addConnection(emitter, system);
     59
     60
     61  Field* twirl = new Twirl();
     62  twirl->setMagnitude(.1);
     63  new PhysicsConnection(system, twirl);
    5564}
    5665
     
    7180void Framework::moduleTick(float dt)
    7281{
     82  PhysicsEngine::getInstance()->tick(dt);
    7383  ParticleEngine::getInstance()->tick(dt);
    7484}
     
    8595  PRINT(0)("i - Particle-state Information\n\n");
    8696  PRINT(0)("\n");
    87 
    8897}
    8998
Note: See TracChangeset for help on using the changeset viewer.