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