GLM: func_matrix.hpp Source File

GLM 0.9.5

- Main Page
- Related Pages
- Modules
- Namespaces
- Files

- File List

func_matrix.hpp
1
40 #ifndef GLM_CORE_func_matrix
41 #define GLM_CORE_func_matrix
42
43 // Dependencies
44 #include "../detail/precision.hpp"
45 #include "../detail/setup.hpp"
46 #include "../detail/type_mat.hpp"
47 #include "../vec2.hpp"
48 #include "../vec3.hpp"
49 #include "../vec4.hpp"
50 #include "../mat2x2.hpp"
51 #include "../mat2x3.hpp"
52 #include "../mat2x4.hpp"
53 #include "../mat3x2.hpp"
54 #include "../mat3x3.hpp"
55 #include "../mat3x4.hpp"
56 #include "../mat4x2.hpp"
57 #include "../mat4x3.hpp"
58 #include "../mat4x4.hpp"
59
60 namespace glm{
61 namespace detail
62 {
63 template <typename T, precision P>
64 struct outerProduct_trait<T, P, tvec2, tvec2>
65 {
66 typedef tmat2x2<T, P> type;
67 };
68
69 template <typename T, precision P>
70 struct outerProduct_trait<T, P, tvec2, tvec3>
71 {
72 typedef tmat2x3<T, P> type;
73 };
74
75 template <typename T, precision P>
76 struct outerProduct_trait<T, P, tvec2, tvec4>
77 {
78 typedef tmat2x4<T, P> type;
79 };
80
81 template <typename T, precision P>
82 struct outerProduct_trait<T, P, tvec3, tvec2>
83 {
84 typedef tmat3x2<T, P> type;
85 };
86
87 template <typename T, precision P>
88 struct outerProduct_trait<T, P, tvec3, tvec3>
89 {
90 typedef tmat3x3<T, P> type;
91 };
92
93 template <typename T, precision P>
94 struct outerProduct_trait<T, P, tvec3, tvec4>
95 {
96 typedef tmat3x4<T, P> type;
97 };
98
99 template <typename T, precision P>
100 struct outerProduct_trait<T, P, tvec4, tvec2>
101 {
102 typedef tmat4x2<T, P> type;
103 };
104
105 template <typename T, precision P>
106 struct outerProduct_trait<T, P, tvec4, tvec3>
107 {
108 typedef tmat4x3<T, P> type;
109 };
110
111 template <typename T, precision P>
112 struct outerProduct_trait<T, P, tvec4, tvec4>
113 {
114 typedef tmat4x4<T, P> type;
115 };
116
117 }//namespace detail
118
121
129 template <typename T, precision P, template <typename, precision> class matType>
130 GLM_FUNC_DECL matType<T, P> matrixCompMult(matType<T, P> const & x, matType<T, P> const & y);
131
142 template <typename T, precision P, template <typename, precision> class vecTypeA, template <typename, precision> class vecTypeB>
143 GLM_FUNC_DECL typename detail::outerProduct_trait<T, P, vecTypeA, vecTypeB>::type outerProduct(vecTypeA<T, P> const & c, vecTypeB<T, P> const & r);
144
151 # if((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC11))
152 template <typename T, precision P, template <typename, precision> class matType>
153 GLM_FUNC_DECL typename matType<T, P>::transpose_type transpose(matType<T, P> const & x);
154 # endif
155
162 template <typename T, precision P, template <typename, precision> class matType>
163 GLM_FUNC_DECL T determinant(matType<T, P> const & m);
164
171 template <typename T, precision P, template <typename, precision> class matType>
172 GLM_FUNC_DECL matType<T, P> inverse(matType<T, P> const & m);
173
175 }//namespace glm
176
177 #include "func_matrix.inl"
178
179 #endif//GLM_CORE_func_matrix
glm::inverse
GLM_FUNC_DECL detail::tquat< T, P > inverse(detail::tquat< T, P > const &q)
Returns the q inverse.