3#include "entt/meta/factory.hpp"
28 std::unordered_map<entt::id_type, std::shared_ptr<gizmo>>& type_map)
30 type_map[inspected_type.info().index()] = std::make_shared<T>();
36 entt::meta_factory<gizmo>{}.type(
"gizmo"_hs);
38#define GIZMO_REFLECT(gizmo_renderer_type, inspected_type) \
39 REFLECT_INLINE(gizmo_renderer_type) \
41 entt::meta_factory<gizmo_renderer_type>{} \
42 .type(entt::hashed_string{#gizmo_renderer_type}) \
43 .custom<entt::attributes>( \
44 entt::attributes{entt::attribute{"inspected_type", entt::resolve<inspected_type>()}}) \
46 .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)
std::vector< std::function< void()> > callbacks
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)
virtual void draw(rtti::context &ctx, entt::meta_any &var, const camera &cam, gfx::dd_raii &dd, dd_2d_raii &dd_2d)=0