-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUI.h
More file actions
70 lines (63 loc) · 1.45 KB
/
UI.h
File metadata and controls
70 lines (63 loc) · 1.45 KB
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
#ifndef UI_H
#define UI_H
#include <SFML/Graphics.hpp>
#include "aprox.h"
//Forward declaration
class ReferenceFrame;
class Points;
class LinearAproximation;
class LinearInterpolation;
class WindowManager{
public:
sf::RenderWindow window;
ReferenceFrame* reference_frame;
Points* points;
data* Data;
LinearAproximation* LinearAprox;
LinearInterpolation* LinearInter;
WindowManager();
~WindowManager();
sf::Vector2u getSize();
void run(int option);
};
class ReferenceFrame {
private:
sf::Vertex x_axis[2];
sf::Vertex y_axis[2];
sf::RectangleShape graduation;
std::vector<sf::RectangleShape> graduation_scale_x;
std::vector<sf::RectangleShape> graduation_scale_y;
sf::Font font;
sf::Text text;
std::vector<sf::Text> num_scale_x;
std::vector<sf::Text> num_scale_y;
public:
ReferenceFrame(WindowManager& Window, data& data);
void draw(sf::RenderWindow& window);
};
class Points {
private:
sf::CircleShape point;
sf::Vector2f positionUI;
std::vector <sf::Vector2f> positionsUI;
public:
Points();
void scale(sf::RenderWindow& window, data& data);
void draw(sf::RenderWindow& Window, data& data);
};
class LinearAproximation {
private:
sf::Vertex line[2];
public:
void setLine(sf::RenderWindow& window, data& data);
void draw(sf::RenderWindow& window);
};
class LinearInterpolation {
private:
sf::Vertex line[2];
std::vector<sf::Vertex> lines;
public:
void setLine(sf::RenderWindow& window, data& data);
void draw(sf::RenderWindow& window);
};
#endif