![]() |
MAGE
v0.171.0
Matthias Advanced Game Engine
|
#include <scene.hpp>
Public Member Functions | |
virtual | ~Scene () |
Scene & | operator= (const Scene &scene)=delete |
Scene & | operator= (Scene &&scene) noexcept |
void | Initialize (Engine &engine) |
void | Uninitialize (Engine &engine) |
ProxyPtr< Node > | Import (Engine &engine, const rendering::ModelDescriptor &desc) |
ProxyPtr< Node > | Import (Engine &engine, const rendering::ModelDescriptor &desc, std::vector< ProxyPtr< Node > > &nodes) |
template<typename ElementT , typename... ConstructorArgsT> | |
std::enable_if_t< std::is_same_v< Node, ElementT >, ProxyPtr< ElementT > > | Create (ConstructorArgsT &&... args) |
template<typename ElementT , typename... ConstructorArgsT> | |
std::enable_if_t< std::is_base_of_v< BehaviorScript, ElementT >, ProxyPtr< ElementT > > | Create (ConstructorArgsT &&... args) |
template<typename ElementT > | |
std::size_t | GetNumberOf () const noexcept |
template<typename ElementT , typename ActionT > | |
void | ForEach (ActionT &&action) |
template<typename ElementT , typename ActionT > | |
void | ForEach (ActionT &&action) const |
const std::string_view | GetName () const noexcept |
void | SetName (std::string name) noexcept |
Protected Member Functions | |
Scene (std::string name) | |
Scene (const Scene &scene)=delete | |
Scene (Scene &&scene) noexcept | |
Private Member Functions | |
virtual void | Load ([[maybe_unused]] Engine &engine) |
virtual void | Close ([[maybe_unused]] Engine &engine) |
void | Clear () noexcept |
Private Attributes | |
AlignedVector< Node > | m_nodes |
AlignedVector< UniquePtr< BehaviorScript > > | m_scripts |
std::string | m_name |
A class of scenes.
|
virtualdefault |
Destructs this scene.
|
explicitprotected |
Constructs a scene.
[in] | name | The name of the scene. |
|
protecteddelete |
Constructs a scene from the given scene.
[in] | scene | A reference to the scene. |
|
protecteddefaultnoexcept |
Constructs a scene by moving the given scene.
[in] | scene | A reference to the scene to move. |
|
privatenoexcept |
Clears this scene.
|
privatevirtual |
Closes this scene. Allows this scene to preform any post-processing destruction.
[in,out] | engine | A reference to the engine. |
Exception | Failed to close this scene. |
std::enable_if_t< std::is_same_v< Node, ElementT >, ProxyPtr< ElementT > > mage::Scene::Create | ( | ConstructorArgsT &&... | args | ) |
std::enable_if_t< std::is_base_of_v< BehaviorScript, ElementT >, ProxyPtr< ElementT > > mage::Scene::Create | ( | ConstructorArgsT &&... | args | ) |
void mage::Scene::ForEach | ( | ActionT && | action | ) |
void mage::Scene::ForEach | ( | ActionT && | action | ) | const |
|
noexcept |
Returns the name of this scene.
|
noexcept |
ProxyPtr< Node > mage::Scene::Import | ( | Engine & | engine, |
const rendering::ModelDescriptor & | desc | ||
) |
ProxyPtr< Node > mage::Scene::Import | ( | Engine & | engine, |
const rendering::ModelDescriptor & | desc, | ||
std::vector< ProxyPtr< Node > > & | nodes | ||
) |
void mage::Scene::Initialize | ( | Engine & | engine | ) |
Initializes this scene.
[in,out] | engine | A reference to the engine. |
Exception | Failed to initialize this scene. |
|
privatevirtual |
Loads this scene. Allows this scene to preform any pre-processing construction.
[in,out] | engine | A reference to the engine. |
Exception | Failed to load this scene. |
Copies the given scene to this scene.
[in] | scene | A reference to the scene to copy. |
Moves the given scene to this scene.
[in] | scene | A reference to the scene to move. |
|
noexcept |
Sets the name of this scene to the given string.
[in] | name | The name. |
void mage::Scene::Uninitialize | ( | Engine & | engine | ) |
Uninitializes this scene.
[in,out] | engine | A reference to the engine. |
Exception | Failed to unitialize this scene. |
|
private |
The name of this scene.
|
private |
A vector containing the nodes of this scene.
|
private |
A vector containing the pointers to the scripts of this scene.