PSMoveService
type_mat2x4.hpp
Go to the documentation of this file.
1 
29 #ifndef glm_core_type_mat2x4
30 #define glm_core_type_mat2x4
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 for 2 columns and 4 rows matrix of floating-point numbers.
52  // \ingroup core_template
53  template <typename T>
54  struct tmat2x4
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 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();
64 
65  typedef tmat2x4<T> type;
66  typedef tmat4x2<T> transpose_type;
67 
68  private:
69  // Data
70  col_type value[2];
71 
72  public:
73  // Constructors
74  GLM_FUNC_DECL tmat2x4();
75  GLM_FUNC_DECL tmat2x4(tmat2x4 const & m);
76 
77  GLM_FUNC_DECL explicit tmat2x4(
78  ctor);
79  GLM_FUNC_DECL explicit tmat2x4(
80  value_type const & s);
81  GLM_FUNC_DECL explicit tmat2x4(
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  GLM_FUNC_DECL explicit tmat2x4(
85  col_type const & v0,
86  col_type const & v1);
87 
89  // Conversions
90  template <typename U>
91  GLM_FUNC_DECL explicit tmat2x4(
92  U const & x);
93 
94  template <
95  typename X1, typename Y1, typename Z1, typename W1,
96  typename X2, typename Y2, typename Z2, typename W2>
97  GLM_FUNC_DECL explicit tmat2x4(
98  X1 const & x1, Y1 const & y1, Z1 const & z1, W1 const & w1,
99  X2 const & x2, Y2 const & y2, Z2 const & z2, W2 const & w2);
100 
101  template <typename U, typename V>
102  GLM_FUNC_DECL explicit tmat2x4(
103  tvec4<U> const & v1,
104  tvec4<V> const & v2);
105 
107  // Matrix conversions
108  template <typename U>
109  GLM_FUNC_DECL explicit tmat2x4(tmat2x4<U> const & m);
110 
111  GLM_FUNC_DECL explicit tmat2x4(tmat2x2<T> const & x);
112  GLM_FUNC_DECL explicit tmat2x4(tmat3x3<T> const & x);
113  GLM_FUNC_DECL explicit tmat2x4(tmat4x4<T> const & x);
114  GLM_FUNC_DECL explicit tmat2x4(tmat2x3<T> const & x);
115  GLM_FUNC_DECL explicit tmat2x4(tmat3x2<T> const & x);
116  GLM_FUNC_DECL explicit tmat2x4(tmat3x4<T> const & x);
117  GLM_FUNC_DECL explicit tmat2x4(tmat4x2<T> const & x);
118  GLM_FUNC_DECL explicit tmat2x4(tmat4x3<T> const & x);
119 
120  // Accesses
121  GLM_FUNC_DECL col_type & operator[](size_type i);
122  GLM_FUNC_DECL col_type const & operator[](size_type i) const;
123 
124  // Unary updatable operators
125  GLM_FUNC_DECL tmat2x4<T>& operator= (tmat2x4<T> const & m);
126  template <typename U>
127  GLM_FUNC_DECL tmat2x4<T>& operator= (tmat2x4<U> const & m);
128  template <typename U>
129  GLM_FUNC_DECL tmat2x4<T>& operator+= (U const & s);
130  template <typename U>
131  GLM_FUNC_DECL tmat2x4<T>& operator+= (tmat2x4<U> const & m);
132  template <typename U>
133  GLM_FUNC_DECL tmat2x4<T>& operator-= (U const & s);
134  template <typename U>
135  GLM_FUNC_DECL tmat2x4<T>& operator-= (tmat2x4<U> const & m);
136  template <typename U>
137  GLM_FUNC_DECL tmat2x4<T>& operator*= (U const & s);
138  template <typename U>
139  GLM_FUNC_DECL tmat2x4<T>& operator*= (tmat2x4<U> const & m);
140  template <typename U>
141  GLM_FUNC_DECL tmat2x4<T>& operator/= (U const & s);
142 
143  GLM_FUNC_DECL tmat2x4<T>& operator++ ();
144  GLM_FUNC_DECL tmat2x4<T>& operator-- ();
145  };
146 
147  // Binary operators
148  template <typename T>
149  tmat2x4<T> operator+ (
150  tmat2x4<T> const & m,
151  typename tmat2x4<T>::value_type const & s);
152 
153  template <typename T>
154  tmat2x4<T> operator+ (
155  tmat2x4<T> const & m1,
156  tmat2x4<T> const & m2);
157 
158  template <typename T>
159  tmat2x4<T> operator- (
160  tmat2x4<T> const & m,
161  typename tmat2x4<T>::value_type const & s);
162 
163  template <typename T>
164  tmat2x4<T> operator- (
165  tmat2x4<T> const & m1,
166  tmat2x4<T> const & m2);
167 
168  template <typename T>
169  tmat2x4<T> operator* (
170  tmat2x4<T> const & m,
171  typename tmat2x4<T>::value_type const & s);
172 
173  template <typename T>
174  tmat2x4<T> operator* (
175  typename tmat2x4<T>::value_type const & s,
176  tmat2x4<T> const & m);
177 
178  template <typename T>
179  typename tmat2x4<T>::col_type operator* (
180  tmat2x4<T> const & m,
181  typename tmat2x4<T>::row_type const & v);
182 
183  template <typename T>
184  typename tmat2x4<T>::row_type operator* (
185  typename tmat2x4<T>::col_type const & v,
186  tmat2x4<T> const & m);
187 
188  template <typename T>
189  tmat4x4<T> operator* (
190  tmat2x4<T> const & m1,
191  tmat4x2<T> const & m2);
192 
193  template <typename T>
194  tmat2x4<T> operator* (
195  tmat2x4<T> const & m1,
196  tmat2x2<T> const & m2);
197 
198  template <typename T>
199  tmat3x4<T> operator* (
200  tmat2x4<T> const & m1,
201  tmat3x2<T> const & m2);
202 
203  template <typename T>
204  tmat2x4<T> operator/ (
205  tmat2x4<T> const & m,
206  typename tmat2x4<T>::value_type const & s);
207 
208  template <typename T>
209  tmat2x4<T> operator/ (
210  typename tmat2x4<T>::value_type const & s,
211  tmat2x4<T> const & m);
212 
213  // Unary constant operators
214  template <typename T>
215  tmat2x4<T> const operator- (
216  tmat2x4<T> const & m);
217 
218  template <typename T>
219  tmat2x4<T> const operator-- (
220  tmat2x4<T> const & m,
221  int);
222 
223  template <typename T>
224  tmat2x4<T> const operator++ (
225  tmat2x4<T> const & m,
226  int);
227 
228 } //namespace detail
229 
232 
239 
246 
253 
255 }//namespace glm
256 
257 #ifndef GLM_EXTERNAL_TEMPLATE
258 #include "type_mat2x4.inl"
259 #endif
260 
261 #endif //glm_core_type_mat2x4
Definition: _detail.hpp:38
OpenGL Mathematics (glm.g-truc.net)
detail::tmat2x4< lowp_float > lowp_mat2x4
2 columns of 4 components matrix of low precision floating-point numbers.
Definition: type_mat2x4.hpp:238
detail::tmat2x4< highp_float > highp_mat2x4
2 columns of 4 components matrix of high precision floating-point numbers.
Definition: type_mat2x4.hpp:252
detail::tmat2x4< mediump_float > mediump_mat2x4
2 columns of 4 components matrix of medium precision floating-point numbers.
Definition: type_mat2x4.hpp:245
OpenGL Mathematics (glm.g-truc.net)
Definition: type_mat2x2.hpp:43