00001
00002
00004
00005
00006
00007
00009
00010 #ifndef glm_core_type_mat4x2
00011 #define glm_core_type_mat4x2
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 tmat4x2
00036 {
00037 enum ctor{null};
00038 typedef T value_type;
00039 typedef std::size_t size_type;
00040 typedef tvec2<T> col_type;
00041 typedef tvec4<T> row_type;
00042 static GLM_FUNC_DECL size_type col_size();
00043 static GLM_FUNC_DECL size_type row_size();
00044
00045 typedef tmat4x2<T> type;
00046 typedef tmat2x4<T> transpose_type;
00047
00048 private:
00049
00050 col_type value[4];
00051
00052 public:
00053
00054 GLM_FUNC_DECL tmat4x2();
00055 GLM_FUNC_DECL tmat4x2(tmat4x2 const & m);
00056
00057 GLM_FUNC_DECL explicit tmat4x2(
00058 ctor Null);
00059 GLM_FUNC_DECL explicit tmat4x2(
00060 value_type const & x);
00061 GLM_FUNC_DECL explicit tmat4x2(
00062 value_type const & x0, value_type const & y0,
00063 value_type const & x1, value_type const & y1,
00064 value_type const & x2, value_type const & y2,
00065 value_type const & x3, value_type const & y3);
00066 GLM_FUNC_DECL explicit tmat4x2(
00067 col_type const & v0,
00068 col_type const & v1,
00069 col_type const & v2,
00070 col_type const & v3);
00071
00073
00074 template <typename U>
00075 GLM_FUNC_DECL explicit tmat4x2(
00076 U const & x);
00077
00078 template
00079 <
00080 typename X1, typename Y1,
00081 typename X2, typename Y2,
00082 typename X3, typename Y3,
00083 typename X4, typename Y4
00084 >
00085 GLM_FUNC_DECL explicit tmat4x2(
00086 X1 const & x1, Y1 const & y1,
00087 X2 const & x2, Y2 const & y2,
00088 X3 const & x3, Y3 const & y3,
00089 X4 const & x4, Y4 const & y4);
00090
00091 template <typename V1, typename V2, typename V3, typename V4>
00092 GLM_FUNC_DECL explicit tmat4x2(
00093 tvec2<V1> const & v1,
00094 tvec2<V2> const & v2,
00095 tvec2<V3> const & v3,
00096 tvec2<V4> const & v4);
00097
00098
00099 template <typename U>
00100 GLM_FUNC_DECL explicit tmat4x2(tmat4x2<U> const & m);
00101
00102 GLM_FUNC_DECL explicit tmat4x2(tmat2x2<T> const & x);
00103 GLM_FUNC_DECL explicit tmat4x2(tmat3x3<T> const & x);
00104 GLM_FUNC_DECL explicit tmat4x2(tmat4x4<T> const & x);
00105 GLM_FUNC_DECL explicit tmat4x2(tmat2x3<T> const & x);
00106 GLM_FUNC_DECL explicit tmat4x2(tmat3x2<T> const & x);
00107 GLM_FUNC_DECL explicit tmat4x2(tmat2x4<T> const & x);
00108 GLM_FUNC_DECL explicit tmat4x2(tmat4x3<T> const & x);
00109 GLM_FUNC_DECL explicit tmat4x2(tmat3x4<T> const & x);
00110
00111
00112 GLM_FUNC_DECL col_type & operator[](size_type i);
00113 GLM_FUNC_DECL col_type const & operator[](size_type i) const;
00114
00115
00116 GLM_FUNC_DECL tmat4x2<T>& operator= (tmat4x2<T> const & m);
00117 template <typename U>
00118 GLM_FUNC_DECL tmat4x2<T>& operator= (tmat4x2<U> const & m);
00119 template <typename U>
00120 GLM_FUNC_DECL tmat4x2<T>& operator+= (U const & s);
00121 template <typename U>
00122 GLM_FUNC_DECL tmat4x2<T>& operator+= (tmat4x2<U> const & m);
00123 template <typename U>
00124 GLM_FUNC_DECL tmat4x2<T>& operator-= (U const & s);
00125 template <typename U>
00126 GLM_FUNC_DECL tmat4x2<T>& operator-= (tmat4x2<U> const & m);
00127 template <typename U>
00128 GLM_FUNC_DECL tmat4x2<T>& operator*= (U const & s);
00129 template <typename U>
00130 GLM_FUNC_DECL tmat4x2<T>& operator*= (tmat4x2<U> const & m);
00131 template <typename U>
00132 GLM_FUNC_DECL tmat4x2<T>& operator/= (U const & s);
00133
00134 GLM_FUNC_DECL tmat4x2<T>& operator++ ();
00135 GLM_FUNC_DECL tmat4x2<T>& operator-- ();
00136 };
00137
00138
00139 template <typename T>
00140 tmat4x2<T> operator+ (
00141 tmat4x2<T> const & m,
00142 typename tmat4x2<T>::value_type const & s);
00143
00144 template <typename T>
00145 tmat4x2<T> operator+ (
00146 tmat4x2<T> const & m1,
00147 tmat4x2<T> const & m2);
00148
00149 template <typename T>
00150 tmat4x2<T> operator- (
00151 tmat4x2<T> const & m,
00152 typename tmat4x2<T>::value_type const & s);
00153
00154 template <typename T>
00155 tmat4x2<T> operator- (
00156 tmat4x2<T> const & m1,
00157 tmat4x2<T> const & m2);
00158
00159 template <typename T>
00160 tmat4x2<T> operator* (
00161 tmat4x2<T> const & m,
00162 typename tmat4x2<T>::value_type const & s);
00163
00164 template <typename T>
00165 tmat4x2<T> operator* (
00166 typename tmat4x2<T>::value_type const & s,
00167 tmat4x2<T> const & m);
00168
00169 template <typename T>
00170 typename tmat4x2<T>::col_type operator* (
00171 tmat4x2<T> const & m,
00172 typename tmat4x2<T>::row_type const & v);
00173
00174 template <typename T>
00175 typename tmat4x2<T>::row_type operator* (
00176 typename tmat4x2<T>::col_type const & v,
00177 tmat4x2<T> const & m);
00178
00179 template <typename T>
00180 tmat2x2<T> operator* (
00181 tmat4x2<T> const & m1,
00182 tmat2x4<T> const & m2);
00183
00184 template <typename T>
00185 tmat4x2<T> operator/ (
00186 tmat4x2<T> const & m,
00187 typename tmat4x2<T>::value_type const & s);
00188
00189 template <typename T>
00190 tmat4x2<T> operator/ (
00191 typename tmat4x2<T>::value_type const & s,
00192 tmat4x2<T> const & m);
00193
00194
00195 template <typename T>
00196 tmat4x2<T> const operator- (
00197 tmat4x2<T> const & m);
00198
00199 template <typename T>
00200 tmat4x2<T> const operator-- (
00201 tmat4x2<T> const & m,
00202 int);
00203
00204 template <typename T>
00205 tmat4x2<T> const operator++ (
00206 tmat4x2<T> const & m,
00207 int);
00208
00209 }
00210
00211 namespace core{
00212 namespace type{
00213 namespace precision
00214 {
00219 typedef detail::tmat4x2<lowp_float> lowp_mat4x2;
00220
00225 typedef detail::tmat4x2<mediump_float> mediump_mat4x2;
00226
00231 typedef detail::tmat4x2<highp_float> highp_mat4x2;
00232
00233 }
00234 }
00235 }
00236 }
00237
00238 #ifndef GLM_EXTERNAL_TEMPLATE
00239 #include "type_mat4x2.inl"
00240 #endif
00241
00242 #endif //glm_core_type_mat4x2