0.9.6: type_mat2x3.hpp Source File

| 0.9.6

- Main Page
- Modules
- Files

- File List

type_mat2x3.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 tmat2x3
46 {
47 typedef tvec3<T, P> col_type;
48 typedef tvec2<T, P> row_type;
49 typedef tmat2x3<T, P> type;
50 typedef tmat3x2<T, P> transpose_type;
51 typedef T value_type;
52
53 private:
55 col_type value[2];
57
58 public:
59 // Constructors
60 GLM_FUNC_DECL tmat2x3();
61 template <precision Q>
62 GLM_FUNC_DECL tmat2x3(tmat2x3<T, Q> const & m);
63
64 GLM_FUNC_DECL explicit tmat2x3(ctor);
65 GLM_FUNC_DECL explicit tmat2x3(T const & s);
66 GLM_FUNC_DECL tmat2x3(
67 T const & x0, T const & y0, T const & z0,
68 T const & x1, T const & y1, T const & z1);
69 GLM_FUNC_DECL tmat2x3(
70 col_type const & v0,
71 col_type const & v1);
72
74 // Conversions
75
76 template <typename X1, typename Y1, typename Z1, typename X2, typename Y2, typename Z2>
77 GLM_FUNC_DECL tmat2x3(
78 X1 const & x1, Y1 const & y1, Z1 const & z1,
79 X2 const & x2, Y2 const & y2, Z2 const & z2);
80
81 template <typename U, typename V>
82 GLM_FUNC_DECL tmat2x3(
83 tvec3<U, P> const & v1,
84 tvec3<V, P> const & v2);
85
87 // Matrix conversion
88
89 # ifdef GLM_FORCE_EXPLICIT_CTOR
90 template <typename U, precision Q>
91 GLM_FUNC_DECL explicit tmat2x3(tmat2x3<U, Q> const & m);
92 # else
93 template <typename U, precision Q>
94 GLM_FUNC_DECL tmat2x3(tmat2x3<U, Q> const & m);
95 # endif
96
97 GLM_FUNC_DECL explicit tmat2x3(tmat2x2<T, P> const & x);
98 GLM_FUNC_DECL explicit tmat2x3(tmat3x3<T, P> const & x);
99 GLM_FUNC_DECL explicit tmat2x3(tmat4x4<T, P> const & x);
100 GLM_FUNC_DECL explicit tmat2x3(tmat2x4<T, P> const & x);
101 GLM_FUNC_DECL explicit tmat2x3(tmat3x2<T, P> const & x);
102 GLM_FUNC_DECL explicit tmat2x3(tmat3x4<T, P> const & x);
103 GLM_FUNC_DECL explicit tmat2x3(tmat4x2<T, P> const & x);
104 GLM_FUNC_DECL explicit tmat2x3(tmat4x3<T, P> const & x);
105
107 // Accesses
108
109 # ifdef GLM_FORCE_SIZE_FUNC
110 typedef size_t size_type;
111 GLM_FUNC_DECL GLM_CONSTEXPR size_t size() const;
112
113 GLM_FUNC_DECL col_type & operator[](size_type i);
114 GLM_FUNC_DECL col_type const & operator[](size_type i) const;
115 # else
116 typedef length_t length_type;
117 GLM_FUNC_DECL GLM_CONSTEXPR length_type length() const;
118
119 GLM_FUNC_DECL col_type & operator[](length_type i);
120 GLM_FUNC_DECL col_type const & operator[](length_type i) const;
121 # endif//GLM_FORCE_SIZE_FUNC
122
124 // Unary arithmetic operators
125
126 template <typename U>
127 GLM_FUNC_DECL tmat2x3<T, P> & operator= (tmat2x3<U, P> const & m);
128 template <typename U>
129 GLM_FUNC_DECL tmat2x3<T, P> & operator+= (U s);
130 template <typename U>
131 GLM_FUNC_DECL tmat2x3<T, P> & operator+= (tmat2x3<U, P> const & m);
132 template <typename U>
133 GLM_FUNC_DECL tmat2x3<T, P> & operator-= (U s);
134 template <typename U>
135 GLM_FUNC_DECL tmat2x3<T, P> & operator-= (tmat2x3<U, P> const & m);
136 template <typename U>
137 GLM_FUNC_DECL tmat2x3<T, P> & operator*= (U s);
138 template <typename U>
139 GLM_FUNC_DECL tmat2x3<T, P> & operator/= (U s);
140
142 // Increment and decrement operators
143
144 GLM_FUNC_DECL tmat2x3<T, P> & operator++ ();
145 GLM_FUNC_DECL tmat2x3<T, P> & operator-- ();
146 GLM_FUNC_DECL tmat2x3<T, P> operator++(int);
147 GLM_FUNC_DECL tmat2x3<T, P> operator--(int);
148 };
149
150 // Binary operators
151
152 template <typename T, precision P>
153 GLM_FUNC_DECL tmat2x3<T, P> operator+ (
154 tmat2x3<T, P> const & m,
155 T const & s);
156
157 template <typename T, precision P>
158 GLM_FUNC_DECL tmat2x3<T, P> operator+ (
159 tmat2x3<T, P> const & m1,
160 tmat2x3<T, P> const & m2);
161
162 template <typename T, precision P>
163 GLM_FUNC_DECL tmat2x3<T, P> operator- (
164 tmat2x3<T, P> const & m,
165 T const & s);
166
167 template <typename T, precision P>
168 GLM_FUNC_DECL tmat2x3<T, P> operator- (
169 tmat2x3<T, P> const & m1,
170 tmat2x3<T, P> const & m2);
171
172 template <typename T, precision P>
173 GLM_FUNC_DECL tmat2x3<T, P> operator* (
174 tmat2x3<T, P> const & m,
175 T const & s);
176
177 template <typename T, precision P>
178 GLM_FUNC_DECL tmat2x3<T, P> operator* (
179 T const & s,
180 tmat2x3<T, P> const & m);
181
182 template <typename T, precision P>
183 GLM_FUNC_DECL typename tmat2x3<T, P>::col_type operator* (
184 tmat2x3<T, P> const & m,
185 typename tmat2x3<T, P>::row_type const & v);
186
187 template <typename T, precision P>
188 GLM_FUNC_DECL typename tmat2x3<T, P>::row_type operator* (
189 typename tmat2x3<T, P>::col_type const & v,
190 tmat2x3<T, P> const & m);
191
192 template <typename T, precision P>
193 GLM_FUNC_DECL tmat2x3<T, P> operator* (
194 tmat2x3<T, P> const & m1,
195 tmat2x2<T, P> const & m2);
196
197 template <typename T, precision P>
198 GLM_FUNC_DECL tmat3x3<T, P> operator* (
199 tmat2x3<T, P> const & m1,
200 tmat3x2<T, P> const & m2);
201
202 template <typename T, precision P>
203 GLM_FUNC_DECL tmat4x3<T, P> operator* (
204 tmat2x3<T, P> const & m1,
205 tmat4x2<T, P> const & m2);
206
207 template <typename T, precision P>
208 GLM_FUNC_DECL tmat2x3<T, P> operator/ (
209 tmat2x3<T, P> const & m,
210 T const & s);
211
212 template <typename T, precision P>
213 GLM_FUNC_DECL tmat2x3<T, P> operator/ (
214 T const & s,
215 tmat2x3<T, P> const & m);
216
217 // Unary constant operators
218 template <typename T, precision P>
219 GLM_FUNC_DECL tmat2x3<T, P> const operator- (
220 tmat2x3<T, P> const & m);
221 }//namespace glm
222
223 #ifndef GLM_EXTERNAL_TEMPLATE
224 #include "type_mat2x3.inl"
225 #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)