diff --git a/framework/scene_graph/hpp_scene.h b/framework/scene_graph/hpp_scene.h index 0565e4dde..ab0aa65dc 100644 --- a/framework/scene_graph/hpp_scene.h +++ b/framework/scene_graph/hpp_scene.h @@ -17,8 +17,9 @@ #pragma once -#include "components/hpp_mesh.h" #include "scene.h" +#include "scene_graph/components/camera.h" +#include "scene_graph/components/hpp_mesh.h" #include "scene_graph/script.h" #include "scene_graph/scripts/animation.h" @@ -37,7 +38,8 @@ class HPPScene : private vkb::sg::Scene template std::vector get_components() const { - if constexpr (std::is_same::value) + if constexpr (std::is_same::value || std::is_same::value || std::is_same::value || + std::is_same::value || std::is_same::value) { return vkb::sg::Scene::get_components(); } @@ -56,10 +58,15 @@ class HPPScene : private vkb::sg::Scene template bool has_component() const { - if constexpr (std::is_same::value || std::is_same::value) + if constexpr (std::is_same::value || std::is_same::value || std::is_same::value || + std::is_same::value || std::is_same::value) { return vkb::sg::Scene::has_component(typeid(T)); } + else if constexpr (std::is_same::value) + { + return vkb::sg::Scene::has_component(); + } else { assert(false); // path never passed -> Please add a type-check here!