Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 28, 2007, 10:30:29 PM (17 years ago)
Author:
rgrieder
Message:
  • added Vector2, Vector3, Matrix3, ColourValue, Quaternion and String to the misc folder as header files (each of them contains #include <string> … typedef std::string String , etc.)
  • please use String from now on by including <misc/String.h"
  • removed #include <OgreVector3.h", etc. from "CoreIncludes.h" (adjusted all source files)
  • adjusted all the source files (except network, that keeps <string> for the moment) (what a mess..)
  • moved usleep hack to misc/Sleep.h
  • relative include paths for files from other root directories (like misc, network, etc.) (but it stills writes "../Orxonox.h" when in folder orxonox/objects)
  • "OgreSceneManager.h" —> <OgreSceneManager.h>
  • included OrxonoxPrereqs in every file in folder orxonox
  • moved HUD and ParticleInterface to namespace orxonox
  • removed some using namespace Ogre/std when appropriate
  • I hope I haven't forgotten important points..
Location:
code/branches/FICN/src/orxonox/particle
Files:
2 edited

Legend:

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

    r659 r708  
    11/*
    2  *   ORXONOX - the hottest 3D action shooter ever to exist
    3  *
    4  *
    5  *   License notice:
    6  *
    7  *   This program is free software; you can redistribute it and/or
    8  *   modify it under the terms of the GNU General Public License
    9  *   as published by the Free Software Foundation; either version 2
    10  *   of the License, or (at your option) any later version.
    11  *
    12  *   This program is distributed in the hope that it will be useful,
    13  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
    14  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    15  *   GNU General Public License for more details.
    16  *
    17  *   You should have received a copy of the GNU General Public License
    18  *   along with this program; if not, write to the Free Software
    19  *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
    20  *
    21  *   Author:
    22  *      ...
    23  *   Co-authors:
    24  *      ...
    25  *
    26  */
     2*   ORXONOX - the hottest 3D action shooter ever to exist
     3*
     4*
     5*   License notice:
     6*
     7*   This program is free software; you can redistribute it and/or
     8*   modify it under the terms of the GNU General Public License
     9*   as published by the Free Software Foundation; either version 2
     10*   of the License, or (at your option) any later version.
     11*
     12*   This program is distributed in the hope that it will be useful,
     13*   but WITHOUT ANY WARRANTY; without even the implied warranty of
     14*   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     15*   GNU General Public License for more details.
     16*
     17*   You should have received a copy of the GNU General Public License
     18*   along with this program; if not, write to the Free Software
     19*   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
     20*
     21*   Author:
     22*      ...
     23*   Co-authors:
     24*      ...
     25*
     26*/
    2727
    2828/**
    29  * @file ParticleInterface.cc
    30  * @brief class to control praticle effects
    31  */
     29* @file ParticleInterface.cc
     30* @brief class to control praticle effects
     31*/
    3232
    3333#include "ParticleInterface.h"
    3434// #include <OgreParticleSystem.h>
    3535// #include <Ogre.h>
    36 //#include <OIS/OIS.h>
     36// #include <OIS/OIS.h>
    3737// #include <CEGUI/CEGUI.h>
    3838// #include <CEGUIRenderer.h>
    3939
    4040
    41 using namespace Ogre;
    4241
    43 namespace particle {
     42namespace orxonox {
     43  using namespace Ogre;
    4444
    4545  ParticleInterface::ParticleInterface( SceneManager *sceneManager, String name, String templateName )
     
    122122  }
    123123
    124  // TODO check if this really works
     124  // TODO check if this really works
    125125  Vector3 ParticleInterface::getPositionOfEmitter ( int emitterNr )
    126126  {
  • code/branches/FICN/src/orxonox/particle/ParticleInterface.h

    r673 r708  
    1111#include <OgreSceneManager.h>
    1212
     13#include "../OrxonoxPrereqs.h"
    1314
    14 namespace particle
     15#include "misc/Vector3.h"
     16#include "misc/String.h"
     17#include "misc/ColourValue.h"
     18
     19
     20namespace orxonox
    1521{
    1622
    17 class ParticleInterface
    18 {
    19  public:
     23  class ParticleInterface
     24  {
     25  public:
    2026
    21   ParticleInterface( Ogre::SceneManager *sceneManager, Ogre::String name, Ogre::String templateName );
    22   ~ParticleInterface( void );
     27    ParticleInterface( Ogre::SceneManager *sceneManager, String name, String templateName );
     28    ~ParticleInterface( void );
    2329
    24   void inline addToSceneNode( Ogre::SceneNode* sceneNode ) { sceneNode_ = sceneNode; sceneNode_->attachObject(particleSystem_);};
    25   void inline detachFromSceneNode( void ) { sceneNode_->detachObject(particleSystem_); sceneNode_ = NULL;};
     30    void inline addToSceneNode( Ogre::SceneNode* sceneNode ) { sceneNode_ = sceneNode; sceneNode_->attachObject(particleSystem_);};
     31    void inline detachFromSceneNode( void ) { sceneNode_->detachObject(particleSystem_); sceneNode_ = NULL;};
    2632
    27   Ogre::ParticleEmitter* getEmitter ( int emitterNr );
    28   void newEmitter ( void );
     33    Ogre::ParticleEmitter* getEmitter ( int emitterNr );
     34    void newEmitter ( void );
    2935
    30   Ogre::Vector3 getPositionOfEmitter ( int emitterNr );
    31   inline void setPositionOfEmitter ( int emitterNr, Ogre::Vector3 position ) { particleSystem_->getEmitter(emitterNr)->setPosition(position); };
     36    Vector3 getPositionOfEmitter ( int emitterNr );
     37    inline void setPositionOfEmitter ( int emitterNr, Vector3 position ) { particleSystem_->getEmitter(emitterNr)->setPosition(position); };
    3238
    33   inline Ogre::Vector3 getDirection ( void ) { return particleSystem_->getEmitter(0)->getDirection(); };
    34   void setDirection ( Ogre::Vector3 direction );
     39    inline Vector3 getDirection ( void ) { return particleSystem_->getEmitter(0)->getDirection(); };
     40    void setDirection ( Vector3 direction );
    3541
    36   inline Ogre::Real getVelocity() {return velocity_; };
    37   void setVelocity( Ogre::Real v );
     42    inline Real getVelocity() {return velocity_; };
     43    void setVelocity( Real v );
    3844
    39   inline int getRate() { return rate_; };
    40   void setRate( int r );
     45    inline int getRate() { return rate_; };
     46    void setRate( int r );
    4147
    42   inline Ogre::Real getDistance() { return distance_; };
    43   void setDistance( Ogre::Real d );
     48    inline Real getDistance() { return distance_; };
     49    void setDistance( Real d );
    4450
    45   inline Ogre::ColourValue getColour( void ) {return colour_;};
    46   void setColour( Ogre::ColourValue colour );
     51    inline ColourValue getColour( void ) {return colour_;};
     52    void setColour( ColourValue colour );
    4753
    48   void switchEnable();
     54    void switchEnable();
    4955
    50   inline Ogre::ParticleSystem* getParticleSystem() { return this->particleSystem_; };
     56    inline Ogre::ParticleSystem* getParticleSystem() { return this->particleSystem_; };
    5157
    52  private:
    53   Ogre::SceneNode *sceneNode_;
    54   Ogre::SceneManager *sceneManager_;
    55   Ogre::ParticleSystem *particleSystem_;
    56   Ogre::Real distance_;
    57   Ogre::Real velocity_;
    58   int rate_;
    59   Ogre::ColourValue colour_;
    60   int numberOfEmitters_;
     58  private:
     59    Ogre::SceneNode *sceneNode_;
     60    Ogre::SceneManager *sceneManager_;
     61    Ogre::ParticleSystem *particleSystem_;
     62    Real distance_;
     63    Real velocity_;
     64    int rate_;
     65    ColourValue colour_;
     66    int numberOfEmitters_;
    6167
    62   void standardizeEmitters();
    63 };
     68    void standardizeEmitters();
     69  };
    6470
    6571}
     72
    6673#endif /* _ParticleInterface_H__ */
Note: See TracChangeset for help on using the changeset viewer.