grTypes
typedef signed char INT8;
typedef unsigned char UINT8;
typedef short INT16;
typedef unsigned short UINT16;
typedef long INT32;
typedef unsigned long UINT32;
typedef UINT8 BYTE;
typedef UINT16 WORD;
typedef UINT32 DWORD;
#endif
Trotation
// Three by three rotation matrix
typedef struct Trotation {
float M11, M12, M13;
float M21, M22, M23;
float M31, M32, M33;
} Trotation;
Tpoint
// Three space point
typedef struct Tpoint {
float x, y, z;
} Tpoint;
Tcolor
// RGB color
typedef struct Tcolor {
float r;
float g;
float b;
} Tcolor;
// Math constants
#ifndef PI
#define PI 3.14159265359f
#endif
#define TWO_PI 6.28318530718f
#define PI_OVER_2 1.570796326795f
#define PI_OVER_4 0.7853981633974f