21 #ifndef HX3D_ECS_COMPONENT 22 #define HX3D_ECS_COMPONENT 24 #include "hx3d/utils/bitset.hpp" 54 static unsigned int get(
typename std::enable_if<std::is_base_of<Component, T>::value>::type* test =
nullptr);
61 template <
class... Types>
62 static unsigned int getFamily();
66 static std::map<std::type_index, unsigned int> _componentBits;
68 static unsigned int _currentBit;
75 template <
class T,
class... Types>
76 static Bitset getFamilyInternal();
77 template <
class... Types>
78 static Bitset getFamilyInternal(
typename std::enable_if<
sizeof...(Types) == 0>::type* test =
nullptr);
81 #include "hx3d/ecs/_inline/component.inl.hpp"
Bitset helper in an unsigned int.
Unique bit attribution for each component.