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 #pragma once
00030
00031 #include "../fwd.hpp"
00032 #include "type_vec2.hpp"
00033 #include "type_vec4.hpp"
00034 #include "type_mat.hpp"
00035 #if GLM_HAS_INITIALIZER_LISTS
00036 # include <initializer_list>
00037 #endif
00038 #if GLM_HAS_RVALUE_REFERENCES
00039 # include <algorithm>
00040 #endif
00041 #include <limits>
00042 #include <cstddef>
00043
00044 namespace glm{
00045 namespace detail
00046 {
00047 template <typename T, precision P>
00048 struct tmat2x4
00049 {
00050 enum ctor{_null};
00051 typedef T value_type;
00052 typedef std::size_t size_type;
00053 typedef tvec4<T, P> col_type;
00054 typedef tvec2<T, P> row_type;
00055 typedef tmat2x4<T, P> type;
00056 typedef tmat4x2<T, P> transpose_type;
00057
00058 GLM_FUNC_DECL GLM_CONSTEXPR length_t length() const;
00059
00060 private:
00061
00062 col_type value[2];
00063
00064 public:
00065
00066 GLM_FUNC_DECL tmat2x4();
00067 GLM_FUNC_DECL tmat2x4(tmat2x4<T, P> const & m);
00068 template <precision Q>
00069 GLM_FUNC_DECL tmat2x4(tmat2x4<T, Q> const & m);
00070
00071 GLM_FUNC_DECL explicit tmat2x4(
00072 ctor);
00073 GLM_FUNC_DECL explicit tmat2x4(
00074 T const & s);
00075 GLM_FUNC_DECL tmat2x4(
00076 T const & x0, T const & y0, T const & z0, T const & w0,
00077 T const & x1, T const & y1, T const & z1, T const & w1);
00078 GLM_FUNC_DECL tmat2x4(
00079 col_type const & v0,
00080 col_type const & v1);
00081
00083
00084 template <
00085 typename X1, typename Y1, typename Z1, typename W1,
00086 typename X2, typename Y2, typename Z2, typename W2>
00087 GLM_FUNC_DECL tmat2x4(
00088 X1 const & x1, Y1 const & y1, Z1 const & z1, W1 const & w1,
00089 X2 const & x2, Y2 const & y2, Z2 const & z2, W2 const & w2);
00090
00091 template <typename U, typename V>
00092 GLM_FUNC_DECL tmat2x4(
00093 tvec4<U, P> const & v1,
00094 tvec4<V, P> const & v2);
00095
00097
00098 template <typename U, precision Q>
00099 GLM_FUNC_DECL explicit tmat2x4(tmat2x4<U, Q> const & m);
00100
00101 GLM_FUNC_DECL explicit tmat2x4(tmat2x2<T, P> const & x);
00102 GLM_FUNC_DECL explicit tmat2x4(tmat3x3<T, P> const & x);
00103 GLM_FUNC_DECL explicit tmat2x4(tmat4x4<T, P> const & x);
00104 GLM_FUNC_DECL explicit tmat2x4(tmat2x3<T, P> const & x);
00105 GLM_FUNC_DECL explicit tmat2x4(tmat3x2<T, P> const & x);
00106 GLM_FUNC_DECL explicit tmat2x4(tmat3x4<T, P> const & x);
00107 GLM_FUNC_DECL explicit tmat2x4(tmat4x2<T, P> const & x);
00108 GLM_FUNC_DECL explicit tmat2x4(tmat4x3<T, P> const & x);
00109
00110
00111 GLM_FUNC_DECL col_type & operator[](length_t i);
00112 GLM_FUNC_DECL col_type const & operator[](length_t i) const;
00113
00114 GLM_FUNC_DECL tmat2x4<T, P>& operator= (tmat2x4<T, P> const & m);
00115 template <typename U>
00116 GLM_FUNC_DECL tmat2x4<T, P>& operator= (tmat2x4<U, P> const & m);
00117 template <typename U>
00118 GLM_FUNC_DECL tmat2x4<T, P>& operator+= (U s);
00119 template <typename U>
00120 GLM_FUNC_DECL tmat2x4<T, P>& operator+= (tmat2x4<U, P> const & m);
00121 template <typename U>
00122 GLM_FUNC_DECL tmat2x4<T, P>& operator-= (U s);
00123 template <typename U>
00124 GLM_FUNC_DECL tmat2x4<T, P>& operator-= (tmat2x4<U, P> const & m);
00125 template <typename U>
00126 GLM_FUNC_DECL tmat2x4<T, P>& operator*= (U s);
00127 template <typename U>
00128 GLM_FUNC_DECL tmat2x4<T, P>& operator/= (U s);
00129
00131
00132
00133 GLM_FUNC_DECL tmat2x4<T, P> & operator++ ();
00134 GLM_FUNC_DECL tmat2x4<T, P> & operator-- ();
00135 GLM_FUNC_DECL tmat2x4<T, P> operator++(int);
00136 GLM_FUNC_DECL tmat2x4<T, P> operator--(int);
00137 };
00138
00139
00140
00141 template <typename T, precision P>
00142 GLM_FUNC_DECL tmat2x4<T, P> operator+ (
00143 tmat2x4<T, P> const & m,
00144 T const & s);
00145
00146 template <typename T, precision P>
00147 GLM_FUNC_DECL tmat2x4<T, P> operator+ (
00148 tmat2x4<T, P> const & m1,
00149 tmat2x4<T, P> const & m2);
00150
00151 template <typename T, precision P>
00152 GLM_FUNC_DECL tmat2x4<T, P> operator- (
00153 tmat2x4<T, P> const & m,
00154 T const & s);
00155
00156 template <typename T, precision P>
00157 GLM_FUNC_DECL tmat2x4<T, P> operator- (
00158 tmat2x4<T, P> const & m1,
00159 tmat2x4<T, P> const & m2);
00160
00161 template <typename T, precision P>
00162 GLM_FUNC_DECL tmat2x4<T, P> operator* (
00163 tmat2x4<T, P> const & m,
00164 T const & s);
00165
00166 template <typename T, precision P>
00167 GLM_FUNC_DECL tmat2x4<T, P> operator* (
00168 T const & s,
00169 tmat2x4<T, P> const & m);
00170
00171 template <typename T, precision P>
00172 GLM_FUNC_DECL typename tmat2x4<T, P>::col_type operator* (
00173 tmat2x4<T, P> const & m,
00174 typename tmat2x4<T, P>::row_type const & v);
00175
00176 template <typename T, precision P>
00177 GLM_FUNC_DECL typename tmat2x4<T, P>::row_type operator* (
00178 typename tmat2x4<T, P>::col_type const & v,
00179 tmat2x4<T, P> const & m);
00180
00181 template <typename T, precision P>
00182 GLM_FUNC_DECL tmat4x4<T, P> operator* (
00183 tmat2x4<T, P> const & m1,
00184 tmat4x2<T, P> const & m2);
00185
00186 template <typename T, precision P>
00187 GLM_FUNC_DECL tmat2x4<T, P> operator* (
00188 tmat2x4<T, P> const & m1,
00189 tmat2x2<T, P> const & m2);
00190
00191 template <typename T, precision P>
00192 GLM_FUNC_DECL tmat3x4<T, P> operator* (
00193 tmat2x4<T, P> const & m1,
00194 tmat3x2<T, P> const & m2);
00195
00196 template <typename T, precision P>
00197 GLM_FUNC_DECL tmat2x4<T, P> operator/ (
00198 tmat2x4<T, P> const & m,
00199 T const & s);
00200
00201 template <typename T, precision P>
00202 GLM_FUNC_DECL tmat2x4<T, P> operator/ (
00203 T const & s,
00204 tmat2x4<T, P> const & m);
00205
00206
00207 template <typename T, precision P>
00208 GLM_FUNC_DECL tmat2x4<T, P> const operator- (
00209 tmat2x4<T, P> const & m);
00210
00211 }
00212 }
00213
00214 #ifndef GLM_EXTERNAL_TEMPLATE
00215 #include "type_mat2x4.inl"
00216 #endif