Karma Engine
Loading...
Searching...
No Matches
EditorLayer.h
1#pragma once
2
3#include "Karma.h"
4#include "Karma/EntryPoint.h"
5
6namespace Karma
7{
8 class EditorLayer : public Layer
9 {
10 public:
13
14 virtual void OnAttach() override;
15 virtual void OnDetach() override;
16 virtual void OnUpdate(float deltaTime) override;
17 virtual void ImGuiRender(float deltaTime) override;
18
19 void OpenScene(const std::string& objFileName);
20 virtual void OnEvent(Event& event) override;
21 bool OnMouseButtonPressed(MouseButtonPressedEvent& e);
22 bool OnMouseButtonReleased(MouseButtonReleasedEvent& e);
23 bool OnKeyPressed(KeyPressedEvent& e);
24 void InputPolling(float deltaTime);
25
26 void TentativeTrigger();
27 void IterateActors();
28
29 private:
30 std::shared_ptr<Karma::Shader> m_ModelShader;
31 std::shared_ptr<Karma::VertexArray> m_ModelVertexArray;
32 std::shared_ptr<Karma::Material> m_ModelMaterial;
33 std::shared_ptr<Karma::Texture> m_ModelTexture;
34
35 std::shared_ptr<Karma::PerspectiveCamera> m_EditorCamera;
36 std::shared_ptr<Karma::Scene> m_EditorScene;
37
38 float cameraTranslationSpeed = 1.0f;
39 float cameraRotationSpeed = 80.0f;
40
41 // Tentative stuff
42 UWorld* testWorld;
43 uint32_t m_ActorCounter;
44 };
45}
Definition EditorLayer.h:9
Definition Event.h:35
Definition KeyEvent.h:25
Definition Layer.h:11
Definition MouseEvent.h:67
Definition MouseEvent.h:83
Definition World.h:108