Manages game objects within a scene, handling registration, ID allocation, and GPU buffer synchronization for meshlet-to-object mappings.
More...
#include <SceneManager.h>
Manages game objects within a scene, handling registration, ID allocation, and GPU buffer synchronization for meshlet-to-object mappings.
Definition at line 20 of file SceneManager.h.
◆ SceneManager()
◆ ~SceneManager()
| Engine::Core::SceneManager::~SceneManager |
( |
| ) |
|
◆ cleanup()
| void Engine::Core::SceneManager::cleanup |
( |
| ) |
|
◆ clear()
| void Engine::Core::SceneManager::clear |
( |
| ) |
|
Clears all game objects and resets the manager state for a new scene.
◆ createMeshletToObjectMapBuffer()
| void Engine::Core::SceneManager::createMeshletToObjectMapBuffer |
( |
ApplicationContext * | context | ) |
|
|
private |
◆ destroyMeshletToObjectMapBuffer()
| void Engine::Core::SceneManager::destroyMeshletToObjectMapBuffer |
( |
| ) |
|
◆ executePendingSceneLoading()
| void Engine::Core::SceneManager::executePendingSceneLoading |
( |
| ) |
|
Executes the pending scene load. Should be called between frames.
◆ getActiveScene()
◆ getAllActors()
| std::vector< Entities::Actor * > Engine::Core::SceneManager::getAllActors |
( |
| ) |
|
Gets a list of pointers to all actors in the scene.
- Returns
- List of pointers to all actors
◆ getAllComponentsOfClassFromActors()
template<typename T>
| std::vector< T * > Engine::Core::SceneManager::getAllComponentsOfClassFromActors |
( |
| ) |
|
Gets a list of all components over all actors (EXPENSIVE!)
- Template Parameters
-
| T | Type of the component. Has to be a subclass of Engine::Core::LogicComponent |
- Returns
- a list of all components of a certain class from all actors (expensive)
Definition at line 137 of file SceneManager.h.
References activeScene.
◆ getAllEntities()
| std::vector< Entities::Entity * > Engine::Core::SceneManager::getAllEntities |
( |
| ) |
|
Gets a list of pointers to all entities in the current scene.
- Returns
- list of pointers to all entities in the current scene
◆ getGameObject()
◆ getGameObjectCount()
| uint32_t Engine::Core::SceneManager::getGameObjectCount |
( |
| ) |
const |
|
inlinenodiscard |
◆ getGameObjects()
| const std::vector< Components::Mesh * > & Engine::Core::SceneManager::getGameObjects |
( |
| ) |
const |
|
nodiscard |
◆ getMeshletToObjectBuffer()
| const Vulkan::Buffer & Engine::Core::SceneManager::getMeshletToObjectBuffer |
( |
| ) |
const |
|
nodiscard |
◆ isSceneChangePending()
| bool Engine::Core::SceneManager::isSceneChangePending |
( |
| ) |
const |
|
nodiscard |
Checks if a scene change has been requested.
- Returns
- true if a scene change is pending
◆ loadScene()
template<typename T>
| void Engine::Core::SceneManager::loadScene |
( |
| ) |
|
◆ loadSceneContent()
| void Engine::Core::SceneManager::loadSceneContent |
( |
| ) |
const |
|
private |
◆ registerGameObject()
registers a game object to the active scene
◆ setActiveScene()
◆ setAssetManager()
| void Engine::Core::SceneManager::setAssetManager |
( |
AssetManager * | manager | ) |
|
Sets the asset manager that will be injected into scenes.
- Parameters
-
◆ unloadScene()
| void Engine::Core::SceneManager::unloadScene |
( |
| ) |
|
Unloads the current scene.
◆ unregisterGameObject()
| void Engine::Core::SceneManager::unregisterGameObject |
( |
const Components::Mesh * | gameObject | ) |
|
unregisters a game object from the active scene
◆ uploadGameObjectToMeshletMap()
| void Engine::Core::SceneManager::uploadGameObjectToMeshletMap |
( |
| ) |
|
Uploads the changed data to the buffer on the gpu. Is only one buffer.
- Date
- 2025-07-02
- Author
- Konstantin Passig
◆ activeScene
◆ assetManager_
| AssetManager* Engine::Core::SceneManager::assetManager_ = nullptr |
|
private |
◆ context
◆ gameObjects
◆ gameObjectToMeshletMap
| std::vector<uint32_t> Engine::Core::SceneManager::gameObjectToMeshletMap {} |
|
private |
◆ meshletToObjectMapBuffer
| std::optional<Vulkan::Buffer> Engine::Core::SceneManager::meshletToObjectMapBuffer {} |
|
private |
◆ pendingSceneLoad
| std::function<void()> Engine::Core::SceneManager::pendingSceneLoad |
|
private |
The documentation for this class was generated from the following file:
- /home/magerbeton/Documents/gl3-vulkan/Engine/include/Engine/World/SceneManager.h