21 #ifndef HX3D_PHYSICS_2D_COLLISIONMATRIX 22 #define HX3D_PHYSICS_2D_COLLISIONMATRIX 51 template <
class... Categories>
52 void addMask(std::string name, std::string category, Categories... others);
53 template <
class... Categories>
54 void addMask(std::string name, std::string category,
typename std::enable_if<
sizeof...(Categories) == 0>::type* test =
nullptr);
71 unsigned int getMask(std::string category);
75 std::map<std::string, unsigned int> _categories;
77 std::map<std::string, unsigned int> _masks;
80 unsigned int _currentCategory;
88 void addOneMask(std::string name, std::string category);
91 #include "hx3d/physics/2d/_inline/collision_matrix.inl.hpp"
void addMask(std::string name, std::string category, Categories...others)
Add a mask for a category from multiple categories.
unsigned int getCategory(std::string category)
Get a category bit from a name.
unsigned int getMask(std::string category)
Get a mask bit from a name.
Collision matrix with masks and category.
void addCategory(std::string name)
Add a category.