3#include "entt/meta/factory.hpp"
23 std::unordered_map<entt::id_type, std::shared_ptr<gizmo>>& type_map)
25 type_map[inspected_type.info().index()] = std::make_shared<T>();
31 entt::meta_factory<gizmo>{}.type(
"gizmo"_hs);
33#define GIZMO_REFLECT(gizmo_renderer_type, inspected_type) \
34 REFLECT_INLINE(gizmo_renderer_type) \
36 entt::meta_factory<gizmo_renderer_type>{} \
37 .type(entt::hashed_string{#gizmo_renderer_type}) \
38 .custom<entt::attributes>( \
39 entt::attributes{entt::attribute{"inspected_type", entt::resolve<inspected_type>()}}) \
41 .func<&gizmo::create_and_register<gizmo_renderer_type>>("create_and_register"_hs); \
Class representing a camera. Contains functionality for manipulating and updating a camera....
#define REFLECT_INLINE(cls)
virtual void draw(rtti::context &ctx, entt::meta_any &var, const camera &cam, gfx::dd_raii &dd)=0
virtual void draw_billboard(rtti::context &ctx, entt::meta_any &var, const camera &cam, gfx::dd_raii &dd)=0
static void create_and_register(const entt::meta_type &inspected_type, std::unordered_map< entt::id_type, std::shared_ptr< gizmo > > &type_map)