]> git.localhorst.tv Git - blank.git/blobdiff - src/ui/HUD.hpp
some code reorganization
[blank.git] / src / ui / HUD.hpp
diff --git a/src/ui/HUD.hpp b/src/ui/HUD.hpp
new file mode 100644 (file)
index 0000000..ca6b754
--- /dev/null
@@ -0,0 +1,50 @@
+#ifndef BLANK_UI_HUD_H_
+#define BLANK_UI_HUD_H_
+
+#include "../model/Model.hpp"
+#include "../model/OutlineModel.hpp"
+
+#include <glm/glm.hpp>
+
+
+namespace blank {
+
+class Block;
+class BlockTypeRegistry;
+class DirectionalLighting;
+
+class HUD {
+
+public:
+       explicit HUD(const BlockTypeRegistry &);
+
+       HUD(const HUD &) = delete;
+       HUD &operator =(const HUD &) = delete;
+
+       void Viewport(float width, float height) noexcept;
+       void Viewport(float x, float y, float width, float height) noexcept;
+
+       void Display(const Block &);
+
+       void Render(DirectionalLighting &) noexcept;
+
+private:
+       const BlockTypeRegistry &types;
+
+       Model block;
+       Model::Buffer block_buf;
+       glm::mat4 block_transform;
+       bool block_visible;
+
+       OutlineModel crosshair;
+       glm::mat4 crosshair_transform;
+
+       float near, far;
+       glm::mat4 projection;
+       glm::mat4 view;
+
+};
+
+}
+
+#endif