0.9.9 API documentation
matrix.hpp
Go to the documentation of this file.
1 
13 #pragma once
14 
15 // Dependencies
16 #include "detail/qualifier.hpp"
17 #include "detail/setup.hpp"
18 #include "vec2.hpp"
19 #include "vec3.hpp"
20 #include "vec4.hpp"
21 #include "mat2x2.hpp"
22 #include "mat2x3.hpp"
23 #include "mat2x4.hpp"
24 #include "mat3x2.hpp"
25 #include "mat3x3.hpp"
26 #include "mat3x4.hpp"
27 #include "mat4x2.hpp"
28 #include "mat4x3.hpp"
29 #include "mat4x4.hpp"
30 
31 namespace glm {
32 namespace detail
33 {
34  template<length_t C, length_t R, typename T, qualifier Q>
35  struct outerProduct_trait{};
36 
37  template<typename T, qualifier Q>
38  struct outerProduct_trait<2, 2, T, Q>
39  {
40  typedef mat<2, 2, T, Q> type;
41  };
42 
43  template<typename T, qualifier Q>
44  struct outerProduct_trait<2, 3, T, Q>
45  {
46  typedef mat<3, 2, T, Q> type;
47  };
48 
49  template<typename T, qualifier Q>
50  struct outerProduct_trait<2, 4, T, Q>
51  {
52  typedef mat<4, 2, T, Q> type;
53  };
54 
55  template<typename T, qualifier Q>
56  struct outerProduct_trait<3, 2, T, Q>
57  {
58  typedef mat<2, 3, T, Q> type;
59  };
60 
61  template<typename T, qualifier Q>
62  struct outerProduct_trait<3, 3, T, Q>
63  {
64  typedef mat<3, 3, T, Q> type;
65  };
66 
67  template<typename T, qualifier Q>
68  struct outerProduct_trait<3, 4, T, Q>
69  {
70  typedef mat<4, 3, T, Q> type;
71  };
72 
73  template<typename T, qualifier Q>
74  struct outerProduct_trait<4, 2, T, Q>
75  {
76  typedef mat<2, 4, T, Q> type;
77  };
78 
79  template<typename T, qualifier Q>
80  struct outerProduct_trait<4, 3, T, Q>
81  {
82  typedef mat<3, 4, T, Q> type;
83  };
84 
85  template<typename T, qualifier Q>
86  struct outerProduct_trait<4, 4, T, Q>
87  {
88  typedef mat<4, 4, T, Q> type;
89  };
90 }//namespace detail
91 
94 
105  template<length_t C, length_t R, typename T, qualifier Q>
106  GLM_FUNC_DECL mat<C, R, T, Q> matrixCompMult(mat<C, R, T, Q> const& x, mat<C, R, T, Q> const& y);
107 
119  template<length_t C, length_t R, typename T, qualifier Q>
120  GLM_FUNC_DECL typename detail::outerProduct_trait<C, R, T, Q>::type outerProduct(vec<C, T, Q> const& c, vec<R, T, Q> const& r);
121 
131  template<length_t C, length_t R, typename T, qualifier Q>
132  GLM_FUNC_DECL typename mat<C, R, T, Q>::transpose_type transpose(mat<C, R, T, Q> const& x);
133 
143  template<length_t C, length_t R, typename T, qualifier Q>
144  GLM_FUNC_DECL T determinant(mat<C, R, T, Q> const& m);
145 
155  template<length_t C, length_t R, typename T, qualifier Q>
156  GLM_FUNC_DECL mat<C, R, T, Q> inverse(mat<C, R, T, Q> const& m);
157 
159 }//namespace glm
160 
161 #include "detail/func_matrix.inl"
GLM_FUNC_DECL mat< C, R, T, Q > inverse(mat< C, R, T, Q > const &m)
Return the inverse of a squared matrix.
GLM_FUNC_DECL mat< C, R, T, Q > matrixCompMult(mat< C, R, T, Q > const &x, mat< C, R, T, Q > const &y)
Multiply matrix x by matrix y component-wise, i.e., result[i][j] is the scalar product of x[i][j] and...
Core features
Core features
Core features
Core features
Core features
Core features
GLM_FUNC_DECL detail::outerProduct_trait< C, R, T, Q >::type outerProduct(vec< C, T, Q > const &c, vec< R, T, Q > const &r)
Treats the first parameter c as a column vector and the second parameter r as a row vector and does a...
Core features
Core features
Core features
Core features
Core features
Definition: common.hpp:20
Core features
GLM_FUNC_DECL T determinant(mat< C, R, T, Q > const &m)
Return the determinant of a squared matrix.
GLM_FUNC_DECL mat< C, R, T, Q >::transpose_type transpose(mat< C, R, T, Q > const &x)
Returns the transposed matrix of x.