Flow Visualisation
type_mat2x4.hpp
Go to the documentation of this file.
1 
29 #ifndef glm_core_type_mat2x4
30 #define glm_core_type_mat2x4
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 tmat2x4
53  {
54  enum ctor{null};
55  typedef T value_type;
56  typedef std::size_t size_type;
57  typedef tvec4<T> col_type;
58  typedef tvec2<T> row_type;
59  typedef tmat2x4<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  private:
68  // Data
69  col_type value[2];
70 
71  public:
72  // Constructors
74  GLM_FUNC_DECL tmat2x4(tmat2x4 const & m);
75 
76  GLM_FUNC_DECL explicit tmat2x4(
77  ctor);
78  GLM_FUNC_DECL explicit tmat2x4(
79  value_type const & s);
80  GLM_FUNC_DECL explicit tmat2x4(
81  value_type const & x0, value_type const & y0, value_type const & z0, value_type const & w0,
82  value_type const & x1, value_type const & y1, value_type const & z1, value_type const & w1);
83  GLM_FUNC_DECL explicit tmat2x4(
84  col_type const & v0,
85  col_type const & v1);
86 
88  // Conversions
89  template <typename U>
90  GLM_FUNC_DECL explicit tmat2x4(
91  U const & x);
92 
93  template <
94  typename X1, typename Y1, typename Z1, typename W1,
95  typename X2, typename Y2, typename Z2, typename W2>
96  GLM_FUNC_DECL explicit tmat2x4(
97  X1 const & x1, Y1 const & y1, Z1 const & z1, W1 const & w1,
98  X2 const & x2, Y2 const & y2, Z2 const & z2, W2 const & w2);
99 
100  template <typename U, typename V>
101  GLM_FUNC_DECL explicit tmat2x4(
102  tvec4<U> const & v1,
103  tvec4<V> const & v2);
104 
106  // Matrix conversions
107  template <typename U>
108  GLM_FUNC_DECL explicit tmat2x4(tmat2x4<U> const & m);
109 
110  GLM_FUNC_DECL explicit tmat2x4(tmat2x2<T> const & x);
111  GLM_FUNC_DECL explicit tmat2x4(tmat3x3<T> const & x);
112  GLM_FUNC_DECL explicit tmat2x4(tmat4x4<T> const & x);
113  GLM_FUNC_DECL explicit tmat2x4(tmat2x3<T> const & x);
114  GLM_FUNC_DECL explicit tmat2x4(tmat3x2<T> const & x);
115  GLM_FUNC_DECL explicit tmat2x4(tmat3x4<T> const & x);
116  GLM_FUNC_DECL explicit tmat2x4(tmat4x2<T> const & x);
117  GLM_FUNC_DECL explicit tmat2x4(tmat4x3<T> const & x);
118 
119  // Accesses
120  GLM_FUNC_DECL col_type & operator[](size_type i);
121  GLM_FUNC_DECL col_type const & operator[](size_type i) const;
122 
123  // Unary updatable operators
125  template <typename U>
127  template <typename U>
128  GLM_FUNC_DECL tmat2x4<T>& operator+= (U const & s);
129  template <typename U>
131  template <typename U>
132  GLM_FUNC_DECL tmat2x4<T>& operator-= (U const & s);
133  template <typename U>
135  template <typename U>
136  GLM_FUNC_DECL tmat2x4<T>& operator*= (U const & s);
137  template <typename U>
139  template <typename U>
140  GLM_FUNC_DECL tmat2x4<T>& operator/= (U const & s);
141 
144  };
145 
146  // Binary operators
147  template <typename T>
149  tmat2x4<T> const & m,
150  typename tmat2x4<T>::value_type const & s);
151 
152  template <typename T>
154  tmat2x4<T> const & m1,
155  tmat2x4<T> const & m2);
156 
157  template <typename T>
159  tmat2x4<T> const & m,
160  typename tmat2x4<T>::value_type const & s);
161 
162  template <typename T>
164  tmat2x4<T> const & m1,
165  tmat2x4<T> const & m2);
166 
167  template <typename T>
169  tmat2x4<T> const & m,
170  typename tmat2x4<T>::value_type const & s);
171 
172  template <typename T>
174  typename tmat2x4<T>::value_type const & s,
175  tmat2x4<T> const & m);
176 
177  template <typename T>
179  tmat2x4<T> const & m,
180  typename tmat2x4<T>::row_type const & v);
181 
182  template <typename T>
184  typename tmat2x4<T>::col_type const & v,
185  tmat2x4<T> const & m);
186 
187  template <typename T>
189  tmat2x4<T> const & m1,
190  tmat4x2<T> const & m2);
191 
192  template <typename T>
194  tmat2x4<T> const & m1,
195  tmat2x2<T> const & m2);
196 
197  template <typename T>
199  tmat2x4<T> const & m1,
200  tmat3x2<T> const & m2);
201 
202  template <typename T>
204  tmat2x4<T> const & m,
205  typename tmat2x4<T>::value_type const & s);
206 
207  template <typename T>
209  typename tmat2x4<T>::value_type const & s,
210  tmat2x4<T> const & m);
211 
212  // Unary constant operators
213  template <typename T>
215  tmat2x4<T> const & m);
216 
217  template <typename T>
219  tmat2x4<T> const & m,
220  int);
221 
222  template <typename T>
224  tmat2x4<T> const & m,
225  int);
226 
227 } //namespace detail
228 
231 
238 
245 
252 
254 }//namespace glm
255 
256 #ifndef GLM_EXTERNAL_TEMPLATE
257 #include "type_mat2x4.inl"
258 #endif
259 
260 #endif //glm_core_type_mat2x4
Definition: type_mat2x4.hpp:54
GLM_FUNC_DECL half operator--(half const &s, int)
Definition: type_half.inl:356
static GLM_FUNC_DECL size_type col_size()
Definition: type_mat2x4.inl:39
std::size_t size_type
Definition: type_mat2x4.hpp:56
tmat2x4< T > type
Definition: type_mat2x4.hpp:59
GLM_FUNC_DECL tmat2x4< T > & operator++()
Definition: type_mat2x4.inl:380
#define GLM_CONSTEXPR
Definition: _detail.hpp:479
Definition: type_mat2x2.hpp:45
Definition: type_mat2x2.hpp:48
Definition: type_mat2x2.hpp:42
Definition: _detail.hpp:38
Definition: type_mat2x2.hpp:38
GLM_FUNC_DECL tmat2x4< T > & operator=(tmat2x4< T > const &m)
Definition: type_mat2x4.inl:276
GLM_FUNC_DECL GLM_CONSTEXPR size_type length() const
Definition: type_mat2x4.inl:33
tvec2< T > row_type
Definition: type_mat2x4.hpp:58
Definition: _swizzle.hpp:43
tvec4< T > col_type
Definition: type_mat2x4.hpp:57
GLM_FUNC_DECL half operator+(half const &s1, half const &s2)
Definition: type_half.inl:330
T value_type
Definition: type_mat2x4.hpp:55
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
GLM_FUNC_DECL tmat2x4< T > & operator-=(U const &s)
detail::tmat2x4< lowp_float > lowp_mat2x4
Definition: type_mat2x4.hpp:237
GLM_FUNC_DECL tmat2x4< T > & operator*=(U const &s)
ctor
Definition: type_mat2x4.hpp:54
Definition: type_mat2x2.hpp:44
Definition: type_mat2x2.hpp:47
GLM_FUNC_DECL col_type & operator[](size_type i)
Definition: type_mat2x4.inl:56
Definition: type_mat2x2.hpp:41
GLM_FUNC_DECL half operator*(half const &s1, half const &s2)
Definition: type_half.inl:340
static GLM_FUNC_DECL size_type row_size()
Definition: type_mat2x4.inl:45
detail::tmat2x4< highp_float > highp_mat2x4
Definition: type_mat2x4.hpp:251
Definition: type_mat2x2.hpp:40
detail::tmat2x4< mediump_float > mediump_mat2x4
Definition: type_mat2x4.hpp:244
GLM_FUNC_DECL tmat2x4< T > & operator+=(U const &s)
tmat4x2< T > transpose_type
Definition: type_mat2x4.hpp:60
GLM_FUNC_DECL half operator/(half const &s1, half const &s2)
Definition: type_half.inl:345
Definition: type_mat2x2.hpp:46
Definition: type_mat2x2.hpp:49
Definition: type_mat2x2.hpp:43
GLM_FUNC_DECL tmat2x4()
Definition: type_mat2x4.inl:79
#define GLM_FUNC_DECL
Definition: setup.hpp:678
GLM_FUNC_DECL tmat2x4< T > & operator/=(U const &s)
GLM_FUNC_DECL tmat2x4< T > & operator--()
Definition: type_mat2x4.inl:388