Flow Visualisation
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  template <typename T>
52  struct tmat3x3
53  {
54  enum ctor{null};
55  typedef T value_type;
56  typedef std::size_t size_type;
57  typedef tvec3<T> col_type;
58  typedef tvec3<T> row_type;
59  typedef tmat3x3<T> type;
61 
62  static GLM_FUNC_DECL size_type col_size();
63  static GLM_FUNC_DECL size_type row_size();
64 
65  GLM_FUNC_DECL GLM_CONSTEXPR size_type length() const;
66 
67  public:
70  GLM_FUNC_DECL tmat3x3<T> _inverse() const;
72 
73  private:
74  // Data
75  col_type value[3];
76 
77  public:
78  // Constructors
80  GLM_FUNC_DECL tmat3x3(tmat3x3 const & m);
81 
82  GLM_FUNC_DECL explicit tmat3x3(
83  ctor Null);
84  GLM_FUNC_DECL explicit tmat3x3(
85  value_type const & s);
86  GLM_FUNC_DECL explicit tmat3x3(
87  value_type const & x0, value_type const & y0, value_type const & z0,
88  value_type const & x1, value_type const & y1, value_type const & z1,
89  value_type const & x2, value_type const & y2, value_type const & z2);
90  GLM_FUNC_DECL explicit tmat3x3(
91  col_type const & v0,
92  col_type const & v1,
93  col_type const & v2);
94 
96  // Conversions
97  template <typename U>
98  GLM_FUNC_DECL explicit tmat3x3(
99  U const & x);
100 
101  template
102  <
103  typename X1, typename Y1, typename Z1,
104  typename X2, typename Y2, typename Z2,
105  typename X3, typename Y3, typename Z3
106  >
107  GLM_FUNC_DECL explicit tmat3x3(
108  X1 const & x1, Y1 const & y1, Z1 const & z1,
109  X2 const & x2, Y2 const & y2, Z2 const & z2,
110  X3 const & x3, Y3 const & y3, Z3 const & z3);
111 
112  template <typename V1, typename V2, typename V3>
113  GLM_FUNC_DECL explicit tmat3x3(
114  tvec3<V1> const & v1,
115  tvec3<V2> const & v2,
116  tvec3<V3> const & v3);
117 
118  // Matrix conversions
119  template <typename U>
120  GLM_FUNC_DECL explicit tmat3x3(tmat3x3<U> const & m);
121 
122  GLM_FUNC_DECL explicit tmat3x3(tmat2x2<T> const & x);
123  GLM_FUNC_DECL explicit tmat3x3(tmat4x4<T> const & x);
124  GLM_FUNC_DECL explicit tmat3x3(tmat2x3<T> const & x);
125  GLM_FUNC_DECL explicit tmat3x3(tmat3x2<T> const & x);
126  GLM_FUNC_DECL explicit tmat3x3(tmat2x4<T> const & x);
127  GLM_FUNC_DECL explicit tmat3x3(tmat4x2<T> const & x);
128  GLM_FUNC_DECL explicit tmat3x3(tmat3x4<T> const & x);
129  GLM_FUNC_DECL explicit tmat3x3(tmat4x3<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
137  template <typename U>
139  template <typename U>
140  GLM_FUNC_DECL tmat3x3<T>& operator+= (U const & s);
141  template <typename U>
143  template <typename U>
144  GLM_FUNC_DECL tmat3x3<T>& operator-= (U const & s);
145  template <typename U>
147  template <typename U>
148  GLM_FUNC_DECL tmat3x3<T>& operator*= (U const & s);
149  template <typename U>
151  template <typename U>
152  GLM_FUNC_DECL tmat3x3<T>& operator/= (U const & s);
153  template <typename U>
157  };
158 
159  // Binary operators
160  template <typename T>
162  tmat3x3<T> const & m,
163  typename tmat3x3<T>::value_type const & s);
164 
165  template <typename T>
167  typename tmat3x3<T>::value_type const & s,
168  tmat3x3<T> const & m);
169 
170  template <typename T>
172  tmat3x3<T> const & m1,
173  tmat3x3<T> const & m2);
174 
175  template <typename T>
177  tmat3x3<T> const & m,
178  typename tmat3x3<T>::value_type const & s);
179 
180  template <typename T>
182  typename tmat3x3<T>::value_type const & s,
183  tmat3x3<T> const & m);
184 
185  template <typename T>
187  tmat3x3<T> const & m1,
188  tmat3x3<T> const & m2);
189 
190  template <typename T>
192  tmat3x3<T> const & m,
193  typename tmat3x3<T>::value_type const & s);
194 
195  template <typename T>
197  typename tmat3x3<T>::value_type const & s,
198  tmat3x3<T> const & m);
199 
200  template <typename T>
202  tmat3x3<T> const & m,
203  typename tmat3x3<T>::row_type const & v);
204 
205  template <typename T>
207  typename tmat3x3<T>::col_type const & v,
208  tmat3x3<T> const & m);
209 
210  template <typename T>
212  tmat3x3<T> const & m1,
213  tmat3x3<T> const & m2);
214 
215  template <typename T>
217  tmat3x3<T> const & m1,
218  tmat2x3<T> const & m2);
219 
220  template <typename T>
222  tmat3x3<T> const & m1,
223  tmat4x3<T> const & m2);
224 
225  template <typename T>
227  tmat3x3<T> const & m,
228  typename tmat3x3<T>::value_type const & s);
229 
230  template <typename T>
232  typename tmat3x3<T>::value_type const & s,
233  tmat3x3<T> const & m);
234 
235  template <typename T>
237  tmat3x3<T> const & m,
238  typename tmat3x3<T>::row_type const & v);
239 
240  template <typename T>
242  typename tmat3x3<T>::col_type const & v,
243  tmat3x3<T> const & m);
244 
245  template <typename T>
247  tmat3x3<T> const & m1,
248  tmat3x3<T> const & m2);
249 
250  // Unary constant operators
251  template <typename T>
253  tmat3x3<T> const & m);
254 
255  template <typename T>
257  tmat3x3<T> const & m,
258  int);
259 
260  template <typename T>
262  tmat3x3<T> const & m,
263  int);
264 } //namespace detail
265 
268 
275 
282 
289 
296 
303 
310 
312 }//namespace glm
313 
314 #ifndef GLM_EXTERNAL_TEMPLATE
315 #include "type_mat3x3.inl"
316 #endif
317 
318 #endif //glm_core_type_mat3x3
GLM_FUNC_DECL GLM_CONSTEXPR size_type length() const
Definition: type_mat3x3.inl:33
GLM_FUNC_DECL col_type & operator[](size_type i)
Definition: type_mat3x3.inl:56
GLM_FUNC_DECL tmat3x3< T > & operator=(tmat3x3< T > const &m)
Definition: type_mat3x3.inl:298
GLM_FUNC_DECL half operator--(half const &s, int)
Definition: type_half.inl:356
GLM_FUNC_DECL tmat3x3< T > & operator-=(U const &s)
GLM_FUNC_DECL tmat3x3< T > & operator++()
Definition: type_mat3x3.inl:420
#define GLM_CONSTEXPR
Definition: _detail.hpp:479
Definition: type_mat2x2.hpp:45
Definition: type_mat2x2.hpp:48
Definition: type_mat2x2.hpp:42
tmat3x3< T > transpose_type
Definition: type_mat3x3.hpp:60
Definition: _detail.hpp:38
GLM_FUNC_DECL tmat3x3< T > & operator--()
Definition: type_mat3x3.inl:429
detail::tmat3x3< mediump_float > mediump_mat3
Definition: type_mat3x3.hpp:281
Definition: _swizzle.hpp:43
std::size_t size_type
Definition: type_mat3x3.hpp:56
static GLM_FUNC_DECL size_type row_size()
Definition: type_mat3x3.inl:45
GLM_FUNC_DECL half operator+(half const &s1, half const &s2)
Definition: type_half.inl:330
GLM_FUNC_DECL tmat3x3< T > & operator*=(U const &s)
GLM_FUNC_DECL half operator-(half const &s1, half const &s2)
Definition: type_half.inl:335
GLM_FUNC_DECL half operator++(half const &s, int)
Definition: type_half.inl:361
tmat3x3< T > type
Definition: type_mat3x3.hpp:59
GLM_FUNC_DECL tmat3x3< T > & operator/=(U const &s)
ctor
Definition: type_mat3x3.hpp:54
detail::tmat3x3< highp_float > highp_mat3
Definition: type_mat3x3.hpp:288
Definition: type_mat2x2.hpp:39
Definition: type_mat2x2.hpp:44
Definition: type_mat2x2.hpp:47
Definition: type_mat2x2.hpp:41
GLM_FUNC_DECL tmat3x3()
Definition: type_mat3x3.inl:79
Definition: type_mat3x3.hpp:54
GLM_FUNC_DECL half operator*(half const &s1, half const &s2)
Definition: type_half.inl:340
tvec3< T > col_type
Definition: type_mat3x3.hpp:57
detail::tmat3x3< lowp_float > lowp_mat3x3
Definition: type_mat3x3.hpp:295
static GLM_FUNC_DECL size_type col_size()
Definition: type_mat3x3.inl:39
detail::tmat3x3< highp_float > highp_mat3x3
Definition: type_mat3x3.hpp:309
detail::tmat3x3< mediump_float > mediump_mat3x3
Definition: type_mat3x3.hpp:302
detail::tmat3x3< lowp_float > lowp_mat3
Definition: type_mat3x3.hpp:274
GLM_FUNC_DECL half operator/(half const &s1, half const &s2)
Definition: type_half.inl:345
T value_type
Definition: type_mat3x3.hpp:55
Definition: type_mat2x2.hpp:46
Definition: type_mat2x2.hpp:49
Definition: type_mat2x2.hpp:43
tvec3< T > row_type
Definition: type_mat3x3.hpp:58
#define GLM_FUNC_DECL
Definition: setup.hpp:678
GLM_FUNC_DECL tmat3x3< T > & operator+=(U const &s)