- Main Page
- Related Pages
- Modules
- Files

- File List

type_mat3x3.hpp
Go to the documentation of this file.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29 #ifndef glm_core_type_mat3x3
30 #define glm_core_type_mat3x3
31
32 #include "type_mat.hpp"
33
34 namespace glm{
35 namespace detail
36 {
37 template <typename T> struct tvec1;
38 template <typename T> struct tvec2;
39 template <typename T> struct tvec3;
40 template <typename T> struct tvec4;
41 template <typename T> struct tmat2x2;
42 template <typename T> struct tmat2x3;
43 template <typename T> struct tmat2x4;
44 template <typename T> struct tmat3x2;
45 template <typename T> struct tmat3x3;
46 template <typename T> struct tmat3x4;
47 template <typename T> struct tmat4x2;
48 template <typename T> struct tmat4x3;
49 template <typename T> struct tmat4x4;
50
51 template <typename T>
52 struct tmat3x3
53 {
54 enum ctor{null};
55 typedef T value_type;
56 typedef std::size_t size_type;
57 typedef tvec3<T> col_type;
58 typedef tvec3<T> row_type;
59 typedef tmat3x3<T> type;
60 typedef tmat3x3<T> transpose_type;
61
62 static GLM_FUNC_DECL size_type col_size();
63 static GLM_FUNC_DECL size_type row_size();
64
65 GLM_FUNC_DECL GLM_CONSTEXPR size_type length() const;
66
67 public:
70 GLM_FUNC_DECL tmat3x3<T> _inverse() const;
72
73 private:
74 // Data
75 col_type value[3];
76
77 public:
78 // Constructors
79 GLM_FUNC_DECL tmat3x3();
80 GLM_FUNC_DECL tmat3x3(tmat3x3 const & m);
81
82 GLM_FUNC_DECL explicit tmat3x3(
83 ctor Null);
84 GLM_FUNC_DECL explicit tmat3x3(
85 value_type const & s);
86 GLM_FUNC_DECL explicit tmat3x3(
87 value_type const & x0, value_type const & y0, value_type const & z0,
88 value_type const & x1, value_type const & y1, value_type const & z1,
89 value_type const & x2, value_type const & y2, value_type const & z2);
90 GLM_FUNC_DECL explicit tmat3x3(
91 col_type const & v0,
92 col_type const & v1,
93 col_type const & v2);
94
96 // Conversions
97 template <typename U>
98 GLM_FUNC_DECL explicit tmat3x3(
99 U const & x);
100
101 template
102 <
103 typename X1, typename Y1, typename Z1,
104 typename X2, typename Y2, typename Z2,
105 typename X3, typename Y3, typename Z3
106 >
107 GLM_FUNC_DECL explicit tmat3x3(
108 X1 const & x1, Y1 const & y1, Z1 const & z1,
109 X2 const & x2, Y2 const & y2, Z2 const & z2,
110 X3 const & x3, Y3 const & y3, Z3 const & z3);
111
112 template <typename V1, typename V2, typename V3>
113 GLM_FUNC_DECL explicit tmat3x3(
114 tvec3<V1> const & v1,
115 tvec3<V2> const & v2,
116 tvec3<V3> const & v3);
117
118 // Matrix conversions
119 template <typename U>
120 GLM_FUNC_DECL explicit tmat3x3(tmat3x3<U> const & m);
121
122 GLM_FUNC_DECL explicit tmat3x3(tmat2x2<T> const & x);
123 GLM_FUNC_DECL explicit tmat3x3(tmat4x4<T> const & x);
124 GLM_FUNC_DECL explicit tmat3x3(tmat2x3<T> const & x);
125 GLM_FUNC_DECL explicit tmat3x3(tmat3x2<T> const & x);
126 GLM_FUNC_DECL explicit tmat3x3(tmat2x4<T> const & x);
127 GLM_FUNC_DECL explicit tmat3x3(tmat4x2<T> const & x);
128 GLM_FUNC_DECL explicit tmat3x3(tmat3x4<T> const & x);
129 GLM_FUNC_DECL explicit tmat3x3(tmat4x3<T> const & x);
130
131 // Accesses
132 GLM_FUNC_DECL col_type & operator[](size_type i);
133 GLM_FUNC_DECL col_type const & operator[](size_type i) const;
134
135 // Unary updatable operators
136 GLM_FUNC_DECL tmat3x3<T>& operator= (tmat3x3<T> const & m);
137 template <typename U>
138 GLM_FUNC_DECL tmat3x3<T>& operator= (tmat3x3<U> const & m);
139 template <typename U>
140 GLM_FUNC_DECL tmat3x3<T>& operator+= (U const & s);
141 template <typename U>
142 GLM_FUNC_DECL tmat3x3<T>& operator+= (tmat3x3<U> const & m);
143 template <typename U>
144 GLM_FUNC_DECL tmat3x3<T>& operator-= (U const & s);
145 template <typename U>
146 GLM_FUNC_DECL tmat3x3<T>& operator-= (tmat3x3<U> const & m);
147 template <typename U>
148 GLM_FUNC_DECL tmat3x3<T>& operator*= (U const & s);
149 template <typename U>
150 GLM_FUNC_DECL tmat3x3<T>& operator*= (tmat3x3<U> const & m);
151 template <typename U>
152 GLM_FUNC_DECL tmat3x3<T>& operator/= (U const & s);
153 template <typename U>
154 GLM_FUNC_DECL tmat3x3<T>& operator/= (tmat3x3<U> const & m);
155 GLM_FUNC_DECL tmat3x3<T>& operator++ ();
156 GLM_FUNC_DECL tmat3x3<T>& operator-- ();
157 };
158
159 // Binary operators
160 template <typename T>
161 tmat3x3<T> operator+ (
162 tmat3x3<T> const & m,
163 typename tmat3x3<T>::value_type const & s);
164
165 template <typename T>
166 tmat3x3<T> operator+ (
167 typename tmat3x3<T>::value_type const & s,
168 tmat3x3<T> const & m);
169
170 template <typename T>
171 tmat3x3<T> operator+ (
172 tmat3x3<T> const & m1,
173 tmat3x3<T> const & m2);
174
175 template <typename T>
176 tmat3x3<T> operator- (
177 tmat3x3<T> const & m,
178 typename tmat3x3<T>::value_type const & s);
179
180 template <typename T>
181 tmat3x3<T> operator- (
182 typename tmat3x3<T>::value_type const & s,
183 tmat3x3<T> const & m);
184
185 template <typename T>
186 tmat3x3<T> operator- (
187 tmat3x3<T> const & m1,
188 tmat3x3<T> const & m2);
189
190 template <typename T>
191 tmat3x3<T> operator* (
192 tmat3x3<T> const & m,
193 typename tmat3x3<T>::value_type const & s);
194
195 template <typename T>
196 tmat3x3<T> operator* (
197 typename tmat3x3<T>::value_type const & s,
198 tmat3x3<T> const & m);
199
200 template <typename T>
201 typename tmat3x3<T>::col_type operator* (
202 tmat3x3<T> const & m,
203 typename tmat3x3<T>::row_type const & v);
204
205 template <typename T>
206 typename tmat3x3<T>::row_type operator* (
207 typename tmat3x3<T>::col_type const & v,
208 tmat3x3<T> const & m);
209
210 template <typename T>
211 tmat3x3<T> operator* (
212 tmat3x3<T> const & m1,
213 tmat3x3<T> const & m2);
214
215 template <typename T>
216 tmat2x3<T> operator* (
217 tmat3x3<T> const & m1,
218 tmat2x3<T> const & m2);
219
220 template <typename T>
221 tmat4x3<T> operator* (
222 tmat3x3<T> const & m1,
223 tmat4x3<T> const & m2);
224
225 template <typename T>
226 tmat3x3<T> operator/ (
227 tmat3x3<T> const & m,
228 typename tmat3x3<T>::value_type const & s);
229
230 template <typename T>
231 tmat3x3<T> operator/ (
232 typename tmat3x3<T>::value_type const & s,
233 tmat3x3<T> const & m);
234
235 template <typename T>
236 typename tmat3x3<T>::col_type operator/ (
237 tmat3x3<T> const & m,
238 typename tmat3x3<T>::row_type const & v);
239
240 template <typename T>
241 typename tmat3x3<T>::row_type operator/ (
242 typename tmat3x3<T>::col_type const & v,
243 tmat3x3<T> const & m);
244
245 template <typename T>
246 tmat3x3<T> operator/ (
247 tmat3x3<T> const & m1,
248 tmat3x3<T> const & m2);
249
250 // Unary constant operators
251 template <typename T>
252 tmat3x3<T> const operator- (
253 tmat3x3<T> const & m);
254
255 template <typename T>
256 tmat3x3<T> const operator-- (
257 tmat3x3<T> const & m,
258 int);
259
260 template <typename T>
261 tmat3x3<T> const operator++ (
262 tmat3x3<T> const & m,
263 int);
264 } //namespace detail
265
268
274 typedef detail::tmat3x3<lowp_float> lowp_mat3;
275
281 typedef detail::tmat3x3<mediump_float> mediump_mat3;
282
288 typedef detail::tmat3x3<highp_float> highp_mat3;
289
295 typedef detail::tmat3x3<lowp_float> lowp_mat3x3;
296
302 typedef detail::tmat3x3<mediump_float> mediump_mat3x3;
303
309 typedef detail::tmat3x3<highp_float> highp_mat3x3;
310
312 }//namespace glm
313
314 #ifndef GLM_EXTERNAL_TEMPLATE
315 #include "type_mat3x3.inl"
316 #endif
317
318 #endif //glm_core_type_mat3x3