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