Skip to content

Class SceneManager

ClassList > SceneManager

Factory for creating preset scenes. More...

  • #include <SceneManager.h>

Public Static Functions

Type Name
std::shared_ptr< Scene > CornellBox (std::string _name="cornellbox")
Creates or retrieves the Cornell Box scene.
std::shared_ptr< Scene > GetSceneConfig (std::string _name)
Retrieves cached scene by name.
std::shared_ptr< Scene > Main (std::string _name="scene1")
Creates or retrieves the "Main" test scene.
std::shared_ptr< Scene > SDF_Test (std::string _name="SDF test")
Creates or retrieves the SDF test scene.
std::shared_ptr< Scene > Shadow (std::string _name="shadow test")
Creates or retrieves the shadow test scene.

Detailed Description

SceneManager provides static factory methods to instantiate common test scenes (Main, CornellBox, SDF_Test, Shadow). Scenes are cached by name to enable reuse across sessions.

Caching Strategy: * Scenes stored in sce_configs map (name -> Scene) * First call creates and caches scene * Subsequent calls return existing scene * Useful for quick scene switching without reload

Note:

All methods are static (no instance required).

Note:

Preset scenes are hardcoded (not loaded from files).

Public Static Functions Documentation

function CornellBox

Creates or retrieves the Cornell Box scene.

static std::shared_ptr< Scene > SceneManager::CornellBox (
    std::string _name="cornellbox"
) 

Parameters:

  • _name Scene name (default: "cornellbox")

Returns:

Shared pointer to Scene

Note:

Classic Cornell Box setup for testing global illumination.


function GetSceneConfig

Retrieves cached scene by name.

static std::shared_ptr< Scene > SceneManager::GetSceneConfig (
    std::string _name
) 

Parameters:

  • _name Scene name to lookup

Returns:

Shared pointer to Scene, or nullptr if not cached


function Main

Creates or retrieves the "Main" test scene.

static std::shared_ptr< Scene > SceneManager::Main (
    std::string _name="scene1"
) 

Parameters:

  • _name Scene name (default: "scene1")

Returns:

Shared pointer to Scene

Note:

Contains basic test geometry, camera, and lighting.


function SDF_Test

Creates or retrieves the SDF test scene.

static std::shared_ptr< Scene > SceneManager::SDF_Test (
    std::string _name="SDF test"
) 

Parameters:

  • _name Scene name (default: "SDF test")

Returns:

Shared pointer to Scene

Note:

Scene for testing Signed Distance Field soft shadows.


function Shadow

Creates or retrieves the shadow test scene.

static std::shared_ptr< Scene > SceneManager::Shadow (
    std::string _name="shadow test"
) 

Parameters:

  • _name Scene name (default: "shadow test")

Returns:

Shared pointer to Scene

Note:

Scene for testing shadow mapping techniques.



The documentation for this class was generated from the following file src/fileIO/SceneManager.h