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_vec3.hpp"
00033 #include "type_mat.hpp"
00034 #if GLM_HAS_INITIALIZER_LISTS
00035 # include <initializer_list>
00036 #endif
00037 #if GLM_HAS_RVALUE_REFERENCES
00038 # include <algorithm>
00039 #endif
00040 #include <limits>
00041 #include <cstddef>
00042
00043 namespace glm{
00044 namespace detail
00045 {
00046 template <typename T, precision P>
00047 struct tmat3x3
00048 {
00049 enum ctor{_null};
00050 typedef T value_type;
00051 typedef std::size_t size_type;
00052 typedef tvec3<T, P> col_type;
00053 typedef tvec3<T, P> row_type;
00054 typedef tmat3x3<T, P> type;
00055 typedef tmat3x3<T, P> transpose_type;
00056
00057 GLM_FUNC_DECL GLM_CONSTEXPR length_t length() const;
00058
00059 template <typename U, precision Q>
00060 friend tvec3<U, Q> operator/(tmat3x3<U, Q> const & m, tvec3<U, Q> const & v);
00061 template <typename U, precision Q>
00062 friend tvec3<U, Q> operator/(tvec3<U, Q> const & v, tmat3x3<U, Q> const & m);
00063
00064 private:
00066 col_type value[3];
00068
00069 public:
00070
00071 GLM_FUNC_DECL tmat3x3();
00072 GLM_FUNC_DECL tmat3x3(tmat3x3<T, P> const & m);
00073 template <precision Q>
00074 GLM_FUNC_DECL tmat3x3(tmat3x3<T, Q> const & m);
00075
00076 GLM_FUNC_DECL explicit tmat3x3(
00077 ctor Null);
00078 GLM_FUNC_DECL explicit tmat3x3(
00079 T const & s);
00080 GLM_FUNC_DECL tmat3x3(
00081 T const & x0, T const & y0, T const & z0,
00082 T const & x1, T const & y1, T const & z1,
00083 T const & x2, T const & y2, T const & z2);
00084 GLM_FUNC_DECL tmat3x3(
00085 col_type const & v0,
00086 col_type const & v1,
00087 col_type const & v2);
00088
00090
00091 template<
00092 typename X1, typename Y1, typename Z1,
00093 typename X2, typename Y2, typename Z2,
00094 typename X3, typename Y3, typename Z3>
00095 GLM_FUNC_DECL tmat3x3(
00096 X1 const & x1, Y1 const & y1, Z1 const & z1,
00097 X2 const & x2, Y2 const & y2, Z2 const & z2,
00098 X3 const & x3, Y3 const & y3, Z3 const & z3);
00099
00100 template <typename V1, typename V2, typename V3>
00101 GLM_FUNC_DECL tmat3x3(
00102 tvec3<V1, P> const & v1,
00103 tvec3<V2, P> const & v2,
00104 tvec3<V3, P> const & v3);
00105
00106
00107 template <typename U, precision Q>
00108 GLM_FUNC_DECL explicit tmat3x3(tmat3x3<U, Q> const & m);
00109
00110 GLM_FUNC_DECL explicit tmat3x3(tmat2x2<T, P> const & x);
00111 GLM_FUNC_DECL explicit tmat3x3(tmat4x4<T, P> const & x);
00112 GLM_FUNC_DECL explicit tmat3x3(tmat2x3<T, P> const & x);
00113 GLM_FUNC_DECL explicit tmat3x3(tmat3x2<T, P> const & x);
00114 GLM_FUNC_DECL explicit tmat3x3(tmat2x4<T, P> const & x);
00115 GLM_FUNC_DECL explicit tmat3x3(tmat4x2<T, P> const & x);
00116 GLM_FUNC_DECL explicit tmat3x3(tmat3x4<T, P> const & x);
00117 GLM_FUNC_DECL explicit tmat3x3(tmat4x3<T, P> const & x);
00118
00119
00120 GLM_FUNC_DECL col_type & operator[](length_t i);
00121 GLM_FUNC_DECL col_type const & operator[](length_t i) const;
00122
00123 GLM_FUNC_DECL tmat3x3<T, P>& operator= (tmat3x3<T, P> const & m);
00124 template <typename U>
00125 GLM_FUNC_DECL tmat3x3<T, P>& operator= (tmat3x3<U, P> const & m);
00126 template <typename U>
00127 GLM_FUNC_DECL tmat3x3<T, P>& operator+= (U s);
00128 template <typename U>
00129 GLM_FUNC_DECL tmat3x3<T, P>& operator+= (tmat3x3<U, P> const & m);
00130 template <typename U>
00131 GLM_FUNC_DECL tmat3x3<T, P>& operator-= (U s);
00132 template <typename U>
00133 GLM_FUNC_DECL tmat3x3<T, P>& operator-= (tmat3x3<U, P> const & m);
00134 template <typename U>
00135 GLM_FUNC_DECL tmat3x3<T, P>& operator*= (U s);
00136 template <typename U>
00137 GLM_FUNC_DECL tmat3x3<T, P>& operator*= (tmat3x3<U, P> const & m);
00138 template <typename U>
00139 GLM_FUNC_DECL tmat3x3<T, P>& operator/= (U s);
00140 template <typename U>
00141 GLM_FUNC_DECL tmat3x3<T, P>& operator/= (tmat3x3<U, P> const & m);
00142
00144
00145
00146 GLM_FUNC_DECL tmat3x3<T, P> & operator++ ();
00147 GLM_FUNC_DECL tmat3x3<T, P> & operator-- ();
00148 GLM_FUNC_DECL tmat3x3<T, P> operator++(int);
00149 GLM_FUNC_DECL tmat3x3<T, P> operator--(int);
00150 };
00151
00152
00153 template <typename T, precision P>
00154 GLM_FUNC_DECL tmat3x3<T, P> operator+ (
00155 tmat3x3<T, P> const & m,
00156 T const & s);
00157
00158 template <typename T, precision P>
00159 GLM_FUNC_DECL tmat3x3<T, P> operator+ (
00160 T const & s,
00161 tmat3x3<T, P> const & m);
00162
00163 template <typename T, precision P>
00164 GLM_FUNC_DECL tmat3x3<T, P> operator+ (
00165 tmat3x3<T, P> const & m1,
00166 tmat3x3<T, P> const & m2);
00167
00168 template <typename T, precision P>
00169 GLM_FUNC_DECL tmat3x3<T, P> operator- (
00170 tmat3x3<T, P> const & m,
00171 T const & s);
00172
00173 template <typename T, precision P>
00174 GLM_FUNC_DECL tmat3x3<T, P> operator- (
00175 T const & s,
00176 tmat3x3<T, P> const & m);
00177
00178 template <typename T, precision P>
00179 GLM_FUNC_DECL tmat3x3<T, P> operator- (
00180 tmat3x3<T, P> const & m1,
00181 tmat3x3<T, P> const & m2);
00182
00183 template <typename T, precision P>
00184 GLM_FUNC_DECL tmat3x3<T, P> operator* (
00185 tmat3x3<T, P> const & m,
00186 T const & s);
00187
00188 template <typename T, precision P>
00189 GLM_FUNC_DECL tmat3x3<T, P> operator* (
00190 T const & s,
00191 tmat3x3<T, P> const & m);
00192
00193 template <typename T, precision P>
00194 GLM_FUNC_DECL typename tmat3x3<T, P>::col_type operator* (
00195 tmat3x3<T, P> const & m,
00196 typename tmat3x3<T, P>::row_type const & v);
00197
00198 template <typename T, precision P>
00199 GLM_FUNC_DECL typename tmat3x3<T, P>::row_type operator* (
00200 typename tmat3x3<T, P>::col_type const & v,
00201 tmat3x3<T, P> const & m);
00202
00203 template <typename T, precision P>
00204 GLM_FUNC_DECL tmat3x3<T, P> operator* (
00205 tmat3x3<T, P> const & m1,
00206 tmat3x3<T, P> const & m2);
00207
00208 template <typename T, precision P>
00209 GLM_FUNC_DECL tmat2x3<T, P> operator* (
00210 tmat3x3<T, P> const & m1,
00211 tmat2x3<T, P> const & m2);
00212
00213 template <typename T, precision P>
00214 GLM_FUNC_DECL tmat4x3<T, P> operator* (
00215 tmat3x3<T, P> const & m1,
00216 tmat4x3<T, P> const & m2);
00217
00218 template <typename T, precision P>
00219 GLM_FUNC_DECL tmat3x3<T, P> operator/ (
00220 tmat3x3<T, P> const & m,
00221 T const & s);
00222
00223 template <typename T, precision P>
00224 GLM_FUNC_DECL tmat3x3<T, P> operator/ (
00225 T const & s,
00226 tmat3x3<T, P> const & m);
00227
00228 template <typename T, precision P>
00229 GLM_FUNC_DECL typename tmat3x3<T, P>::col_type operator/ (
00230 tmat3x3<T, P> const & m,
00231 typename tmat3x3<T, P>::row_type const & v);
00232
00233 template <typename T, precision P>
00234 GLM_FUNC_DECL typename tmat3x3<T, P>::row_type operator/ (
00235 typename tmat3x3<T, P>::col_type const & v,
00236 tmat3x3<T, P> const & m);
00237
00238 template <typename T, precision P>
00239 GLM_FUNC_DECL tmat3x3<T, P> operator/ (
00240 tmat3x3<T, P> const & m1,
00241 tmat3x3<T, P> const & m2);
00242
00243
00244 template <typename T, precision P>
00245 GLM_FUNC_DECL tmat3x3<T, P> const operator-(
00246 tmat3x3<T, P> const & m);
00247
00248 }
00249 }
00250
00251 #ifndef GLM_EXTERNAL_TEMPLATE
00252 #include "type_mat3x3.inl"
00253 #endif