13#include "../components/native_script_component.h"
35 : Entity(Entity), Scene(Scene) {}
61 bool IsOk()
const {
return Scene && Scene->Registry.valid(Entity); }
73 return Scene->Registry.all_of<
T>(Entity);
83 template <
typename T,
typename... Targs>
86 return Scene->Registry.emplace<
T>(Entity, std::forward<Targs>(Args)...);
99 SCL_CORE_ASSERT(HasComponent<T>(),
"Scene object don't have \"{}\" component!",
typeid(
T).name());
100 return Scene->Registry.get<
T>(Entity);
110 template <
typename T>
113 SCL_CORE_ASSERT(HasComponent<T>(),
"Scene object don't have \"{}\" component!",
typeid(
T).name());
114 return Scene->Registry.get<
T>(Entity);
124 template <
typename T>
127 Scene->Registry.remove<
T>(Entity);
136 operator bool()
const {
return Entity != entt::null; }
144 operator u32()
const {
return (
u32)Entity; }
162 return Entity == Other.Entity && Scene == Other.Scene;
173 return Entity != Other.Entity || Scene != Other.Scene;
#define SCL_CORE_ASSERT(expr,...)
Topology object basis class for mesh creating implementation module.
const T & GetComponent() const
scene_object_handle GetHandle() const
bool operator==(const scene_object &Other) const
decltype(auto) AddComponent(Targs &&... Args)
const bool HasComponent() const
scene_object(const scene_object &Other)=default
bool operator!=(const scene_object &Other) const
entt::entity scene_object_handle
Scene class defintion module.