- Main Page
- Related Pages
- Modules
- Files

- File List

type_mat2x3.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_mat2x3
30 #define glm_core_type_mat2x3
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 tmat2x3
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 tvec2<T> row_type;
59 typedef tmat2x3<T> type;
60 typedef tmat3x2<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 tmat2x3();
74 GLM_FUNC_DECL tmat2x3(tmat2x3 const & m);
75
76 GLM_FUNC_DECL explicit tmat2x3(
77 ctor);
78 GLM_FUNC_DECL explicit tmat2x3(
79 value_type const & s);
80 GLM_FUNC_DECL explicit tmat2x3(
81 value_type const & x0, value_type const & y0, value_type const & z0,
82 value_type const & x1, value_type const & y1, value_type const & z1);
83 GLM_FUNC_DECL explicit tmat2x3(
84 col_type const & v0,
85 col_type const & v1);
86
88 // Conversions
89 template <typename U>
90 GLM_FUNC_DECL explicit tmat2x3(
91 U const & x);
92
93 template <typename X1, typename Y1, typename Z1, typename X2, typename Y2, typename Z2>
94 GLM_FUNC_DECL explicit tmat2x3(
95 X1 const & x1, Y1 const & y1, Z1 const & z1,
96 X2 const & x2, Y2 const & y2, Z2 const & z2);
97
98 template <typename U, typename V>
99 GLM_FUNC_DECL explicit tmat2x3(
100 tvec3<U> const & v1,
101 tvec3<V> const & v2);
102
104 // Matrix conversion
105 template <typename U>
106 GLM_FUNC_DECL explicit tmat2x3(tmat2x3<U> const & m);
107
108 GLM_FUNC_DECL explicit tmat2x3(tmat2x2<T> const & x);
109 GLM_FUNC_DECL explicit tmat2x3(tmat3x3<T> const & x);
110 GLM_FUNC_DECL explicit tmat2x3(tmat4x4<T> const & x);
111 GLM_FUNC_DECL explicit tmat2x3(tmat2x4<T> const & x);
112 GLM_FUNC_DECL explicit tmat2x3(tmat3x2<T> const & x);
113 GLM_FUNC_DECL explicit tmat2x3(tmat3x4<T> const & x);
114 GLM_FUNC_DECL explicit tmat2x3(tmat4x2<T> const & x);
115 GLM_FUNC_DECL explicit tmat2x3(tmat4x3<T> const & x);
116
117 // Accesses
118 col_type & operator[](size_type i);
119 col_type const & operator[](size_type i) const;
120
121 // Unary updatable operators
122 GLM_FUNC_DECL tmat2x3<T> & operator= (tmat2x3<T> const & m);
123 template <typename U>
124 GLM_FUNC_DECL tmat2x3<T> & operator= (tmat2x3<U> const & m);
125 template <typename U>
126 GLM_FUNC_DECL tmat2x3<T> & operator+= (U const & s);
127 template <typename U>
128 GLM_FUNC_DECL tmat2x3<T> & operator+= (tmat2x3<U> const & m);
129 template <typename U>
130 GLM_FUNC_DECL tmat2x3<T> & operator-= (U const & s);
131 template <typename U>
132 GLM_FUNC_DECL tmat2x3<T> & operator-= (tmat2x3<U> const & m);
133 template <typename U>
134 GLM_FUNC_DECL tmat2x3<T> & operator*= (U const & s);
135 template <typename U>
136 GLM_FUNC_DECL tmat2x3<T> & operator*= (tmat2x3<U> const & m);
137 template <typename U>
138 GLM_FUNC_DECL tmat2x3<T> & operator/= (U const & s);
139
140 GLM_FUNC_DECL tmat2x3<T> & operator++ ();
141 GLM_FUNC_DECL tmat2x3<T> & operator-- ();
142 };
143
144 // Binary operators
145 template <typename T>
146 tmat2x3<T> operator+ (
147 tmat2x3<T> const & m,
148 typename tmat2x3<T>::value_type const & s);
149
150 template <typename T>
151 tmat2x3<T> operator+ (
152 tmat2x3<T> const & m1,
153 tmat2x3<T> const & m2);
154
155 template <typename T>
156 tmat2x3<T> operator- (
157 tmat2x3<T> const & m,
158 typename tmat2x3<T>::value_type const & s);
159
160 template <typename T>
161 tmat2x3<T> operator- (
162 tmat2x3<T> const & m1,
163 tmat2x3<T> const & m2);
164
165 template <typename T>
166 tmat2x3<T> operator* (
167 tmat2x3<T> const & m,
168 typename tmat2x3<T>::value_type const & s);
169
170 template <typename T>
171 tmat2x3<T> operator* (
172 typename tmat2x3<T>::value_type const & s,
173 tmat2x3<T> const & m);
174
175 template <typename T>
176 typename tmat2x3<T>::col_type operator* (
177 tmat2x3<T> const & m,
178 typename tmat2x3<T>::row_type const & v);
179
180 template <typename T>
181 typename tmat2x3<T>::row_type operator* (
182 typename tmat2x3<T>::col_type const & v,
183 tmat2x3<T> const & m);
184
185 template <typename T>
186 tmat2x3<T> operator* (
187 tmat2x3<T> const & m1,
188 tmat2x2<T> const & m2);
189
190 template <typename T>
191 tmat3x3<T> operator* (
192 tmat2x3<T> const & m1,
193 tmat3x2<T> const & m2);
194
195 template <typename T>
196 tmat4x3<T> operator* (
197 tmat2x3<T> const & m1,
198 tmat4x2<T> const & m2);
199
200 template <typename T>
201 tmat2x3<T> operator/ (
202 tmat2x3<T> const & m,
203 typename tmat2x3<T>::value_type const & s);
204
205 template <typename T>
206 tmat2x3<T> operator/ (
207 typename tmat2x3<T>::value_type const & s,
208 tmat2x3<T> const & m);
209
210 // Unary constant operators
211 template <typename T>
212 tmat2x3<T> const operator- (
213 tmat2x3<T> const & m);
214
215 template <typename T>
216 tmat2x3<T> const operator-- (
217 tmat2x3<T> const & m,
218 int);
219
220 template <typename T>
221 tmat2x3<T> const operator++ (
222 tmat2x3<T> const & m,
223 int);
224
225 } //namespace detail
226
229
235 typedef detail::tmat2x3<lowp_float> lowp_mat2x3;
236
242 typedef detail::tmat2x3<mediump_float> mediump_mat2x3;
243
249 typedef detail::tmat2x3<highp_float> highp_mat2x3;
250
252 }//namespace glm
253
254 #ifndef GLM_EXTERNAL_TEMPLATE
255 #include "type_mat2x3.inl"
256 #endif
257
258 #endif //glm_core_type_mat2x3