GLM Version 0.9.0

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