Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Legend:

Unmodified
Added
Removed
  • 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
Note: See TracChangeset for help on using the changeset viewer.