MCPcopy Create free account
hub / github.com/Illation/ETEngine / SetScene

Method SetScene

Engine/source/EtEditor/SceneEditor/SceneSelection.cpp:25–41  ·  view source on GitHub ↗

---------------------------------------------------- SceneSelection::SetScene start listening for scene events

Source from the content-addressed store, hash-verified

23// start listening for scene events
24//
25void SceneSelection::SetScene()
26{
27 fw::UnifiedScene::Instance().GetEventDispatcher().Register(fw::E_SceneEvent::All,
28 fw::T_SceneEventCallback(std::bind(&SceneSelection::OnSceneEvent, this, std::placeholders::_1, std::placeholders::_2)));
29
30 render::Scene& renderScene = fw::UnifiedScene::Instance().GetRenderScene();
31 render::I_SceneExtension* const ext = renderScene.GetExtension(core::HashString("OutlineExtension"));
32 if (ext == nullptr)
33 {
34 m_OutlineExtension = new render::OutlineExtension();
35 renderScene.AddExtension(m_OutlineExtension);
36 }
37 else
38 {
39 m_OutlineExtension = static_cast<render::OutlineExtension*>(ext);
40 }
41}
42
43//----------------------------------------------------
44// SceneSelection::RegisterListener

Callers 1

InitInternalMethod · 0.80

Calls 4

HashStringClass · 0.85
RegisterMethod · 0.80
AddExtensionMethod · 0.80
GetExtensionMethod · 0.45

Tested by

no test coverage detected