GLM Version 0.9.0

type_mat2x3.hpp

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