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_mat3x4.hpp
25
/// @date 2006-08-05 / 2011-06-15
26
/// @author Christophe Riccio
27
///////////////////////////////////////////////////////////////////////////////////
29
#ifndef glm_core_type_mat3x4
30
#define glm_core_type_mat3x4
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 3 columns and 4 rows matrix of floating-point numbers.
52
// \ingroup core_template
58
typedef std::size_t size_type;
59
typedef tvec4<T> col_type;
60
typedef tvec3<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 tmat3x4<T> type;
66
typedef tmat4x3<T> transpose_type;
74
GLM_FUNC_DECL tmat3x4();
75
GLM_FUNC_DECL tmat3x4(tmat3x4 const & m);
77
GLM_FUNC_DECL explicit tmat3x4(
79
GLM_FUNC_DECL explicit tmat3x4(
80
value_type const & s);
81
GLM_FUNC_DECL explicit tmat3x4(
82
value_type const & x0, value_type const & y0, value_type const & z0, value_type const & w0,
83
value_type const & x1, value_type const & y1, value_type const & z1, value_type const & w1,
84
value_type const & x2, value_type const & y2, value_type const & z2, value_type const & w2);
85
GLM_FUNC_DECL explicit tmat3x4(
90
//////////////////////////////////////
93
GLM_FUNC_DECL explicit tmat3x4(
98
typename X1, typename Y1, typename Z1, typename W1,
99
typename X2, typename Y2, typename Z2, typename W2,
100
typename X3, typename Y3, typename Z3, typename W3
102
GLM_FUNC_DECL explicit tmat3x4(
103
X1 const & x1, Y1 const & y1, Z1 const & z1, W1 const & w1,
104
X2 const & x2, Y2 const & y2, Z2 const & z2, W2 const & w2,
105
X3 const & x3, Y3 const & y3, Z3 const & z3, W3 const & w3);
107
template <typename V1, typename V2, typename V3>
108
GLM_FUNC_DECL explicit tmat3x4(
109
tvec4<V1> const & v1,
110
tvec4<V2> const & v2,
111
tvec4<V3> const & v3);
114
template <typename U>
115
GLM_FUNC_DECL explicit tmat3x4(tmat3x4<U> const & m);
117
GLM_FUNC_DECL explicit tmat3x4(tmat2x2<T> const & x);
118
GLM_FUNC_DECL explicit tmat3x4(tmat3x3<T> const & x);
119
GLM_FUNC_DECL explicit tmat3x4(tmat4x4<T> const & x);
120
GLM_FUNC_DECL explicit tmat3x4(tmat2x3<T> const & x);
121
GLM_FUNC_DECL explicit tmat3x4(tmat3x2<T> const & x);
122
GLM_FUNC_DECL explicit tmat3x4(tmat2x4<T> const & x);
123
GLM_FUNC_DECL explicit tmat3x4(tmat4x2<T> const & x);
124
GLM_FUNC_DECL explicit tmat3x4(tmat4x3<T> const & x);
127
col_type & operator[](size_type i);
128
col_type const & operator[](size_type i) const;
130
// Unary updatable operators
131
GLM_FUNC_DECL tmat3x4<T> & operator= (tmat3x4<T> const & m);
132
template <typename U>
133
GLM_FUNC_DECL tmat3x4<T> & operator= (tmat3x4<U> const & m);
134
template <typename U>
135
GLM_FUNC_DECL tmat3x4<T> & operator+= (U const & s);
136
template <typename U>
137
GLM_FUNC_DECL tmat3x4<T> & operator+= (tmat3x4<U> const & m);
138
template <typename U>
139
GLM_FUNC_DECL tmat3x4<T> & operator-= (U const & s);
140
template <typename U>
141
GLM_FUNC_DECL tmat3x4<T> & operator-= (tmat3x4<U> const & m);
142
template <typename U>
143
GLM_FUNC_DECL tmat3x4<T> & operator*= (U const & s);
144
template <typename U>
145
GLM_FUNC_DECL tmat3x4<T> & operator*= (tmat3x4<U> const & m);
146
template <typename U>
147
GLM_FUNC_DECL tmat3x4<T> & operator/= (U const & s);
149
GLM_FUNC_DECL tmat3x4<T> & operator++ ();
150
GLM_FUNC_DECL tmat3x4<T> & operator-- ();
154
template <typename T>
155
tmat3x4<T> operator+ (
156
tmat3x4<T> const & m,
157
typename tmat3x4<T>::value_type const & s);
159
template <typename T>
160
tmat3x4<T> operator+ (
161
tmat3x4<T> const & m1,
162
tmat3x4<T> const & m2);
164
template <typename T>
165
tmat3x4<T> operator- (
166
tmat3x4<T> const & m,
167
typename tmat3x4<T>::value_type const & s);
169
template <typename T>
170
tmat3x4<T> operator- (
171
tmat3x4<T> const & m1,
172
tmat3x4<T> const & m2);
174
template <typename T>
175
tmat3x4<T> operator* (
176
tmat3x4<T> const & m,
177
typename tmat3x4<T>::value_type const & s);
179
template <typename T>
180
tmat3x4<T> operator* (
181
typename tmat3x4<T>::value_type const & s,
182
tmat3x4<T> const & m);
184
template <typename T>
185
typename tmat3x4<T>::col_type operator* (
186
tmat3x4<T> const & m,
187
typename tmat3x4<T>::row_type const & v);
189
template <typename T>
190
typename tmat3x4<T>::row_type operator* (
191
typename tmat3x4<T>::col_type const & v,
192
tmat3x4<T> const & m);
194
template <typename T>
195
tmat4x4<T> operator* (
196
tmat3x4<T> const & m1,
197
tmat4x3<T> const & m2);
199
template <typename T>
200
tmat2x4<T> operator* (
201
tmat3x4<T> const & m1,
202
tmat2x3<T> const & m2);
204
template <typename T>
205
tmat3x4<T> operator* (
206
tmat3x4<T> const & m1,
207
tmat3x3<T> const & m2);
209
template <typename T>
210
tmat3x4<T> operator/ (
211
tmat3x4<T> const & m,
212
typename tmat3x4<T>::value_type const & s);
214
template <typename T>
215
tmat3x4<T> operator/ (
216
typename tmat3x4<T>::value_type const & s,
217
tmat3x4<T> const & m);
219
// Unary constant operators
220
template <typename T>
221
tmat3x4<T> const operator- (
222
tmat3x4<T> const & m);
224
template <typename T>
225
tmat3x4<T> const operator-- (
226
tmat3x4<T> const & m,
229
template <typename T>
230
tmat3x4<T> const operator++ (
231
tmat3x4<T> const & m,
236
/// @addtogroup core_precision
239
/// 3 columns of 4 components matrix of low precision floating-point numbers.
240
/// There is no guarantee on the actual precision.
242
/// @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>
243
/// @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>
244
typedef detail::tmat3x4<lowp_float> lowp_mat3x4;
246
/// 3 columns of 4 components matrix of medium precision floating-point numbers.
247
/// There is no guarantee on the actual precision.
249
/// @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>
250
/// @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>
251
typedef detail::tmat3x4<mediump_float> mediump_mat3x4;
253
/// 3 columns of 4 components matrix of high precision floating-point numbers.
254
/// There is no guarantee on the actual precision.
256
/// @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>
257
/// @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>
258
typedef detail::tmat3x4<highp_float> highp_mat3x4;
263
#ifndef GLM_EXTERNAL_TEMPLATE
264
#include "type_mat3x4.inl"
267
#endif //glm_core_type_mat3x4