]> git.localhorst.tv Git - blank.git/blob - src/ui/HUD.hpp
ca6b7544a54ee9a15f7639bb2e1f6fba65376724
[blank.git] / src / ui / HUD.hpp
1 #ifndef BLANK_UI_HUD_H_
2 #define BLANK_UI_HUD_H_
3
4 #include "../model/Model.hpp"
5 #include "../model/OutlineModel.hpp"
6
7 #include <glm/glm.hpp>
8
9
10 namespace blank {
11
12 class Block;
13 class BlockTypeRegistry;
14 class DirectionalLighting;
15
16 class HUD {
17
18 public:
19         explicit HUD(const BlockTypeRegistry &);
20
21         HUD(const HUD &) = delete;
22         HUD &operator =(const HUD &) = delete;
23
24         void Viewport(float width, float height) noexcept;
25         void Viewport(float x, float y, float width, float height) noexcept;
26
27         void Display(const Block &);
28
29         void Render(DirectionalLighting &) noexcept;
30
31 private:
32         const BlockTypeRegistry &types;
33
34         Model block;
35         Model::Buffer block_buf;
36         glm::mat4 block_transform;
37         bool block_visible;
38
39         OutlineModel crosshair;
40         glm::mat4 crosshair_transform;
41
42         float near, far;
43         glm::mat4 projection;
44         glm::mat4 view;
45
46 };
47
48 }
49
50 #endif