| 0.9.6

- Main Page
- Modules
- Files

- File List

type_mat3x3.hpp
Go to the documentation of this file.
1
33 #pragma once
34
35 #include "../fwd.hpp"
36 #include "type_vec3.hpp"
37 #include "type_mat.hpp"
38 #include <limits>
39 #include <cstddef>
40
41 namespace glm
42 {
43 template <typename T, precision P = defaultp>
44 struct tmat3x3
45 {
46 typedef tvec3<T, P> col_type;
47 typedef tvec3<T, P> row_type;
48 typedef tmat3x3<T, P> type;
49 typedef tmat3x3<T, P> transpose_type;
50 typedef T value_type;
51
52 template <typename U, precision Q>
53 friend tvec3<U, Q> operator/(tmat3x3<U, Q> const & m, tvec3<U, Q> const & v);
54 template <typename U, precision Q>
55 friend tvec3<U, Q> operator/(tvec3<U, Q> const & v, tmat3x3<U, Q> const & m);
56
57 private:
59 col_type value[3];
61
62 public:
63 // Constructors
64 GLM_FUNC_DECL tmat3x3();
65 template <precision Q>
66 GLM_FUNC_DECL tmat3x3(tmat3x3<T, Q> const & m);
67
68 GLM_FUNC_DECL explicit tmat3x3(ctor);
69 GLM_FUNC_DECL explicit tmat3x3(T const & s);
70 GLM_FUNC_DECL tmat3x3(
71 T const & x0, T const & y0, T const & z0,
72 T const & x1, T const & y1, T const & z1,
73 T const & x2, T const & y2, T const & z2);
74 GLM_FUNC_DECL tmat3x3(
75 col_type const & v0,
76 col_type const & v1,
77 col_type const & v2);
78
80 // Conversions
81
82 template<
83 typename X1, typename Y1, typename Z1,
84 typename X2, typename Y2, typename Z2,
85 typename X3, typename Y3, typename Z3>
86 GLM_FUNC_DECL tmat3x3(
87 X1 const & x1, Y1 const & y1, Z1 const & z1,
88 X2 const & x2, Y2 const & y2, Z2 const & z2,
89 X3 const & x3, Y3 const & y3, Z3 const & z3);
90
91 template <typename V1, typename V2, typename V3>
92 GLM_FUNC_DECL tmat3x3(
93 tvec3<V1, P> const & v1,
94 tvec3<V2, P> const & v2,
95 tvec3<V3, P> const & v3);
96
98 // Matrix conversions
99
100 # ifdef GLM_FORCE_EXPLICIT_CTOR
101 template <typename U, precision Q>
102 GLM_FUNC_DECL explicit tmat3x3(tmat3x3<U, Q> const & m);
103 # else
104 template <typename U, precision Q>
105 GLM_FUNC_DECL tmat3x3(tmat3x3<U, Q> const & m);
106 # endif
107
108 GLM_FUNC_DECL explicit tmat3x3(tmat2x2<T, P> const & x);
109 GLM_FUNC_DECL explicit tmat3x3(tmat4x4<T, P> const & x);
110 GLM_FUNC_DECL explicit tmat3x3(tmat2x3<T, P> const & x);
111 GLM_FUNC_DECL explicit tmat3x3(tmat3x2<T, P> const & x);
112 GLM_FUNC_DECL explicit tmat3x3(tmat2x4<T, P> const & x);
113 GLM_FUNC_DECL explicit tmat3x3(tmat4x2<T, P> const & x);
114 GLM_FUNC_DECL explicit tmat3x3(tmat3x4<T, P> const & x);
115 GLM_FUNC_DECL explicit tmat3x3(tmat4x3<T, P> const & x);
116
118 // Accesses
119
120 # ifdef GLM_FORCE_SIZE_FUNC
121 typedef size_t size_type;
122 GLM_FUNC_DECL GLM_CONSTEXPR size_t size() const;
123
124 GLM_FUNC_DECL col_type & operator[](size_type i);
125 GLM_FUNC_DECL col_type const & operator[](size_type i) const;
126 # else
127 typedef length_t length_type;
128 GLM_FUNC_DECL GLM_CONSTEXPR length_type length() const;
129
130 GLM_FUNC_DECL col_type & operator[](length_type i);
131 GLM_FUNC_DECL col_type const & operator[](length_type i) const;
132 # endif//GLM_FORCE_SIZE_FUNC
133
135 // Unary arithmetic operators
136
137 template <typename U>
138 GLM_FUNC_DECL tmat3x3<T, P>& operator= (tmat3x3<U, P> const & m);
139 template <typename U>
140 GLM_FUNC_DECL tmat3x3<T, P>& operator+= (U s);
141 template <typename U>
142 GLM_FUNC_DECL tmat3x3<T, P>& operator+= (tmat3x3<U, P> const & m);
143 template <typename U>
144 GLM_FUNC_DECL tmat3x3<T, P>& operator-= (U s);
145 template <typename U>
146 GLM_FUNC_DECL tmat3x3<T, P>& operator-= (tmat3x3<U, P> const & m);
147 template <typename U>
148 GLM_FUNC_DECL tmat3x3<T, P>& operator*= (U s);
149 template <typename U>
150 GLM_FUNC_DECL tmat3x3<T, P>& operator*= (tmat3x3<U, P> const & m);
151 template <typename U>
152 GLM_FUNC_DECL tmat3x3<T, P>& operator/= (U s);
153 template <typename U>
154 GLM_FUNC_DECL tmat3x3<T, P>& operator/= (tmat3x3<U, P> const & m);
155
157 // Increment and decrement operators
158
159 GLM_FUNC_DECL tmat3x3<T, P> & operator++ ();
160 GLM_FUNC_DECL tmat3x3<T, P> & operator-- ();
161 GLM_FUNC_DECL tmat3x3<T, P> operator++(int);
162 GLM_FUNC_DECL tmat3x3<T, P> operator--(int);
163 };
164
165 // Binary operators
166 template <typename T, precision P>
167 GLM_FUNC_DECL tmat3x3<T, P> operator+ (
168 tmat3x3<T, P> const & m,
169 T const & s);
170
171 template <typename T, precision P>
172 GLM_FUNC_DECL tmat3x3<T, P> operator+ (
173 T const & s,
174 tmat3x3<T, P> const & m);
175
176 template <typename T, precision P>
177 GLM_FUNC_DECL tmat3x3<T, P> operator+ (
178 tmat3x3<T, P> const & m1,
179 tmat3x3<T, P> const & m2);
180
181 template <typename T, precision P>
182 GLM_FUNC_DECL tmat3x3<T, P> operator- (
183 tmat3x3<T, P> const & m,
184 T const & s);
185
186 template <typename T, precision P>
187 GLM_FUNC_DECL tmat3x3<T, P> operator- (
188 T const & s,
189 tmat3x3<T, P> const & m);
190
191 template <typename T, precision P>
192 GLM_FUNC_DECL tmat3x3<T, P> operator- (
193 tmat3x3<T, P> const & m1,
194 tmat3x3<T, P> const & m2);
195
196 template <typename T, precision P>
197 GLM_FUNC_DECL tmat3x3<T, P> operator* (
198 tmat3x3<T, P> const & m,
199 T const & s);
200
201 template <typename T, precision P>
202 GLM_FUNC_DECL tmat3x3<T, P> operator* (
203 T const & s,
204 tmat3x3<T, P> const & m);
205
206 template <typename T, precision P>
207 GLM_FUNC_DECL typename tmat3x3<T, P>::col_type operator* (
208 tmat3x3<T, P> const & m,
209 typename tmat3x3<T, P>::row_type const & v);
210
211 template <typename T, precision P>
212 GLM_FUNC_DECL typename tmat3x3<T, P>::row_type operator* (
213 typename tmat3x3<T, P>::col_type const & v,
214 tmat3x3<T, P> const & m);
215
216 template <typename T, precision P>
217 GLM_FUNC_DECL tmat3x3<T, P> operator* (
218 tmat3x3<T, P> const & m1,
219 tmat3x3<T, P> const & m2);
220
221 template <typename T, precision P>
222 GLM_FUNC_DECL tmat2x3<T, P> operator* (
223 tmat3x3<T, P> const & m1,
224 tmat2x3<T, P> const & m2);
225
226 template <typename T, precision P>
227 GLM_FUNC_DECL tmat4x3<T, P> operator* (
228 tmat3x3<T, P> const & m1,
229 tmat4x3<T, P> const & m2);
230
231 template <typename T, precision P>
232 GLM_FUNC_DECL tmat3x3<T, P> operator/ (
233 tmat3x3<T, P> const & m,
234 T const & s);
235
236 template <typename T, precision P>
237 GLM_FUNC_DECL tmat3x3<T, P> operator/ (
238 T const & s,
239 tmat3x3<T, P> const & m);
240
241 template <typename T, precision P>
242 GLM_FUNC_DECL typename tmat3x3<T, P>::col_type operator/ (
243 tmat3x3<T, P> const & m,
244 typename tmat3x3<T, P>::row_type const & v);
245
246 template <typename T, precision P>
247 GLM_FUNC_DECL typename tmat3x3<T, P>::row_type operator/ (
248 typename tmat3x3<T, P>::col_type const & v,
249 tmat3x3<T, P> const & m);
250
251 template <typename T, precision P>
252 GLM_FUNC_DECL tmat3x3<T, P> operator/ (
253 tmat3x3<T, P> const & m1,
254 tmat3x3<T, P> const & m2);
255
256 // Unary constant operators
257 template <typename T, precision P>
258 GLM_FUNC_DECL tmat3x3<T, P> const operator-(
259 tmat3x3<T, P> const & m);
260 }//namespace glm
261
262 #ifndef GLM_EXTERNAL_TEMPLATE
263 #include "type_mat3x3.inl"
264 #endif
type_vec3.hpp
OpenGL Mathematics (glm.g-truc.net)
glm::length
GLM_FUNC_DECL T length(vecType< T, P > const &x)
Returns the length of x, i.e., sqrt(x * x).
glm
Definition: _noise.hpp:39
type_mat.hpp
OpenGL Mathematics (glm.g-truc.net)