00001
00002
00004
00005
00006
00007
00009
00010 #ifndef glm_core_type_mat4x2
00011 #define glm_core_type_mat4x2
00012
00013 #include "type_size.hpp"
00014
00015 namespace glm
00016 {
00017 namespace test
00018 {
00019 void main_mat4x2();
00020 }
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 tmat4x2
00041 {
00042 public:
00043 typedef tmat4x2<T>* pointer;
00044 typedef const tmat4x2<T>* const_pointer;
00045 typedef const tmat4x2<T>*const const_pointer_const;
00046 typedef tmat4x2<T>*const pointer_const;
00047 typedef tmat4x2<T>& reference;
00048 typedef const tmat4x2<T>& const_reference;
00049 typedef const tmat4x2<T>& param_type;
00050 typedef tmat2x4<T> transpose_type;
00051
00052 typedef T value_type;
00053 typedef detail::tvec4<T> col_type;
00054 typedef detail::tvec2<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 tmat2x4<T> _inverse() const;
00062
00063 private:
00064
00065 detail::tvec2<T> value[4];
00066
00067 public:
00068
00069 tmat4x2();
00070 explicit tmat4x2(T const & x);
00071 explicit tmat4x2(
00072 T const & x0, T const & y0,
00073 T const & x1, T const & y1,
00074 T const & x2, T const & y2,
00075 T const & x3, T const & y3);
00076 explicit tmat4x2(
00077 detail::tvec2<T> const & v0,
00078 detail::tvec2<T> const & v1,
00079 detail::tvec2<T> const & v2,
00080 detail::tvec2<T> const & v3);
00081
00082
00083 template <typename U>
00084 explicit tmat4x2(const tmat4x2<U>& m);
00085
00086 explicit tmat4x2(const tmat2x2<T>& x);
00087 explicit tmat4x2(const tmat3x3<T>& x);
00088 explicit tmat4x2(const tmat4x4<T>& x);
00089 explicit tmat4x2(const tmat2x3<T>& x);
00090 explicit tmat4x2(const tmat3x2<T>& x);
00091 explicit tmat4x2(const tmat2x4<T>& x);
00092 explicit tmat4x2(const tmat4x3<T>& x);
00093 explicit tmat4x2(const tmat3x4<T>& x);
00094
00095
00096 detail::tvec2<T>& operator[](size_type i);
00097 detail::tvec2<T> const & operator[](size_type i) const;
00098
00099
00100 tmat4x2<T>& operator= (const tmat4x2<T>& m);
00101 tmat4x2<T>& operator+= (const T & s);
00102 tmat4x2<T>& operator+= (const tmat4x2<T>& m);
00103 tmat4x2<T>& operator-= (const T & s);
00104 tmat4x2<T>& operator-= (const tmat4x2<T>& m);
00105 tmat4x2<T>& operator*= (const T & s);
00106 tmat4x2<T>& operator*= (const tmat2x4<T>& m);
00107 tmat4x2<T>& operator/= (const T & s);
00108 tmat4x2<T>& operator/= (const tmat2x4<T>& m);
00109
00110 tmat4x2<T>& operator++ ();
00111 tmat4x2<T>& operator-- ();
00112 };
00113
00114
00115 template <typename T>
00116 tmat4x2<T> operator+ (const tmat4x2<T>& m, const T & s);
00117
00118 template <typename T>
00119 tmat4x2<T> operator+ (const tmat4x2<T>& m1, const tmat4x2<T>& m2);
00120
00121 template <typename T>
00122 tmat4x2<T> operator- (const tmat4x2<T>& m, const T & s);
00123
00124 template <typename T>
00125 tmat4x2<T> operator- (const tmat4x2<T>& m1, const tmat4x2<T>& m2);
00126
00127 template <typename T>
00128 tmat4x2<T> operator* (const tmat4x2<T>& m, const T & s);
00129
00130 template <typename T>
00131 tmat4x2<T> operator* (const T & s, const tmat4x2<T>& m);
00132
00133 template <typename T>
00134 detail::tvec2<T> operator* (const tmat4x2<T>& m, const detail::tvec4<T>& v);
00135
00136 template <typename T>
00137 detail::tvec4<T> operator* (const detail::tvec2<T>& v, const tmat4x2<T>& m);
00138
00139 template <typename T>
00140 tmat2x2<T> operator* (const tmat4x2<T>& m1, const tmat2x4<T>& m2);
00141
00142 template <typename T>
00143 tmat4x2<T> operator/ (const tmat4x2<T>& m, const T & s);
00144
00145 template <typename T>
00146 tmat4x2<T> operator/ (const T & s, const tmat4x2<T>& m);
00147
00148
00149
00150
00151
00152
00153
00154
00155
00156
00157
00158 template <typename valType>
00159 tmat4x2<valType> const operator- (tmat4x2<valType> const & m);
00160
00161 template <typename valType>
00162 tmat4x2<valType> const operator-- (tmat4x2<valType> const & m, int);
00163
00164 template <typename valType>
00165 tmat4x2<valType> const operator++ (tmat4x2<valType> const & m, int);
00166
00167 }
00168
00169 namespace core{
00170 namespace type{
00171 namespace matrix{
00172
00173 namespace precision
00174 {
00178 typedef detail::tmat4x2<lowp_float> lowp_mat4x2;
00182 typedef detail::tmat4x2<mediump_float> mediump_mat4x2;
00186 typedef detail::tmat4x2<highp_float> highp_mat4x2;
00187 }
00188
00189
00190 #ifndef GLM_PRECISION
00193 typedef detail::tmat4x2<mediump_float> mat4x2;
00194 #elif(GLM_PRECISION & GLM_PRECISION_HIGH)
00195 typedef detail::tmat4x2<highp_float> mat4x2;
00196 #elif(GLM_PRECISION & GLM_PRECISION_MEDIUM)
00197 typedef detail::tmat4x2<mediump_float> mat4x2;
00198 #elif(GLM_PRECISION & GLM_PRECISION_LOW)
00199 typedef detail::tmat4x2<lowp_float> mat4x2;
00200 #else
00201 typedef detail::tmat4x2<mediump_float> mat4x2;
00202 #endif//GLM_PRECISION
00203
00204 }
00205 }
00206 }
00207 }
00208
00209 #include "type_mat4x2.inl"
00210
00211 #endif //glm_core_type_mat4x2