#pragma once #include "gfx/mesh.h" #include "entity.h" #include "event/event.h" #include "renderable.h" #include #include #include namespace simpleengine { class Scene : public simpleengine::Event { public: /** * @brief A list of entities in this scene. * */ std::vector> entities; /** * @brief Models that don't belong to an entity. * */ std::vector> stray_models; Scene() = default; void add_entity(std::shared_ptr entity) { entities.push_back(entity); } void add_stray_model(std::shared_ptr stray) { stray_models.push_back(stray); } virtual void update(const float& delta_time) override { for (auto& entity : entities) { entity->update(delta_time); } } }; }