Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 609


Ignore:
Timestamp:
Dec 18, 2007, 12:32:09 PM (17 years ago)
Author:
rgrieder
Message:
  • removed all the "using namespace Ogre" in the header files
  • cleaned up the orxonox.cc header a little bit (every Ogre class referenced is now included via header file)
Location:
code/branches/FICN/src/orxonox
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • code/branches/FICN/src/orxonox/Flocking.h

    r596 r609  
    1414#endif
    1515
    16 using namespace Ogre;
    1716
    1817class Element // An element that flocks
     
    2019
    2120  public:
    22     Vector3 location;  // locationvector of the element
    23     Vector3 speed;  // speedvector of the element
    24     Vector3 acceleration;  // accelerationvector of the element
     21    Ogre::Vector3 location;  // locationvector of the element
     22    Ogre::Vector3 speed;  // speedvector of the element
     23    Ogre::Vector3 acceleration;  // accelerationvector of the element
    2524    bool movable;  // movability of the element, (false) gives the possiblity that an object can`t be moved by flocking but still gets into the calculation
    2625    static int const SEPERATIONDISTANCE = 300;  //detectionradius of seperation
     
    3837
    3938  //constructor
    40   Element(Vector3 location_, Vector3 speed_, Vector3 acceleration_, bool movable_) {
     39  Element(Ogre::Vector3 location_, Ogre::Vector3 speed_, Ogre::Vector3 acceleration_, bool movable_) {
    4140    acceleration = acceleration_;
    4241    speed = speed_;
     
    4645
    4746  //function to chance values of an element
    48   void setValues(Vector3 location_, Vector3 speed_, Vector3 acceleration_, bool movable_) {
     47  void setValues(Ogre::Vector3 location_, Ogre::Vector3 speed_, Ogre::Vector3 acceleration_, bool movable_) {
    4948    acceleration = acceleration_;
    5049    speed = speed_;
     
    5554  //calculates the distance between the element and an other point given by temp
    5655  float getDistance(Element temp) {
    57     Vector3 distance = temp.location-location;
     56    Ogre::Vector3 distance = temp.location-location;
    5857    return distance.length();
    5958  }
     
    7069
    7170  //separation-function (keep elements separated, avoid crashs)
    72   Vector3 separation(Element arrayOfElements[]) {
     71  Ogre::Vector3 separation(Element arrayOfElements[]) {
     72    using namespace Ogre;
    7373    Vector3 steering = Vector3(0,0,0); //steeringvector
    7474    Vector3 inverseDistance = Vector3(0,0,0);  //vector pointing away from possible collisions
     
    9595
    9696  //alignment-function (lead elements to the same heading)
    97   Vector3 alignment(Element arrayOfElements[]) {
     97  Ogre::Vector3 alignment(Element arrayOfElements[]) {
     98    using namespace Ogre;
    9899    Vector3 steering = Vector3(0,0,0); //steeringvector
    99100    int numberOfNeighbour = 0;  //number of observed neighbours
     
    113114
    114115  //cohseion-function (keep elements close to each other)
    115   Vector3 cohesion(Element arrayOfElements[]) {
     116  Ogre::Vector3 cohesion(Element arrayOfElements[]) {
     117    using namespace Ogre;
    116118    Vector3 steering = Vector3(0,0,0); //steeringvector
    117119    int numberOfNeighbour = 0;  //number of observed neighbours
  • code/branches/FICN/src/orxonox/graphicsEngine.h

    r462 r609  
    1414namespace orxonox {
    1515
    16   using namespace Ogre;
    1716/**
    1817   * graphics engine manager class
     
    2726      bool load();
    2827      void loadRessourceLocations(std::string path);
    29       SceneManager* getSceneManager();
     28      Ogre::SceneManager* getSceneManager();
    3029      void startRender();
    3130
  • code/branches/FICN/src/orxonox/hud/HUD.h

    r587 r609  
    77//#include <CEGUIRenderer.h>
    88
    9 using namespace Ogre;
    109
    1110namespace hud
     
    1716  private:
    1817
    19         OverlayElement* timeText_;
    20         OverlayElement* targetWindowNameText_;
    21         OverlayElement* targetWindowStatusText_;
    22         OverlayElement* targetWindowDistanceText_;
    23         OverlayElement* targetWindowHitRatingText_;
    24         OverlayElement* energyLength_;
    25         OverlayElement* shieldLeftTop_;
    26         OverlayElement* shieldRightTop_;
    27         OverlayElement* shieldLeftBottom_;
    28         OverlayElement* shieldRightBottom_;
    29         OverlayElement* rocketNum1_;
    30         OverlayElement* rocketNum2_;
    31         OverlayElement* rocketNum3_;
    32         OverlayElement* rocketNum4_;
    33         OverlayElement* energyDistrPoint_;
    34         OverlayElement* primarChoice_;
     18    Ogre::OverlayElement* timeText_;
     19        Ogre::OverlayElement* targetWindowNameText_;
     20        Ogre::OverlayElement* targetWindowStatusText_;
     21        Ogre::OverlayElement* targetWindowDistanceText_;
     22        Ogre::OverlayElement* targetWindowHitRatingText_;
     23        Ogre::OverlayElement* energyLength_;
     24        Ogre::OverlayElement* shieldLeftTop_;
     25        Ogre::OverlayElement* shieldRightTop_;
     26        Ogre::OverlayElement* shieldLeftBottom_;
     27        Ogre::OverlayElement* shieldRightBottom_;
     28        Ogre::OverlayElement* rocketNum1_;
     29        Ogre::OverlayElement* rocketNum2_;
     30        Ogre::OverlayElement* rocketNum3_;
     31        Ogre::OverlayElement* rocketNum4_;
     32        Ogre::OverlayElement* energyDistrPoint_;
     33        Ogre::OverlayElement* primarChoice_;
    3534
    3635
     
    4140        int timeSec_;
    4241
    43         String targetWindowName_;
    44         String targetWindowStatus_;
     42        Ogre::String targetWindowName_;
     43        Ogre::String targetWindowStatus_;
    4544        int targetWindowDistance_;
    4645        int targetWindowHitRating_;
     
    7877
    7978        void setTime(int i, int j);
    80         void setTargetWindowName(String i);
    81         void setTargetWindowStatus(String i);
     79        void setTargetWindowName(Ogre::String i);
     80        void setTargetWindowStatus(Ogre::String i);
    8281        void setTargetWindowDistance(int i);
    8382        void setTargetWindowHitRating(int i);
  • code/branches/FICN/src/orxonox/orxonox.cc

    r608 r609  
    3131 */
    3232
    33 #include "orxonox.h"
    34 #include "graphicsEngine.h"
    35 
    36 //#include <Ogre.h>
    37 // 40% speed up: (instead of Ogre.h)
    38 #include <OgreSceneNode.h>
    39 #include <OgreSceneManager.h>
     33//****** OGRE ******
     34#include <OgreString.h>
     35#include <OgreException.h>
    4036#include <OgreRoot.h>
    4137#include <OgreFrameListener.h>
     38#include <OgreRenderWindow.h>
     39#include <OgreTextureManager.h>
     40#include <OgreResourceGroupManager.h>
    4241#include <OgreConfigFile.h>
    43 #include <OgreTextureManager.h>
    44 #include <OgreEntity.h>
    45 #include <OgreRenderWindow.h>
    46 
     42#include <OgreOverlay.h>
     43#include <OgreOverlayManager.h>
     44
     45//****** OIS *******
    4746#include <OIS/OIS.h>
    48 //#include <CEGUI/CEGUI.h>
    49 //#include <OgreCEGUIRenderer.h>
    50 
     47
     48//****** STD *******
    5149#include <string>
    5250#include <iostream>
    5351
    54 #include "objects/Tickable.h"
    55 #include "objects/Timer.h"
    56 #include "core/ArgReader.h"
    57 #include "core/Factory.h"
    58 #include "core/Debug.h"
    59 
    60 #include "../loader/LevelLoader.h"
    61 #include "../audio/AudioManager.h"
    62 
    63 #include "hud/HUD.h"
    64 
    65 //network stuff
    66 #include "../network/Server.h"
    67 #include "../network/Client.h"
    68 #include "../network/NetworkFrameListener.h"
    69 
     52// hack for the usleep/Sleep problem
    7053#ifdef WIN32
    7154#include <windows.h>
     
    7558#endif
    7659
     60//***** ORXONOX ****
     61// loader and audio
     62#include "loader/LevelLoader.h"
     63#include "audio/AudioManager.h"
     64
     65// network
     66#include "../network/Server.h"
     67#include "../network/Client.h"
     68#include "../network/NetworkFrameListener.h"
     69
     70// objects
     71#include "objects/Tickable.h"
     72#include "objects/Timer.h"
     73#include "core/ArgReader.h"
     74#include "core/Factory.h"
     75#include "core/Debug.h"
     76#include "hud/HUD.h"
     77
     78#include "graphicsEngine.h"
     79#include "orxonox.h"
     80
     81
    7782namespace orxonox
    7883{
    7984  using namespace Ogre;
    8085
    81    // put this in seperate Class or solve the problem in another fashion
     86   // put this in a seperate Class or solve the problem in another fashion
    8287  class OrxListener : public FrameListener
    8388  {
     
    331336        archName = i->second;
    332337#if OGRE_PLATFORM == OGRE_PLATFORM_APPLE
    333         Ogre::ResourceGroupManager::getSingleton().addResourceLocation( String(macBundlePath() + "/" + archName), typeName, secName);
     338        ResourceGroupManager::getSingleton().addResourceLocation( String(macBundlePath() + "/" + archName), typeName, secName);
    334339#else
    335         Ogre::ResourceGroupManager::getSingleton().addResourceLocation( archName, typeName, secName);
     340        ResourceGroupManager::getSingleton().addResourceLocation( archName, typeName, secName);
    336341#endif
    337342      }
     
    413418    std::ostringstream windowHndStr;
    414419    OIS::ParamList pl;
    415     Ogre::RenderWindow *win = ogre_->getRoot()->getAutoCreatedWindow();
     420    RenderWindow *win = ogre_->getRoot()->getAutoCreatedWindow();
    416421
    417422    win->getCustomAttribute("WINDOW", &windowHnd);
  • code/branches/FICN/src/orxonox/orxonox.h

    r608 r609  
    88#define ORXONOX_H
    99
    10 //#include <OgreSingleton.h>
     10#include <OgrePrerequisites.h>
    1111#include <OgreSceneManager.h>
    1212#include <OIS/OIS.h>
     
    3939      void die(/* some error code */);
    4040      static Orxonox* getSingleton();
    41       inline SceneManager* getSceneManager() { return ogre_->getSceneManager(); };
     41      inline Ogre::SceneManager* getSceneManager() { return ogre_->getSceneManager(); };
    4242      inline GraphicsEngine* getOgrePointer() { return ogre_; };
    4343      inline audio::AudioManager* getAudioManagerPointer() { return auMan_; };
  • code/branches/FICN/src/orxonox/particle/ParticleInterface.h

    r535 r609  
    88// #include <CEGUIRenderer.h>
    99
    10 using namespace Ogre;
    1110
    1211namespace particle
     
    1615{
    1716 public:
    18         ParticleSystem *particleSystem_;
     17        Ogre::ParticleSystem *particleSystem_;
    1918
    20         ParticleInterface( SceneManager *sceneManager, String name, String templateName );
     19        ParticleInterface( Ogre::SceneManager *sceneManager, Ogre::String name, Ogre::String templateName );
    2120        ~ParticleInterface( void );
    22         void addToSceneNode( SceneNode* sceneNode );
     21        void addToSceneNode( Ogre::SceneNode* sceneNode );
    2322        void dettachFromSceneNode( void );
    24         ParticleEmitter* getEmitter ( int emitterNr );
     23        Ogre::ParticleEmitter* getEmitter ( int emitterNr );
    2524        void newEmitter ( void );
    26         void setPositionOfEmitter ( int emitterNr, Vector3 position );
    27         Vector3 getPositionOfEmitter ( int emitterNr );
    28         void setDirection ( Vector3 direction );
    29         Vector3 getDirection ( void );
    30         Real getVelocity();
    31         void setVelocity( Real v );
     25        void setPositionOfEmitter ( int emitterNr, Ogre::Vector3 position );
     26        Ogre::Vector3 getPositionOfEmitter ( int emitterNr );
     27        void setDirection ( Ogre::Vector3 direction );
     28        Ogre::Vector3 getDirection ( void );
     29        Ogre::Real getVelocity();
     30        void setVelocity( Ogre::Real v );
    3231        int getRate();
    3332        void setRate( int r );
    34         Real getDistance();
    35         void setDistance( Real d );
    36         ColourValue getColour( void );
    37         void setColour( ColourValue colour );
     33        Ogre::Real getDistance();
     34        void setDistance( Ogre::Real d );
     35        Ogre::ColourValue getColour( void );
     36        void setColour( Ogre::ColourValue colour );
    3837        void switchEnable( void );
    3938
    4039 private:
    41         SceneNode *sceneNode_;
    42         SceneManager *sceneManager_;
    43         Real distance_;
    44         Real velocity_;
     40        Ogre::SceneNode *sceneNode_;
     41        Ogre::SceneManager *sceneManager_;
     42        Ogre::Real distance_;
     43        Ogre::Real velocity_;
    4544        int rate_;
    46         ColourValue colour_;
     45        Ogre::ColourValue colour_;
    4746        int numberOfEmitters_;
    4847
Note: See TracChangeset for help on using the changeset viewer.