PSMoveService
type_mat4x2.hpp
Go to the documentation of this file.
1 
29 #ifndef glm_core_type_mat4x2
30 #define glm_core_type_mat4x2
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 columns and 2 rows matrix of floating-point numbers.
52  // \ingroup core_template
53  template <typename T>
54  struct tmat4x2
55  {
56  enum ctor{null};
57  typedef T value_type;
58  typedef std::size_t size_type;
59  typedef tvec2<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 tmat4x2<T> type;
66  typedef tmat2x4<T> transpose_type;
67 
68  private:
69  // Data
70  col_type value[4];
71 
72  public:
73  // Constructors
74  GLM_FUNC_DECL tmat4x2();
75  GLM_FUNC_DECL tmat4x2(tmat4x2 const & m);
76 
77  GLM_FUNC_DECL explicit tmat4x2(
78  ctor Null);
79  GLM_FUNC_DECL explicit tmat4x2(
80  value_type const & x);
81  GLM_FUNC_DECL explicit tmat4x2(
82  value_type const & x0, value_type const & y0,
83  value_type const & x1, value_type const & y1,
84  value_type const & x2, value_type const & y2,
85  value_type const & x3, value_type const & y3);
86  GLM_FUNC_DECL explicit tmat4x2(
87  col_type const & v0,
88  col_type const & v1,
89  col_type const & v2,
90  col_type const & v3);
91 
93  // Conversions
94  template <typename U>
95  GLM_FUNC_DECL explicit tmat4x2(
96  U const & x);
97 
98  template
99  <
100  typename X1, typename Y1,
101  typename X2, typename Y2,
102  typename X3, typename Y3,
103  typename X4, typename Y4
104  >
105  GLM_FUNC_DECL explicit tmat4x2(
106  X1 const & x1, Y1 const & y1,
107  X2 const & x2, Y2 const & y2,
108  X3 const & x3, Y3 const & y3,
109  X4 const & x4, Y4 const & y4);
110 
111  template <typename V1, typename V2, typename V3, typename V4>
112  GLM_FUNC_DECL explicit tmat4x2(
113  tvec2<V1> const & v1,
114  tvec2<V2> const & v2,
115  tvec2<V3> const & v3,
116  tvec2<V4> const & v4);
117 
118  // Matrix conversions
119  template <typename U>
120  GLM_FUNC_DECL explicit tmat4x2(tmat4x2<U> const & m);
121 
122  GLM_FUNC_DECL explicit tmat4x2(tmat2x2<T> const & x);
123  GLM_FUNC_DECL explicit tmat4x2(tmat3x3<T> const & x);
124  GLM_FUNC_DECL explicit tmat4x2(tmat4x4<T> const & x);
125  GLM_FUNC_DECL explicit tmat4x2(tmat2x3<T> const & x);
126  GLM_FUNC_DECL explicit tmat4x2(tmat3x2<T> const & x);
127  GLM_FUNC_DECL explicit tmat4x2(tmat2x4<T> const & x);
128  GLM_FUNC_DECL explicit tmat4x2(tmat4x3<T> const & x);
129  GLM_FUNC_DECL explicit tmat4x2(tmat3x4<T> const & x);
130 
131  // Accesses
132  GLM_FUNC_DECL col_type & operator[](size_type i);
133  GLM_FUNC_DECL col_type const & operator[](size_type i) const;
134 
135  // Unary updatable operators
136  GLM_FUNC_DECL tmat4x2<T>& operator= (tmat4x2<T> const & m);
137  template <typename U>
138  GLM_FUNC_DECL tmat4x2<T>& operator= (tmat4x2<U> const & m);
139  template <typename U>
140  GLM_FUNC_DECL tmat4x2<T>& operator+= (U const & s);
141  template <typename U>
142  GLM_FUNC_DECL tmat4x2<T>& operator+= (tmat4x2<U> const & m);
143  template <typename U>
144  GLM_FUNC_DECL tmat4x2<T>& operator-= (U const & s);
145  template <typename U>
146  GLM_FUNC_DECL tmat4x2<T>& operator-= (tmat4x2<U> const & m);
147  template <typename U>
148  GLM_FUNC_DECL tmat4x2<T>& operator*= (U const & s);
149  template <typename U>
150  GLM_FUNC_DECL tmat4x2<T>& operator*= (tmat4x2<U> const & m);
151  template <typename U>
152  GLM_FUNC_DECL tmat4x2<T>& operator/= (U const & s);
153 
154  GLM_FUNC_DECL tmat4x2<T>& operator++ ();
155  GLM_FUNC_DECL tmat4x2<T>& operator-- ();
156  };
157 
158  // Binary operators
159  template <typename T>
160  tmat4x2<T> operator+ (
161  tmat4x2<T> const & m,
162  typename tmat4x2<T>::value_type const & s);
163 
164  template <typename T>
165  tmat4x2<T> operator+ (
166  tmat4x2<T> const & m1,
167  tmat4x2<T> const & m2);
168 
169  template <typename T>
170  tmat4x2<T> operator- (
171  tmat4x2<T> const & m,
172  typename tmat4x2<T>::value_type const & s);
173 
174  template <typename T>
175  tmat4x2<T> operator- (
176  tmat4x2<T> const & m1,
177  tmat4x2<T> const & m2);
178 
179  template <typename T>
180  tmat4x2<T> operator* (
181  tmat4x2<T> const & m,
182  typename tmat4x2<T>::value_type const & s);
183 
184  template <typename T>
185  tmat4x2<T> operator* (
186  typename tmat4x2<T>::value_type const & s,
187  tmat4x2<T> const & m);
188 
189  template <typename T>
190  typename tmat4x2<T>::col_type operator* (
191  tmat4x2<T> const & m,
192  typename tmat4x2<T>::row_type const & v);
193 
194  template <typename T>
195  typename tmat4x2<T>::row_type operator* (
196  typename tmat4x2<T>::col_type const & v,
197  tmat4x2<T> const & m);
198 
199  template <typename T>
200  tmat3x2<T> operator* (
201  tmat4x2<T> const & m1,
202  tmat3x4<T> const & m2);
203 
204  template <typename T>
205  tmat4x2<T> operator* (
206  tmat4x2<T> const & m1,
207  tmat4x4<T> const & m2);
208 
209  template <typename T>
210  tmat2x3<T> operator* (
211  tmat4x3<T> const & m1,
212  tmat2x4<T> const & m2);
213 
214  template <typename T>
215  tmat4x2<T> operator/ (
216  tmat4x2<T> const & m,
217  typename tmat4x2<T>::value_type const & s);
218 
219  template <typename T>
220  tmat4x2<T> operator/ (
221  typename tmat4x2<T>::value_type const & s,
222  tmat4x2<T> const & m);
223 
224  // Unary constant operators
225  template <typename T>
226  tmat4x2<T> const operator- (
227  tmat4x2<T> const & m);
228 
229  template <typename T>
230  tmat4x2<T> const operator-- (
231  tmat4x2<T> const & m,
232  int);
233 
234  template <typename T>
235  tmat4x2<T> const operator++ (
236  tmat4x2<T> const & m,
237  int);
238 
239 } //namespace detail
240 
243 
250 
257 
264 
266 }//namespace glm
267 
268 #ifndef GLM_EXTERNAL_TEMPLATE
269 #include "type_mat4x2.inl"
270 #endif
271 
272 #endif //glm_core_type_mat4x2
Definition: _detail.hpp:38
detail::tmat4x2< highp_float > highp_mat4x2
4 columns of 2 components matrix of high precision floating-point numbers.
Definition: type_mat4x2.hpp:263
OpenGL Mathematics (glm.g-truc.net)
Definition: type_mat2x2.hpp:47
OpenGL Mathematics (glm.g-truc.net)
detail::tmat4x2< mediump_float > mediump_mat4x2
4 columns of 2 components matrix of medium precision floating-point numbers.
Definition: type_mat4x2.hpp:256
detail::tmat4x2< lowp_float > lowp_mat4x2
4 columns of 2 components matrix of low precision floating-point numbers.
Definition: type_mat4x2.hpp:249