SolarSim
Loading...
Searching...
No Matches
solarsim::SceneManager Class Reference

Manages scene lifecycle and transitions. More...

#include <scene_manager.hpp>

Public Member Functions

 SceneManager (const SceneManager &)=delete
SceneManageroperator= (const SceneManager &)=delete
Sceneactive ()
 Get the currently active scene.
void loadScene (std::unique_ptr< Scene > newScene)
 Load a new scene, replacing the current one.
void unloadScene ()
 Unload the current active scene.

Static Public Member Functions

static SceneManagerget ()
 Get the singleton SceneManager instance.

Private Member Functions

 SceneManager ()
 ~SceneManager ()

Private Attributes

std::unique_ptr< Scenem_activeScene

Detailed Description

Manages scene lifecycle and transitions.

Note
Singleton pattern for global scene management

Constructor & Destructor Documentation

◆ SceneManager() [1/2]

solarsim::SceneManager::SceneManager ( const SceneManager & )
delete

◆ SceneManager() [2/2]

solarsim::SceneManager::SceneManager ( )
inlineprivate

◆ ~SceneManager()

solarsim::SceneManager::~SceneManager ( )
inlineprivate

Member Function Documentation

◆ active()

Scene * solarsim::SceneManager::active ( )
nodiscard

Get the currently active scene.

Returns
Scene* Pointer to active scene, or nullptr if none loaded
Warning
Returns raw pointer so scene ownership remains with SceneManager

◆ get()

SceneManager & solarsim::SceneManager::get ( )
staticnodiscard

Get the singleton SceneManager instance.

Returns
SceneManager& Reference to the scene manager

◆ loadScene()

void solarsim::SceneManager::loadScene ( std::unique_ptr< Scene > newScene)

Load a new scene, replacing the current one.

Parameters
newSceneUnique pointer to the scene to load

◆ operator=()

SceneManager & solarsim::SceneManager::operator= ( const SceneManager & )
delete

◆ unloadScene()

void solarsim::SceneManager::unloadScene ( )

Unload the current active scene.

Field Documentation

◆ m_activeScene

std::unique_ptr<Scene> solarsim::SceneManager::m_activeScene
private

Currently active scene


The documentation for this class was generated from the following files: