![]() |
SLProject
4.3.020
A platform independent 3D computer graphics framework for desktop OS, Android, iOS and online in web browsers
|
#include <Utils.h>Go to the source code of this file.
Macros | |
| #define | SL_GETBIT(VAR, VAL) VAR& VAL |
| Bit manipulation macros for ones that forget it always. More... | |
| #define | SL_SETBIT(VAR, VAL) VAR |= VAL |
| #define | SL_DELBIT(VAR, VAL) VAR &= ~VAL |
| #define | SL_TOGBIT(VAR, VAL) |
| #define | UNUSED_PARAMETER(r) ((void)(x)) |
| Silences the unused-parameter warning in XCode. More... | |
| #define | SL_LOG(...) Utils::log("SLProject", __VA_ARGS__) |
| Some debugging and error handling macros. More... | |
| #define | SL_LOG_DEBUG(...) |
| #define | SL_EXIT_MSG(message) Utils::exitMsg("SLProject", (message), __LINE__, __FILE__) |
| #define | SL_WARN_MSG(message) Utils::warnMsg("SLProject", (message), __LINE__, __FILE__) |
Typedefs | |
| typedef string | SLstring |
| Redefinition of standard types for platform independence. More... | |
| typedef std::wstring | SLwstring |
| analog to std::wstring, not available on Android More... | |
| typedef char | SLchar |
| analog to GLchar (char is signed [-128 ... 127]!) More... | |
| typedef unsigned char | SLuchar |
| analog to GLuchar More... | |
| typedef signed long | SLlong |
| analog to GLlong More... | |
| typedef unsigned long | SLulong |
| analog to GLulong More... | |
| typedef signed char | SLbyte |
| analog to GLbyte More... | |
| typedef unsigned char | SLubyte |
| analog to GLubyte More... | |
| typedef short | SLshort |
| analog to GLshort More... | |
| typedef unsigned short | SLushort |
| analog to GLushort More... | |
| typedef int | SLint |
| analog to GLint More... | |
| typedef unsigned int | SLuint |
| analog to GLuint More... | |
| typedef int | SLsizei |
| analog to GLsizei More... | |
| typedef float | SLfloat |
| analog to GLfloat More... | |
| typedef double | SLdouble |
| analog to GLdouble More... | |
| typedef bool | SLbool |
| analog to GLbool More... | |
| typedef unsigned int | SLenum |
| analog to GLenum More... | |
| typedef unsigned int | SLbitfield |
| analog to GLbitfield More... | |
| typedef int8_t | SLint8 |
| 8 bit signed integer More... | |
| typedef uint8_t | SLuint8 |
| 8 bit unsigned integer More... | |
| typedef int16_t | SLint16 |
| 16 bit signed integer More... | |
| typedef uint16_t | SLuint16 |
| 16 bit unsigned integer More... | |
| typedef int32_t | SLint32 |
| 32 bit signed integer More... | |
| typedef uint32_t | SLuint32 |
| 32 bit unsigned integer More... | |
| typedef int64_t | SLint64 |
| 64 bit signed integer More... | |
| typedef uint64_t | SLuint64 |
| 64 bit unsigned integer More... | |
| typedef vector< SLbool > | SLVbool |
| All 1D vectors begin with SLV*. More... | |
| typedef vector< SLbyte > | SLVbyte |
| typedef vector< SLubyte > | SLVubyte |
| typedef vector< SLchar > | SLVchar |
| typedef vector< SLuchar > | SLVuchar |
| typedef vector< SLshort > | SLVshort |
| typedef vector< SLushort > | SLVushort |
| typedef vector< SLint > | SLVint |
| typedef vector< SLuint > | SLVuint |
| typedef vector< SLlong > | SLVlong |
| typedef vector< SLulong > | SLVulong |
| typedef vector< SLfloat > | SLVfloat |
| typedef vector< SLstring > | SLVstring |
| typedef vector< size_t > | SLVsize_t |
| typedef vector< vector< SLfloat > > | SLVVfloat |
| All 2D vectors begin with SLVV*. More... | |
| typedef vector< vector< SLuchar > > | SLVVuchar |
| typedef vector< vector< SLushort > > | SLVVushort |
| typedef vector< vector< SLuint > > | SLVVuint |
| typedef vector< vector< SLchar > > | SLVVchar |
| typedef vector< vector< SLshort > > | SLVVshort |
| typedef vector< vector< SLint > > | SLVVint |
Functions | |
| template<class T > | |
| SLuint | SL_sizeOfVector (const T &vector) |
| Returns the memory in bytes reserved by a vector. More... | |
| #define SL_EXIT_MSG | ( | message | ) | Utils::exitMsg("SLProject", (message), __LINE__, __FILE__) |
| #define SL_GETBIT | ( | VAR, | |
| VAL | |||
| ) | VAR& VAL |
Bit manipulation macros for ones that forget it always.
VAR is the bit field, VAL the bit mask to test or modify. The arguments are not parenthesised, so pass plain variables rather than expressions. SL_TOGBIT expands to a bare if/else and must not be used as the body of an unbraced if, or it will bind to the wrong else.
| #define SL_LOG | ( | ... | ) | Utils::log("SLProject", __VA_ARGS__) |
Some debugging and error handling macros.
All four tag their output with "SLProject" and forward to the Utils namespace. SL_LOG_DEBUG compiles to nothing outside debug builds. SL_EXIT_MSG terminates the application; SL_WARN_MSG only reports. Both pass LINE and FILE so the origin appears in the message.
| #define SL_TOGBIT | ( | VAR, | |
| VAL | |||
| ) |
| #define SL_WARN_MSG | ( | message | ) | Utils::warnMsg("SLProject", (message), __LINE__, __FILE__) |
| #define UNUSED_PARAMETER | ( | r | ) | ((void)(x)) |
Silences the unused-parameter warning in XCode.
| typedef unsigned int SLbitfield |
| typedef char SLchar |
| typedef string SLstring |
| typedef vector<vector<SLushort> > SLVVushort |
| typedef std::wstring SLwstring |
|
inline |
Returns the memory in bytes reserved by a vector.
Note that this reports the capacity, not the size: it is the memory the vector currently occupies, which is what the scene statistics report.