71 |
71 |
72 inline QString vertexToStringParens(const glm::vec3& vertex) |
72 inline QString vertexToStringParens(const glm::vec3& vertex) |
73 { |
73 { |
74 return utility::format("(%1, %2, %3)", vertex.x, vertex.y, vertex.z); |
74 return utility::format("(%1, %2, %3)", vertex.x, vertex.y, vertex.z); |
75 } |
75 } |
|
76 |
|
77 inline QString transformToString(const glm::mat4& matrix) |
|
78 { |
|
79 return utility::format( |
|
80 "%1 %2 %3 %4 %5 %6 %7 %8 %9 %10 %11 %12", |
|
81 matrix[3][0], |
|
82 matrix[3][1], |
|
83 matrix[3][2], |
|
84 matrix[0][0], |
|
85 matrix[1][0], |
|
86 matrix[2][0], |
|
87 matrix[0][1], |
|
88 matrix[1][1], |
|
89 matrix[2][1], |
|
90 matrix[0][2], |
|
91 matrix[1][2], |
|
92 matrix[2][2]); |
|
93 } |
76 } |
94 } |
|
95 |
|
96 using namespace utility; |
77 |
97 |
78 template<typename T, glm::qualifier Q> |
98 template<typename T, glm::qualifier Q> |
79 inline unsigned int qHash(const glm::vec<3, T, Q>& key) |
99 inline unsigned int qHash(const glm::vec<3, T, Q>& key) |
80 { |
100 { |
81 return qHash(key.x) ^ utility::rotl10(qHash(key.y)) ^ utility::rotl20(qHash(key.z)); |
101 return qHash(key.x) ^ utility::rotl10(qHash(key.y)) ^ utility::rotl20(qHash(key.z)); |