1
///////////////////////////////////////////////////////////////////////////////////
2
/// OpenGL Mathematics (glm.g-truc.net)
4
/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net)
5
/// Permission is hereby granted, free of charge, to any person obtaining a copy
6
/// of this software and associated documentation files (the "Software"), to deal
7
/// in the Software without restriction, including without limitation the rights
8
/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
/// copies of the Software, and to permit persons to whom the Software is
10
/// furnished to do so, subject to the following conditions:
12
/// The above copyright notice and this permission notice shall be included in
13
/// all copies or substantial portions of the Software.
15
/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24
/// @file glm/core/type_mat2x3.hpp
25
/// @date 2006-10-01 / 2011-06-15
26
/// @author Christophe Riccio
27
///////////////////////////////////////////////////////////////////////////////////
29
#ifndef glm_core_type_mat2x3
30
#define glm_core_type_mat2x3
32
#include "type_mat.hpp"
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;
51
// \brief Template for 2 columns and 3 rows matrix of floating-point numbers.
52
// \ingroup core_template
58
typedef std::size_t size_type;
59
typedef tvec3<T> col_type;
60
typedef tvec2<T> row_type;
61
GLM_FUNC_DECL size_type length() const;
62
static GLM_FUNC_DECL size_type col_size();
63
static GLM_FUNC_DECL size_type row_size();
65
typedef tmat2x3<T> type;
66
typedef tmat3x2<T> transpose_type;
74
GLM_FUNC_DECL tmat2x3();
75
GLM_FUNC_DECL tmat2x3(tmat2x3 const & m);
77
GLM_FUNC_DECL explicit tmat2x3(
79
GLM_FUNC_DECL explicit tmat2x3(
80
value_type const & s);
81
GLM_FUNC_DECL explicit tmat2x3(
82
value_type const & x0, value_type const & y0, value_type const & z0,
83
value_type const & x1, value_type const & y1, value_type const & z1);
84
GLM_FUNC_DECL explicit tmat2x3(
88
//////////////////////////////////////
91
GLM_FUNC_DECL explicit tmat2x3(
94
template <typename X1, typename Y1, typename Z1, typename X2, typename Y2, typename Z2>
95
GLM_FUNC_DECL explicit tmat2x3(
96
X1 const & x1, Y1 const & y1, Z1 const & z1,
97
X2 const & x2, Y2 const & y2, Z2 const & z2);
99
template <typename U, typename V>
100
GLM_FUNC_DECL explicit tmat2x3(
102
tvec3<V> const & v2);
104
//////////////////////////////////////
106
template <typename U>
107
GLM_FUNC_DECL explicit tmat2x3(tmat2x3<U> const & m);
109
GLM_FUNC_DECL explicit tmat2x3(tmat2x2<T> const & x);
110
GLM_FUNC_DECL explicit tmat2x3(tmat3x3<T> const & x);
111
GLM_FUNC_DECL explicit tmat2x3(tmat4x4<T> const & x);
112
GLM_FUNC_DECL explicit tmat2x3(tmat2x4<T> const & x);
113
GLM_FUNC_DECL explicit tmat2x3(tmat3x2<T> const & x);
114
GLM_FUNC_DECL explicit tmat2x3(tmat3x4<T> const & x);
115
GLM_FUNC_DECL explicit tmat2x3(tmat4x2<T> const & x);
116
GLM_FUNC_DECL explicit tmat2x3(tmat4x3<T> const & x);
119
col_type & operator[](size_type i);
120
col_type const & operator[](size_type i) const;
122
// Unary updatable operators
123
GLM_FUNC_DECL tmat2x3<T> & operator= (tmat2x3<T> const & m);
124
template <typename U>
125
GLM_FUNC_DECL tmat2x3<T> & operator= (tmat2x3<U> const & m);
126
template <typename U>
127
GLM_FUNC_DECL tmat2x3<T> & operator+= (U const & s);
128
template <typename U>
129
GLM_FUNC_DECL tmat2x3<T> & operator+= (tmat2x3<U> const & m);
130
template <typename U>
131
GLM_FUNC_DECL tmat2x3<T> & operator-= (U const & s);
132
template <typename U>
133
GLM_FUNC_DECL tmat2x3<T> & operator-= (tmat2x3<U> const & m);
134
template <typename U>
135
GLM_FUNC_DECL tmat2x3<T> & operator*= (U const & s);
136
template <typename U>
137
GLM_FUNC_DECL tmat2x3<T> & operator*= (tmat2x3<U> const & m);
138
template <typename U>
139
GLM_FUNC_DECL tmat2x3<T> & operator/= (U const & s);
141
GLM_FUNC_DECL tmat2x3<T> & operator++ ();
142
GLM_FUNC_DECL tmat2x3<T> & operator-- ();
146
template <typename T>
147
tmat2x3<T> operator+ (
148
tmat2x3<T> const & m,
149
typename tmat2x3<T>::value_type const & s);
151
template <typename T>
152
tmat2x3<T> operator+ (
153
tmat2x3<T> const & m1,
154
tmat2x3<T> const & m2);
156
template <typename T>
157
tmat2x3<T> operator- (
158
tmat2x3<T> const & m,
159
typename tmat2x3<T>::value_type const & s);
161
template <typename T>
162
tmat2x3<T> operator- (
163
tmat2x3<T> const & m1,
164
tmat2x3<T> const & m2);
166
template <typename T>
167
tmat2x3<T> operator* (
168
tmat2x3<T> const & m,
169
typename tmat2x3<T>::value_type const & s);
171
template <typename T>
172
tmat2x3<T> operator* (
173
typename tmat2x3<T>::value_type const & s,
174
tmat2x3<T> const & m);
176
template <typename T>
177
typename tmat2x3<T>::col_type operator* (
178
tmat2x3<T> const & m,
179
typename tmat2x3<T>::row_type const & v);
181
template <typename T>
182
typename tmat2x3<T>::row_type operator* (
183
typename tmat2x3<T>::col_type const & v,
184
tmat2x3<T> const & m);
186
template <typename T>
187
tmat2x3<T> operator* (
188
tmat2x3<T> const & m1,
189
tmat2x2<T> const & m2);
191
template <typename T>
192
tmat3x3<T> operator* (
193
tmat2x3<T> const & m1,
194
tmat3x2<T> const & m2);
196
template <typename T>
197
tmat4x3<T> operator* (
198
tmat2x3<T> const & m1,
199
tmat4x2<T> const & m2);
201
template <typename T>
202
tmat2x3<T> operator/ (
203
tmat2x3<T> const & m,
204
typename tmat2x3<T>::value_type const & s);
206
template <typename T>
207
tmat2x3<T> operator/ (
208
typename tmat2x3<T>::value_type const & s,
209
tmat2x3<T> const & m);
211
// Unary constant operators
212
template <typename T>
213
tmat2x3<T> const operator- (
214
tmat2x3<T> const & m);
216
template <typename T>
217
tmat2x3<T> const operator-- (
218
tmat2x3<T> const & m,
221
template <typename T>
222
tmat2x3<T> const operator++ (
223
tmat2x3<T> const & m,
228
/// @addtogroup core_precision
231
/// 2 columns of 3 components matrix of low precision floating-point numbers.
232
/// There is no guarantee on the actual precision.
234
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
235
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
236
typedef detail::tmat2x3<lowp_float> lowp_mat2x3;
238
/// 2 columns of 3 components matrix of medium precision floating-point numbers.
239
/// There is no guarantee on the actual precision.
241
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
242
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
243
typedef detail::tmat2x3<mediump_float> mediump_mat2x3;
245
/// 2 columns of 3 components matrix of high precision floating-point numbers.
246
/// There is no guarantee on the actual precision.
248
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
249
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
250
typedef detail::tmat2x3<highp_float> highp_mat2x3;
255
#ifndef GLM_EXTERNAL_TEMPLATE
256
#include "type_mat2x3.inl"
259
#endif //glm_core_type_mat2x3