6#include "entt/meta/meta.hpp"
7#include "entt/meta/resolve.hpp"
20 [](
const entt::meta_any& i)
28 [](
const entt::meta_any& i) ->
bool
31 return static_cast<bool>(comp && comp->get_parent());
34 entt::meta_factory<math::transform>{}
66 entt::meta_factory<transform_component>{}
67 .type(
"transform_component"_hs)
83 "It is relative to the parent."},
85 .data<&transform_component::set_transform_global, &transform_component::get_transform_global>(
"global_transform"_hs)
90 "Affected by parent transformation."},
96 .data<&transform_component::set_active, &transform_component::is_active>(
"active"_hs)
116 try_save(ar, ser20::make_nvp(
"local_transform", obj.get_transform_local()));
117 try_save(ar, ser20::make_nvp(
"parent", is_root ? entt::handle{} : obj.get_parent()));
118 try_save(ar, ser20::make_nvp(
"children", obj.get_children()));
119 try_save(ar, ser20::make_nvp(
"active", obj.is_active()));
127 if(
try_load(ar, ser20::make_nvp(
"local_transform", local_transform)))
129 obj.set_transform_local(local_transform);
133 try_load(ar, ser20::make_nvp(
"parent", parent));
135 obj.set_parent(parent,
false);
142 if(
try_load(ar, ser20::make_nvp(
"active", active)))
144 obj.set_active(active);
auto property_predicate(property_predicate_t< T > predicate) -> property_predicate_t< T >
attributes::value_type attribute
std::map< std::string, meta_any > attributes
BinaryInputArchive iarchive_binary_t
simd::JSONOutputArchive oarchive_associative_t
BinaryOutputArchive oarchive_binary_t
simd::JSONInputArchive iarchive_associative_t
#define SAVE_INSTANTIATE(cls, Archive)
auto try_save(Archive &ar, ser20::NameValuePair< T > &&t, const hpp::source_location &loc=hpp::source_location::current()) -> bool
#define LOAD_INSTANTIATE(cls, Archive)
auto try_load(Archive &ar, ser20::NameValuePair< T > &&t, const hpp::source_location &loc=hpp::source_location::current()) -> bool
Root component structure for the ACE framework, serves as the base component.