Changeset 1064 for code/trunk/src/orxonox/objects/Camera.cc
- Timestamp:
- Apr 14, 2008, 9:39:57 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/orxonox/objects/Camera.cc
r1056 r1064 38 38 39 39 #include "util/tinyxml/tinyxml.h" 40 #include "util/ Tokenizer.h"41 #include "util/ String2Number.h"40 #include "util/Substring.h" 41 #include "util/Convert.h" 42 42 #include "util/Math.h" 43 43 #include "core/Debug.h" … … 73 73 74 74 float x, y, z; 75 std::vector<std::string> posVec = tokenize(xmlElem->Attribute("pos"),",");76 String2Number<float>(x, posVec[0]);77 String2Number<float>(y, posVec[1]);78 String2Number<float>(z, posVec[2]);75 SubString posVec(xmlElem->Attribute("pos"), ','); 76 convertValue<std::string, float>(&x, posVec[0]); 77 convertValue<std::string, float>(&y, posVec[1]); 78 convertValue<std::string, float>(&z, posVec[2]); 79 79 80 80 cam->setPosition(Vector3(x,y,z)); 81 81 82 posVec = tokenize(xmlElem->Attribute("lookat"),",");83 String2Number<float>(x, posVec[0]);84 String2Number<float>(y, posVec[1]);85 String2Number<float>(z, posVec[2]);82 posVec = SubString(xmlElem->Attribute("lookat"), ','); 83 convertValue<std::string, float>(&x, posVec[0]); 84 convertValue<std::string, float>(&y, posVec[1]); 85 convertValue<std::string, float>(&z, posVec[2]); 86 86 87 87 cam->lookAt(Vector3(x,y,z)); … … 93 93 94 94 // FIXME: unused var 95 Ogre::Viewport* vp = GraphicsEngine::getSingleton().getRenderWindow()->addViewport(cam); 95 //Ogre::Viewport* vp = 96 GraphicsEngine::getSingleton().getRenderWindow()->addViewport(cam); 96 97 97 98
Note: See TracChangeset
for help on using the changeset viewer.