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