0.9.9 API documenation
type_mat4x4.hpp
Go to the documentation of this file.
1 
4 #pragma once
5 
6 #include "../fwd.hpp"
7 #include "type_vec4.hpp"
8 #include "type_mat.hpp"
9 #include <limits>
10 #include <cstddef>
11 
12 namespace glm
13 {
14  template<typename T, qualifier Q>
15  struct mat<4, 4, T, Q>
16  {
17  typedef vec<4, T, Q> col_type;
18  typedef vec<4, T, Q> row_type;
19  typedef mat<4, 4, T, Q> type;
20  typedef mat<4, 4, T, Q> transpose_type;
21  typedef T value_type;
22 
23  private:
24  col_type value[4];
25 
26  public:
27  // -- Accesses --
28 
29  typedef length_t length_type;
30  GLM_FUNC_DECL static GLM_CONSTEXPR length_type length(){return 4;}
31 
32  GLM_FUNC_DECL col_type & operator[](length_type i);
33  GLM_FUNC_DECL col_type const& operator[](length_type i) const;
34 
35  // -- Constructors --
36 
37  GLM_FUNC_DECL GLM_CONSTEXPR_CTOR_CXX14 mat() GLM_DEFAULT_CTOR;
38  GLM_FUNC_DECL GLM_CONSTEXPR_CTOR_CXX14 mat(mat<4, 4, T, Q> const& m) GLM_DEFAULT;
39  template<qualifier P>
40  GLM_FUNC_DECL GLM_CONSTEXPR_CTOR_CXX14 mat(mat<4, 4, T, P> const& m);
41 
42  GLM_FUNC_DECL explicit GLM_CONSTEXPR_CTOR_CXX14 mat(T const& x);
43  GLM_FUNC_DECL GLM_CONSTEXPR_CTOR_CXX14 mat(
44  T const& x0, T const& y0, T const& z0, T const& w0,
45  T const& x1, T const& y1, T const& z1, T const& w1,
46  T const& x2, T const& y2, T const& z2, T const& w2,
47  T const& x3, T const& y3, T const& z3, T const& w3);
48  GLM_FUNC_DECL GLM_CONSTEXPR_CTOR_CXX14 mat(
49  col_type const& v0,
50  col_type const& v1,
51  col_type const& v2,
52  col_type const& v3);
53 
54  // -- Conversions --
55 
56  template<
57  typename X1, typename Y1, typename Z1, typename W1,
58  typename X2, typename Y2, typename Z2, typename W2,
59  typename X3, typename Y3, typename Z3, typename W3,
60  typename X4, typename Y4, typename Z4, typename W4>
61  GLM_FUNC_DECL GLM_CONSTEXPR_CTOR_CXX14 mat(
62  X1 const& x1, Y1 const& y1, Z1 const& z1, W1 const& w1,
63  X2 const& x2, Y2 const& y2, Z2 const& z2, W2 const& w2,
64  X3 const& x3, Y3 const& y3, Z3 const& z3, W3 const& w3,
65  X4 const& x4, Y4 const& y4, Z4 const& z4, W4 const& w4);
66 
67  template<typename V1, typename V2, typename V3, typename V4>
68  GLM_FUNC_DECL GLM_CONSTEXPR_CTOR_CXX14 mat(
69  vec<4, V1, Q> const& v1,
70  vec<4, V2, Q> const& v2,
71  vec<4, V3, Q> const& v3,
72  vec<4, V4, Q> const& v4);
73 
74  // -- Matrix conversions --
75 
76  template<typename U, qualifier P>
77  GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR_CTOR_CXX14 mat(mat<4, 4, U, P> const& m);
78 
79  GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR_CTOR_CXX14 mat(mat<2, 2, T, Q> const& x);
80  GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR_CTOR_CXX14 mat(mat<3, 3, T, Q> const& x);
81  GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR_CTOR_CXX14 mat(mat<2, 3, T, Q> const& x);
82  GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR_CTOR_CXX14 mat(mat<3, 2, T, Q> const& x);
83  GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR_CTOR_CXX14 mat(mat<2, 4, T, Q> const& x);
84  GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR_CTOR_CXX14 mat(mat<4, 2, T, Q> const& x);
85  GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR_CTOR_CXX14 mat(mat<3, 4, T, Q> const& x);
86  GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR_CTOR_CXX14 mat(mat<4, 3, T, Q> const& x);
87 
88  // -- Unary arithmetic operators --
89 
90  GLM_FUNC_DECL GLM_CONSTEXPR_CXX14 mat<4, 4, T, Q> & operator=(mat<4, 4, T, Q> const& m) GLM_DEFAULT;
91 
92  template<typename U>
93  GLM_FUNC_DECL GLM_CONSTEXPR_CXX14 mat<4, 4, T, Q> & operator=(mat<4, 4, U, Q> const& m);
94  template<typename U>
95  GLM_FUNC_DECL mat<4, 4, T, Q> & operator+=(U s);
96  template<typename U>
97  GLM_FUNC_DECL mat<4, 4, T, Q> & operator+=(mat<4, 4, U, Q> const& m);
98  template<typename U>
99  GLM_FUNC_DECL mat<4, 4, T, Q> & operator-=(U s);
100  template<typename U>
101  GLM_FUNC_DECL mat<4, 4, T, Q> & operator-=(mat<4, 4, U, Q> const& m);
102  template<typename U>
103  GLM_FUNC_DECL mat<4, 4, T, Q> & operator*=(U s);
104  template<typename U>
105  GLM_FUNC_DECL mat<4, 4, T, Q> & operator*=(mat<4, 4, U, Q> const& m);
106  template<typename U>
107  GLM_FUNC_DECL mat<4, 4, T, Q> & operator/=(U s);
108  template<typename U>
109  GLM_FUNC_DECL mat<4, 4, T, Q> & operator/=(mat<4, 4, U, Q> const& m);
110 
111  // -- Increment and decrement operators --
112 
113  GLM_FUNC_DECL mat<4, 4, T, Q> & operator++();
114  GLM_FUNC_DECL mat<4, 4, T, Q> & operator--();
115  GLM_FUNC_DECL mat<4, 4, T, Q> operator++(int);
116  GLM_FUNC_DECL mat<4, 4, T, Q> operator--(int);
117  };
118 
119  // -- Unary operators --
120 
121  template<typename T, qualifier Q>
122  GLM_FUNC_DECL mat<4, 4, T, Q> operator+(mat<4, 4, T, Q> const& m);
123 
124  template<typename T, qualifier Q>
125  GLM_FUNC_DECL mat<4, 4, T, Q> operator-(mat<4, 4, T, Q> const& m);
126 
127  // -- Binary operators --
128 
129  template<typename T, qualifier Q>
130  GLM_FUNC_DECL mat<4, 4, T, Q> operator+(mat<4, 4, T, Q> const& m, T const& s);
131 
132  template<typename T, qualifier Q>
133  GLM_FUNC_DECL mat<4, 4, T, Q> operator+(T const& s, mat<4, 4, T, Q> const& m);
134 
135  template<typename T, qualifier Q>
136  GLM_FUNC_DECL mat<4, 4, T, Q> operator+(mat<4, 4, T, Q> const& m1, mat<4, 4, T, Q> const& m2);
137 
138  template<typename T, qualifier Q>
139  GLM_FUNC_DECL mat<4, 4, T, Q> operator-(mat<4, 4, T, Q> const& m, T const& s);
140 
141  template<typename T, qualifier Q>
142  GLM_FUNC_DECL mat<4, 4, T, Q> operator-(T const& s, mat<4, 4, T, Q> const& m);
143 
144  template<typename T, qualifier Q>
145  GLM_FUNC_DECL mat<4, 4, T, Q> operator-(mat<4, 4, T, Q> const& m1, mat<4, 4, T, Q> const& m2);
146 
147  template<typename T, qualifier Q>
148  GLM_FUNC_DECL mat<4, 4, T, Q> operator*(mat<4, 4, T, Q> const& m, T const& s);
149 
150  template<typename T, qualifier Q>
151  GLM_FUNC_DECL mat<4, 4, T, Q> operator*(T const& s, mat<4, 4, T, Q> const& m);
152 
153  template<typename T, qualifier Q>
154  GLM_FUNC_DECL typename mat<4, 4, T, Q>::col_type operator*(mat<4, 4, T, Q> const& m, typename mat<4, 4, T, Q>::row_type const& v);
155 
156  template<typename T, qualifier Q>
157  GLM_FUNC_DECL typename mat<4, 4, T, Q>::row_type operator*(typename mat<4, 4, T, Q>::col_type const& v, mat<4, 4, T, Q> const& m);
158 
159  template<typename T, qualifier Q>
160  GLM_FUNC_DECL mat<2, 4, T, Q> operator*(mat<4, 4, T, Q> const& m1, mat<2, 4, T, Q> const& m2);
161 
162  template<typename T, qualifier Q>
163  GLM_FUNC_DECL mat<3, 4, T, Q> operator*(mat<4, 4, T, Q> const& m1, mat<3, 4, T, Q> const& m2);
164 
165  template<typename T, qualifier Q>
166  GLM_FUNC_DECL mat<4, 4, T, Q> operator*(mat<4, 4, T, Q> const& m1, mat<4, 4, T, Q> const& m2);
167 
168  template<typename T, qualifier Q>
169  GLM_FUNC_DECL mat<4, 4, T, Q> operator/(mat<4, 4, T, Q> const& m, T const& s);
170 
171  template<typename T, qualifier Q>
172  GLM_FUNC_DECL mat<4, 4, T, Q> operator/(T const& s, mat<4, 4, T, Q> const& m);
173 
174  template<typename T, qualifier Q>
175  GLM_FUNC_DECL typename mat<4, 4, T, Q>::col_type operator/(mat<4, 4, T, Q> const& m, typename mat<4, 4, T, Q>::row_type const& v);
176 
177  template<typename T, qualifier Q>
178  GLM_FUNC_DECL typename mat<4, 4, T, Q>::row_type operator/(typename mat<4, 4, T, Q>::col_type const& v, mat<4, 4, T, Q> const& m);
179 
180  template<typename T, qualifier Q>
181  GLM_FUNC_DECL mat<4, 4, T, Q> operator/(mat<4, 4, T, Q> const& m1, mat<4, 4, T, Q> const& m2);
182 
183  // -- Boolean operators --
184 
185  template<typename T, qualifier Q>
186  GLM_FUNC_DECL bool operator==(mat<4, 4, T, Q> const& m1, mat<4, 4, T, Q> const& m2);
187 
188  template<typename T, qualifier Q>
189  GLM_FUNC_DECL bool operator!=(mat<4, 4, T, Q> const& m1, mat<4, 4, T, Q> const& m2);
190 }//namespace glm
191 
192 #ifndef GLM_EXTERNAL_TEMPLATE
193 #include "type_mat4x4.inl"
194 #endif//GLM_EXTERNAL_TEMPLATE
Definition: common.hpp:20
GLM_FUNC_DECL T length(vec< L, T, Q > const &x)
Returns the length of x, i.e., sqrt(x * x).
Core features
Core features