mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 11:45:36 +02:00
Add qHash for Vec2FloatPair
This commit is contained in:
parent
af791e8f72
commit
2d1c676a8b
1 changed files with 5 additions and 1 deletions
|
@ -31,7 +31,6 @@
|
|||
|
||||
class SimpleProgramKey;
|
||||
|
||||
typedef glm::vec3 Vec3Key;
|
||||
typedef QPair<glm::vec2, float> Vec2FloatPair;
|
||||
typedef QPair<glm::vec2, glm::vec2> Vec2Pair;
|
||||
typedef QPair<Vec2Pair, Vec2Pair> Vec2PairPair;
|
||||
|
@ -48,6 +47,11 @@ inline uint qHash(const glm::vec2& v, uint seed) {
|
|||
return qHash(v.x + 5009 * v.y, seed);
|
||||
}
|
||||
|
||||
inline uint qHash(const Vec2FloatPair& v, uint seed) {
|
||||
// multiply by prime numbers greater than the possible size
|
||||
return qHash(v.first.x + 5009 * v.first.y + 5011 * v.second);
|
||||
}
|
||||
|
||||
inline uint qHash(const Vec2Pair& v, uint seed) {
|
||||
// multiply by prime numbers greater than the possible size
|
||||
return qHash(v.first.x + 5009 * v.first.y + 5011 * v.second.x + 5021 * v.second.y, seed);
|
||||
|
|
Loading…
Reference in a new issue