Visualizer/src/Application.hpp

52 lines
1,008 B
C++
Raw Normal View History

2021-12-20 03:31:44 +00:00
#pragma once
#include <string>
2021-12-22 18:19:53 +00:00
#include "OrbitingCamera.hpp"
2021-12-25 02:15:50 +00:00
#include "Topology.hpp"
2021-12-20 03:31:44 +00:00
struct GLFWwindow;
2021-12-21 17:14:01 +00:00
struct WindowData
{
2021-12-22 23:52:28 +00:00
lol::Camera* camera;
2021-12-21 17:14:01 +00:00
};
2021-12-20 03:31:44 +00:00
class Application
{
/////////////////////////////////////////////////////////
////// SINGLETON BOILERPLATE ////////////////////////////
/////////////////////////////////////////////////////////
public:
static Application& Instance()
{
static Application app;
return app;
}
private:
Application() = default;
~Application();
Application(const Application& other) = delete;
/////////////////////////////////////////////////////////
////// APPLICATION IMPLEMENTATION ///////////////////////
/////////////////////////////////////////////////////////
public:
void Init(int width, int height, const std::string& title);
2021-12-24 15:22:16 +00:00
void Quit();
2021-12-20 03:31:44 +00:00
void Launch();
private:
GLFWwindow* window = nullptr;
2021-12-21 17:14:01 +00:00
WindowData data;
2021-12-22 18:19:53 +00:00
OrbitingCamera camera;
2021-12-25 15:51:55 +00:00
float pitch, yaw, distance;
2021-12-20 18:09:52 +00:00
2021-12-26 02:58:14 +00:00
bool enableHeightMap = true;
bool enableColorMap = true;
2021-12-25 02:15:50 +00:00
Topology* topology;
2021-12-20 03:31:44 +00:00
};