3rdparty/glm/doc/api/a00126_source.html
| | 0.9.8 |
type_trait.hpp
Go to the documentation of this file.
1
13 #pragma once
14
15 // Dependency:
16 #include "../detail/type_vec2.hpp"
17 #include "../detail/type_vec3.hpp"
18 #include "../detail/type_vec4.hpp"
19 #include "../detail/type_mat2x2.hpp"
20 #include "../detail/type_mat2x3.hpp"
21 #include "../detail/type_mat2x4.hpp"
22 #include "../detail/type_mat3x2.hpp"
23 #include "../detail/type_mat3x3.hpp"
24 #include "../detail/type_mat3x4.hpp"
25 #include "../detail/type_mat4x2.hpp"
26 #include "../detail/type_mat4x3.hpp"
27 #include "../detail/type_mat4x4.hpp"
28 #include "../gtc/quaternion.hpp"
29 #include "../gtx/dual_quaternion.hpp"
30
31 #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
32 # pragma message("GLM: GLM_GTX_type_trait extension included")
33 #endif
34
35 namespace glm
36 {
39
40template <template <typename, precision> class genType, typename T, precision P>
41struct type
42 {
43static bool const is_vec = false;
44static bool const is_mat = false;
45static bool const is_quat = false;
46static length_t const components = 0;
47static length_t const cols = 0;
48static length_t const rows = 0;
49 };
50
51template <typename T, precision P>
52struct type<tvec1, T, P>
53 {
54static bool const is_vec = true;
55static bool const is_mat = false;
56static bool const is_quat = false;
57enum
58 {
59 components = 1
60 };
61 };
62
63template <typename T, precision P>
64struct type<tvec2, T, P>
65 {
66static bool const is_vec = true;
67static bool const is_mat = false;
68static bool const is_quat = false;
69enum
70 {
71 components = 2
72 };
73 };
74
75template <typename T, precision P>
76struct type<tvec3, T, P>
77 {
78static bool const is_vec = true;
79static bool const is_mat = false;
80static bool const is_quat = false;
81enum
82 {
83 components = 3
84 };
85 };
86
87template <typename T, precision P>
88struct type<tvec4, T, P>
89 {
90static bool const is_vec = true;
91static bool const is_mat = false;
92static bool const is_quat = false;
93enum
94 {
95 components = 4
96 };
97 };
98
99template <typename T, precision P>
100struct type<tmat2x2, T, P>
101 {
102static bool const is_vec = false;
103static bool const is_mat = true;
104static bool const is_quat = false;
105enum
106 {
107 components = 2,
108 cols = 2,
109 rows = 2
110 };
111 };
112
113template <typename T, precision P>
114struct type<tmat2x3, T, P>
115 {
116static bool const is_vec = false;
117static bool const is_mat = true;
118static bool const is_quat = false;
119enum
120 {
121 components = 2,
122 cols = 2,
123 rows = 3
124 };
125 };
126
127template <typename T, precision P>
128struct type<tmat2x4, T, P>
129 {
130static bool const is_vec = false;
131static bool const is_mat = true;
132static bool const is_quat = false;
133enum
134 {
135 components = 2,
136 cols = 2,
137 rows = 4
138 };
139 };
140
141template <typename T, precision P>
142struct type<tmat3x2, T, P>
143 {
144static bool const is_vec = false;
145static bool const is_mat = true;
146static bool const is_quat = false;
147enum
148 {
149 components = 3,
150 cols = 3,
151 rows = 2
152 };
153 };
154
155template <typename T, precision P>
156struct type<tmat3x3, T, P>
157 {
158static bool const is_vec = false;
159static bool const is_mat = true;
160static bool const is_quat = false;
161enum
162 {
163 components = 3,
164 cols = 3,
165 rows = 3
166 };
167 };
168
169template <typename T, precision P>
170struct type<tmat3x4, T, P>
171 {
172static bool const is_vec = false;
173static bool const is_mat = true;
174static bool const is_quat = false;
175enum
176 {
177 components = 3,
178 cols = 3,
179 rows = 4
180 };
181 };
182
183template <typename T, precision P>
184struct type<tmat4x2, T, P>
185 {
186static bool const is_vec = false;
187static bool const is_mat = true;
188static bool const is_quat = false;
189enum
190 {
191 components = 4,
192 cols = 4,
193 rows = 2
194 };
195 };
196
197template <typename T, precision P>
198struct type<tmat4x3, T, P>
199 {
200static bool const is_vec = false;
201static bool const is_mat = true;
202static bool const is_quat = false;
203enum
204 {
205 components = 4,
206 cols = 4,
207 rows = 3
208 };
209 };
210
211template <typename T, precision P>
212struct type<tmat4x4, T, P>
213 {
214static bool const is_vec = false;
215static bool const is_mat = true;
216static bool const is_quat = false;
217enum
218 {
219 components = 4,
220 cols = 4,
221 rows = 4
222 };
223 };
224
225template <typename T, precision P>
226struct type<tquat, T, P>
227 {
228static bool const is_vec = false;
229static bool const is_mat = false;
230static bool const is_quat = true;
231enum
232 {
233 components = 4
234 };
235 };
236
237template <typename T, precision P>
238struct type<tdualquat, T, P>
239 {
240static bool const is_vec = false;
241static bool const is_mat = false;
242static bool const is_quat = true;
243enum
244 {
245 components = 8
246 };
247 };
248
250 }//namespace glm
251
252 #include "type_trait.inl"
Definition: _noise.hpp:11
Generated by 1.8.10