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