75 static auto is_parent_of(entt::handle parent_to_test, entt::handle child) -> bool;
157 const
math::quat& rotation,
158 float epsilon) noexcept ->
bool;
480 auto
is_dirty() const noexcept ->
bool;
487 void set_dirty(uint8_t
id,
bool dirty) noexcept;
494 auto
is_dirty(uint8_t
id) const noexcept ->
bool;
512 void apply_transform(const
math::transform& tr) noexcept;
519 auto inverse_parent_transform(const
entt::
handle& parent) noexcept ->
math::transform;
525 void on_dirty_transform(
bool dirty) noexcept;
526 void on_dirty_flags(
bool dirty) noexcept;
527 void on_flags_changed(
flags_t flags);
528 auto get_flags_global() const noexcept ->
flags_t;
533 auto resolve_global_value_transform() const noexcept ->
math::transform;
534 auto resolve_global_value_flags() const noexcept ->
flags_t;
552 int32_t sort_index_{-1};
555 entt::handle parent_{};
557 std::vector<entt::handle> children_{};
565 void (Owner::*on_dirty)(bool),
566 T (Owner::*resolve_global_value)()
const,
568 struct local_global_property
576 auto set_value(Owner* owner,
const T& val)
noexcept ->
bool
590 auto get_value(
const Owner* owner)
const noexcept ->
const T&
600 auto value(Owner* owner)
noexcept -> T&
623 (owner->*on_dirty)(
flag);
632 auto get_global_value(
const Owner* owner,
bool force)
const noexcept ->
const T&
634 if(
force || auto_resolve && dirty)
637 global = (owner->*resolve_global_value)();
639 set_dirty(
const_cast<Owner*
>(owner),
false);
645 auto has_auto_resolve() const noexcept ->
bool
655 mutable bool dirty{
true};
664 &transform_component::on_dirty_transform,
665 &transform_component::resolve_global_value_transform,
668 using property_flags = local_global_property<
flags_t,
670 &transform_component::on_dirty_flags,
671 &transform_component::resolve_global_value_flags,
681 property_transform transform_{};
683 property_flags flags_{};
685 std::bitset<32> transform_dirty_{};
transform_t< float > transform
auto is_roots_order_changed() -> bool
void reset_roots_order_changed()
CRTP (Curiously Recurring Template Pattern) base structure for components.
Root component structure for the ACE framework, serves as the base component.
static void on_update_component(entt::registry &r, entt::entity e)
Called when the component is updated.
static void on_create_component(entt::registry &r, entt::entity e)
Called when the component is created.
static void on_destroy_component(entt::registry &r, entt::entity e)
Called when the component is destroyed.
static constexpr bool in_place_delete