parseVector2, parseVector4 is missing

What it says on the tin: a place to discuss proposed new features.
Post Reply
User avatar
FrameFever
Platinum Sponsor
Platinum Sponsor
Posts: 414
Joined: Fri Apr 27, 2007 10:05 am

parseVector2, parseVector4 is missing

Post by FrameFever »

can you implement this Sinbad?

or does I have not seen this function?

Code: Select all

 Vector2 StringConverter::parseVector2(const String& val)
    {
        // Split on space
        std::vector<String> vec = StringUtil::split(val);

        if (vec.size() != 2)
        {
            return Vector2::ZERO;
        }
        else
        {
            return Vector2(parseReal(vec[0]),parseReal(vec[1]));
        }

    }

Vector4 StringConverter::parseVector4(const String& val)
    {
        // Split on space
        std::vector<String> vec = StringUtil::split(val);

        if (vec.size() != 4)
        {
            return Vector4::ZERO;
        }
        else
        {
            return Vector4(parseReal(vec[0]),parseReal(vec[1]),parseReal(vec[2]),parseReal(vec[3]));
        }

    }
User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19269
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
x 67
Contact:

Post by sinbad »

Already implemented in Shoggoth a fair while ago.
User avatar
FrameFever
Platinum Sponsor
Platinum Sponsor
Posts: 414
Joined: Fri Apr 27, 2007 10:05 am

Post by FrameFever »

where can I download the "shoggoth" version?
User avatar
haffax
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 4823
Joined: Fri Jun 18, 2004 1:40 pm
Location: Berlin, Germany
x 8
Contact:

Post by haffax »

Only from Ogre's CVS, it is the HEAD. But be aware that this version is still in development, it can stop working after an update without notice and build files might be out of date once in a while.
Don't use it, if you don't want to worry about such problems.
team-pantheon programmer
creators of Rastullahs Lockenpracht
User avatar
PolyVox
OGRE Contributor
OGRE Contributor
Posts: 1316
Joined: Tue Nov 21, 2006 11:28 am
Location: Groningen, The Netherlands
x 18
Contact:

Post by PolyVox »

But see ing as it's such a simple feature, you could easily back port it safe in the knowledge that it will be in the official version eventually.
User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19269
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
x 67
Contact:

Post by sinbad »

Since you've already written the code you can obviously add it to whatever version you want. It just doesn't count as a feature request any more ;)
Post Reply