PSMoveService
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  // \brief Template for 4 * 4 matrix of floating-point numbers.
52  // \ingroup core_template
53  template <typename T>
54  struct tmat4x4
55  {
56  enum ctor{null};
57  typedef T value_type;
58  typedef std::size_t size_type;
59  typedef tvec4<T> col_type;
60  typedef tvec4<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();
64 
65  typedef tmat4x4<T> type;
66  typedef tmat4x4<T> transpose_type;
67 
68  public:
71  GLM_FUNC_DECL tmat4x4<T> _inverse() const;
73 
74  private:
75  // Data
76  col_type value[4];
77 
78  public:
79  // Constructors
80  GLM_FUNC_DECL tmat4x4();
81  GLM_FUNC_DECL tmat4x4(tmat4x4 const & m);
82 
83  GLM_FUNC_DECL explicit tmat4x4(
84  ctor Null);
85  GLM_FUNC_DECL explicit tmat4x4(
86  value_type const & x);
87  GLM_FUNC_DECL explicit tmat4x4(
88  value_type const & x0, value_type const & y0, value_type const & z0, value_type const & w0,
89  value_type const & x1, value_type const & y1, value_type const & z1, value_type const & w1,
90  value_type const & x2, value_type const & y2, value_type const & z2, value_type const & w2,
91  value_type const & x3, value_type const & y3, value_type const & z3, value_type const & w3);
92  GLM_FUNC_DECL explicit tmat4x4(
93  col_type const & v0,
94  col_type const & v1,
95  col_type const & v2,
96  col_type const & v3);
97 
99  // Conversions
100  template <typename U>
101  GLM_FUNC_DECL explicit tmat4x4(
102  U const & x);
103 
104  template <
105  typename X1, typename Y1, typename Z1, typename W1,
106  typename X2, typename Y2, typename Z2, typename W2,
107  typename X3, typename Y3, typename Z3, typename W3,
108  typename X4, typename Y4, typename Z4, typename W4>
109  GLM_FUNC_DECL explicit tmat4x4(
110  X1 const & x1, Y1 const & y1, Z1 const & z1, W1 const & w1,
111  X2 const & x2, Y2 const & y2, Z2 const & z2, W2 const & w2,
112  X3 const & x3, Y3 const & y3, Z3 const & z3, W3 const & w3,
113  X4 const & x4, Y4 const & y4, Z4 const & z4, W4 const & w4);
114 
115  template <typename V1, typename V2, typename V3, typename V4>
116  GLM_FUNC_DECL explicit tmat4x4(
117  tvec4<V1> const & v1,
118  tvec4<V2> const & v2,
119  tvec4<V3> const & v3,
120  tvec4<V4> const & v4);
121 
122  // Matrix conversions
123  template <typename U>
124  GLM_FUNC_DECL explicit tmat4x4(tmat4x4<U> const & m);
125 
126  GLM_FUNC_DECL explicit tmat4x4(tmat2x2<T> const & x);
127  GLM_FUNC_DECL explicit tmat4x4(tmat3x3<T> const & x);
128  GLM_FUNC_DECL explicit tmat4x4(tmat2x3<T> const & x);
129  GLM_FUNC_DECL explicit tmat4x4(tmat3x2<T> const & x);
130  GLM_FUNC_DECL explicit tmat4x4(tmat2x4<T> const & x);
131  GLM_FUNC_DECL explicit tmat4x4(tmat4x2<T> const & x);
132  GLM_FUNC_DECL explicit tmat4x4(tmat3x4<T> const & x);
133  GLM_FUNC_DECL explicit tmat4x4(tmat4x3<T> const & x);
134 
135  // Accesses
136  GLM_FUNC_DECL col_type & operator[](size_type i);
137  GLM_FUNC_DECL col_type const & operator[](size_type i) const;
138 
139  // Unary updatable operators
140  GLM_FUNC_DECL tmat4x4<T> & operator= (tmat4x4<T> const & m);
141  template <typename U>
142  GLM_FUNC_DECL tmat4x4<T> & operator= (tmat4x4<U> const & m);
143  template <typename U>
144  GLM_FUNC_DECL tmat4x4<T> & operator+= (U const & s);
145  template <typename U>
146  GLM_FUNC_DECL tmat4x4<T> & operator+= (tmat4x4<U> const & m);
147  template <typename U>
148  GLM_FUNC_DECL tmat4x4<T> & operator-= (U const & s);
149  template <typename U>
150  GLM_FUNC_DECL tmat4x4<T> & operator-= (tmat4x4<U> const & m);
151  template <typename U>
152  GLM_FUNC_DECL tmat4x4<T> & operator*= (U const & s);
153  template <typename U>
154  GLM_FUNC_DECL tmat4x4<T> & operator*= (tmat4x4<U> const & m);
155  template <typename U>
156  GLM_FUNC_DECL tmat4x4<T> & operator/= (U const & s);
157  template <typename U>
158  GLM_FUNC_DECL tmat4x4<T> & operator/= (tmat4x4<U> const & m);
159  GLM_FUNC_DECL tmat4x4<T> & operator++ ();
160  GLM_FUNC_DECL tmat4x4<T> & operator-- ();
161  };
162 
163  // Binary operators
164  template <typename T>
165  tmat4x4<T> operator+ (
166  tmat4x4<T> const & m,
167  typename tmat4x4<T>::value_type const & s);
168 
169  template <typename T>
170  tmat4x4<T> operator+ (
171  typename tmat4x4<T>::value_type const & s,
172  tmat4x4<T> const & m);
173 
174  template <typename T>
175  tmat4x4<T> operator+ (
176  tmat4x4<T> const & m1,
177  tmat4x4<T> const & m2);
178 
179  template <typename T>
180  tmat4x4<T> operator- (
181  tmat4x4<T> const & m,
182  typename tmat4x4<T>::value_type const & s);
183 
184  template <typename T>
185  tmat4x4<T> operator- (
186  typename tmat4x4<T>::value_type const & s,
187  tmat4x4<T> const & m);
188 
189  template <typename T>
190  tmat4x4<T> operator- (
191  tmat4x4<T> const & m1,
192  tmat4x4<T> const & m2);
193 
194  template <typename T>
195  tmat4x4<T> operator* (
196  tmat4x4<T> const & m,
197  typename tmat4x4<T>::value_type const & s);
198 
199  template <typename T>
200  tmat4x4<T> operator* (
201  typename tmat4x4<T>::value_type const & s,
202  tmat4x4<T> const & m);
203 
204  template <typename T>
205  typename tmat4x4<T>::col_type operator* (
206  tmat4x4<T> const & m,
207  typename tmat4x4<T>::row_type const & v);
208 
209  template <typename T>
210  typename tmat4x4<T>::row_type operator* (
211  typename tmat4x4<T>::col_type const & v,
212  tmat4x4<T> const & m);
213 
214  template <typename T>
215  tmat2x4<T> operator* (
216  tmat4x4<T> const & m1,
217  tmat2x4<T> const & m2);
218 
219  template <typename T>
220  tmat3x4<T> operator* (
221  tmat4x4<T> const & m1,
222  tmat3x4<T> const & m2);
223 
224  template <typename T>
225  tmat4x4<T> operator* (
226  tmat4x4<T> const & m1,
227  tmat4x4<T> const & m2);
228 
229  template <typename T>
230  tmat4x4<T> operator/ (
231  tmat4x4<T> const & m,
232  typename tmat4x4<T>::value_type const & s);
233 
234  template <typename T>
235  tmat4x4<T> operator/ (
236  typename tmat4x4<T>::value_type const & s,
237  tmat4x4<T> const & m);
238 
239  template <typename T>
240  typename tmat4x4<T>::col_type operator/ (
241  tmat4x4<T> const & m,
242  typename tmat4x4<T>::row_type const & v);
243 
244  template <typename T>
245  typename tmat4x4<T>::row_type operator/ (
246  typename tmat4x4<T>::col_type & v,
247  tmat4x4<T> const & m);
248 
249  template <typename T>
250  tmat4x4<T> operator/ (
251  tmat4x4<T> const & m1,
252  tmat4x4<T> const & m2);
253 
254  // Unary constant operators
255  template <typename T>
256  tmat4x4<T> const operator- (
257  tmat4x4<T> const & m);
258 
259  template <typename T>
260  tmat4x4<T> const operator-- (
261  tmat4x4<T> const & m, int);
262 
263  template <typename T>
264  tmat4x4<T> const operator++ (
265  tmat4x4<T> const & m, int);
266 
267 } //namespace detail
268 
271 
278 
285 
292 
299 
306 
313 
315 }//namespace glm
316 
317 #ifndef GLM_EXTERNAL_TEMPLATE
318 #include "type_mat4x4.inl"
319 #endif//GLM_EXTERNAL_TEMPLATE
320 
321 #endif//glm_core_type_mat4x4
detail::tmat4x4< highp_float > highp_mat4
4 columns of 4 components matrix of high precision floating-point numbers.
Definition: type_mat4x4.hpp:291
OpenGL Mathematics (glm.g-truc.net)
Definition: _detail.hpp:38
detail::tmat4x4< mediump_float > mediump_mat4x4
4 columns of 4 components matrix of medium precision floating-point numbers.
Definition: type_mat4x4.hpp:305
detail::tmat4x4< highp_float > highp_mat4x4
4 columns of 4 components matrix of high precision floating-point numbers.
Definition: type_mat4x4.hpp:312
detail::tmat4x4< lowp_float > lowp_mat4x4
4 columns of 4 components matrix of low precision floating-point numbers.
Definition: type_mat4x4.hpp:298
detail::tmat4x4< lowp_float > lowp_mat4
4 columns of 4 components matrix of low precision floating-point numbers.
Definition: type_mat4x4.hpp:277
OpenGL Mathematics (glm.g-truc.net)
Definition: type_mat2x2.hpp:49
detail::tmat4x4< mediump_float > mediump_mat4
4 columns of 4 components matrix of medium precision floating-point numbers.
Definition: type_mat4x4.hpp:284