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 #ifndef glm_core_type_mat4x4
00030 #define glm_core_type_mat4x4
00031
00032 #include "type_mat.hpp"
00033
00034 namespace glm{
00035 namespace detail
00036 {
00037 template <typename T> struct tvec1;
00038 template <typename T> struct tvec2;
00039 template <typename T> struct tvec3;
00040 template <typename T> struct tvec4;
00041 template <typename T> struct tmat2x2;
00042 template <typename T> struct tmat2x3;
00043 template <typename T> struct tmat2x4;
00044 template <typename T> struct tmat3x2;
00045 template <typename T> struct tmat3x3;
00046 template <typename T> struct tmat3x4;
00047 template <typename T> struct tmat4x2;
00048 template <typename T> struct tmat4x3;
00049 template <typename T> struct tmat4x4;
00050
00051
00052
00053 template <typename T>
00054 struct tmat4x4
00055 {
00056 enum ctor{null};
00057 typedef T value_type;
00058 typedef std::size_t size_type;
00059 typedef tvec4<T> col_type;
00060 typedef tvec4<T> row_type;
00061 GLM_FUNC_DECL size_type length() const;
00062 static GLM_FUNC_DECL size_type col_size();
00063 static GLM_FUNC_DECL size_type row_size();
00064
00065 typedef tmat4x4<T> type;
00066 typedef tmat4x4<T> transpose_type;
00067
00068 public:
00071 GLM_FUNC_DECL tmat4x4<T> _inverse() const;
00073
00074 private:
00075
00076 col_type value[4];
00077
00078 public:
00079
00080 GLM_FUNC_DECL tmat4x4();
00081 GLM_FUNC_DECL tmat4x4(tmat4x4 const & m);
00082
00083 GLM_FUNC_DECL explicit tmat4x4(
00084 ctor Null);
00085 GLM_FUNC_DECL explicit tmat4x4(
00086 value_type const & x);
00087 GLM_FUNC_DECL explicit tmat4x4(
00088 value_type const & x0, value_type const & y0, value_type const & z0, value_type const & w0,
00089 value_type const & x1, value_type const & y1, value_type const & z1, value_type const & w1,
00090 value_type const & x2, value_type const & y2, value_type const & z2, value_type const & w2,
00091 value_type const & x3, value_type const & y3, value_type const & z3, value_type const & w3);
00092 GLM_FUNC_DECL explicit tmat4x4(
00093 col_type const & v0,
00094 col_type const & v1,
00095 col_type const & v2,
00096 col_type const & v3);
00097
00099
00100 template <typename U>
00101 GLM_FUNC_DECL explicit tmat4x4(
00102 U const & x);
00103
00104 template <
00105 typename X1, typename Y1, typename Z1, typename W1,
00106 typename X2, typename Y2, typename Z2, typename W2,
00107 typename X3, typename Y3, typename Z3, typename W3,
00108 typename X4, typename Y4, typename Z4, typename W4>
00109 GLM_FUNC_DECL explicit tmat4x4(
00110 X1 const & x1, Y1 const & y1, Z1 const & z1, W1 const & w1,
00111 X2 const & x2, Y2 const & y2, Z2 const & z2, W2 const & w2,
00112 X3 const & x3, Y3 const & y3, Z3 const & z3, W3 const & w3,
00113 X4 const & x4, Y4 const & y4, Z4 const & z4, W4 const & w4);
00114
00115 template <typename V1, typename V2, typename V3, typename V4>
00116 GLM_FUNC_DECL explicit tmat4x4(
00117 tvec4<V1> const & v1,
00118 tvec4<V2> const & v2,
00119 tvec4<V3> const & v3,
00120 tvec4<V4> const & v4);
00121
00122
00123 template <typename U>
00124 GLM_FUNC_DECL explicit tmat4x4(tmat4x4<U> const & m);
00125
00126 GLM_FUNC_DECL explicit tmat4x4(tmat2x2<T> const & x);
00127 GLM_FUNC_DECL explicit tmat4x4(tmat3x3<T> const & x);
00128 GLM_FUNC_DECL explicit tmat4x4(tmat2x3<T> const & x);
00129 GLM_FUNC_DECL explicit tmat4x4(tmat3x2<T> const & x);
00130 GLM_FUNC_DECL explicit tmat4x4(tmat2x4<T> const & x);
00131 GLM_FUNC_DECL explicit tmat4x4(tmat4x2<T> const & x);
00132 GLM_FUNC_DECL explicit tmat4x4(tmat3x4<T> const & x);
00133 GLM_FUNC_DECL explicit tmat4x4(tmat4x3<T> const & x);
00134
00135
00136 GLM_FUNC_DECL col_type & operator[](size_type i);
00137 GLM_FUNC_DECL col_type const & operator[](size_type i) const;
00138
00139
00140 GLM_FUNC_DECL tmat4x4<T> & operator= (tmat4x4<T> const & m);
00141 template <typename U>
00142 GLM_FUNC_DECL tmat4x4<T> & operator= (tmat4x4<U> const & m);
00143 template <typename U>
00144 GLM_FUNC_DECL tmat4x4<T> & operator+= (U const & s);
00145 template <typename U>
00146 GLM_FUNC_DECL tmat4x4<T> & operator+= (tmat4x4<U> const & m);
00147 template <typename U>
00148 GLM_FUNC_DECL tmat4x4<T> & operator-= (U const & s);
00149 template <typename U>
00150 GLM_FUNC_DECL tmat4x4<T> & operator-= (tmat4x4<U> const & m);
00151 template <typename U>
00152 GLM_FUNC_DECL tmat4x4<T> & operator*= (U const & s);
00153 template <typename U>
00154 GLM_FUNC_DECL tmat4x4<T> & operator*= (tmat4x4<U> const & m);
00155 template <typename U>
00156 GLM_FUNC_DECL tmat4x4<T> & operator/= (U const & s);
00157 template <typename U>
00158 GLM_FUNC_DECL tmat4x4<T> & operator/= (tmat4x4<U> const & m);
00159 GLM_FUNC_DECL tmat4x4<T> & operator++ ();
00160 GLM_FUNC_DECL tmat4x4<T> & operator-- ();
00161 };
00162
00163
00164 template <typename T>
00165 tmat4x4<T> operator+ (
00166 tmat4x4<T> const & m,
00167 typename tmat4x4<T>::value_type const & s);
00168
00169 template <typename T>
00170 tmat4x4<T> operator+ (
00171 typename tmat4x4<T>::value_type const & s,
00172 tmat4x4<T> const & m);
00173
00174 template <typename T>
00175 tmat4x4<T> operator+ (
00176 tmat4x4<T> const & m1,
00177 tmat4x4<T> const & m2);
00178
00179 template <typename T>
00180 tmat4x4<T> operator- (
00181 tmat4x4<T> const & m,
00182 typename tmat4x4<T>::value_type const & s);
00183
00184 template <typename T>
00185 tmat4x4<T> operator- (
00186 typename tmat4x4<T>::value_type const & s,
00187 tmat4x4<T> const & m);
00188
00189 template <typename T>
00190 tmat4x4<T> operator- (
00191 tmat4x4<T> const & m1,
00192 tmat4x4<T> const & m2);
00193
00194 template <typename T>
00195 tmat4x4<T> operator* (
00196 tmat4x4<T> const & m,
00197 typename tmat4x4<T>::value_type const & s);
00198
00199 template <typename T>
00200 tmat4x4<T> operator* (
00201 typename tmat4x4<T>::value_type const & s,
00202 tmat4x4<T> const & m);
00203
00204 template <typename T>
00205 typename tmat4x4<T>::col_type operator* (
00206 tmat4x4<T> const & m,
00207 typename tmat4x4<T>::row_type const & v);
00208
00209 template <typename T>
00210 typename tmat4x4<T>::row_type operator* (
00211 typename tmat4x4<T>::col_type const & v,
00212 tmat4x4<T> const & m);
00213
00214 template <typename T>
00215 tmat2x4<T> operator* (
00216 tmat4x4<T> const & m1,
00217 tmat2x4<T> const & m2);
00218
00219 template <typename T>
00220 tmat3x4<T> operator* (
00221 tmat4x4<T> const & m1,
00222 tmat3x4<T> const & m2);
00223
00224 template <typename T>
00225 tmat4x4<T> operator* (
00226 tmat4x4<T> const & m1,
00227 tmat4x4<T> const & m2);
00228
00229 template <typename T>
00230 tmat4x4<T> operator/ (
00231 tmat4x4<T> const & m,
00232 typename tmat4x4<T>::value_type const & s);
00233
00234 template <typename T>
00235 tmat4x4<T> operator/ (
00236 typename tmat4x4<T>::value_type const & s,
00237 tmat4x4<T> const & m);
00238
00239 template <typename T>
00240 typename tmat4x4<T>::col_type operator/ (
00241 tmat4x4<T> const & m,
00242 typename tmat4x4<T>::row_type const & v);
00243
00244 template <typename T>
00245 typename tmat4x4<T>::row_type operator/ (
00246 typename tmat4x4<T>::col_type & v,
00247 tmat4x4<T> const & m);
00248
00249 template <typename T>
00250 tmat4x4<T> operator/ (
00251 tmat4x4<T> const & m1,
00252 tmat4x4<T> const & m2);
00253
00254
00255 template <typename T>
00256 tmat4x4<T> const operator- (
00257 tmat4x4<T> const & m);
00258
00259 template <typename T>
00260 tmat4x4<T> const operator-- (
00261 tmat4x4<T> const & m, int);
00262
00263 template <typename T>
00264 tmat4x4<T> const operator++ (
00265 tmat4x4<T> const & m, int);
00266
00267 }
00268
00271
00277 typedef detail::tmat4x4<lowp_float> lowp_mat4;
00278
00284 typedef detail::tmat4x4<mediump_float> mediump_mat4;
00285
00291 typedef detail::tmat4x4<highp_float> highp_mat4;
00292
00298 typedef detail::tmat4x4<lowp_float> lowp_mat4x4;
00299
00305 typedef detail::tmat4x4<mediump_float> mediump_mat4x4;
00306
00312 typedef detail::tmat4x4<highp_float> highp_mat4x4;
00313
00315 }
00316
00317 #ifndef GLM_EXTERNAL_TEMPLATE
00318 #include "type_mat4x4.inl"
00319 #endif//GLM_EXTERNAL_TEMPLATE
00320
00321 #endif//glm_core_type_mat4x4