# GLM: type_mat4x3.hpp Source File

- Main Page
- Namespaces
- Files

- File List

# type_mat4x3.hpp

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