| 1.0.0 API documentation

hash.hpp
Go to the documentation of this file.
1
13 #pragma once
14
15 #if defined(GLM_FORCE_MESSAGES) && !defined(GLM_EXT_INCLUDED)
16 # ifndef GLM_ENABLE_EXPERIMENTAL
17 # pragma message("GLM: GLM_GTX_hash is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it.")
18 # else
19 # pragma message("GLM: GLM_GTX_hash extension included")
20 # endif
21 #endif
22
23 #include "../vec2.hpp"
24 #include "../vec3.hpp"
25 #include "../vec4.hpp"
26 #include "../gtc/vec1.hpp"
27
28 #include "../gtc/quaternion.hpp"
29 #include "../gtx/dual_quaternion.hpp"
30
31 #include "../mat2x2.hpp"
32 #include "../mat2x3.hpp"
33 #include "../mat2x4.hpp"
34
35 #include "../mat3x2.hpp"
36 #include "../mat3x3.hpp"
37 #include "../mat3x4.hpp"
38
39 #include "../mat4x2.hpp"
40 #include "../mat4x3.hpp"
41 #include "../mat4x4.hpp"
42
43 #if __cplusplus < 201103L
44 #pragma message("GLM_GTX_hash requires C++11 standard library support")
45 #endif
46
47 #if GLM_LANG & GLM_LANG_CXX11
48 #define GLM_GTX_hash 1
49 #include <functional>
50
51 namespace std
52 {
53 template<typename T, glm::qualifier Q>
54 struct hash<glm::vec<1, T, Q> >
55 {
56 GLM_FUNC_DECL size_t operator()(glm::vec<1, T, Q> const& v) const GLM_NOEXCEPT;
57 };
58
59 template<typename T, glm::qualifier Q>
60 struct hash<glm::vec<2, T, Q> >
61 {
62 GLM_FUNC_DECL size_t operator()(glm::vec<2, T, Q> const& v) const GLM_NOEXCEPT;
63 };
64
65 template<typename T, glm::qualifier Q>
66 struct hash<glm::vec<3, T, Q> >
67 {
68 GLM_FUNC_DECL size_t operator()(glm::vec<3, T, Q> const& v) const GLM_NOEXCEPT;
69 };
70
71 template<typename T, glm::qualifier Q>
72 struct hash<glm::vec<4, T, Q> >
73 {
74 GLM_FUNC_DECL size_t operator()(glm::vec<4, T, Q> const& v) const GLM_NOEXCEPT;
75 };
76
77 template<typename T, glm::qualifier Q>
78 struct hash<glm::qua<T, Q> >
79 {
80 GLM_FUNC_DECL size_t operator()(glm::qua<T, Q> const& q) const GLM_NOEXCEPT;
81 };
82
83 template<typename T, glm::qualifier Q>
84 struct hash<glm::tdualquat<T, Q> >
85 {
86 GLM_FUNC_DECL size_t operator()(glm::tdualquat<T,Q> const& q) const GLM_NOEXCEPT;
87 };
88
89 template<typename T, glm::qualifier Q>
90 struct hash<glm::mat<2, 2, T, Q> >
91 {
92 GLM_FUNC_DECL size_t operator()(glm::mat<2, 2, T,Q> const& m) const GLM_NOEXCEPT;
93 };
94
95 template<typename T, glm::qualifier Q>
96 struct hash<glm::mat<2, 3, T, Q> >
97 {
98 GLM_FUNC_DECL size_t operator()(glm::mat<2, 3, T,Q> const& m) const GLM_NOEXCEPT;
99 };
100
101 template<typename T, glm::qualifier Q>
102 struct hash<glm::mat<2, 4, T, Q> >
103 {
104 GLM_FUNC_DECL size_t operator()(glm::mat<2, 4, T,Q> const& m) const GLM_NOEXCEPT;
105 };
106
107 template<typename T, glm::qualifier Q>
108 struct hash<glm::mat<3, 2, T, Q> >
109 {
110 GLM_FUNC_DECL size_t operator()(glm::mat<3, 2, T,Q> const& m) const GLM_NOEXCEPT;
111 };
112
113 template<typename T, glm::qualifier Q>
114 struct hash<glm::mat<3, 3, T, Q> >
115 {
116 GLM_FUNC_DECL size_t operator()(glm::mat<3, 3, T,Q> const& m) const GLM_NOEXCEPT;
117 };
118
119 template<typename T, glm::qualifier Q>
120 struct hash<glm::mat<3, 4, T, Q> >
121 {
122 GLM_FUNC_DECL size_t operator()(glm::mat<3, 4, T,Q> const& m) const GLM_NOEXCEPT;
123 };
124
125 template<typename T, glm::qualifier Q>
126 struct hash<glm::mat<4, 2, T, Q> >
127 {
128 GLM_FUNC_DECL size_t operator()(glm::mat<4, 2, T,Q> const& m) const GLM_NOEXCEPT;
129 };
130
131 template<typename T, glm::qualifier Q>
132 struct hash<glm::mat<4, 3, T, Q> >
133 {
134 GLM_FUNC_DECL size_t operator()(glm::mat<4, 3, T,Q> const& m) const GLM_NOEXCEPT;
135 };
136
137 template<typename T, glm::qualifier Q>
138 struct hash<glm::mat<4, 4, T, Q> >
139 {
140 GLM_FUNC_DECL size_t operator()(glm::mat<4, 4, T,Q> const& m) const GLM_NOEXCEPT;
141 };
142 } // namespace std
143
144 #include "hash.inl"
145
146 #endif //GLM_LANG & GLM_LANG_CXX11