Changeset 715 for code/branches/FICN/src/orxonox/objects
- Timestamp:
- Dec 28, 2007, 11:33:10 PM (17 years ago)
- Location:
- code/branches/FICN/src/orxonox/objects
- Files:
-
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/FICN/src/orxonox/objects/Ambient.cc
r708 r715 27 27 28 28 #include <vector> 29 #include <string> 29 30 30 31 #include <OgreSceneManager.h> … … 34 35 #include "misc/String2Number.h" 35 36 #include "misc/ColourValue.h" 36 #include "misc/String.h"37 37 #include "../core/Debug.h" 38 38 #include "../core/CoreIncludes.h" … … 61 61 { 62 62 63 std::vector< String> colourvalues = tokenize(xmlElem->Attribute("colourvalue"),",");63 std::vector<std::string> colourvalues = tokenize(xmlElem->Attribute("colourvalue"),","); 64 64 float r, g, b; 65 65 String2Number<float>(r, colourvalues[0]); -
code/branches/FICN/src/orxonox/objects/BillboardSet.cc
r708 r715 45 45 } 46 46 47 void BillboardSet::setBillboardSet(const String& file, const ColourValue& colour, int count, const Vector3& position)47 void BillboardSet::setBillboardSet(const std::string& file, const ColourValue& colour, int count, const Vector3& position) 48 48 { 49 49 std::ostringstream name; -
code/branches/FICN/src/orxonox/objects/BillboardSet.h
r708 r715 1 1 #ifndef _BillboardSet_H__ 2 2 #define _BillboardSet_H__ 3 4 #include <string> 3 5 4 6 #include <OgreBillboardSet.h> … … 6 8 #include "../OrxonoxPrereqs.h" 7 9 8 #include "misc/String.h"9 10 #include "../core/CoreIncludes.h" 10 11 #include "misc/ColourValue.h" … … 18 19 BillboardSet(); 19 20 ~BillboardSet(); 20 void setBillboardSet(const String& file, const ColourValue& colour = ColourValue(1.0, 1.0, 1.0), int count = 1, const Vector3& position = Vector3::ZERO);21 void setBillboardSet(const std::string& file, const ColourValue& colour = ColourValue(1.0, 1.0, 1.0), int count = 1, const Vector3& position = Vector3::ZERO); 21 22 22 23 inline Ogre::BillboardSet* getBillboardSet() 23 24 { return this->billboardSet_; } 24 25 25 inline const String& getName() const26 inline const std::string& getName() const 26 27 { return this->billboardSet_->getName(); } 27 28 -
code/branches/FICN/src/orxonox/objects/Camera.cc
r708 r715 1 #include <string> 2 1 3 #include <OgreSceneManager.h> 2 4 #include <OgreSceneNode.h> … … 9 11 #include "misc/String2Number.h" 10 12 #include "misc/Vector3.h" 11 #include "misc/String.h"12 13 #include "../core/Debug.h" 13 14 #include "../core/CoreIncludes.h" … … 38 39 // <Camera name="Camera" pos="0,0,-250" lookat="0,0,0" /> 39 40 40 String name = xmlElem->Attribute("name");41 String pos = xmlElem->Attribute("pos");42 String lookat = xmlElem->Attribute("lookat");41 std::string name = xmlElem->Attribute("name"); 42 std::string pos = xmlElem->Attribute("pos"); 43 std::string lookat = xmlElem->Attribute("lookat"); 43 44 44 45 Ogre::Camera *cam = mgr->createCamera(name); 45 46 46 47 float x, y, z; 47 std::vector< String> posVec = tokenize(xmlElem->Attribute("pos"),",");48 std::vector<std::string> posVec = tokenize(xmlElem->Attribute("pos"),","); 48 49 String2Number<float>(x, posVec[0]); 49 50 String2Number<float>(y, posVec[1]); … … 59 60 cam->lookAt(Vector3(x,y,z)); 60 61 61 String node = xmlElem->Attribute("node");62 std::string node = xmlElem->Attribute("node"); 62 63 63 64 Ogre::SceneNode* sceneNode = (Ogre::SceneNode*)mgr->getRootSceneNode()->createChildSceneNode(node); //getChild(node); -
code/branches/FICN/src/orxonox/objects/Fighter.cc
r708 r715 26 26 */ 27 27 28 #include <string> 29 28 30 #include <OgreCamera.h> 29 31 #include <OgreRenderWindow.h> … … 33 35 #include "tinyxml/tinyxml.h" 34 36 #include "misc/String2Number.h" 35 #include "misc/String.h"36 37 #include "../core/CoreIncludes.h" 37 38 #include "../Orxonox.h" … … 174 175 if (xmlElem->Attribute("forward") && xmlElem->Attribute("rotateupdown") && xmlElem->Attribute("rotaterightleft") && xmlElem->Attribute("looprightleft")) 175 176 { 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 std::string forwardStr = xmlElem->Attribute("forward"); 178 std::string rotateupdownStr = xmlElem->Attribute("rotateupdown"); 179 std::string rotaterightleftStr = xmlElem->Attribute("rotaterightleft"); 180 std::string looprightleftStr = xmlElem->Attribute("looprightleft"); 180 181 181 182 String2Number<float>(this->maxSpeedForward_, forwardStr); -
code/branches/FICN/src/orxonox/objects/Light.h
r708 r715 1 1 #ifndef _Light_H__ 2 2 #define _Light_H__ 3 4 #include <string> 3 5 4 6 #include <OgreLight.h> … … 6 8 #include "../OrxonoxPrereqs.h" 7 9 8 #include "misc/String.h"9 10 #include "misc/ColourValue.h" 10 11 … … 21 22 { return this->light_; } 22 23 23 inline const String& getName() const24 inline const std::string& getName() const 24 25 { return this->light_->getName(); } 25 26 -
code/branches/FICN/src/orxonox/objects/Mesh.cc
r708 r715 43 43 } 44 44 45 void Mesh::setMesh(const String& file)45 void Mesh::setMesh(const std::string& file) 46 46 { 47 47 std::ostringstream name; -
code/branches/FICN/src/orxonox/objects/Mesh.h
r708 r715 1 1 #ifndef _Mesh_H__ 2 2 #define _Mesh_H__ 3 4 #include <string> 3 5 4 6 #include <OgreEntity.h> 5 7 6 8 #include "../OrxonoxPrereqs.h" 7 8 #include "misc/String.h"9 9 10 10 namespace orxonox … … 15 15 Mesh(); 16 16 ~Mesh(); 17 void setMesh(const String& file);17 void setMesh(const std::string& file); 18 18 19 19 inline Ogre::Entity* getEntity() 20 20 { return this->entity_; } 21 21 22 inline const String& getName() const22 inline const std::string& getName() const 23 23 { return this->entity_->getName(); } 24 24 -
code/branches/FICN/src/orxonox/objects/Model.h
r708 r715 21 21 22 22 private: 23 String meshSrc_;23 std::string meshSrc_; 24 24 Mesh mesh_; 25 25 void registerAllVariables(); -
code/branches/FICN/src/orxonox/objects/Skybox.cc
r708 r715 26 26 */ 27 27 28 #include <string> 29 28 30 #include <OgreSceneManager.h> 29 31 … … 31 33 //#include "misc/Tokenizer.h" 32 34 //#include "misc/String2Number.h" 33 #include "misc/String.h"34 35 #include "../Orxonox.h" 35 36 #include "../core/CoreIncludes.h" … … 57 58 if (xmlElem->Attribute("src")) 58 59 { 59 String skyboxSrc = xmlElem->Attribute("src");60 std::string skyboxSrc = xmlElem->Attribute("src"); 60 61 mgr->setSkyBox(true, skyboxSrc); 61 62 -
code/branches/FICN/src/orxonox/objects/SpaceShip.cc
r708 r715 26 26 */ 27 27 28 #include <string> 29 28 30 #include <OIS/OIS.h> 29 31 #include <OgreCamera.h> … … 34 36 #include "tinyxml/tinyxml.h" 35 37 #include "misc/String2Number.h" 36 #include "misc/String.h"37 38 #include "../core/CoreIncludes.h" 38 39 #include "../core/Debug.h" … … 196 197 if (xmlElem->Attribute("forward") && xmlElem->Attribute("rotateupdown") && xmlElem->Attribute("rotaterightleft") && xmlElem->Attribute("looprightleft")) 197 198 { 198 String forwardStr = xmlElem->Attribute("forward");199 String rotateupdownStr = xmlElem->Attribute("rotateupdown");200 String rotaterightleftStr = xmlElem->Attribute("rotaterightleft");201 String looprightleftStr = xmlElem->Attribute("looprightleft");199 std::string forwardStr = xmlElem->Attribute("forward"); 200 std::string rotateupdownStr = xmlElem->Attribute("rotateupdown"); 201 std::string rotaterightleftStr = xmlElem->Attribute("rotaterightleft"); 202 std::string looprightleftStr = xmlElem->Attribute("looprightleft"); 202 203 203 204 String2Number<float>(this->maxSpeedForward_, forwardStr); … … 212 213 { 213 214 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 std::string msStr = xmlElem->Attribute("maxSpeed"); 216 std::string msabsStr = xmlElem->Attribute("maxSideAndBackSpeed"); 217 std::string mrStr = xmlElem->Attribute("maxRotation"); 218 std::string taStr = xmlElem->Attribute("transAcc"); 219 std::string raStr = xmlElem->Attribute("rotAcc"); 220 std::string tdStr = xmlElem->Attribute("transDamp"); 221 std::string rdStr = xmlElem->Attribute("rotDamp"); 221 222 222 223 String2Number<float>(this->maxSpeed_, msStr); -
code/branches/FICN/src/orxonox/objects/WorldEntity.cc
r708 r715 26 26 */ 27 27 28 #include <string> 28 29 #include <sstream> 29 30 … … 31 32 #include "misc/Tokenizer.h" 32 33 #include "misc/String2Number.h" 33 #include "misc/String.h"34 34 #include "../core/CoreIncludes.h" 35 35 #include "../Orxonox.h" … … 88 88 if (xmlElem->Attribute("position")) 89 89 { 90 std::vector< String> pos = tokenize(xmlElem->Attribute("position"),",");90 std::vector<std::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< String> pos = tokenize(xmlElem->Attribute("direction"),",");100 std::vector<std::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 String scaleStr = xmlElem->Attribute("scale");127 std::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< String> pos = tokenize(xmlElem->Attribute("rotationAxis"),",");135 std::vector<std::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/weapon_system/AmmunitionDump.cc
r708 r715 59 59 } 60 60 61 void AmmunitionDump::setDumpSize(const String &name, int size)61 void AmmunitionDump::setDumpSize(const std::string &name, int size) 62 62 { 63 63 if (size < 0) … … 70 70 71 71 72 int AmmunitionDump::store(const String &name, int quantity)72 int AmmunitionDump::store(const std::string &name, int quantity) 73 73 { 74 74 int id = Orxonox::getSingleton()->getBulletMgr()->getAmmunitionID(name); … … 87 87 88 88 89 int AmmunitionDump::getAmmunition(const String &name, int quantity)89 int AmmunitionDump::getAmmunition(const std::string &name, int quantity) 90 90 { 91 91 int id = Orxonox::getSingleton()->getBulletMgr()->getAmmunitionID(name); … … 103 103 104 104 105 int AmmunitionDump::getStockSize(const String &name)105 int AmmunitionDump::getStockSize(const std::string &name) 106 106 { 107 107 int id = Orxonox::getSingleton()->getBulletMgr()->getAmmunitionID(name); -
code/branches/FICN/src/orxonox/objects/weapon_system/AmmunitionDump.h
r708 r715 30 30 #define _AmmunitionDump_H__ 31 31 32 #include <string> 33 32 34 #include <OgrePrerequisites.h> 33 35 … … 36 38 #include "network/Synchronisable.h" 37 39 //#include "../core/CoreIncludes.h" 38 #include "misc/String.h"39 40 #include "../BaseObject.h" 40 41 … … 47 48 ~AmmunitionDump(); 48 49 49 void setDumpSize(const String &name, int size);50 void setDumpSize(const std::string &name, int size); 50 51 51 int store(const String &name, int quantiy);52 int store(const std::string &name, int quantiy); 52 53 53 int getAmmunition(const String &name, int quantity);54 int getAmmunition(const std::string &name, int quantity); 54 55 55 int getStockSize(const String &name);56 int getStockSize(const std::string &name); 56 57 57 58 virtual void loadParams(TiXmlElement* xmlElem) { BaseObject::loadParams(xmlElem); }; -
code/branches/FICN/src/orxonox/objects/weapon_system/BulletManager.cc
r708 r715 82 82 } 83 83 84 int BulletManager::getAmmunitionID(const String &ammoName)84 int BulletManager::getAmmunitionID(const std::string &ammoName) 85 85 { 86 String ammoTypes[] = { "Energy Cell", "Barrel", "Lead Shot" };86 std::string ammoTypes[] = { "Energy Cell", "Barrel", "Lead Shot" }; 87 87 int ammoTypesLength = 3; 88 88 -
code/branches/FICN/src/orxonox/objects/weapon_system/BulletManager.h
r708 r715 30 30 #define _BulletManager_H__ 31 31 32 #include <string> 33 32 34 #include <OgrePrerequisites.h> 33 35 … … 37 39 #include "tinyxml/tinyxml.h" 38 40 //#include "../core/CoreIncludes.h" 39 #include "misc/String.h"40 41 #include "../BaseObject.h" 41 42 #include "../Tickable.h" … … 50 51 void addBullet(Bullet*); 51 52 52 int getAmmunitionID(const String&);53 int getAmmunitionID(const std::string&); 53 54 54 55 int getNumberOfAmmos();
Note: See TracChangeset
for help on using the changeset viewer.