type_mat2x2.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_mat.hpp"
34 #include <limits>
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 tmat2x2
49  {
50  enum ctor{_null};
51  typedef T value_type;
52  typedef std::size_t size_type;
57 
59 
60  template <typename U, precision Q>
61  friend tvec2<U, Q> operator/(tmat2x2<U, Q> const & m, tvec2<U, Q> const & v);
62  template <typename U, precision Q>
63  friend tvec2<U, Q> operator/(tvec2<U, Q> const & v, tmat2x2<U, Q> const & m);
64 
65  private:
67  col_type value[2];
69 
70  public:
72  // Constructors
75  template <precision Q>
77 
78  GLM_FUNC_DECL explicit tmat2x2(
79  ctor Null);
80  GLM_FUNC_DECL explicit tmat2x2(
81  T const & x);
83  T const & x1, T const & y1,
84  T const & x2, T const & y2);
86  col_type const & v1,
87  col_type const & v2);
88 
90  // Conversions
91  template <typename U, typename V, typename M, typename N>
93  U const & x1, V const & y1,
94  M const & x2, N const & y2);
95 
96  template <typename U, typename V>
98  tvec2<U, P> const & v1,
99  tvec2<V, P> const & v2);
100 
102  // Matrix conversions
103  template <typename U, precision Q>
104  GLM_FUNC_DECL explicit tmat2x2(tmat2x2<U, Q> const & m);
105 
106  GLM_FUNC_DECL explicit tmat2x2(tmat3x3<T, P> const & x);
107  GLM_FUNC_DECL explicit tmat2x2(tmat4x4<T, P> const & x);
108  GLM_FUNC_DECL explicit tmat2x2(tmat2x3<T, P> const & x);
109  GLM_FUNC_DECL explicit tmat2x2(tmat3x2<T, P> const & x);
110  GLM_FUNC_DECL explicit tmat2x2(tmat2x4<T, P> const & x);
111  GLM_FUNC_DECL explicit tmat2x2(tmat4x2<T, P> const & x);
112  GLM_FUNC_DECL explicit tmat2x2(tmat3x4<T, P> const & x);
113  GLM_FUNC_DECL explicit tmat2x2(tmat4x3<T, P> const & x);
114 
116  // Accesses
117 
119  GLM_FUNC_DECL col_type const & operator[](length_t i) const;
120 
122  template <typename U>
124  template <typename U>
126  template <typename U>
128  template <typename U>
130  template <typename U>
132  template <typename U>
134  template <typename U>
136  template <typename U>
138  template <typename U>
140 
142  // Increment and decrement operators
143 
148  };
149 
150  // Binary operators
151  template <typename T, precision P>
153  tmat2x2<T, P> const & m,
154  T const & s);
155 
156  template <typename T, precision P>
158  T const & s,
159  tmat2x2<T, P> const & m);
160 
161  template <typename T, precision P>
163  tmat2x2<T, P> const & m1,
164  tmat2x2<T, P> const & m2);
165 
166  template <typename T, precision P>
168  tmat2x2<T, P> const & m,
169  T const & s);
170 
171  template <typename T, precision P>
173  T const & s,
174  tmat2x2<T, P> const & m);
175 
176  template <typename T, precision P>
178  tmat2x2<T, P> const & m1,
179  tmat2x2<T, P> const & m2);
180 
181  template <typename T, precision P>
183  tmat2x2<T, P> const & m,
184  T const & s);
185 
186  template <typename T, precision P>
188  T const & s,
189  tmat2x2<T, P> const & m);
190 
191  template <typename T, precision P>
193  tmat2x2<T, P> const & m,
194  typename tmat2x2<T, P>::row_type const & v);
195 
196  template <typename T, precision P>
198  typename tmat2x2<T, P>::col_type const & v,
199  tmat2x2<T, P> const & m);
200 
201  template <typename T, precision P>
203  tmat2x2<T, P> const & m1,
204  tmat2x2<T, P> const & m2);
205 
206  template <typename T, precision P>
208  tmat2x2<T, P> const & m1,
209  tmat3x2<T, P> const & m2);
210 
211  template <typename T, precision P>
213  tmat2x2<T, P> const & m1,
214  tmat4x2<T, P> const & m2);
215 
216  template <typename T, precision P>
218  tmat2x2<T, P> const & m,
219  T const & s);
220 
221  template <typename T, precision P>
223  T const & s,
224  tmat2x2<T, P> const & m);
225 
226  template <typename T, precision P>
228  tmat2x2<T, P> const & m,
229  typename tmat2x2<T, P>::row_type const & v);
230 
231  template <typename T, precision P>
233  typename tmat2x2<T, P>::col_type const & v,
234  tmat2x2<T, P> const & m);
235 
236  template <typename T, precision P>
238  tmat2x2<T, P> const & m1,
239  tmat2x2<T, P> const & m2);
240 
241  // Unary constant operators
242  template <typename T, precision P>
244  tmat2x2<T, P> const & m);
245 } //namespace detail
246 } //namespace glm
247 
248 #ifndef GLM_EXTERNAL_TEMPLATE
249 #include "type_mat2x2.inl"
250 #endif
glm::detail::tmat3x3
Definition: type_mat.hpp:43
glm::detail::tmat4x3
Definition: type_mat.hpp:46
glm::detail::tmat2x3
Definition: type_mat.hpp:40
glm::detail::tmat2x2::operator/=
GLM_FUNC_DECL tmat2x2< T, P > & operator/=(U s)
glm::detail::tmat2x2::transpose_type
tmat2x2< T, P > transpose_type
Definition: type_mat2x2.hpp:56
glm::detail::tmat3x2
Definition: type_mat.hpp:42
glm::detail::tmat4x2
Definition: type_mat.hpp:45
glm::detail::tmat2x2
Definition: type_mat.hpp:39
glm::detail::tmat2x2::operator++
GLM_FUNC_DECL tmat2x2< T, P > & operator++()
glm::detail::tmat2x2::tmat2x2
GLM_FUNC_DECL tmat2x2()
glm::detail::tmat2x2::_null
@ _null
Definition: type_mat2x2.hpp:50
detail
glm::detail::tmat3x4
Definition: type_mat.hpp:44
glm::detail::tmat4x4
Definition: type_mat.hpp:47
glm::detail::tmat2x4
Definition: type_mat.hpp:41
glm::detail::tmat2x2::ctor
ctor
Definition: type_mat2x2.hpp:50
glm::detail::tmat2x2::size_type
std::size_t size_type
Definition: type_mat2x2.hpp:52
glm::detail::operator+
GLM_FUNC_DECL tmat2x2< T, P > operator+(tmat2x2< T, P > const &m, T const &s)
glm::detail::operator/
GLM_FUNC_DECL tmat2x2< T, P > operator/(tmat2x2< T, P > const &m, T const &s)
glm::detail::tmat2x2::length
GLM_FUNC_DECL GLM_CONSTEXPR length_t length() const
glm::detail::operator*
GLM_FUNC_DECL tmat2x2< T, P > operator*(tmat2x2< T, P > const &m, T const &s)
glm
Definition: _literals.hpp:31
glm::detail::tmat2x2::row_type
tvec2< T, P > row_type
Definition: type_mat2x2.hpp:54
glm::detail::tmat2x2::operator[]
GLM_FUNC_DECL col_type & operator[](length_t i)
glm::detail::tmat2x2::value_type
T value_type
Definition: type_mat2x2.hpp:51
Eigen::Triplet< double >
glm::detail::tmat2x2::operator+=
GLM_FUNC_DECL tmat2x2< T, P > & operator+=(U s)
glm::detail::operator-
GLM_FUNC_DECL tmat2x2< T, P > operator-(tmat2x2< T, P > const &m, T const &s)
glm::detail::tmat2x2::operator*=
GLM_FUNC_DECL tmat2x2< T, P > & operator*=(U s)
glm::detail::tmat2x2::operator=
GLM_FUNC_DECL tmat2x2< T, P > & operator=(tmat2x2< T, P > const &m)
glm::detail::tmat2x2::type
tmat2x2< T, P > type
Definition: type_mat2x2.hpp:55
type_vec2.hpp
glm::detail::tmat2x2::operator--
GLM_FUNC_DECL tmat2x2< T, P > & operator--()
glm::length_t
int length_t
Definition: setup.hpp:755
Eigen.Matrix< double, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor >
glm::detail::tmat2x2::col_type
tvec2< T, P > col_type
Definition: type_mat2x2.hpp:53
glm::detail::tmat2x2::operator/
friend tvec2< U, Q > operator/(tmat2x2< U, Q > const &m, tvec2< U, Q > const &v)
GLM_FUNC_DECL
#define GLM_FUNC_DECL
Definition: setup.hpp:728
glm::detail::tmat2x2::operator-=
GLM_FUNC_DECL tmat2x2< T, P > & operator-=(U s)
value
value
glm::detail::tvec2
Definition: type_mat.hpp:36
type_mat.hpp
GLM_CONSTEXPR
#define GLM_CONSTEXPR
Definition: setup.hpp:801


rtabmap
Author(s): Mathieu Labbe
autogenerated on Thu Jul 25 2024 02:50:22