Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4692 in orxonox.OLD for orxonox/trunk/src/subprojects/particles


Ignore:
Timestamp:
Jun 24, 2005, 4:26:04 PM (20 years ago)
Author:
bensch
Message:

orxonox/trunk: momentum

File:
1 edited

Legend:

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

    r4690 r4692  
    2929#define PINIT_EMISSION_RATE          50
    3030#define PINIT_EMISSION_VELOCITY      5.0
     31#define PINIT_EMISSION_MOMENTUM      1.0
    3132#define PINIT_SPREAD_ANGLE           0.1
    3233#define PINIT_EMITTER_TYPE           EMITTER_DOT
     
    146147          PRINT(4)("Velocity set to %f\n", atof(value));
    147148        }
     149      else if (!strcmp(name, "Momentum"))
     150        {
     151          tmpEmit->setEmissionMomentum(atof(value));
     152          PRINT(4)("Momentum set to %f\n", atof(value));
     153        }
    148154      else if(!strcmp(name, "SpreadAngle"))
    149155        {
     
    294300          velocity->redraw();
    295301          emitterBox->fill(velocity);
     302
     303          emitterBox->fill(new Label("Momentum"));
     304          Slider* Momentum = new Slider("Momentum", 0, 20);
     305          Momentum->setExactness(2);
     306          Momentum->connectSignal("value_changed", (void*)Momentum, emitterChange );
     307          Momentum->setValue(PINIT_EMISSION_MOMENTUM);
     308          Momentum->redraw();
     309          emitterBox->fill(Momentum);
    296310
    297311          emitterBox->fill(new Label("SpreadAngle"));
Note: See TracChangeset for help on using the changeset viewer.