16 #include "../detail/setup.hpp"
18 #if(GLM_ARCH != GLM_ARCH_PURE)
20 #if(GLM_ARCH & GLM_ARCH_SSE2_BIT)
21 # include "../detail/intrinsic_matrix.hpp"
22 # include "../gtx/simd_vec4.hpp"
24 # error "GLM: GLM_GTX_simd_mat4 requires compiler support of SSE2 through intrinsics"
27 #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
28 # pragma message("GLM: GLM_GTX_simd_mat4 extension included")
29 # pragma message("GLM: GLM_GTX_simd_mat4 extension is deprecated and will be removed in GLM 0.9.9. Use mat4 instead and use compiler SIMD arguments.")
37 GLM_ALIGNED_STRUCT(16) fmat4x4SIMD
39 typedef float value_type;
40 typedef fvec4SIMD col_type;
41 typedef fvec4SIMD row_type;
42 typedef std::size_t size_type;
43 typedef fmat4x4SIMD type;
44 typedef fmat4x4SIMD transpose_type;
46 typedef tmat4x4<float, defaultp> pure_type;
47 typedef tvec4<float, defaultp> pure_row_type;
48 typedef tvec4<float, defaultp> pure_col_type;
49 typedef tmat4x4<float, defaultp> pure_transpose_type;
51 GLM_FUNC_DECL length_t
length()
const;
58 fmat4x4SIMD() GLM_DEFAULT_CTOR;
59 explicit fmat4x4SIMD(
float const & s);
61 float const & x0,
float const & y0,
float const & z0,
float const & w0,
62 float const & x1,
float const & y1,
float const & z1,
float const & w1,
63 float const & x2,
float const & y2,
float const & z2,
float const & w2,
64 float const & x3,
float const & y3,
float const & z3,
float const & w3);
69 fvec4SIMD const & v3);
89 fvec4SIMD & operator[](length_t i);
90 fvec4SIMD const & operator[](length_t i) const;
93 fmat4x4SIMD & operator= (fmat4x4SIMD const & m) GLM_DEFAULT;
94 fmat4x4SIMD & operator+= (
float const & s);
95 fmat4x4SIMD & operator+= (fmat4x4SIMD const & m);
96 fmat4x4SIMD & operator-= (
float const & s);
97 fmat4x4SIMD & operator-= (fmat4x4SIMD const & m);
98 fmat4x4SIMD & operator*= (
float const & s);
99 fmat4x4SIMD & operator*= (fmat4x4SIMD const & m);
100 fmat4x4SIMD & operator/= (
float const & s);
101 fmat4x4SIMD & operator/= (fmat4x4SIMD const & m);
102 fmat4x4SIMD & operator++ ();
103 fmat4x4SIMD & operator-- ();
107 fmat4x4SIMD operator+ (fmat4x4SIMD const & m,
float const & s);
108 fmat4x4SIMD operator+ (
float const & s, fmat4x4SIMD const & m);
109 fmat4x4SIMD operator+ (fmat4x4SIMD const & m1, fmat4x4SIMD const & m2);
111 fmat4x4SIMD operator- (fmat4x4SIMD const & m,
float const & s);
112 fmat4x4SIMD operator- (
float const & s, fmat4x4SIMD const & m);
113 fmat4x4SIMD operator- (fmat4x4SIMD const & m1, fmat4x4SIMD const & m2);
115 fmat4x4SIMD operator* (fmat4x4SIMD const & m,
float const & s);
116 fmat4x4SIMD operator* (
float const & s, fmat4x4SIMD const & m);
118 fvec4SIMD operator* (fmat4x4SIMD const & m, fvec4SIMD const & v);
119 fvec4SIMD operator* (fvec4SIMD const & v, fmat4x4SIMD const & m);
121 fmat4x4SIMD operator* (fmat4x4SIMD const & m1, fmat4x4SIMD const & m2);
123 fmat4x4SIMD operator/ (fmat4x4SIMD const & m,
float const & s);
124 fmat4x4SIMD operator/ (
float const & s, fmat4x4SIMD const & m);
126 fvec4SIMD operator/ (fmat4x4SIMD const & m, fvec4SIMD const & v);
127 fvec4SIMD operator/ (fvec4SIMD const & v, fmat4x4SIMD const & m);
129 fmat4x4SIMD operator/ (fmat4x4SIMD const & m1, fmat4x4SIMD const & m2);
132 fmat4x4SIMD const operator- (fmat4x4SIMD const & m);
133 fmat4x4SIMD const operator-- (fmat4x4SIMD const & m,
int);
134 fmat4x4SIMD const operator++ (fmat4x4SIMD const & m,
int);
137 typedef detail::fmat4x4SIMD simdMat4;
145 detail::fmat4x4SIMD const & x);
151 detail::fmat4x4SIMD const & x,
152 detail::fmat4x4SIMD const & y);
159 detail::fvec4SIMD const & c,
160 detail::fvec4SIMD const & r);
164 detail::fmat4x4SIMD transpose(
165 detail::fmat4x4SIMD const & x);
170 detail::fmat4x4SIMD const & m);
175 detail::fmat4x4SIMD const & m);
180 #include "simd_mat4.inl"
182 #endif//(GLM_ARCH != GLM_ARCH_PURE)
GLM_FUNC_DECL T determinant(matType< T, P > const &m)
Returns the transposed matrix of x.
GLM_FUNC_DECL matType< T, P > inverse(matType< T, P > const &m)
Return the inverse of a squared matrix.
mat4x4 mat4
4 columns of 4 components matrix of floating-point numbers.
highp_mat4x4 mat4x4
4 columns of 4 components matrix of floating-point numbers.
GLM_FUNC_DECL tmat4x4< T, P > mat4_cast(tquat< T, P > const &x)
Converts a quaternion to a 4 * 4 matrix.
GLM_FUNC_DECL detail::outerProduct_trait< T, P, vecTypeA, vecTypeB >::type outerProduct(vecTypeA< T, P > const &c, vecTypeB< T, P > const &r)
Treats the first parameter c as a column vector and the second parameter r as a row vector and does a...
GLM_FUNC_DECL matType< T, P > matrixCompMult(matType< T, P > const &x, matType< T, P > const &y)
Multiply matrix x by matrix y component-wise, i.e., result[i][j] is the scalar product of x[i][j] and...
GLM_FUNC_DECL T length(vecType< T, P > const &x)
Returns the length of x, i.e., sqrt(x * x).