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