mirror of
https://github.com/g-truc/glm.git
synced 2024-11-22 08:54:35 +00:00
Merge branch 'master' of https://github.com/plasmacel/glm into hash
This commit is contained in:
commit
f8d0b0c9e2
@ -53,6 +53,7 @@
|
||||
#include "../gtc/vec1.hpp"
|
||||
|
||||
#include "../gtc/quaternion.hpp"
|
||||
#include "../gtx/dual_quaternion.hpp"
|
||||
|
||||
#include "../mat2x2.hpp"
|
||||
#include "../mat2x3.hpp"
|
||||
@ -98,6 +99,12 @@ namespace std
|
||||
GLM_FUNC_DECL size_t operator()(const glm::tquat<T,P> &q) const;
|
||||
};
|
||||
|
||||
template <typename T, glm::precision P>
|
||||
struct hash<glm::tdualquat<T,P>>
|
||||
{
|
||||
GLM_FUNC_DECL size_t operator()(const glm::tdualquat<T,P> &q) const;
|
||||
};
|
||||
|
||||
template <typename T, glm::precision P>
|
||||
struct hash<glm::tmat2x2<T,P>>
|
||||
{
|
||||
|
@ -108,6 +108,17 @@ namespace std
|
||||
return seed;
|
||||
}
|
||||
|
||||
template <typename T, glm::precision P>
|
||||
GLM_FUNC_QUALIFIER size_t
|
||||
hash<glm::tdualquat<T,P>>::operator()(const glm::tdualquat<T,P> &q) const
|
||||
{
|
||||
size_t seed = 0;
|
||||
hash<glm::tquat<T,P>> hasher;
|
||||
glm::detail::hash_combine(seed, hasher(q.real));
|
||||
glm::detail::hash_combine(seed, hasher(q.dual));
|
||||
return seed;
|
||||
}
|
||||
|
||||
template <typename T, glm::precision P>
|
||||
GLM_FUNC_QUALIFIER size_t
|
||||
hash<glm::tmat2x2<T,P>>::operator()(const glm::tmat2x2<T,P> &m) const
|
||||
|
Loading…
Reference in New Issue
Block a user