4#include <entt/entt.hpp>
19 class ComponentRegistry;
26 using ScenePtr = std::shared_ptr<Scene>;
47 inline const std::string&
GetName()
const {
return m_name; };
49 void AddObject(std::shared_ptr<GameObject> newObject, std::shared_ptr<GameObject> parent);
50 const std::set<std::shared_ptr<GameObject>>
GetRootObjects()
const {
return m_rootObjects; }
57 void SetSkybox(
const std::string& skyboxFilePath);
60 inline void SetLighting(std::unique_ptr<SceneLighting> newLighting)
62 m_sceneLighting = std::move(newLighting);
66 return m_sceneLighting.get();
71 void RemoveFromRoot(std::shared_ptr<GameObject>
object);
72 void AddRootObject(std::shared_ptr<GameObject> newRootObject);
75 static uint32_t s_nextRegistryId;
81 uint32_t m_registryId;
84 std::set<std::shared_ptr<GameObject>> m_rootObjects;
86 std::shared_ptr<Cubemap> m_cubemap;
87 std::unique_ptr<SceneLighting> m_sceneLighting =
nullptr;
void Notify(Event &event)
static ScenePtr Create(std::string name, SceneType type=SceneType::RuntimeScene)
void SubmitDrawCalls(RendererAPI &renderer)
void AddObject(std::shared_ptr< GameObject > newObject, std::shared_ptr< GameObject > parent)
void RenderScene(Camera *cam=nullptr)
void SetSkybox(const std::string &skyboxFilePath)
std::weak_ptr< Cubemap > GetSkybox()
const SceneLighting * GetSceneLighting()
std::string Serialize() const override
void SetLighting(std::unique_ptr< SceneLighting > newLighting)
const std::string & GetName() const
const std::set< std::shared_ptr< GameObject > > GetRootObjects() const
std::shared_ptr< Scene > ScenePtr