| 0.9.8

- Main Page
- Modules
- Files

- File List

type_mat4x3.hpp
Go to the documentation of this file.
1
4 #pragma once
5
6 #include "../fwd.hpp"
7 #include "type_vec3.hpp"
8 #include "type_vec4.hpp"
9 #include "type_mat.hpp"
10 #include <limits>
11 #include <cstddef>
12
13 namespace glm
14 {
15 template <typename T, precision P = defaultp>
16 struct tmat4x3
17 {
18 typedef tvec3<T, P> col_type;
19 typedef tvec4<T, P> row_type;
20 typedef tmat4x3<T, P> type;
21 typedef tmat3x4<T, P> transpose_type;
22 typedef T value_type;
23
24 private:
25 col_type value[4];
26
27 public:
28 // -- Constructors --
29
30 GLM_FUNC_DECL tmat4x3() GLM_DEFAULT_CTOR;
31 GLM_FUNC_DECL tmat4x3(tmat4x3<T, P> const & m) GLM_DEFAULT;
32 template <precision Q>
33 GLM_FUNC_DECL tmat4x3(tmat4x3<T, Q> const & m);
34
35 GLM_FUNC_DECL GLM_CONSTEXPR_CTOR explicit tmat4x3(ctor);
36 GLM_FUNC_DECL explicit tmat4x3(T const & x);
37 GLM_FUNC_DECL tmat4x3(
38 T const & x0, T const & y0, T const & z0,
39 T const & x1, T const & y1, T const & z1,
40 T const & x2, T const & y2, T const & z2,
41 T const & x3, T const & y3, T const & z3);
42 GLM_FUNC_DECL tmat4x3(
43 col_type const & v0,
44 col_type const & v1,
45 col_type const & v2,
46 col_type const & v3);
47
48 // -- Conversions --
49
50 template <
51 typename X1, typename Y1, typename Z1,
52 typename X2, typename Y2, typename Z2,
53 typename X3, typename Y3, typename Z3,
54 typename X4, typename Y4, typename Z4>
55 GLM_FUNC_DECL tmat4x3(
56 X1 const & x1, Y1 const & y1, Z1 const & z1,
57 X2 const & x2, Y2 const & y2, Z2 const & z2,
58 X3 const & x3, Y3 const & y3, Z3 const & z3,
59 X4 const & x4, Y4 const & y4, Z4 const & z4);
60
61 template <typename V1, typename V2, typename V3, typename V4>
62 GLM_FUNC_DECL tmat4x3(
63 tvec3<V1, P> const & v1,
64 tvec3<V2, P> const & v2,
65 tvec3<V3, P> const & v3,
66 tvec3<V4, P> const & v4);
67
68 // -- Matrix conversions --
69
70 template <typename U, precision Q>
71 GLM_FUNC_DECL GLM_EXPLICIT tmat4x3(tmat4x3<U, Q> const & m);
72
73 GLM_FUNC_DECL GLM_EXPLICIT tmat4x3(tmat2x2<T, P> const & x);
74 GLM_FUNC_DECL GLM_EXPLICIT tmat4x3(tmat3x3<T, P> const & x);
75 GLM_FUNC_DECL GLM_EXPLICIT tmat4x3(tmat4x4<T, P> const & x);
76 GLM_FUNC_DECL GLM_EXPLICIT tmat4x3(tmat2x3<T, P> const & x);
77 GLM_FUNC_DECL GLM_EXPLICIT tmat4x3(tmat3x2<T, P> const & x);
78 GLM_FUNC_DECL GLM_EXPLICIT tmat4x3(tmat2x4<T, P> const & x);
79 GLM_FUNC_DECL GLM_EXPLICIT tmat4x3(tmat4x2<T, P> const & x);
80 GLM_FUNC_DECL GLM_EXPLICIT tmat4x3(tmat3x4<T, P> const & x);
81
82 // -- Accesses --
83
84 typedef length_t length_type;
85 GLM_FUNC_DECL GLM_CONSTEXPR length_type length() const;
86
87 GLM_FUNC_DECL col_type & operator[](length_type i);
88 GLM_FUNC_DECL col_type const & operator[](length_type i) const;
89
90 // -- Unary arithmetic operators --
91
92 GLM_FUNC_DECL tmat4x3<T, P> & operator=(tmat4x3<T, P> const & m) GLM_DEFAULT;
93
94 template <typename U>
95 GLM_FUNC_DECL tmat4x3<T, P> & operator=(tmat4x3<U, P> const & m);
96 template <typename U>
97 GLM_FUNC_DECL tmat4x3<T, P> & operator+=(U s);
98 template <typename U>
99 GLM_FUNC_DECL tmat4x3<T, P> & operator+=(tmat4x3<U, P> const & m);
100 template <typename U>
101 GLM_FUNC_DECL tmat4x3<T, P> & operator-=(U s);
102 template <typename U>
103 GLM_FUNC_DECL tmat4x3<T, P> & operator-=(tmat4x3<U, P> const & m);
104 template <typename U>
105 GLM_FUNC_DECL tmat4x3<T, P> & operator*=(U s);
106 template <typename U>
107 GLM_FUNC_DECL tmat4x3<T, P> & operator/=(U s);
108
109 // -- Increment and decrement operators --
110
111 GLM_FUNC_DECL tmat4x3<T, P> & operator++();
112 GLM_FUNC_DECL tmat4x3<T, P> & operator--();
113 GLM_FUNC_DECL tmat4x3<T, P> operator++(int);
114 GLM_FUNC_DECL tmat4x3<T, P> operator--(int);
115 };
116
117 // -- Unary operators --
118
119 template <typename T, precision P>
120 GLM_FUNC_DECL tmat4x3<T, P> operator+(tmat4x3<T, P> const & m);
121
122 template <typename T, precision P>
123 GLM_FUNC_DECL tmat4x3<T, P> operator-(tmat4x3<T, P> const & m);
124
125 // -- Binary operators --
126
127 template <typename T, precision P>
128 GLM_FUNC_DECL tmat4x3<T, P> operator+(tmat4x3<T, P> const & m, T const & s);
129
130 template <typename T, precision P>
131 GLM_FUNC_DECL tmat4x3<T, P> operator+(tmat4x3<T, P> const & m1, tmat4x3<T, P> const & m2);
132
133 template <typename T, precision P>
134 GLM_FUNC_DECL tmat4x3<T, P> operator-(tmat4x3<T, P> const & m, T const & s);
135
136 template <typename T, precision P>
137 GLM_FUNC_DECL tmat4x3<T, P> operator-(tmat4x3<T, P> const & m1, tmat4x3<T, P> const & m2);
138
139 template <typename T, precision P>
140 GLM_FUNC_DECL tmat4x3<T, P> operator*(tmat4x3<T, P> const & m, T const & s);
141
142 template <typename T, precision P>
143 GLM_FUNC_DECL tmat4x3<T, P> operator*(T const & s, tmat4x3<T, P> const & m);
144
145 template <typename T, precision P>
146 GLM_FUNC_DECL typename tmat4x3<T, P>::col_type operator*(tmat4x3<T, P> const & m, typename tmat4x3<T, P>::row_type const & v);
147
148 template <typename T, precision P>
149 GLM_FUNC_DECL typename tmat4x3<T, P>::row_type operator*(typename tmat4x3<T, P>::col_type const & v, tmat4x3<T, P> const & m);
150
151 template <typename T, precision P>
152 GLM_FUNC_DECL tmat2x3<T, P> operator*(tmat4x3<T, P> const & m1, tmat2x4<T, P> const & m2);
153
154 template <typename T, precision P>
155 GLM_FUNC_DECL tmat3x3<T, P> operator*(tmat4x3<T, P> const & m1, tmat3x4<T, P> const & m2);
156
157 template <typename T, precision P>
158 GLM_FUNC_DECL tmat4x3<T, P> operator*(tmat4x3<T, P> const & m1, tmat4x4<T, P> const & m2);
159
160 template <typename T, precision P>
161 GLM_FUNC_DECL tmat4x3<T, P> operator/(tmat4x3<T, P> const & m, T const & s);
162
163 template <typename T, precision P>
164 GLM_FUNC_DECL tmat4x3<T, P> operator/(T const & s, tmat4x3<T, P> const & m);
165
166 // -- Boolean operators --
167
168 template <typename T, precision P>
169 GLM_FUNC_DECL bool operator==(tmat4x3<T, P> const & m1, tmat4x3<T, P> const & m2);
170
171 template <typename T, precision P>
172 GLM_FUNC_DECL bool operator!=(tmat4x3<T, P> const & m1, tmat4x3<T, P> const & m2);
173 }//namespace glm
174
175 #ifndef GLM_EXTERNAL_TEMPLATE
176 #include "type_mat4x3.inl"
177 #endif //GLM_EXTERNAL_TEMPLATE
type_vec3.hpp
GLM Core
glm
Definition: _noise.hpp:11
type_mat.hpp
GLM Core
type_vec4.hpp
GLM Core
glm::length
GLM_FUNC_DECL T length(vecType< T, P > const &x)
Returns the length of x, i.e., sqrt(x * x).