type_mat3x4.hpp
00001 
00002 // OpenGL Mathematics Copyright (c) 2005 - 2011 G-Truc Creation (www.g-truc.net)
00004 // Created : 2006-08-05
00005 // Updated : 2010-02-05
00006 // Licence : This source is under MIT License
00007 // File    : glm/core/type_mat3x4.hpp
00009 
00010 #ifndef glm_core_type_mat3x4
00011 #define glm_core_type_mat3x4
00012 
00013 #include "type_mat.hpp"
00014 
00015 namespace glm
00016 {
00017         namespace test
00018         {
00019                 void main_mat3x4();
00020         }//namespace test
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 
00040                 template <typename T> 
00041                 struct tmat3x4
00042                 {
00043                         enum ctor{null};
00044                         typedef T value_type;
00045                         typedef std::size_t size_type;
00046                         typedef tvec4<T> col_type;
00047                         typedef tvec3<T> row_type;
00048                         static GLM_FUNC_DECL size_type col_size();
00049                         static GLM_FUNC_DECL size_type row_size();
00050 
00051                         typedef tmat3x4<T> type;
00052                         typedef tmat4x3<T> transpose_type;
00053 
00054                 private:
00055                         // Data 
00056                         col_type value[3];
00057 
00058                 public:
00059                         // Constructors
00060                         GLM_FUNC_DECL tmat3x4();
00061                         GLM_FUNC_DECL tmat3x4(tmat3x4 const & m);
00062 
00063                         GLM_FUNC_DECL explicit tmat3x4(
00064                                 ctor Null);
00065                         GLM_FUNC_DECL explicit tmat3x4(
00066                                 value_type const & s);
00067                         GLM_FUNC_DECL explicit tmat3x4(
00068                                 value_type const & x0, value_type const & y0, value_type const & z0, value_type const & w0,
00069                                 value_type const & x1, value_type const & y1, value_type const & z1, value_type const & w1,
00070                                 value_type const & x2, value_type const & y2, value_type const & z2, value_type const & w2);
00071                         GLM_FUNC_DECL explicit tmat3x4(
00072                                 col_type const & v0, 
00073                                 col_type const & v1,
00074                                 col_type const & v2);
00075 
00076                         // Conversion
00077                         template <typename U> 
00078                         GLM_FUNC_DECL explicit tmat3x4(tmat3x4<U> const & m);
00079 
00080                         GLM_FUNC_DECL explicit tmat3x4(tmat2x2<T> const & x);
00081                         GLM_FUNC_DECL explicit tmat3x4(tmat3x3<T> const & x);
00082                         GLM_FUNC_DECL explicit tmat3x4(tmat4x4<T> const & x);
00083                         GLM_FUNC_DECL explicit tmat3x4(tmat2x3<T> const & x);
00084                         GLM_FUNC_DECL explicit tmat3x4(tmat3x2<T> const & x);
00085                         GLM_FUNC_DECL explicit tmat3x4(tmat2x4<T> const & x);
00086                         GLM_FUNC_DECL explicit tmat3x4(tmat4x2<T> const & x);
00087                         GLM_FUNC_DECL explicit tmat3x4(tmat4x3<T> const & x);
00088 
00089                         // Accesses
00090                         col_type & operator[](size_type i);
00091                         col_type const & operator[](size_type i) const;
00092 
00093                         // Unary updatable operators
00094                         GLM_FUNC_DECL tmat3x4<T> & operator=  (tmat3x4<T> const & m);
00095                         template <typename U> 
00096                         GLM_FUNC_DECL tmat3x4<T> & operator=  (tmat3x4<U> const & m);
00097                         template <typename U> 
00098                         GLM_FUNC_DECL tmat3x4<T> & operator+= (U const & s);
00099                         template <typename U> 
00100                         GLM_FUNC_DECL tmat3x4<T> & operator+= (tmat3x4<U> const & m);
00101                         template <typename U> 
00102                         GLM_FUNC_DECL tmat3x4<T> & operator-= (U const & s);
00103                         template <typename U> 
00104                         GLM_FUNC_DECL tmat3x4<T> & operator-= (tmat3x4<U> const & m);
00105                         template <typename U> 
00106                         GLM_FUNC_DECL tmat3x4<T> & operator*= (U const & s);
00107                         template <typename U> 
00108                         GLM_FUNC_DECL tmat3x4<T> & operator*= (tmat3x4<U> const & m);
00109                         template <typename U> 
00110                         GLM_FUNC_DECL tmat3x4<T> & operator/= (U const & s);
00111 
00112                         GLM_FUNC_DECL tmat3x4<T> & operator++ ();
00113                         GLM_FUNC_DECL tmat3x4<T> & operator-- ();
00114                 };
00115 
00116                 // Binary operators
00117                 template <typename T> 
00118                 tmat3x4<T> operator+ (
00119                         tmat3x4<T> const & m, 
00120                         typename tmat3x4<T>::value_type const & s);
00121             
00122                 template <typename T> 
00123                 tmat3x4<T> operator+ (
00124                         tmat3x4<T> const & m1, 
00125                         tmat3x4<T> const & m2);
00126             
00127                 template <typename T> 
00128                 tmat3x4<T> operator- (
00129                         tmat3x4<T> const & m, 
00130                         typename tmat3x4<T>::value_type const & s);
00131 
00132                 template <typename T> 
00133                 tmat3x4<T> operator- (
00134                         tmat3x4<T> const & m1, 
00135                         tmat3x4<T> const & m2);
00136 
00137                 template <typename T> 
00138                 tmat3x4<T> operator* (
00139                         tmat3x4<T> const & m, 
00140                         typename tmat3x4<T>::value_type const & s);
00141 
00142                 template <typename T> 
00143                 tmat3x4<T> operator* (
00144                         typename tmat3x4<T>::value_type const & s, 
00145                         tmat3x4<T> const & m);
00146 
00147                 template <typename T>
00148                 typename tmat3x4<T>::col_type operator* (
00149                         tmat3x4<T> const & m, 
00150                         typename tmat3x4<T>::row_type const & v);
00151 
00152                 template <typename T> 
00153                 typename tmat3x4<T>::row_type operator* (
00154                         typename tmat3x4<T>::col_type const & v, 
00155                         tmat3x4<T> const & m);
00156 
00157                 template <typename T>
00158                 tmat4x4<T> operator* (
00159                         tmat3x4<T> const & m1, 
00160                         tmat4x3<T> const & m2);
00161 
00162                 template <typename T> 
00163                 tmat3x4<T> operator/ (
00164                         tmat3x4<T> const & m, 
00165                         typename tmat3x4<T>::value_type const & s);
00166 
00167                 template <typename T> 
00168                 tmat3x4<T> operator/ (
00169                         typename tmat3x4<T>::value_type const & s, 
00170                         tmat3x4<T> const & m);
00171 
00172                 // Unary constant operators
00173                 template <typename T> 
00174                 tmat3x4<T> const operator-  (
00175                         tmat3x4<T> const & m);
00176 
00177                 template <typename T> 
00178                 tmat3x4<T> const operator-- (
00179                         tmat3x4<T> const & m, 
00180                         int);
00181 
00182                 template <typename T> 
00183                 tmat3x4<T> const operator++ (
00184                         tmat3x4<T> const & m, 
00185                         int);
00186 
00187         } //namespace detail
00188 
00189         namespace core{
00190         namespace type{
00191 
00192         namespace precision
00193         {
00197                 typedef detail::tmat3x4<lowp_float>             lowp_mat3x4;
00201                 typedef detail::tmat3x4<mediump_float>  mediump_mat3x4;
00205                 typedef detail::tmat3x4<highp_float>    highp_mat3x4;
00206         }
00207         //namespace precision
00208 
00209         }//namespace type
00210         }//namespace core
00211 } //namespace glm
00212 
00213 #ifndef GLM_EXTERNAL_TEMPLATE
00214 #include "type_mat3x4.inl"
00215 #endif
00216 
00217 #endif //glm_core_type_mat3x4