Changeset 708 for code/branches/FICN/src/orxonox/objects/Camera.cc
- Timestamp:
- Dec 28, 2007, 10:30:29 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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);
Note: See TracChangeset
for help on using the changeset viewer.