#include "irrMath.h"\r
#include "dimension2d.h"\r
\r
+#include <functional>\r
+\r
namespace irr\r
{\r
namespace core\r
} // end namespace core\r
} // end namespace irr\r
\r
+namespace std\r
+{\r
+\r
+template<class T>\r
+struct hash<irr::core::vector2d<T> >\r
+{\r
+ size_t operator()(const irr::core::vector2d<T>& vec) const\r
+ {\r
+ size_t h1 = hash<T>()(vec.X);\r
+ size_t h2 = hash<T>()(vec.Y);\r
+ return (h1 << (4 * sizeof(h1)) | h1 >> (4 * sizeof(h1))) ^ h2;\r
+ }\r
+};\r
+\r
+}\r
+\r
#endif\r
\r
\r
#include "irrMath.h"\r
\r
+#include <functional>\r
+\r
namespace irr\r
{\r
namespace core\r
} // end namespace core\r
} // end namespace irr\r
\r
+namespace std\r
+{\r
+\r
+template<class T>\r
+struct hash<irr::core::vector3d<T> >\r
+{\r
+ size_t operator()(const irr::core::vector3d<T>& vec) const\r
+ {\r
+ size_t h1 = hash<T>()(vec.X);\r
+ size_t h2 = hash<T>()(vec.Y);\r
+ size_t h3 = hash<T>()(vec.Z);\r
+ return (h1 << (5 * sizeof(h1)) | h1 >> (3 * sizeof(h1))) ^ (h2 << (2 * sizeof(h2)) | h2 >> (6 * sizeof(h2))) ^ h3;\r
+ }\r
+};\r
+\r
+}\r
+\r
#endif\r
\r