3 #include "ISceneElementObserver.h"
4 #include "SceneElement.h"
5 #include "UnityCallbacks.h"
11 template <
class TRenderableType>
12 class UnitySceneElementObserver :
public Rendering::Scene::ISceneElementObserver<TRenderableType>
16 UnitySceneElementObserver(
const MeshCallbacks& meshCallbacks)
17 : m_meshCallbacks(meshCallbacks)
24 void OnSceneElementAdded(Rendering::Scene::SceneElement<TRenderableType>& sceneElement)
override
26 m_meshCallbacks.AddMesh(sceneElement.GetName().c_str());
29 void OnSceneElementRemoved(Rendering::Scene::SceneElement<TRenderableType>& sceneElement)
override
31 m_meshCallbacks.DeleteMesh(sceneElement.GetName().c_str());
34 const MeshCallbacks& m_meshCallbacks;