0.9.6
type_mat4x3.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 tmat4x3
46  {
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  typedef T value_type;
52 
53  private:
54  // Data
55  col_type value[4];
56 
57  public:
58  // Constructors
59  GLM_FUNC_DECL tmat4x3();
60  template <precision Q>
61  GLM_FUNC_DECL tmat4x3(tmat4x3<T, Q> const & m);
62 
63  GLM_FUNC_DECL explicit tmat4x3(ctor);
64  GLM_FUNC_DECL explicit tmat4x3(T const & x);
65  GLM_FUNC_DECL tmat4x3(
66  T const & x0, T const & y0, T const & z0,
67  T const & x1, T const & y1, T const & z1,
68  T const & x2, T const & y2, T const & z2,
69  T const & x3, T const & y3, T const & z3);
70  GLM_FUNC_DECL tmat4x3(
71  col_type const & v0,
72  col_type const & v1,
73  col_type const & v2,
74  col_type const & v3);
75 
77  // Conversions
78 
79  template <
80  typename X1, typename Y1, typename Z1,
81  typename X2, typename Y2, typename Z2,
82  typename X3, typename Y3, typename Z3,
83  typename X4, typename Y4, typename Z4>
84  GLM_FUNC_DECL tmat4x3(
85  X1 const & x1, Y1 const & y1, Z1 const & z1,
86  X2 const & x2, Y2 const & y2, Z2 const & z2,
87  X3 const & x3, Y3 const & y3, Z3 const & z3,
88  X4 const & x4, Y4 const & y4, Z4 const & z4);
89 
90  template <typename V1, typename V2, typename V3, typename V4>
91  GLM_FUNC_DECL tmat4x3(
92  tvec3<V1, P> const & v1,
93  tvec3<V2, P> const & v2,
94  tvec3<V3, P> const & v3,
95  tvec3<V4, P> const & v4);
96 
98  // Matrix conversions
99 
100 # ifdef GLM_FORCE_EXPLICIT_CTOR
101  template <typename U, precision Q>
102  GLM_FUNC_DECL explicit tmat4x3(tmat4x3<U, Q> const & m);
103 # else
104  template <typename U, precision Q>
105  GLM_FUNC_DECL tmat4x3(tmat4x3<U, Q> const & m);
106 # endif
107 
108  GLM_FUNC_DECL explicit tmat4x3(tmat2x2<T, P> const & x);
109  GLM_FUNC_DECL explicit tmat4x3(tmat3x3<T, P> const & x);
110  GLM_FUNC_DECL explicit tmat4x3(tmat4x4<T, P> const & x);
111  GLM_FUNC_DECL explicit tmat4x3(tmat2x3<T, P> const & x);
112  GLM_FUNC_DECL explicit tmat4x3(tmat3x2<T, P> const & x);
113  GLM_FUNC_DECL explicit tmat4x3(tmat2x4<T, P> const & x);
114  GLM_FUNC_DECL explicit tmat4x3(tmat4x2<T, P> const & x);
115  GLM_FUNC_DECL explicit tmat4x3(tmat3x4<T, P> const & x);
116 
118  // Accesses
119 
120 # ifdef GLM_FORCE_SIZE_FUNC
121  typedef size_t size_type;
122  GLM_FUNC_DECL GLM_CONSTEXPR size_t size() const;
123 
124  GLM_FUNC_DECL col_type & operator[](size_type i);
125  GLM_FUNC_DECL col_type const & operator[](size_type i) const;
126 # else
127  typedef length_t length_type;
128  GLM_FUNC_DECL GLM_CONSTEXPR length_type length() const;
129 
130  GLM_FUNC_DECL col_type & operator[](length_type i);
131  GLM_FUNC_DECL col_type const & operator[](length_type i) const;
132 # endif//GLM_FORCE_SIZE_FUNC
133 
135  // Unary arithmetic operators
136 
137  template <typename U>
138  GLM_FUNC_DECL tmat4x3<T, P> & operator=(tmat4x3<U, P> const & m);
139  template <typename U>
140  GLM_FUNC_DECL tmat4x3<T, P> & operator+=(U s);
141  template <typename U>
142  GLM_FUNC_DECL tmat4x3<T, P> & operator+=(tmat4x3<U, P> const & m);
143  template <typename U>
144  GLM_FUNC_DECL tmat4x3<T, P> & operator-=(U s);
145  template <typename U>
146  GLM_FUNC_DECL tmat4x3<T, P> & operator-=(tmat4x3<U, P> const & m);
147  template <typename U>
148  GLM_FUNC_DECL tmat4x3<T, P> & operator*=(U s);
149  template <typename U>
150  GLM_FUNC_DECL tmat4x3<T, P> & operator/=(U s);
151 
153  // Increment and decrement operators
154 
155  GLM_FUNC_DECL tmat4x3<T, P> & operator++();
156  GLM_FUNC_DECL tmat4x3<T, P> & operator--();
157  GLM_FUNC_DECL tmat4x3<T, P> operator++(int);
158  GLM_FUNC_DECL tmat4x3<T, P> operator--(int);
159  };
160 
161  // Binary operators
162  template <typename T, precision P>
163  GLM_FUNC_DECL tmat4x3<T, P> operator+(tmat4x3<T, P> const & m, T const & s);
164 
165  template <typename T, precision P>
166  GLM_FUNC_DECL tmat4x3<T, P> operator+(tmat4x3<T, P> const & m1, tmat4x3<T, P> const & m2);
167 
168  template <typename T, precision P>
169  GLM_FUNC_DECL tmat4x3<T, P> operator-(tmat4x3<T, P> const & m, T const & s);
170 
171  template <typename T, precision P>
172  GLM_FUNC_DECL tmat4x3<T, P> operator-(tmat4x3<T, P> const & m1, tmat4x3<T, P> const & m2);
173 
174  template <typename T, precision P>
175  GLM_FUNC_DECL tmat4x3<T, P> operator*(tmat4x3<T, P> const & m, T const & s);
176 
177  template <typename T, precision P>
178  GLM_FUNC_DECL tmat4x3<T, P> operator*(T const & s, tmat4x3<T, P> const & m);
179 
180  template <typename T, precision P>
181  GLM_FUNC_DECL typename tmat4x3<T, P>::col_type operator*(tmat4x3<T, P> const & m, typename tmat4x3<T, P>::row_type const & v);
182 
183  template <typename T, precision P>
184  GLM_FUNC_DECL typename tmat4x3<T, P>::row_type operator*(typename tmat4x3<T, P>::col_type const & v, tmat4x3<T, P> const & m);
185 
186  template <typename T, precision P>
187  GLM_FUNC_DECL tmat2x3<T, P> operator*(tmat4x3<T, P> const & m1, tmat2x4<T, P> const & m2);
188 
189  template <typename T, precision P>
190  GLM_FUNC_DECL tmat3x3<T, P> operator*(tmat4x3<T, P> const & m1, tmat3x4<T, P> const & m2);
191 
192  template <typename T, precision P>
193  GLM_FUNC_DECL tmat4x3<T, P> operator*(tmat4x3<T, P> const & m1, tmat4x4<T, P> const & m2);
194 
195  template <typename T, precision P>
196  GLM_FUNC_DECL tmat4x3<T, P> operator/(tmat4x3<T, P> const & m, T const & s);
197 
198  template <typename T, precision P>
199  GLM_FUNC_DECL tmat4x3<T, P> operator/(T const & s, tmat4x3<T, P> const & m);
200 
201  // Unary constant operators
202  template <typename T, precision P>
203  GLM_FUNC_DECL tmat4x3<T, P> const operator-(tmat4x3<T, P> const & m);
204 }//namespace glm
205 
206 #ifndef GLM_EXTERNAL_TEMPLATE
207 #include "type_mat4x3.inl"
208 #endif //GLM_EXTERNAL_TEMPLATE
OpenGL Mathematics (glm.g-truc.net)
OpenGL Mathematics (glm.g-truc.net)
GLM_FUNC_DECL T length(vecType< T, P > const &x)
Returns the length of x, i.e., sqrt(x * x).
Definition: _noise.hpp:39
OpenGL Mathematics (glm.g-truc.net)