GLM 0.9.5

- Main Page
- Related Pages
- Modules
- Namespaces
- Files

- File List

type_mat4x3.hpp
1
29 #ifndef glm_core_type_mat4x3
30 #define glm_core_type_mat4x3
31
32 #include "../fwd.hpp"
33 #include "type_vec3.hpp"
34 #include "type_vec4.hpp"
35 #include "type_mat.hpp"
36 #include <limits>
37
38 namespace glm{
39 namespace detail
40 {
41 template <typename T, precision P>
42 struct tmat4x3
43 {
44 enum ctor{_null};
45 typedef T value_type;
46 typedef std::size_t size_type;
47 typedef tvec3<T, P> col_type;
48 typedef tvec4<T, P> row_type;
49 typedef tmat4x3<T, P> type;
50 typedef tmat3x4<T, P> transpose_type;
51
52 GLM_FUNC_DECL GLM_CONSTEXPR length_t length() const;
53
54 private:
55 // Data
56 col_type value[4];
57
58 public:
59 // Constructors
60 GLM_FUNC_DECL tmat4x3();
61 GLM_FUNC_DECL tmat4x3(tmat4x3<T, P> const & m);
62 template <precision Q>
63 GLM_FUNC_DECL tmat4x3(tmat4x3<T, Q> const & m);
64
65 GLM_FUNC_DECL explicit tmat4x3(
66 ctor Null);
67 GLM_FUNC_DECL explicit tmat4x3(
68 T const & x);
69 GLM_FUNC_DECL explicit tmat4x3(
70 T const & x0, T const & y0, T const & z0,
71 T const & x1, T const & y1, T const & z1,
72 T const & x2, T const & y2, T const & z2,
73 T const & x3, T const & y3, T const & z3);
74 GLM_FUNC_DECL explicit tmat4x3(
75 col_type const & v0,
76 col_type const & v1,
77 col_type const & v2,
78 col_type const & v3);
79
80 #if(GLM_HAS_INITIALIZER_LISTS)
81 template <typename U>
82 GLM_FUNC_DECL tmat4x3(std::initializer_list<U> m);
83
84 GLM_FUNC_DECL tmat4x3(std::initializer_list<tvec3<T, P> > m);
85 #endif//GLM_HAS_INITIALIZER_LISTS
86
88 // Conversions
89 template <typename U>
90 GLM_FUNC_DECL explicit tmat4x3(
91 U const & x);
92
93 template <
94 typename X1, typename Y1, typename Z1,
95 typename X2, typename Y2, typename Z2,
96 typename X3, typename Y3, typename Z3,
97 typename X4, typename Y4, typename Z4>
98 GLM_FUNC_DECL explicit tmat4x3(
99 X1 const & x1, Y1 const & y1, Z1 const & z1,
100 X2 const & x2, Y2 const & y2, Z2 const & z2,
101 X3 const & x3, Y3 const & y3, Z3 const & z3,
102 X4 const & x4, Y4 const & y4, Z4 const & z4);
103
104 template <typename V1, typename V2, typename V3, typename V4>
105 GLM_FUNC_DECL explicit tmat4x3(
106 tvec3<V1, P> const & v1,
107 tvec3<V2, P> const & v2,
108 tvec3<V3, P> const & v3,
109 tvec3<V4, P> const & v4);
110
111 // Matrix conversions
112 template <typename U, precision Q>
113 GLM_FUNC_DECL explicit tmat4x3(tmat4x3<U, Q> const & m);
114
115 GLM_FUNC_DECL explicit tmat4x3(tmat2x2<T, P> const & x);
116 GLM_FUNC_DECL explicit tmat4x3(tmat3x3<T, P> const & x);
117 GLM_FUNC_DECL explicit tmat4x3(tmat4x4<T, P> const & x);
118 GLM_FUNC_DECL explicit tmat4x3(tmat2x3<T, P> const & x);
119 GLM_FUNC_DECL explicit tmat4x3(tmat3x2<T, P> const & x);
120 GLM_FUNC_DECL explicit tmat4x3(tmat2x4<T, P> const & x);
121 GLM_FUNC_DECL explicit tmat4x3(tmat4x2<T, P> const & x);
122 GLM_FUNC_DECL explicit tmat4x3(tmat3x4<T, P> const & x);
123
124 // Accesses
125 GLM_FUNC_DECL col_type & operator[](size_type i);
126 GLM_FUNC_DECL col_type const & operator[](size_type i) const;
127
128 // Unary updatable operators
129 GLM_FUNC_DECL tmat4x3<T, P> & operator= (tmat4x3<T, P> const & m);
130 template <typename U>
131 GLM_FUNC_DECL tmat4x3<T, P> & operator= (tmat4x3<U, P> const & m);
132 template <typename U>
133 GLM_FUNC_DECL tmat4x3<T, P> & operator+= (U s);
134 template <typename U>
135 GLM_FUNC_DECL tmat4x3<T, P> & operator+= (tmat4x3<U, P> const & m);
136 template <typename U>
137 GLM_FUNC_DECL tmat4x3<T, P> & operator-= (U s);
138 template <typename U>
139 GLM_FUNC_DECL tmat4x3<T, P> & operator-= (tmat4x3<U, P> const & m);
140 template <typename U>
141 GLM_FUNC_DECL tmat4x3<T, P> & operator*= (U s);
142 template <typename U>
143 GLM_FUNC_DECL tmat4x3<T, P> & operator/= (U s);
144
146 // Increment and decrement operators
147
148 GLM_FUNC_DECL tmat4x3<T, P> & operator++ ();
149 GLM_FUNC_DECL tmat4x3<T, P> & operator-- ();
150 GLM_FUNC_DECL tmat4x3<T, P> operator++(int);
151 GLM_FUNC_DECL tmat4x3<T, P> operator--(int);
152 };
153
154 // Binary operators
155 template <typename T, precision P>
156 GLM_FUNC_DECL tmat4x3<T, P> operator+ (
157 tmat4x3<T, P> const & m,
158 T const & s);
159
160 template <typename T, precision P>
161 GLM_FUNC_DECL tmat4x3<T, P> operator+ (
162 tmat4x3<T, P> const & m1,
163 tmat4x3<T, P> const & m2);
164
165 template <typename T, precision P>
166 GLM_FUNC_DECL tmat4x3<T, P> operator- (
167 tmat4x3<T, P> const & m,
168 T const & s);
169
170 template <typename T, precision P>
171 GLM_FUNC_DECL tmat4x3<T, P> operator- (
172 tmat4x3<T, P> const & m1,
173 tmat4x3<T, P> const & m2);
174
175 template <typename T, precision P>
176 GLM_FUNC_DECL tmat4x3<T, P> operator* (
177 tmat4x3<T, P> const & m,
178 T const & s);
179
180 template <typename T, precision P>
181 GLM_FUNC_DECL tmat4x3<T, P> operator* (
182 T const & s,
183 tmat4x3<T, P> const & m);
184
185 template <typename T, precision P>
186 GLM_FUNC_DECL typename tmat4x3<T, P>::col_type operator* (
187 tmat4x3<T, P> const & m,
188 typename tmat4x3<T, P>::row_type const & v);
189
190 template <typename T, precision P>
191 GLM_FUNC_DECL typename tmat4x3<T, P>::row_type operator* (
192 typename tmat4x3<T, P>::col_type const & v,
193 tmat4x3<T, P> const & m);
194
195 template <typename T, precision P>
196 GLM_FUNC_DECL tmat2x3<T, P> operator* (
197 tmat4x3<T, P> const & m1,
198 tmat2x4<T, P> const & m2);
199
200 template <typename T, precision P>
201 GLM_FUNC_DECL tmat3x3<T, P> operator* (
202 tmat4x3<T, P> const & m1,
203 tmat3x4<T, P> const & m2);
204
205 template <typename T, precision P>
206 GLM_FUNC_DECL tmat4x3<T, P> operator* (
207 tmat4x3<T, P> const & m1,
208 tmat4x4<T, P> const & m2);
209
210 template <typename T, precision P>
211 GLM_FUNC_DECL tmat4x3<T, P> operator/ (
212 tmat4x3<T, P> const & m,
213 T const & s);
214
215 template <typename T, precision P>
216 GLM_FUNC_DECL tmat4x3<T, P> operator/ (
217 T const & s,
218 tmat4x3<T, P> const & m);
219
220 // Unary constant operators
221 template <typename T, precision P>
222 GLM_FUNC_DECL tmat4x3<T, P> const operator- (
223 tmat4x3<T, P> const & m);
224
225 }//namespace detail
226 }//namespace glm
227
228 #ifndef GLM_EXTERNAL_TEMPLATE
229 #include "type_mat4x3.inl"
230 #endif //GLM_EXTERNAL_TEMPLATE
231
232 #endif//glm_core_type_mat4x3
glm::length
GLM_FUNC_DECL genType::value_type length(genType const &x)
Returns the length of x, i.e., sqrt(x * x).