- Main Page
- Related Pages
- Modules
- Classes
- Files

- File List

# type_mat2x4.hpp

Go to the documentation of this file.

    00001
    00002
    00003
    00004
    00005
    00006
    00007
    00008
    00009
    00010
    00011
    00012
    00013
    00014
    00015
    00016
    00017
    00018
    00019
    00020
    00021
    00022
    00023
    00024
    00025
    00026
    00027
    00028
    00029 #ifndef glm_core_type_mat2x4
    00030 #define glm_core_type_mat2x4
    00031
    00032 #include "type_mat.hpp"
    00033
    00034 namespace glm{
    00035 namespace detail
    00036 {
    00037         template <typename T> struct tvec1;
    00038         template <typename T> struct tvec2;
    00039         template <typename T> struct tvec3;
    00040         template <typename T> struct tvec4;
    00041         template <typename T> struct tmat2x2;
    00042         template <typename T> struct tmat2x3;
    00043         template <typename T> struct tmat2x4;
    00044         template <typename T> struct tmat3x2;
    00045         template <typename T> struct tmat3x3;
    00046         template <typename T> struct tmat3x4;
    00047         template <typename T> struct tmat4x2;
    00048         template <typename T> struct tmat4x3;
    00049         template <typename T> struct tmat4x4;
    00050
    00053         template <typename T>
    00054         struct tmat2x4
    00055         {
    00056                 enum ctor{null};
    00057                 typedef T value_type;
    00058                 typedef std::size_t size_type;
    00059                 typedef tvec4<T> col_type;
    00060                 typedef tvec2<T> row_type;
    00061         GLM_FUNC_DECL size_type length() const;
    00062                 static GLM_FUNC_DECL size_type col_size();
    00063                 static GLM_FUNC_DECL size_type row_size();
    00064
    00065                 typedef tmat2x4<T> type;
    00066                 typedef tmat4x2<T> transpose_type;
    00067
    00068         private:
    00069                 // Data
    00070                 col_type value[2];
    00071
    00072         public:
    00073                 // Constructors
    00074                 GLM_FUNC_DECL tmat2x4();
    00075                 GLM_FUNC_DECL tmat2x4(tmat2x4 const & m);
    00076
    00077                 GLM_FUNC_DECL explicit tmat2x4(
    00078                         ctor);
    00079                 GLM_FUNC_DECL explicit tmat2x4(
    00080                         value_type const & s);
    00081                 GLM_FUNC_DECL explicit tmat2x4(
    00082                         value_type const & x0, value_type const & y0, value_type const & z0, value_type const & w0,
    00083                         value_type const & x1, value_type const & y1, value_type const & z1, value_type const & w1);
    00084                 GLM_FUNC_DECL explicit tmat2x4(
    00085                         col_type const & v0,
    00086                         col_type const & v1);
    00087
    00089                 // Conversions
    00090                 template <typename U>
    00091                 GLM_FUNC_DECL explicit tmat2x4(
    00092             U const & x);
    00093
    00094                 template <
    00095             typename X1, typename Y1, typename Z1, typename W1,
    00096             typename X2, typename Y2, typename Z2, typename W2>
    00097                 GLM_FUNC_DECL explicit tmat2x4(
    00098             X1 const & x1, Y1 const & y1, Z1 const & z1, W1 const & w1,
    00099             X2 const & x2, Y2 const & y2, Z2 const & z2, W2 const & w2);
    00100
    00101                 template <typename U, typename V>
    00102                 GLM_FUNC_DECL explicit tmat2x4(
    00103             tvec4<U> const & v1,
    00104             tvec4<V> const & v2);
    00105
    00107                 // Matrix conversions
    00108                 template <typename U>
    00109                 GLM_FUNC_DECL explicit tmat2x4(tmat2x4<U> const & m);
    00110
    00111                 GLM_FUNC_DECL explicit tmat2x4(tmat2x2<T> const & x);
    00112                 GLM_FUNC_DECL explicit tmat2x4(tmat3x3<T> const & x);
    00113                 GLM_FUNC_DECL explicit tmat2x4(tmat4x4<T> const & x);
    00114                 GLM_FUNC_DECL explicit tmat2x4(tmat2x3<T> const & x);
    00115                 GLM_FUNC_DECL explicit tmat2x4(tmat3x2<T> const & x);
    00116                 GLM_FUNC_DECL explicit tmat2x4(tmat3x4<T> const & x);
    00117                 GLM_FUNC_DECL explicit tmat2x4(tmat4x2<T> const & x);
    00118                 GLM_FUNC_DECL explicit tmat2x4(tmat4x3<T> const & x);
    00119
    00120                 // Accesses
    00121                 GLM_FUNC_DECL col_type & operator[](size_type i);
    00122                 GLM_FUNC_DECL col_type const & operator[](size_type i) const;
    00123
    00124                 // Unary updatable operators
    00125                 GLM_FUNC_DECL tmat2x4<T>& operator=  (tmat2x4<T> const & m);
    00126                 template <typename U>
    00127                 GLM_FUNC_DECL tmat2x4<T>& operator=  (tmat2x4<U> const & m);
    00128                 template <typename U>
    00129                 GLM_FUNC_DECL tmat2x4<T>& operator+= (U const & s);
    00130                 template <typename U>
    00131                 GLM_FUNC_DECL tmat2x4<T>& operator+= (tmat2x4<U> const & m);
    00132                 template <typename U>
    00133                 GLM_FUNC_DECL tmat2x4<T>& operator-= (U const & s);
    00134                 template <typename U>
    00135                 GLM_FUNC_DECL tmat2x4<T>& operator-= (tmat2x4<U> const & m);
    00136                 template <typename U>
    00137                 GLM_FUNC_DECL tmat2x4<T>& operator*= (U const & s);
    00138                 template <typename U>
    00139                 GLM_FUNC_DECL tmat2x4<T>& operator*= (tmat2x4<U> const & m);
    00140                 template <typename U>
    00141                 GLM_FUNC_DECL tmat2x4<T>& operator/= (U const & s);
    00142
    00143                 GLM_FUNC_DECL tmat2x4<T>& operator++ ();
    00144                 GLM_FUNC_DECL tmat2x4<T>& operator-- ();
    00145         };
    00146
    00147         // Binary operators
    00148         template <typename T>
    00149         tmat2x4<T> operator+ (
    00150                 tmat2x4<T> const & m,
    00151                 typename tmat2x4<T>::value_type const & s);
    00152
    00153         template <typename T>
    00154         tmat2x4<T> operator+ (
    00155                 tmat2x4<T> const & m1,
    00156                 tmat2x4<T> const & m2);
    00157
    00158         template <typename T>
    00159         tmat2x4<T> operator- (
    00160                 tmat2x4<T> const & m,
    00161                 typename tmat2x4<T>::value_type const & s);
    00162
    00163         template <typename T>
    00164         tmat2x4<T> operator- (
    00165                 tmat2x4<T> const & m1,
    00166                 tmat2x4<T> const & m2);
    00167
    00168         template <typename T>
    00169         tmat2x4<T> operator* (
    00170                 tmat2x4<T> const & m,
    00171                 typename tmat2x4<T>::value_type const & s);
    00172
    00173         template <typename T>
    00174         tmat2x4<T> operator* (
    00175                 typename tmat2x4<T>::value_type const & s,
    00176                 tmat2x4<T> const & m);
    00177
    00178         template <typename T>
    00179         typename tmat2x4<T>::col_type operator* (
    00180                 tmat2x4<T> const & m,
    00181                 typename tmat2x4<T>::row_type const & v);
    00182
    00183         template <typename T>
    00184         typename tmat2x4<T>::row_type operator* (
    00185                 typename tmat2x4<T>::col_type const & v,
    00186                 tmat2x4<T> const & m);
    00187
    00188         template <typename T>
    00189         tmat4x4<T> operator* (
    00190                 tmat2x4<T> const & m1,
    00191                 tmat4x2<T> const & m2);
    00192
    00193         template <typename T>
    00194         tmat2x4<T> operator* (
    00195                 tmat2x4<T> const & m1,
    00196                 tmat2x2<T> const & m2);
    00197
    00198         template <typename T>
    00199         tmat3x4<T> operator* (
    00200                 tmat2x4<T> const & m1,
    00201                 tmat3x2<T> const & m2);
    00202
    00203         template <typename T>
    00204         tmat2x4<T> operator/ (
    00205                 tmat2x4<T> const & m,
    00206                 typename tmat2x4<T>::value_type const & s);
    00207
    00208         template <typename T>
    00209         tmat2x4<T> operator/ (
    00210                 typename tmat2x4<T>::value_type const & s,
    00211                 tmat2x4<T> const & m);
    00212
    00213         // Unary constant operators
    00214         template <typename T>
    00215         tmat2x4<T> const operator-  (
    00216                 tmat2x4<T> const & m);
    00217
    00218         template <typename T>
    00219         tmat2x4<T> const operator-- (
    00220                 tmat2x4<T> const & m,
    00221                 int);
    00222
    00223         template <typename T>
    00224         tmat2x4<T> const operator++ (
    00225                 tmat2x4<T> const & m,
    00226                 int);
    00227
    00228 } //namespace detail
    00229
    00233         typedef detail::tmat2x4<lowp_float>             lowp_mat2x4;
    00237         typedef detail::tmat2x4<mediump_float>  mediump_mat2x4;
    00241         typedef detail::tmat2x4<highp_float>    highp_mat2x4;
    00242
    00243 }//namespace glm
    00244
    00245 #ifndef GLM_EXTERNAL_TEMPLATE
    00246 #include "type_mat2x4.inl"
    00247 #endif
    00248
    00249 #endif //glm_core_type_mat2x4