PSMoveService
type_mat3x3.hpp
Go to the documentation of this file.
1 
29 #ifndef glm_core_type_mat3x3
30 #define glm_core_type_mat3x3
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 3 * 3 matrix of floating-point numbers.
52  // @ingroup core_template
53  template <typename T>
54  struct tmat3x3
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 tvec3<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 tmat3x3<T> type;
66  typedef tmat3x3<T> transpose_type;
67 
68  public:
71  GLM_FUNC_DECL tmat3x3<T> _inverse() const;
73 
74  private:
75  // Data
76  col_type value[3];
77 
78  public:
79  // Constructors
80  GLM_FUNC_DECL tmat3x3();
81  GLM_FUNC_DECL tmat3x3(tmat3x3 const & m);
82 
83  GLM_FUNC_DECL explicit tmat3x3(
84  ctor Null);
85  GLM_FUNC_DECL explicit tmat3x3(
86  value_type const & s);
87  GLM_FUNC_DECL explicit tmat3x3(
88  value_type const & x0, value_type const & y0, value_type const & z0,
89  value_type const & x1, value_type const & y1, value_type const & z1,
90  value_type const & x2, value_type const & y2, value_type const & z2);
91  GLM_FUNC_DECL explicit tmat3x3(
92  col_type const & v0,
93  col_type const & v1,
94  col_type const & v2);
95 
97  // Conversions
98  template <typename U>
99  GLM_FUNC_DECL explicit tmat3x3(
100  U const & x);
101 
102  template
103  <
104  typename X1, typename Y1, typename Z1,
105  typename X2, typename Y2, typename Z2,
106  typename X3, typename Y3, typename Z3
107  >
108  GLM_FUNC_DECL explicit tmat3x3(
109  X1 const & x1, Y1 const & y1, Z1 const & z1,
110  X2 const & x2, Y2 const & y2, Z2 const & z2,
111  X3 const & x3, Y3 const & y3, Z3 const & z3);
112 
113  template <typename V1, typename V2, typename V3>
114  GLM_FUNC_DECL explicit tmat3x3(
115  tvec3<V1> const & v1,
116  tvec3<V2> const & v2,
117  tvec3<V3> const & v3);
118 
119  // Matrix conversions
120  template <typename U>
121  GLM_FUNC_DECL explicit tmat3x3(tmat3x3<U> const & m);
122 
123  GLM_FUNC_DECL explicit tmat3x3(tmat2x2<T> const & x);
124  GLM_FUNC_DECL explicit tmat3x3(tmat4x4<T> const & x);
125  GLM_FUNC_DECL explicit tmat3x3(tmat2x3<T> const & x);
126  GLM_FUNC_DECL explicit tmat3x3(tmat3x2<T> const & x);
127  GLM_FUNC_DECL explicit tmat3x3(tmat2x4<T> const & x);
128  GLM_FUNC_DECL explicit tmat3x3(tmat4x2<T> const & x);
129  GLM_FUNC_DECL explicit tmat3x3(tmat3x4<T> const & x);
130  GLM_FUNC_DECL explicit tmat3x3(tmat4x3<T> const & x);
131 
132  // Accesses
133  GLM_FUNC_DECL col_type & operator[](size_type i);
134  GLM_FUNC_DECL col_type const & operator[](size_type i) const;
135 
136  // Unary updatable operators
137  GLM_FUNC_DECL tmat3x3<T>& operator= (tmat3x3<T> const & m);
138  template <typename U>
139  GLM_FUNC_DECL tmat3x3<T>& operator= (tmat3x3<U> const & m);
140  template <typename U>
141  GLM_FUNC_DECL tmat3x3<T>& operator+= (U const & s);
142  template <typename U>
143  GLM_FUNC_DECL tmat3x3<T>& operator+= (tmat3x3<U> const & m);
144  template <typename U>
145  GLM_FUNC_DECL tmat3x3<T>& operator-= (U const & s);
146  template <typename U>
147  GLM_FUNC_DECL tmat3x3<T>& operator-= (tmat3x3<U> const & m);
148  template <typename U>
149  GLM_FUNC_DECL tmat3x3<T>& operator*= (U const & s);
150  template <typename U>
151  GLM_FUNC_DECL tmat3x3<T>& operator*= (tmat3x3<U> const & m);
152  template <typename U>
153  GLM_FUNC_DECL tmat3x3<T>& operator/= (U const & s);
154  template <typename U>
155  GLM_FUNC_DECL tmat3x3<T>& operator/= (tmat3x3<U> const & m);
156  GLM_FUNC_DECL tmat3x3<T>& operator++ ();
157  GLM_FUNC_DECL tmat3x3<T>& operator-- ();
158  };
159 
160  // Binary operators
161  template <typename T>
162  tmat3x3<T> operator+ (
163  tmat3x3<T> const & m,
164  typename tmat3x3<T>::value_type const & s);
165 
166  template <typename T>
167  tmat3x3<T> operator+ (
168  typename tmat3x3<T>::value_type const & s,
169  tmat3x3<T> const & m);
170 
171  template <typename T>
172  tmat3x3<T> operator+ (
173  tmat3x3<T> const & m1,
174  tmat3x3<T> const & m2);
175 
176  template <typename T>
177  tmat3x3<T> operator- (
178  tmat3x3<T> const & m,
179  typename tmat3x3<T>::value_type const & s);
180 
181  template <typename T>
182  tmat3x3<T> operator- (
183  typename tmat3x3<T>::value_type const & s,
184  tmat3x3<T> const & m);
185 
186  template <typename T>
187  tmat3x3<T> operator- (
188  tmat3x3<T> const & m1,
189  tmat3x3<T> const & m2);
190 
191  template <typename T>
192  tmat3x3<T> operator* (
193  tmat3x3<T> const & m,
194  typename tmat3x3<T>::value_type const & s);
195 
196  template <typename T>
197  tmat3x3<T> operator* (
198  typename tmat3x3<T>::value_type const & s,
199  tmat3x3<T> const & m);
200 
201  template <typename T>
202  typename tmat3x3<T>::col_type operator* (
203  tmat3x3<T> const & m,
204  typename tmat3x3<T>::row_type const & v);
205 
206  template <typename T>
207  typename tmat3x3<T>::row_type operator* (
208  typename tmat3x3<T>::col_type const & v,
209  tmat3x3<T> const & m);
210 
211  template <typename T>
212  tmat3x3<T> operator* (
213  tmat3x3<T> const & m1,
214  tmat3x3<T> const & m2);
215 
216  template <typename T>
217  tmat2x3<T> operator* (
218  tmat3x3<T> const & m1,
219  tmat2x3<T> const & m2);
220 
221  template <typename T>
222  tmat4x3<T> operator* (
223  tmat3x3<T> const & m1,
224  tmat4x3<T> const & m2);
225 
226  template <typename T>
227  tmat3x3<T> operator/ (
228  tmat3x3<T> const & m,
229  typename tmat3x3<T>::value_type const & s);
230 
231  template <typename T>
232  tmat3x3<T> operator/ (
233  typename tmat3x3<T>::value_type const & s,
234  tmat3x3<T> const & m);
235 
236  template <typename T>
237  typename tmat3x3<T>::col_type operator/ (
238  tmat3x3<T> const & m,
239  typename tmat3x3<T>::row_type const & v);
240 
241  template <typename T>
242  typename tmat3x3<T>::row_type operator/ (
243  typename tmat3x3<T>::col_type const & v,
244  tmat3x3<T> const & m);
245 
246  template <typename T>
247  tmat3x3<T> operator/ (
248  tmat3x3<T> const & m1,
249  tmat3x3<T> const & m2);
250 
251  // Unary constant operators
252  template <typename T>
253  tmat3x3<T> const operator- (
254  tmat3x3<T> const & m);
255 
256  template <typename T>
257  tmat3x3<T> const operator-- (
258  tmat3x3<T> const & m,
259  int);
260 
261  template <typename T>
262  tmat3x3<T> const operator++ (
263  tmat3x3<T> const & m,
264  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_mat3x3.inl"
318 #endif
319 
320 #endif //glm_core_type_mat3x3
Definition: type_mat2x2.hpp:45
Definition: _detail.hpp:38
detail::tmat3x3< mediump_float > mediump_mat3
3 columns of 3 components matrix of medium precision floating-point numbers.
Definition: type_mat3x3.hpp:283
detail::tmat3x3< highp_float > highp_mat3
3 columns of 3 components matrix of high precision floating-point numbers.
Definition: type_mat3x3.hpp:290
detail::tmat3x3< lowp_float > lowp_mat3x3
3 columns of 3 components matrix of low precision floating-point numbers.
Definition: type_mat3x3.hpp:297
detail::tmat3x3< highp_float > highp_mat3x3
3 columns of 3 components matrix of high precision floating-point numbers.
Definition: type_mat3x3.hpp:311
detail::tmat3x3< mediump_float > mediump_mat3x3
3 columns of 3 components matrix of medium precision floating-point numbers.
Definition: type_mat3x3.hpp:304
detail::tmat3x3< lowp_float > lowp_mat3
3 columns of 3 components matrix of low precision floating-point numbers.
Definition: type_mat3x3.hpp:276
OpenGL Mathematics (glm.g-truc.net)
OpenGL Mathematics (glm.g-truc.net)