0.9.6: type_mat3x2.hpp Source File

| 0.9.6

- Main Page
- Modules
- Files

- File List

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