00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029 #pragma once
00030
00031 #include "../fwd.hpp"
00032 #include "type_vec4.hpp"
00033 #include "type_mat.hpp"
00034 #include <limits>
00035 #include <cstddef>
00036
00037 namespace glm{
00038 namespace detail
00039 {
00040 template <typename T, precision P>
00041 struct tmat4x4
00042 {
00043 enum ctor{_null};
00044 typedef T value_type;
00045 typedef std::size_t size_type;
00046 typedef tvec4<T, P> col_type;
00047 typedef tvec4<T, P> row_type;
00048 typedef tmat4x4<T, P> type;
00049 typedef tmat4x4<T, P> transpose_type;
00050
00051 GLM_FUNC_DECL GLM_CONSTEXPR length_t length() const;
00052
00053 template <typename U, precision Q>
00054 friend tvec4<U, Q> operator/(tmat4x4<U, Q> const & m, tvec4<U, Q> const & v);
00055 template <typename U, precision Q>
00056 friend tvec4<U, Q> operator/(tvec4<U, Q> const & v, tmat4x4<U, Q> const & m);
00057
00058 private:
00060 col_type value[4];
00062
00063 public:
00064
00065 GLM_FUNC_DECL tmat4x4();
00066 GLM_FUNC_DECL tmat4x4(tmat4x4<T, P> const & m);
00067 template <precision Q>
00068 GLM_FUNC_DECL tmat4x4(tmat4x4<T, Q> const & m);
00069
00070 GLM_FUNC_DECL explicit tmat4x4(
00071 ctor Null);
00072 GLM_FUNC_DECL explicit tmat4x4(
00073 T const & x);
00074 GLM_FUNC_DECL tmat4x4(
00075 T const & x0, T const & y0, T const & z0, T const & w0,
00076 T const & x1, T const & y1, T const & z1, T const & w1,
00077 T const & x2, T const & y2, T const & z2, T const & w2,
00078 T const & x3, T const & y3, T const & z3, T const & w3);
00079 GLM_FUNC_DECL tmat4x4(
00080 col_type const & v0,
00081 col_type const & v1,
00082 col_type const & v2,
00083 col_type const & v3);
00084
00086
00087
00088 template <
00089 typename X1, typename Y1, typename Z1, typename W1,
00090 typename X2, typename Y2, typename Z2, typename W2,
00091 typename X3, typename Y3, typename Z3, typename W3,
00092 typename X4, typename Y4, typename Z4, typename W4>
00093 GLM_FUNC_DECL tmat4x4(
00094 X1 const & x1, Y1 const & y1, Z1 const & z1, W1 const & w1,
00095 X2 const & x2, Y2 const & y2, Z2 const & z2, W2 const & w2,
00096 X3 const & x3, Y3 const & y3, Z3 const & z3, W3 const & w3,
00097 X4 const & x4, Y4 const & y4, Z4 const & z4, W4 const & w4);
00098
00099 template <typename V1, typename V2, typename V3, typename V4>
00100 GLM_FUNC_DECL tmat4x4(
00101 tvec4<V1, P> const & v1,
00102 tvec4<V2, P> const & v2,
00103 tvec4<V3, P> const & v3,
00104 tvec4<V4, P> const & v4);
00105
00106
00107 template <typename U, precision Q>
00108 GLM_FUNC_DECL explicit tmat4x4(tmat4x4<U, Q> const & m);
00109
00110 GLM_FUNC_DECL explicit tmat4x4(tmat2x2<T, P> const & x);
00111 GLM_FUNC_DECL explicit tmat4x4(tmat3x3<T, P> const & x);
00112 GLM_FUNC_DECL explicit tmat4x4(tmat2x3<T, P> const & x);
00113 GLM_FUNC_DECL explicit tmat4x4(tmat3x2<T, P> const & x);
00114 GLM_FUNC_DECL explicit tmat4x4(tmat2x4<T, P> const & x);
00115 GLM_FUNC_DECL explicit tmat4x4(tmat4x2<T, P> const & x);
00116 GLM_FUNC_DECL explicit tmat4x4(tmat3x4<T, P> const & x);
00117 GLM_FUNC_DECL explicit tmat4x4(tmat4x3<T, P> const & x);
00118
00119
00120 GLM_FUNC_DECL col_type & operator[](length_t i);
00121 GLM_FUNC_DECL col_type const & operator[](length_t i) const;
00122
00123 GLM_FUNC_DECL tmat4x4<T, P> & operator= (tmat4x4<T, P> const & m);
00124 template <typename U>
00125 GLM_FUNC_DECL tmat4x4<T, P> & operator= (tmat4x4<U, P> const & m);
00126 template <typename U>
00127 GLM_FUNC_DECL tmat4x4<T, P> & operator+= (U s);
00128 template <typename U>
00129 GLM_FUNC_DECL tmat4x4<T, P> & operator+= (tmat4x4<U, P> const & m);
00130 template <typename U>
00131 GLM_FUNC_DECL tmat4x4<T, P> & operator-= (U s);
00132 template <typename U>
00133 GLM_FUNC_DECL tmat4x4<T, P> & operator-= (tmat4x4<U, P> const & m);
00134 template <typename U>
00135 GLM_FUNC_DECL tmat4x4<T, P> & operator*= (U s);
00136 template <typename U>
00137 GLM_FUNC_DECL tmat4x4<T, P> & operator*= (tmat4x4<U, P> const & m);
00138 template <typename U>
00139 GLM_FUNC_DECL tmat4x4<T, P> & operator/= (U s);
00140 template <typename U>
00141 GLM_FUNC_DECL tmat4x4<T, P> & operator/= (tmat4x4<U, P> const & m);
00142
00144
00145
00146 GLM_FUNC_DECL tmat4x4<T, P> & operator++ ();
00147 GLM_FUNC_DECL tmat4x4<T, P> & operator-- ();
00148 GLM_FUNC_DECL tmat4x4<T, P> operator++(int);
00149 GLM_FUNC_DECL tmat4x4<T, P> operator--(int);
00150 };
00151
00152
00153 template <typename T, precision P>
00154 GLM_FUNC_DECL tmat4x4<T, P> operator+ (
00155 tmat4x4<T, P> const & m,
00156 T const & s);
00157
00158 template <typename T, precision P>
00159 GLM_FUNC_DECL tmat4x4<T, P> operator+ (
00160 T const & s,
00161 tmat4x4<T, P> const & m);
00162
00163 template <typename T, precision P>
00164 GLM_FUNC_DECL tmat4x4<T, P> operator+ (
00165 tmat4x4<T, P> const & m1,
00166 tmat4x4<T, P> const & m2);
00167
00168 template <typename T, precision P>
00169 GLM_FUNC_DECL tmat4x4<T, P> operator- (
00170 tmat4x4<T, P> const & m,
00171 T const & s);
00172
00173 template <typename T, precision P>
00174 GLM_FUNC_DECL tmat4x4<T, P> operator- (
00175 T const & s,
00176 tmat4x4<T, P> const & m);
00177
00178 template <typename T, precision P>
00179 GLM_FUNC_DECL tmat4x4<T, P> operator- (
00180 tmat4x4<T, P> const & m1,
00181 tmat4x4<T, P> const & m2);
00182
00183 template <typename T, precision P>
00184 GLM_FUNC_DECL tmat4x4<T, P> operator* (
00185 tmat4x4<T, P> const & m,
00186 T const & s);
00187
00188 template <typename T, precision P>
00189 GLM_FUNC_DECL tmat4x4<T, P> operator* (
00190 T const & s,
00191 tmat4x4<T, P> const & m);
00192
00193 template <typename T, precision P>
00194 GLM_FUNC_DECL typename tmat4x4<T, P>::col_type operator* (
00195 tmat4x4<T, P> const & m,
00196 typename tmat4x4<T, P>::row_type const & v);
00197
00198 template <typename T, precision P>
00199 GLM_FUNC_DECL typename tmat4x4<T, P>::row_type operator* (
00200 typename tmat4x4<T, P>::col_type const & v,
00201 tmat4x4<T, P> const & m);
00202
00203 template <typename T, precision P>
00204 GLM_FUNC_DECL tmat2x4<T, P> operator* (
00205 tmat4x4<T, P> const & m1,
00206 tmat2x4<T, P> const & m2);
00207
00208 template <typename T, precision P>
00209 GLM_FUNC_DECL tmat3x4<T, P> operator* (
00210 tmat4x4<T, P> const & m1,
00211 tmat3x4<T, P> const & m2);
00212
00213 template <typename T, precision P>
00214 GLM_FUNC_DECL tmat4x4<T, P> operator* (
00215 tmat4x4<T, P> const & m1,
00216 tmat4x4<T, P> const & m2);
00217
00218 template <typename T, precision P>
00219 GLM_FUNC_DECL tmat4x4<T, P> operator/ (
00220 tmat4x4<T, P> const & m,
00221 T const & s);
00222
00223 template <typename T, precision P>
00224 GLM_FUNC_DECL tmat4x4<T, P> operator/ (
00225 T const & s,
00226 tmat4x4<T, P> const & m);
00227
00228 template <typename T, precision P>
00229 GLM_FUNC_DECL typename tmat4x4<T, P>::col_type operator/ (
00230 tmat4x4<T, P> const & m,
00231 typename tmat4x4<T, P>::row_type const & v);
00232
00233 template <typename T, precision P>
00234 GLM_FUNC_DECL typename tmat4x4<T, P>::row_type operator/ (
00235 typename tmat4x4<T, P>::col_type & v,
00236 tmat4x4<T, P> const & m);
00237
00238 template <typename T, precision P>
00239 GLM_FUNC_DECL tmat4x4<T, P> operator/ (
00240 tmat4x4<T, P> const & m1,
00241 tmat4x4<T, P> const & m2);
00242
00243
00244 template <typename T, precision P>
00245 GLM_FUNC_DECL tmat4x4<T, P> const operator- (
00246 tmat4x4<T, P> const & m);
00247
00248 }
00249 }
00250
00251 #ifndef GLM_EXTERNAL_TEMPLATE
00252 #include "type_mat4x4.inl"
00253 #endif//GLM_EXTERNAL_TEMPLATE