mirror of
https://github.com/g-truc/glm.git
synced 2025-04-08 06:43:10 +00:00
std::hash specialization for glm::tdualquat
This commit is contained in:
parent
5100bd76dc
commit
3b9e90c7b6
2 changed files with 18 additions and 0 deletions
|
@ -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…
Add table
Reference in a new issue