type_mat4x2.hpp
Go to the documentation of this file.
1 
29 #pragma once
30 
31 #include "../fwd.hpp"
32 #include "type_vec2.hpp"
33 #include "type_vec4.hpp"
34 #include "type_mat.hpp"
35 #if GLM_HAS_INITIALIZER_LISTS
36 # include <initializer_list>
37 #endif
38 #if GLM_HAS_RVALUE_REFERENCES
39 # include <algorithm>
40 #endif
41 #include <limits>
42 #include <cstddef>
43 
44 namespace glm{
45 namespace detail
46 {
47  template <typename T, precision P>
48  struct tmat4x2
49  {
50  enum ctor{_null};
51  typedef T value_type;
52  typedef std::size_t size_type;
57 
59 
60  private:
61  // Data
62  col_type value[4];
63 
64  public:
65  // Constructors
68  template <precision Q>
70 
71  GLM_FUNC_DECL explicit tmat4x2(
72  ctor Null);
73  GLM_FUNC_DECL explicit tmat4x2(
74  T const & x);
76  T const & x0, T const & y0,
77  T const & x1, T const & y1,
78  T const & x2, T const & y2,
79  T const & x3, T const & y3);
81  col_type const & v0,
82  col_type const & v1,
83  col_type const & v2,
84  col_type const & v3);
85 
87  // Conversions
88 
89  template<
90  typename X1, typename Y1,
91  typename X2, typename Y2,
92  typename X3, typename Y3,
93  typename X4, typename Y4>
95  X1 const & x1, Y1 const & y1,
96  X2 const & x2, Y2 const & y2,
97  X3 const & x3, Y3 const & y3,
98  X4 const & x4, Y4 const & y4);
99 
100  template <typename V1, typename V2, typename V3, typename V4>
102  tvec2<V1, P> const & v1,
103  tvec2<V2, P> const & v2,
104  tvec2<V3, P> const & v3,
105  tvec2<V4, P> const & v4);
106 
107  // Matrix conversions
108  template <typename U, precision Q>
109  GLM_FUNC_DECL explicit tmat4x2(tmat4x2<U, Q> const & m);
110 
111  GLM_FUNC_DECL explicit tmat4x2(tmat2x2<T, P> const & x);
112  GLM_FUNC_DECL explicit tmat4x2(tmat3x3<T, P> const & x);
113  GLM_FUNC_DECL explicit tmat4x2(tmat4x4<T, P> const & x);
114  GLM_FUNC_DECL explicit tmat4x2(tmat2x3<T, P> const & x);
115  GLM_FUNC_DECL explicit tmat4x2(tmat3x2<T, P> const & x);
116  GLM_FUNC_DECL explicit tmat4x2(tmat2x4<T, P> const & x);
117  GLM_FUNC_DECL explicit tmat4x2(tmat4x3<T, P> const & x);
118  GLM_FUNC_DECL explicit tmat4x2(tmat3x4<T, P> const & x);
119 
120  // Accesses
121  GLM_FUNC_DECL col_type & operator[](length_t i);
122  GLM_FUNC_DECL col_type const & operator[](length_t i) const;
123 
125  template <typename U>
127  template <typename U>
129  template <typename U>
131  template <typename U>
133  template <typename U>
135  template <typename U>
137  template <typename U>
139 
141  // Increment and decrement operators
142 
147  };
148 
149  // Binary operators
150  template <typename T, precision P>
152  tmat4x2<T, P> const & m,
153  T const & s);
154 
155  template <typename T, precision P>
157  tmat4x2<T, P> const & m1,
158  tmat4x2<T, P> const & m2);
159 
160  template <typename T, precision P>
162  tmat4x2<T, P> const & m,
163  T const & s);
164 
165  template <typename T, precision P>
167  tmat4x2<T, P> const & m1,
168  tmat4x2<T, P> const & m2);
169 
170  template <typename T, precision P>
172  tmat4x2<T, P> const & m,
173  T const & s);
174 
175  template <typename T, precision P>
177  T const & s,
178  tmat4x2<T, P> const & m);
179 
180  template <typename T, precision P>
182  tmat4x2<T, P> const & m,
183  typename tmat4x2<T, P>::row_type const & v);
184 
185  template <typename T, precision P>
187  typename tmat4x2<T, P>::col_type const & v,
188  tmat4x2<T, P> const & m);
189 
190  template <typename T, precision P>
192  tmat4x2<T, P> const & m1,
193  tmat3x4<T, P> const & m2);
194 
195  template <typename T, precision P>
197  tmat4x2<T, P> const & m1,
198  tmat4x4<T, P> const & m2);
199 
200  template <typename T, precision P>
202  tmat4x3<T, P> const & m1,
203  tmat2x4<T, P> const & m2);
204 
205  template <typename T, precision P>
207  tmat4x2<T, P> const & m,
208  T const & s);
209 
210  template <typename T, precision P>
212  T const & s,
213  tmat4x2<T, P> const & m);
214 
215  // Unary constant operators
216  template <typename T, precision P>
218  tmat4x2<T, P> const & m);
219 
220 }//namespace detail
221 }//namespace glm
222 
223 #ifndef GLM_EXTERNAL_TEMPLATE
224 #include "type_mat4x2.inl"
225 #endif
GLM_FUNC_DECL tmat4x2< T, P > & operator*=(U s)
tvec4< T, P > row_type
Definition: type_mat4x2.hpp:54
tmat4x2< T, P > type
Definition: type_mat4x2.hpp:55
GLM_FUNC_DECL tmat4x2< T, P > & operator--()
GLM_FUNC_DECL col_type & operator[](length_t i)
int length_t
Definition: setup.hpp:755
GLM_FUNC_DECL tmat2x2< T, P > operator*(tmat2x2< T, P > const &m, T const &s)
GLM_FUNC_DECL tmat2x2< T, P > operator+(tmat2x2< T, P > const &m, T const &s)
GLM_FUNC_DECL tmat2x2< T, P > operator/(tmat2x2< T, P > const &m, T const &s)
std::size_t size_type
Definition: type_mat4x2.hpp:52
GLM_FUNC_DECL tmat4x2< T, P > & operator/=(U s)
tmat2x4< T, P > transpose_type
Definition: type_mat4x2.hpp:56
GLM_FUNC_DECL tmat2x2< T, P > operator-(tmat2x2< T, P > const &m, T const &s)
tvec2< T, P > col_type
Definition: type_mat4x2.hpp:53
GLM_FUNC_DECL tmat4x2< T, P > & operator++()
GLM_FUNC_DECL tmat4x2< T, P > & operator=(tmat4x2< T, P > const &m)
GLM_FUNC_DECL GLM_CONSTEXPR length_t length() const
GLM_FUNC_DECL tmat4x2< T, P > & operator-=(U s)
GLM_FUNC_DECL tmat4x2()
GLM_FUNC_DECL tmat4x2< T, P > & operator+=(U s)
#define GLM_CONSTEXPR
Definition: setup.hpp:801
#define GLM_FUNC_DECL
Definition: setup.hpp:728


rtabmap
Author(s): Mathieu Labbe
autogenerated on Wed Jun 5 2019 22:43:40