Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5652 in orxonox.OLD for trunk/src/lib/particles


Ignore:
Timestamp:
Nov 20, 2005, 6:32:39 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: new LoadParam procedure with all NON-cycling load-options, and it works perfectly (on first sight :))

now going to make the same for cycling LoadOptions

Location:
trunk/src/lib/particles
Files:
2 edited

Legend:

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

    r5445 r5652  
    2222
    2323#include "load_param.h"
     24#include "factory.h"
    2425#include "debug.h"
    2526#include "stdlibincl.h"
     
    9495  static_cast<PNode*>(this)->loadParams(root);
    9596
    96   LoadParam<ParticleEmitter>(root, "type", this, &ParticleEmitter::setType)
     97  LoadParamNEW(root, "type", this, ParticleEmitter, setType)
    9798    .describe("What type of emitter is this [dot, plane, cube, sphere].");
    9899
    99   LoadParam<ParticleEmitter>(root, "size", this, &ParticleEmitter::setSize)
     100  LoadParamNEW(root, "size", this, ParticleEmitter, setSize)
    100101    .describe("How big the emitter is (no effect on dot-emitters)");
    101102
    102   LoadParam<ParticleEmitter>(root, "rate", this, &ParticleEmitter::setEmissionRate)
     103  LoadParamNEW(root, "rate", this, ParticleEmitter, setEmissionRate)
    103104    .describe("How many particles should be emittet from this emitter");
    104105
    105   LoadParam<ParticleEmitter>(root, "inherit-speed", this, &ParticleEmitter::setInheritSpeed)
     106  LoadParamNEW(root, "inherit-speed", this, ParticleEmitter, setInheritSpeed)
    106107    .describe("the extent, the speed of the emitter has on the particles");
    107108
    108   LoadParam<ParticleEmitter>(root, "emission-velocity", this, &ParticleEmitter::setEmissionVelocity)
     109  LoadParamNEW(root, "emission-velocity", this, ParticleEmitter, setEmissionVelocity)
    109110    .describe("How fast the particles are emittet (their initial speed)");
    110111
    111   LoadParam<ParticleEmitter>(root, "emission-momentum", this, &ParticleEmitter::setEmissionMomentum)
     112  LoadParamNEW(root, "emission-momentum", this, ParticleEmitter, setEmissionMomentum)
    112113      .describe("How fast the particles rotation is at emissiontime (their initial momentum)");
    113114
    114   LoadParam<ParticleEmitter>(root, "spread", this, &ParticleEmitter::setSpread)
     115  LoadParamNEW(root, "spread", this, ParticleEmitter, setSpread)
    115116    .describe("The angle the particles are emitted from (angle, deviation)");
    116117
  • trunk/src/lib/particles/particle_system.cc

    r5511 r5652  
    2525
    2626#include "load_param.h"
    27 #include "compiler.h"
     27#include "factory.h"
    2828#include "material.h"
    2929#include "state.h"
     
    119119  static_cast<PhysicsInterface*>(this)->loadParams(root);
    120120
    121   LoadParam<ParticleSystem>(root, "max-count", this, &ParticleSystem::setMaxCount)
     121  LoadParamNEW(root, "max-count", this, ParticleSystem, setMaxCount)
    122122      .describe("the maximal count of Particles, that can be emitted into this system");
    123123
    124124  //LoadParam<ParticleSystem>(root, "type", this, &ParticleSystem::setType);
    125   LoadParam<ParticleSystem>(root, "life-span", this, &ParticleSystem::setLifeSpan)
     125  LoadParamNEW(root, "life-span", this, ParticleSystem, setLifeSpan)
    126126      .describe("sets the life-span of the Particles.");
    127127
    128   LoadParam<ParticleSystem>(root, "conserve", this, &ParticleSystem::setConserve)
    129       .describe("sets the Conserve facrot of the Particles (1.0: they keep all their energy, 0.0:they keep no energy)");
    130 
    131   LoadParam<ParticleSystem>(root, "type", this, &ParticleSystem::setType)
     128  LoadParamNEW(root, "conserve", this, ParticleSystem, setConserve)
     129      .describe("sets the Conserve factor of the Particles (1.0: they keep all their energy, 0.0:they keep no energy)");
     130
     131  LoadParamNEW(root, "type", this, ParticleSystem, setType)
    132132      .describe("sets the type of the Particles, (dot, spark, sprite or model)");
    133133
Note: See TracChangeset for help on using the changeset viewer.