general.h File Reference

Declares various classes and types which are used widely across the code base. More...

#include <QtGlobal>
#include <QVector>
#include <cmath>

Include dependency graph for general.h:

This graph shows which files directly or indirectly include this file:


Classes

struct  Coord3d
 Coord3d is a general purpose three dimentional vertor of ints. More...
struct  Coord3df
 Coord3df is a general purpose three dimentional vector of floats. More...

Typedefs

typedef QVector< int > TTransformVec
 used by several different files which don't include each other. no better place to declare this.

Enumerations

enum  EPlane { PLANE_NONE = -1, YZ_PLANE = 0, XZ_PLANE = 1, XY_PLANE = 2 }
enum  EAxis { AXIS_NONE = -1, X_AXIS = 1, Y_AXIS = 2, Z_AXIS = 3 }

Functions

bool operator== (const Coord3d &a, const Coord3d &b)
bool operator!= (const Coord3d &a, const Coord3d &b)
Coord3d operator+ (const Coord3d &a, const Coord3d &b)
Coord3d operator- (const Coord3d &a, const Coord3d &b)
Coord3df operator+ (const Coord3df &a, const Coord3df &b)
Coord3df operator/ (const Coord3df &a, float s)
Coord3df operator * (const Coord3df &a, float s)
Coord3df operator * (float s, const Coord3df &a)
bool operator== (const Coord3df &a, const Coord3df &b)
QString humanCount (qint64 n)
 takes a number and transforms it to a quoted string such as 1,234,567.09.
QString humanCount (double n, int pers)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. takes a float number.
void flushAllEvents ()
 flush and burn all qt events.
bool hXor (bool a, bool b)
 boolean xor
uint bXor (uint a, uint b)
 bitwise xor

Detailed Description

Declares various classes and types which are used widely across the code base.


Typedef Documentation

typedef QVector<int> TTransformVec

used by several different files which don't include each other. no better place to declare this.


Enumeration Type Documentation

enum EAxis

Enumerator:
AXIS_NONE 
X_AXIS 
Y_AXIS 
Z_AXIS 

enum EPlane

Enumerator:
PLANE_NONE 
YZ_PLANE 
XZ_PLANE 
XY_PLANE 


Function Documentation

uint bXor ( uint  a,
uint  b 
) [inline]

bitwise xor

void flushAllEvents (  ) 

flush and burn all qt events.

use this when visuals need to update in mid-function before moving on.

QString humanCount ( double  n,
int  pers 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. takes a float number.

QString humanCount ( qint64  n  ) 

takes a number and transforms it to a quoted string such as 1,234,567.09.

which is much more readable for humans.

bool hXor ( bool  a,
bool  b 
) [inline]

boolean xor

Coord3df operator * ( float  s,
const Coord3df a 
) [inline]

Coord3df operator * ( const Coord3df a,
float  s 
) [inline]

bool operator!= ( const Coord3d a,
const Coord3d b 
) [inline]

Coord3df operator+ ( const Coord3df a,
const Coord3df b 
) [inline]

Coord3d operator+ ( const Coord3d a,
const Coord3d b 
) [inline]

Coord3d operator- ( const Coord3d a,
const Coord3d b 
) [inline]

Coord3df operator/ ( const Coord3df a,
float  s 
) [inline]

bool operator== ( const Coord3df a,
const Coord3df b 
) [inline]

bool operator== ( const Coord3d a,
const Coord3d b 
) [inline]