0.9.7: type_mat2x3.hpp Source File

| 0.9.7

- 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 # ifdef GLM_META_PROG_HELPERS
54 static GLM_RELAXED_CONSTEXPR length_t components = 2;
55 static GLM_RELAXED_CONSTEXPR length_t cols = 2;
56 static GLM_RELAXED_CONSTEXPR length_t rows = 3;
57 static GLM_RELAXED_CONSTEXPR precision prec = P;
58 # endif//GLM_META_PROG_HELPERS
59
60 private:
61 col_type value[2];
62
63 public:
64 // -- Constructors --
65
66 GLM_FUNC_DECL tmat2x3() GLM_DEFAULT_CTOR;
67 GLM_FUNC_DECL tmat2x3(tmat2x3<T, P> const & m) GLM_DEFAULT;
68 template <precision Q>
69 GLM_FUNC_DECL tmat2x3(tmat2x3<T, Q> const & m);
70
71 GLM_FUNC_DECL explicit tmat2x3(ctor);
72 GLM_FUNC_DECL explicit tmat2x3(T const & s);
73 GLM_FUNC_DECL tmat2x3(
74 T const & x0, T const & y0, T const & z0,
75 T const & x1, T const & y1, T const & z1);
76 GLM_FUNC_DECL tmat2x3(
77 col_type const & v0,
78 col_type const & v1);
79
80 // -- Conversions --
81
82 template <typename X1, typename Y1, typename Z1, typename X2, typename Y2, typename Z2>
83 GLM_FUNC_DECL tmat2x3(
84 X1 const & x1, Y1 const & y1, Z1 const & z1,
85 X2 const & x2, Y2 const & y2, Z2 const & z2);
86
87 template <typename U, typename V>
88 GLM_FUNC_DECL tmat2x3(
89 tvec3<U, P> const & v1,
90 tvec3<V, P> const & v2);
91
92 // -- Matrix conversions --
93
94 template <typename U, precision Q>
95 GLM_FUNC_DECL GLM_EXPLICIT tmat2x3(tmat2x3<U, Q> const & m);
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
106 // -- Accesses --
107
108 # ifdef GLM_FORCE_SIZE_FUNC
109 typedef size_t size_type;
110 GLM_FUNC_DECL GLM_CONSTEXPR size_t size() const;
111
112 GLM_FUNC_DECL col_type & operator[](size_type i);
113 GLM_FUNC_DECL col_type const & operator[](size_type i) const;
114 # else
115 typedef length_t length_type;
116 GLM_FUNC_DECL GLM_CONSTEXPR length_type length() const;
117
118 GLM_FUNC_DECL col_type & operator[](length_type i);
119 GLM_FUNC_DECL col_type const & operator[](length_type i) const;
120 # endif//GLM_FORCE_SIZE_FUNC
121
122 // -- Unary arithmetic operators --
123
124 GLM_FUNC_DECL tmat2x3<T, P> & operator=(tmat2x3<T, P> const & m) GLM_DEFAULT;
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
141 // -- Increment and decrement operators --
142
143 GLM_FUNC_DECL tmat2x3<T, P> & operator++ ();
144 GLM_FUNC_DECL tmat2x3<T, P> & operator-- ();
145 GLM_FUNC_DECL tmat2x3<T, P> operator++(int);
146 GLM_FUNC_DECL tmat2x3<T, P> operator--(int);
147 };
148
149 // -- Unary operators --
150
151 template <typename T, precision P>
152 GLM_FUNC_DECL tmat2x3<T, P> const operator-(tmat2x3<T, P> const & m);
153
154 // -- Binary operators --
155
156 template <typename T, precision P>
157 GLM_FUNC_DECL tmat2x3<T, P> operator+(tmat2x3<T, P> const & m, T const & s);
158
159 template <typename T, precision P>
160 GLM_FUNC_DECL tmat2x3<T, P> operator+(tmat2x3<T, P> const & m1, tmat2x3<T, P> const & m2);
161
162 template <typename T, precision P>
163 GLM_FUNC_DECL tmat2x3<T, P> operator-(tmat2x3<T, P> const & m, T const & s);
164
165 template <typename T, precision P>
166 GLM_FUNC_DECL tmat2x3<T, P> operator-(tmat2x3<T, P> const & m1, tmat2x3<T, P> const & m2);
167
168 template <typename T, precision P>
169 GLM_FUNC_DECL tmat2x3<T, P> operator*(tmat2x3<T, P> const & m, T const & s);
170
171 template <typename T, precision P>
172 GLM_FUNC_DECL tmat2x3<T, P> operator*(T const & s, tmat2x3<T, P> const & m);
173
174 template <typename T, precision P>
175 GLM_FUNC_DECL typename tmat2x3<T, P>::col_type operator*(tmat2x3<T, P> const & m, typename tmat2x3<T, P>::row_type const & v);
176
177 template <typename T, precision P>
178 GLM_FUNC_DECL typename tmat2x3<T, P>::row_type operator*(typename tmat2x3<T, P>::col_type const & v, tmat2x3<T, P> const & m);
179
180 template <typename T, precision P>
181 GLM_FUNC_DECL tmat2x3<T, P> operator*(tmat2x3<T, P> const & m1, tmat2x2<T, P> const & m2);
182
183 template <typename T, precision P>
184 GLM_FUNC_DECL tmat3x3<T, P> operator*(tmat2x3<T, P> const & m1, tmat3x2<T, P> const & m2);
185
186 template <typename T, precision P>
187 GLM_FUNC_DECL tmat4x3<T, P> operator*(tmat2x3<T, P> const & m1, tmat4x2<T, P> const & m2);
188
189 template <typename T, precision P>
190 GLM_FUNC_DECL tmat2x3<T, P> operator/(tmat2x3<T, P> const & m, T const & s);
191
192 template <typename T, precision P>
193 GLM_FUNC_DECL tmat2x3<T, P> operator/(T const & s, tmat2x3<T, P> const & m);
194
195 // -- Boolean operators --
196
197 template <typename T, precision P>
198 GLM_FUNC_DECL bool operator==(tmat2x3<T, P> const & m1, tmat2x3<T, P> const & m2);
199
200 template <typename T, precision P>
201 GLM_FUNC_DECL bool operator!=(tmat2x3<T, P> const & m1, tmat2x3<T, P> const & m2);
202 }//namespace glm
203
204 #ifndef GLM_EXTERNAL_TEMPLATE
205 #include "type_mat2x3.inl"
206 #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:40
type_vec2.hpp
OpenGL Mathematics (glm.g-truc.net)
type_mat.hpp
OpenGL Mathematics (glm.g-truc.net)