2021-12-20 03:31:44 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <string>
|
2021-12-21 17:14:01 +00:00
|
|
|
#include "backend/Camera.hpp"
|
2021-12-22 14:45:52 +00:00
|
|
|
#include "Plot3D.hpp"
|
2021-12-20 03:31:44 +00:00
|
|
|
|
|
|
|
struct GLFWwindow;
|
|
|
|
|
2021-12-21 17:14:01 +00:00
|
|
|
struct WindowData
|
|
|
|
{
|
|
|
|
Camera* camera;
|
|
|
|
OrthogonalCamera* orthoCam;
|
|
|
|
};
|
|
|
|
|
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);
|
|
|
|
void Launch();
|
|
|
|
|
|
|
|
private:
|
|
|
|
GLFWwindow* window = nullptr;
|
2021-12-21 17:14:01 +00:00
|
|
|
WindowData data;
|
|
|
|
|
|
|
|
Camera camera;
|
|
|
|
OrthogonalCamera orthoCam;
|
|
|
|
CameraBase* activeCamera;
|
2021-12-20 18:09:52 +00:00
|
|
|
|
2021-12-21 14:22:47 +00:00
|
|
|
glm::vec3 cubeOrientation, cubePosition, cubeScale;
|
2021-12-22 14:45:52 +00:00
|
|
|
Plot3D* plot;
|
2021-12-20 03:31:44 +00:00
|
|
|
};
|