Flow Visualisation
type_mat4x4.hpp
Go to the documentation of this file.
1 
29 #ifndef glm_core_type_mat4x4
30 #define glm_core_type_mat4x4
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 tmat4x4
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 tvec4<T> row_type;
59  typedef tmat4x4<T> 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 tmat4x4<T> _inverse() const;
72 
73  private:
74  // Data
75  col_type value[4];
76 
77  public:
78  // Constructors
80  GLM_FUNC_DECL tmat4x4(tmat4x4 const & m);
81 
82  GLM_FUNC_DECL explicit tmat4x4(
83  ctor Null);
84  GLM_FUNC_DECL explicit tmat4x4(
85  value_type const & x);
86  GLM_FUNC_DECL explicit tmat4x4(
87  value_type const & x0, value_type const & y0, value_type const & z0, value_type const & w0,
88  value_type const & x1, value_type const & y1, value_type const & z1, value_type const & w1,
89  value_type const & x2, value_type const & y2, value_type const & z2, value_type const & w2,
90  value_type const & x3, value_type const & y3, value_type const & z3, value_type const & w3);
91  GLM_FUNC_DECL explicit tmat4x4(
92  col_type const & v0,
93  col_type const & v1,
94  col_type const & v2,
95  col_type const & v3);
96 
98  // Conversions
99  template <typename U>
100  GLM_FUNC_DECL explicit tmat4x4(
101  U const & x);
102 
103  template <
104  typename X1, typename Y1, typename Z1, typename W1,
105  typename X2, typename Y2, typename Z2, typename W2,
106  typename X3, typename Y3, typename Z3, typename W3,
107  typename X4, typename Y4, typename Z4, typename W4>
108  GLM_FUNC_DECL explicit tmat4x4(
109  X1 const & x1, Y1 const & y1, Z1 const & z1, W1 const & w1,
110  X2 const & x2, Y2 const & y2, Z2 const & z2, W2 const & w2,
111  X3 const & x3, Y3 const & y3, Z3 const & z3, W3 const & w3,
112  X4 const & x4, Y4 const & y4, Z4 const & z4, W4 const & w4);
113 
114  template <typename V1, typename V2, typename V3, typename V4>
115  GLM_FUNC_DECL explicit tmat4x4(
116  tvec4<V1> const & v1,
117  tvec4<V2> const & v2,
118  tvec4<V3> const & v3,
119  tvec4<V4> const & v4);
120 
121  // Matrix conversions
122  template <typename U>
123  GLM_FUNC_DECL explicit tmat4x4(tmat4x4<U> const & m);
124 
125  GLM_FUNC_DECL explicit tmat4x4(tmat2x2<T> const & x);
126  GLM_FUNC_DECL explicit tmat4x4(tmat3x3<T> const & x);
127  GLM_FUNC_DECL explicit tmat4x4(tmat2x3<T> const & x);
128  GLM_FUNC_DECL explicit tmat4x4(tmat3x2<T> const & x);
129  GLM_FUNC_DECL explicit tmat4x4(tmat2x4<T> const & x);
130  GLM_FUNC_DECL explicit tmat4x4(tmat4x2<T> const & x);
131  GLM_FUNC_DECL explicit tmat4x4(tmat3x4<T> const & x);
132  GLM_FUNC_DECL explicit tmat4x4(tmat4x3<T> const & x);
133 
134  // Accesses
135  GLM_FUNC_DECL col_type & operator[](size_type i);
136  GLM_FUNC_DECL col_type const & operator[](size_type i) const;
137 
138  // Unary updatable operators
140  template <typename U>
142  template <typename U>
143  GLM_FUNC_DECL tmat4x4<T> & operator+= (U const & s);
144  template <typename U>
146  template <typename U>
147  GLM_FUNC_DECL tmat4x4<T> & operator-= (U const & s);
148  template <typename U>
150  template <typename U>
151  GLM_FUNC_DECL tmat4x4<T> & operator*= (U const & s);
152  template <typename U>
154  template <typename U>
155  GLM_FUNC_DECL tmat4x4<T> & operator/= (U const & s);
156  template <typename U>
160  };
161 
162  // Binary operators
163  template <typename T>
165  tmat4x4<T> const & m,
166  typename tmat4x4<T>::value_type const & s);
167 
168  template <typename T>
170  typename tmat4x4<T>::value_type const & s,
171  tmat4x4<T> const & m);
172 
173  template <typename T>
175  tmat4x4<T> const & m1,
176  tmat4x4<T> const & m2);
177 
178  template <typename T>
180  tmat4x4<T> const & m,
181  typename tmat4x4<T>::value_type const & s);
182 
183  template <typename T>
185  typename tmat4x4<T>::value_type const & s,
186  tmat4x4<T> const & m);
187 
188  template <typename T>
190  tmat4x4<T> const & m1,
191  tmat4x4<T> const & m2);
192 
193  template <typename T>
195  tmat4x4<T> const & m,
196  typename tmat4x4<T>::value_type const & s);
197 
198  template <typename T>
200  typename tmat4x4<T>::value_type const & s,
201  tmat4x4<T> const & m);
202 
203  template <typename T>
205  tmat4x4<T> const & m,
206  typename tmat4x4<T>::row_type const & v);
207 
208  template <typename T>
210  typename tmat4x4<T>::col_type const & v,
211  tmat4x4<T> const & m);
212 
213  template <typename T>
215  tmat4x4<T> const & m1,
216  tmat2x4<T> const & m2);
217 
218  template <typename T>
220  tmat4x4<T> const & m1,
221  tmat3x4<T> const & m2);
222 
223  template <typename T>
225  tmat4x4<T> const & m1,
226  tmat4x4<T> const & m2);
227 
228  template <typename T>
230  tmat4x4<T> const & m,
231  typename tmat4x4<T>::value_type const & s);
232 
233  template <typename T>
235  typename tmat4x4<T>::value_type const & s,
236  tmat4x4<T> const & m);
237 
238  template <typename T>
240  tmat4x4<T> const & m,
241  typename tmat4x4<T>::row_type const & v);
242 
243  template <typename T>
245  typename tmat4x4<T>::col_type & v,
246  tmat4x4<T> const & m);
247 
248  template <typename T>
250  tmat4x4<T> const & m1,
251  tmat4x4<T> const & m2);
252 
253  // Unary constant operators
254  template <typename T>
256  tmat4x4<T> const & m);
257 
258  template <typename T>
260  tmat4x4<T> const & m, int);
261 
262  template <typename T>
264  tmat4x4<T> const & m, int);
265 
266 } //namespace detail
267 
270 
277 
284 
291 
298 
305 
312 
314 }//namespace glm
315 
316 #ifndef GLM_EXTERNAL_TEMPLATE
317 #include "type_mat4x4.inl"
318 #endif//GLM_EXTERNAL_TEMPLATE
319 
320 #endif//glm_core_type_mat4x4
detail::tmat4x4< highp_float > highp_mat4
Definition: type_mat4x4.hpp:290
GLM_FUNC_DECL half operator--(half const &s, int)
Definition: type_half.inl:356
GLM_FUNC_DECL GLM_CONSTEXPR size_type length() const
Definition: type_mat4x4.inl:33
#define GLM_CONSTEXPR
Definition: _detail.hpp:479
Definition: type_mat2x2.hpp:45
Definition: type_mat2x2.hpp:48
Definition: type_mat2x2.hpp:42
tmat4x4< T > type
Definition: type_mat4x4.hpp:59
GLM_FUNC_DECL tmat4x4< T > & operator++()
Definition: type_mat4x4.inl:480
Definition: _detail.hpp:38
tvec4< T > col_type
Definition: type_mat4x4.hpp:57
Definition: _swizzle.hpp:43
detail::tmat4x4< mediump_float > mediump_mat4x4
Definition: type_mat4x4.hpp:304
GLM_FUNC_DECL half operator+(half const &s1, half const &s2)
Definition: type_half.inl:330
GLM_FUNC_DECL tmat4x4< T > & operator*=(U const &s)
ctor
Definition: type_mat4x4.hpp:54
GLM_FUNC_DECL half operator-(half const &s1, half const &s2)
Definition: type_half.inl:335
detail::tmat4x4< highp_float > highp_mat4x4
Definition: type_mat4x4.hpp:311
static GLM_FUNC_DECL size_type row_size()
Definition: type_mat4x4.inl:45
GLM_FUNC_DECL half operator++(half const &s, int)
Definition: type_half.inl:361
GLM_FUNC_DECL tmat4x4()
Definition: type_mat4x4.inl:79
GLM_FUNC_DECL tmat4x4< T > & operator--()
Definition: type_mat4x4.inl:490
GLM_FUNC_DECL col_type & operator[](size_type i)
Definition: type_mat4x4.inl:56
detail::tmat4x4< lowp_float > lowp_mat4x4
Definition: type_mat4x4.hpp:297
detail::tmat4x4< lowp_float > lowp_mat4
Definition: type_mat4x4.hpp:276
Definition: type_mat2x2.hpp:44
tvec4< T > row_type
Definition: type_mat4x4.hpp:58
Definition: type_mat2x2.hpp:47
Definition: type_mat2x2.hpp:41
GLM_FUNC_DECL tmat4x4< T > & operator=(tmat4x4< T > const &m)
Definition: type_mat4x4.inl:346
static GLM_FUNC_DECL size_type col_size()
Definition: type_mat4x4.inl:39
GLM_FUNC_DECL half operator*(half const &s1, half const &s2)
Definition: type_half.inl:340
GLM_FUNC_DECL tmat4x4< T > & operator-=(U const &s)
GLM_FUNC_DECL tmat4x4< T > & operator/=(U const &s)
std::size_t size_type
Definition: type_mat4x4.hpp:56
Definition: type_mat2x2.hpp:40
GLM_FUNC_DECL tmat4x4< T > & operator+=(U const &s)
GLM_FUNC_DECL half operator/(half const &s1, half const &s2)
Definition: type_half.inl:345
T value_type
Definition: type_mat4x4.hpp:55
Definition: type_mat2x2.hpp:46
Definition: type_mat2x2.hpp:49
Definition: type_mat2x2.hpp:43
tmat4x4< T > transpose_type
Definition: type_mat4x4.hpp:60
#define GLM_FUNC_DECL
Definition: setup.hpp:678
detail::tmat4x4< mediump_float > mediump_mat4
Definition: type_mat4x4.hpp:283
Definition: type_mat4x4.hpp:54