![]() |
V-Gears 0
Free Final Fantasy VII engine.
|
#include <OgreColourValue.h>
#include <OgreMatrix4.h>
#include <OgreString.h>
#include <OgreStringVector.h>
#include <Ogre.h>
#include <Overlay/OgreUTFString.h>
#include <OIS/OIS.h>
#include <tinyxml.h>
Go to the source code of this file.
Functions | |
bool | GetBool (TiXmlNode *node, const Ogre::String &tag, bool def=false) |
Retrieves a boolean from an XMl tag. More... | |
int | GetInt (TiXmlNode *node, const Ogre::String &tag, int def=0) |
Retrieves an integer from an XMl tag. More... | |
float | GetFloat (TiXmlNode *node, const Ogre::String &tag, float def=0.0f) |
Retrieves a decimal from an XMl tag. More... | |
const Ogre::String | GetString (TiXmlNode *node, const Ogre::String &tag, const Ogre::String &def="") |
Retrieves a string from an XMl tag. More... | |
const Ogre::UTFString | GetUTFString (TiXmlNode *node, const Ogre::String &tag, const Ogre::UTFString &def="") |
Retrieves a string from an XMl tag. More... | |
const Ogre::Vector2 | GetVector2 (TiXmlNode *node, const Ogre::String &tag, const Ogre::Vector2 &def=Ogre::Vector2::ZERO) |
Retrieves a 2-dimensional vector from an XMl tag. More... | |
const Ogre::Vector3 | GetVector3 (TiXmlNode *node, const Ogre::String &tag, const Ogre::Vector3 &def=Ogre::Vector3::ZERO) |
Retrieves a 3-dimensional vector from an XMl tag. More... | |
const Ogre::Vector4 | GetVector4 (TiXmlNode *node, const Ogre::String &tag, const Ogre::Vector4 &def=Ogre::Vector4::ZERO) |
Retrieves a 4-dimensional vector from an XMl tag. More... | |
const Ogre::Matrix4 | GetMatrix4 (TiXmlNode *node, const Ogre::String &tag, const Ogre::Matrix4 &def=Ogre::Matrix4::IDENTITY) |
Retrieves a 4-dimensional matrix from an XMl tag. More... | |
const Ogre::Quaternion | GetQuaternion (TiXmlNode *node, const Ogre::String &tag, const Ogre::Quaternion &def=Ogre::Quaternion::IDENTITY) |
Retrieves a quaternion from an XMl tag. More... | |
const Ogre::ColourValue | GetColourValue (TiXmlNode *node, const Ogre::String &tag, const Ogre::ColourValue &def=Ogre::ColourValue::ZERO) |
Retrieves a colour from an XMl tag. More... | |
void | ParsePercent (float &value_percent, float &value, const Ogre::String &string) |
Parses percentage strings. More... | |
float | ParseKeyFrameTime (const float length, const Ogre::String &string) |
Parses a keyframe time string. More... | |
const Ogre::String | CreateAutoName (const Ogre::String prefix) |
Creates a name. More... | |
Ogre::String | KeyToString (OIS::KeyCode key) |
Obtains a name from a key code. More... | |
OIS::KeyCode | StringToKey (const Ogre::String &str) |
Obtains a key code from a name. More... | |
Ogre::StringVector | StringTokenise (const Ogre::String &str, const Ogre::String &delimiters="\t\n ", const Ogre::String &delimiters_preserve="", const Ogre::String "e="\"", const Ogre::String &esc="\\") |
Tokenizes a string. More... | |
const Ogre::String CreateAutoName | ( | const Ogre::String | prefix | ) |
Creates a name.
[in] | prefix | Name prefix. |
bool GetBool | ( | TiXmlNode * | node, |
const Ogre::String & | tag, | ||
bool | def = false |
||
) |
Retrieves a boolean from an XMl tag.
[in] | node | The XML node. |
[in] | tag | The name of the tag. |
[in] | def | Default value, in case the tag is not found or it's not a boolean value. |
const Ogre::ColourValue GetColourValue | ( | TiXmlNode * | node, |
const Ogre::String & | tag, | ||
const Ogre::ColourValue & | def = Ogre::ColourValue::ZERO |
||
) |
Retrieves a colour from an XMl tag.
[in] | node | The XML node. |
[in] | tag | The name of the tag. |
[in] | def | Default value, in case the tag is not found. |
float GetFloat | ( | TiXmlNode * | node, |
const Ogre::String & | tag, | ||
float | def = 0.0f |
||
) |
Retrieves a decimal from an XMl tag.
[in] | node | The XML node. |
[in] | tag | The name of the tag. |
[in] | def | Default value, in case the tag is not found or it's not a numeric value. |
int GetInt | ( | TiXmlNode * | node, |
const Ogre::String & | tag, | ||
int | def = 0 |
||
) |
Retrieves an integer from an XMl tag.
[in] | node | The XML node. |
[in] | tag | The name of the tag. |
[in] | def | Default value, in case the tag is not found or it's not a numeric value. |
const Ogre::Matrix4 GetMatrix4 | ( | TiXmlNode * | node, |
const Ogre::String & | tag, | ||
const Ogre::Matrix4 & | def = Ogre::Matrix4::IDENTITY |
||
) |
Retrieves a 4-dimensional matrix from an XMl tag.
[in] | node | The XML node. |
[in] | tag | The name of the tag. |
[in] | def | Default value, in case the tag is not found. |
const Ogre::Quaternion GetQuaternion | ( | TiXmlNode * | node, |
const Ogre::String & | tag, | ||
const Ogre::Quaternion & | def = Ogre::Quaternion::IDENTITY |
||
) |
Retrieves a quaternion from an XMl tag.
[in] | node | The XML node. |
[in] | tag | The name of the tag. |
[in] | def | Default value, in case the tag is not found. |
const Ogre::String GetString | ( | TiXmlNode * | node, |
const Ogre::String & | tag, | ||
const Ogre::String & | def = "" |
||
) |
Retrieves a string from an XMl tag.
[in] | node | The XML node. |
[in] | tag | The name of the tag. |
[in] | def | Default value, in case the tag is not found. |
const Ogre::UTFString GetUTFString | ( | TiXmlNode * | node, |
const Ogre::String & | tag, | ||
const Ogre::UTFString & | def = "" |
||
) |
Retrieves a string from an XMl tag.
[in] | node | The XML node. |
[in] | tag | The name of the tag. |
[in] | def | Default value, in case the tag is not found. |
const Ogre::Vector2 GetVector2 | ( | TiXmlNode * | node, |
const Ogre::String & | tag, | ||
const Ogre::Vector2 & | def = Ogre::Vector2::ZERO |
||
) |
Retrieves a 2-dimensional vector from an XMl tag.
[in] | node | The XML node. |
[in] | tag | The name of the tag. |
[in] | def | Default value, in case the tag is not found. |
const Ogre::Vector3 GetVector3 | ( | TiXmlNode * | node, |
const Ogre::String & | tag, | ||
const Ogre::Vector3 & | def = Ogre::Vector3::ZERO |
||
) |
Retrieves a 3-dimensional vector from an XMl tag.
[in] | node | The XML node. |
[in] | tag | The name of the tag. |
[in] | def | Default value, in case the tag is not found. |
const Ogre::Vector4 GetVector4 | ( | TiXmlNode * | node, |
const Ogre::String & | tag, | ||
const Ogre::Vector4 & | def = Ogre::Vector4::ZERO |
||
) |
Retrieves a 4-dimensional vector from an XMl tag.
[in] | node | The XML node. |
[in] | tag | The name of the tag. |
[in] | def | Default value, in case the tag is not found. |
Ogre::String KeyToString | ( | OIS::KeyCode | key | ) |
Obtains a name from a key code.
[in] | key | Key code. |
float ParseKeyFrameTime | ( | const float | length, |
const Ogre::String & | string | ||
) |
Parses a keyframe time string.
It accepts input string of numeric values and numeric values followed by a percentage sign.
Examples: "7.2" -> 7.2 "7.2%" -> length * 7.2
[in] | length | Keyframe duration, used only for percentages. |
[in] | string | Input string |
void ParsePercent | ( | float & | value_percent, |
float & | value, | ||
const Ogre::String & | string | ||
) |
Parses percentage strings.
Accepts strings in the formats "A" "A%" "A%B", where A and B are real values.
Examples: "80.4%" -> value = 0, percent_value = 80.4 "80.4%20.6" -> value = 20.6, percent_value = 80.4 "80.4" -> value = 80.4, percent_value = 0
[out] | value_percent | Percent value |
[out] | value | String numeric value. |
[in] | string | Input string. |
Ogre::StringVector StringTokenise | ( | const Ogre::String & | str, |
const Ogre::String & | delimiters = "\t\n " , |
||
const Ogre::String & | delimiters_preserve = "" , |
||
const Ogre::String & | quote = "\"" , |
||
const Ogre::String & | esc = "\\" |
||
) |
Tokenizes a string.
[in] | str | Input string. |
[in] | delimiters | Token delimiters. They will be stripped from the string. |
[in] | delimiters_preserve | More token delimiters. They will be returned as individual tokens. |
[in] | quote |
[in] | esc | Accepted escape characters. Escaped characters won't be considered delimiters of any kind. |
OIS::KeyCode StringToKey | ( | const Ogre::String & | str | ) |
Obtains a key code from a name.
[in] | str | Key name. |