00001 
00002 
00004 
00005 
00006 
00007 
00009 
00010 #ifndef glm_core_type_mat2x4
00011 #define glm_core_type_mat2x4
00012 
00013 #include "type_size.hpp"
00014 
00015 namespace glm
00016 {
00017         namespace test
00018         {
00019                 void main_mat2x4();
00020         }
00021 
00022         namespace detail
00023         {
00024                 template <typename T> struct tvec1;
00025                 template <typename T> struct tvec2;
00026                 template <typename T> struct tvec3;
00027                 template <typename T> struct tvec4;
00028                 template <typename T> struct tmat2x2;
00029                 template <typename T> struct tmat2x3;
00030                 template <typename T> struct tmat2x4;
00031                 template <typename T> struct tmat3x2;
00032                 template <typename T> struct tmat3x3;
00033                 template <typename T> struct tmat3x4;
00034                 template <typename T> struct tmat4x2;
00035                 template <typename T> struct tmat4x3;
00036                 template <typename T> struct tmat4x4;
00037 
00039                 template <typename T> 
00040                 struct tmat2x4
00041                 {
00042                 public:
00043                         typedef tmat2x4<T>* pointer;
00044                         typedef const tmat2x4<T>* const_pointer;
00045                         typedef const tmat2x4<T>*const const_pointer_const;
00046                         typedef tmat2x4<T>*const pointer_const;
00047                         typedef tmat2x4<T>& reference;
00048                         typedef const tmat2x4<T>& const_reference;
00049                         typedef const tmat2x4<T>& param_type;
00050                         typedef tmat4x2<T> transpose_type;
00051 
00052                         typedef T value_type;
00053                         typedef detail::tvec2<T> col_type;
00054                         typedef detail::tvec4<T> row_type;
00055                         typedef glm::sizeType size_type;
00056                         static size_type col_size();
00057                         static size_type row_size();
00058                         static bool is_matrix();
00059 
00060                 public:
00061                         tmat4x2<T> _inverse() const;
00062 
00063                 private:
00064                         
00065                         detail::tvec4<T> value[2];
00066 
00067                 public:
00068                         
00069                         tmat2x4();
00070                         explicit tmat2x4(const T x);
00071                         explicit tmat2x4(
00072                                 const T x0, const T y0, const T z0, const T w0,
00073                                 const T x1, const T y1, const T z1, const T w1);
00074                         explicit tmat2x4(
00075                                 const detail::tvec4<T>& v0, 
00076                                 const detail::tvec4<T>& v1);
00077 
00078                         
00079                         template <typename U> 
00080                         explicit tmat2x4(const tmat2x4<U>& m);
00081 
00082                         explicit tmat2x4(const tmat2x2<T>& x);
00083                         explicit tmat2x4(const tmat3x3<T>& x);
00084                         explicit tmat2x4(const tmat4x4<T>& x);
00085                         explicit tmat2x4(const tmat2x3<T>& x);
00086                         
00087                         explicit tmat2x4(const tmat3x2<T>& x);
00088                         explicit tmat2x4(const tmat3x4<T>& x);
00089                         explicit tmat2x4(const tmat4x2<T>& x);
00090                         explicit tmat2x4(const tmat4x3<T>& x);
00091 
00092                         
00093                         detail::tvec4<T>& operator[](size_type i);
00094                         detail::tvec4<T> const & operator[](size_type i) const;
00095 
00096                         
00097                         tmat2x4<T>& operator=  (const tmat2x4<T>& m);
00098                         tmat2x4<T>& operator+= (const T & s);
00099                         tmat2x4<T>& operator+= (const tmat2x4<T>& m);
00100                         tmat2x4<T>& operator-= (const T & s);
00101                         tmat2x4<T>& operator-= (const tmat2x4<T>& m);
00102                         tmat2x4<T>& operator*= (const T & s);
00103                         tmat2x4<T>& operator*= (const tmat4x2<T>& m);
00104                         tmat2x4<T>& operator/= (const T & s);
00105                         
00106 
00107                         tmat2x4<T>& operator++ ();
00108                         tmat2x4<T>& operator-- ();
00109                 };
00110 
00111                 
00112                 template <typename T> 
00113                 tmat2x4<T> operator+ (const tmat2x4<T>& m, const T & s);
00114             
00115                 template <typename T> 
00116                 tmat2x4<T> operator+ (const tmat2x4<T>& m1, const tmat2x4<T>& m2);
00117             
00118                 template <typename T> 
00119                 tmat2x4<T> operator- (const tmat2x4<T>& m, const T & s);
00120 
00121                 template <typename T> 
00122                 tmat2x4<T> operator- (const tmat2x4<T>& m1, const tmat2x4<T>& m2);
00123 
00124                 template <typename T> 
00125                 tmat2x4<T> operator* (const tmat2x4<T>& m, const T & s);
00126 
00127                 template <typename T> 
00128                 tmat2x4<T> operator* (const T & s, const tmat2x4<T>& m);
00129 
00130                 template <typename T>
00131                 detail::tvec4<T> operator* (const tmat2x4<T>& m, const detail::tvec2<T>& v);
00132 
00133                 template <typename T> 
00134                 detail::tvec2<T> operator* (const detail::tvec4<T>& v, const tmat2x4<T>& m);
00135 
00136                 template <typename T>
00137                 tmat4x4<T> operator* (const tmat2x4<T>& m1, const tmat4x2<T>& m2);
00138 
00139                 template <typename T> 
00140                 tmat4x2<T> operator/ (const tmat2x4<T>& m, const T & s);
00141 
00142                 template <typename T> 
00143                 tmat4x2<T> operator/ (const T & s, const tmat2x4<T>& m);
00144 
00145                 
00146                 
00147 
00148                 
00149                 
00150 
00151                 
00152                 
00153 
00154                 
00155                 template <typename valType> 
00156                 tmat2x4<valType> const operator-  (tmat2x4<valType> const & m);
00157 
00158                 template <typename valType> 
00159                 tmat2x4<valType> const operator-- (tmat2x4<valType> const & m, int);
00160 
00161                 template <typename valType> 
00162                 tmat2x4<valType> const operator++ (tmat2x4<valType> const & m, int);
00163 
00164         } 
00165 
00166         namespace core{
00167         namespace type{
00168         namespace matrix{
00169 
00170         namespace precision
00171         {
00175                 typedef detail::tmat2x4<lowp_float>             lowp_mat2x4;
00179                 typedef detail::tmat2x4<mediump_float>  mediump_mat2x4;
00183                 typedef detail::tmat2x4<highp_float>    highp_mat2x4;
00184         }
00185         
00186 
00187 #ifndef GLM_PRECISION
00190         typedef detail::tmat2x4<mediump_float>  mat2x4;
00191 #elif(GLM_PRECISION & GLM_PRECISION_HIGH)
00192         typedef detail::tmat2x4<highp_float>    mat2x4;
00193 #elif(GLM_PRECISION & GLM_PRECISION_MEDIUM)
00194         typedef detail::tmat2x4<mediump_float>  mat2x4;
00195 #elif(GLM_PRECISION & GLM_PRECISION_LOW)
00196         typedef detail::tmat2x4<lowp_float>             mat2x4;
00197 #else
00198         typedef detail::tmat2x4<mediump_float>  mat2x4;
00199 #endif//GLM_PRECISION
00200 
00201         }
00202         }
00203         }
00204 } 
00205 
00206 #include "type_mat2x4.inl"
00207 
00208 #endif //glm_core_type_mat2x4