15 template<
typename T, qualifier P>
16 struct mat<4, 2, T, P>
18 typedef vec<2, T, P> col_type;
19 typedef vec<4, T, P> row_type;
20 typedef mat<4, 2, T, P> type;
21 typedef mat<2, 4, T, P> transpose_type;
30 typedef length_t length_type;
31 GLM_FUNC_DECL
static GLM_CONSTEXPR length_type
length() {
return 4; }
33 GLM_FUNC_DECL col_type & operator[](length_type i);
34 GLM_FUNC_DECL col_type
const & operator[](length_type i)
const;
38 GLM_FUNC_DECL mat() GLM_DEFAULT;
39 GLM_FUNC_DECL mat(mat<4, 2, T, P> const & m) GLM_DEFAULT;
41 GLM_FUNC_DECL mat(mat<4, 2, T, Q> const & m);
43 GLM_FUNC_DECL explicit mat(T scalar);
58 typename X1, typename Y1,
59 typename X2, typename Y2,
60 typename X3, typename Y3,
61 typename X4, typename Y4>
68 template<typename V1, typename V2, typename V3, typename V4>
70 vec<2, V1, P> const & v1,
71 vec<2, V2, P> const & v2,
72 vec<2, V3, P> const & v3,
73 vec<2, V4, P> const & v4);
77 template<typename U, qualifier Q>
78 GLM_FUNC_DECL GLM_EXPLICIT mat(mat<4, 2, U, Q> const & m);
80 GLM_FUNC_DECL GLM_EXPLICIT mat(mat<2, 2, T, P> const & x);
81 GLM_FUNC_DECL GLM_EXPLICIT mat(mat<3, 3, T, P> const & x);
82 GLM_FUNC_DECL GLM_EXPLICIT mat(mat<4, 4, T, P> const & x);
83 GLM_FUNC_DECL GLM_EXPLICIT mat(mat<2, 3, T, P> const & x);
84 GLM_FUNC_DECL GLM_EXPLICIT mat(mat<3, 2, T, P> const & x);
85 GLM_FUNC_DECL GLM_EXPLICIT mat(mat<2, 4, T, P> const & x);
86 GLM_FUNC_DECL GLM_EXPLICIT mat(mat<4, 3, T, P> const & x);
87 GLM_FUNC_DECL GLM_EXPLICIT mat(mat<3, 4, T, P> const & x);
91 GLM_FUNC_DECL mat<4, 2, T, P> & operator=(mat<4, 2, T, P> const & m) GLM_DEFAULT;
94 GLM_FUNC_DECL mat<4, 2, T, P> & operator=(mat<4, 2, U, P> const & m);
96 GLM_FUNC_DECL mat<4, 2, T, P> & operator+=(U s);
98 GLM_FUNC_DECL mat<4, 2, T, P> & operator+=(mat<4, 2, U, P> const & m);
100 GLM_FUNC_DECL mat<4, 2, T, P> & operator-=(U s);
102 GLM_FUNC_DECL mat<4, 2, T, P> & operator-=(mat<4, 2, U, P> const & m);
104 GLM_FUNC_DECL mat<4, 2, T, P> & operator*=(U s);
106 GLM_FUNC_DECL mat<4, 2, T, P> & operator/=(U s);
110 GLM_FUNC_DECL mat<4, 2, T, P> & operator++ ();
111 GLM_FUNC_DECL mat<4, 2, T, P> & operator-- ();
112 GLM_FUNC_DECL mat<4, 2, T, P> operator++(
int);
113 GLM_FUNC_DECL mat<4, 2, T, P> operator--(
int);
118 template<typename T, qualifier P>
119 GLM_FUNC_DECL mat<4, 2, T, P> operator+(mat<4, 2, T, P> const & m);
121 template<typename T, qualifier P>
122 GLM_FUNC_DECL mat<4, 2, T, P> operator-(mat<4, 2, T, P> const & m);
126 template<typename T, qualifier P>
127 GLM_FUNC_DECL mat<4, 2, T, P> operator+(mat<4, 2, T, P> const & m, T scalar);
129 template<typename T, qualifier P>
130 GLM_FUNC_DECL mat<4, 2, T, P> operator+(mat<4, 2, T, P> const & m1, mat<4, 2, T, P> const & m2);
132 template<typename T, qualifier P>
133 GLM_FUNC_DECL mat<4, 2, T, P> operator-(mat<4, 2, T, P> const & m, T scalar);
135 template<typename T, qualifier P>
136 GLM_FUNC_DECL mat<4, 2, T, P> operator-(mat<4, 2, T, P> const & m1, mat<4, 2, T, P> const& m2);
138 template<typename T, qualifier P>
139 GLM_FUNC_DECL mat<4, 2, T, P> operator*(mat<4, 2, T, P> const & m, T scalar);
141 template<typename T, qualifier P>
142 GLM_FUNC_DECL mat<4, 2, T, P> operator*(T scalar, mat<4, 2, T, P> const & m);
144 template<typename T, qualifier P>
145 GLM_FUNC_DECL typename mat<4, 2, T, P>::col_type operator*(mat<4, 2, T, P> const & m, typename mat<4, 2, T, P>::row_type const & v);
147 template<typename T, qualifier P>
148 GLM_FUNC_DECL typename mat<4, 2, T, P>::row_type operator*(typename mat<4, 2, T, P>::col_type const & v, mat<4, 2, T, P> const & m);
150 template<typename T, qualifier P>
151 GLM_FUNC_DECL mat<2, 2, T, P> operator*(mat<4, 2, T, P> const & m1, mat<2, 4, T, P> const & m2);
153 template<typename T, qualifier P>
154 GLM_FUNC_DECL mat<3, 2, T, P> operator*(mat<4, 2, T, P> const & m1, mat<3, 4, T, P> const & m2);
156 template<typename T, qualifier P>
157 GLM_FUNC_DECL mat<4, 2, T, P> operator*(mat<4, 2, T, P> const & m1, mat<4, 4, T, P> const & m2);
159 template<typename T, qualifier P>
160 GLM_FUNC_DECL mat<4, 2, T, P> operator/(mat<4, 2, T, P> const & m, T scalar);
162 template<typename T, qualifier P>
163 GLM_FUNC_DECL mat<4, 2, T, P> operator/(T scalar, mat<4, 2, T, P> const & m);
167 template<typename T, qualifier P>
168 GLM_FUNC_DECL
bool operator==(mat<4, 2, T, P> const & m1, mat<4, 2, T, P> const & m2);
170 template<typename T, qualifier P>
171 GLM_FUNC_DECL
bool operator!=(mat<4, 2, T, P> const & m1, mat<4, 2, T, P> const & m2);
174 #ifndef GLM_EXTERNAL_TEMPLATE
175 #include "type_mat4x2.inl"
GLM_FUNC_DECL T length(vec< L, T, P > const &x)
Returns the length of x, i.e., sqrt(x * x).