Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 14, 2008, 9:39:57 PM (16 years ago)
Author:
rgrieder
Message:
  • replaced all String2Number with ConvertValue
  • replaced all tokenize with SubString
  • dealt with warnings under msvc
  • removed some warnings by placing casts
  • bugfix in audio: local variable pushed into member variable std::vector
  • updated StableHeaders.h
File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/orxonox/objects/Camera.cc

    r1056 r1064  
    3838
    3939#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"
    4242#include "util/Math.h"
    4343#include "core/Debug.h"
     
    7373
    7474        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]);
    7979
    8080        cam->setPosition(Vector3(x,y,z));
    8181
    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]);
    8686
    8787        cam->lookAt(Vector3(x,y,z));
     
    9393
    9494        // FIXME: unused var
    95         Ogre::Viewport* vp = GraphicsEngine::getSingleton().getRenderWindow()->addViewport(cam);
     95        //Ogre::Viewport* vp =
     96        GraphicsEngine::getSingleton().getRenderWindow()->addViewport(cam);
    9697
    9798
Note: See TracChangeset for help on using the changeset viewer.