Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 708


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
Files:
9 added
101 edited

Legend:

Unmodified
Added
Removed
  • code/branches/FICN/src/audio/AudioBuffer.cc

    r702 r708  
    3030namespace audio
    3131{
    32         AudioBuffer::AudioBuffer(std::string fileName)
     32        AudioBuffer::AudioBuffer(orxonox::String fileName)
    3333        {
    3434                // Load wav data into buffers.
  • code/branches/FICN/src/audio/AudioBuffer.h

    r673 r708  
    99        {
    1010        public:
    11                 AudioBuffer(std::string fileName);
     11                AudioBuffer(orxonox::String fileName);
    1212                ~AudioBuffer();
    1313        private:
     
    1515                ALuint buffer;
    1616                // Identifier
    17                 std::string name;
     17                orxonox::String name;
    1818                // True if AL was able to load data
    1919                ALboolean loaded;
  • code/branches/FICN/src/audio/AudioIncludes.h

    r677 r708  
    11#include <iostream>
    2 #include <string>
    32#include <vector>
    43
     
    1110#include <vorbis/vorbisfile.h>
    1211
    13 #include "../orxonox/core/Error.h"
     12#include "orxonox/core/Error.h"
     13#include "misc/String.h"
  • code/branches/FICN/src/audio/AudioManager.cc

    r666 r708  
    2727
    2828#include "AudioManager.h"
    29 #include "../orxonox/core/Debug.h"
     29#include "orxonox/core/Debug.h"
    3030
    3131namespace audio
     
    7272        }
    7373
    74         void AudioManager::ambientAdd(std::string file)
     74        void AudioManager::ambientAdd(orxonox::String file)
    7575        {
    76     std::string path = ambientPath + "/" + file + ".ogg";
     76    orxonox::String path = ambientPath + "/" + file + ".ogg";
    7777                AudioStream tmp(path);
    7878                tmp.open();
  • code/branches/FICN/src/audio/AudioManager.h

    r673 r708  
    3737                void update();
    3838
    39                 void ambientAdd(std::string file);
     39                void ambientAdd(orxonox::String file);
    4040                void ambientStart();
    4141                void ambientStop();
     
    4949
    5050
    51                 std::string ambientPath;
     51                orxonox::String ambientPath;
    5252       
    5353                // Vector containing all audio files
  • code/branches/FICN/src/audio/AudioStream.cc

    r677 r708  
    2828
    2929#include "AudioStream.h"
    30 #include "../orxonox/core/Debug.h"
     30#include "orxonox/core/Debug.h"
    3131
    3232namespace audio
    3333{
    34         AudioStream::AudioStream(std::string path)
     34        AudioStream::AudioStream(orxonox::String path)
    3535        {
    3636                this->path = path;
     
    4040        void AudioStream::open()
    4141        {
    42             int result;
    43 
    44 
    45             if(!(oggFile = fopen(path.c_str(), "rb")))
     42            //int result;
     43      errno_t result;
     44
     45
     46            if(fopen_s(&oggFile, path.c_str(), "rb"))
    4647                        {
    4748                orxonox::Error("Could not open Ogg file "+path);
    4849                                return;
    4950                        }
    50 
    51             if((result = ov_open(oggFile, &oggStream, NULL, 0)) < 0)
     51      else
     52      {
     53        COUT(4) << "Opened Ogg file" << path << std::endl;
     54      }
     55
     56            /*if((result = ov_open(oggFile, &oggStream, NULL, 0)) < 0)
    5257            {
    5358        fclose(oggFile);
    5459              orxonox::Error("Could not open Ogg stream. " + errorString(result));
    5560                                return;
    56             }
     61            }*/
    5762
    5863                        loaded = true;
     
    254259
    255260
    256         std::string AudioStream::errorString(int code)
     261        orxonox::String AudioStream::errorString(int code)
    257262        {
    258263            switch(code)
    259264            {
    260265                case OV_EREAD:
    261                     return std::string("Read from media.");
     266                    return orxonox::String("Read from media.");
    262267                case OV_ENOTVORBIS:
    263                     return std::string("Not Vorbis data.");
     268                    return orxonox::String("Not Vorbis data.");
    264269                case OV_EVERSION:
    265                     return std::string("Vorbis version mismatch.");
     270                    return orxonox::String("Vorbis version mismatch.");
    266271                case OV_EBADHEADER:
    267                     return std::string("Invalid Vorbis header.");
     272                    return orxonox::String("Invalid Vorbis header.");
    268273                case OV_EFAULT:
    269                     return std::string("Internal logic fault (bug or heap/stack corruption.");
     274                    return orxonox::String("Internal logic fault (bug or heap/stack corruption.");
    270275                default:
    271                     return std::string("Unknown Ogg error.");
     276                    return orxonox::String("Unknown Ogg error.");
    272277            }
    273278        }
  • code/branches/FICN/src/audio/AudioStream.h

    r677 r708  
    1111  {
    1212    public:
    13       AudioStream(std::string path);
     13      AudioStream(orxonox::String path);
    1414      void open();
    1515      void release();
     
    2424      void empty();
    2525      void check();
    26       std::string errorString(int code);
     26      orxonox::String errorString(int code);
    2727
    2828    private:
    29       std::string path;
     29      orxonox::String path;
    3030
    3131      FILE*           oggFile;
  • code/branches/FICN/src/loader/LevelLoader.cc

    r702 r708  
    4242{
    4343
    44   LevelLoader::LevelLoader(std::string file, std::string path)
     44  LevelLoader::LevelLoader(orxonox::String file, orxonox::String path)
    4545  {
    4646    valid_ = false;
     
    155155
    156156              tElem = tNode->ToElement();
    157               std::string elemVal = tElem->Value();
     157              orxonox::String elemVal = tElem->Value();
    158158              if (elemVal == "ogg")
    159159              {
  • code/branches/FICN/src/loader/LevelLoader.h

    r682 r708  
    99#define _LevelLoader_H__
    1010
    11 #include <string>
     11#include "LoaderPrereqs.h"
    1212
    13 #include "LoaderPrereqs.h"
     13#include "misc/String.h"
    1414#include "tinyxml/tinyxml.h"
    1515
     
    2323  public:
    2424    // Constructors, loads the level file and some information data
    25     LevelLoader(std::string file, std::string dir = "levels");
     25    LevelLoader(orxonox::String file, orxonox::String dir = "levels");
    2626    // Destructor
    2727    virtual ~LevelLoader();
     
    3030
    3131    // Getters
    32     inline std::string name() {return name_; };
    33     inline std::string description() {return description_; };
    34     inline std::string image() {return image_; };
     32    inline orxonox::String name() {return name_; };
     33    inline orxonox::String description() {return description_; };
     34    inline orxonox::String image() {return image_; };
    3535  private:
    3636    //! Level information
    37     std::string name_;
    38     std::string description_;
    39     std::string image_;
    40     std::string loadingBackgroundColor_;
    41     std::string loadingBackgroundImage_;
    42     std::string loadingBarImage_;
    43     std::string loadingBarTop_;
    44     std::string loadingBarLeft_;
    45     std::string loadingBarWidth_;
    46     std::string loadingBarHeight_;
     37    orxonox::String name_;
     38    orxonox::String description_;
     39    orxonox::String image_;
     40    orxonox::String loadingBackgroundColor_;
     41    orxonox::String loadingBackgroundImage_;
     42    orxonox::String loadingBarImage_;
     43    orxonox::String loadingBarTop_;
     44    orxonox::String loadingBarLeft_;
     45    orxonox::String loadingBarWidth_;
     46    orxonox::String loadingBarHeight_;
    4747
    4848    //! Set to true if it was possible to load the level file
  • code/branches/FICN/src/misc/String2Number.h

    r676 r708  
    66#include <iostream>
    77
    8 #include "../orxonox/core/Debug.h"
     8#include "orxonox/core/Debug.h"
    99
    1010/**
  • code/branches/FICN/src/network/ClientConnection.cc

    r632 r708  
    3939#include "ClientConnection.h"
    4040
    41 #ifdef WIN32
    42 #include <windows.h>
    43 #define usleep(x) Sleep((x)/1000)
    44 #else
    45 #include <unistd.h>
    46 #endif
     41#include "misc/Sleep.h"
    4742
    4843namespace network{
  • code/branches/FICN/src/network/NetworkFrameListener.h

    r673 r708  
    1414#define _NetworkFrameListener_H__
    1515
    16 #include "OgreFrameListener.h"
     16#include <OgreFrameListener.h>
     17
    1718#include "Server.h"
    1819#include "Client.h"
  • code/branches/FICN/src/orxonox/AIClass.h

    r673 r708  
    22#define _AIClass_H__
    33
    4 #include <Ogre.h>
    5 #include <OgreVector3.h>
    6 #include <OgreMath.h>
     4#include "misc/Vector3.h"
    75
    8 #include <iostream>
    9 
    10 // FIXME: using namespace xy; in header files is a very bad idea..
    11 using namespace std;
    12 using namespace Ogre;
    13 
    14 class AIPilot {
     6namespace orxonox
     7{
     8  class AIPilot
     9  {
    1510
    1611
    17   /*
    18   TASKS:                                                                         Requirements:
     12    /*
     13    TASKS:                                                                         Requirements:
    1914
    2015    - Change actual Speed to required Speed                                          - Speed as Vector3 , spaceship(?) -> pilot attached to it or vice versa (?)
     
    2520
    2621
    27   */
     22    */
    2823
    2924  public:
     
    3227
    3328
    34   //default constructor
    35   AIPilot() {
    36      speed = (1,0,0);
    37   }
     29    //default constructor
     30    AIPilot() {
     31      speed = (1,0,0);
     32    }
    3833
    39   Vector3 steer(Vector3 reqSpeed) {
    40     Quaternion sRotation = speed.getRotationTo(reqSpeed);
    41     Radian rollarc = sRotation.getRoll();
    42     Radian pitcharc = sRotation.getPitch();
    43     Radian yawarc = sRotation.getYaw();
    44     return Vector3((float)rollarc.valueRadians(), (float)pitcharc.valueRadians(), (float)yawarc.valueRadians());
    45   }
     34    Vector3 steer(Vector3 reqSpeed) {
     35      Quaternion sRotation = speed.getRotationTo(reqSpeed);
     36      Radian rollarc = sRotation.getRoll();
     37      Radian pitcharc = sRotation.getPitch();
     38      Radian yawarc = sRotation.getYaw();
     39      return Vector3((float)rollarc.valueRadians(), (float)pitcharc.valueRadians(), (float)yawarc.valueRadians());
     40    }
    4641
    4742
     43  };
    4844
    49 };
    50 
    51 class AIFleetCommander : public  AIPilot {
     45  class AIFleetCommander : public  AIPilot {
    5246
    5347
    54   /*
    55   TASKS:                                                                       Requirements:
     48    /*
     49    TASKS:                                                                       Requirements:
    5650
    5751    - Same tasks as AI_Pilot (only if shipcontrol)                                   - Same as AI_Pilot
     
    6155
    6256
    63   */
     57    */
    6458
    6559  public:
    6660
    6761
    68   //default constructor
    69   AIFleetCommander() {
     62    //default constructor
     63    AIFleetCommander() {
    7064
    71   }
     65    }
    7266
    7367
    7468
    75 };
     69  };
    7670
    77 class AICommander : public  AIFleetCommander {
     71  class AICommander : public  AIFleetCommander
     72  {
    7873
    7974
    80   /*
    81   TASKS:                                                                     Requirements:
     75    /*
     76    TASKS:                                                                     Requirements:
    8277
    8378    - Decide on general tactics                                                      - List of general fleet status + all possible information on enemies
     
    8681
    8782
    88   */
     83    */
    8984
    90   //default constructor
    91   AICommander() {
     85    //default constructor
     86    AICommander() {
    9287
    93   }
     88    }
    9489
    9590
     91  };
    9692
    97 };
     93}
    9894
    9995#endif /* _AIClass_H__ */
  • code/branches/FICN/src/orxonox/Arrival.h

    r673 r708  
    66#define _Arrival_H__
    77
    8 // #include <Ogre.h>
    9 #include <OgreVector3.h>
     8#include "misc/Vector3.h"
     9#include "misc/Quaternion.h"
    1010
    11 
    12 #include <iostream>
    13 
    14 // FIXME: using namspace xy; in header files is a bad idea
    15 using namespace std;
    16 using namespace Ogre;
    17 
    18 class Arrival {
    19 
     11namespace orxonox
     12{
     13  class Arrival
     14  {
    2015  public:
    2116    Vector3 location;           //!< locationvector of the element
     
    2722
    2823
    29   Arrival() {
    30     acceleration = (0,0,0);
    31     speed = (0,0,0);
    32     location = (0,0,0);
    33     target = (0,0,0);
    34   }
     24    Arrival() {
     25      acceleration = (0,0,0);
     26      speed = (0,0,0);
     27      location = (0,0,0);
     28      target = (0,0,0);
     29    }
    3530
    36   Arrival(Vector3 location_, Vector3 speed_, Vector3 acceleration_, Vector3 target_) {
    37     acceleration = acceleration_;
    38     speed = speed_;
    39     location = location_;
    40     target = target_;
    41   }
     31    Arrival(Vector3 location_, Vector3 speed_, Vector3 acceleration_, Vector3 target_) {
     32      acceleration = acceleration_;
     33      speed = speed_;
     34      location = location_;
     35      target = target_;
     36    }
    4237
    43   void setValues(Vector3 location_, Vector3 speed_, Vector3 acceleration_, Vector3 target_) {
    44     acceleration = acceleration_;
    45     speed = speed_;
    46     location = location_;
    47     target = target_;
    48   }
     38    void setValues(Vector3 location_, Vector3 speed_, Vector3 acceleration_, Vector3 target_) {
     39      acceleration = acceleration_;
     40      speed = speed_;
     41      location = location_;
     42      target = target_;
     43    }
    4944
    50   void setTarget(Vector3 target_) {
    51     setValues(this.location, this.speed, this.acceleration, target_);
    52   }
     45    void setTarget(Vector3 target_) {
     46      setValues(this->location, this->speed, this->acceleration, target_);
     47    }
    5348
    54   Vector3 getDirection() {
    55     Vector3 direction = target-location;
    56   }
     49    Vector3 getDirection() {
     50      Vector3 direction = target-location;
     51    }
    5752
    58   double relativeDirectApproach() {
    59     // Maxspeed / accelerationForwards = time needed to break with max acceleration
    60     // 2*getDistance()length/(MaxSpeed/accelerationForwards)^2 = required acceleration to arrive at the target with speed = 0
    61     return (accelerationForwards / (2*getDirection().length / (MaxSpeed/accelerationForwards)^2) );
    62   }
     53    double relativeDirectApproach() {
     54      // Maxspeed / accelerationForwards = time needed to break with max acceleration
     55      // 2*getDistance()length/(MaxSpeed/accelerationForwards)^2 = required acceleration to arrive at the target with speed = 0
     56      return (accelerationForwards / (2*getDirection().length() / ((MaxSpeed/accelerationForwards)*(MaxSpeed/accelerationForwards))) );
     57    }
    6358
    64   void Approach() {
    65     Quaternion rotation = (0,0,0,0);
    66     if (relativeDirectApproach() > 1) {
    67       float length = speed.length();
    68       speed = (speed+getDirection());
    69       speed.normalise();
    70       speed = speed*length;
    71       if (relativeDirectApproach > 4) {
    72         //accelerate
     59    void Approach() {
     60      Quaternion rotation = Quaternion(0,0,0,0);
     61      if (relativeDirectApproach() > 1)
     62      {
     63        float length = speed.length();
     64        speed = (speed+getDirection());
     65        speed.normalise();
     66        speed = speed*length;
     67        if (relativeDirectApproach() > 4)
     68        {
     69          //accelerate
     70        }
     71        else
     72        {
     73          // speed will stay constant
     74        }
    7375      }
    7476      else {
    75         // speed will stay constant
    7677      }
    77 
    78 
    79     }
    80     else {
    81 
    82 
    8378    }
    8479
    85   }
     80  };
    8681}
    8782
  • code/branches/FICN/src/orxonox/Flocking.h

    r673 r708  
    55#define _Flocking_H__
    66
    7 // #include <Ogre.h>
    8 #include <OgreVector3.h>
     7#include "misc/Vector3.h"
    98
    10 
    11 #include <iostream>
    12 
    13 
    14 
    15 class Element // An element that flocks
     9namespace orxonox
    1610{
     11  class Element // An element that flocks
     12  {
    1713
    1814  public:
    19     Ogre::Vector3 location;                       //!< locationvector of the element
    20     Ogre::Vector3 speed;                          //!< speedvector of the element
    21     Ogre::Vector3 acceleration;                   //!< accelerationvector of the element
     15    Vector3 location;                       //!< locationvector of the element
     16    Vector3 speed;                          //!< speedvector of the element
     17    Vector3 acceleration;                   //!< accelerationvector of the element
    2218    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
    2319    static int const SEPERATIONDISTANCE = 300;    //!< detectionradius of seperation
     
    2622    static int const ANZELEMENTS = 9;             //!< number of elements
    2723
    28   //! default constructor
    29   Element() {
    30     acceleration = Ogre::Vector3(0,0,0);
    31     speed = Ogre::Vector3(0,0,0);
    32     location = Ogre::Vector3(0,0,0);
    33     movable = true;
    34   }
     24    //! default constructor
     25    Element() {
     26      acceleration = Vector3(0,0,0);
     27      speed = Vector3(0,0,0);
     28      location = Vector3(0,0,0);
     29      movable = true;
     30    }
    3531
    36   /** constructor
    37    *  @param location_ sets locationvector of the element
    38    *  @param speed_ sets speedvector of the element
    39    *  @param acceleration_ sets accelerationvector of the element
    40    *  @param movable_ sets movability of the element
    41    */
    42   Element(Ogre::Vector3 location_, Ogre::Vector3 speed_, Ogre::Vector3 acceleration_, bool movable_) {
    43     acceleration = acceleration_;
    44     speed = speed_;
    45     location = location_;
    46     movable = movable_;
    47   }
     32    /** constructor
     33    *  @param location_ sets locationvector of the element
     34    *  @param speed_ sets speedvector of the element
     35    *  @param acceleration_ sets accelerationvector of the element
     36    *  @param movable_ sets movability of the element
     37    */
     38    Element(Vector3 location_, Vector3 speed_, Vector3 acceleration_, bool movable_) {
     39      acceleration = acceleration_;
     40      speed = speed_;
     41      location = location_;
     42      movable = movable_;
     43    }
    4844
    49   //! function to chance values of an element
    50   void setValues(Ogre::Vector3 location_, Ogre::Vector3 speed_, Ogre::Vector3 acceleration_, bool movable_) {
    51     acceleration = acceleration_;
    52     speed = speed_;
    53     location = location_;
    54     movable = movable_;
    55   }
     45    //! function to chance values of an element
     46    void setValues(Vector3 location_, Vector3 speed_, Vector3 acceleration_, bool movable_) {
     47      acceleration = acceleration_;
     48      speed = speed_;
     49      location = location_;
     50      movable = movable_;
     51    }
    5652
    57   /** calculates the distance between the element and an other point given by temp
    58    * @param e remote object to calculate distance to
    59    */
    60   float getDistance(Element e) {
    61     Ogre::Vector3 distance = e.location - location;
    62     return distance.length();
    63   }
     53    /** calculates the distance between the element and an other point given by temp
     54    * @param e remote object to calculate distance to
     55    */
     56    float getDistance(Element e) {
     57      Vector3 distance = e.location - location;
     58      return distance.length();
     59    }
    6460
    65   //! updates the data of an element
    66   void update(Element arrayOfElements[]) {
    67     if (this->movable == true) {calculateAcceleration(arrayOfElements);} //if element is movable, calculate acceleration
    68   }
     61    //! updates the data of an element
     62    void update(Element arrayOfElements[]) {
     63      if (this->movable == true) {calculateAcceleration(arrayOfElements);} //if element is movable, calculate acceleration
     64    }
    6965
    70   //! calculates the new acceleration of an element
    71   void calculateAcceleration(Element arrayOfElements[]) {
    72     acceleration = separation(arrayOfElements) + alignment(arrayOfElements) + cohesion(arrayOfElements);  //acceleration consisting of flocking-functions
    73   }
     66    //! calculates the new acceleration of an element
     67    void calculateAcceleration(Element arrayOfElements[]) {
     68      acceleration = separation(arrayOfElements) + alignment(arrayOfElements) + cohesion(arrayOfElements);  //acceleration consisting of flocking-functions
     69    }
    7470
    75   //! separation-function (keep elements separated, avoid crashs)
    76   Ogre::Vector3 separation(Element arrayOfElements[]) {
    77     using namespace Ogre;
    78     Vector3 steering = Vector3(0,0,0); //steeringvector
    79     Vector3 inverseDistance = Vector3(0,0,0);  //vector pointing away from possible collisions
    80     int numberOfNeighbour = 0;  //number of observed neighbours
    81     float distance = 0;  // distance to the actual element
    82     for(int i=0; i<ANZELEMENTS; i++) {  //go through all elements
    83       Element actual = arrayOfElements[i];  //get the actual element
    84       distance = getDistance(actual);  //get distance between this and actual
    85       if ((distance > 0) && (distance < SEPERATIONDISTANCE)) {  //do only if actual is inside detectionradius
    86         inverseDistance = (0,0,0);
    87         inverseDistance = location-actual.location;  //calculate the distancevector heading towards this
    88         //adaptation of the inverseDistance to the distance
    89         if ((distance < 200) && (distance >= 120)) {inverseDistance = 2*inverseDistance;}
    90         if ((distance < 120) && (distance >= 80)) {inverseDistance = 5*inverseDistance;}
    91         if ((distance < 80) && (distance >= 40)) {inverseDistance = 10*inverseDistance;}
    92         if ((distance < 40) && (distance > 0)) {inverseDistance = 10*inverseDistance;}
    93         steering = steering + inverseDistance;  //add up all significant steeringvectors
    94         numberOfNeighbour++;  //counts the elements inside the detectionradius
     71    //! separation-function (keep elements separated, avoid crashs)
     72    Vector3 separation(Element arrayOfElements[]) {
     73      using namespace Ogre;
     74      Vector3 steering = Vector3(0,0,0); //steeringvector
     75      Vector3 inverseDistance = Vector3(0,0,0);  //vector pointing away from possible collisions
     76      int numberOfNeighbour = 0;  //number of observed neighbours
     77      float distance = 0;  // distance to the actual element
     78      for(int i=0; i<ANZELEMENTS; i++) {  //go through all elements
     79        Element actual = arrayOfElements[i];  //get the actual element
     80        distance = getDistance(actual);  //get distance between this and actual
     81        if ((distance > 0) && (distance < SEPERATIONDISTANCE)) {  //do only if actual is inside detectionradius
     82          inverseDistance = (0,0,0);
     83          inverseDistance = location-actual.location;  //calculate the distancevector heading towards this
     84          //adaptation of the inverseDistance to the distance
     85          if ((distance < 200) && (distance >= 120)) {inverseDistance = 2*inverseDistance;}
     86          if ((distance < 120) && (distance >= 80)) {inverseDistance = 5*inverseDistance;}
     87          if ((distance < 80) && (distance >= 40)) {inverseDistance = 10*inverseDistance;}
     88          if ((distance < 40) && (distance > 0)) {inverseDistance = 10*inverseDistance;}
     89          steering = steering + inverseDistance;  //add up all significant steeringvectors
     90          numberOfNeighbour++;  //counts the elements inside the detectionradius
     91        }
    9592      }
     93      if(numberOfNeighbour > 0) { steering = steering / (float)numberOfNeighbour; }  //devide the sum of steeringvectors by the number of elements -> separation steeringvector
     94      return steering;
    9695    }
    97     if(numberOfNeighbour > 0) { steering = steering / (float)numberOfNeighbour; }  //devide the sum of steeringvectors by the number of elements -> separation steeringvector
    98     return steering;
    99   }
    10096
    101   //! alignment-function (lead elements to the same heading)
    102   Ogre::Vector3 alignment(Element arrayOfElements[]) {
    103     using namespace Ogre;
    104     Vector3 steering = Vector3(0,0,0); //steeringvector
    105     int numberOfNeighbour = 0;  //number of observed neighbours
    106     float distance = 0;
    107     //go through all elements
    108     for(int i=0; i<ANZELEMENTS; i++) {  //just working with 3 elements at the moment
    109       Element actual = arrayOfElements[i];  //get the actual element
    110       float distance = getDistance(actual);  //get distance between this and actual
    111       if ((distance > 0) && (distance < ALIGNMENTDISTANCE)) {  //check if actual element is inside detectionradius
    112         steering = steering + actual.speed;  //add up all speedvectors inside the detectionradius
    113         numberOfNeighbour++;  //counts the elements inside the detectionradius
     97    //! alignment-function (lead elements to the same heading)
     98    Vector3 alignment(Element arrayOfElements[]) {
     99      using namespace Ogre;
     100      Vector3 steering = Vector3(0,0,0); //steeringvector
     101      int numberOfNeighbour = 0;  //number of observed neighbours
     102      float distance = 0;
     103      //go through all elements
     104      for(int i=0; i<ANZELEMENTS; i++) {  //just working with 3 elements at the moment
     105        Element actual = arrayOfElements[i];  //get the actual element
     106        float distance = getDistance(actual);  //get distance between this and actual
     107        if ((distance > 0) && (distance < ALIGNMENTDISTANCE)) {  //check if actual element is inside detectionradius
     108          steering = steering + actual.speed;  //add up all speedvectors inside the detectionradius
     109          numberOfNeighbour++;  //counts the elements inside the detectionradius
     110        }
    114111      }
     112      if(numberOfNeighbour > 0) { steering = steering / (float)numberOfNeighbour; }  //devide the sum of steeringvectors by the number of elements -> alignment steeringvector
     113      return steering;
    115114    }
    116     if(numberOfNeighbour > 0) { steering = steering / (float)numberOfNeighbour; }  //devide the sum of steeringvectors by the number of elements -> alignment steeringvector
    117     return steering;
    118   }
    119115
    120   //! cohseion-function (keep elements close to each other)
    121   Ogre::Vector3 cohesion(Element arrayOfElements[]) {
    122     using namespace Ogre;
    123     Vector3 steering = Vector3(0,0,0); //steeringvector
    124     int numberOfNeighbour = 0;  //number of observed neighbours
    125     float distance = 0;
    126     //go through all elements
    127     for(int i=0; i<ANZELEMENTS; i++) {  //just working with 3 elements at the moment
    128       Element actual = arrayOfElements[i];  //get the actual element
    129       float distance = getDistance(actual);  //get distance between this and actual
    130       if ((distance > 0) && (distance < COHESIONDISTANCE)) {  //check if actual element is inside detectionradius
    131         steering = steering + actual.location;  //add up all locations of elements inside the detectionradius
    132         numberOfNeighbour++;  //counts the elements inside the detectionradius
     116    //! cohseion-function (keep elements close to each other)
     117    Vector3 cohesion(Element arrayOfElements[]) {
     118      using namespace Ogre;
     119      Vector3 steering = Vector3(0,0,0); //steeringvector
     120      int numberOfNeighbour = 0;  //number of observed neighbours
     121      float distance = 0;
     122      //go through all elements
     123      for(int i=0; i<ANZELEMENTS; i++) {  //just working with 3 elements at the moment
     124        Element actual = arrayOfElements[i];  //get the actual element
     125        float distance = getDistance(actual);  //get distance between this and actual
     126        if ((distance > 0) && (distance < COHESIONDISTANCE)) {  //check if actual element is inside detectionradius
     127          steering = steering + actual.location;  //add up all locations of elements inside the detectionradius
     128          numberOfNeighbour++;  //counts the elements inside the detectionradius
     129        }
    133130      }
     131      if(numberOfNeighbour > 0) {
     132        steering = steering  / (float)numberOfNeighbour;  //devide the sum steeringvector by the number of elements -> cohesion steeringvector
     133        steering = steering - this->location;  //transform the vector for the ship
     134      }
     135      return steering;
    134136    }
    135     if(numberOfNeighbour > 0) {
    136       steering = steering  / (float)numberOfNeighbour;  //devide the sum steeringvector by the number of elements -> cohesion steeringvector
    137       steering = steering - this->location;  //transform the vector for the ship
    138     }
    139     return steering;
    140   }
    141 };     //End of class Element
     137  };     //End of class Element
     138}
    142139
    143140#endif /* _Flocking_H__*/
  • code/branches/FICN/src/orxonox/GraphicsEngine.cc

    r679 r708  
    6565#endif*/
    6666#if defined(_DEBUG) && defined(WIN32)
    67     std::string plugin_filename = "plugins_d.cfg";
     67    String plugin_filename = "plugins_d.cfg";
    6868#else
    69     std::string plugin_filename = "plugins.cfg";
     69    String plugin_filename = "plugins.cfg";
    7070#endif
    7171    root_ = new Root(plugin_filename);
     
    100100  }
    101101
    102   void GraphicsEngine::loadRessourceLocations(std::string dataPath)
     102  void GraphicsEngine::loadRessourceLocations(String dataPath)
    103103  {
    104104    //TODO: Specify layout of data file and maybe use xml-loader
  • code/branches/FICN/src/orxonox/GraphicsEngine.h

    r673 r708  
    1111#include <OgreSceneManager.h>
    1212
     13#include "misc/String.h"
     14
    1315
    1416namespace orxonox {
     
    2022    public:
    2123      GraphicsEngine();
    22       inline void setConfigPath(std::string path) { this->configPath_ = path; };
     24      inline void setConfigPath(String path) { this->configPath_ = path; };
    2325      // find a better way for this
    2426      inline Ogre::Root* getRoot() { return root_; };
    2527      void setup();
    2628      bool load();
    27       void loadRessourceLocations(std::string path);
     29      void loadRessourceLocations(String path);
    2830      Ogre::SceneManager* getSceneManager();
    2931      void startRender();
     
    3234    private:
    3335      Ogre::Root*         root_;        //!< Ogre's root
    34       std::string         configPath_;  //!< path to config file
    35       std::string         dataPath_;    //!< path to data file
     36      String         configPath_;  //!< path to config file
     37      String         dataPath_;    //!< path to data file
    3638      Ogre::SceneManager* scene_;       //!< scene manager of the game
    3739
  • code/branches/FICN/src/orxonox/Main.cc

    r701 r708  
    3939
    4040using namespace orxonox;
    41 using namespace Ogre;
    4241#if OGRE_PLATFORM == OGRE_PLATFORM_APPLE
    4342#include <CoreFoundation/CoreFoundation.h>
  • code/branches/FICN/src/orxonox/Orxonox.cc

    r673 r708  
    3232
    3333//****** OGRE ******
    34 #include <OgreString.h>
    3534#include <OgreException.h>
    3635#include <OgreRoot.h>
     
    4746
    4847//****** STD *******
    49 #include <string>
    5048#include <iostream>
    5149#include <exception>
    5250
    5351//***** ORXONOX ****
     52//misc
     53#include "misc/Sleep.h"
     54
    5455// loader and audio
    5556#include "loader/LevelLoader.h"
     
    7778namespace orxonox
    7879{
    79   using namespace Ogre;
    80 
    8180   // put this in a seperate Class or solve the problem in another fashion
    82   class OrxListener : public FrameListener
     81  class OrxListener : public Ogre::FrameListener
    8382  {
    8483    public:
     
    9089      }
    9190
    92       bool frameStarted(const FrameEvent& evt)
     91      bool frameStarted(const Ogre::FrameEvent& evt)
    9392      {
    9493        auMan_->update();
     
    154153   * @param path path to config (in home dir or something)
    155154   */
    156   void Orxonox::init(int argc, char **argv, std::string path)
     155  void Orxonox::init(int argc, char **argv, String path)
    157156  {
    158157    //TODO: find config file (assuming executable directory)
    159158    //TODO: read config file
    160159    //TODO: give config file to Ogre
    161     std::string mode;
     160    String mode;
    162161//     if(argc>=2)
    163 //       mode = std::string(argv[1]);
     162//       mode = String(argv[1]);
    164163//     else
    165164//       mode = "";
     
    170169    //mode = "presentation";
    171170    if(ar.errorHandling()) die();
    172     if(mode == std::string("server"))
     171    if(mode == String("server"))
    173172    {
    174173      serverInit(path);
    175174      mode_ = SERVER;
    176175    }
    177     else if(mode == std::string("client"))
     176    else if(mode == String("client"))
    178177    {
    179178      clientInit(path);
    180179      mode_ = CLIENT;
    181180    }
    182     else if(mode == std::string("presentation"))
     181    else if(mode == String("presentation"))
    183182    {
    184183      serverInit(path);
     
    244243  }
    245244
    246   void Orxonox::standaloneInit(std::string path)
     245  void Orxonox::standaloneInit(String path)
    247246  {
    248247    ogre_->setConfigPath(path);
     
    263262  }
    264263
    265   void Orxonox::playableServer(std::string path)
     264  void Orxonox::playableServer(String path)
    266265  {
    267266    ogre_->setConfigPath(path);
     
    297296  }
    298297
    299   void Orxonox::serverInit(std::string path)
     298  void Orxonox::serverInit(String path)
    300299  {
    301300    COUT(2) << "initialising server" << std::endl;
     
    307306  }
    308307
    309   void Orxonox::clientInit(std::string path)
     308  void Orxonox::clientInit(String path)
    310309  {
    311310    COUT(2) << "initialising client" << std::endl;
     
    322321  void Orxonox::defineResources()
    323322  {
    324     Ogre::String secName, typeName, archName;
     323    String secName, typeName, archName;
    325324    Ogre::ConfigFile cf;
    326325#if OGRE_PLATFORM == OGRE_PLATFORM_APPLE
     
    341340        archName = i->second;
    342341#if OGRE_PLATFORM == OGRE_PLATFORM_APPLE
    343         ResourceGroupManager::getSingleton().addResourceLocation( String(macBundlePath() + "/" + archName), typeName, secName);
     342        Ogre::ResourceGroupManager::getSingleton().addResourceLocation( String(macBundlePath() + "/" + archName), typeName, secName);
    344343#else
    345         ResourceGroupManager::getSingleton().addResourceLocation( archName, typeName, secName);
     344        Ogre::ResourceGroupManager::getSingleton().addResourceLocation( archName, typeName, secName);
    346345#endif
    347346      }
     
    352351  {
    353352    if (!root_->restoreConfig() && !root_->showConfigDialog())
    354       throw Exception(52, "User canceled the config dialog!", "OrxApplication::setupRenderSystem()");
     353      throw Ogre::Exception(52, "User canceled the config dialog!", "OrxApplication::setupRenderSystem()");
    355354  }
    356355
     
    362361  void Orxonox::initializeResourceGroups()
    363362  {
    364     TextureManager::getSingleton().setDefaultNumMipmaps(5);
    365     ResourceGroupManager::getSingleton().initialiseAllResourceGroups();
     363    Ogre::TextureManager::getSingleton().setDefaultNumMipmaps(5);
     364    Ogre::ResourceGroupManager::getSingleton().initialiseAllResourceGroups();
    366365  }
    367366
     
    381380    loader_->loadLevel();
    382381
    383     Overlay* hudOverlay = OverlayManager::getSingleton().getByName("Orxonox/HUD1.2");
    384     hud::HUD* orxonoxHud;
    385     orxonoxHud = new hud::HUD();
     382    Ogre::Overlay* hudOverlay = Ogre::OverlayManager::getSingleton().getByName("Orxonox/HUD1.2");
     383    HUD* orxonoxHud;
     384    orxonoxHud = new HUD();
    386385    orxonoxHud->setEnergyValue(20);
    387386    orxonoxHud->setEnergyDistr(20,20,60);
     
    427426    // fixes auto repeat problem
    428427    #if defined OIS_LINUX_PLATFORM
    429       pl.insert(std::make_pair(std::string("XAutoRepeatOn"), std::string("true")));
     428      pl.insert(std::make_pair(String("XAutoRepeatOn"), String("true")));
    430429    #endif
    431430
    432     RenderWindow *win = ogre_->getRoot()->getAutoCreatedWindow();
     431      Ogre::RenderWindow *win = ogre_->getRoot()->getAutoCreatedWindow();
    433432    win->getCustomAttribute("WINDOW", &windowHnd);
    434433    windowHndStr << windowHnd;
    435     pl.insert(std::make_pair(std::string("WINDOW"), windowHndStr.str()));
     434    pl.insert(std::make_pair(String("WINDOW"), windowHndStr.str()));
    436435    inputManager_ = OIS::InputManager::createInputSystem(pl);
    437436
  • code/branches/FICN/src/orxonox/Orxonox.h

    r682 r708  
    1313#include "OrxonoxPrereqs.h"
    1414#include "loader/LoaderPrereqs.h"
     15
     16#include "misc/String.h"
    1517#include "GraphicsEngine.h"
    1618
     
    3032  {
    3133    public:
    32       void init(int argc, char **argv, std::string path);
     34      void init(int argc, char **argv, String path);
    3335      void start();
    3436      // not sure if this should be private
     
    4648      virtual ~Orxonox();
    4749      // init functions
    48       void serverInit(std::string path);
    49       void clientInit(std::string path);
    50       void standaloneInit(std::string path);
     50      void serverInit(String path);
     51      void clientInit(String path);
     52      void standaloneInit(String path);
    5153      // run functions
    52       void playableServer(std::string path);
     54      void playableServer(String path);
    5355      void standalone();
    5456      void defineResources();
     
    6466    private:
    6567      GraphicsEngine*       ogre_;      //!< our dearest graphics engine <3
    66       std::string           dataPath_;  //!< path to data
     68      String           dataPath_;  //!< path to data
    6769      loader::LevelLoader*  loader_;    //!< level loader builds the scene
    6870      audio::AudioManager*  auMan_;     //!< audio manager
     
    7779      // this is used to identify the mode (server/client/...) we're in
    7880      gameMode              mode_;
    79       std::string           serverIp_;
     81      String           serverIp_;
    8082  };
    8183}
  • code/branches/FICN/src/orxonox/OrxonoxPlatform.h

    r683 r708  
    220220typedef unsigned char uint8;
    221221
    222 }
     222#ifdef ORXONOX_DOUBLE_PRECISION
     223typedef double Real;
     224#else
     225typedef float Real;
     226#endif
    223227
    224228
     
    270274#endif
    271275
    272 
    273 // hack for the usleep/Sleep problem
    274 #if ORXONOX_PLATFORM == ORXONOX_PLATFORM_WIN32
    275 #  include <windows.h>
    276 #  define usleep(x) Sleep((x)/1000)
    277 #elif ORXONOX_PLATFORM == ORXONOX_PLATFORM_LINUX
    278 #  include <unistd.h>
    279 #endif
    280 
     276} /* namespace orxonox */
    281277
    282278#endif /* _OrxonoxPlatform_H__ */
  • code/branches/FICN/src/orxonox/OrxonoxPrereqs.h

    r682 r708  
    4040class SpaceShipSteering;
    4141
     42// TinyXML
     43class TiXmlString;
     44class TiXmlOutStream;
     45class TiXmlNode;
     46class TiXmlHandle;
     47class TiXmlDocument;
     48class TiXmlElement;
     49class TiXmlComment;
     50class TiXmlUnknown;
     51class TiXmlAttribute;
     52class TiXmlText;
     53class TiXmlDeclaration;
     54class TiXmlParsingData;
     55
    4256namespace orxonox {
    4357  class Ambient;
     
    7084  class BarrelGun;
    7185  class WeaponStation;
     86
     87  class ParticleInterface;
     88  class HUD;
    7289}
    7390
     
    7794  class AudioSource;
    7895  class AudioStream;
    79 }
    80 
    81 namespace hud {
    82   class HUD;
    8396}
    8497
     
    112125}
    113126
    114 namespace particle {
    115   class ParticleInterface;
    116 }
    117 
    118127#endif /* _OrxonoxPrereqs_H__ */
  • code/branches/FICN/src/orxonox/SpaceshipSteering.cc

    r612 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  */
    27 
    28 #include "Ogre.h"
     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*/
     27
     28#include <OgreNode.h>
     29#include <OgreSceneNode.h>
     30
     31#include "core/Debug.h"
     32#include "misc/Vector3.h"
    2933#include "SpaceshipSteering.h"
    30 #include <iostream>
    31 #include "core/Debug.h"
    32 
    33 using namespace Ogre;
    34 
    35 SpaceshipSteering::SpaceshipSteering(float maxSpeedForward, float
    36 maxSpeedRotateUpDown, float maxSpeedRotateRightLeft, float
    37 maxSpeedLoopRightLeft) {
    38 
    39   COUT(3) << "Info: Steering was loaded" << std::endl;
    40   moveForward_ = 0;
    41   rotateUp_ = 0;
    42   rotateDown_ = 0;
    43   rotateRight_ = 0;
    44   rotateLeft_ = 0;
    45   loopRight_ = 0;
    46   loopLeft_ = 0;
    47   brakeForward_ = 0;
    48   brakeRotate_ = 0;
    49   brakeLoop_ = 0;
    50   speedForward_ = 0;
    51   speedRotateUpDown_ = 0;
    52   speedRotateRightLeft_ = 0;
    53   speedLoopRightLeft_ = 0;
    54   maxSpeedForward_ = maxSpeedForward;
    55   maxSpeedRotateUpDown_ = maxSpeedRotateUpDown;
    56   maxSpeedRotateRightLeft_ = maxSpeedRotateRightLeft;
    57   maxSpeedLoopRightLeft_ = maxSpeedLoopRightLeft;
    58   accelerationForward_ = 0;
    59   accelerationRotateUpDown_ = 0;
    60   accelerationRotateRightLeft_ = 0;
    61   accelerationLoopRightLeft_ = 0;
     34
     35namespace orxonox
     36{
     37
     38  SpaceshipSteering::SpaceshipSteering(float maxSpeedForward, float
     39    maxSpeedRotateUpDown, float maxSpeedRotateRightLeft, float
     40    maxSpeedLoopRightLeft)
     41  {
     42
     43      COUT(3) << "Info: Steering was loaded" << std::endl;
     44      moveForward_ = 0;
     45      rotateUp_ = 0;
     46      rotateDown_ = 0;
     47      rotateRight_ = 0;
     48      rotateLeft_ = 0;
     49      loopRight_ = 0;
     50      loopLeft_ = 0;
     51      brakeForward_ = 0;
     52      brakeRotate_ = 0;
     53      brakeLoop_ = 0;
     54      speedForward_ = 0;
     55      speedRotateUpDown_ = 0;
     56      speedRotateRightLeft_ = 0;
     57      speedLoopRightLeft_ = 0;
     58      maxSpeedForward_ = maxSpeedForward;
     59      maxSpeedRotateUpDown_ = maxSpeedRotateUpDown;
     60      maxSpeedRotateRightLeft_ = maxSpeedRotateRightLeft;
     61      maxSpeedLoopRightLeft_ = maxSpeedLoopRightLeft;
     62      accelerationForward_ = 0;
     63      accelerationRotateUpDown_ = 0;
     64      accelerationRotateRightLeft_ = 0;
     65      accelerationLoopRightLeft_ = 0;
     66  }
     67
     68  void SpaceshipSteering::tick(float time)
     69  {
     70
     71    if(moveForward_ > 0) {
     72      accelerationForward_ = moveForward_;
     73      if(speedForward_ < maxSpeedForward_)
     74        speedForward_ += accelerationForward_*time;
     75      if(speedForward_ > maxSpeedForward_)
     76        speedForward_ = maxSpeedForward_;
     77    }
     78    if(moveForward_ <= 0) {
     79      accelerationForward_ = brakeForward_;
     80      if(speedForward_ > 0)
     81        speedForward_ -= accelerationForward_*time;
     82      if(speedForward_ < 0)
     83        speedForward_ = 0;
     84    }
     85
     86    if(rotateUp_ > 0) {
     87      accelerationRotateUpDown_ = rotateUp_;
     88      if(speedRotateUpDown_ < maxSpeedRotateUpDown_)
     89        speedRotateUpDown_ += accelerationRotateUpDown_*time;
     90      if(speedRotateUpDown_ > maxSpeedRotateUpDown_)
     91        speedRotateUpDown_ = maxSpeedRotateUpDown_;
     92    }
     93    if(rotateDown_ > 0) {
     94      accelerationRotateUpDown_ = rotateDown_;
     95      if(speedRotateUpDown_ > -maxSpeedRotateUpDown_)
     96        speedRotateUpDown_ -= accelerationRotateUpDown_*time;
     97      if(speedRotateUpDown_ < -maxSpeedRotateUpDown_)
     98        speedRotateUpDown_ = -maxSpeedRotateUpDown_;
     99    }
     100    if(rotateUp_ == 0 && rotateDown_ == 0) {
     101      accelerationRotateUpDown_ = brakeRotate_;
     102      if(speedRotateUpDown_ > 0)
     103        speedRotateUpDown_ -= accelerationRotateUpDown_*time;
     104      if(speedRotateUpDown_ < 0)
     105        speedRotateUpDown_ += accelerationRotateUpDown_*time;
     106      if(abs(speedRotateUpDown_)<accelerationRotateUpDown_*time)
     107        speedRotateUpDown_ = 0;
     108    }
     109
     110    if(rotateRight_ > 0) {
     111      accelerationRotateRightLeft_ = rotateRight_;
     112      if(speedRotateRightLeft_ > -maxSpeedRotateRightLeft_)
     113        speedRotateRightLeft_ -= accelerationRotateRightLeft_*time;
     114      if(speedRotateRightLeft_ < -maxSpeedRotateRightLeft_)
     115        speedRotateRightLeft_ = -maxSpeedRotateRightLeft_;
     116    }
     117    if(rotateLeft_ > 0) {
     118      accelerationRotateRightLeft_ = rotateLeft_;
     119      if(speedRotateRightLeft_ < maxSpeedRotateRightLeft_)
     120        speedRotateRightLeft_ += accelerationRotateRightLeft_*time;
     121      if(speedRotateRightLeft_ > maxSpeedRotateRightLeft_)
     122        speedRotateRightLeft_ = maxSpeedRotateRightLeft_;
     123    }
     124    if(rotateRight_ == 0 && rotateLeft_ == 0) {
     125      accelerationRotateRightLeft_ = brakeRotate_;
     126      if(speedRotateRightLeft_ > 0)
     127        speedRotateRightLeft_ -= accelerationRotateRightLeft_*time;
     128      if(speedRotateRightLeft_ < 0)
     129        speedRotateRightLeft_ += accelerationRotateRightLeft_*time;
     130      if(abs(speedRotateRightLeft_)<accelerationRotateRightLeft_*time)
     131        speedRotateRightLeft_ = 0;
     132    }
     133
     134    if(loopRight_ > 0) {
     135      accelerationLoopRightLeft_ = loopRight_;
     136      if(speedLoopRightLeft_ < maxSpeedLoopRightLeft_)
     137        speedLoopRightLeft_ += accelerationLoopRightLeft_*time;
     138      if(speedLoopRightLeft_ > maxSpeedLoopRightLeft_)
     139        speedLoopRightLeft_ = maxSpeedLoopRightLeft_;
     140    }
     141    if(loopLeft_ > 0) {
     142      accelerationLoopRightLeft_ = loopLeft_;
     143      if(speedLoopRightLeft_ > -maxSpeedLoopRightLeft_)
     144        speedLoopRightLeft_ -= accelerationLoopRightLeft_*time;
     145      if(speedLoopRightLeft_ < -maxSpeedLoopRightLeft_)
     146        speedLoopRightLeft_ = -maxSpeedLoopRightLeft_;
     147    }
     148    if(loopLeft_ == 0 && loopRight_ == 0) {
     149      accelerationLoopRightLeft_ = brakeLoop_;
     150      if(speedLoopRightLeft_ > 0)
     151        speedLoopRightLeft_ -= accelerationLoopRightLeft_*time;
     152      if(speedLoopRightLeft_ < 0)
     153        speedLoopRightLeft_ += accelerationLoopRightLeft_*time;
     154      if(abs(speedLoopRightLeft_)<accelerationLoopRightLeft_*time)
     155        speedLoopRightLeft_ = 0;
     156    }
     157
     158    Vector3 transVector = Vector3::ZERO;
     159    transVector.z = 1;
     160    steeringNode_->translate(transVector*speedForward_*time,
     161      Ogre::SceneNode::TS_LOCAL);
     162    steeringNode_->pitch(Degree(speedRotateUpDown_*time),
     163      Ogre::SceneNode::TS_LOCAL);
     164    steeringNode_->yaw(Degree(speedRotateRightLeft_*time),
     165      Ogre::SceneNode::TS_LOCAL);
     166    steeringNode_->roll(Degree(speedLoopRightLeft_*time),
     167      Ogre::SceneNode::TS_LOCAL);
     168
     169  }
     170
     171  void SpaceshipSteering::moveForward(float moveForward) {
     172    moveForward_ = moveForward;
     173  }
     174
     175  void SpaceshipSteering::rotateUp(float rotateUp) {
     176    rotateUp_ = rotateUp;
     177  }
     178
     179  void SpaceshipSteering::rotateDown(float rotateDown) {
     180    rotateDown_ = rotateDown;
     181  }
     182
     183  void SpaceshipSteering::rotateLeft(float rotateLeft) {
     184    rotateLeft_ = rotateLeft;
     185  }
     186
     187  void SpaceshipSteering::rotateRight(float rotateRight) {
     188    rotateRight_ = rotateRight;
     189  }
     190
     191  void SpaceshipSteering::loopLeft(float loopLeft) {
     192    loopLeft_ = loopLeft;
     193  }
     194
     195  void SpaceshipSteering::loopRight(float loopRight) {
     196    loopRight_ = loopRight;
     197  }
     198
     199  void SpaceshipSteering::brakeForward(float brakeForward) {
     200    brakeForward_ = brakeForward;
     201  }
     202
     203  void SpaceshipSteering::brakeRotate(float brakeRotate) {
     204    brakeRotate_ = brakeRotate;
     205  }
     206
     207  void SpaceshipSteering::brakeLoop(float brakeLoop) {
     208    brakeLoop_ = brakeLoop;
     209  }
     210
     211  void SpaceshipSteering::maxSpeedForward(float maxSpeedForward) {
     212    maxSpeedForward_ = maxSpeedForward;
     213  }
     214
     215  void SpaceshipSteering::maxSpeedRotateUpDown(float maxSpeedRotateUpDown) {
     216    maxSpeedRotateUpDown_ = maxSpeedRotateUpDown;
     217  }
     218
     219  void SpaceshipSteering::maxSpeedRotateRightLeft(float maxSpeedRotateRightLeft) {
     220    maxSpeedRotateRightLeft_ = maxSpeedRotateRightLeft;
     221  }
     222
     223  void SpaceshipSteering::maxSpeedLoopRightLeft(float maxSpeedLoopRightLeft) {
     224    maxSpeedLoopRightLeft_ = maxSpeedLoopRightLeft;
     225  }
     226
     227  void SpaceshipSteering::addNode(Ogre::SceneNode *steeringNode) {
     228    steeringNode_ = steeringNode;
     229  }
     230
    62231}
    63 
    64 void SpaceshipSteering::tick(float time) {
    65 
    66   if(moveForward_ > 0) {
    67     accelerationForward_ = moveForward_;
    68     if(speedForward_ < maxSpeedForward_)
    69       speedForward_ += accelerationForward_*time;
    70     if(speedForward_ > maxSpeedForward_)
    71       speedForward_ = maxSpeedForward_;
    72   }
    73   if(moveForward_ <= 0) {
    74     accelerationForward_ = brakeForward_;
    75     if(speedForward_ > 0)
    76       speedForward_ -= accelerationForward_*time;
    77     if(speedForward_ < 0)
    78       speedForward_ = 0;
    79   }
    80 
    81   if(rotateUp_ > 0) {
    82     accelerationRotateUpDown_ = rotateUp_;
    83     if(speedRotateUpDown_ < maxSpeedRotateUpDown_)
    84       speedRotateUpDown_ += accelerationRotateUpDown_*time;
    85     if(speedRotateUpDown_ > maxSpeedRotateUpDown_)
    86       speedRotateUpDown_ = maxSpeedRotateUpDown_;
    87   }
    88   if(rotateDown_ > 0) {
    89     accelerationRotateUpDown_ = rotateDown_;
    90     if(speedRotateUpDown_ > -maxSpeedRotateUpDown_)
    91       speedRotateUpDown_ -= accelerationRotateUpDown_*time;
    92     if(speedRotateUpDown_ < -maxSpeedRotateUpDown_)
    93       speedRotateUpDown_ = -maxSpeedRotateUpDown_;
    94   }
    95   if(rotateUp_ == 0 && rotateDown_ == 0) {
    96     accelerationRotateUpDown_ = brakeRotate_;
    97     if(speedRotateUpDown_ > 0)
    98       speedRotateUpDown_ -= accelerationRotateUpDown_*time;
    99     if(speedRotateUpDown_ < 0)
    100       speedRotateUpDown_ += accelerationRotateUpDown_*time;
    101     if(abs(speedRotateUpDown_)<accelerationRotateUpDown_*time)
    102       speedRotateUpDown_ = 0;
    103   }
    104 
    105   if(rotateRight_ > 0) {
    106     accelerationRotateRightLeft_ = rotateRight_;
    107     if(speedRotateRightLeft_ > -maxSpeedRotateRightLeft_)
    108       speedRotateRightLeft_ -= accelerationRotateRightLeft_*time;
    109     if(speedRotateRightLeft_ < -maxSpeedRotateRightLeft_)
    110       speedRotateRightLeft_ = -maxSpeedRotateRightLeft_;
    111   }
    112   if(rotateLeft_ > 0) {
    113     accelerationRotateRightLeft_ = rotateLeft_;
    114     if(speedRotateRightLeft_ < maxSpeedRotateRightLeft_)
    115       speedRotateRightLeft_ += accelerationRotateRightLeft_*time;
    116     if(speedRotateRightLeft_ > maxSpeedRotateRightLeft_)
    117       speedRotateRightLeft_ = maxSpeedRotateRightLeft_;
    118   }
    119   if(rotateRight_ == 0 && rotateLeft_ == 0) {
    120     accelerationRotateRightLeft_ = brakeRotate_;
    121     if(speedRotateRightLeft_ > 0)
    122       speedRotateRightLeft_ -= accelerationRotateRightLeft_*time;
    123     if(speedRotateRightLeft_ < 0)
    124       speedRotateRightLeft_ += accelerationRotateRightLeft_*time;
    125     if(abs(speedRotateRightLeft_)<accelerationRotateRightLeft_*time)
    126       speedRotateRightLeft_ = 0;
    127   }
    128 
    129   if(loopRight_ > 0) {
    130     accelerationLoopRightLeft_ = loopRight_;
    131     if(speedLoopRightLeft_ < maxSpeedLoopRightLeft_)
    132       speedLoopRightLeft_ += accelerationLoopRightLeft_*time;
    133     if(speedLoopRightLeft_ > maxSpeedLoopRightLeft_)
    134       speedLoopRightLeft_ = maxSpeedLoopRightLeft_;
    135   }
    136   if(loopLeft_ > 0) {
    137     accelerationLoopRightLeft_ = loopLeft_;
    138     if(speedLoopRightLeft_ > -maxSpeedLoopRightLeft_)
    139       speedLoopRightLeft_ -= accelerationLoopRightLeft_*time;
    140     if(speedLoopRightLeft_ < -maxSpeedLoopRightLeft_)
    141       speedLoopRightLeft_ = -maxSpeedLoopRightLeft_;
    142   }
    143   if(loopLeft_ == 0 && loopRight_ == 0) {
    144     accelerationLoopRightLeft_ = brakeLoop_;
    145     if(speedLoopRightLeft_ > 0)
    146       speedLoopRightLeft_ -= accelerationLoopRightLeft_*time;
    147     if(speedLoopRightLeft_ < 0)
    148       speedLoopRightLeft_ += accelerationLoopRightLeft_*time;
    149     if(abs(speedLoopRightLeft_)<accelerationLoopRightLeft_*time)
    150       speedLoopRightLeft_ = 0;
    151   }
    152 
    153   Vector3 transVector = Vector3::ZERO;
    154   transVector.z = 1;
    155   steeringNode_->translate(transVector*speedForward_*time,
    156   Node::TS_LOCAL);
    157   steeringNode_->pitch(Degree(speedRotateUpDown_*time),
    158   Node::TS_LOCAL);
    159   steeringNode_->yaw(Degree(speedRotateRightLeft_*time),
    160   Node::TS_LOCAL);
    161   steeringNode_->roll(Degree(speedLoopRightLeft_*time),
    162   Node::TS_LOCAL);
    163 
    164 }
    165 
    166 void SpaceshipSteering::moveForward(float moveForward) {
    167   moveForward_ = moveForward;
    168 }
    169 
    170 void SpaceshipSteering::rotateUp(float rotateUp) {
    171   rotateUp_ = rotateUp;
    172 }
    173 
    174 void SpaceshipSteering::rotateDown(float rotateDown) {
    175   rotateDown_ = rotateDown;
    176 }
    177 
    178 void SpaceshipSteering::rotateLeft(float rotateLeft) {
    179   rotateLeft_ = rotateLeft;
    180 }
    181 
    182 void SpaceshipSteering::rotateRight(float rotateRight) {
    183   rotateRight_ = rotateRight;
    184 }
    185 
    186 void SpaceshipSteering::loopLeft(float loopLeft) {
    187   loopLeft_ = loopLeft;
    188 }
    189 
    190 void SpaceshipSteering::loopRight(float loopRight) {
    191   loopRight_ = loopRight;
    192 }
    193 
    194 void SpaceshipSteering::brakeForward(float brakeForward) {
    195   brakeForward_ = brakeForward;
    196 }
    197 
    198 void SpaceshipSteering::brakeRotate(float brakeRotate) {
    199   brakeRotate_ = brakeRotate;
    200 }
    201 
    202 void SpaceshipSteering::brakeLoop(float brakeLoop) {
    203   brakeLoop_ = brakeLoop;
    204 }
    205 
    206 void SpaceshipSteering::maxSpeedForward(float maxSpeedForward) {
    207   maxSpeedForward_ = maxSpeedForward;
    208 }
    209 
    210 void SpaceshipSteering::maxSpeedRotateUpDown(float maxSpeedRotateUpDown) {
    211   maxSpeedRotateUpDown_ = maxSpeedRotateUpDown;
    212 }
    213 
    214 void SpaceshipSteering::maxSpeedRotateRightLeft(float maxSpeedRotateRightLeft) {
    215   maxSpeedRotateRightLeft_ = maxSpeedRotateRightLeft;
    216 }
    217 
    218 void SpaceshipSteering::maxSpeedLoopRightLeft(float maxSpeedLoopRightLeft) {
    219   maxSpeedLoopRightLeft_ = maxSpeedLoopRightLeft;
    220 }
    221 
    222 void SpaceshipSteering::addNode(Ogre::SceneNode *steeringNode) {
    223   steeringNode_ = steeringNode;
    224 }
  • code/branches/FICN/src/orxonox/SpaceshipSteering.h

    r673 r708  
    44#include "OgrePrerequisites.h"
    55
    6 
    7 class SpaceshipSteering
     6namespace orxonox
    87{
     8  class SpaceshipSteering
     9  {
    910  public:
    1011    SpaceshipSteering(float maxSpeedForward, float maxSpeedRotateUpDown,
    11     float maxSpeedRotateRightLeft, float maxSpeedLoopRightLeft);
     12      float maxSpeedRotateRightLeft, float maxSpeedLoopRightLeft);
    1213    void tick(float time);
    1314    void moveForward(float moveForward);
     
    5758    float accelerationLoopRightLeft_;
    5859
    59 };
     60  };
     61}
    6062
    6163
  • code/branches/FICN/src/orxonox/core/ArgReader.cc

    r668 r708  
    4545  }
    4646
    47   void ArgReader::checkArgument(std::string option, std::string &string, bool must)
     47  void ArgReader::checkArgument(String option, String &string, bool must)
    4848  {
    4949    int argpos = checkOption(option) + 1;
     
    6262  }
    6363
    64   void ArgReader::checkArgument(std::string option, int &integer, bool must)
     64  void ArgReader::checkArgument(String option, int &integer, bool must)
    6565  {
    6666    int argpos = checkOption(option) + 1;
     
    7878  }
    7979
    80   void ArgReader::checkArgument(std::string option, float &floating, bool must)
     80  void ArgReader::checkArgument(String option, float &floating, bool must)
    8181  {
    8282    int argpos = checkOption(option) + 1;
     
    9494  }
    9595
    96   int ArgReader::checkOption(std::string option)
     96  int ArgReader::checkOption(String option)
    9797  {
    9898    for(int i = 1; i < counter_; i++)
  • code/branches/FICN/src/orxonox/core/ArgReader.h

    r682 r708  
    3535#define _ArgReader_H__
    3636
    37 #include <string>
     37#include "CorePrereqs.h"
    3838
    39 #include "CorePrereqs.h"
     39#include "misc/String.h"
    4040
    4141namespace orxonox {
     
    4545    public:
    4646      ArgReader(int argc, char **argv);
    47       void checkArgument(std::string option, std::string& string, bool must=false);
    48       void checkArgument(std::string option, int& integer, bool must=false);
    49       void checkArgument(std::string option, float& floating, bool must=false);
     47      void checkArgument(String option, String& string, bool must=false);
     48      void checkArgument(String option, int& integer, bool must=false);
     49      void checkArgument(String option, float& floating, bool must=false);
    5050      bool errorHandling();
    5151    private:
    52       int checkOption(std::string option);
     52      int checkOption(String option);
    5353
    5454    private:
     
    5656      char **arguments_;
    5757      bool fail_;
    58       std::string errorStr_;
     58      String errorStr_;
    5959  };
    6060
  • code/branches/FICN/src/orxonox/core/ClassFactory.h

    r704 r708  
    3636#define _ClassFactory_H__
    3737
    38 #include <string>
    39 
    4038#include "CorePrereqs.h"
    4139
     40#include "misc/String.h"
    4241#include "Factory.h"
    4342#include "Identifier.h"
     
    5453    {
    5554        public:
    56             static bool create(const std::string& name);
     55            static bool create(const String& name);
    5756            BaseObject* fabricate();
    5857
     
    7069    */
    7170    template <class T>
    72     bool ClassFactory<T>::create(const std::string& name)
     71    bool ClassFactory<T>::create(const String& name)
    7372    {
    7473        COUT(4) << "*** Create entry for " << name << " in Factory." << std::endl;
  • code/branches/FICN/src/orxonox/core/ConfigValueContainer.cc

    r705 r708  
    2828#include <fstream>
    2929
    30 #include "../../misc/Tokenizer.h"
    31 #include "../../misc/String2Number.h"
     30#include "misc/Tokenizer.h"
     31#include "misc/String2Number.h"
    3232#include "ConfigValueContainer.h"
    3333
     
    4343        @param defvalue The default-value
    4444    */
    45     ConfigValueContainer::ConfigValueContainer(const std::string& classname, const std::string& varname, int defvalue)
     45    ConfigValueContainer::ConfigValueContainer(const String& classname, const String& varname, int defvalue)
    4646    {
    4747        this->bAddedDescription_ = false;
     
    5353        this->searchConfigFileLine();                                               // Search the entry in the config-file
    5454
    55         std::string valueString = this->parseValueString();                         // Parses the value string from the config-file-entry
    56         if (!this->parseSting(valueString, defvalue))                               // Try to convert the string to a value
    57             this->resetConfigFileEntry();                                           // The conversion failed
    58     }
    59 
    60     /**
    61         @brief Constructor: Converts the default-value to a string, checks the config-file for a changed value, sets the intern value variable.
    62         @param value This is only needed to determine the right type.
    63         @param classname The name of the class the variable belongs to
    64         @param varname The name of the variable
    65         @param defvalue The default-value
    66     */
    67     ConfigValueContainer::ConfigValueContainer(const std::string& classname, const std::string& varname, unsigned int defvalue)
     55        String valueString = this->parseValueString();                         // Parses the value string from the config-file-entry
     56        if (!this->parseSting(valueString, defvalue))                               // Try to convert the string to a value
     57            this->resetConfigFileEntry();                                           // The conversion failed
     58    }
     59
     60    /**
     61        @brief Constructor: Converts the default-value to a string, checks the config-file for a changed value, sets the intern value variable.
     62        @param value This is only needed to determine the right type.
     63        @param classname The name of the class the variable belongs to
     64        @param varname The name of the variable
     65        @param defvalue The default-value
     66    */
     67    ConfigValueContainer::ConfigValueContainer(const String& classname, const String& varname, unsigned int defvalue)
    6868    {
    6969        this->bAddedDescription_ = false;
     
    7575        this->searchConfigFileLine();                                               // Search the entry in the config-file
    7676
    77         std::string valueString = this->parseValueString();                         // Parses the value string from the config-file-entry
    78         if (!this->parseSting(valueString, defvalue))                               // Try to convert the string to a value
    79             this->resetConfigFileEntry();                                           // The conversion failed
    80     }
    81 
    82     /**
    83         @brief Constructor: Converts the default-value to a string, checks the config-file for a changed value, sets the intern value variable.
    84         @param value This is only needed to determine the right type.
    85         @param classname The name of the class the variable belongs to
    86         @param varname The name of the variable
    87         @param defvalue The default-value
    88     */
    89     ConfigValueContainer::ConfigValueContainer(const std::string& classname, const std::string& varname, char defvalue)
     77        String valueString = this->parseValueString();                         // Parses the value string from the config-file-entry
     78        if (!this->parseSting(valueString, defvalue))                               // Try to convert the string to a value
     79            this->resetConfigFileEntry();                                           // The conversion failed
     80    }
     81
     82    /**
     83        @brief Constructor: Converts the default-value to a string, checks the config-file for a changed value, sets the intern value variable.
     84        @param value This is only needed to determine the right type.
     85        @param classname The name of the class the variable belongs to
     86        @param varname The name of the variable
     87        @param defvalue The default-value
     88    */
     89    ConfigValueContainer::ConfigValueContainer(const String& classname, const String& varname, char defvalue)
    9090    {
    9191        this->bAddedDescription_ = false;
     
    9797        this->searchConfigFileLine();                                               // Search the entry in the config-file
    9898
    99         std::string valueString = this->parseValueString();                         // Parses the value string from the config-file-entry
    100         if (!this->parseSting(valueString, defvalue))                               // Try to convert the string to a value
    101             this->resetConfigFileEntry();                                           // The conversion failed
    102     }
    103 
    104     /**
    105         @brief Constructor: Converts the default-value to a string, checks the config-file for a changed value, sets the intern value variable.
    106         @param value This is only needed to determine the right type.
    107         @param classname The name of the class the variable belongs to
    108         @param varname The name of the variable
    109         @param defvalue The default-value
    110     */
    111     ConfigValueContainer::ConfigValueContainer(const std::string& classname, const std::string& varname, unsigned char defvalue)
     99        String valueString = this->parseValueString();                         // Parses the value string from the config-file-entry
     100        if (!this->parseSting(valueString, defvalue))                               // Try to convert the string to a value
     101            this->resetConfigFileEntry();                                           // The conversion failed
     102    }
     103
     104    /**
     105        @brief Constructor: Converts the default-value to a string, checks the config-file for a changed value, sets the intern value variable.
     106        @param value This is only needed to determine the right type.
     107        @param classname The name of the class the variable belongs to
     108        @param varname The name of the variable
     109        @param defvalue The default-value
     110    */
     111    ConfigValueContainer::ConfigValueContainer(const String& classname, const String& varname, unsigned char defvalue)
    112112    {
    113113        this->bAddedDescription_ = false;
     
    119119        this->searchConfigFileLine();                                               // Search the entry in the config-file
    120120
    121         std::string valueString = this->parseValueString();                         // Parses the value string from the config-file-entry
    122         if (!this->parseSting(valueString, defvalue))                               // Try to convert the string to a value
    123             this->resetConfigFileEntry();                                           // The conversion failed
    124     }
    125 
    126     /**
    127         @brief Constructor: Converts the default-value to a string, checks the config-file for a changed value, sets the intern value variable.
    128         @param value This is only needed to determine the right type.
    129         @param classname The name of the class the variable belongs to
    130         @param varname The name of the variable
    131         @param defvalue The default-value
    132     */
    133     ConfigValueContainer::ConfigValueContainer(const std::string& classname, const std::string& varname, float defvalue)
     121        String valueString = this->parseValueString();                         // Parses the value string from the config-file-entry
     122        if (!this->parseSting(valueString, defvalue))                               // Try to convert the string to a value
     123            this->resetConfigFileEntry();                                           // The conversion failed
     124    }
     125
     126    /**
     127        @brief Constructor: Converts the default-value to a string, checks the config-file for a changed value, sets the intern value variable.
     128        @param value This is only needed to determine the right type.
     129        @param classname The name of the class the variable belongs to
     130        @param varname The name of the variable
     131        @param defvalue The default-value
     132    */
     133    ConfigValueContainer::ConfigValueContainer(const String& classname, const String& varname, float defvalue)
    134134    {
    135135        this->bAddedDescription_ = false;
     
    141141        this->searchConfigFileLine();                                               // Search the entry in the config-file
    142142
    143         std::string valueString = this->parseValueString();                         // Parses the value string from the config-file-entry
    144         if (!this->parseSting(valueString, defvalue))                               // Try to convert the string to a value
    145             this->resetConfigFileEntry();                                           // The conversion failed
    146     }
    147 
    148     /**
    149         @brief Constructor: Converts the default-value to a string, checks the config-file for a changed value, sets the intern value variable.
    150         @param value This is only needed to determine the right type.
    151         @param classname The name of the class the variable belongs to
    152         @param varname The name of the variable
    153         @param defvalue The default-value
    154     */
    155     ConfigValueContainer::ConfigValueContainer(const std::string& classname, const std::string& varname, double defvalue)
     143        String valueString = this->parseValueString();                         // Parses the value string from the config-file-entry
     144        if (!this->parseSting(valueString, defvalue))                               // Try to convert the string to a value
     145            this->resetConfigFileEntry();                                           // The conversion failed
     146    }
     147
     148    /**
     149        @brief Constructor: Converts the default-value to a string, checks the config-file for a changed value, sets the intern value variable.
     150        @param value This is only needed to determine the right type.
     151        @param classname The name of the class the variable belongs to
     152        @param varname The name of the variable
     153        @param defvalue The default-value
     154    */
     155    ConfigValueContainer::ConfigValueContainer(const String& classname, const String& varname, double defvalue)
    156156    {
    157157        this->bAddedDescription_ = false;
     
    163163        this->searchConfigFileLine();                                               // Search the entry in the config-file
    164164
    165         std::string valueString = this->parseValueString();                         // Parses the value string from the config-file-entry
    166         if (!this->parseSting(valueString, defvalue))                               // Try to convert the string to a value
    167             this->resetConfigFileEntry();                                           // The conversion failed
    168     }
    169 
    170     /**
    171         @brief Constructor: Converts the default-value to a string, checks the config-file for a changed value, sets the intern value variable.
    172         @param value This is only needed to determine the right type.
    173         @param classname The name of the class the variable belongs to
    174         @param varname The name of the variable
    175         @param defvalue The default-value
    176     */
    177     ConfigValueContainer::ConfigValueContainer(const std::string& classname, const std::string& varname, long double defvalue)
     165        String valueString = this->parseValueString();                         // Parses the value string from the config-file-entry
     166        if (!this->parseSting(valueString, defvalue))                               // Try to convert the string to a value
     167            this->resetConfigFileEntry();                                           // The conversion failed
     168    }
     169
     170    /**
     171        @brief Constructor: Converts the default-value to a string, checks the config-file for a changed value, sets the intern value variable.
     172        @param value This is only needed to determine the right type.
     173        @param classname The name of the class the variable belongs to
     174        @param varname The name of the variable
     175        @param defvalue The default-value
     176    */
     177    ConfigValueContainer::ConfigValueContainer(const String& classname, const String& varname, long double defvalue)
    178178    {
    179179        this->bAddedDescription_ = false;
     
    185185        this->searchConfigFileLine();                                               // Search the entry in the config-file
    186186
    187         std::string valueString = this->parseValueString();                         // Parses the value string from the config-file-entry
    188         if (!this->parseSting(valueString, defvalue))                               // Try to convert the string to a value
    189             this->resetConfigFileEntry();                                           // The conversion failed
    190     }
    191 
    192     /**
    193         @brief Constructor: Converts the default-value to a string, checks the config-file for a changed value, sets the intern value variable.
    194         @param value This is only needed to determine the right type.
    195         @param classname The name of the class the variable belongs to
    196         @param varname The name of the variable
    197         @param defvalue The default-value
    198     */
    199     ConfigValueContainer::ConfigValueContainer(const std::string& classname, const std::string& varname, bool defvalue)
     187        String valueString = this->parseValueString();                         // Parses the value string from the config-file-entry
     188        if (!this->parseSting(valueString, defvalue))                               // Try to convert the string to a value
     189            this->resetConfigFileEntry();                                           // The conversion failed
     190    }
     191
     192    /**
     193        @brief Constructor: Converts the default-value to a string, checks the config-file for a changed value, sets the intern value variable.
     194        @param value This is only needed to determine the right type.
     195        @param classname The name of the class the variable belongs to
     196        @param varname The name of the variable
     197        @param defvalue The default-value
     198    */
     199    ConfigValueContainer::ConfigValueContainer(const String& classname, const String& varname, bool defvalue)
    200200    {
    201201        this->bAddedDescription_ = false;
     
    211211
    212212        this->searchConfigFileLine();                                               // Search the entry in the config-file
    213         std::string valueString = this->parseValueString();                         // Parses the value string from the config-file-entry
    214         if (!this->parseSting(valueString, defvalue))                               // Try to convert the string to a value
    215             this->resetConfigFileEntry();                                           // The conversion failed
    216     }
    217 
    218     /**
    219         @brief Constructor: Converts the default-value to a string, checks the config-file for a changed value, sets the intern value variable.
    220         @param value This is only needed to determine the right type.
    221         @param classname The name of the class the variable belongs to
    222         @param varname The name of the variable
    223         @param defvalue The default-value
    224     */
    225     ConfigValueContainer::ConfigValueContainer(const std::string& classname, const std::string& varname, const std::string& defvalue)
    226     {
    227         this->bAddedDescription_ = false;
    228         this->classname_ = classname;
    229         this->varname_ = varname;
    230         this->type_ = String;
     213        String valueString = this->parseValueString();                         // Parses the value string from the config-file-entry
     214        if (!this->parseSting(valueString, defvalue))                               // Try to convert the string to a value
     215            this->resetConfigFileEntry();                                           // The conversion failed
     216    }
     217
     218    /**
     219        @brief Constructor: Converts the default-value to a string, checks the config-file for a changed value, sets the intern value variable.
     220        @param value This is only needed to determine the right type.
     221        @param classname The name of the class the variable belongs to
     222        @param varname The name of the variable
     223        @param defvalue The default-value
     224    */
     225    ConfigValueContainer::ConfigValueContainer(const String& classname, const String& varname, const String& defvalue)
     226    {
     227        this->bAddedDescription_ = false;
     228        this->classname_ = classname;
     229        this->varname_ = varname;
     230        this->type_ = _String;
    231231
    232232        this->defvalueString_ = "\"" + defvalue + "\"";                             // Convert the string to a "config-file-string" with quotes
    233233        this->searchConfigFileLine();                                               // Search the entry in the config-file
    234         std::string valueString = this->parseValueString(false);                    // Parses the value string from the config-file-entry
    235         if (!this->parseSting(valueString, defvalue))                               // Try to convert the string to a value
    236             this->resetConfigFileEntry();                                           // The conversion failed
    237     }
    238 
    239     /**
    240         @brief Constructor: Converts the default-value to a string, checks the config-file for a changed value, sets the intern value variable.
    241         @param value This is only needed to determine the right type.
    242         @param classname The name of the class the variable belongs to
    243         @param varname The name of the variable
    244         @param defvalue The default-value
    245     */
    246     ConfigValueContainer::ConfigValueContainer(const std::string& classname, const std::string& varname, const char* defvalue)
     234        String valueString = this->parseValueString(false);                    // Parses the value string from the config-file-entry
     235        if (!this->parseSting(valueString, defvalue))                               // Try to convert the string to a value
     236            this->resetConfigFileEntry();                                           // The conversion failed
     237    }
     238
     239    /**
     240        @brief Constructor: Converts the default-value to a string, checks the config-file for a changed value, sets the intern value variable.
     241        @param value This is only needed to determine the right type.
     242        @param classname The name of the class the variable belongs to
     243        @param varname The name of the variable
     244        @param defvalue The default-value
     245    */
     246    ConfigValueContainer::ConfigValueContainer(const String& classname, const String& varname, const char* defvalue)
    247247    {
    248248        this->bAddedDescription_ = false;
     
    251251        this->type_ = ConstChar;
    252252
    253         this->defvalueString_ = "\"" + std::string(defvalue) + "\"";                // Convert the string to a "config-file-string" with quotes
    254         this->searchConfigFileLine();                                               // Search the entry in the config-file
    255         std::string valueString = this->parseValueString(false);                    // Parses the value string from the config-file-entry
    256         if (!this->parseSting(valueString, defvalue))                               // Try to convert the string to a value
    257             this->resetConfigFileEntry();                                           // The conversion failed
    258     }
    259 
    260     /**
    261         @brief Constructor: Converts the default-value to a string, checks the config-file for a changed value, sets the intern value variable.
    262         @param value This is only needed to determine the right type.
    263         @param classname The name of the class the variable belongs to
    264         @param varname The name of the variable
    265         @param defvalue The default-value
    266     */
    267     ConfigValueContainer::ConfigValueContainer(const std::string& classname, const std::string& varname, Ogre::Vector2 defvalue)
    268     {
    269         this->bAddedDescription_ = false;
    270         this->classname_ = classname;
    271         this->varname_ = varname;
    272         this->type_ = Vector2;
     253        this->defvalueString_ = "\"" + String(defvalue) + "\"";                // Convert the string to a "config-file-string" with quotes
     254        this->searchConfigFileLine();                                               // Search the entry in the config-file
     255        String valueString = this->parseValueString(false);                    // Parses the value string from the config-file-entry
     256        if (!this->parseSting(valueString, defvalue))                               // Try to convert the string to a value
     257            this->resetConfigFileEntry();                                           // The conversion failed
     258    }
     259
     260    /**
     261        @brief Constructor: Converts the default-value to a string, checks the config-file for a changed value, sets the intern value variable.
     262        @param value This is only needed to determine the right type.
     263        @param classname The name of the class the variable belongs to
     264        @param varname The name of the variable
     265        @param defvalue The default-value
     266    */
     267    ConfigValueContainer::ConfigValueContainer(const String& classname, const String& varname, Vector2 defvalue)
     268    {
     269        this->bAddedDescription_ = false;
     270        this->classname_ = classname;
     271        this->varname_ = varname;
     272        this->type_ = _Vector2;
    273273
    274274        // Try to convert the default-value from Vector2 to string
     
    280280
    281281        this->searchConfigFileLine();                                               // Search the entry in the config-file
    282         std::string valueString = this->parseValueString();                         // Parses the value string from the config-file-entry
    283         if (!this->parseSting(valueString, defvalue))                               // Try to convert the string to a value
    284             this->resetConfigFileEntry();                                           // The conversion failed
    285     }
    286 
    287     /**
    288         @brief Constructor: Converts the default-value to a string, checks the config-file for a changed value, sets the intern value variable.
    289         @param value This is only needed to determine the right type.
    290         @param classname The name of the class the variable belongs to
    291         @param varname The name of the variable
    292         @param defvalue The default-value
    293     */
    294     ConfigValueContainer::ConfigValueContainer(const std::string& classname, const std::string& varname, Ogre::Vector3 defvalue)
    295     {
    296         this->bAddedDescription_ = false;
    297         this->classname_ = classname;
    298         this->varname_ = varname;
    299         this->type_ = Vector3;
     282        String valueString = this->parseValueString();                         // Parses the value string from the config-file-entry
     283        if (!this->parseSting(valueString, defvalue))                               // Try to convert the string to a value
     284            this->resetConfigFileEntry();                                           // The conversion failed
     285    }
     286
     287    /**
     288        @brief Constructor: Converts the default-value to a string, checks the config-file for a changed value, sets the intern value variable.
     289        @param value This is only needed to determine the right type.
     290        @param classname The name of the class the variable belongs to
     291        @param varname The name of the variable
     292        @param defvalue The default-value
     293    */
     294    ConfigValueContainer::ConfigValueContainer(const String& classname, const String& varname, Vector3 defvalue)
     295    {
     296        this->bAddedDescription_ = false;
     297        this->classname_ = classname;
     298        this->varname_ = varname;
     299        this->type_ = _Vector3;
    300300
    301301        // Try to convert the default-value from Vector3 to string
     
    307307
    308308        this->searchConfigFileLine();                                               // Search the entry in the config-file
    309         std::string valueString = this->parseValueString();                         // Parses the value string from the config-file-entry
    310         if (!this->parseSting(valueString, defvalue))                               // Try to convert the string to a value
    311             this->resetConfigFileEntry();                                           // The conversion failed
    312     }
    313 
    314     /**
    315         @brief Constructor: Converts the default-value to a string, checks the config-file for a changed value, sets the intern value variable.
    316         @param value This is only needed to determine the right type.
    317         @param classname The name of the class the variable belongs to
    318         @param varname The name of the variable
    319         @param defvalue The default-value
    320     */
    321     ConfigValueContainer::ConfigValueContainer(const std::string& classname, const std::string& varname, Ogre::ColourValue defvalue)
    322     {
    323         this->bAddedDescription_ = false;
    324         this->classname_ = classname;
    325         this->varname_ = varname;
    326         this->type_ = ColourValue;
     309        String valueString = this->parseValueString();                         // Parses the value string from the config-file-entry
     310        if (!this->parseSting(valueString, defvalue))                               // Try to convert the string to a value
     311            this->resetConfigFileEntry();                                           // The conversion failed
     312    }
     313
     314    /**
     315        @brief Constructor: Converts the default-value to a string, checks the config-file for a changed value, sets the intern value variable.
     316        @param value This is only needed to determine the right type.
     317        @param classname The name of the class the variable belongs to
     318        @param varname The name of the variable
     319        @param defvalue The default-value
     320    */
     321    ConfigValueContainer::ConfigValueContainer(const String& classname, const String& varname, ColourValue defvalue)
     322    {
     323        this->bAddedDescription_ = false;
     324        this->classname_ = classname;
     325        this->varname_ = varname;
     326        this->type_ = _ColourValue;
    327327
    328328        // Try to convert the default-value from ColourValue to string
     
    334334
    335335        this->searchConfigFileLine();                                               // Search the entry in the config-file
    336         std::string valueString = this->parseValueString();                         // Parses the value string from the config-file-entry
    337         if (!this->parseSting(valueString, defvalue))                               // Try to convert the string to a value
    338             this->resetConfigFileEntry();                                           // The conversion failed
    339     }
    340 
    341     /**
    342         @brief Parses a given std::string into a value of the type of the associated variable and assigns it.
    343         @param input The string to convert
    344         @return True if the string was successfully parsed
    345     */
    346     bool ConfigValueContainer::parseSting(const std::string& input)
     336        String valueString = this->parseValueString();                         // Parses the value string from the config-file-entry
     337        if (!this->parseSting(valueString, defvalue))                               // Try to convert the string to a value
     338            this->resetConfigFileEntry();                                           // The conversion failed
     339    }
     340
     341    /**
     342        @brief Parses a given String into a value of the type of the associated variable and assigns it.
     343        @param input The string to convert
     344        @return True if the string was successfully parsed
     345    */
     346    bool ConfigValueContainer::parseSting(const String& input)
    347347    {
    348348        if (this->type_ == ConfigValueContainer::Int)
     
    362362        else if (this->type_ == ConfigValueContainer::Bool)
    363363            return this->parseSting(input, this->value_.value_bool_);
    364         else if (this->type_ == ConfigValueContainer::String)
     364        else if (this->type_ == ConfigValueContainer::_String)
    365365            return this->parseSting(input, this->value_string_);
    366366        else if (this->type_ == ConfigValueContainer::ConstChar)
    367367            return this->parseSting(input, this->value_string_);
    368         else if (this->type_ == ConfigValueContainer::Vector2)
     368        else if (this->type_ == ConfigValueContainer::_Vector2)
    369369            return this->parseSting(input, this->value_vector2_);
    370         else if (this->type_ == ConfigValueContainer::Vector3)
     370        else if (this->type_ == ConfigValueContainer::_Vector3)
    371371            return this->parseSting(input, this->value_vector3_);
    372         else if (this->type_ == ConfigValueContainer::ColourValue)
     372        else if (this->type_ == ConfigValueContainer::_ColourValue)
    373373            return this->parseSting(input, this->value_colourvalue_);
    374374
     
    377377
    378378    /**
    379         @brief Parses a given std::string into a value of the type int and assigns it to the right variable. If the conversion failed, the default-value gets assigned.
    380         @param input The string to convert
    381         @param defvalue The default-value
    382         @return True if the string was successfully parsed
    383     */
    384     bool ConfigValueContainer::parseSting(const std::string& input, int defvalue)
     379        @brief Parses a given String into a value of the type int and assigns it to the right variable. If the conversion failed, the default-value gets assigned.
     380        @param input The string to convert
     381        @param defvalue The default-value
     382        @return True if the string was successfully parsed
     383    */
     384    bool ConfigValueContainer::parseSting(const String& input, int defvalue)
    385385    {
    386386        return string2Number(this->value_.value_int_, input, defvalue);
     
    388388
    389389    /**
    390         @brief Parses a given std::string into a value of the type unsigned int and assigns it to the right variable. If the conversion failed, the default-value gets assigned.
    391         @param input The string to convert
    392         @param defvalue The default-value
    393         @return True if the string was successfully parsed
    394     */
    395     bool ConfigValueContainer::parseSting(const std::string& input, unsigned int defvalue)
     390        @brief Parses a given String into a value of the type unsigned int and assigns it to the right variable. If the conversion failed, the default-value gets assigned.
     391        @param input The string to convert
     392        @param defvalue The default-value
     393        @return True if the string was successfully parsed
     394    */
     395    bool ConfigValueContainer::parseSting(const String& input, unsigned int defvalue)
    396396    {
    397397        return string2Number(this->value_.value_uint_, input, defvalue);
     
    399399
    400400    /**
    401         @brief Parses a given std::string into a value of the type char and assigns it to the right variable. If the conversion failed, the default-value gets assigned.
    402         @param input The string to convert
    403         @param defvalue The default-value
    404         @return True if the string was successfully parsed
    405     */
    406     bool ConfigValueContainer::parseSting(const std::string& input, char defvalue)
     401        @brief Parses a given String into a value of the type char and assigns it to the right variable. If the conversion failed, the default-value gets assigned.
     402        @param input The string to convert
     403        @param defvalue The default-value
     404        @return True if the string was successfully parsed
     405    */
     406    bool ConfigValueContainer::parseSting(const String& input, char defvalue)
    407407    {
    408408        // I used value_int_ instead of value_char_ to avoid number <-> char confusion in the config-file
     
    411411
    412412    /**
    413         @brief Parses a given std::string into a value of the type unsigned char and assigns it to the right variable. If the conversion failed, the default-value gets assigned.
    414         @param input The string to convert
    415         @param defvalue The default-value
    416         @return True if the string was successfully parsed
    417     */
    418     bool ConfigValueContainer::parseSting(const std::string& input, unsigned char defvalue)
     413        @brief Parses a given String into a value of the type unsigned char and assigns it to the right variable. If the conversion failed, the default-value gets assigned.
     414        @param input The string to convert
     415        @param defvalue The default-value
     416        @return True if the string was successfully parsed
     417    */
     418    bool ConfigValueContainer::parseSting(const String& input, unsigned char defvalue)
    419419    {
    420420        // I used value_uint_ instead of value_uchar_ to avoid number <-> char confusion in the config-file
     
    423423
    424424    /**
    425         @brief Parses a given std::string into a value of the type float and assigns it to the right variable. If the conversion failed, the default-value gets assigned.
    426         @param input The string to convert
    427         @param defvalue The default-value
    428         @return True if the string was successfully parsed
    429     */
    430     bool ConfigValueContainer::parseSting(const std::string& input, float defvalue)
     425        @brief Parses a given String into a value of the type float and assigns it to the right variable. If the conversion failed, the default-value gets assigned.
     426        @param input The string to convert
     427        @param defvalue The default-value
     428        @return True if the string was successfully parsed
     429    */
     430    bool ConfigValueContainer::parseSting(const String& input, float defvalue)
    431431    {
    432432        return string2Number(this->value_.value_float_, input, defvalue);
     
    434434
    435435    /**
    436         @brief Parses a given std::string into a value of the type double and assigns it to the right variable. If the conversion failed, the default-value gets assigned.
    437         @param input The string to convert
    438         @param defvalue The default-value
    439         @return True if the string was successfully parsed
    440     */
    441     bool ConfigValueContainer::parseSting(const std::string& input, double defvalue)
     436        @brief Parses a given String into a value of the type double and assigns it to the right variable. If the conversion failed, the default-value gets assigned.
     437        @param input The string to convert
     438        @param defvalue The default-value
     439        @return True if the string was successfully parsed
     440    */
     441    bool ConfigValueContainer::parseSting(const String& input, double defvalue)
    442442    {
    443443        return string2Number(this->value_.value_double_, input, defvalue);
     
    445445
    446446    /**
    447         @brief Parses a given std::string into a value of the type long double and assigns it to the right variable. If the conversion failed, the default-value gets assigned.
    448         @param input The string to convert
    449         @param defvalue The default-value
    450         @return True if the string was successfully parsed
    451     */
    452     bool ConfigValueContainer::parseSting(const std::string& input, long double defvalue)
     447        @brief Parses a given String into a value of the type long double and assigns it to the right variable. If the conversion failed, the default-value gets assigned.
     448        @param input The string to convert
     449        @param defvalue The default-value
     450        @return True if the string was successfully parsed
     451    */
     452    bool ConfigValueContainer::parseSting(const String& input, long double defvalue)
    453453    {
    454454        return string2Number(this->value_.value_long_double_, input, defvalue);
     
    456456
    457457    /**
    458         @brief Parses a given std::string into a value of the type bool and assigns it to the right variable. If the conversion failed, the default-value gets assigned.
    459         @param input The string to convert
    460         @param defvalue The default-value
    461         @return True if the string was successfully parsed
    462     */
    463     bool ConfigValueContainer::parseSting(const std::string& input, bool defvalue)
     458        @brief Parses a given String into a value of the type bool and assigns it to the right variable. If the conversion failed, the default-value gets assigned.
     459        @param input The string to convert
     460        @param defvalue The default-value
     461        @return True if the string was successfully parsed
     462    */
     463    bool ConfigValueContainer::parseSting(const String& input, bool defvalue)
    464464    {
    465465        // Try to parse the value-string - is it a word?
     
    484484
    485485    /**
    486         @brief Parses a given std::string into a value of the type std::string and assigns it to the right variable. If the conversion failed, the default-value gets assigned.
    487         @param input The string to convert
    488         @param defvalue The default-value
    489         @return True if the string was successfully parsed
    490     */
    491     bool ConfigValueContainer::parseSting(const std::string& input, const std::string& defvalue)
     486        @brief Parses a given String into a value of the type String and assigns it to the right variable. If the conversion failed, the default-value gets assigned.
     487        @param input The string to convert
     488        @param defvalue The default-value
     489        @return True if the string was successfully parsed
     490    */
     491    bool ConfigValueContainer::parseSting(const String& input, const String& defvalue)
    492492    {
    493493        // Strip the quotes
     
    509509
    510510    /**
    511         @brief Parses a given std::string into a value of the type const char* and assigns it to the right variable. If the conversion failed, the default-value gets assigned.
    512         @param input The string to convert
    513         @param defvalue The default-value
    514         @return True if the string was successfully parsed
    515     */
    516     bool ConfigValueContainer::parseSting(const std::string& input, const char* defvalue)
     511        @brief Parses a given String into a value of the type const char* and assigns it to the right variable. If the conversion failed, the default-value gets assigned.
     512        @param input The string to convert
     513        @param defvalue The default-value
     514        @return True if the string was successfully parsed
     515    */
     516    bool ConfigValueContainer::parseSting(const String& input, const char* defvalue)
    517517    {
    518518        // Strip the quotes
     
    534534
    535535    /**
    536         @brief Parses a given std::string into a value of the type Ogre::Vector2 and assigns it to the right variable. If the conversion failed, the default-value gets assigned.
    537         @param input The string to convert
    538         @param defvalue The default-value
    539         @return True if the string was successfully parsed
    540     */
    541     bool ConfigValueContainer::parseSting(const std::string& input, const Ogre::Vector2& defvalue)
     536        @brief Parses a given String into a value of the type _Vector2 and assigns it to the right variable. If the conversion failed, the default-value gets assigned.
     537        @param input The string to convert
     538        @param defvalue The default-value
     539        @return True if the string was successfully parsed
     540    */
     541    bool ConfigValueContainer::parseSting(const String& input, const Vector2& defvalue)
    542542    {
    543543        // Strip the value-string
     
    548548        if (pos1 < input.length() && pos2 < input.length() && pos1 < pos2)
    549549        {
    550             std::vector<std::string> tokens = tokenize(input.substr(pos1, pos2 - pos1), ",");
     550            std::vector<String> tokens = tokenize(input.substr(pos1, pos2 - pos1), ",");
    551551            if (!string2Number(this->value_vector2_.x, tokens[0], defvalue.x))
    552552            {
     
    568568
    569569    /**
    570         @brief Parses a given std::string into a value of the type Ogre::Vector3 and assigns it to the right variable. If the conversion failed, the default-value gets assigned.
    571         @param input The string to convert
    572         @param defvalue The default-value
    573         @return True if the string was successfully parsed
    574     */
    575     bool ConfigValueContainer::parseSting(const std::string& input, const Ogre::Vector3& defvalue)
     570        @brief Parses a given String into a value of the type Vector3 and assigns it to the right variable. If the conversion failed, the default-value gets assigned.
     571        @param input The string to convert
     572        @param defvalue The default-value
     573        @return True if the string was successfully parsed
     574    */
     575    bool ConfigValueContainer::parseSting(const String& input, const Vector3& defvalue)
    576576    {
    577577        // Strip the value-string
     
    582582        if (pos1 < input.length() && pos2 < input.length() && pos1 < pos2)
    583583        {
    584             std::vector<std::string> tokens = tokenize(input.substr(pos1, pos2 - pos1), ",");
     584            std::vector<String> tokens = tokenize(input.substr(pos1, pos2 - pos1), ",");
    585585            if (!string2Number(this->value_vector3_.x, tokens[0], defvalue.x))
    586586            {
     
    607607
    608608    /**
    609         @brief Parses a given std::string into a value of the type Ogre::ColourValue and assigns it to the right variable. If the conversion failed, the default-value gets assigned.
    610         @param input The string to convert
    611         @param defvalue The default-value
    612         @return True if the string was successfully parsed
    613     */
    614     bool ConfigValueContainer::parseSting(const std::string& input, const Ogre::ColourValue& defvalue)
     609        @brief Parses a given String into a value of the type ColourValue and assigns it to the right variable. If the conversion failed, the default-value gets assigned.
     610        @param input The string to convert
     611        @param defvalue The default-value
     612        @return True if the string was successfully parsed
     613    */
     614    bool ConfigValueContainer::parseSting(const String& input, const ColourValue& defvalue)
    615615    {
    616616        // Strip the value-string
     
    621621        if (pos1 < input.length() && pos2 < input.length() && pos1 < pos2)
    622622        {
    623             std::vector<std::string> tokens = tokenize(input.substr(pos1, pos2 - pos1), ",");
     623            std::vector<String> tokens = tokenize(input.substr(pos1, pos2 - pos1), ",");
    624624            if (!string2Number(this->value_colourvalue_.r, tokens[0], defvalue.r))
    625625            {
     
    678678
    679679        // The string of the section we're searching
    680         std::string section = "";
     680        String section = "";
    681681        section.append("[");
    682682        section.append(this->classname_);
     
    685685        // Iterate through all config-file-lines
    686686        bool success = false;
    687         std::list<std::string>::iterator it1;
     687        std::list<String>::iterator it1;
    688688        for(it1 = ConfigValueContainer::getConfigFileLines().begin(); it1 != ConfigValueContainer::getConfigFileLines().end(); ++it1)
    689689        {
     
    696696                // We found the right section
    697697                bool bLineIsEmpty = false;
    698                 std::list<std::string>::iterator positionToPutNewLineAt;
     698                std::list<String>::iterator positionToPutNewLineAt;
    699699
    700700                // Iterate through all lines in the section
    701                 std::list<std::string>::iterator it2;
     701                std::list<String>::iterator it2;
    702702                for(it2 = ++it1; it2 != ConfigValueContainer::getConfigFileLines().end(); ++it2)
    703703                {
     
    777777        @return True = it's a comment
    778778    */
    779     bool ConfigValueContainer::isComment(const std::string& line)
     779    bool ConfigValueContainer::isComment(const String& line)
    780780    {
    781781        // Strip the line, whitespaces are disturbing
    782         std::string teststring = getStrippedLine(line);
     782        String teststring = getStrippedLine(line);
    783783
    784784        // There are four possible comment-symbols:
     
    798798        @return True = it's empty
    799799    */
    800     bool ConfigValueContainer::isEmpty(const std::string& line)
     800    bool ConfigValueContainer::isEmpty(const String& line)
    801801    {
    802802        return getStrippedLine(line) == "";
     
    808808        @return The stripped line
    809809    */
    810     std::string ConfigValueContainer::getStrippedLine(const std::string& line)
    811     {
    812         std::string output = line;
     810    String ConfigValueContainer::getStrippedLine(const String& line)
     811    {
     812        String output = line;
    813813        unsigned int pos;
    814814        while ((pos = output.find(" ")) < output.length())
     
    825825        @return The value-string
    826826    */
    827     std::string ConfigValueContainer::parseValueString(bool bStripped)
    828     {
    829         std::string output;
     827    String ConfigValueContainer::parseValueString(bool bStripped)
     828    {
     829        String output;
    830830        if (bStripped)
    831831            output = this->getStrippedLine(*this->configFileLine_);
     
    839839        @returns a list, containing all entrys in the config-file.
    840840    */
    841     std::list<std::string>& ConfigValueContainer::getConfigFileLines()
     841    std::list<String>& ConfigValueContainer::getConfigFileLines()
    842842    {
    843843        // This is done to avoid problems while executing this code before main()
    844         static std::list<std::string> configFileLinesStaticReference = std::list<std::string>();
     844        static std::list<String> configFileLinesStaticReference = std::list<String>();
    845845        return configFileLinesStaticReference;
    846846    }
     
    866866        @param filename The name of the config-file
    867867    */
    868     void ConfigValueContainer::readConfigFile(const std::string& filename)
     868    void ConfigValueContainer::readConfigFile(const String& filename)
    869869    {
    870870        // This creates the file if it's not existing
     
    913913        @param filename The name of the config-file
    914914    */
    915     void ConfigValueContainer::writeConfigFile(const std::string& filename)
     915    void ConfigValueContainer::writeConfigFile(const String& filename)
    916916    {
    917917        // Make sure we stored the config-file in the list
     
    930930
    931931        // Iterate through the list an write the lines into the file
    932         std::list<std::string>::iterator it;
     932        std::list<String>::iterator it;
    933933        for (it = ConfigValueContainer::getConfigFileLines().begin(); it != ConfigValueContainer::getConfigFileLines().end(); ++it)
    934934        {
     
    943943        @param description The description
    944944    */
    945     void ConfigValueContainer::description(const std::string& description)
     945    void ConfigValueContainer::description(const String& description)
    946946    {
    947947        if (!this->bAddedDescription_)
    948948        {
    949             this->description_ = std::string("ConfigValueDescription::" + this->classname_ + "::" + this->varname_);
     949            this->description_ = String("ConfigValueDescription::" + this->classname_ + "::" + this->varname_);
    950950            Language::getLanguage().addEntry(description_, description);
    951951            this->bAddedDescription_ = true;
  • code/branches/FICN/src/orxonox/core/ConfigValueContainer.h

    r705 r708  
    4343#define _ConfigValueContainer_H__
    4444
    45 #include <string>
    4645#include <list>
    4746
    4847#include "CorePrereqs.h"
    4948
    50 #include "OgreVector2.h"
    51 #include "OgreVector3.h"
    52 #include "OgreColourValue.h"
     49#include "misc/Vector2.h"
     50#include "misc/Vector3.h"
     51#include "misc/Matrix3.h"
     52#include "misc/Quaternion.h"
     53#include "misc/String.h"
     54#include "misc/ColourValue.h"
    5355#include "Language.h"
    5456
     
    8587                Bool,
    8688                ConstChar,
    87                 String,
    88                 Vector2,
    89                 Vector3,
    90                 ColourValue
     89                _String,
     90                _Vector2,
     91                _Vector3,
     92                _ColourValue
    9193            };
    9294
    93             ConfigValueContainer(const std::string& classname, const std::string& varname, int defvalue);
    94             ConfigValueContainer(const std::string& classname, const std::string& varname, unsigned int defvalue);
    95             ConfigValueContainer(const std::string& classname, const std::string& varname, char defvalue);
    96             ConfigValueContainer(const std::string& classname, const std::string& varname, unsigned char defvalue);
    97             ConfigValueContainer(const std::string& classname, const std::string& varname, float defvalue);
    98             ConfigValueContainer(const std::string& classname, const std::string& varname, double defvalue);
    99             ConfigValueContainer(const std::string& classname, const std::string& varname, long double defvalue);
    100             ConfigValueContainer(const std::string& classname, const std::string& varname, bool defvalue);
    101             ConfigValueContainer(const std::string& classname, const std::string& varname, const std::string& defvalue);
    102             ConfigValueContainer(const std::string& classname, const std::string& varname, const char* defvalue);
    103             ConfigValueContainer(const std::string& classname, const std::string& varname, Ogre::Vector2 defvalue);
    104             ConfigValueContainer(const std::string& classname, const std::string& varname, Ogre::Vector3 defvalue);
    105             ConfigValueContainer(const std::string& classname, const std::string& varname, Ogre::ColourValue defvalue);
     95            ConfigValueContainer(const String& classname, const String& varname, int defvalue);
     96            ConfigValueContainer(const String& classname, const String& varname, unsigned int defvalue);
     97            ConfigValueContainer(const String& classname, const String& varname, char defvalue);
     98            ConfigValueContainer(const String& classname, const String& varname, unsigned char defvalue);
     99            ConfigValueContainer(const String& classname, const String& varname, float defvalue);
     100            ConfigValueContainer(const String& classname, const String& varname, double defvalue);
     101            ConfigValueContainer(const String& classname, const String& varname, long double defvalue);
     102            ConfigValueContainer(const String& classname, const String& varname, bool defvalue);
     103            ConfigValueContainer(const String& classname, const String& varname, const String& defvalue);
     104            ConfigValueContainer(const String& classname, const String& varname, const char* defvalue);
     105            ConfigValueContainer(const String& classname, const String& varname, Vector2 defvalue);
     106            ConfigValueContainer(const String& classname, const String& varname, Vector3 defvalue);
     107            ConfigValueContainer(const String& classname, const String& varname, ColourValue defvalue);
    106108
    107109            /** @returns the value. @param value This is only needed to determine the right type. */
     
    122124            inline ConfigValueContainer& getValue(bool& value)                          { value = this->value_.value_bool_; return *this; }
    123125            /** @returns the value. @param value This is only needed to determine the right type. */
    124             inline ConfigValueContainer& getValue(std::string& value)                   { value = this->value_string_; return *this; }
     126            inline ConfigValueContainer& getValue(String& value)                   { value = this->value_string_; return *this; }
    125127            /** @returns the value. @param value This is only needed to determine the right type. */
    126128            inline ConfigValueContainer& getValue(const char* value)                    { value = this->value_string_.c_str(); return *this; }
    127129            /** @returns the value. @param value This is only needed to determine the right type. */
    128             inline ConfigValueContainer& getValue(Ogre::Vector2& value)                 { value = this->value_vector2_; return *this; }
     130            inline ConfigValueContainer& getValue(Vector2& value)                 { value = this->value_vector2_; return *this; }
    129131            /** @returns the value. @param value This is only needed to determine the right type. */
    130             inline ConfigValueContainer& getValue(Ogre::Vector3& value)                 { value = this->value_vector3_; return *this; }
     132            inline ConfigValueContainer& getValue(Vector3& value)                 { value = this->value_vector3_; return *this; }
    131133            /** @returns the value. @param value This is only needed to determine the right type. */
    132             inline ConfigValueContainer& getValue(Ogre::ColourValue& value)             { value = this->value_colourvalue_; return *this; }
     134            inline ConfigValueContainer& getValue(ColourValue& value)             { value = this->value_colourvalue_; return *this; }
    133135
    134             void description(const std::string& description);
     136            void description(const String& description);
    135137
    136             bool parseSting(const std::string& input);
     138            bool parseSting(const String& input);
    137139            void resetConfigFileEntry();
    138140            void resetConfigValue();
    139141
    140             static std::string getStrippedLine(const std::string& line);
    141             static bool isEmpty(const std::string& line);
    142             static bool isComment(const std::string& line);
     142            static String getStrippedLine(const String& line);
     143            static bool isEmpty(const String& line);
     144            static bool isComment(const String& line);
    143145
    144146        private:
    145             bool parseSting(const std::string& input, int defvalue);
    146             bool parseSting(const std::string& input, unsigned int defvalue);
    147             bool parseSting(const std::string& input, char defvalue);
    148             bool parseSting(const std::string& input, unsigned char defvalue);
    149             bool parseSting(const std::string& input, float defvalue);
    150             bool parseSting(const std::string& input, double defvalue);
    151             bool parseSting(const std::string& input, long double defvalue);
    152             bool parseSting(const std::string& input, bool defvalue);
    153             bool parseSting(const std::string& input, const std::string& defvalue);
    154             bool parseSting(const std::string& input, const char* defvalue);
    155             bool parseSting(const std::string& input, const Ogre::Vector2& defvalue);
    156             bool parseSting(const std::string& input, const Ogre::Vector3& defvalue);
    157             bool parseSting(const std::string& input, const Ogre::ColourValue& defvalue);
     147            bool parseSting(const String& input, int defvalue);
     148            bool parseSting(const String& input, unsigned int defvalue);
     149            bool parseSting(const String& input, char defvalue);
     150            bool parseSting(const String& input, unsigned char defvalue);
     151            bool parseSting(const String& input, float defvalue);
     152            bool parseSting(const String& input, double defvalue);
     153            bool parseSting(const String& input, long double defvalue);
     154            bool parseSting(const String& input, bool defvalue);
     155            bool parseSting(const String& input, const String& defvalue);
     156            bool parseSting(const String& input, const char* defvalue);
     157            bool parseSting(const String& input, const Vector2& defvalue);
     158            bool parseSting(const String& input, const Vector3& defvalue);
     159            bool parseSting(const String& input, const ColourValue& defvalue);
    158160
    159             static std::list<std::string>& getConfigFileLines();
     161            static std::list<String>& getConfigFileLines();
    160162            static bool finishedReadingConfigFile(bool finished = false);
    161163            void searchConfigFileLine();
    162             std::string parseValueString(bool bStripped = true);
     164            String parseValueString(bool bStripped = true);
    163165
    164             static void readConfigFile(const std::string& filename);
    165             static void writeConfigFile(const std::string& filename);
     166            static void readConfigFile(const String& filename);
     167            static void writeConfigFile(const String& filename);
    166168
    167             std::string         classname_;                     //!< The name of the class the variable belongs to
    168             std::string         varname_;                       //!< The name of the variable
    169             std::string         defvalueString_;                //!< The string of the default-variable
     169            String         classname_;                     //!< The name of the class the variable belongs to
     170            String         varname_;                       //!< The name of the variable
     171            String         defvalueString_;                //!< The string of the default-variable
    170172
    171173            union MultiType
     
    181183            } value_;                                           //!< The value of the variable
    182184
    183             std::string         value_string_;                  //!< The value, if the variable is of the type string
    184             Ogre::Vector2       value_vector2_;                 //!< The value, if the variable is of the type Vector2
    185             Ogre::Vector3       value_vector3_;                 //!< The value, if the variable is of the type Vector3
    186             Ogre::ColourValue   value_colourvalue_;             //!< The value, if the variable is of the type ColourValue
     185            String         value_string_;                  //!< The value, if the variable is of the type string
     186            Vector2       value_vector2_;                 //!< The value, if the variable is of the type Vector2
     187            Vector3       value_vector3_;                 //!< The value, if the variable is of the type Vector3
     188            ColourValue   value_colourvalue_;             //!< The value, if the variable is of the type ColourValue
    187189
    188             std::list<std::string>::iterator configFileLine_;   //!< An iterator, pointing to the entry of the variable in the config-file
     190            std::list<String>::iterator configFileLine_;   //!< An iterator, pointing to the entry of the variable in the config-file
    189191
    190192            VariableType type_;                                 //!< The type of the variable
  • code/branches/FICN/src/orxonox/core/CoreIncludes.h

    r705 r708  
    5050#include "ConfigValueContainer.h"
    5151#include "Debug.h"
    52 
    53 #include "OgreVector2.h"
    54 #include "OgreVector3.h"
    55 #include "OgreColourValue.h"
    56 #include "OgreQuaternion.h"
    57 #include "OgreMatrix3.h"
    58 
    59 
    60 // Some typedefs
    61 namespace orxonox
    62 {
    63     typedef Ogre::Vector2 Vector2;
    64     typedef Ogre::Vector3 Vector3;
    65     typedef Ogre::ColourValue ColourValue;
    66     typedef Ogre::Radian Radian;
    67     typedef Ogre::Degree Degree;
    68     typedef Ogre::Real Real;
    69     typedef Ogre::Quaternion Quaternion;
    70     typedef Ogre::Matrix3 Matrix3;
    71 }
    72 
    7352
    7453/**
  • code/branches/FICN/src/orxonox/core/CorePrereqs.h

    r705 r708  
    3434#define _CorePrereqs_H__
    3535
    36 #include "../OrxonoxPlatform.h"
     36#include "orxonox/OrxonoxPlatform.h"
    3737
    3838//-----------------------------------------------------------------------
  • code/branches/FICN/src/orxonox/core/Debug.h

    r699 r708  
    3737
    3838#include <stdio.h>
     39
     40#include "CorePrereqs.h"
     41
    3942#include "OutputHandler.h"
    40 
    41 #include "CorePrereqs.h"
    4243
    4344extern "C" _CoreExport int getSoftDebugLevel();
  • code/branches/FICN/src/orxonox/core/DebugLevel.h

    r704 r708  
    3838
    3939#include "CorePrereqs.h"
     40
    4041#include "OrxonoxClass.h"
    4142#include "OutputHandler.h"
  • code/branches/FICN/src/orxonox/core/Error.cc

    r670 r708  
    2626 */
    2727
     28#include "Debug.h"
    2829#include "Error.h"
    29 #include "Debug.h"
    3030
    3131namespace orxonox
     
    3636        }
    3737
    38         Error::Error(std::string errorMsg, int errorCode)
     38        Error::Error(String errorMsg, int errorCode)
    3939        {
    4040                Error(errorCode, errorMsg);
    4141        }
    4242
    43         Error::Error(int errorCode, std::string errorMsg)
     43        Error::Error(int errorCode, String errorMsg)
    4444        {
    4545                COUT(1) << "############################ "<< std::endl
  • code/branches/FICN/src/orxonox/core/Error.h

    r684 r708  
    2929#define _Error_H__
    3030
    31 #include <string>
     31#include "CorePrereqs.h"
    3232
    33 #include "CorePrereqs.h"
     33#include "misc/String.h"
    3434
    3535namespace orxonox
     
    3939        public:
    4040                Error();
    41                 Error(std::string errorMsg, int errorCode=0);
    42                 Error(int errorCode, std::string errorMsg="");
     41                Error(String errorMsg, int errorCode = 0);
     42                Error(int errorCode, String errorMsg = "");
    4343        private:
    4444
  • code/branches/FICN/src/orxonox/core/Factory.cc

    r698 r708  
    4242        @param name The name of the wanted Identifier
    4343    */
    44     Identifier* Factory::getIdentifier(const std::string& name)
     44    Identifier* Factory::getIdentifier(const String& name)
    4545    {
    4646        return getFactoryPointer()->identifierStringMap_[name];
     
    6161        @param identifier The identifier to add
    6262    */
    63     void Factory::add(const std::string& name, Identifier* identifier)
     63    void Factory::add(const String& name, Identifier* identifier)
    6464    {
    6565        getFactoryPointer()->identifierStringMap_[name] = identifier;
     
    8585    {
    8686        COUT(3) << "*** Factory -> Create class-hierarchy" << std::endl;
    87         std::map<std::string, Identifier*>::iterator it;
     87        std::map<String, Identifier*>::iterator it;
    8888        it = getFactoryPointer()->identifierStringMap_.begin();
    8989        (*getFactoryPointer()->identifierStringMap_.begin()).second->startCreatingHierarchy();
  • code/branches/FICN/src/orxonox/core/Factory.h

    r682 r708  
    4545
    4646#include <map>
    47 #include <string>
    4847
    4948#include "CorePrereqs.h"
     49
     50#include "misc/String.h"
    5051
    5152namespace orxonox
     
    6061    {
    6162        public:
    62             static Identifier* getIdentifier(const std::string& name);
     63            static Identifier* getIdentifier(const String& name);
    6364            static Identifier* getIdentifier(const unsigned int id);
    64             static void add(const std::string& name, Identifier* identifier);
     65            static void add(const String& name, Identifier* identifier);
    6566            static void changeNetworkID(Identifier* identifier, const unsigned int oldID, const unsigned int newID);
    6667            static void createClassHierarchy();
    6768
    68             static Factory* getFactoryPointer();// avoid overriding pointer_s in the static intialisation process
     69            static Factory* getFactoryPointer();    // avoid overriding order problem in the static intialisation process
    6970
    7071        private:
     
    7374            ~Factory() {}                           // don't delete
    7475
    75             std::map<std::string, Identifier*> identifierStringMap_;            //!< The map, mapping the name with the Identifier
     76            std::map<String, Identifier*> identifierStringMap_;            //!< The map, mapping the name with the Identifier
    7677            std::map<unsigned int, Identifier*> identifierNetworkIDMap_;        //!< The map, mapping the network ID with the Identifier
    7778    };
  • code/branches/FICN/src/orxonox/core/Identifier.cc

    r698 r708  
    118118        @returns a reference to the Identifier map, containing all Identifiers.
    119119    */
    120     std::map<std::string, Identifier*>& Identifier::getIdentifierMap()
     120    std::map<String, Identifier*>& Identifier::getIdentifierMap()
    121121    {
    122         static std::map<std::string, Identifier*> identifierMapStaticReference = std::map<std::string, Identifier*>();
     122        static std::map<String, Identifier*> identifierMapStaticReference = std::map<String, Identifier*>();
    123123        return identifierMapStaticReference;
    124124    }
  • code/branches/FICN/src/orxonox/core/Identifier.h

    r700 r708  
    5252#define _Identifier_H__
    5353
    54 #include <string>
    5554#include <map>
    5655
    5756#include "CorePrereqs.h"
    5857
     58#include "misc/String.h"
    5959#include "ObjectList.h"
    6060#include "IdentifierList.h"
     
    112112
    113113            /** @returns the name of the class the Identifier belongs to. */
    114             inline const std::string& getName() const { return this->name_; }
     114            inline const String& getName() const { return this->name_; }
    115115
    116116            /** @returns the parents of the class the Identifier belongs to. */
     
    130130
    131131            /** @returns the ConfigValueContainer of a variable, given by the string of its name. @param varname The name of the variable */
    132             inline ConfigValueContainer* getConfigValueContainer(const std::string& varname)
     132            inline ConfigValueContainer* getConfigValueContainer(const String& varname)
    133133                { return this->configValues_[varname]; }
    134134
    135135            /** @brief Sets the ConfigValueContainer of a variable, given by the string of its name. @param varname The name of the variablee @param container The container */
    136             inline void setConfigValueContainer(const std::string& varname, ConfigValueContainer* container)
     136            inline void setConfigValueContainer(const String& varname, ConfigValueContainer* container)
    137137                { this->configValues_[varname] = container; }
    138138
    139             static std::map<std::string, Identifier*>& getIdentifierMap();
     139            static std::map<String, Identifier*>& getIdentifierMap();
    140140
    141141        private:
     
    166166            IdentifierList* children_;                                  //!< The Children of the class the Identifier belongs to
    167167
    168             std::string name_;                                          //!< The name of the class the Identifier belongs to
     168            String name_;                                          //!< The name of the class the Identifier belongs to
    169169
    170170            BaseFactory* factory_;                                      //!< The Factory, able to create new objects of the given class (if available)
     
    172172            static int hierarchyCreatingCounter_s;                      //!< Bigger than zero if at least one Identifier stores its parents (its an int instead of a bool to avoid conflicts with multithreading)
    173173            unsigned int classID_;                                      //!< The network ID to identify a class through the network
    174             std::map<std::string, ConfigValueContainer*> configValues_; //!< A map to link the string of configurable variables with their ConfigValueContainer
     174            std::map<String, ConfigValueContainer*> configValues_; //!< A map to link the string of configurable variables with their ConfigValueContainer
    175175    };
    176176
     
    189189    {
    190190        public:
    191             static ClassIdentifier<T>* registerClass(const IdentifierList* parents, const std::string& name, bool bRootClass);
     191            static ClassIdentifier<T>* registerClass(const IdentifierList* parents, const String& name, bool bRootClass);
    192192            static void addObject(T* object);
    193193            static ClassIdentifier<T>* getIdentifier();
    194             void setName(const std::string& name);
     194            void setName(const String& name);
    195195
    196196        private:
     
    221221    */
    222222    template <class T>
    223     ClassIdentifier<T>* ClassIdentifier<T>::registerClass(const IdentifierList* parents, const std::string& name, bool bRootClass)
     223    ClassIdentifier<T>* ClassIdentifier<T>::registerClass(const IdentifierList* parents, const String& name, bool bRootClass)
    224224    {
    225225        COUT(4) << "*** Register Class in " << name << "-Singleton." << std::endl;
     
    265265    */
    266266    template <class T>
    267     void ClassIdentifier<T>::setName(const std::string& name)
     267    void ClassIdentifier<T>::setName(const String& name)
    268268    {
    269269        // Make sure we didn't already set the name, to avoid duplicate entries in the Identifier map
     
    271271        {
    272272            this->name_ = name;
    273             this->getIdentifierMap().insert(std::pair<std::string, Identifier*>(name, this));
     273            this->getIdentifierMap().insert(std::pair<String, Identifier*>(name, this));
    274274            this->bSetName_ = true;
    275275        }
  • code/branches/FICN/src/orxonox/core/IdentifierList.cc

    r670 r708  
    3131*/
    3232
     33#include "Identifier.h"
    3334#include "IdentifierList.h"
    34 #include "Identifier.h"
    3535
    3636namespace orxonox
     
    130130        @returns a string, containing a list of the names of all Identifiers in the list.
    131131    */
    132     std::string IdentifierList::toString() const
     132    String IdentifierList::toString() const
    133133    {
    134134        IdentifierListElement* temp = this->first_;
    135         std::string output = "";
     135        String output = "";
    136136
    137137        while (temp)
  • code/branches/FICN/src/orxonox/core/IdentifierList.h

    r682 r708  
    3737#define _IdentifierList_H__
    3838
    39 #include <string>
     39#include "CorePrereqs.h"
    4040
    41 #include "CorePrereqs.h"
     41#include "misc/String.h"
    4242
    4343namespace orxonox
     
    6262            void remove(const Identifier* identifier);
    6363            bool isInList(const Identifier* identifier) const;
    64             std::string toString() const;
     64            String toString() const;
    6565
    6666            IdentifierListElement* first_;      //!< The first element in the list
  • code/branches/FICN/src/orxonox/core/Language.cc

    r704 r708  
    2828#include <fstream>
    2929
     30#include "CoreIncludes.h"
    3031#include "Language.h"
    31 #include "CoreIncludes.h"
    3232
    3333namespace orxonox
     
    3636    // ###      LanguageEntry      ###
    3737    // ###############################
    38     LanguageEntry::LanguageEntry(const std::string& fallbackEntry)
     38    LanguageEntry::LanguageEntry(const String& fallbackEntry)
    3939    {
    4040        RegisterRootObject(LanguageEntry);
     
    4444    }
    4545
    46     void LanguageEntry::setTranslation(const std::string& translation)
     46    void LanguageEntry::setTranslation(const String& translation)
    4747    {
    4848        if (translation.compare("") != 0)
     
    5252    }
    5353
    54     void LanguageEntry::setDefault(const std::string& fallbackEntry)
     54    void LanguageEntry::setDefault(const String& fallbackEntry)
    5555    {
    5656        if (this->translatedEntry_.compare(this->fallbackEntry_) == 0)
     
    8585    }
    8686
    87     void Language::createEntry(const LanguageEntryName& name, const std::string& entry)
     87    void Language::createEntry(const LanguageEntryName& name, const String& entry)
    8888    {
    8989        if (!this->languageEntries_[name])
     
    9999    }
    100100
    101     void Language::addEntry(const LanguageEntryName& name, const std::string& entry)
    102     {
    103         std::map<std::string, LanguageEntry*>::const_iterator it = this->languageEntries_.find(name);
     101    void Language::addEntry(const LanguageEntryName& name, const String& entry)
     102    {
     103        std::map<String, LanguageEntry*>::const_iterator it = this->languageEntries_.find(name);
    104104        if (!it->second)
    105105            this->createEntry(name, entry);
     
    112112    }
    113113
    114     const std::string& Language::getTranslation(const LanguageEntryName& name) const
    115     {
    116         std::map<std::string, LanguageEntry*>::const_iterator it = this->languageEntries_.find(name);
     114    const String& Language::getTranslation(const LanguageEntryName& name) const
     115    {
     116        std::map<String, LanguageEntry*>::const_iterator it = this->languageEntries_.find(name);
    117117        if (it->second)
    118118            return it->second->getTranslation();
     
    124124    }
    125125
    126     const std::string Language::getFileName(const std::string& language)
    127     {
    128         return std::string("translation_" + language + ".lang");
     126    const String Language::getFileName(const String& language)
     127    {
     128        return String("translation_" + language + ".lang");
    129129    }
    130130
     
    154154        {
    155155            file.getline(line, 1024);
    156             std::string lineString = std::string(line);
     156            String lineString = String(line);
    157157            if (lineString.compare("") != 0)
    158158            {
     
    190190        {
    191191            file.getline(line, 1024);
    192             std::string lineString = std::string(line);
     192            String lineString = String(line);
    193193            if (lineString.compare("") != 0)
    194194            {
     
    196196                if (pos < lineString.size() && lineString.size() >= 3)
    197197                {
    198                     std::map<std::string, LanguageEntry*>::const_iterator it = this->languageEntries_.find(lineString.substr(0, pos));
     198                    std::map<String, LanguageEntry*>::const_iterator it = this->languageEntries_.find(lineString.substr(0, pos));
    199199                    if (it->second)
    200200                        it->second->setTranslation(lineString.substr(pos + 1));
  • code/branches/FICN/src/orxonox/core/Language.h

    r704 r708  
    2929#define _Language_H__
    3030
    31 #include <string>
    3231#include <map>
    3332
    3433#include "CorePrereqs.h"
    3534
     35#include "misc/String.h"
    3636#include "OrxonoxClass.h"
    3737
    3838namespace orxonox
    3939{
    40     typedef std::string LanguageEntryName;
     40    typedef String LanguageEntryName;
    4141
    4242    class _CoreExport LanguageEntry : public OrxonoxClass
    4343    {
    4444        public:
    45             explicit LanguageEntry(const std::string& fallbackEntry);
    46             void setTranslation(const std::string& translation);
    47             void setDefault(const std::string& fallbackEntry);
     45            explicit LanguageEntry(const String& fallbackEntry);
     46            void setTranslation(const String& translation);
     47            void setDefault(const String& fallbackEntry);
    4848
    49             inline const std::string& getTranslation()
     49            inline const String& getTranslation()
    5050                { return this->translatedEntry_; }
    5151
    52             inline const std::string& getDefault()
     52            inline const String& getDefault()
    5353                { return this->fallbackEntry_; }
    5454
    5555        private:
    56             std::string fallbackEntry_;
    57             std::string translatedEntry_;
     56            String fallbackEntry_;
     57            String translatedEntry_;
    5858    };
    5959
     
    6363            static Language& getLanguage();
    6464            void setConfigValues();
    65             void addEntry(const LanguageEntryName& name, const std::string& entry);
    66             const std::string& getTranslation(const LanguageEntryName& name) const;
     65            void addEntry(const LanguageEntryName& name, const String& entry);
     66            const String& getTranslation(const LanguageEntryName& name) const;
    6767
    6868        private:
     
    7474            void readTranslatedLanguageFile();
    7575            void writeDefaultLanguageFile() const;
    76             static const std::string getFileName(const std::string& language);
    77             void createEntry(const LanguageEntryName& name, const std::string& entry);
     76            static const String getFileName(const String& language);
     77            void createEntry(const LanguageEntryName& name, const String& entry);
    7878
    79             std::string language_;
    80             std::string defaultLanguage_;
    81             std::string defaultTranslation_;
    82             std::map<std::string, LanguageEntry*> languageEntries_;
     79            String language_;
     80            String defaultLanguage_;
     81            String defaultTranslation_;
     82            std::map<String, LanguageEntry*> languageEntries_;
    8383    };
    8484}
  • code/branches/FICN/src/orxonox/core/OrxonoxClass.h

    r695 r708  
    3737#define _OrxonoxClass_H__
    3838
    39 #include <string>
    40 
    4139#include "CorePrereqs.h"
    4240
     41#include "misc/String.h"
    4342#include "MetaObjectList.h"
    4443#include "Identifier.h"
     
    133132
    134133            /** @brief Sets the name of the object. @param name The name */
    135             inline virtual void setName(const std::string& name) { this->name_ = name; }
     134            inline virtual void setName(const String& name) { this->name_ = name; }
    136135
    137136            /** @returns the name of the object. */
    138             inline const std::string& getName() const { return this->name_; }
     137            inline const String& getName() const { return this->name_; }
    139138
    140139            /** @brief Sets the state of the objects activity. @param bActive True = active */
     
    155154            MetaObjectList metaList_;       //!< MetaObjectList, containing all ObjectLists and ObjectListElements the object is registered in
    156155
    157             std::string name_;              //!< The name of the object
     156            String name_;              //!< The name of the object
    158157            bool bActive_;                  //!< True = the object is active
    159158            bool bVisible_;                 //!< True = the object is visible
  • code/branches/FICN/src/orxonox/core/OutputHandler.cc

    r699 r708  
    2626 */
    2727
     28#include "DebugLevel.h"
    2829#include "OutputHandler.h"
    29 #include "DebugLevel.h"
    3030
    3131namespace orxonox
     
    3535        @param logfilename The name of the logfile
    3636    */
    37     OutputHandler::OutputHandler(const std::string& logfilename)
     37    OutputHandler::OutputHandler(const String& logfilename)
    3838    {
    3939        this->logfilename_ = logfilename;
  • code/branches/FICN/src/orxonox/core/OutputHandler.h

    r704 r708  
    3737#define _OutputHandler_H__
    3838
    39 #include "CorePrereqs.h"
    40 
    4139#include <iostream>
    4240#include <fstream>
    43 #include <string>
     41
     42#include "misc/String.h"
     43#include "CorePrereqs.h"
    4444
    4545namespace orxonox
     
    108108
    109109        private:
    110             explicit OutputHandler(const std::string& logfilename);
     110            explicit OutputHandler(const String& logfilename);
    111111            OutputHandler(const OutputHandler& oh) {}; // don't copy
    112112            virtual ~OutputHandler();
    113113            std::ofstream logfile_;     //!< The logfile where the output is logged
    114             std::string logfilename_;   //!< The name of the logfile
     114            String logfilename_;   //!< The name of the logfile
    115115            int outputLevel_;           //!< The level of the incoming output
    116116    };
  • code/branches/FICN/src/orxonox/hud/HUD.cc

    r668 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  *      Yuning Chai
    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*      Yuning Chai
     23*   Co-authors:
     24*      ...
     25*
     26*/
    2727
    2828#include <OgreOverlayManager.h>
     
    3333
    3434
    35 namespace hud {
     35namespace orxonox
     36{
    3637  using namespace Ogre;
    3738
     
    179180      primarChoice_->setLeft(101);
    180181      primarChoice_->setWidth(48);
    181       }
     182    }
    182183  }
    183184
  • code/branches/FICN/src/orxonox/hud/HUD.h

    r673 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  *      Yuning Chai
    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*      Yuning Chai
     23*   Co-authors:
     24*      ...
     25*
     26*/
    2727
    2828#ifndef _HUD_H__
     
    3131#include <OgrePrerequisites.h>
    3232
    33 //#include "../OrxonoxPrereqs.h"
     33#include "../OrxonoxPrereqs.h"
     34
     35#include "misc/String.h"
    3436
    3537
    36 namespace hud {
    37   class HUD {
     38namespace orxonox
     39{
     40  class HUD
     41  {
    3842  private:
    3943    Ogre::OverlayElement* timeText_;
     
    5761    int timeSec_;
    5862
    59     Ogre::String targetWindowName_;
    60     Ogre::String targetWindowStatus_;
     63    String targetWindowName_;
     64    String targetWindowStatus_;
    6165    int targetWindowDistance_;
    6266    int targetWindowHitRating_;
     
    8993
    9094    void setTime(int i, int j);
    91     void setTargetWindowName(Ogre::String i);
    92     void setTargetWindowStatus(Ogre::String i);
     95    void setTargetWindowName(String i);
     96    void setTargetWindowStatus(String i);
    9397    void setTargetWindowDistance(int i);
    9498    void setTargetWindowHitRating(int i);
  • code/branches/FICN/src/orxonox/objects/Ambient.cc

    r614 r708  
    2626 */
    2727
     28#include <vector>
     29
    2830#include <OgreSceneManager.h>
    29 #include <string>
    3031
     32#include "tinyxml/tinyxml.h"
     33#include "misc/Tokenizer.h"
     34#include "misc/String2Number.h"
     35#include "misc/ColourValue.h"
     36#include "misc/String.h"
     37#include "../core/Debug.h"
     38#include "../core/CoreIncludes.h"
    3139#include "../Orxonox.h"
    32 #include "../../tinyxml/tinyxml.h"
    33 #include "../../misc/Tokenizer.h"
    34 #include "../../misc/String2Number.h"
    35 #include "../core/Debug.h"
    3640
    3741#include "Ambient.h"
     
    5761        {
    5862
    59                 std::vector<std::string> colourvalues = tokenize(xmlElem->Attribute("colourvalue"),",");
     63                std::vector<String> colourvalues = tokenize(xmlElem->Attribute("colourvalue"),",");
    6064                float r, g, b;
    6165                String2Number<float>(r, colourvalues[0]);
  • code/branches/FICN/src/orxonox/objects/Ambient.h

    r673 r708  
    22#define _Ambient_H__
    33
     4#include "../OrxonoxPrereqs.h"
     5
    46#include "BaseObject.h"
    5 #include "../../tinyxml/tinyxml.h"
    67
    78namespace orxonox
  • code/branches/FICN/src/orxonox/objects/BaseObject.cc

    r673 r708  
    3030    @brief Implementation of the BaseObject class.
    3131*/
     32
     33#include "tinyxml/tinyxml.h"
     34#include "../core/CoreIncludes.h"
    3235
    3336#include "BaseObject.h"
  • code/branches/FICN/src/orxonox/objects/BaseObject.h

    r673 r708  
    99#define _BaseObject_H__
    1010
    11 #include "../core/CoreIncludes.h"
    12 #include "tinyxml/tinyxml.h"
     11#include "../OrxonoxPrereqs.h"
     12
     13#include "../core/OrxonoxClass.h"
    1314
    1415namespace orxonox
  • code/branches/FICN/src/orxonox/objects/BillboardSet.cc

    r670 r708  
    2828#include <sstream>
    2929
     30#include <OgreSceneManager.h>
     31
     32#include "../Orxonox.h"
     33#include "misc/Vector3.h"
     34#include "misc/ColourValue.h"
     35
    3036#include "BillboardSet.h"
    31 #include "../Orxonox.h"
    3237
    3338namespace orxonox
     
    4045    }
    4146
    42     void BillboardSet::setBillboardSet(const std::string& file, const Ogre::ColourValue& colour, int count, const Ogre::Vector3& position)
     47    void BillboardSet::setBillboardSet(const String& file, const ColourValue& colour, int count, const Vector3& position)
    4348    {
    4449        std::ostringstream name;
  • code/branches/FICN/src/orxonox/objects/BillboardSet.h

    r673 r708  
    22#define _BillboardSet_H__
    33
    4 #include <string>
     4#include <OgreBillboardSet.h>
    55
    6 #include "OgreBillboardSet.h"
     6#include "../OrxonoxPrereqs.h"
     7
     8#include "misc/String.h"
     9#include "../core/CoreIncludes.h"
     10#include "misc/ColourValue.h"
     11#include "misc/Vector3.h"
    712
    813namespace orxonox
     
    1318            BillboardSet();
    1419            ~BillboardSet();
    15             void setBillboardSet(const std::string& file, const Ogre::ColourValue& colour = Ogre::ColourValue(1.0, 1.0, 1.0), int count = 1, const Ogre::Vector3& position = Ogre::Vector3::ZERO);
     20            void setBillboardSet(const String& file, const ColourValue& colour = ColourValue(1.0, 1.0, 1.0), int count = 1, const Vector3& position = Vector3::ZERO);
    1621
    1722            inline Ogre::BillboardSet* getBillboardSet()
    1823                { return this->billboardSet_; }
    1924
    20             inline const std::string& getName() const
     25            inline const String& getName() const
    2126                { return this->billboardSet_->getName(); }
    2227
  • code/branches/FICN/src/orxonox/objects/Camera.cc

    r660 r708  
    33#include <OgreRoot.h>
    44#include <OgreRenderWindow.h>
     5#include <OgreViewport.h>
    56
    6 #include <string>
    7 
     7#include "tinyxml/tinyxml.h"
     8#include "misc/Tokenizer.h"
     9#include "misc/String2Number.h"
     10#include "misc/Vector3.h"
     11#include "misc/String.h"
     12#include "../core/Debug.h"
     13#include "../core/CoreIncludes.h"
    814#include "../Orxonox.h"
    915#include "../GraphicsEngine.h"
    10 #include "../../tinyxml/tinyxml.h"
    11 #include "../../misc/Tokenizer.h"
    12 #include "../../misc/String2Number.h"
    13 #include "../core/Debug.h"
    1416
    1517#include "Camera.h"
     
    3638        //    <Camera name="Camera" pos="0,0,-250" lookat="0,0,0" />
    3739
    38         std::string name = xmlElem->Attribute("name");
    39         std::string pos = xmlElem->Attribute("pos");
    40         std::string lookat = xmlElem->Attribute("lookat");
     40        String name = xmlElem->Attribute("name");
     41        String pos = xmlElem->Attribute("pos");
     42        String lookat = xmlElem->Attribute("lookat");
    4143
    4244        Ogre::Camera *cam = mgr->createCamera(name);
    4345
    4446        float x, y, z;
    45         std::vector<std::string> posVec = tokenize(xmlElem->Attribute("pos"),",");
    46          String2Number<float>(x, posVec[0]);
     47        std::vector<String> posVec = tokenize(xmlElem->Attribute("pos"),",");
     48        String2Number<float>(x, posVec[0]);
    4749        String2Number<float>(y, posVec[1]);
    4850        String2Number<float>(z, posVec[2]);
     
    5759        cam->lookAt(Vector3(x,y,z));
    5860
    59         std::string node = xmlElem->Attribute("node");
     61        String node = xmlElem->Attribute("node");
    6062
    6163        Ogre::SceneNode* sceneNode = (Ogre::SceneNode*)mgr->getRootSceneNode()->createChildSceneNode(node); //getChild(node);
  • code/branches/FICN/src/orxonox/objects/Camera.h

    r673 r708  
    22#define _Camera_H__
    33
     4#include "../OrxonoxPrereqs.h"
     5
    46#include "BaseObject.h"
    5 #include "../../tinyxml/tinyxml.h"
    67
    78namespace orxonox
  • code/branches/FICN/src/orxonox/objects/Explosion.cc

    r670 r708  
    2626 */
    2727
     28#include <OgreParticleSystem.h>
     29#include <OgreSceneManager.h>
     30#include <OgreSceneNode.h>
     31
     32#include "../core/CoreIncludes.h"
     33#include "misc/ColourValue.h"
     34#include "../Orxonox.h"
     35#include "../particle/ParticleInterface.h"
     36
    2837#include "Explosion.h"
    29 #include "../Orxonox.h"
    3038
    3139namespace orxonox
     
    4654            Vector3 position = owner->getNode()->getWorldPosition();
    4755
    48             this->particle_ = new particle::ParticleInterface(Orxonox::getSingleton()->getSceneManager(), "explosion" + this->getName(), "Orxonox/treibwerk");
     56            this->particle_ = new ParticleInterface(Orxonox::getSingleton()->getSceneManager(), "explosion" + this->getName(), "Orxonox/treibwerk");
    4957            this->particle_->getParticleSystem()->setParameter("local_space", "true");
    5058            this->particle_->newEmitter();
  • code/branches/FICN/src/orxonox/objects/Explosion.h

    r673 r708  
    22#define _Explosion_H__
    33
    4 #include "../particle/ParticleInterface.h"
     4#include "../OrxonoxPrereqs.h"
     5
    56#include "WorldEntity.h"
    67#include "Timer.h"
     
    1819            Timer<Explosion> destroyTimer_;
    1920            float lifetime_;
    20             particle::ParticleInterface* particle_;
     21            ParticleInterface* particle_;
    2122    };
    2223}
  • code/branches/FICN/src/orxonox/objects/Fighter.cc

    r706 r708  
    2626 */
    2727
    28 #include "Fighter.h"
    29 
    30 #include "../../tinyxml/tinyxml.h"
    31 #include "../../misc/String2Number.h"
     28#include <OgreCamera.h>
     29#include <OgreRenderWindow.h>
     30#include <OgreSceneManager.h>
     31#include <OgreSceneNode.h>
     32
     33#include "tinyxml/tinyxml.h"
     34#include "misc/String2Number.h"
     35#include "misc/String.h"
    3236#include "../core/CoreIncludes.h"
    3337#include "../Orxonox.h"
     38#include "../particle/ParticleInterface.h"
    3439#include "weapon_system/AmmunitionDump.h"
    3540#include "weapon_system/BarrelGun.h"
    3641
    37 #include "OgreCamera.h"
    38 #include <OgreRenderWindow.h>
    39 #include <string>
     42#include "Fighter.h"
    4043
    4144namespace orxonox
     
    141144#endif
    142145
    143         tt = new particle::ParticleInterface(Orxonox::getSingleton()->getSceneManager(),"twinthruster" + this->getName(),"Orxonox/engineglow");
     146        tt = new ParticleInterface(Orxonox::getSingleton()->getSceneManager(),"twinthruster" + this->getName(),"Orxonox/engineglow");
    144147        tt->getParticleSystem()->setParameter("local_space","true");
    145148        tt->newEmitter();
     
    171174        if (xmlElem->Attribute("forward") && xmlElem->Attribute("rotateupdown") && xmlElem->Attribute("rotaterightleft") && xmlElem->Attribute("looprightleft"))
    172175        {
    173             std::string forwardStr = xmlElem->Attribute("forward");
    174             std::string rotateupdownStr = xmlElem->Attribute("rotateupdown");
    175             std::string rotaterightleftStr = xmlElem->Attribute("rotaterightleft");
    176             std::string looprightleftStr = xmlElem->Attribute("looprightleft");
     176            String forwardStr = xmlElem->Attribute("forward");
     177            String rotateupdownStr = xmlElem->Attribute("rotateupdown");
     178            String rotaterightleftStr = xmlElem->Attribute("rotaterightleft");
     179            String looprightleftStr = xmlElem->Attribute("looprightleft");
    177180
    178181            String2Number<float>(this->maxSpeedForward_, forwardStr);
  • code/branches/FICN/src/orxonox/objects/Fighter.h

    r697 r708  
    22#define _Fighter_H__
    33
     4#include <OIS/OIS.h>
     5
    46#include "../OrxonoxPrereqs.h"
    57
    6 #include <OIS/OIS.h>
    7 #include <string.h>
     8#include "Model.h"
    89
    9 #include "Model.h"
    10 #include "../../tinyxml/tinyxml.h"
    11 #include "../particle/ParticleInterface.h"
     10class TiXmlElement; // Forward declaration
    1211
    1312namespace orxonox
     
    4544            bool setMouseEventCallback_;
    4645
    47             particle::ParticleInterface *w;
    48             particle::ParticleInterface *tt;
     46            ParticleInterface *w;
     47            ParticleInterface *tt;
    4948
    5049            AmmunitionDump* ammoDump_;
  • code/branches/FICN/src/orxonox/objects/Light.cc

    r676 r708  
    11#include <sstream>
    22
     3#include <OgreSceneManager.h>
     4
     5#include "../Orxonox.h"
     6
    37#include "Light.h"
    4 #include "../Orxonox.h"
    58
    69namespace orxonox
     
    1316    }
    1417
    15     void Light::setLight(Ogre::Light::LightTypes type, const Ogre::ColourValue& diffuse, const Ogre::ColourValue& specular)
     18    void Light::setLight(Ogre::Light::LightTypes type, const ColourValue& diffuse, const ColourValue& specular)
    1619    {
    1720        std::ostringstream name;
  • code/branches/FICN/src/orxonox/objects/Light.h

    r676 r708  
    22#define _Light_H__
    33
    4 #include <string>
     4#include <OgreLight.h>
    55
    6 #include "OgreLight.h"
    7 #include "OgreColourValue.h"
     6#include "../OrxonoxPrereqs.h"
     7
     8#include "misc/String.h"
     9#include "misc/ColourValue.h"
    810
    911namespace orxonox
     
    1416            Light();
    1517            ~Light();
    16             void setLight(Ogre::Light::LightTypes type = Ogre::Light::LT_POINT, const Ogre::ColourValue& diffuse = Ogre::ColourValue(1.0, 1.0, 1.0), const Ogre::ColourValue& specular = Ogre::ColourValue(1.0, 1.0, 1.0));
     18            void setLight(Ogre::Light::LightTypes type = Ogre::Light::LT_POINT, const ColourValue& diffuse = ColourValue(1.0, 1.0, 1.0), const ColourValue& specular = ColourValue(1.0, 1.0, 1.0));
    1719
    1820            inline Ogre::Light* getLight()
    1921                { return this->light_; }
    2022
    21             inline const std::string& getName() const
     23            inline const String& getName() const
    2224                { return this->light_->getName(); }
    2325
  • code/branches/FICN/src/orxonox/objects/Mesh.cc

    r670 r708  
    2828#include <sstream>
    2929
     30#include <OgreSceneManager.h>
     31
     32#include "../Orxonox.h"
     33
    3034#include "Mesh.h"
    31 #include "../Orxonox.h"
    3235
    3336namespace orxonox
     
    4043    }
    4144
    42     void Mesh::setMesh(const std::string& file)
     45    void Mesh::setMesh(const String& file)
    4346    {
    4447        std::ostringstream name;
  • code/branches/FICN/src/orxonox/objects/Mesh.h

    r673 r708  
    22#define _Mesh_H__
    33
    4 #include <string>
     4#include <OgreEntity.h>
    55
    6 #include "OgreEntity.h"
     6#include "../OrxonoxPrereqs.h"
     7
     8#include "misc/String.h"
    79
    810namespace orxonox
     
    1315            Mesh();
    1416            ~Mesh();
    15             void setMesh(const std::string& file);
     17            void setMesh(const String& file);
    1618
    1719            inline Ogre::Entity* getEntity()
    1820                { return this->entity_; }
    1921
    20             inline const std::string& getName() const
     22            inline const String& getName() const
    2123                { return this->entity_->getName(); }
    2224
  • code/branches/FICN/src/orxonox/objects/Model.cc

    r670 r708  
    2626 */
    2727
    28 #include <string>
     28#include "tinyxml/tinyxml.h"
     29#include "misc/Tokenizer.h"
     30#include "misc/String2Number.h"
     31#include "../core/CoreIncludes.h"
     32#include "../Orxonox.h"
    2933
    3034#include "Model.h"
    31 #include "../core/CoreIncludes.h"
    32 #include "../Orxonox.h"
    33 #include "../../tinyxml/tinyxml.h"
    34 #include "../../misc/Tokenizer.h"
    35 #include "../../misc/String2Number.h"
    3635
    3736namespace orxonox
  • code/branches/FICN/src/orxonox/objects/Model.h

    r673 r708  
    22#define _Model_H__
    33
     4#include "../OrxonoxPrereqs.h"
     5
    46#include "WorldEntity.h"
    57#include "Mesh.h"
    6 #include "../../tinyxml/tinyxml.h"
     8
     9class TiXmlElement; // Forward declaration
    710
    811namespace orxonox
    912{
     13
    1014    class Model : public WorldEntity
    1115    {
     
    1721
    1822        private:
    19             std::string meshSrc_;
     23            String meshSrc_;
    2024            Mesh mesh_;
    2125            void registerAllVariables();
  • code/branches/FICN/src/orxonox/objects/NPC.cc

    r627 r708  
    2626 */
    2727
     28#include "../core/CoreIncludes.h"
    2829#include "NPC.h"
    29 #include "../core/Iterator.h"
    30 #include "../core/ObjectList.h"
    3130
    3231namespace orxonox {
  • code/branches/FICN/src/orxonox/objects/NPC.h

    r673 r708  
    88#define _NPC_H__
    99
    10 // includes
     10#include "../OrxonoxPrereqs.h"
     11
    1112#include "Model.h"
     13
     14class TiXmlElement; // Forward declaration
    1215
    1316namespace orxonox {
  • code/branches/FICN/src/orxonox/objects/Projectile.cc

    r706 r708  
    2626 */
    2727
    28 #include "Projectile.h"
    2928#include "../core/CoreIncludes.h"
     29#include "SpaceShip.h"
    3030#include "Explosion.h"
    3131#include "Model.h"
     32
     33#include "Projectile.h"
    3234
    3335namespace orxonox
  • code/branches/FICN/src/orxonox/objects/Projectile.h

    r697 r708  
    22#define _Projectile_H__
    33
     4#include "../OrxonoxPrereqs.h"
     5
    46#include "WorldEntity.h"
    57#include "BillboardSet.h"
    6 #include "SpaceShip.h"
    78#include "Timer.h"
    89
    910namespace orxonox
    1011{
     12    class SpaceShip; // Forward declaration
     13
    1114    class Projectile : public WorldEntity
    1215    {
  • code/branches/FICN/src/orxonox/objects/Skybox.cc

    r614 r708  
    2727
    2828#include <OgreSceneManager.h>
    29 #include <string>
    3029
     30#include "tinyxml/tinyxml.h"
     31//#include "misc/Tokenizer.h"
     32//#include "misc/String2Number.h"
     33#include "misc/String.h"
    3134#include "../Orxonox.h"
    32 #include "../../tinyxml/tinyxml.h"
    33 #include "../../misc/Tokenizer.h"
    34 #include "../../misc/String2Number.h"
     35#include "../core/CoreIncludes.h"
    3536#include "../core/Debug.h"
    3637
     
    5657        if (xmlElem->Attribute("src"))
    5758        {
    58                 std::string skyboxSrc = xmlElem->Attribute("src");
     59                String skyboxSrc = xmlElem->Attribute("src");
    5960                mgr->setSkyBox(true, skyboxSrc);
    6061
  • code/branches/FICN/src/orxonox/objects/Skybox.h

    r673 r708  
    22#define _Skybox_H__
    33
     4#include "../OrxonoxPrereqs.h"
     5
    46#include "BaseObject.h"
    5 #include "../../tinyxml/tinyxml.h"
     7
     8class TiXmlElement; // Forward declaration
    69
    710namespace orxonox
  • code/branches/FICN/src/orxonox/objects/SpaceShip.cc

    r706 r708  
    2626 */
    2727
     28#include <OIS/OIS.h>
     29#include <OgreCamera.h>
     30#include <OgreRenderWindow.h>
     31#include <OgreParticleSystem.h>
     32#include <OgreSceneNode.h>
     33
     34#include "tinyxml/tinyxml.h"
     35#include "misc/String2Number.h"
     36#include "misc/String.h"
     37#include "../core/CoreIncludes.h"
     38#include "../core/Debug.h"
     39#include "../Orxonox.h"
     40#include "../particle/ParticleInterface.h"
     41#include "Projectile.h"
     42
    2843#include "SpaceShip.h"
    29 #include "Projectile.h"
    30 
    31 #include "../../tinyxml/tinyxml.h"
    32 #include "../../misc/String2Number.h"
    33 #include "../core/CoreIncludes.h"
    34 #include "../Orxonox.h"
    35 
    36 #include "OgreCamera.h"
    37 #include <OgreRenderWindow.h>
    3844
    3945namespace orxonox
     
    134140
    135141        // START CREATING THRUSTER
    136         this->tt_ = new particle::ParticleInterface(Orxonox::getSingleton()->getSceneManager(),"twinthruster" + this->getName(),"Orxonox/engineglow");
     142        this->tt_ = new ParticleInterface(Orxonox::getSingleton()->getSceneManager(),"twinthruster" + this->getName(),"Orxonox/engineglow");
    137143        this->tt_->getParticleSystem()->setParameter("local_space","true");
    138144        this->tt_->newEmitter();
     
    190196        if (xmlElem->Attribute("forward") && xmlElem->Attribute("rotateupdown") && xmlElem->Attribute("rotaterightleft") && xmlElem->Attribute("looprightleft"))
    191197        {
    192             std::string forwardStr = xmlElem->Attribute("forward");
    193             std::string rotateupdownStr = xmlElem->Attribute("rotateupdown");
    194             std::string rotaterightleftStr = xmlElem->Attribute("rotaterightleft");
    195             std::string looprightleftStr = xmlElem->Attribute("looprightleft");
     198            String forwardStr = xmlElem->Attribute("forward");
     199            String rotateupdownStr = xmlElem->Attribute("rotateupdown");
     200            String rotaterightleftStr = xmlElem->Attribute("rotaterightleft");
     201            String looprightleftStr = xmlElem->Attribute("looprightleft");
    196202
    197203            String2Number<float>(this->maxSpeedForward_, forwardStr);
     
    206212        {
    207213
    208             std::string msStr = xmlElem->Attribute("maxSpeed");
    209             std::string msabsStr = xmlElem->Attribute("maxSideAndBackSpeed");
    210             std::string mrStr = xmlElem->Attribute("maxRotation");
    211             std::string taStr = xmlElem->Attribute("transAcc");
    212             std::string raStr = xmlElem->Attribute("rotAcc");
    213             std::string tdStr = xmlElem->Attribute("transDamp");
    214             std::string rdStr = xmlElem->Attribute("rotDamp");
     214            String msStr = xmlElem->Attribute("maxSpeed");
     215            String msabsStr = xmlElem->Attribute("maxSideAndBackSpeed");
     216            String mrStr = xmlElem->Attribute("maxRotation");
     217            String taStr = xmlElem->Attribute("transAcc");
     218            String raStr = xmlElem->Attribute("rotAcc");
     219            String tdStr = xmlElem->Attribute("transDamp");
     220            String rdStr = xmlElem->Attribute("rotDamp");
    215221
    216222            String2Number<float>(this->maxSpeed_, msStr);
  • code/branches/FICN/src/orxonox/objects/SpaceShip.h

    r697 r708  
    22#define _SpaceShip_H__
    33
    4 #include <OIS/OIS.h>
     4#include <OgrePrerequisites.h>
     5#include <OIS/OISMouse.h>
     6
     7#include "../OrxonoxPrereqs.h"
    58
    69#include "Model.h"
    710#include "BillboardSet.h"
    8 #include "OgreSceneNode.h"
    911
    10 #include "../../tinyxml/tinyxml.h"
    11 #include "../particle/ParticleInterface.h"
     12class TiXmlElement;          // Forward declaration
    1213
    1314namespace orxonox
    1415{
     16    class ParticleInterface; // Forward declaration
     17
    1518    class SpaceShip : public Model, public OIS::MouseListener
    1619    {
     
    5053            Ogre::SceneNode* camNode_;
    5154
    52             particle::ParticleInterface* tt_;
     55            ParticleInterface* tt_;
    5356
    5457            BillboardSet redBillboard_;
  • code/branches/FICN/src/orxonox/objects/Tickable.h

    r673 r708  
    4141#define _Tickable_H__
    4242
     43#include <OgreFrameListener.h>
     44
     45#include "../OrxonoxPrereqs.h"
     46
    4347#include "../core/CoreIncludes.h"
    44 #include "OgreFrameListener.h"
    4548
    4649namespace orxonox
  • code/branches/FICN/src/orxonox/objects/Timer.h

    r673 r708  
    5858#define _Timer_H__
    5959
     60#include <OgreFrameListener.h>
     61
     62#include "../OrxonoxPrereqs.h"
     63
    6064#include "../core/CoreIncludes.h"
    61 #include "OgreFrameListener.h"
    6265
    6366namespace orxonox
  • code/branches/FICN/src/orxonox/objects/WorldEntity.cc

    r670 r708  
    2626 */
    2727
    28 #include <string>
    2928#include <sstream>
    3029
    31 #include "WorldEntity.h"
     30#include "tinyxml/tinyxml.h"
     31#include "misc/Tokenizer.h"
     32#include "misc/String2Number.h"
     33#include "misc/String.h"
    3234#include "../core/CoreIncludes.h"
    3335#include "../Orxonox.h"
    34 #include "../../tinyxml/tinyxml.h"
    35 #include "../../misc/Tokenizer.h"
    36 #include "../../misc/String2Number.h"
     36#include "WorldEntity.h"
    3737
    3838namespace orxonox
     
    8888        if (xmlElem->Attribute("position"))
    8989        {
    90             std::vector<std::string> pos = tokenize(xmlElem->Attribute("position"),",");
     90            std::vector<String> pos = tokenize(xmlElem->Attribute("position"),",");
    9191            float x, y, z;
    9292            String2Number<float>(x, pos[0]);
     
    9898        if (xmlElem->Attribute("direction"))
    9999        {
    100             std::vector<std::string> pos = tokenize(xmlElem->Attribute("direction"),",");
     100            std::vector<String> pos = tokenize(xmlElem->Attribute("direction"),",");
    101101            float x, y, z;
    102102            String2Number<float>(x, pos[0]);
     
    125125        if (xmlElem->Attribute("scale"))
    126126        {
    127             std::string scaleStr = xmlElem->Attribute("scale");
     127            String scaleStr = xmlElem->Attribute("scale");
    128128            float scale;
    129129            String2Number<float>(scale, scaleStr);
     
    133133        if (xmlElem->Attribute("rotationAxis"))
    134134        {
    135             std::vector<std::string> pos = tokenize(xmlElem->Attribute("rotationAxis"),",");
     135            std::vector<String> pos = tokenize(xmlElem->Attribute("rotationAxis"),",");
    136136            float x, y, z;
    137137            String2Number<float>(x, pos[0]);
  • code/branches/FICN/src/orxonox/objects/WorldEntity.h

    r673 r708  
    55#include <OgreSceneNode.h>
    66
     7#include "../OrxonoxPrereqs.h"
     8
     9#include "misc/Vector3.h"
     10#include "misc/Matrix3.h"
     11#include "misc/Quaternion.h"
    712#include "network/Synchronisable.h"
    813#include "tinyxml/tinyxml.h"
  • code/branches/FICN/src/orxonox/objects/weapon_system/AmmunitionDump.cc

    r668 r708  
    5959  }
    6060
    61   void AmmunitionDump::setDumpSize(const Ogre::String &name, int size)
     61  void AmmunitionDump::setDumpSize(const String &name, int size)
    6262  {
    6363    if (size < 0)
     
    7070
    7171
    72   int AmmunitionDump::store(const Ogre::String &name, int quantity)
     72  int AmmunitionDump::store(const String &name, int quantity)
    7373  {
    7474    int id = Orxonox::getSingleton()->getBulletMgr()->getAmmunitionID(name);
     
    8787
    8888
    89   int AmmunitionDump::getAmmunition(const Ogre::String &name, int quantity)
     89  int AmmunitionDump::getAmmunition(const String &name, int quantity)
    9090  {
    9191    int id = Orxonox::getSingleton()->getBulletMgr()->getAmmunitionID(name);
     
    103103
    104104
    105   int AmmunitionDump::getStockSize(const Ogre::String &name)
     105  int AmmunitionDump::getStockSize(const String &name)
    106106  {
    107107    int id = Orxonox::getSingleton()->getBulletMgr()->getAmmunitionID(name);
  • code/branches/FICN/src/orxonox/objects/weapon_system/AmmunitionDump.h

    r673 r708  
    3232#include <OgrePrerequisites.h>
    3333
    34 #include "orxonox/OrxonoxPrereqs.h"
     34#include "../../OrxonoxPrereqs.h"
    3535
    3636#include "network/Synchronisable.h"
    3737//#include "../core/CoreIncludes.h"
     38#include "misc/String.h"
    3839#include "../BaseObject.h"
    3940
     
    4647          ~AmmunitionDump();
    4748
    48     void setDumpSize(const Ogre::String &name, int size);
     49    void setDumpSize(const String &name, int size);
    4950
    50     int store(const Ogre::String &name, int quantiy);
     51    int store(const String &name, int quantiy);
    5152
    52     int getAmmunition(const Ogre::String &name, int quantity);
     53    int getAmmunition(const String &name, int quantity);
    5354
    54     int getStockSize(const Ogre::String &name);
     55    int getStockSize(const String &name);
    5556
    5657    virtual void loadParams(TiXmlElement* xmlElem) { BaseObject::loadParams(xmlElem); };
  • code/branches/FICN/src/orxonox/objects/weapon_system/BarrelGun.cc

    r668 r708  
    2626 */
    2727
    28 #include "OgreMath.h"
    29 #include "OgreVector3.h"
    30 #include "OgreStringConverter.h"
    31 #include "OgreSceneNode.h"
    32 #include "OgreEntity.h"
    33 #include "OgreSceneManager.h"
     28#include <OgreStringConverter.h>
     29#include <OgreSceneNode.h>
     30#include <OgreEntity.h>
     31#include <OgreSceneManager.h>
    3432
     33#include "misc/Vector3.h"
    3534#include "Bullet.h"
    3635#include "BulletManager.h"
     
    4241
    4342namespace orxonox {
    44   using namespace Ogre;
    45 
    4643  CreateFactory(BarrelGun);
    4744
     
    7875
    7976    Ogre::Entity* bulletEntity = sceneMgr_->createEntity("BulletEntity"
    80           + StringConverter::toString(bulletCounter_++), "Barrel.mesh");
     77      + Ogre::StringConverter::toString(bulletCounter_++), "Barrel.mesh");
    8178
    8279    Vector3 speed = (temp->getOrientation() * Vector3(1, 0, 0))
     
    106103
    107104
    108 
    109105  void BarrelGun::secondaryFire()
    110106  {
     
    120116
    121117    Ogre::Entity* bulletEntity = sceneMgr_->createEntity("BulletEntity"
    122           + StringConverter::toString(bulletCounter_++), "Barrel.mesh");
     118      + Ogre::StringConverter::toString(bulletCounter_++), "Barrel.mesh");
    123119
    124120    Vector3 speed = (temp->getOrientation() * Vector3(1, 0, 0))
  • code/branches/FICN/src/orxonox/objects/weapon_system/BarrelGun.h

    r673 r708  
    3232#include <OgrePrerequisites.h>
    3333
    34 #include "orxonox/OrxonoxPrereqs.h"
     34#include "../../OrxonoxPrereqs.h"
    3535
    3636#include "BaseWeapon.h"
  • code/branches/FICN/src/orxonox/objects/weapon_system/BaseWeapon.cc

    r680 r708  
    2626 */
    2727
    28 #include "OgreMath.h"
    29 #include "OgreVector3.h"
    30 #include "OgreStringConverter.h"
    31 #include "OgreSceneNode.h"
    32 #include "OgreEntity.h"
    33 #include "OgreSceneManager.h"
     28#include <OgreStringConverter.h>
     29#include <OgreSceneNode.h>
     30#include <OgreEntity.h>
     31#include <OgreSceneManager.h>
    3432
     33#include "misc/Vector3.h"
    3534#include "../../Orxonox.h"
    36 
    3735#include "Bullet.h"
    3836#include "BulletManager.h"
     
    4341
    4442namespace orxonox {
    45   using namespace Ogre;
    46  
    47   //CreateFactory(BaseWeapon);
    48 
    4943  float BaseWeapon::nextActionValidityPeriod_s = 0.5;
    5044
  • code/branches/FICN/src/orxonox/objects/weapon_system/BaseWeapon.h

    r680 r708  
    3232#include <OgrePrerequisites.h>
    3333
    34 #include "orxonox/OrxonoxPrereqs.h"
     34#include "../../OrxonoxPrereqs.h"
    3535
    3636#include "../Model.h"
     
    116116    float primaryFiringRate_;
    117117    float secondaryFiringRate_;
    118     Ogre::Real primaryBulletSpeed_;
    119     Ogre::Real secondaryBulletSpeed_;
     118    Real primaryBulletSpeed_;
     119    Real secondaryBulletSpeed_;
    120120
    121121    int magazineSize_;
  • code/branches/FICN/src/orxonox/objects/weapon_system/Bullet.cc

    r669 r708  
    2626 */
    2727
    28 #include "OgreSceneNode.h"
    29 #include "OgreEntity.h"
    30 #include "OgreVector3.h"
    31 
    3228#include "Bullet.h"
    3329
    34 
    3530namespace orxonox {
    36   using namespace Ogre;
    37 
    3831  CreateFactory(Bullet);
    3932
  • code/branches/FICN/src/orxonox/objects/weapon_system/Bullet.h

    r673 r708  
    3232#include <OgrePrerequisites.h>
    3333
    34 #include "orxonox/OrxonoxPrereqs.h"
     34#include "../../OrxonoxPrereqs.h"
    3535
    3636#include "../Model.h"
  • code/branches/FICN/src/orxonox/objects/weapon_system/BulletManager.cc

    r680 r708  
    2626 */
    2727
    28 #include "OgreSceneNode.h"
    29 
    3028#include "BulletManager.h"
    3129#include "Bullet.h"
     
    3331
    3432namespace orxonox {
    35   using namespace Ogre;
    36 
    3733  CreateFactory(BulletManager);
    3834
     
    8682  }
    8783
    88   int BulletManager::getAmmunitionID(const Ogre::String &ammoName)
     84  int BulletManager::getAmmunitionID(const String &ammoName)
    8985  {
    90     Ogre::String ammoTypes[] = { "Energy Cell", "Barrel", "Lead Shot" };
     86    String ammoTypes[] = { "Energy Cell", "Barrel", "Lead Shot" };
    9187    int ammoTypesLength = 3;
    9288
  • code/branches/FICN/src/orxonox/objects/weapon_system/BulletManager.h

    r673 r708  
    3232#include <OgrePrerequisites.h>
    3333
    34 #include "orxonox/OrxonoxPrereqs.h"
     34#include "../../OrxonoxPrereqs.h"
    3535
    3636#include "network/Synchronisable.h"
    3737#include "tinyxml/tinyxml.h"
    3838//#include "../core/CoreIncludes.h"
     39#include "misc/String.h"
    3940#include "../BaseObject.h"
    4041#include "../Tickable.h"
     
    4950    void addBullet(Bullet*);
    5051
    51     int getAmmunitionID(const Ogre::String&);
     52    int getAmmunitionID(const String&);
    5253
    5354    int getNumberOfAmmos();
  • code/branches/FICN/src/orxonox/objects/weapon_system/WeaponStation.cc

    r680 r708  
    2626 */
    2727
    28 #include "OgreMath.h"
    29 #include "OgreVector3.h"
    30 #include "OgreStringConverter.h"
    31 #include "OgreSceneNode.h"
    32 #include "OgreEntity.h"
    33 #include "OgreSceneManager.h"
    34 
    3528#include "BaseWeapon.h"
    36 
    3729#include "WeaponStation.h"
    3830
    3931
    4032namespace orxonox {
    41   using namespace Ogre;
    42 
    4333  WeaponStation::WeaponStation(int stationSize)
    4434        : slots_(new BaseWeapon*[stationSize]),
  • code/branches/FICN/src/orxonox/objects/weapon_system/WeaponStation.h

    r673 r708  
    3232#include <OgrePrerequisites.h>
    3333
    34 #include "orxonox/OrxonoxPrereqs.h"
     34#include "../../OrxonoxPrereqs.h"
    3535
    3636
  • 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__ */
  • code/branches/FICN/visual_studio/FICN.sln

    r682 r708  
    2323        EndProjectSection
    2424        ProjectSection(ProjectDependencies) = postProject
     25                {35575B59-E1AE-40E8-89C4-2862B5B09B68} = {35575B59-E1AE-40E8-89C4-2862B5B09B68}
     26                {2240ECD7-2F48-4431-8E1B-25466A384CCC} = {2240ECD7-2F48-4431-8E1B-25466A384CCC}
     27                {271715F3-5B90-4110-A552-70C788084A86} = {271715F3-5B90-4110-A552-70C788084A86}
    2528                {4733BD1A-E04C-458D-8BFB-5010250EA497} = {4733BD1A-E04C-458D-8BFB-5010250EA497}
    26                 {271715F3-5B90-4110-A552-70C788084A86} = {271715F3-5B90-4110-A552-70C788084A86}
    27                 {2240ECD7-2F48-4431-8E1B-25466A384CCC} = {2240ECD7-2F48-4431-8E1B-25466A384CCC}
    28                 {35575B59-E1AE-40E8-89C4-2862B5B09B68} = {35575B59-E1AE-40E8-89C4-2862B5B09B68}
    2929                {E283910F-F911-40FB-A09D-D025CA821912} = {E283910F-F911-40FB-A09D-D025CA821912}
    3030        EndProjectSection
     
    4242        EndProjectSection
    4343        ProjectSection(ProjectDependencies) = postProject
     44                {271715F3-5B90-4110-A552-70C788084A86} = {271715F3-5B90-4110-A552-70C788084A86}
    4445                {2240ECD7-2F48-4431-8E1B-25466A384CCC} = {2240ECD7-2F48-4431-8E1B-25466A384CCC}
    45                 {271715F3-5B90-4110-A552-70C788084A86} = {271715F3-5B90-4110-A552-70C788084A86}
    4646        EndProjectSection
    4747EndProject
     
    5050                Debug.AspNetCompiler.Debug = "True"
    5151                Release.AspNetCompiler.Debug = "False"
     52        EndProjectSection
     53EndProject
     54Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestProj", "testproj.vcproj", "{97B226C5-8FD9-4A1E-B50B-5CBF79CF46F5}"
     55        ProjectSection(WebsiteProperties) = preProject
     56                Debug.AspNetCompiler.Debug = "True"
     57                Release.AspNetCompiler.Debug = "False"
     58        EndProjectSection
     59        ProjectSection(ProjectDependencies) = postProject
     60                {271715F3-5B90-4110-A552-70C788084A86} = {271715F3-5B90-4110-A552-70C788084A86}
    5261        EndProjectSection
    5362EndProject
     
    8291                {2240ECD7-2F48-4431-8E1B-25466A384CCC}.Release|Win32.ActiveCfg = Release|Win32
    8392                {2240ECD7-2F48-4431-8E1B-25466A384CCC}.Release|Win32.Build.0 = Release|Win32
     93                {97B226C5-8FD9-4A1E-B50B-5CBF79CF46F5}.Debug|Win32.ActiveCfg = Debug|Win32
     94                {97B226C5-8FD9-4A1E-B50B-5CBF79CF46F5}.Release|Win32.ActiveCfg = Release|Win32
    8495        EndGlobalSection
    8596        GlobalSection(SolutionProperties) = preSolution
  • code/branches/FICN/visual_studio/audio.vcproj

    r678 r708  
    177177                        </File>
    178178                </Filter>
    179                 <Filter
    180                         Name="Resource Files"
    181                         Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
    182                         UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
    183                         >
    184                 </Filter>
    185179        </Files>
    186180        <Globals>
  • code/branches/FICN/visual_studio/base_properties.vsprops

    r686 r708  
    1111                AdditionalIncludeDirectories="&quot;$(SolutionDir)\..\src&quot;;&quot;$(OGRE_HOME)\Dependencies\include&quot;;&quot;$(OGRE_HOME)\OgreMain\include&quot;;&quot;$(ORXONOX_HOME)\dependencies\include&quot;"
    1212                PreprocessorDefinitions="WIN32;__WIN32__;_WIN32;BOOST_ALL_DYN_LINK"
    13                 WarningLevel="2"
     13                WarningLevel="3"
    1414                Detect64BitPortabilityProblems="true"
    1515                DebugInformationFormat="3"
  • code/branches/FICN/visual_studio/base_properties_release.vsprops

    r678 r708  
    1717                Name="VCLinkerTool"
    1818                LinkIncremental="1"
     19                GenerateDebugInformation="true"
    1920                OptimizeReferences="2"
    2021                EnableCOMDATFolding="2"
  • code/branches/FICN/visual_studio/benixonox.vcproj

    r682 r708  
    177177                                >
    178178                        </File>
    179                         <File
    180                                 RelativePath="..\src\orxonox\SpaceshipSteering.cc"
    181                                 >
    182                         </File>
    183179                        <Filter
    184180                                Name="hud"
     
    187183                                        RelativePath="..\src\orxonox\hud\HUD.cc"
    188184                                        >
    189                                         <FileConfiguration
    190                                                 Name="Debug|Win32"
    191                                                 >
    192                                                 <Tool
    193                                                         Name="VCCLCompilerTool"
    194                                                         ObjectFile="$(IntDir)\$(InputName)1.obj"
    195                                                         XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc"
    196                                                 />
    197                                         </FileConfiguration>
    198                                         <FileConfiguration
    199                                                 Name="Release|Win32"
    200                                                 >
    201                                                 <Tool
    202                                                         Name="VCCLCompilerTool"
    203                                                         ObjectFile="$(IntDir)\$(InputName)1.obj"
    204                                                         XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc"
    205                                                 />
    206                                         </FileConfiguration>
    207185                                </File>
    208186                        </Filter>
     
    310288                        >
    311289                        <File
    312                                 RelativePath="..\src\orxonox\AIClass.h"
    313                                 >
    314                         </File>
    315                         <File
    316                                 RelativePath="..\src\orxonox\Arrival.h"
    317                                 >
    318                         </File>
    319                         <File
    320                                 RelativePath="..\src\orxonox\Flocking.h"
    321                                 >
    322                         </File>
    323                         <File
    324290                                RelativePath="..\src\orxonox\GraphicsEngine.h"
    325291                                >
     
    339305                        <File
    340306                                RelativePath="..\src\orxonox\OrxonoxPrereqs.h"
    341                                 >
    342                         </File>
    343                         <File
    344                                 RelativePath="..\src\orxonox\SpaceshipSteering.h"
    345307                                >
    346308                        </File>
     
    461423                                >
    462424                                <File
     425                                        RelativePath="..\src\misc\ColourValue.h"
     426                                        >
     427                                </File>
     428                                <File
     429                                        RelativePath="..\src\misc\Math.h"
     430                                        >
     431                                </File>
     432                                <File
     433                                        RelativePath="..\src\misc\Matrix3.h"
     434                                        >
     435                                </File>
     436                                <File
     437                                        RelativePath="..\src\misc\Quaternion.h"
     438                                        >
     439                                </File>
     440                                <File
     441                                        RelativePath="..\src\misc\Sleep.h"
     442                                        >
     443                                </File>
     444                                <File
     445                                        RelativePath="..\src\misc\String.h"
     446                                        >
     447                                </File>
     448                                <File
    463449                                        RelativePath="..\src\misc\String2Number.h"
    464450                                        >
     
    466452                                <File
    467453                                        RelativePath="..\src\misc\Tokenizer.h"
     454                                        >
     455                                </File>
     456                                <File
     457                                        RelativePath="..\src\misc\Vector2.h"
     458                                        >
     459                                </File>
     460                                <File
     461                                        RelativePath="..\src\misc\Vector3.h"
     462                                        >
     463                                </File>
     464                                <File
     465                                        RelativePath="..\src\misc\Vector4.h"
    468466                                        >
    469467                                </File>
     
    476474                        >
    477475                        <File
     476                                RelativePath="..\bin\media.cfg"
     477                                >
     478                        </File>
     479                        <File
     480                                RelativePath="..\bin\ogre.cfg"
     481                                >
     482                        </File>
     483                        <File
     484                                RelativePath="..\bin\Ogre.log"
     485                                >
     486                        </File>
     487                        <File
     488                                RelativePath="..\bin\orxonox.ini"
     489                                >
     490                        </File>
     491                        <File
     492                                RelativePath="..\bin\orxonox.log"
     493                                >
     494                        </File>
     495                        <File
     496                                RelativePath="..\bin\plugins.cfg"
     497                                >
     498                        </File>
     499                        <File
     500                                RelativePath="..\bin\plugins_d.cfg"
     501                                >
     502                        </File>
     503                        <File
     504                                RelativePath="..\bin\quake3settings.cfg"
     505                                >
     506                        </File>
     507                        <File
     508                                RelativePath="..\bin\resources.cfg"
     509                                >
     510                        </File>
     511                        <File
    478512                                RelativePath="..\bin\levels\sample.oxw"
     513                                >
     514                        </File>
     515                        <File
     516                                RelativePath="..\bin\translation_default.lang"
     517                                >
     518                        </File>
     519                        <File
     520                                RelativePath="..\bin\translation_german.lang"
    479521                                >
    480522                        </File>
  • code/branches/FICN/visual_studio/core.vcproj

    r686 r708  
    5454                                Name="VCLinkerTool"
    5555                                AdditionalDependencies="OgreMain_d.lib"
     56                                OutputFile="$(OutDir)\$(ProjectName)_d.dll"
    5657                        />
    5758                        <Tool
     
    183184                        </File>
    184185                        <File
     186                                RelativePath="..\src\orxonox\core\Language.cc"
     187                                >
     188                        </File>
     189                        <File
    185190                                RelativePath="..\src\orxonox\core\MetaObjectList.cc"
    186191                                >
     
    213218                        </File>
    214219                        <File
     220                                RelativePath="..\src\orxonox\core\ColourValue.h"
     221                                >
     222                        </File>
     223                        <File
    215224                                RelativePath="..\src\orxonox\core\ConfigValueContainer.h"
    216225                                >
     
    253262                        </File>
    254263                        <File
     264                                RelativePath="..\src\orxonox\core\Language.h"
     265                                >
     266                        </File>
     267                        <File
    255268                                RelativePath="..\src\orxonox\core\MetaObjectList.h"
    256269                                >
     
    272285                                >
    273286                        </File>
    274                 </Filter>
    275                 <Filter
    276                         Name="Resource Files"
    277                         Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
    278                         UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
    279                         >
    280287                </Filter>
    281288        </Files>
  • code/branches/FICN/visual_studio/loader.vcproj

    r682 r708  
    153153                        </File>
    154154                </Filter>
    155                 <Filter
    156                         Name="Resource Files"
    157                         Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
    158                         UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
    159                         >
    160                 </Filter>
    161155        </Files>
    162156        <Globals>
  • code/branches/FICN/visual_studio/network.vcproj

    r678 r708  
    235235                        </File>
    236236                </Filter>
    237                 <Filter
    238                         Name="Resource Files"
    239                         Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
    240                         UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
    241                         >
    242                 </Filter>
    243237        </Files>
    244238        <Globals>
  • code/branches/FICN/visual_studio/tinyxml.vcproj

    r678 r708  
    163163                        </File>
    164164                </Filter>
    165                 <Filter
    166                         Name="Resource Files"
    167                         Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
    168                         UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
    169                         >
    170                 </Filter>
    171165        </Files>
    172166        <Globals>
Note: See TracChangeset for help on using the changeset viewer.