/
Utilities.h
58 lines (39 loc) · 884 Bytes
/
Utilities.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#ifndef UTILITIES_H
#define UTILITIES_H
#include "globalDefs.h"
#include "Transformation.h"
#include <string>
using namespace std;
struct SColor{
float r, g, b, a;
SColor( ){
r = g = b = a = 0.0;
}
SColor( float R, float G, float B, float A ){
r = R; g = G; b = B; a = A;
}
void init( float R, float G, float B, float A ){
r = R; g = G; b = B; a = A;
}
};
struct SCordinates{
float x, y, z;
SCordinates( ){
x = y = z = 0.0;
}
SCordinates( float X, float Y, float Z ){
x = X; y = Y; z = Z;
}
void init( float X, float Y, float Z ){
x = X; y = Y; z = Z;
}
};
struct SFont{
float fontWidth, fontHeight;
SColor foreColor;
};
struct SMotion {
vec2 velocity;
};
extern float distance_between_2_points( float x1, float y1, float x2, float y2 );
#endif