type_mat4x3.hpp

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