type_mat4x3.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_mat4x3
00030 #define glm_core_type_mat4x3
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 
00053         template <typename T> 
00054         struct tmat4x3
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 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 tmat4x3<T> type;
00066                 typedef tmat3x4<T> transpose_type;
00067 
00068         private:
00069                 // Data 
00070                 col_type value[4];
00071 
00072         public:
00073                 // Constructors
00074                 GLM_FUNC_DECL tmat4x3();
00075                 GLM_FUNC_DECL tmat4x3(tmat4x3 const & m);
00076 
00077                 GLM_FUNC_DECL explicit tmat4x3(
00078                         ctor Null);
00079                 GLM_FUNC_DECL explicit tmat4x3(
00080                         value_type const & x);
00081                 GLM_FUNC_DECL explicit tmat4x3(
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                         value_type const & x2, value_type const & y2, value_type const & z2,
00085                         value_type const & x3, value_type const & y3, value_type const & z3);
00086                 GLM_FUNC_DECL explicit tmat4x3(
00087                         col_type const & v0, 
00088                         col_type const & v1,
00089                         col_type const & v2,
00090             col_type const & v3);
00091             
00093                 // Conversions
00094                 template <typename U> 
00095                 GLM_FUNC_DECL explicit tmat4x3(
00096             U const & x);
00097                         
00098                 template <
00099             typename X1, typename Y1, typename Z1, 
00100             typename X2, typename Y2, typename Z2, 
00101             typename X3, typename Y3, typename Z3, 
00102             typename X4, typename Y4, typename Z4> 
00103                 GLM_FUNC_DECL explicit tmat4x3(
00104             X1 const & x1, Y1 const & y1, Z1 const & z1, 
00105             X2 const & x2, Y2 const & y2, Z2 const & z2, 
00106             X3 const & x3, Y3 const & y3, Z3 const & z3, 
00107             X4 const & x4, Y4 const & y4, Z4 const & z4);
00108                         
00109                 template <typename V1, typename V2, typename V3, typename V4> 
00110                 GLM_FUNC_DECL explicit tmat4x3(
00111             tvec3<V1> const & v1, 
00112             tvec3<V2> const & v2,
00113             tvec3<V3> const & v3,
00114             tvec3<V4> const & v4);
00115             
00116                 // Matrix conversions
00117                 template <typename U> 
00118                 GLM_FUNC_DECL explicit tmat4x3(tmat4x3<U> const & m);
00119                         
00120                 GLM_FUNC_DECL explicit tmat4x3(tmat2x2<T> const & x);
00121                 GLM_FUNC_DECL explicit tmat4x3(tmat3x3<T> const & x);
00122                 GLM_FUNC_DECL explicit tmat4x3(tmat4x4<T> const & x);
00123                 GLM_FUNC_DECL explicit tmat4x3(tmat2x3<T> const & x);
00124                 GLM_FUNC_DECL explicit tmat4x3(tmat3x2<T> const & x);
00125                 GLM_FUNC_DECL explicit tmat4x3(tmat2x4<T> const & x);
00126                 GLM_FUNC_DECL explicit tmat4x3(tmat4x2<T> const & x);
00127                 GLM_FUNC_DECL explicit tmat4x3(tmat3x4<T> const & x);
00128 
00129                 // Accesses
00130                 col_type & operator[](size_type i);
00131                 col_type const & operator[](size_type i) const;
00132 
00133                 // Unary updatable operators
00134                 GLM_FUNC_DECL tmat4x3<T> & operator=  (tmat4x3<T> const & m);
00135                 template <typename U> 
00136                 GLM_FUNC_DECL tmat4x3<T> & operator=  (tmat4x3<U> const & m);
00137                 template <typename U> 
00138                 GLM_FUNC_DECL tmat4x3<T> & operator+= (U const & s);
00139                 template <typename U> 
00140                 GLM_FUNC_DECL tmat4x3<T> & operator+= (tmat4x3<U> const & m);
00141                 template <typename U> 
00142                 GLM_FUNC_DECL tmat4x3<T> & operator-= (U const & s);
00143                 template <typename U> 
00144                 GLM_FUNC_DECL tmat4x3<T> & operator-= (tmat4x3<U> const & m);
00145                 template <typename U> 
00146                 GLM_FUNC_DECL tmat4x3<T> & operator*= (U const & s);
00147                 template <typename U> 
00148                 GLM_FUNC_DECL tmat4x3<T> & operator*= (tmat4x3<U> const & m);
00149                 template <typename U> 
00150                 GLM_FUNC_DECL tmat4x3<T> & operator/= (U const & s);
00151 
00152                 GLM_FUNC_DECL tmat4x3<T> & operator++ ();
00153                 GLM_FUNC_DECL tmat4x3<T> & operator-- ();
00154         };
00155 
00156         // Binary operators
00157         template <typename T> 
00158         tmat4x3<T> operator+ (
00159                 tmat4x3<T> const & m, 
00160                 typename tmat4x3<T>::value_type const & s);
00161             
00162         template <typename T> 
00163         tmat4x3<T> operator+ (
00164                 tmat4x3<T> const & m1, 
00165                 tmat4x3<T> const & m2);
00166             
00167         template <typename T> 
00168         tmat4x3<T> operator- (
00169                 tmat4x3<T> const & m, 
00170                 typename tmat4x3<T>::value_type const & s);
00171 
00172         template <typename T> 
00173         tmat4x3<T> operator- (
00174                 tmat4x3<T> const & m1, 
00175                 tmat4x3<T> const & m2);
00176 
00177         template <typename T> 
00178         tmat4x3<T> operator* (
00179                 tmat4x3<T> const & m, 
00180                 typename tmat4x3<T>::value_type const & s);
00181 
00182         template <typename T> 
00183         tmat4x3<T> operator* (
00184                 typename tmat4x3<T>::value_type const & s, 
00185                 tmat4x3<T> const & m);
00186 
00187         template <typename T>
00188         typename tmat4x3<T>::col_type operator* (
00189                 tmat4x3<T> const & m, 
00190                 typename tmat4x3<T>::row_type const & v);
00191 
00192         template <typename T> 
00193         typename tmat4x3<T>::row_type operator* (
00194                 typename tmat4x3<T>::col_type const & v, 
00195                 tmat4x3<T> const & m);
00196 
00197         template <typename T> 
00198         tmat2x3<T> operator* (
00199                 tmat4x3<T> const & m1, 
00200                 tmat2x4<T> const & m2);
00201 
00202         template <typename T> 
00203         tmat3x3<T> operator* (
00204                 tmat4x3<T> const & m1, 
00205                 tmat3x4<T> const & m2);
00206                 
00207         template <typename T>
00208         tmat4x3<T> operator* (
00209                 tmat4x3<T> const & m1, 
00210                 tmat4x4<T> const & m2);
00211 
00212         template <typename T> 
00213         tmat4x3<T> operator/ (
00214                 tmat4x3<T> const & m, 
00215                 typename tmat4x3<T>::value_type const & s);
00216 
00217         template <typename T> 
00218         tmat4x3<T> operator/ (
00219                 typename tmat4x3<T>::value_type const & s, 
00220                 tmat4x3<T> const & m);
00221 
00222         // Unary constant operators
00223         template <typename T> 
00224         tmat4x3<T> const operator- (
00225                 tmat4x3<T> const & m);
00226 
00227         template <typename T> 
00228         tmat4x3<T> const operator-- (
00229                 tmat4x3<T> const & m, 
00230                 int);
00231 
00232         template <typename T> 
00233         tmat4x3<T> const operator++ (
00234                 tmat4x3<T> const & m, 
00235                 int);
00236 
00237 }//namespace detail
00238 
00243         typedef detail::tmat4x3<lowp_float>             lowp_mat4x3;
00244 
00249         typedef detail::tmat4x3<mediump_float>  mediump_mat4x3;
00250 
00255         typedef detail::tmat4x3<highp_float>    highp_mat4x3;
00256 
00257 }//namespace glm
00258 
00259 #ifndef GLM_EXTERNAL_TEMPLATE
00260 #include "type_mat4x3.inl"
00261 #endif //GLM_EXTERNAL_TEMPLATE
00262 
00263 #endif//glm_core_type_mat4x3