Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 30, 2007, 6:56:58 PM (17 years ago)
Author:
nicolasc
Message:
  • various cleanup
  • improved readability in PI
  • fixed iterator in language
Location:
code/branches/FICN/src/orxonox/particle
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/FICN/src/orxonox/particle/ParticleInterface.cc

    r715 r728  
    6767  {
    6868    //Abgleichen der anderen Emitter an die Variabeln
    69     for (int i=1; i<numberOfEmitters_; i++) {
     69    for (int i=1; i < numberOfEmitters_; i++) {
    7070      particleSystem_->getEmitter(i)->setColour( colour_ );
    7171      particleSystem_->getEmitter(i)->setTimeToLive( distance_ );
     
    130130  void ParticleInterface::setDirection ( Vector3 direction )
    131131  {
    132     for(int i=0; i<numberOfEmitters_; i++) {
     132    for(int i=0; i < numberOfEmitters_; i++) {
    133133      particleSystem_->getEmitter(i)->setDirection(direction);
    134134    }
     
    137137  void ParticleInterface::switchEnable(){
    138138    bool enable=(!(particleSystem_->getEmitter(0)->getEnabled()));
    139     for(int i=0; i<numberOfEmitters_; i++) {
     139    for(int i=0; i < numberOfEmitters_; i++) {
    140140      particleSystem_->getEmitter(i)->setEnabled(enable);
    141141    }
  • code/branches/FICN/src/orxonox/particle/ParticleInterface.h

    r716 r728  
    2828    ~ParticleInterface( void );
    2929
    30     void inline addToSceneNode( Ogre::SceneNode* sceneNode ) { sceneNode_ = sceneNode; sceneNode_->attachObject(particleSystem_);};
    31     void inline detachFromSceneNode( void ) { sceneNode_->detachObject(particleSystem_); sceneNode_ = NULL;};
     30    inline void addToSceneNode( Ogre::SceneNode* sceneNode )
     31        { sceneNode_ = sceneNode; sceneNode_->attachObject(particleSystem_);};
     32    inline void detachFromSceneNode( void )
     33        { sceneNode_->detachObject(particleSystem_); sceneNode_ = NULL;};
    3234
    3335    Ogre::ParticleEmitter* getEmitter ( int emitterNr );
     
    3537
    3638    Vector3 getPositionOfEmitter ( int emitterNr );
    37     inline void setPositionOfEmitter ( int emitterNr, Vector3 position ) { particleSystem_->getEmitter(emitterNr)->setPosition(position); };
     39    inline void setPositionOfEmitter ( int emitterNr, Vector3 position )
     40        { particleSystem_->getEmitter(emitterNr)->setPosition(position); };
    3841
    39     inline Vector3 getDirection ( void ) { return particleSystem_->getEmitter(0)->getDirection(); };
     42    inline Vector3 getDirection ( void )
     43        { return particleSystem_->getEmitter(0)->getDirection(); };
    4044    void setDirection ( Vector3 direction );
    4145
    42     inline Real getVelocity() {return velocity_; };
     46    inline Real getVelocity()
     47        {return velocity_; };
    4348    void setVelocity( Real v );
    4449
    45     inline int getRate() { return rate_; };
     50    inline int getRate()
     51      { return rate_; };
    4652    void setRate( int r );
    4753
    48     inline Real getDistance() { return distance_; };
     54    inline Real getDistance()
     55        { return distance_; };
    4956    void setDistance( Real d );
    5057
    51     inline ColourValue getColour( void ) {return colour_;};
     58    inline ColourValue getColour( void )
     59        {return colour_;};
    5260    void setColour( ColourValue colour );
    5361
    5462    void switchEnable();
    5563
    56     inline Ogre::ParticleSystem* getParticleSystem() { return this->particleSystem_; };
     64    inline Ogre::ParticleSystem* getParticleSystem()
     65        { return this->particleSystem_; };
    5766
    5867  private:
Note: See TracChangeset for help on using the changeset viewer.