GLM Version 0.9.0

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