Files | |
file | cbuffer.h |
Templated Circular Buffer Container. | |
file | compress.cpp |
Compression routines. | |
file | compress.h |
Compression routines. | |
file | config.h |
GLT Misc configuration file. | |
file | endian.cpp |
Endian conversion routines. | |
file | endian.h |
Endian conversion routines. | |
file | hash.h |
Integer Hashing Functions. | |
file | image.cpp |
Image utility routines. | |
file | image.h |
Image utility routines. | |
file | lru.h |
Templated LRU (Least Recently Used) Cache. | |
file | memhist.cpp |
Classes for memory use analysis. | |
file | observer.cpp |
Templated type-safe Observer-Subject pattern. | |
file | observer.h |
Templated type-safe Observer-Subject pattern. | |
file | refcount.h |
Templated reference-counting pointer. | |
file | stlutil.h |
Utility functions for STL containers. | |
file | string.cpp |
string and wstring utility routines | |
file | string.h |
string and wstring utility routines | |
file | text2src.cpp |
Routines for converting data to C/C++ source code. | |
file | text2src.h |
Routines for converting data to C/C++ source code. | |
file | timer.cpp |
Elapsed Time Object. | |
file | timer.h |
Elapsed Time Object. | |
Compounds | |
class | cbuffer |
Templated Circular Buffer Container. More... | |
class | lru |
Templated LRU (Least Recently Used) Cache. More... | |
class | GltObserverAbstract |
Abstract base-class for Observer classes. More... | |
class | GltObserver |
Type-safe base-class for Observer classes. More... | |
class | GltSubject |
Subject Class. More... | |
class | ReferenceCountPtr |
Templated reference-counting pointer. More... | |
class | Timer |
Elapsed Time Object. More... | |
Functions | |
bool | compress (string &dest, const string &src) |
Compress memory block using LZF algorithm. | |
bool | compress (std::string &dest, const std::string &src) |
Compress memory block using LZF algorithm. | |
bool | decompress (string &dest, const string &src) |
Decompress memory block using LZF algorithm or zLib. | |
bool | decompress (std::string &dest, const std::string &src) |
Decompress memory block using LZF algorithm or zLib. | |
bool | decompress (string &dest, const void *s) |
Decompress memory block using LZF algorithm or zLib. | |
uint32 | flip (const uint32 *v) |
Flip 32 bit integer. | |
uint16 | flip (const uint16 *v) |
Flip 16 bit integer. | |
uint32 | littleEndian (const uint32 *v) |
Convert little-endian 32 bit integer to local format. | |
uint16 | littleEndian (const uint16 *v) |
Convert little-endian 16 bit integer to local format. | |
uint32 | littleEndian (const uint32 &v) |
Convert little-endian 32 bit integer to local format. | |
uint16 | littleEndian (const uint16 &v) |
Convert little-endian 32 bit integer to local format. | |
uint32 | bigEndian (const uint32 *v) |
Convert big-endian 32 bit integer to local format. | |
uint16 | bigEndian (const uint16 *v) |
Convert big-endian 16 bit integer to local format. | |
uint32 | bigEndian (const uint32 &v) |
Convert big-endian 32 bit integer to local format. | |
uint32 | bigEndian (const uint16 &v) |
Convert big-endian 16 bit integer to local format. | |
uint32 | hashKnuth32 (uint32 key) |
Donald Knuth's 32 bit Mix Function. | |
uint32 | hashJenkins32 (uint32 key) |
Robert Jenkin's 32 bit Mix Function. | |
uint32 | hashWang32 (uint32 key) |
Thomas Wang's 32 bit Mix Function. | |
bool | isGreyscale (const string &rgb) |
Is an RGB buffer greyscale? | |
bool | isGreyscale (const std::string &rgb) |
Is an RGB buffer greyscale? | |
bool | is256Colors (const string &rgb) |
Is an RGB buffer 256 colors or less? | |
bool | is256Colors (const std::string &rgb) |
Is an RGB buffer 256 colors or less? | |
void | getChannel (string &dest, const string &rgb, const uint32 size, const uint32 channel) |
Extract channel from image buffer. | |
void | getChannel (std::string &dest, const std::string &src, const uint32 size, const uint32 channel) |
Extract channel from image buffer. | |
void | rgb2Indexed (string &dest, const string &rgb) |
Convert RGB data to indexed. | |
void | rgb2Indexed (std::string &dest, const std::string &rgb) |
Convert RGB data to indexed. | |
void | indexed2rgb (string &dest, const string &indexed) |
Convert indexed data to RGB. | |
void | indexed2rgb (std::string &dest, const std::string &indexed) |
Convert indexed data to RGB. | |
void | flipImage (string &dest, const string &src, const int width, const int height) |
Flip image vertically. | |
void | flipImage (std::string &dest, const std::string &src, const int width, const int height) |
Flip image vertically. | |
void | mirrorImage (std::string &dest, const std::string &src, const int width, const int height) |
Mirror image horizontally. | |
void | adjustGamma (std::string &image, const double gamma) |
Adjust image gamma. | |
void | adjustHSV (std::string &image, const int width, const int height, const real hue, const real saturation, const real value) |
Adjust image hue, saturation and brightness. | |
bool | stitchImages (string &image, const int dx, const int dy, const vector< string > &src, const int lineSize) |
Stitch tiled images. | |
bool | stitchImages (std::string &image, const int dx, const int dy, const std::vector< std::string > &src, const int lineSize) |
Stitch tiled images. | |
bool | decode (uint32 &width, uint32 &height, std::string &image, const std::string &data) |
Decode image data from PPM, BMP, TGA and PNG. | |
bool | decodePPM (string &type, uint32 &width, uint32 &height, string &image, const string &data) |
Decode image data from PPM. | |
bool | decodePPM (std::string &type, uint32 &width, uint32 &height, std::string &image, const std::string &data) |
Decode image data from PPM. | |
bool | decodeBMP (uint32 &width, uint32 &height, string &image, const string &data) |
Decode image data from BMP. | |
bool | decodeBMP (uint32 &width, uint32 &height, std::string &image, const std::string &data) |
Decode image data from BMP. | |
bool | decodeTGA (uint32 &width, uint32 &height, string &image, const string &data) |
Decode image data from TGA. | |
bool | decodeTGA (uint32 &width, uint32 &height, std::string &image, const std::string &data) |
Decode image data from TGA. | |
bool | encodePPM (string &data, const uint32 width, const uint32 height, const string &image) |
Encode image data as RGB unix PPM or PGM. | |
bool | encodePPM (std::string &data, const uint32 width, const uint32 height, const std::string &image) |
Encode image data as RGB unix PPM or PGM. | |
bool | encodeBMP (std::string &data, const uint32 width, const uint32 height, const std::string &image) |
Encode image data as RGB Windows BMP. | |
bool | encodeTGA (string &data, const uint32 width, const uint32 height, const string &image) |
Encode image data as RGB TGA. | |
bool | encodeTGA (std::string &data, const uint32 width, const uint32 height, const std::string &image) |
Encode image data as RGB TGA. | |
template<class T, class A> void | shrink (std::vector< T, A > &v) |
Shrink std::vector memory buffer to size of contents. | |
template<class T, class A> std::ostream & | print (std::ostream &os, const std::vector< T, A > &v, const std::string &delim=",") |
Print std::vector contents to stream. | |
bool | isBinary (const std::string &str) |
Test a string for binary bytes. | |
void | dos2unix (string &dest, const string &src) |
Convert text to Unix end-of-line convention. | |
void | dos2unix (std::string &dest, const std::string &src) |
Convert text to Unix end-of-line convention. | |
void | dos2unix (wstring &dest, const wstring &src) |
Convert wide text to Unix end-of-line convention. | |
void | dos2unix (std::wstring &dest, const std::wstring &src) |
Convert wide text to Unix end-of-line convention. | |
void | unix2dos (string &dest, const string &src) |
Convert text to DOS end-of-line convention. | |
void | unix2dos (std::string &dest, const std::string &src) |
Convert text to DOS end-of-line convention. | |
void | unix2dos (wstring &dest, const wstring &src) |
Convert wide text to DOS end-of-line convention. | |
void | unix2dos (std::wstring &dest, const std::wstring &src) |
Convert wide text to DOS end-of-line convention. | |
void | readStream (istream &is, string &dest) |
Read an input stream into a string, until EOF. | |
void | writeStream (ostream &os, const string &src) |
Write a string to an output stream. | |
void | writeStream (std::ostream &os, const std::string &src) |
Write a string to an output stream. | |
void | readUnicodeStream (istream &is, wstring &dest) |
Read an input stream into a wide string, until EOF. | |
void | writeUnicodeStream (ostream &os, const wstring &src) |
Write a wide string to an output stream. | |
void | writeUnicodeStream (std::ostream &os, const std::wstring &src) |
Write a wide string to an output stream. | |
void | string2wstring (wstring &dest, const string &src) |
Convert a string to a wide string. | |
void | string2wstring (std::wstring &dest, const std::string &src) |
Convert a string to a wide string. | |
void | wstring2string (string &dest, const wstring &src) |
Convert a wide string to a string. | |
void | wstring2string (std::string &dest, const std::wstring &src) |
Convert a wide string to a string. | |
void | utf8decode (wstring &dest, const string &src) |
Convert a utf8 encoded string to a wide string. | |
void | utf8decode (std::wstring &dest, const std::string &src) |
Convert a utf8 encoded string to a wide string. | |
void | bin2src (std::ostream &os, const unsigned char *buffer, const int n) |
Output a memory buffer as C/C++ source. | |
void | bin2src (std::ostream &os, const std::string &src) |
Output a binary string as C/C++ source. | |
void | bin2src (std::ostream &os, std::istream &is) |
Encode binary input stream as C/C++ source, until EOF. | |
void | bin2asm (std::ostream &os, const unsigned char *buffer, const int n) |
Output a memory buffer as gcc assembler. | |
void | bin2asm (std::ostream &os, const std::string &src) |
Output a string as gcc assembler. | |
void | bin2asm (std::ostream &os, std::istream &is) |
Encode input stream as gcc assembler. | |
unsigned int | fromHex4 (unsigned char ch) |
Convert from ASCII character to binary. | |
unsigned char | toHex4 (unsigned int val) |
Convert from binary to ASCII character. | |
bool | stringSplit (vector< string > &vec, const string &str, const string &delim) |
Split a string, using a delimiter. | |
bool | stringSplit (std::vector< std::string > &vec, const std::string &str, const std::string &delim) |
Split a string, using a delimiter. | |
bool | stringMerge (const vector< string > &vec, string &str, const string &delim) |
Merge a vector of strings, inserting a delimiter. | |
bool | stringMerge (const std::vector< std::string > &vec, std::string &str, const std::string &delim) |
Merge a vector of strings, inserting a delimiter. | |
double | atof (const std::string &str) |
std::string version of ANSI C atof() | |
int | atoi (const std::string &str) |
std::string version of ANSI C atoi() | |
long | atol (const std::string &str) |
std::string version of ANSI C atol() | |
bool | atob (const std::string &str) |
std::string to bool, inspired by ANSI C atoi() | |
template<class T, class I> const int | atoc (const std::string &str, T(*f)(const std::string &), const std::string &match, const I &begin, const I &end) |
Generalised parsing of containers. | |
void | text2source (ostream &os, istream &is) |
Convert text to C/C++ source code. | |
void | binary2source (ostream &os, istream &is) |
Convert binary data to C/C++ source code. |
|
Compress memory block using LZF algorithm.
Based on ideas by Hermann Vogt, but liblzf is a total re-implementation of LZV that is not compatible to the original lzv code. Definition at line 111 of file compress.cpp. References byte. |
|
Compress memory block using LZF algorithm.
Based on ideas by Hermann Vogt, but liblzf is a total re-implementation of LZV that is not compatible to the original lzv code. |
|
Decompress memory block using LZF algorithm or zLib.
Definition at line 164 of file compress.cpp. |
|
Decompress memory block using LZF algorithm or zLib.
|
|
Decompress memory block using LZF algorithm or zLib.
Definition at line 213 of file compress.cpp. Referenced by GltFontUnicode::init(), and GltTexture::init(). |
|
Convert little-endian 32 bit integer to local format.
|
|
Convert little-endian 16 bit integer to local format.
|
|
Convert little-endian 32 bit integer to local format.
|
|
Convert little-endian 32 bit integer to local format.
Definition at line 138 of file endian.h. References flip(), and uint16. Referenced by decodeBMP(), decodeTGA(), and encodeTGA(). |
|
Convert big-endian 32 bit integer to local format.
|
|
Convert big-endian 16 bit integer to local format.
|
|
Convert big-endian 32 bit integer to local format.
|
|
Convert big-endian 16 bit integer to local format.
|
|
Donald Knuth's 32 bit Mix Function.
Definition at line 44 of file hash.h. References uint32. |
|
Robert Jenkin's 32 bit Mix Function.
Discussed by Thomas Wang, HP http://www.concentric.net/~Ttwang/tech/inthash.htm Definition at line 61 of file hash.h. References uint32. |
|
Thomas Wang's 32 bit Mix Function.
Discussed by Thomas Wang, HP http://www.concentric.net/~Ttwang/tech/inthash.htm Definition at line 85 of file hash.h. References uint32. |
|
Is an RGB buffer greyscale?
|
|
Is an RGB buffer greyscale?
|
|
Is an RGB buffer 256 colors or less?
|
|
Is an RGB buffer 256 colors or less?
|
|
Extract channel from image buffer.
Definition at line 58 of file image.cpp. References uint32. |
|
Extract channel from image buffer.
|
|
Convert RGB data to indexed.
|
|
Convert RGB data to indexed.
|
|
Convert indexed data to RGB.
|
|
Convert indexed data to RGB.
Referenced by GltTexture::init(). |
|
Flip image vertically.
|
|
Flip image vertically.
Referenced by decodePPM(), and decodeTGA(). |
|
Mirror image horizontally.
|
|
Adjust image gamma.
Definition at line 189 of file image.cpp. References byte. Referenced by GltTexture::init(). |
|
Adjust image hue, saturation and brightness.
Definition at line 204 of file image.cpp. References GltColor::blue(), byte, GltColor::fromHSV(), GltColor::green(), real, GltColor::red(), and GltColor::toHSV(). Referenced by GltTexture::init(). |
|
Decode image data from PPM, BMP, TGA and PNG.
Definition at line 277 of file image.cpp. References decodeBMP(), decodePPM(), decodeTGA(), and uint32. |
|
Decode image data from PPM.
Definition at line 303 of file image.cpp. References atoi(), flipImage(), and uint32. |
|
Decode image data from PPM.
Referenced by decode(). |
|
Decode image data from BMP.
Definition at line 386 of file image.cpp. References byte, littleEndian(), uint16, and uint32. |
|
Decode image data from BMP.
Referenced by decode(). |
|
Decode image data from TGA.
Definition at line 477 of file image.cpp. References byte, flipImage(), littleEndian(), uint16, and uint32. |
|
Decode image data from TGA.
Referenced by decode(). |
|
Encode image data as RGB unix PPM or PGM.
|
|
Encode image data as RGB unix PPM or PGM.
Referenced by GltFrameBufferStencil< StencilType, GlStencilType >::writePPM(), GltFrameBufferZ< DepthType, GlDepthType >::writePPM(), and GltFrameBufferRGB::writePPM(). |
|
Encode image data as RGB Windows BMP.
|
|
Encode image data as RGB TGA.
Definition at line 1013 of file image.cpp. References byte, littleEndian(), uint16, and uint32. |
|
Encode image data as RGB TGA.
Referenced by GltFrameBufferStencil< StencilType, GlStencilType >::writeTGA(), GltFrameBufferZ< DepthType, GlDepthType >::writeTGA(), and GltFrameBufferRGB::writeTGA(). |
|
Shrink std::vector memory buffer to size of contents.
A little trick to shrink vector back to minimum possible size. Works on MSVC 6.0 and cygwin gcc 2.95.3-5. |
|
Print std::vector contents to stream.
|
|
Generalised parsing of containers.
Definition at line 258 of file string.h. Referenced by Matrix::Matrix(), Vector::Vector(), and Vector4::Vector4(). |