- Main Page
- Related Pages
- Modules
- Files

- File List

type_mat2x4.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_mat2x4
30 #define glm_core_type_mat2x4
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 tmat2x4
53 {
54 enum ctor{null};
55 typedef T value_type;
56 typedef std::size_t size_type;
57 typedef tvec4<T> col_type;
58 typedef tvec2<T> row_type;
59 typedef tmat2x4<T> type;
60 typedef tmat4x2<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 private:
68 // Data
69 col_type value[2];
70
71 public:
72 // Constructors
73 GLM_FUNC_DECL tmat2x4();
74 GLM_FUNC_DECL tmat2x4(tmat2x4 const & m);
75
76 GLM_FUNC_DECL explicit tmat2x4(
77 ctor);
78 GLM_FUNC_DECL explicit tmat2x4(
79 value_type const & s);
80 GLM_FUNC_DECL explicit tmat2x4(
81 value_type const & x0, value_type const & y0, value_type const & z0, value_type const & w0,
82 value_type const & x1, value_type const & y1, value_type const & z1, value_type const & w1);
83 GLM_FUNC_DECL explicit tmat2x4(
84 col_type const & v0,
85 col_type const & v1);
86
88 // Conversions
89 template <typename U>
90 GLM_FUNC_DECL explicit tmat2x4(
91 U const & x);
92
93 template <
94 typename X1, typename Y1, typename Z1, typename W1,
95 typename X2, typename Y2, typename Z2, typename W2>
96 GLM_FUNC_DECL explicit tmat2x4(
97 X1 const & x1, Y1 const & y1, Z1 const & z1, W1 const & w1,
98 X2 const & x2, Y2 const & y2, Z2 const & z2, W2 const & w2);
99
100 template <typename U, typename V>
101 GLM_FUNC_DECL explicit tmat2x4(
102 tvec4<U> const & v1,
103 tvec4<V> const & v2);
104
106 // Matrix conversions
107 template <typename U>
108 GLM_FUNC_DECL explicit tmat2x4(tmat2x4<U> const & m);
109
110 GLM_FUNC_DECL explicit tmat2x4(tmat2x2<T> const & x);
111 GLM_FUNC_DECL explicit tmat2x4(tmat3x3<T> const & x);
112 GLM_FUNC_DECL explicit tmat2x4(tmat4x4<T> const & x);
113 GLM_FUNC_DECL explicit tmat2x4(tmat2x3<T> const & x);
114 GLM_FUNC_DECL explicit tmat2x4(tmat3x2<T> const & x);
115 GLM_FUNC_DECL explicit tmat2x4(tmat3x4<T> const & x);
116 GLM_FUNC_DECL explicit tmat2x4(tmat4x2<T> const & x);
117 GLM_FUNC_DECL explicit tmat2x4(tmat4x3<T> const & x);
118
119 // Accesses
120 GLM_FUNC_DECL col_type & operator[](size_type i);
121 GLM_FUNC_DECL col_type const & operator[](size_type i) const;
122
123 // Unary updatable operators
124 GLM_FUNC_DECL tmat2x4<T>& operator= (tmat2x4<T> const & m);
125 template <typename U>
126 GLM_FUNC_DECL tmat2x4<T>& operator= (tmat2x4<U> const & m);
127 template <typename U>
128 GLM_FUNC_DECL tmat2x4<T>& operator+= (U const & s);
129 template <typename U>
130 GLM_FUNC_DECL tmat2x4<T>& operator+= (tmat2x4<U> const & m);
131 template <typename U>
132 GLM_FUNC_DECL tmat2x4<T>& operator-= (U const & s);
133 template <typename U>
134 GLM_FUNC_DECL tmat2x4<T>& operator-= (tmat2x4<U> const & m);
135 template <typename U>
136 GLM_FUNC_DECL tmat2x4<T>& operator*= (U const & s);
137 template <typename U>
138 GLM_FUNC_DECL tmat2x4<T>& operator*= (tmat2x4<U> const & m);
139 template <typename U>
140 GLM_FUNC_DECL tmat2x4<T>& operator/= (U const & s);
141
142 GLM_FUNC_DECL tmat2x4<T>& operator++ ();
143 GLM_FUNC_DECL tmat2x4<T>& operator-- ();
144 };
145
146 // Binary operators
147 template <typename T>
148 tmat2x4<T> operator+ (
149 tmat2x4<T> const & m,
150 typename tmat2x4<T>::value_type const & s);
151
152 template <typename T>
153 tmat2x4<T> operator+ (
154 tmat2x4<T> const & m1,
155 tmat2x4<T> const & m2);
156
157 template <typename T>
158 tmat2x4<T> operator- (
159 tmat2x4<T> const & m,
160 typename tmat2x4<T>::value_type const & s);
161
162 template <typename T>
163 tmat2x4<T> operator- (
164 tmat2x4<T> const & m1,
165 tmat2x4<T> const & m2);
166
167 template <typename T>
168 tmat2x4<T> operator* (
169 tmat2x4<T> const & m,
170 typename tmat2x4<T>::value_type const & s);
171
172 template <typename T>
173 tmat2x4<T> operator* (
174 typename tmat2x4<T>::value_type const & s,
175 tmat2x4<T> const & m);
176
177 template <typename T>
178 typename tmat2x4<T>::col_type operator* (
179 tmat2x4<T> const & m,
180 typename tmat2x4<T>::row_type const & v);
181
182 template <typename T>
183 typename tmat2x4<T>::row_type operator* (
184 typename tmat2x4<T>::col_type const & v,
185 tmat2x4<T> const & m);
186
187 template <typename T>
188 tmat4x4<T> operator* (
189 tmat2x4<T> const & m1,
190 tmat4x2<T> const & m2);
191
192 template <typename T>
193 tmat2x4<T> operator* (
194 tmat2x4<T> const & m1,
195 tmat2x2<T> const & m2);
196
197 template <typename T>
198 tmat3x4<T> operator* (
199 tmat2x4<T> const & m1,
200 tmat3x2<T> const & m2);
201
202 template <typename T>
203 tmat2x4<T> operator/ (
204 tmat2x4<T> const & m,
205 typename tmat2x4<T>::value_type const & s);
206
207 template <typename T>
208 tmat2x4<T> operator/ (
209 typename tmat2x4<T>::value_type const & s,
210 tmat2x4<T> const & m);
211
212 // Unary constant operators
213 template <typename T>
214 tmat2x4<T> const operator- (
215 tmat2x4<T> const & m);
216
217 template <typename T>
218 tmat2x4<T> const operator-- (
219 tmat2x4<T> const & m,
220 int);
221
222 template <typename T>
223 tmat2x4<T> const operator++ (
224 tmat2x4<T> const & m,
225 int);
226
227 } //namespace detail
228
231
237 typedef detail::tmat2x4<lowp_float> lowp_mat2x4;
238
244 typedef detail::tmat2x4<mediump_float> mediump_mat2x4;
245
251 typedef detail::tmat2x4<highp_float> highp_mat2x4;
252
254 }//namespace glm
255
256 #ifndef GLM_EXTERNAL_TEMPLATE
257 #include "type_mat2x4.inl"
258 #endif
259
260 #endif //glm_core_type_mat2x4