Monad Engine da02fba2
> Undercity Codex_
Loading...
Searching...
No Matches
eng::Scene Class Reference

#include <Scene.h>

Public Member Functions

void Update (float deltaTime)
 
void Clear ()
 
GameObjectCreateObject (const std::string &name, GameObject *parent=nullptr)
 
GameObjectCreateObject (const std::string &type, const std::string &name, GameObject *parent=nullptr)
 
template<typename T , typename = typename std::enable_if_t<std::is_base_of_v<GameObject, T>>>
T * CreateObject (const std::string &name, GameObject *parent=nullptr)
 
bool SetParent (GameObject *obj, GameObject *parent)
 
void SetMainCamera (GameObject *camera)
 
GameObjectGetMainCamera ()
 
std::vector< LightDataCollectLights ()
 

Static Public Member Functions

static void RegisterTypes ()
 
static std::shared_ptr< SceneLoad (const std::string &path)
 

Detailed Description

Definition at line 11 of file Scene.h.

Member Function Documentation

◆ Clear()

void eng::Scene::Clear ( )

Definition at line 60 of file Scene.cpp.

◆ CollectLights()

std::vector< LightData > eng::Scene::CollectLights ( )

Definition at line 241 of file Scene.cpp.

◆ CreateObject() [1/3]

GameObject * eng::Scene::CreateObject ( const std::string &  name,
GameObject parent = nullptr 
)

Definition at line 65 of file Scene.cpp.

References SetParent().

Referenced by eng::GameObject::LoadGLTF(), eng::ParseGLTFNode(), and Player::Update().

◆ CreateObject() [2/3]

template<typename T , typename = typename std::enable_if_t<std::is_base_of_v<GameObject, T>>>
T * eng::Scene::CreateObject ( const std::string &  name,
GameObject parent = nullptr 
)
inline

Definition at line 22 of file Scene.h.

References SetParent().

◆ CreateObject() [3/3]

GameObject * eng::Scene::CreateObject ( const std::string &  type,
const std::string &  name,
GameObject parent = nullptr 
)

◆ GetMainCamera()

GameObject * eng::Scene::GetMainCamera ( )

Definition at line 236 of file Scene.cpp.

◆ Load()

std::shared_ptr< Scene > eng::Scene::Load ( const std::string &  path)
static

◆ RegisterTypes()

void eng::Scene::RegisterTypes ( )
static

Definition at line 17 of file Scene.cpp.

Referenced by eng::Engine::Init().

◆ SetMainCamera()

void eng::Scene::SetMainCamera ( GameObject camera)

Definition at line 231 of file Scene.cpp.

◆ SetParent()

bool eng::Scene::SetParent ( GameObject obj,
GameObject parent 
)

◆ Update()

void eng::Scene::Update ( float  deltaTime)

Definition at line 30 of file Scene.cpp.

References SetParent().


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