|
Vulkan Schnee 0.0.1
High-performance rendering engine
|
A scene is the overarching structure which can spawn actors. More...
#include <Scene.h>
Public Member Functions | |
| Scene () | |
| virtual | ~Scene () |
| template<typename T, typename... Args> | |
| T * | spawnActor (const Ecs::LocalTransform &spawnTransform, Args &&... args) |
| Spawns an actor from a specific class in somewhere into the scene. | |
| void | destroyActor (Actor *actor) |
| virtual void | loadContent () |
| virtual void | unloadContent () |
| std::vector< Entity * > | getEntities () const |
| void | cleanup () |
| SceneManager * | getSceneManager () const |
| AssetManager * | getAssetManager () const |
| Gets the asset manager for this scene. | |
| void | setAssetManager (AssetManager *manager) |
| Sets the asset manager for this scene (used for dependency injection in tests) | |
| Engine * | getEngine () const |
| Gets the engine instance for this scene. | |
| Public Member Functions inherited from EngineCore::ITickable | |
| virtual | ~ITickable ()=default |
| virtual void | preTick () |
| Function which executes immediately before the execution of ITickable::preTick() | |
| virtual void | tick (double deltaTimeSeconds) |
| Function called each frame when a tick component has been registered with EnTT Ecs::Tick. | |
| virtual void | postTick () |
| Function which executes immediately after the execution of ITickable::postTick() | |
Protected Attributes | |
| Engine * | engine = nullptr |
| AssetManager * | assetManager = nullptr |
Private Attributes | |
| std::unique_ptr< SceneGraph > | sceneGraph |
| std::vector< Entity * > | entities |
| EngineCore::Scene::Scene | ( | ) |
Definition at line 8 of file Scene.cpp.
References assetManager, engine, EngineCore::EngineManager::getEngineModule(), EngineCore::EngineManager::getInstance(), and sceneGraph.
|
virtualdefault |
| void EngineCore::Scene::cleanup | ( | ) |
Definition at line 40 of file Scene.cpp.
References entities, and getEntities().
| void EngineCore::Scene::destroyActor | ( | Actor * | actor | ) |
Definition at line 16 of file Scene.cpp.
References EngineCore::Actor::endPlay().
|
nodiscard |
Gets the asset manager for this scene.
Definition at line 53 of file Scene.cpp.
References assetManager.
Referenced by EngineCore::MeshComponent::MeshComponent(), and EngineCore::GltfSpawner::spawnAll().
|
inlinenodiscard |
|
nodiscard |
|
nodiscard |
| void EngineCore::Scene::setAssetManager | ( | AssetManager * | manager | ) |
Sets the asset manager for this scene (used for dependency injection in tests)
| manager | Pointer to the AssetManager |
Definition at line 57 of file Scene.cpp.
References assetManager.
|
inline |
Spawns an actor from a specific class in somewhere into the scene.
| spawnTransform | where the actor should be placed into the world |
| args | Arguments |
| Args | Arguments |
Definition at line 33 of file Scene.h.
References entities, sceneGraph, and TRACY_ZONE_SCOPED_NAMED.
Referenced by EngineCore::GltfSpawner::spawnAll().
|
virtual |
Definition at line 27 of file Scene.cpp.
References TRACY_ZONE_SCOPED_NAMED.
|
protected |
Definition at line 85 of file Scene.h.
Referenced by getAssetManager(), Scene(), and setAssetManager().
|
protected |
Definition at line 84 of file Scene.h.
Referenced by getEngine(), getSceneManager(), and Scene().
|
private |
Definition at line 90 of file Scene.h.
Referenced by cleanup(), getEntities(), and spawnActor().
|
private |
Definition at line 88 of file Scene.h.
Referenced by Scene(), and spawnActor().