13 template<
typename T, qualifier Q>
14 struct mat<2, 4, T, Q>
16 typedef vec<4, T, Q> col_type;
17 typedef vec<2, T, Q> row_type;
18 typedef mat<2, 4, T, Q> type;
19 typedef mat<4, 2, T, Q> transpose_type;
28 typedef length_t length_type;
29 GLM_FUNC_DECL
static GLM_CONSTEXPR length_type
length() {
return 2; }
31 GLM_FUNC_DECL col_type & operator[](length_type i);
32 GLM_FUNC_DECL GLM_CONSTEXPR col_type
const& operator[](length_type i)
const;
36 GLM_FUNC_DECL GLM_CONSTEXPR mat() GLM_DEFAULT;
38 GLM_FUNC_DECL GLM_CONSTEXPR mat(mat<2, 4, T, P> const& m);
40 GLM_FUNC_DECL explicit GLM_CONSTEXPR mat(T scalar);
41 GLM_FUNC_DECL GLM_CONSTEXPR mat(
42 T x0, T y0, T z0, T w0,
43 T x1, T y1, T z1, T w1);
44 GLM_FUNC_DECL GLM_CONSTEXPR mat(
51 typename X1, typename Y1, typename Z1, typename W1,
52 typename X2, typename Y2, typename Z2, typename W2>
53 GLM_FUNC_DECL GLM_CONSTEXPR mat(
54 X1 x1, Y1 y1, Z1 z1, W1 w1,
55 X2 x2, Y2 y2, Z2 z2, W2 w2);
57 template<typename U, typename V>
58 GLM_FUNC_DECL GLM_CONSTEXPR mat(
59 vec<4, U, Q> const& v1,
60 vec<4, V, Q> const& v2);
64 template<typename U, qualifier P>
65 GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<2, 4, U, P> const& m);
67 GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<2, 2, T, Q> const& x);
68 GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<3, 3, T, Q> const& x);
69 GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<4, 4, T, Q> const& x);
70 GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<2, 3, T, Q> const& x);
71 GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<3, 2, T, Q> const& x);
72 GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<3, 4, T, Q> const& x);
73 GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<4, 2, T, Q> const& x);
74 GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<4, 3, T, Q> const& x);
79 GLM_FUNC_DECL mat<2, 4, T, Q> & operator=(mat<2, 4, U, Q> const& m);
81 GLM_FUNC_DECL mat<2, 4, T, Q> & operator+=(U s);
83 GLM_FUNC_DECL mat<2, 4, T, Q> & operator+=(mat<2, 4, U, Q> const& m);
85 GLM_FUNC_DECL mat<2, 4, T, Q> & operator-=(U s);
87 GLM_FUNC_DECL mat<2, 4, T, Q> & operator-=(mat<2, 4, U, Q> const& m);
89 GLM_FUNC_DECL mat<2, 4, T, Q> & operator*=(U s);
91 GLM_FUNC_DECL mat<2, 4, T, Q> & operator/=(U s);
95 GLM_FUNC_DECL mat<2, 4, T, Q> & operator++ ();
96 GLM_FUNC_DECL mat<2, 4, T, Q> & operator-- ();
97 GLM_FUNC_DECL mat<2, 4, T, Q> operator++(
int);
98 GLM_FUNC_DECL mat<2, 4, T, Q> operator--(
int);
103 template<typename T, qualifier Q>
104 GLM_FUNC_DECL mat<2, 4, T, Q> operator+(mat<2, 4, T, Q> const& m);
106 template<typename T, qualifier Q>
107 GLM_FUNC_DECL mat<2, 4, T, Q> operator-(mat<2, 4, T, Q> const& m);
111 template<typename T, qualifier Q>
112 GLM_FUNC_DECL mat<2, 4, T, Q> operator+(mat<2, 4, T, Q> const& m, T scalar);
114 template<typename T, qualifier Q>
115 GLM_FUNC_DECL mat<2, 4, T, Q> operator+(mat<2, 4, T, Q> const& m1, mat<2, 4, T, Q> const& m2);
117 template<typename T, qualifier Q>
118 GLM_FUNC_DECL mat<2, 4, T, Q> operator-(mat<2, 4, T, Q> const& m, T scalar);
120 template<typename T, qualifier Q>
121 GLM_FUNC_DECL mat<2, 4, T, Q> operator-(mat<2, 4, T, Q> const& m1, mat<2, 4, T, Q> const& m2);
123 template<typename T, qualifier Q>
124 GLM_FUNC_DECL mat<2, 4, T, Q> operator*(mat<2, 4, T, Q> const& m, T scalar);
126 template<typename T, qualifier Q>
127 GLM_FUNC_DECL mat<2, 4, T, Q> operator*(T scalar, mat<2, 4, T, Q> const& m);
129 template<typename T, qualifier Q>
130 GLM_FUNC_DECL typename mat<2, 4, T, Q>::col_type operator*(mat<2, 4, T, Q> const& m, typename mat<2, 4, T, Q>::row_type const& v);
132 template<typename T, qualifier Q>
133 GLM_FUNC_DECL typename mat<2, 4, T, Q>::row_type operator*(typename mat<2, 4, T, Q>::col_type const& v, mat<2, 4, T, Q> const& m);
135 template<typename T, qualifier Q>
136 GLM_FUNC_DECL mat<4, 4, T, Q> operator*(mat<2, 4, T, Q> const& m1, mat<4, 2, T, Q> const& m2);
138 template<typename T, qualifier Q>
139 GLM_FUNC_DECL mat<2, 4, T, Q> operator*(mat<2, 4, T, Q> const& m1, mat<2, 2, T, Q> const& m2);
141 template<typename T, qualifier Q>
142 GLM_FUNC_DECL mat<3, 4, T, Q> operator*(mat<2, 4, T, Q> const& m1, mat<3, 2, T, Q> const& m2);
144 template<typename T, qualifier Q>
145 GLM_FUNC_DECL mat<2, 4, T, Q> operator/(mat<2, 4, T, Q> const& m, T scalar);
147 template<typename T, qualifier Q>
148 GLM_FUNC_DECL mat<2, 4, T, Q> operator/(T scalar, mat<2, 4, T, Q> const& m);
152 template<typename T, qualifier Q>
153 GLM_FUNC_DECL
bool operator==(mat<2, 4, T, Q> const& m1, mat<2, 4, T, Q> const& m2);
155 template<typename T, qualifier Q>
156 GLM_FUNC_DECL
bool operator!=(mat<2, 4, T, Q> const& m1, mat<2, 4, T, Q> const& m2);
159 #ifndef GLM_EXTERNAL_TEMPLATE 160 #include "type_mat2x4.inl"
GLM_FUNC_DECL T length(qua< T, Q > const &q)
Returns the norm of a quaternions.