#include "ActionMenu.h"#include "ResourceHandler.h"#include "GLText.h"#include <cmath>#include <string>#include <list>#include <vector>Include dependency graph for common.h:

Go to the source code of this file.
Classes | |
| struct | Global |
| Structure to accomondate gloabl variables accessable throughout the application. More... | |
| class | ElemDeleter< T, zero > |
| Used to delete an object of type T and possibly set the pointer to NULL. More... | |
| class | AtScopeExit< T, X > |
| Invoke a function at scope exit. More... | |
Typedefs | |
| typedef std::list< Sprite * > | SpriteList |
| List of sprite-pointers. | |
| typedef SpriteList::iterator | SpriteIterator |
| Iterator over list of sprite-pointers. | |
Functions | |
| template<typename T> | |
| float | FAST_SQRT_UNSAFE (const T &f) |
| template<typename T> | |
| float | FAST_SQRT (const T &f) |
| template<typename T> | |
| T | SQR (const T &a) |
| Take a^2, same as POW2. | |
| template<typename T> | |
| T | POW2 (const T &a) |
| Take a^2, same as SQR. | |
| template<typename T> | |
| double | Deg2Rad (const T °) |
| Convert value in degrees to radians. | |
| template<typename T> | |
| double | Rad2Deg (const T &rad) |
| Convert value in radians to degrees. | |
| template<typename T> | |
| void | NormalizeDeg (T °) |
| Make deg between -180 - 180 degrees. | |
| template<typename T> | |
| void | NormalizeRad (T &rad) |
| Make rad between -PI - PI radians. | |
| template<typename T> | |
| T | Abs (const T &a) |
| Absolute value of a. | |
| template<typename T> | |
| T | AbsMin (const T &a, const T &b) |
| Return value that has the smallest absolute value. | |
| void | Quit (int exitval=0) |
| Quit the application. | |
| template<typename T> | |
| ElemDeleter< T, false > | DelElem () |
| template<typename T> | |
| void | DelNZero (T *&o) |
| Delete and zero a pointer. | |
| void | DownCase (char &c) |
| Convert a character to its lower-case equivalent. | |
| void | UpCase (char &c) |
| Convert a character to its upper-case equivalent. | |
| template<typename PtrType, typename Collection> | |
| void | ClearCollection (Collection &col) |
Variables | |
| float * | g_sqrtTable |
| static const char | FAST_SQRT_MAX = 5 |
| static const float | FAST_SQRT_STEP = 0.01f |
| Global | g |
| Common global variable. | |
| typedef SpriteList::iterator SpriteIterator |
Iterator over list of sprite-pointers.
| typedef std::list<Sprite*> SpriteList |
List of sprite-pointers.
| T Abs | ( | const T & | a | ) | [inline] |
Absolute value of a.
| T AbsMin | ( | const T & | a, | |
| const T & | b | |||
| ) | [inline] |
Return value that has the smallest absolute value.
Note that the return value is signed (i.e. AbsMin(-4, -7) = -4)
| void ClearCollection | ( | Collection & | col | ) |
| double Deg2Rad | ( | const T & | deg | ) | [inline] |
Convert value in degrees to radians.
| ElemDeleter<T, false> DelElem | ( | ) | [inline] |
| void DelNZero | ( | T *& | o | ) | [inline] |
Delete and zero a pointer.
| void DownCase | ( | char & | c | ) | [inline] |
Convert a character to its lower-case equivalent.
| float FAST_SQRT | ( | const T & | f | ) | [inline] |
| float FAST_SQRT_UNSAFE | ( | const T & | f | ) | [inline] |
| void NormalizeDeg | ( | T & | deg | ) | [inline] |
Make deg between -180 - 180 degrees.
| void NormalizeRad | ( | T & | rad | ) | [inline] |
Make rad between -PI - PI radians.
| T POW2 | ( | const T & | a | ) | [inline] |
Take a^2, same as SQR.
| void Quit | ( | int | exitval = 0 |
) |
Quit the application.
| double Rad2Deg | ( | const T & | rad | ) | [inline] |
Convert value in radians to degrees.
| T SQR | ( | const T & | a | ) | [inline] |
Take a^2, same as POW2.
| void UpCase | ( | char & | c | ) | [inline] |
Convert a character to its upper-case equivalent.
const char FAST_SQRT_MAX = 5 [static] |
const float FAST_SQRT_STEP = 0.01f [static] |
| float* g_sqrtTable |
1.4.7