galaxy 1.0.0
Real-Time C++23 Game Programming Framework. Built on data-driven design principles and agile software engineering.
Loading...
Searching...
No Matches
Registry.hpp
Go to the documentation of this file.
1
7
8#ifndef GALAXY_ENTITY_REGISTRY_HPP_
9#define GALAXY_ENTITY_REGISTRY_HPP_
10
11#include <entt/entity/registry.hpp>
12
13namespace galaxy
14{
18 class Registry final
19 {
23 // using B2BodyConstruction = meta::vector<std::pair<components::RigidBody*, components::Transform*>>;
24
25 public:
29 Registry();
30
35
40
44 ~Registry();
45
51 //[[maybe_unused]]
52 // entt::entity create();
53
61 //[[maybe_unused]]
62 // entt::entity create_from_prefab(const std::string& name);
63
71 //[[nodiscard]]
72 // bool is_valid(const entt::entity entity);
73
81 // void update(b2World& b2World);
82
86 // void clear();
87
88 private:
92 Registry(const Registry&) = delete;
93
97 Registry& operator=(const Registry&) = delete;
98
105 // void construct_rigidbody(entt::registry& registry, entt::entity entity);
106
113 // void destroy_rigidbody(entt::registry& registry, entt::entity entity);
114
121 // void construct_script(entt::registry& registry, entt::entity entity);
122
129 // void destruct_script(entt::registry& registry, entt::entity entity);
130
137 // void construct_nui(entt::registry& registry, entt::entity entity);
138
145 // void destruct_nui(entt::registry& registry, entt::entity entity);
146
153 // void enable_entity(entt::registry& registry, entt::entity entity);
154
161 // void disable_entity(entt::registry& registry, entt::entity entity);
162
163 public:
167 entt::registry m_entt;
168
169 private:
173 // B2BodyConstruction m_bodies_to_construct;
174 };
175} // namespace galaxy
176
177#endif
Wrapper around entt::registry to expand functionality.
Definition Registry.hpp:19
Registry & operator=(Registry &&)
Move assignment operator.
Definition Registry.cpp:21
Registry & operator=(const Registry &)=delete
Copy assignment operator.
entt::registry m_entt
Function that integrates a box2d construction with entt.
Definition Registry.hpp:167
Registry(const Registry &)=delete
Create an entity with some default components.
Registry()
Typedef for creating b2 bodies from components.
Definition Registry.cpp:12
~Registry()
Destructor.
Definition Registry.cpp:31
Animated.cpp galaxy.
Definition Animated.cpp:16