Various utility functions and classes. More...
Enumerations | |
| enum | EMemoryUnit { eMemoryUnit_Byte, eMemoryUnit_KB, eMemoryUnit_MB, eMemoryUnit_GB, eMemoryUnit_TB } |
Functions | |
| NYTRO_EXPORT void | formatString (string &rStr, const char *pFmt,...) |
| NYTRO_EXPORT string | getFormattedString (const char *pFmt,...) |
| NYTRO_EXPORT void | toLowerCase (string &rStr) |
| NYTRO_EXPORT void | toUpperCase (string &rStr) |
| NYTRO_EXPORT void | replaceString (string &rStr, const char *pWhat, const char *pWith) |
| NYTRO_EXPORT string | getReplacedString (const string &rStr, const char *pWhat, const char *pWith) |
| NYTRO_EXPORT int32 | explodeString (const string &rStr, vector< string > &rTokens, const char *pSeparator) |
| NYTRO_EXPORT string | implodeStrings (const vector< string > &rTokens, const char *pSeparator) |
| NYTRO_EXPORT string | repeatString (const char *pStr, uint32 aNum) |
| NYTRO_EXPORT void | fillString (string &rStr, int8 aChar, uint32 aNum) |
| NYTRO_EXPORT string | trimLeft (string &rStr, const char *pWhitespace=" ") |
| NYTRO_EXPORT string | trimRight (string &rStr, const char *pWhitespace=" ") |
| NYTRO_EXPORT string | trim (string &rStr, const char *pWhitespace=" ") |
| NYTRO_EXPORT bool | wildcardCompare (const char *pWildcard, const char *pText, bool bCaseSensitive=true) |
| NYTRO_EXPORT string | wideToAscii (const wchar_t *pStr) |
| NYTRO_EXPORT wstring | asciiToWide (const char *pStr) |
| NYTRO_EXPORT string | toString (int32 aValue) |
| NYTRO_EXPORT string | toString (float32 aValue) |
| NYTRO_EXPORT string | toString (float64 aValue) |
| NYTRO_EXPORT string | toString (int8 aValue) |
| NYTRO_EXPORT string | toString (Vector3D &rValue) |
| NYTRO_EXPORT string | toString (Quaternion &rValue) |
| NYTRO_EXPORT string | toString (AngleAxis &rValue) |
| NYTRO_EXPORT string | toString (Matrix &rValue) |
| NYTRO_EXPORT string | toString (Color &rValue) |
| NYTRO_EXPORT float32 | convertBytesTo (EMemoryUnit aTo, uint64 aByteCount) |
| NYTRO_EXPORT string | convertBytesToText (uint64 aByteCount) |
| NYTRO_EXPORT string | base64Encode (uint8 const *pBytesToEncode, int32 aInLength) |
| NYTRO_EXPORT string | base64Decode (string const &rEncodedString) |
| NYTRO_EXPORT string | md5 (const char *pStr) |
| NYTRO_EXPORT string | sha1 (const char *pStr) |
| NYTRO_EXPORT string | sha256 (const char *pStr) |
| NYTRO_EXPORT string | sha384 (const char *pStr) |
| NYTRO_EXPORT string | sha512 (const char *pStr) |
| NYTRO_EXPORT string | getNameNoNumber (const char *pStr) |
| NYTRO_EXPORT int32 | getNameNumber (const char *pStr) |
| NYTRO_EXPORT int32 | findNamesCounter (vector< string > &rNames) |
| this function will search in the names array for the greatest count/number ( ex. : Sphere001, Mesh002, Mesh003 -> returns 4 ); used in editor | |
| NYTRO_EXPORT Vector3D | stringToVector3D (string &rStr) |
| convert a string to Vector3D 3D, must be formatted like this: "x;y;z" -> "100;23;120.3" | |
| NYTRO_EXPORT Vector3D | stringToVector2D (string &rStr) |
| convert a string to Vector3D 2D, must be formatted like this: "x;y" -> "233;120.3" | |
| NYTRO_EXPORT Quaternion | stringToQuaternion (string &rStr) |
| convert a string to Quaternion, must be formatted like this: "angle;x;y;z" -> "90;1;0;1" | |
| NYTRO_EXPORT Color | stringToColor (string &rStr) |
| convert a string to Color, must be formatted like this: "r;g;b;a" -> "0.4;.5;1;1" | |
| NYTRO_EXPORT bool | getViewportImageFitSize (float32 aImageWidth, float32 aImageHeight, float32 aViewWidth, float32 aViewHeight, float32 &aNewWidth, float32 &aNewHeight, bool bIgnoreHeight=false, bool bIgnoreWidth=false) |
| compute image size fitting into a viewport | |
Various utility functions and classes.
| NYTRO_EXPORT wstring Nytro::Util::asciiToWide | ( | const char * | pStr | ) |
| NYTRO_EXPORT string Nytro::Util::base64Decode | ( | string const & | rEncodedString | ) |
| NYTRO_EXPORT string Nytro::Util::base64Encode | ( | uint8 const * | pBytesToEncode, | |
| int32 | aInLength | |||
| ) |
| NYTRO_EXPORT float32 Nytro::Util::convertBytesTo | ( | EMemoryUnit | aTo, | |
| uint64 | aByteCount | |||
| ) |
| NYTRO_EXPORT string Nytro::Util::convertBytesToText | ( | uint64 | aByteCount | ) |
| NYTRO_EXPORT int32 Nytro::Util::explodeString | ( | const string & | rStr, | |
| vector< string > & | rTokens, | |||
| const char * | pSeparator | |||
| ) |
| NYTRO_EXPORT void Nytro::Util::fillString | ( | string & | rStr, | |
| int8 | aChar, | |||
| uint32 | aNum | |||
| ) |
| NYTRO_EXPORT int32 Nytro::Util::findNamesCounter | ( | vector< string > & | rNames | ) |
this function will search in the names array for the greatest count/number ( ex. : Sphere001, Mesh002, Mesh003 -> returns 4 ); used in editor
| NYTRO_EXPORT void Nytro::Util::formatString | ( | string & | rStr, | |
| const char * | pFmt, | |||
| ... | ||||
| ) |
| NYTRO_EXPORT string Nytro::Util::getFormattedString | ( | const char * | pFmt, | |
| ... | ||||
| ) |
| NYTRO_EXPORT string Nytro::Util::getNameNoNumber | ( | const char * | pStr | ) |
| NYTRO_EXPORT int32 Nytro::Util::getNameNumber | ( | const char * | pStr | ) |
| NYTRO_EXPORT string Nytro::Util::getReplacedString | ( | const string & | rStr, | |
| const char * | pWhat, | |||
| const char * | pWith | |||
| ) |
| NYTRO_EXPORT bool Nytro::Util::getViewportImageFitSize | ( | float32 | aImageWidth, | |
| float32 | aImageHeight, | |||
| float32 | aViewWidth, | |||
| float32 | aViewHeight, | |||
| float32 & | aNewWidth, | |||
| float32 & | aNewHeight, | |||
| bool | bIgnoreHeight = false, |
|||
| bool | bIgnoreWidth = false | |||
| ) |
compute image size fitting into a viewport
| NYTRO_EXPORT string Nytro::Util::implodeStrings | ( | const vector< string > & | rTokens, | |
| const char * | pSeparator | |||
| ) |
Referenced by Nytro::Input::InputComboAction::updateActionListString().
| NYTRO_EXPORT string Nytro::Util::md5 | ( | const char * | pStr | ) |
| NYTRO_EXPORT string Nytro::Util::repeatString | ( | const char * | pStr, | |
| uint32 | aNum | |||
| ) |
| NYTRO_EXPORT void Nytro::Util::replaceString | ( | string & | rStr, | |
| const char * | pWhat, | |||
| const char * | pWith | |||
| ) |
| NYTRO_EXPORT string Nytro::Util::sha1 | ( | const char * | pStr | ) |
| NYTRO_EXPORT string Nytro::Util::sha256 | ( | const char * | pStr | ) |
| NYTRO_EXPORT string Nytro::Util::sha384 | ( | const char * | pStr | ) |
| NYTRO_EXPORT string Nytro::Util::sha512 | ( | const char * | pStr | ) |
| NYTRO_EXPORT Color Nytro::Util::stringToColor | ( | string & | rStr | ) |
convert a string to Color, must be formatted like this: "r;g;b;a" -> "0.4;.5;1;1"
| NYTRO_EXPORT Quaternion Nytro::Util::stringToQuaternion | ( | string & | rStr | ) |
convert a string to Quaternion, must be formatted like this: "angle;x;y;z" -> "90;1;0;1"
| NYTRO_EXPORT Vector3D Nytro::Util::stringToVector2D | ( | string & | rStr | ) |
convert a string to Vector3D 2D, must be formatted like this: "x;y" -> "233;120.3"
| NYTRO_EXPORT Vector3D Nytro::Util::stringToVector3D | ( | string & | rStr | ) |
convert a string to Vector3D 3D, must be formatted like this: "x;y;z" -> "100;23;120.3"
| NYTRO_EXPORT void Nytro::Util::toLowerCase | ( | string & | rStr | ) |
| NYTRO_EXPORT string Nytro::Util::toString | ( | Vector3D & | rValue | ) |
| NYTRO_EXPORT string Nytro::Util::toString | ( | float64 | aValue | ) |
| NYTRO_EXPORT string Nytro::Util::toString | ( | AngleAxis & | rValue | ) |
| NYTRO_EXPORT string Nytro::Util::toString | ( | int32 | aValue | ) |
| NYTRO_EXPORT string Nytro::Util::toString | ( | int8 | aValue | ) |
| NYTRO_EXPORT string Nytro::Util::toString | ( | float32 | aValue | ) |
| NYTRO_EXPORT string Nytro::Util::toString | ( | Quaternion & | rValue | ) |
| NYTRO_EXPORT string Nytro::Util::toString | ( | Matrix & | rValue | ) |
| NYTRO_EXPORT string Nytro::Util::toString | ( | Color & | rValue | ) |
| NYTRO_EXPORT void Nytro::Util::toUpperCase | ( | string & | rStr | ) |
| NYTRO_EXPORT string Nytro::Util::trim | ( | string & | rStr, | |
| const char * | pWhitespace = " " | |||
| ) |
| NYTRO_EXPORT string Nytro::Util::trimLeft | ( | string & | rStr, | |
| const char * | pWhitespace = " " | |||
| ) |
| NYTRO_EXPORT string Nytro::Util::trimRight | ( | string & | rStr, | |
| const char * | pWhitespace = " " | |||
| ) |
| NYTRO_EXPORT string Nytro::Util::wideToAscii | ( | const wchar_t * | pStr | ) |
| NYTRO_EXPORT bool Nytro::Util::wildcardCompare | ( | const char * | pWildcard, | |
| const char * | pText, | |||
| bool | bCaseSensitive = true | |||
| ) |