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