0.9.6: type_mat3x4.hpp Source File

| 0.9.6

- Main Page
- Modules
- Files

- File List

type_mat3x4.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_vec4.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 tmat3x4
46 {
47 typedef tvec4<T, P> col_type;
48 typedef tvec3<T, P> row_type;
49 typedef tmat3x4<T, P> type;
50 typedef tmat4x3<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 tmat3x4();
61 template <precision Q>
62 GLM_FUNC_DECL tmat3x4(tmat3x4<T, Q> const & m);
63
64 GLM_FUNC_DECL explicit tmat3x4(ctor);
65 GLM_FUNC_DECL explicit tmat3x4(T const & s);
66 GLM_FUNC_DECL tmat3x4(
67 T const & x0, T const & y0, T const & z0, T const & w0,
68 T const & x1, T const & y1, T const & z1, T const & w1,
69 T const & x2, T const & y2, T const & z2, T const & w2);
70 GLM_FUNC_DECL tmat3x4(
71 col_type const & v0,
72 col_type const & v1,
73 col_type const & v2);
74
76 // Conversions
77 template<
78 typename X1, typename Y1, typename Z1, typename W1,
79 typename X2, typename Y2, typename Z2, typename W2,
80 typename X3, typename Y3, typename Z3, typename W3>
81 GLM_FUNC_DECL tmat3x4(
82 X1 const & x1, Y1 const & y1, Z1 const & z1, W1 const & w1,
83 X2 const & x2, Y2 const & y2, Z2 const & z2, W2 const & w2,
84 X3 const & x3, Y3 const & y3, Z3 const & z3, W3 const & w3);
85
86 template <typename V1, typename V2, typename V3>
87 GLM_FUNC_DECL tmat3x4(
88 tvec4<V1, P> const & v1,
89 tvec4<V2, P> const & v2,
90 tvec4<V3, P> const & v3);
91
93 // Matrix conversion
94
95 # ifdef GLM_FORCE_EXPLICIT_CTOR
96 template <typename U, precision Q>
97 GLM_FUNC_DECL explicit tmat3x4(tmat3x4<U, Q> const & m);
98 # else
99 template <typename U, precision Q>
100 GLM_FUNC_DECL tmat3x4(tmat3x4<U, Q> const & m);
101 # endif
102
103 GLM_FUNC_DECL explicit tmat3x4(tmat2x2<T, P> const & x);
104 GLM_FUNC_DECL explicit tmat3x4(tmat3x3<T, P> const & x);
105 GLM_FUNC_DECL explicit tmat3x4(tmat4x4<T, P> const & x);
106 GLM_FUNC_DECL explicit tmat3x4(tmat2x3<T, P> const & x);
107 GLM_FUNC_DECL explicit tmat3x4(tmat3x2<T, P> const & x);
108 GLM_FUNC_DECL explicit tmat3x4(tmat2x4<T, P> const & x);
109 GLM_FUNC_DECL explicit tmat3x4(tmat4x2<T, P> const & x);
110 GLM_FUNC_DECL explicit tmat3x4(tmat4x3<T, P> const & x);
111
113 // Accesses
114
115 # ifdef GLM_FORCE_SIZE_FUNC
116 typedef size_t size_type;
117 GLM_FUNC_DECL GLM_CONSTEXPR size_t size() const;
118
119 GLM_FUNC_DECL col_type & operator[](size_type i);
120 GLM_FUNC_DECL col_type const & operator[](size_type i) const;
121 # else
122 typedef length_t length_type;
123 GLM_FUNC_DECL GLM_CONSTEXPR length_type length() const;
124
125 GLM_FUNC_DECL col_type & operator[](length_type i);
126 GLM_FUNC_DECL col_type const & operator[](length_type i) const;
127 # endif//GLM_FORCE_SIZE_FUNC
128
130 // Unary arithmetic operators
131
132 template <typename U>
133 GLM_FUNC_DECL tmat3x4<T, P> & operator=(tmat3x4<U, P> const & m);
134 template <typename U>
135 GLM_FUNC_DECL tmat3x4<T, P> & operator+=(U s);
136 template <typename U>
137 GLM_FUNC_DECL tmat3x4<T, P> & operator+=(tmat3x4<U, P> const & m);
138 template <typename U>
139 GLM_FUNC_DECL tmat3x4<T, P> & operator-=(U s);
140 template <typename U>
141 GLM_FUNC_DECL tmat3x4<T, P> & operator-=(tmat3x4<U, P> const & m);
142 template <typename U>
143 GLM_FUNC_DECL tmat3x4<T, P> & operator*=(U s);
144 template <typename U>
145 GLM_FUNC_DECL tmat3x4<T, P> & operator/=(U s);
146
148 // Increment and decrement operators
149
150 GLM_FUNC_DECL tmat3x4<T, P> & operator++();
151 GLM_FUNC_DECL tmat3x4<T, P> & operator--();
152 GLM_FUNC_DECL tmat3x4<T, P> operator++(int);
153 GLM_FUNC_DECL tmat3x4<T, P> operator--(int);
154 };
155
156 // Binary operators
157 template <typename T, precision P>
158 GLM_FUNC_DECL tmat3x4<T, P> operator+(tmat3x4<T, P> const & m, T const & s);
159
160 template <typename T, precision P>
161 GLM_FUNC_DECL tmat3x4<T, P> operator+(tmat3x4<T, P> const & m1, tmat3x4<T, P> const & m2);
162
163 template <typename T, precision P>
164 GLM_FUNC_DECL tmat3x4<T, P> operator-(tmat3x4<T, P> const & m, T const & s);
165
166 template <typename T, precision P>
167 GLM_FUNC_DECL tmat3x4<T, P> operator-(tmat3x4<T, P> const & m1, tmat3x4<T, P> const & m2);
168
169 template <typename T, precision P>
170 GLM_FUNC_DECL tmat3x4<T, P> operator*(tmat3x4<T, P> const & m, T const & s);
171
172 template <typename T, precision P>
173 GLM_FUNC_DECL tmat3x4<T, P> operator*(T const & s, tmat3x4<T, P> const & m);
174
175 template <typename T, precision P>
176 GLM_FUNC_DECL typename tmat3x4<T, P>::col_type operator*(tmat3x4<T, P> const & m, typename tmat3x4<T, P>::row_type const & v);
177
178 template <typename T, precision P>
179 GLM_FUNC_DECL typename tmat3x4<T, P>::row_type operator*(typename tmat3x4<T, P>::col_type const & v, tmat3x4<T, P> const & m);
180
181 template <typename T, precision P>
182 GLM_FUNC_DECL tmat4x4<T, P> operator*(tmat3x4<T, P> const & m1, tmat4x3<T, P> const & m2);
183
184 template <typename T, precision P>
185 GLM_FUNC_DECL tmat2x4<T, P> operator*(tmat3x4<T, P> const & m1, tmat2x3<T, P> const & m2);
186
187 template <typename T, precision P>
188 GLM_FUNC_DECL tmat3x4<T, P> operator*(tmat3x4<T, P> const & m1, tmat3x3<T, P> const & m2);
189
190 template <typename T, precision P>
191 GLM_FUNC_DECL tmat3x4<T, P> operator/(tmat3x4<T, P> const & m, T const & s);
192
193 template <typename T, precision P>
194 GLM_FUNC_DECL tmat3x4<T, P> operator/(T const & s, tmat3x4<T, P> const & m);
195
196 // Unary constant operators
197 template <typename T, precision P>
198 GLM_FUNC_DECL tmat3x4<T, P> const operator-(tmat3x4<T, P> const & m);
199 }//namespace glm
200
201 #ifndef GLM_EXTERNAL_TEMPLATE
202 #include "type_mat3x4.inl"
203 #endif
type_vec4.hpp
OpenGL Mathematics (glm.g-truc.net)
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)