-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathStructs.hpp
82 lines (71 loc) · 1.85 KB
/
Structs.hpp
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
#pragma once
#include <string>
/*Position & Colour*/
struct DrawingAPI_Vector2 {
float Position_X = 0;
float Position_Y = 0;
DrawingAPI_Vector2(float NewX = 0, float NewY = 0) {
Position_X = NewX;
Position_Y = NewY;
};
};
struct DrawingAPI_Colour3 {
float Colour_R = 0;
float Colour_G = 0;
float Colour_B = 0;
DrawingAPI_Colour3(float R = 0, float G = 0, float B = 0) {
Colour_R = R;
Colour_G = G;
Colour_B = B;
}
};
/*Shapes & Text*/
struct DrawingAPI_Shape {
bool IsShapeVisible = true;
int ZIndex = 1;
virtual ~DrawingAPI_Shape() { }
};
struct DrawingAPI_Shape_Line : public DrawingAPI_Shape {
DrawingAPI_Vector2 From;
DrawingAPI_Vector2 To;
DrawingAPI_Colour3 Colour;
float Thickness = 16; //16 by default
float Transparency = 1;
};
struct DrawingAPI_Shape_Square : public DrawingAPI_Shape {
DrawingAPI_Vector2 Position;
DrawingAPI_Vector2 Size;
DrawingAPI_Colour3 Colour;
float Thickness = 16; //16 by default
float Rounding = 0;
bool Filled = false;
float Transparency = 1;
};
struct DrawingAPI_Shape_Circle : public DrawingAPI_Shape {
DrawingAPI_Vector2 Position;
DrawingAPI_Colour3 Colour;
float Radius = 0;
float Thickness = 16; //16 by default
bool Filled = false;
float NumberOfSides = 250;
float Transparency = 1;
};
struct DrawingAPI_Shape_Triangle : public DrawingAPI_Shape {
DrawingAPI_Vector2 Point1;
DrawingAPI_Vector2 Point2;
DrawingAPI_Vector2 Point3;
DrawingAPI_Colour3 Colour;
float Thickness = 16; //16 by default
bool Filled = false;
float Transparency = 1;
};
struct DrawingAPI_Shape_Text : public DrawingAPI_Shape {
const char* Text;
const char* TextEnd;
DrawingAPI_Vector2 Position;
DrawingAPI_Colour3 Colour;
bool Center = false;
bool Outline = false;
float Transparency = 1;
DrawingAPI_Vector2 TextBounds = { 0, 16 };
};