Vis::Util Class Reference
#include <VisUtil.h>
List of all members.
|
Static Public Member Functions |
static void | setM44f (GLenum mode, M44f &mat) |
static int | toInt (const unsigned char *b, int size) |
static unsigned short | toUnsignedShort (const unsigned char *b, int size) |
static void | beginFullscreen () |
static void | endFullscreen () |
static bool | checkGLError (const string &reason) |
template<class T > |
static T | reverseBytes (T const &arg) |
static void | split (const string &str, const string &token, vector< string > &result) |
template<class T > |
static T | toNumber (const string &str) |
static int | getNextPowerOfTwo (const int num) |
Detailed Description
Utiltiy class.
Member Function Documentation
void Vis::Util::beginFullscreen |
( |
|
) |
[static] |
Set the projection and view matrix to fullscreen mode.
bool Vis::Util::checkGLError |
( |
const string & |
reason |
) |
[static] |
Check if there is an OpenGL error.
void Vis::Util::endFullscreen |
( |
|
) |
[static] |
Restore the view and procection matrix.
int Vis::Util::getNextPowerOfTwo |
( |
const int |
num |
) |
[static] |
Return the next power of two dimension, according to num. number
- Returns:
- power of two dimension
template<class T >
static T Vis::Util::reverseBytes |
( |
T const & |
arg |
) |
[inline, static] |
A templated routine that returns a the input value in reversed byte order
- Parameters:
-
- Returns:
- arg in reversed order.
void Vis::Util::setM44f |
( |
GLenum |
mode, |
|
|
M44f & |
mat | |
|
) |
| | [static] |
Set matrix values from the specified OpenGL Matrix
- Parameters:
-
| mode | type of the matrix (GL_MODELVIEW, GL_PROJECTION, ...) |
| mat | matrix to set |
void Vis::Util::split |
( |
const string & |
str, |
|
|
const string & |
token, |
|
|
vector< string > & |
result | |
|
) |
| | [static] |
Split a string by a token.
- Parameters:
-
| str | source string. |
| token | |
| result | vector with the substrings. |
int Vis::Util::toInt |
( |
const unsigned char * |
b, |
|
|
int |
size | |
|
) |
| | [static] |
Convert the bytes to an int value.
- Parameters:
-
| *b | array with the byte values. |
| size | size of the array |
- Returns:
- int value.
template<class T >
static T Vis::Util::toNumber |
( |
const string & |
str |
) |
[inline, static] |
Convert a string to a number.
- Parameters:
-
- Returns:
- converted number.
unsigned short Vis::Util::toUnsignedShort |
( |
const unsigned char * |
b, |
|
|
int |
size | |
|
) |
| | [static] |
Convert the bytes to an unsigned short value.
- Parameters:
-
| *b | array with the byte values. |
| size | size of the array |
- Returns:
- unsigned short value.
The documentation for this class was generated from the following files:
- E:/Studium/vislu/abgabe2/visproj/src/util/VisUtil.h
- E:/Studium/vislu/abgabe2/visproj/src/util/impl/VisUtil.cpp