![]() |
Rendering Engine 0.2.0
Modular Graphics Rendering Engine | v0.2.0
|
Base class representing a renderable scene. More...
#include <scene.hpp>
Public Member Functions | |
| Scene (SceneManager &sceneManager) | |
| Constructs a Scene instance associated with a SceneManager. | |
| ~Scene ()=default | |
| Virtual destructor for safe polymorphic destruction. | |
| virtual void | Initialize () |
| Initializes scene resources and drawables. | |
| virtual void | Update (float deltaTime) |
| Updates all objects within the scene. | |
| virtual void | Draw () |
| Renders all 3D and 2D drawables in the scene. | |
| virtual void | Shutdown () |
| Releases scene-specific resources and prepares for shutdown. | |
| SceneManager & | GetSceneManager () |
| Gets a reference to the SceneManager that owns this scene. | |
| void | LoadScene (std::string newSceneName) |
| Requests to load another scene. | |
Protected Attributes | |
| SceneManager & | mSceneManager |
| std::shared_ptr< Camera > | mActiveCamera3D |
| std::shared_ptr< Camera2D > | mActiveCamera2D |
| std::vector< Drawable3D * > | mDrawables3D |
| std::vector< Drawable2D * > | mDrawables2D |
Base class representing a renderable scene.
A Scene acts as a container for drawable objects (2D and 3D) and defines the update and draw lifecycle of a game or rendering context.
Derived scene classes should override Initialize(), Update(), and Draw() to implement specific logic and populate the drawable lists.
| rendering_engine::Scene::Scene | ( | SceneManager & | sceneManager | ) |
Constructs a Scene instance associated with a SceneManager.
| sceneManager | Reference to the SceneManager that owns this Scene. |
|
default |
Virtual destructor for safe polymorphic destruction.
|
virtual |
Renders all 3D and 2D drawables in the scene.
The base implementation can iterate through mDrawables3D and mDrawables2D to call each object�s Draw() method, using the active cameras.
Definition at line 41 of file scene.cpp.
| SceneManager & rendering_engine::Scene::GetSceneManager | ( | ) |
Gets a reference to the SceneManager that owns this scene.
|
virtual |
| void rendering_engine::Scene::LoadScene | ( | std::string | newSceneName | ) |
Requests to load another scene.
| newSceneName | The name of the registered scene to load next. |
This function delegates to SceneManager::LoadScene().
|
virtual |
|
virtual |
Updates all objects within the scene.
| deltaTime | Time elapsed since the last frame (in milliseconds). |
Called once per frame. Override to implement per-frame logic such as animation, physics updates, or scene transitions.
Definition at line 20 of file scene.cpp.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |