simd_mat4.hpp
Go to the documentation of this file.
00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 
00019 
00020 
00021 
00022 
00023 
00024 
00025 
00026 
00027 
00028 
00029 
00030 
00031 
00032 
00033 
00034 
00035 
00036 
00037 
00038 #pragma once
00039 
00040 // Dependencies
00041 #include "../detail/setup.hpp"
00042 
00043 #if(GLM_ARCH != GLM_ARCH_PURE)
00044 
00045 #if(GLM_ARCH & GLM_ARCH_SSE2)
00046 #       include "../detail/intrinsic_matrix.hpp"
00047 #       include "../gtx/simd_vec4.hpp"
00048 #else
00049 #       error "GLM: GLM_GTX_simd_mat4 requires compiler support of SSE2 through intrinsics"
00050 #endif
00051 
00052 #if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
00053 #       pragma message("GLM: GLM_GTX_simd_mat4 extension included")
00054 #endif
00055 
00056 namespace glm{
00057 namespace detail
00058 {
00061         GLM_ALIGNED_STRUCT(16) fmat4x4SIMD
00062         {
00063                 enum ctor{_null};
00064                 typedef float value_type;
00065                 typedef fvec4SIMD col_type;
00066                 typedef fvec4SIMD row_type;
00067                 typedef std::size_t size_type;
00068                 typedef fmat4x4SIMD type;
00069                 typedef fmat4x4SIMD transpose_type;
00070 
00071                 GLM_FUNC_DECL length_t length() const;
00072 
00073                 fvec4SIMD Data[4];
00074 
00076                 // Constructors
00077 
00078                 fmat4x4SIMD();
00079                 explicit fmat4x4SIMD(float const & s);
00080                 explicit fmat4x4SIMD(
00081                         float const & x0, float const & y0, float const & z0, float const & w0,
00082                         float const & x1, float const & y1, float const & z1, float const & w1,
00083                         float const & x2, float const & y2, float const & z2, float const & w2,
00084                         float const & x3, float const & y3, float const & z3, float const & w3);
00085                 explicit fmat4x4SIMD(
00086                         fvec4SIMD const & v0,
00087                         fvec4SIMD const & v1,
00088                         fvec4SIMD const & v2,
00089                         fvec4SIMD const & v3);
00090                 explicit fmat4x4SIMD(
00091                         mat4x4 const & m);
00092                 explicit fmat4x4SIMD(
00093                         __m128 const in[4]);
00094 
00095                 // Conversions
00096                 //template <typename U> 
00097                 //explicit tmat4x4(tmat4x4<U> const & m);
00098 
00099                 //explicit tmat4x4(tmat2x2<T> const & x);
00100                 //explicit tmat4x4(tmat3x3<T> const & x);
00101                 //explicit tmat4x4(tmat2x3<T> const & x);
00102                 //explicit tmat4x4(tmat3x2<T> const & x);
00103                 //explicit tmat4x4(tmat2x4<T> const & x);
00104                 //explicit tmat4x4(tmat4x2<T> const & x);
00105                 //explicit tmat4x4(tmat3x4<T> const & x);
00106                 //explicit tmat4x4(tmat4x3<T> const & x);
00107 
00108                 // Accesses
00109                 fvec4SIMD & operator[](length_t i);
00110                 fvec4SIMD const & operator[](length_t i) const;
00111 
00112                 // Unary updatable operators
00113                 fmat4x4SIMD & operator= (fmat4x4SIMD const & m);
00114                 fmat4x4SIMD & operator+= (float const & s);
00115                 fmat4x4SIMD & operator+= (fmat4x4SIMD const & m);
00116                 fmat4x4SIMD & operator-= (float const & s);
00117                 fmat4x4SIMD & operator-= (fmat4x4SIMD const & m);
00118                 fmat4x4SIMD & operator*= (float const & s);
00119                 fmat4x4SIMD & operator*= (fmat4x4SIMD const & m);
00120                 fmat4x4SIMD & operator/= (float const & s);
00121                 fmat4x4SIMD & operator/= (fmat4x4SIMD const & m);
00122                 fmat4x4SIMD & operator++ ();
00123                 fmat4x4SIMD & operator-- ();
00124         };
00125 
00126         // Binary operators
00127         fmat4x4SIMD operator+ (fmat4x4SIMD const & m, float const & s);
00128         fmat4x4SIMD operator+ (float const & s, fmat4x4SIMD const & m);
00129         fmat4x4SIMD operator+ (fmat4x4SIMD const & m1, fmat4x4SIMD const & m2);
00130 
00131         fmat4x4SIMD operator- (fmat4x4SIMD const & m, float const & s);
00132         fmat4x4SIMD operator- (float const & s, fmat4x4SIMD const & m);
00133         fmat4x4SIMD operator- (fmat4x4SIMD const & m1, fmat4x4SIMD const & m2);
00134 
00135         fmat4x4SIMD operator* (fmat4x4SIMD const & m, float const & s);
00136         fmat4x4SIMD operator* (float const & s, fmat4x4SIMD const & m);
00137 
00138         fvec4SIMD operator* (fmat4x4SIMD const & m, fvec4SIMD const & v);
00139         fvec4SIMD operator* (fvec4SIMD const & v, fmat4x4SIMD const & m);
00140 
00141         fmat4x4SIMD operator* (fmat4x4SIMD const & m1, fmat4x4SIMD const & m2);
00142 
00143         fmat4x4SIMD operator/ (fmat4x4SIMD const & m, float const & s);
00144         fmat4x4SIMD operator/ (float const & s, fmat4x4SIMD const & m);
00145 
00146         fvec4SIMD operator/ (fmat4x4SIMD const & m, fvec4SIMD const & v);
00147         fvec4SIMD operator/ (fvec4SIMD const & v, fmat4x4SIMD const & m);
00148 
00149         fmat4x4SIMD operator/ (fmat4x4SIMD const & m1, fmat4x4SIMD const & m2);
00150 
00151         // Unary constant operators
00152         fmat4x4SIMD const operator-  (fmat4x4SIMD const & m);
00153         fmat4x4SIMD const operator-- (fmat4x4SIMD const & m, int);
00154         fmat4x4SIMD const operator++ (fmat4x4SIMD const & m, int);
00155 }//namespace detail
00156 
00157         typedef detail::fmat4x4SIMD simdMat4;
00158 
00161 
00164         mat4 mat4_cast(
00165                 detail::fmat4x4SIMD const & x);
00166 
00170         detail::fmat4x4SIMD matrixCompMult(
00171                 detail::fmat4x4SIMD const & x,
00172                 detail::fmat4x4SIMD const & y);
00173 
00178         detail::fmat4x4SIMD outerProduct(
00179                 detail::fvec4SIMD const & c,
00180                 detail::fvec4SIMD const & r);
00181 
00184         detail::fmat4x4SIMD transpose(
00185                 detail::fmat4x4SIMD const & x);
00186 
00189         float determinant(
00190                 detail::fmat4x4SIMD const & m);
00191 
00194         detail::fmat4x4SIMD inverse(
00195                 detail::fmat4x4SIMD const & m);
00196 
00198 }// namespace glm
00199 
00200 #include "simd_mat4.inl"
00201 
00202 #endif//(GLM_ARCH != GLM_ARCH_PURE)


rtabmap
Author(s): Mathieu Labbe
autogenerated on Thu Jun 6 2019 21:59:22