light/Mirror/src/EditorLayer.hpp

45 lines
887 B
C++
Raw Normal View History

#pragma once
2022-03-12 21:10:23 +03:30
#include "Panels/AssetBrowser.hpp"
2022-03-08 21:19:19 +03:30
#include "Panels/PropertiesPanel.hpp"
#include "Panels/SceneHierarchyPanel.hpp"
2022-03-08 21:19:19 +03:30
#include <LightEngine.hpp>
#include <glm/gtc/matrix_transform.hpp>
namespace Light {
2022-03-04 22:40:20 +03:30
class EditorLayer: public Layer
{
private:
std::string m_SceneDir;
2022-03-04 22:40:20 +03:30
// #todo: add camera controller class to the engine
glm::vec2 m_Direction;
float m_Speed = 1000.0f;
2022-03-04 22:40:20 +03:30
Ref<Scene> m_Scene;
2022-03-04 22:40:20 +03:30
Ref<SceneHierarchyPanel> m_SceneHierarchyPanel;
Ref<PropertiesPanel> m_PropertiesPanel;
Ref<AssetBrowserPanel> m_ContentBrowserPanel;
2022-03-04 22:40:20 +03:30
Ref<Framebuffer> m_Framebuffer;
2022-03-04 22:40:20 +03:30
Entity m_CameraEntity;
2022-03-04 22:40:20 +03:30
ImVec2 m_AvailableContentRegionPrev;
2022-03-04 22:40:20 +03:30
public:
EditorLayer(const std::string& name, const std::vector<std::string>& args);
~EditorLayer();
2022-03-04 22:40:20 +03:30
void OnUpdate(float deltaTime) override;
2022-03-04 22:40:20 +03:30
void OnRender() override;
2022-03-04 22:40:20 +03:30
void OnUserInterfaceUpdate() override;
};
2022-03-04 22:40:20 +03:30
} // namespace Light