diff --git a/include/Engine/Rendering/Util/UnorderedMapVec2.h b/include/Engine/Rendering/Util/UnorderedMapVec2.h new file mode 100644 index 00000000..0247ac9d --- /dev/null +++ b/include/Engine/Rendering/Util/UnorderedMapVec2.h @@ -0,0 +1,23 @@ +#ifndef UnorderedMapVec2_h__ +#define UnorderedMapVec2_h__ + +#include +#include +#include + +template<> +struct std::hash +{ + inline std::size_t operator()(const glm::vec2 &v) const + { + return boost::hash()(v.x) ^ boost::hash()(v.y); + } + + inline bool operator()(const glm::vec2& a, const glm::vec2& b)const + { + return a.x == b.x && a.y == b.y; + } + +}; + +#endif \ No newline at end of file