Karma Engine
Loading...
Searching...
No Matches
Scene.h
1#pragma once
2
3#include "krpch.h"
4
5#include "Camera.h"
6#include "VertexArray.h"
7
8namespace Karma
9{
10 class KARMA_API Scene
11 {
12 public:
13 Scene();
14 ~Scene();
15
16 void AddVertexArray(std::shared_ptr<VertexArray> vertexArray);
17 void AddCamera(std::shared_ptr<Camera> camera);
18
19 void SetClearColor(const glm::vec4& clearColor) { m_ClearColor = clearColor; }
20 void SetRenderWindow(void* window) { m_WindowToRenderWithin = window; };
21
22 void SetWindowToRenderWithinResize(bool bStatus) { m_WindowResize = bStatus; }
23
24 // Getters
25 std::shared_ptr<VertexArray> GetRenderableVertexArray() const;
26 std::shared_ptr<Camera> GetSceneCamera() const;
27
28 const glm::vec4& GetClearColor() const { return m_ClearColor; }
29
30 const std::vector<std::shared_ptr<VertexArray>>& GetAllVertexArrays() const { return m_VertexArrays; }
31 const std::vector<std::shared_ptr<Camera>>& GetAllCameras() const { return m_Cameras; }
32
33 inline void* GetRenderingWindow() const { return m_WindowToRenderWithin; }
34 inline bool GetWindowToRenderWithinResizeStatus() const { return m_WindowResize; }
35
36 private:
37 std::vector<std::shared_ptr<VertexArray>> m_VertexArrays;
38 std::vector<std::shared_ptr<Camera>> m_Cameras;
39
40 glm::vec4 m_ClearColor;
41
42 // Caution: raw pointer, courtsey authors of Dear ImGui
43 void* m_WindowToRenderWithin;
44 bool m_WindowResize;
45 };
46}
Definition Scene.h:11