Changeset 708 for code/branches/FICN/src/orxonox/objects
- Timestamp:
- Dec 28, 2007, 10:30:29 PM (17 years ago)
- Location:
- code/branches/FICN/src/orxonox/objects
- Files:
-
- 42 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/FICN/src/orxonox/objects/Ambient.cc
r614 r708 26 26 */ 27 27 28 #include <vector> 29 28 30 #include <OgreSceneManager.h> 29 #include <string>30 31 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" 31 39 #include "../Orxonox.h" 32 #include "../../tinyxml/tinyxml.h"33 #include "../../misc/Tokenizer.h"34 #include "../../misc/String2Number.h"35 #include "../core/Debug.h"36 40 37 41 #include "Ambient.h" … … 57 61 { 58 62 59 std::vector< std::string> colourvalues = tokenize(xmlElem->Attribute("colourvalue"),",");63 std::vector<String> colourvalues = tokenize(xmlElem->Attribute("colourvalue"),","); 60 64 float r, g, b; 61 65 String2Number<float>(r, colourvalues[0]); -
code/branches/FICN/src/orxonox/objects/Ambient.h
r673 r708 2 2 #define _Ambient_H__ 3 3 4 #include "../OrxonoxPrereqs.h" 5 4 6 #include "BaseObject.h" 5 #include "../../tinyxml/tinyxml.h"6 7 7 8 namespace orxonox -
code/branches/FICN/src/orxonox/objects/BaseObject.cc
r673 r708 30 30 @brief Implementation of the BaseObject class. 31 31 */ 32 33 #include "tinyxml/tinyxml.h" 34 #include "../core/CoreIncludes.h" 32 35 33 36 #include "BaseObject.h" -
code/branches/FICN/src/orxonox/objects/BaseObject.h
r673 r708 9 9 #define _BaseObject_H__ 10 10 11 #include "../core/CoreIncludes.h" 12 #include "tinyxml/tinyxml.h" 11 #include "../OrxonoxPrereqs.h" 12 13 #include "../core/OrxonoxClass.h" 13 14 14 15 namespace orxonox -
code/branches/FICN/src/orxonox/objects/BillboardSet.cc
r670 r708 28 28 #include <sstream> 29 29 30 #include <OgreSceneManager.h> 31 32 #include "../Orxonox.h" 33 #include "misc/Vector3.h" 34 #include "misc/ColourValue.h" 35 30 36 #include "BillboardSet.h" 31 #include "../Orxonox.h"32 37 33 38 namespace orxonox … … 40 45 } 41 46 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) 43 48 { 44 49 std::ostringstream name; -
code/branches/FICN/src/orxonox/objects/BillboardSet.h
r673 r708 2 2 #define _BillboardSet_H__ 3 3 4 #include < string>4 #include <OgreBillboardSet.h> 5 5 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" 7 12 8 13 namespace orxonox … … 13 18 BillboardSet(); 14 19 ~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); 16 21 17 22 inline Ogre::BillboardSet* getBillboardSet() 18 23 { return this->billboardSet_; } 19 24 20 inline const std::string& getName() const25 inline const String& getName() const 21 26 { return this->billboardSet_->getName(); } 22 27 -
code/branches/FICN/src/orxonox/objects/Camera.cc
r660 r708 3 3 #include <OgreRoot.h> 4 4 #include <OgreRenderWindow.h> 5 #include <OgreViewport.h> 5 6 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" 8 14 #include "../Orxonox.h" 9 15 #include "../GraphicsEngine.h" 10 #include "../../tinyxml/tinyxml.h"11 #include "../../misc/Tokenizer.h"12 #include "../../misc/String2Number.h"13 #include "../core/Debug.h"14 16 15 17 #include "Camera.h" … … 36 38 // <Camera name="Camera" pos="0,0,-250" lookat="0,0,0" /> 37 39 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"); 41 43 42 44 Ogre::Camera *cam = mgr->createCamera(name); 43 45 44 46 float x, y, z; 45 std::vector< std::string> posVec = tokenize(xmlElem->Attribute("pos"),",");46 47 std::vector<String> posVec = tokenize(xmlElem->Attribute("pos"),","); 48 String2Number<float>(x, posVec[0]); 47 49 String2Number<float>(y, posVec[1]); 48 50 String2Number<float>(z, posVec[2]); … … 57 59 cam->lookAt(Vector3(x,y,z)); 58 60 59 std::string node = xmlElem->Attribute("node");61 String node = xmlElem->Attribute("node"); 60 62 61 63 Ogre::SceneNode* sceneNode = (Ogre::SceneNode*)mgr->getRootSceneNode()->createChildSceneNode(node); //getChild(node); -
code/branches/FICN/src/orxonox/objects/Camera.h
r673 r708 2 2 #define _Camera_H__ 3 3 4 #include "../OrxonoxPrereqs.h" 5 4 6 #include "BaseObject.h" 5 #include "../../tinyxml/tinyxml.h"6 7 7 8 namespace orxonox -
code/branches/FICN/src/orxonox/objects/Explosion.cc
r670 r708 26 26 */ 27 27 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 28 37 #include "Explosion.h" 29 #include "../Orxonox.h"30 38 31 39 namespace orxonox … … 46 54 Vector3 position = owner->getNode()->getWorldPosition(); 47 55 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"); 49 57 this->particle_->getParticleSystem()->setParameter("local_space", "true"); 50 58 this->particle_->newEmitter(); -
code/branches/FICN/src/orxonox/objects/Explosion.h
r673 r708 2 2 #define _Explosion_H__ 3 3 4 #include "../particle/ParticleInterface.h" 4 #include "../OrxonoxPrereqs.h" 5 5 6 #include "WorldEntity.h" 6 7 #include "Timer.h" … … 18 19 Timer<Explosion> destroyTimer_; 19 20 float lifetime_; 20 particle::ParticleInterface* particle_;21 ParticleInterface* particle_; 21 22 }; 22 23 } -
code/branches/FICN/src/orxonox/objects/Fighter.cc
r706 r708 26 26 */ 27 27 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" 32 36 #include "../core/CoreIncludes.h" 33 37 #include "../Orxonox.h" 38 #include "../particle/ParticleInterface.h" 34 39 #include "weapon_system/AmmunitionDump.h" 35 40 #include "weapon_system/BarrelGun.h" 36 41 37 #include "OgreCamera.h" 38 #include <OgreRenderWindow.h> 39 #include <string> 42 #include "Fighter.h" 40 43 41 44 namespace orxonox … … 141 144 #endif 142 145 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"); 144 147 tt->getParticleSystem()->setParameter("local_space","true"); 145 148 tt->newEmitter(); … … 171 174 if (xmlElem->Attribute("forward") && xmlElem->Attribute("rotateupdown") && xmlElem->Attribute("rotaterightleft") && xmlElem->Attribute("looprightleft")) 172 175 { 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"); 177 180 178 181 String2Number<float>(this->maxSpeedForward_, forwardStr); -
code/branches/FICN/src/orxonox/objects/Fighter.h
r697 r708 2 2 #define _Fighter_H__ 3 3 4 #include <OIS/OIS.h> 5 4 6 #include "../OrxonoxPrereqs.h" 5 7 6 #include <OIS/OIS.h> 7 #include <string.h> 8 #include "Model.h" 8 9 9 #include "Model.h" 10 #include "../../tinyxml/tinyxml.h" 11 #include "../particle/ParticleInterface.h" 10 class TiXmlElement; // Forward declaration 12 11 13 12 namespace orxonox … … 45 44 bool setMouseEventCallback_; 46 45 47 particle::ParticleInterface *w;48 particle::ParticleInterface *tt;46 ParticleInterface *w; 47 ParticleInterface *tt; 49 48 50 49 AmmunitionDump* ammoDump_; -
code/branches/FICN/src/orxonox/objects/Light.cc
r676 r708 1 1 #include <sstream> 2 2 3 #include <OgreSceneManager.h> 4 5 #include "../Orxonox.h" 6 3 7 #include "Light.h" 4 #include "../Orxonox.h"5 8 6 9 namespace orxonox … … 13 16 } 14 17 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) 16 19 { 17 20 std::ostringstream name; -
code/branches/FICN/src/orxonox/objects/Light.h
r676 r708 2 2 #define _Light_H__ 3 3 4 #include < string>4 #include <OgreLight.h> 5 5 6 #include "OgreLight.h" 7 #include "OgreColourValue.h" 6 #include "../OrxonoxPrereqs.h" 7 8 #include "misc/String.h" 9 #include "misc/ColourValue.h" 8 10 9 11 namespace orxonox … … 14 16 Light(); 15 17 ~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)); 17 19 18 20 inline Ogre::Light* getLight() 19 21 { return this->light_; } 20 22 21 inline const std::string& getName() const23 inline const String& getName() const 22 24 { return this->light_->getName(); } 23 25 -
code/branches/FICN/src/orxonox/objects/Mesh.cc
r670 r708 28 28 #include <sstream> 29 29 30 #include <OgreSceneManager.h> 31 32 #include "../Orxonox.h" 33 30 34 #include "Mesh.h" 31 #include "../Orxonox.h"32 35 33 36 namespace orxonox … … 40 43 } 41 44 42 void Mesh::setMesh(const std::string& file)45 void Mesh::setMesh(const String& file) 43 46 { 44 47 std::ostringstream name; -
code/branches/FICN/src/orxonox/objects/Mesh.h
r673 r708 2 2 #define _Mesh_H__ 3 3 4 #include < string>4 #include <OgreEntity.h> 5 5 6 #include "OgreEntity.h" 6 #include "../OrxonoxPrereqs.h" 7 8 #include "misc/String.h" 7 9 8 10 namespace orxonox … … 13 15 Mesh(); 14 16 ~Mesh(); 15 void setMesh(const std::string& file);17 void setMesh(const String& file); 16 18 17 19 inline Ogre::Entity* getEntity() 18 20 { return this->entity_; } 19 21 20 inline const std::string& getName() const22 inline const String& getName() const 21 23 { return this->entity_->getName(); } 22 24 -
code/branches/FICN/src/orxonox/objects/Model.cc
r670 r708 26 26 */ 27 27 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" 29 33 30 34 #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"36 35 37 36 namespace orxonox -
code/branches/FICN/src/orxonox/objects/Model.h
r673 r708 2 2 #define _Model_H__ 3 3 4 #include "../OrxonoxPrereqs.h" 5 4 6 #include "WorldEntity.h" 5 7 #include "Mesh.h" 6 #include "../../tinyxml/tinyxml.h" 8 9 class TiXmlElement; // Forward declaration 7 10 8 11 namespace orxonox 9 12 { 13 10 14 class Model : public WorldEntity 11 15 { … … 17 21 18 22 private: 19 std::string meshSrc_;23 String meshSrc_; 20 24 Mesh mesh_; 21 25 void registerAllVariables(); -
code/branches/FICN/src/orxonox/objects/NPC.cc
r627 r708 26 26 */ 27 27 28 #include "../core/CoreIncludes.h" 28 29 #include "NPC.h" 29 #include "../core/Iterator.h"30 #include "../core/ObjectList.h"31 30 32 31 namespace orxonox { -
code/branches/FICN/src/orxonox/objects/NPC.h
r673 r708 8 8 #define _NPC_H__ 9 9 10 // includes 10 #include "../OrxonoxPrereqs.h" 11 11 12 #include "Model.h" 13 14 class TiXmlElement; // Forward declaration 12 15 13 16 namespace orxonox { -
code/branches/FICN/src/orxonox/objects/Projectile.cc
r706 r708 26 26 */ 27 27 28 #include "Projectile.h"29 28 #include "../core/CoreIncludes.h" 29 #include "SpaceShip.h" 30 30 #include "Explosion.h" 31 31 #include "Model.h" 32 33 #include "Projectile.h" 32 34 33 35 namespace orxonox -
code/branches/FICN/src/orxonox/objects/Projectile.h
r697 r708 2 2 #define _Projectile_H__ 3 3 4 #include "../OrxonoxPrereqs.h" 5 4 6 #include "WorldEntity.h" 5 7 #include "BillboardSet.h" 6 #include "SpaceShip.h"7 8 #include "Timer.h" 8 9 9 10 namespace orxonox 10 11 { 12 class SpaceShip; // Forward declaration 13 11 14 class Projectile : public WorldEntity 12 15 { -
code/branches/FICN/src/orxonox/objects/Skybox.cc
r614 r708 27 27 28 28 #include <OgreSceneManager.h> 29 #include <string>30 29 30 #include "tinyxml/tinyxml.h" 31 //#include "misc/Tokenizer.h" 32 //#include "misc/String2Number.h" 33 #include "misc/String.h" 31 34 #include "../Orxonox.h" 32 #include "../../tinyxml/tinyxml.h" 33 #include "../../misc/Tokenizer.h" 34 #include "../../misc/String2Number.h" 35 #include "../core/CoreIncludes.h" 35 36 #include "../core/Debug.h" 36 37 … … 56 57 if (xmlElem->Attribute("src")) 57 58 { 58 std::string skyboxSrc = xmlElem->Attribute("src");59 String skyboxSrc = xmlElem->Attribute("src"); 59 60 mgr->setSkyBox(true, skyboxSrc); 60 61 -
code/branches/FICN/src/orxonox/objects/Skybox.h
r673 r708 2 2 #define _Skybox_H__ 3 3 4 #include "../OrxonoxPrereqs.h" 5 4 6 #include "BaseObject.h" 5 #include "../../tinyxml/tinyxml.h" 7 8 class TiXmlElement; // Forward declaration 6 9 7 10 namespace orxonox -
code/branches/FICN/src/orxonox/objects/SpaceShip.cc
r706 r708 26 26 */ 27 27 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 28 43 #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>38 44 39 45 namespace orxonox … … 134 140 135 141 // 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"); 137 143 this->tt_->getParticleSystem()->setParameter("local_space","true"); 138 144 this->tt_->newEmitter(); … … 190 196 if (xmlElem->Attribute("forward") && xmlElem->Attribute("rotateupdown") && xmlElem->Attribute("rotaterightleft") && xmlElem->Attribute("looprightleft")) 191 197 { 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"); 196 202 197 203 String2Number<float>(this->maxSpeedForward_, forwardStr); … … 206 212 { 207 213 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"); 215 221 216 222 String2Number<float>(this->maxSpeed_, msStr); -
code/branches/FICN/src/orxonox/objects/SpaceShip.h
r697 r708 2 2 #define _SpaceShip_H__ 3 3 4 #include <OIS/OIS.h> 4 #include <OgrePrerequisites.h> 5 #include <OIS/OISMouse.h> 6 7 #include "../OrxonoxPrereqs.h" 5 8 6 9 #include "Model.h" 7 10 #include "BillboardSet.h" 8 #include "OgreSceneNode.h"9 11 10 #include "../../tinyxml/tinyxml.h" 11 #include "../particle/ParticleInterface.h" 12 class TiXmlElement; // Forward declaration 12 13 13 14 namespace orxonox 14 15 { 16 class ParticleInterface; // Forward declaration 17 15 18 class SpaceShip : public Model, public OIS::MouseListener 16 19 { … … 50 53 Ogre::SceneNode* camNode_; 51 54 52 particle::ParticleInterface* tt_;55 ParticleInterface* tt_; 53 56 54 57 BillboardSet redBillboard_; -
code/branches/FICN/src/orxonox/objects/Tickable.h
r673 r708 41 41 #define _Tickable_H__ 42 42 43 #include <OgreFrameListener.h> 44 45 #include "../OrxonoxPrereqs.h" 46 43 47 #include "../core/CoreIncludes.h" 44 #include "OgreFrameListener.h"45 48 46 49 namespace orxonox -
code/branches/FICN/src/orxonox/objects/Timer.h
r673 r708 58 58 #define _Timer_H__ 59 59 60 #include <OgreFrameListener.h> 61 62 #include "../OrxonoxPrereqs.h" 63 60 64 #include "../core/CoreIncludes.h" 61 #include "OgreFrameListener.h"62 65 63 66 namespace orxonox -
code/branches/FICN/src/orxonox/objects/WorldEntity.cc
r670 r708 26 26 */ 27 27 28 #include <string>29 28 #include <sstream> 30 29 31 #include "WorldEntity.h" 30 #include "tinyxml/tinyxml.h" 31 #include "misc/Tokenizer.h" 32 #include "misc/String2Number.h" 33 #include "misc/String.h" 32 34 #include "../core/CoreIncludes.h" 33 35 #include "../Orxonox.h" 34 #include "../../tinyxml/tinyxml.h" 35 #include "../../misc/Tokenizer.h" 36 #include "../../misc/String2Number.h" 36 #include "WorldEntity.h" 37 37 38 38 namespace orxonox … … 88 88 if (xmlElem->Attribute("position")) 89 89 { 90 std::vector< std::string> pos = tokenize(xmlElem->Attribute("position"),",");90 std::vector<String> pos = tokenize(xmlElem->Attribute("position"),","); 91 91 float x, y, z; 92 92 String2Number<float>(x, pos[0]); … … 98 98 if (xmlElem->Attribute("direction")) 99 99 { 100 std::vector< std::string> pos = tokenize(xmlElem->Attribute("direction"),",");100 std::vector<String> pos = tokenize(xmlElem->Attribute("direction"),","); 101 101 float x, y, z; 102 102 String2Number<float>(x, pos[0]); … … 125 125 if (xmlElem->Attribute("scale")) 126 126 { 127 std::string scaleStr = xmlElem->Attribute("scale");127 String scaleStr = xmlElem->Attribute("scale"); 128 128 float scale; 129 129 String2Number<float>(scale, scaleStr); … … 133 133 if (xmlElem->Attribute("rotationAxis")) 134 134 { 135 std::vector< std::string> pos = tokenize(xmlElem->Attribute("rotationAxis"),",");135 std::vector<String> pos = tokenize(xmlElem->Attribute("rotationAxis"),","); 136 136 float x, y, z; 137 137 String2Number<float>(x, pos[0]); -
code/branches/FICN/src/orxonox/objects/WorldEntity.h
r673 r708 5 5 #include <OgreSceneNode.h> 6 6 7 #include "../OrxonoxPrereqs.h" 8 9 #include "misc/Vector3.h" 10 #include "misc/Matrix3.h" 11 #include "misc/Quaternion.h" 7 12 #include "network/Synchronisable.h" 8 13 #include "tinyxml/tinyxml.h" -
code/branches/FICN/src/orxonox/objects/weapon_system/AmmunitionDump.cc
r668 r708 59 59 } 60 60 61 void AmmunitionDump::setDumpSize(const Ogre::String &name, int size)61 void AmmunitionDump::setDumpSize(const String &name, int size) 62 62 { 63 63 if (size < 0) … … 70 70 71 71 72 int AmmunitionDump::store(const Ogre::String &name, int quantity)72 int AmmunitionDump::store(const String &name, int quantity) 73 73 { 74 74 int id = Orxonox::getSingleton()->getBulletMgr()->getAmmunitionID(name); … … 87 87 88 88 89 int AmmunitionDump::getAmmunition(const Ogre::String &name, int quantity)89 int AmmunitionDump::getAmmunition(const String &name, int quantity) 90 90 { 91 91 int id = Orxonox::getSingleton()->getBulletMgr()->getAmmunitionID(name); … … 103 103 104 104 105 int AmmunitionDump::getStockSize(const Ogre::String &name)105 int AmmunitionDump::getStockSize(const String &name) 106 106 { 107 107 int id = Orxonox::getSingleton()->getBulletMgr()->getAmmunitionID(name); -
code/branches/FICN/src/orxonox/objects/weapon_system/AmmunitionDump.h
r673 r708 32 32 #include <OgrePrerequisites.h> 33 33 34 #include " orxonox/OrxonoxPrereqs.h"34 #include "../../OrxonoxPrereqs.h" 35 35 36 36 #include "network/Synchronisable.h" 37 37 //#include "../core/CoreIncludes.h" 38 #include "misc/String.h" 38 39 #include "../BaseObject.h" 39 40 … … 46 47 ~AmmunitionDump(); 47 48 48 void setDumpSize(const Ogre::String &name, int size);49 void setDumpSize(const String &name, int size); 49 50 50 int store(const Ogre::String &name, int quantiy);51 int store(const String &name, int quantiy); 51 52 52 int getAmmunition(const Ogre::String &name, int quantity);53 int getAmmunition(const String &name, int quantity); 53 54 54 int getStockSize(const Ogre::String &name);55 int getStockSize(const String &name); 55 56 56 57 virtual void loadParams(TiXmlElement* xmlElem) { BaseObject::loadParams(xmlElem); }; -
code/branches/FICN/src/orxonox/objects/weapon_system/BarrelGun.cc
r668 r708 26 26 */ 27 27 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> 34 32 33 #include "misc/Vector3.h" 35 34 #include "Bullet.h" 36 35 #include "BulletManager.h" … … 42 41 43 42 namespace orxonox { 44 using namespace Ogre;45 46 43 CreateFactory(BarrelGun); 47 44 … … 78 75 79 76 Ogre::Entity* bulletEntity = sceneMgr_->createEntity("BulletEntity" 80 +StringConverter::toString(bulletCounter_++), "Barrel.mesh");77 + Ogre::StringConverter::toString(bulletCounter_++), "Barrel.mesh"); 81 78 82 79 Vector3 speed = (temp->getOrientation() * Vector3(1, 0, 0)) … … 106 103 107 104 108 109 105 void BarrelGun::secondaryFire() 110 106 { … … 120 116 121 117 Ogre::Entity* bulletEntity = sceneMgr_->createEntity("BulletEntity" 122 +StringConverter::toString(bulletCounter_++), "Barrel.mesh");118 + Ogre::StringConverter::toString(bulletCounter_++), "Barrel.mesh"); 123 119 124 120 Vector3 speed = (temp->getOrientation() * Vector3(1, 0, 0)) -
code/branches/FICN/src/orxonox/objects/weapon_system/BarrelGun.h
r673 r708 32 32 #include <OgrePrerequisites.h> 33 33 34 #include " orxonox/OrxonoxPrereqs.h"34 #include "../../OrxonoxPrereqs.h" 35 35 36 36 #include "BaseWeapon.h" -
code/branches/FICN/src/orxonox/objects/weapon_system/BaseWeapon.cc
r680 r708 26 26 */ 27 27 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> 34 32 33 #include "misc/Vector3.h" 35 34 #include "../../Orxonox.h" 36 37 35 #include "Bullet.h" 38 36 #include "BulletManager.h" … … 43 41 44 42 namespace orxonox { 45 using namespace Ogre;46 47 //CreateFactory(BaseWeapon);48 49 43 float BaseWeapon::nextActionValidityPeriod_s = 0.5; 50 44 -
code/branches/FICN/src/orxonox/objects/weapon_system/BaseWeapon.h
r680 r708 32 32 #include <OgrePrerequisites.h> 33 33 34 #include " orxonox/OrxonoxPrereqs.h"34 #include "../../OrxonoxPrereqs.h" 35 35 36 36 #include "../Model.h" … … 116 116 float primaryFiringRate_; 117 117 float secondaryFiringRate_; 118 Ogre::Real primaryBulletSpeed_;119 Ogre::Real secondaryBulletSpeed_;118 Real primaryBulletSpeed_; 119 Real secondaryBulletSpeed_; 120 120 121 121 int magazineSize_; -
code/branches/FICN/src/orxonox/objects/weapon_system/Bullet.cc
r669 r708 26 26 */ 27 27 28 #include "OgreSceneNode.h"29 #include "OgreEntity.h"30 #include "OgreVector3.h"31 32 28 #include "Bullet.h" 33 29 34 35 30 namespace orxonox { 36 using namespace Ogre;37 38 31 CreateFactory(Bullet); 39 32 -
code/branches/FICN/src/orxonox/objects/weapon_system/Bullet.h
r673 r708 32 32 #include <OgrePrerequisites.h> 33 33 34 #include " orxonox/OrxonoxPrereqs.h"34 #include "../../OrxonoxPrereqs.h" 35 35 36 36 #include "../Model.h" -
code/branches/FICN/src/orxonox/objects/weapon_system/BulletManager.cc
r680 r708 26 26 */ 27 27 28 #include "OgreSceneNode.h"29 30 28 #include "BulletManager.h" 31 29 #include "Bullet.h" … … 33 31 34 32 namespace orxonox { 35 using namespace Ogre;36 37 33 CreateFactory(BulletManager); 38 34 … … 86 82 } 87 83 88 int BulletManager::getAmmunitionID(const Ogre::String &ammoName)84 int BulletManager::getAmmunitionID(const String &ammoName) 89 85 { 90 Ogre::String ammoTypes[] = { "Energy Cell", "Barrel", "Lead Shot" };86 String ammoTypes[] = { "Energy Cell", "Barrel", "Lead Shot" }; 91 87 int ammoTypesLength = 3; 92 88 -
code/branches/FICN/src/orxonox/objects/weapon_system/BulletManager.h
r673 r708 32 32 #include <OgrePrerequisites.h> 33 33 34 #include " orxonox/OrxonoxPrereqs.h"34 #include "../../OrxonoxPrereqs.h" 35 35 36 36 #include "network/Synchronisable.h" 37 37 #include "tinyxml/tinyxml.h" 38 38 //#include "../core/CoreIncludes.h" 39 #include "misc/String.h" 39 40 #include "../BaseObject.h" 40 41 #include "../Tickable.h" … … 49 50 void addBullet(Bullet*); 50 51 51 int getAmmunitionID(const Ogre::String&);52 int getAmmunitionID(const String&); 52 53 53 54 int getNumberOfAmmos(); -
code/branches/FICN/src/orxonox/objects/weapon_system/WeaponStation.cc
r680 r708 26 26 */ 27 27 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 35 28 #include "BaseWeapon.h" 36 37 29 #include "WeaponStation.h" 38 30 39 31 40 32 namespace orxonox { 41 using namespace Ogre;42 43 33 WeaponStation::WeaponStation(int stationSize) 44 34 : slots_(new BaseWeapon*[stationSize]), -
code/branches/FICN/src/orxonox/objects/weapon_system/WeaponStation.h
r673 r708 32 32 #include <OgrePrerequisites.h> 33 33 34 #include " orxonox/OrxonoxPrereqs.h"34 #include "../../OrxonoxPrereqs.h" 35 35 36 36
Note: See TracChangeset
for help on using the changeset viewer.