.. _program_listing_file_Src_GraphicsEngineOpenGL_scene_Scene.hpp: Program Listing for File Scene.hpp ================================== |exhale_lsh| :ref:`Return to documentation for file ` (``Src/GraphicsEngineOpenGL/scene/Scene.hpp``) .. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS .. code-block:: cpp #pragma once #include #include #include #include "GameObject.hpp" #include "scene/ObjMaterial.hpp" #include "scene/atmospheric_effects/clouds/Clouds.hpp" #include "scene/light/directional_light/DirectionalLight.hpp" #include "scene/light/point_light/PointLight.hpp" // #include "renderer/RenderPassSceneDependend.hpp" #include "Rotation.hpp" #include "scene/ViewFrustumCulling.hpp" #include "window/Window.hpp" class Scene { public: Scene(); Scene(std::shared_ptr main_camera, std::shared_ptr main_window); std::thread spwan() { return std::thread([=] { load_models(); }); } GLuint get_point_light_count() const; std::shared_ptr get_sun(); std::vector> get_point_lights() const; std::vector get_materials(); GLfloat get_progress(); int get_texture_count(int index); bool get_context_setup() const; std::shared_ptr get_clouds(); std::vector> get_game_objects() const; void add_game_object(const std::string &model_path, glm::vec3 translation, GLfloat scale, Rotation rot); void load_models(); bool is_loaded(); void setup_game_object_context(); void bind_textures_and_buffer(); void unbind_textures_and_buffer(); void set_context_setup(bool context_setup); ~Scene(); private: bool object_is_visible(std::shared_ptr game_object); std::shared_ptr main_camera; // lights std::shared_ptr sun; std::vector> point_lights; std::shared_ptr clouds; std::shared_ptr main_window; std::shared_ptr view_frustum_culling; std::vector> game_objects; GLfloat progress; bool loaded_scene; std::mutex mx_progress; std::mutex mx_isLoaded; std::mutex mx_space_ship; bool context_setup; };