0.9.9 API documenation
func_matrix.hpp
Go to the documentation of this file.
1 
15 #pragma once
16 
17 // Dependencies
18 #include "../detail/qualifier.hpp"
19 #include "../detail/setup.hpp"
20 #include "../detail/type_mat.hpp"
21 #include "../vec2.hpp"
22 #include "../vec3.hpp"
23 #include "../vec4.hpp"
24 #include "../mat2x2.hpp"
25 #include "../mat2x3.hpp"
26 #include "../mat2x4.hpp"
27 #include "../mat3x2.hpp"
28 #include "../mat3x3.hpp"
29 #include "../mat3x4.hpp"
30 #include "../mat4x2.hpp"
31 #include "../mat4x3.hpp"
32 #include "../mat4x4.hpp"
33 
34 namespace glm{
35 namespace detail
36 {
37  template<typename T, qualifier P>
38  struct outerProduct_trait<2, 2, T, P>
39  {
40  typedef mat<2, 2, T, P> type;
41  };
42 
43  template<typename T, qualifier P>
44  struct outerProduct_trait<2, 3, T, P>
45  {
46  typedef mat<3, 2, T, P> type;
47  };
48 
49  template<typename T, qualifier P>
50  struct outerProduct_trait<2, 4, T, P>
51  {
52  typedef mat<4, 2, T, P> type;
53  };
54 
55  template<typename T, qualifier P>
56  struct outerProduct_trait<3, 2, T, P>
57  {
58  typedef mat<2, 3, T, P> type;
59  };
60 
61  template<typename T, qualifier P>
62  struct outerProduct_trait<3, 3, T, P>
63  {
64  typedef mat<3, 3, T, P> type;
65  };
66 
67  template<typename T, qualifier P>
68  struct outerProduct_trait<3, 4, T, P>
69  {
70  typedef mat<4, 3, T, P> type;
71  };
72 
73  template<typename T, qualifier P>
74  struct outerProduct_trait<4, 2, T, P>
75  {
76  typedef mat<2, 4, T, P> type;
77  };
78 
79  template<typename T, qualifier P>
80  struct outerProduct_trait<4, 3, T, P>
81  {
82  typedef mat<3, 4, T, P> type;
83  };
84 
85  template<typename T, qualifier P>
86  struct outerProduct_trait<4, 4, T, P>
87  {
88  typedef mat<4, 4, T, P> type;
89  };
90 
91 }//namespace detail
92 
95 
103  template<typename T, qualifier P, template<typename, qualifier> class matType>
104  GLM_FUNC_DECL matType<T, P> matrixCompMult(matType<T, P> const & x, matType<T, P> const & y);
105 
112  template<length_t DA, length_t DB, typename T, qualifier P>
113  GLM_FUNC_DECL typename detail::outerProduct_trait<DA, DB, T, P>::type outerProduct(vec<DA, T, P> const & c, vec<DB, T, P> const & r);
114 
121  template<typename T, qualifier P, template<typename, qualifier> class matType>
122  GLM_FUNC_DECL typename matType<T, P>::transpose_type transpose(matType<T, P> const & x);
123 
130  template<typename T, qualifier P, template<typename, qualifier> class matType>
131  GLM_FUNC_DECL T determinant(matType<T, P> const & m);
132 
139  template<typename T, qualifier P, template<typename, qualifier> class matType>
140  GLM_FUNC_DECL matType<T, P> inverse(matType<T, P> const & m);
141 
143 }//namespace glm
144 
145 #include "func_matrix.inl"
GLM_FUNC_DECL matType< T, P >::transpose_type transpose(matType< T, P > const &x)
Returns the transposed matrix of x.
GLM_FUNC_DECL T determinant(matType< T, P > const &m)
Return the determinant of a squared matrix.
GLM_FUNC_DECL matType< T, P > inverse(matType< T, P > const &m)
Return the inverse of a squared matrix.
Definition: _noise.hpp:11
GLM_FUNC_DECL detail::outerProduct_trait< DA, DB, T, P >::type outerProduct(vec< DA, T, P > const &c, vec< DB, 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...