type_mat2x3.hpp
Go to the documentation of this file.
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_mat2x3
00030 #define glm_core_type_mat2x3
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         // \brief Template for 2 columns and 3 rows matrix of floating-point numbers.
00052         // \ingroup core_template
00053         template <typename T> 
00054         struct tmat2x3
00055         {
00056                 enum ctor{null};
00057                 typedef T value_type;
00058                 typedef std::size_t size_type;
00059                 typedef tvec3<T> col_type;
00060                 typedef tvec2<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 tmat2x3<T> type;
00066                 typedef tmat3x2<T> transpose_type;
00067 
00068         private:
00069                 // Data 
00070                 col_type value[2];
00071 
00072         public:
00073                 // Constructors
00074                 GLM_FUNC_DECL tmat2x3();
00075                 GLM_FUNC_DECL tmat2x3(tmat2x3 const & m);
00076 
00077                 GLM_FUNC_DECL explicit tmat2x3(
00078                         ctor);
00079                 GLM_FUNC_DECL explicit tmat2x3(
00080                         value_type const & s);
00081                 GLM_FUNC_DECL explicit tmat2x3(
00082                         value_type const & x0, value_type const & y0, value_type const & z0,
00083                         value_type const & x1, value_type const & y1, value_type const & z1);
00084                 GLM_FUNC_DECL explicit tmat2x3(
00085                         col_type const & v0, 
00086                         col_type const & v1);
00087             
00089                 // Conversions
00090                 template <typename U> 
00091                 GLM_FUNC_DECL explicit tmat2x3(
00092             U const & x);
00093                         
00094                 template <typename X1, typename Y1, typename Z1, typename X2, typename Y2, typename Z2> 
00095                 GLM_FUNC_DECL explicit tmat2x3(
00096             X1 const & x1, Y1 const & y1, Z1 const & z1, 
00097             X2 const & x2, Y2 const & y2, Z2 const & z2);
00098                         
00099                 template <typename U, typename V> 
00100                 GLM_FUNC_DECL explicit tmat2x3(
00101             tvec3<U> const & v1, 
00102             tvec3<V> const & v2);
00103             
00105         // Matrix conversion
00106                 template <typename U> 
00107                 GLM_FUNC_DECL explicit tmat2x3(tmat2x3<U> const & m);
00108 
00109                 GLM_FUNC_DECL explicit tmat2x3(tmat2x2<T> const & x);
00110                 GLM_FUNC_DECL explicit tmat2x3(tmat3x3<T> const & x);
00111                 GLM_FUNC_DECL explicit tmat2x3(tmat4x4<T> const & x);
00112                 GLM_FUNC_DECL explicit tmat2x3(tmat2x4<T> const & x);
00113                 GLM_FUNC_DECL explicit tmat2x3(tmat3x2<T> const & x);
00114                 GLM_FUNC_DECL explicit tmat2x3(tmat3x4<T> const & x);
00115                 GLM_FUNC_DECL explicit tmat2x3(tmat4x2<T> const & x);
00116                 GLM_FUNC_DECL explicit tmat2x3(tmat4x3<T> const & x);
00117 
00118                 // Accesses
00119                 col_type & operator[](size_type i);
00120                 col_type const & operator[](size_type i) const;
00121 
00122                 // Unary updatable operators
00123                 GLM_FUNC_DECL tmat2x3<T> & operator=  (tmat2x3<T> const & m);
00124                 template <typename U> 
00125                 GLM_FUNC_DECL tmat2x3<T> & operator=  (tmat2x3<U> const & m);
00126                 template <typename U> 
00127                 GLM_FUNC_DECL tmat2x3<T> & operator+= (U const & s);
00128                 template <typename U> 
00129                 GLM_FUNC_DECL tmat2x3<T> & operator+= (tmat2x3<U> const & m);
00130                 template <typename U> 
00131                 GLM_FUNC_DECL tmat2x3<T> & operator-= (U const & s);
00132                 template <typename U> 
00133                 GLM_FUNC_DECL tmat2x3<T> & operator-= (tmat2x3<U> const & m);
00134                 template <typename U> 
00135                 GLM_FUNC_DECL tmat2x3<T> & operator*= (U const & s);
00136                 template <typename U> 
00137                 GLM_FUNC_DECL tmat2x3<T> & operator*= (tmat2x3<U> const & m);
00138                 template <typename U> 
00139                 GLM_FUNC_DECL tmat2x3<T> & operator/= (U const & s);
00140 
00141                 GLM_FUNC_DECL tmat2x3<T> & operator++ ();
00142                 GLM_FUNC_DECL tmat2x3<T> & operator-- ();
00143         };
00144 
00145         // Binary operators
00146         template <typename T> 
00147         tmat2x3<T> operator+ (
00148                 tmat2x3<T> const & m, 
00149                 typename tmat2x3<T>::value_type const & s);
00150             
00151         template <typename T> 
00152         tmat2x3<T> operator+ (
00153                 tmat2x3<T> const & m1, 
00154                 tmat2x3<T> const & m2);
00155             
00156         template <typename T> 
00157         tmat2x3<T> operator- (
00158                 tmat2x3<T> const & m, 
00159                 typename tmat2x3<T>::value_type const & s);
00160 
00161         template <typename T> 
00162         tmat2x3<T> operator- (
00163                 tmat2x3<T> const & m1, 
00164                 tmat2x3<T> const & m2);
00165 
00166         template <typename T> 
00167         tmat2x3<T> operator* (
00168                 tmat2x3<T> const & m, 
00169                 typename tmat2x3<T>::value_type const & s);
00170 
00171         template <typename T> 
00172         tmat2x3<T> operator* (
00173                 typename tmat2x3<T>::value_type const & s, 
00174                 tmat2x3<T> const & m);
00175 
00176         template <typename T>
00177         typename tmat2x3<T>::col_type operator* (
00178                 tmat2x3<T> const & m, 
00179                 typename tmat2x3<T>::row_type const & v);
00180 
00181         template <typename T> 
00182         typename tmat2x3<T>::row_type operator* (
00183                 typename tmat2x3<T>::col_type const & v, 
00184                 tmat2x3<T> const & m);
00185 
00186         template <typename T>
00187         tmat2x3<T> operator* (
00188                 tmat2x3<T> const & m1, 
00189                 tmat2x2<T> const & m2);
00190 
00191         template <typename T>
00192         tmat3x3<T> operator* (
00193                 tmat2x3<T> const & m1, 
00194                 tmat3x2<T> const & m2);
00195                 
00196         template <typename T>
00197         tmat4x3<T> operator* (
00198                 tmat2x3<T> const & m1, 
00199                 tmat4x2<T> const & m2);
00200 
00201         template <typename T> 
00202         tmat2x3<T> operator/ (
00203                 tmat2x3<T> const & m, 
00204                 typename tmat2x3<T>::value_type const & s);
00205 
00206         template <typename T> 
00207         tmat2x3<T> operator/ (
00208                 typename tmat2x3<T>::value_type const & s,
00209                 tmat2x3<T> const & m);
00210 
00211         // Unary constant operators
00212         template <typename T> 
00213         tmat2x3<T> const operator-  (
00214                 tmat2x3<T> const & m);
00215 
00216         template <typename T> 
00217         tmat2x3<T> const operator-- (
00218                 tmat2x3<T> const & m, 
00219                 int);
00220 
00221         template <typename T> 
00222         tmat2x3<T> const operator++ (
00223                 tmat2x3<T> const & m, 
00224                 int);
00225 
00226 } //namespace detail
00227 
00230 
00236         typedef detail::tmat2x3<lowp_float>             lowp_mat2x3;
00237     
00243         typedef detail::tmat2x3<mediump_float>  mediump_mat2x3;
00244     
00250         typedef detail::tmat2x3<highp_float>    highp_mat2x3;
00251 
00253 }//namespace glm
00254 
00255 #ifndef GLM_EXTERNAL_TEMPLATE
00256 #include "type_mat2x3.inl"
00257 #endif
00258 
00259 #endif //glm_core_type_mat2x3