type_mat3x3.hpp
00001 
00002 // OpenGL Mathematics Copyright (c) 2005 - 2011 G-Truc Creation (www.g-truc.net)
00004 // Created : 2005-01-27
00005 // Updated : 2010-02-03
00006 // Licence : This source is under MIT License
00007 // File    : glm/core/type_mat3x3.hpp
00009 
00010 #ifndef glm_core_type_mat3x3
00011 #define glm_core_type_mat3x3
00012 
00013 #include "type_mat.hpp"
00014 
00015 namespace glm
00016 {
00017         namespace test
00018         {
00019                 void main_mat3x3();
00020         }//namespace test
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 
00040                 template <typename T> 
00041                 struct tmat3x3
00042                 {
00043                         enum ctor{null};
00044                         typedef T value_type;
00045                         typedef std::size_t size_type;
00046                         typedef tvec3<T> col_type;
00047                         typedef tvec3<T> row_type;
00048                         static GLM_FUNC_DECL size_type col_size();
00049                         static GLM_FUNC_DECL size_type row_size();
00050 
00051                         typedef tmat3x3<T> type;
00052                         typedef tmat3x3<T> transpose_type;
00053 
00054                 public:
00055                         // Implementation detail
00056                         GLM_FUNC_DECL tmat3x3<T> _inverse() const;
00057 
00058                 private:
00059                         // Data
00060                         col_type value[3];
00061 
00062                 public:
00063                         // Constructors
00064                         GLM_FUNC_DECL tmat3x3();
00065                         GLM_FUNC_DECL tmat3x3(tmat3x3 const & m);
00066 
00067                         GLM_FUNC_DECL explicit tmat3x3(
00068                                 ctor Null);
00069                         GLM_FUNC_DECL explicit tmat3x3(
00070                                 value_type const & s);
00071                         GLM_FUNC_DECL explicit tmat3x3(
00072                                 value_type const & x0, value_type const & y0, value_type const & z0,
00073                                 value_type const & x1, value_type const & y1, value_type const & z1,
00074                                 value_type const & x2, value_type const & y2, value_type const & z2);
00075                         GLM_FUNC_DECL explicit tmat3x3(
00076                                 col_type const & v0, 
00077                                 col_type const & v1,
00078                                 col_type const & v2);
00079 
00080                         // Conversions
00081                         template <typename U> 
00082                         GLM_FUNC_DECL explicit tmat3x3(tmat3x3<U> const & m);
00083 
00084                         GLM_FUNC_DECL explicit tmat3x3(tmat2x2<T> const & x);
00085                         GLM_FUNC_DECL explicit tmat3x3(tmat4x4<T> const & x);
00086                         GLM_FUNC_DECL explicit tmat3x3(tmat2x3<T> const & x);
00087                         GLM_FUNC_DECL explicit tmat3x3(tmat3x2<T> const & x);
00088                         GLM_FUNC_DECL explicit tmat3x3(tmat2x4<T> const & x);
00089                         GLM_FUNC_DECL explicit tmat3x3(tmat4x2<T> const & x);
00090                         GLM_FUNC_DECL explicit tmat3x3(tmat3x4<T> const & x);
00091                         GLM_FUNC_DECL explicit tmat3x3(tmat4x3<T> const & x);
00092 
00093                         // Accesses
00094                         GLM_FUNC_DECL col_type & operator[](size_type i);
00095                         GLM_FUNC_DECL col_type const & operator[](size_type i) const;
00096 
00097                         // Unary updatable operators
00098                         GLM_FUNC_DECL tmat3x3<T>& operator=  (tmat3x3<T> const & m);
00099                         template <typename U> 
00100                         GLM_FUNC_DECL tmat3x3<T>& operator=  (tmat3x3<U> const & m);
00101                         template <typename U> 
00102                         GLM_FUNC_DECL tmat3x3<T>& operator+= (U const & s);
00103                         template <typename U> 
00104                         GLM_FUNC_DECL tmat3x3<T>& operator+= (tmat3x3<U> const & m);
00105                         template <typename U> 
00106                         GLM_FUNC_DECL tmat3x3<T>& operator-= (U const & s);
00107                         template <typename U> 
00108                         GLM_FUNC_DECL tmat3x3<T>& operator-= (tmat3x3<U> const & m);
00109                         template <typename U> 
00110                         GLM_FUNC_DECL tmat3x3<T>& operator*= (U const & s);
00111                         template <typename U> 
00112                         GLM_FUNC_DECL tmat3x3<T>& operator*= (tmat3x3<U> const & m);
00113                         template <typename U> 
00114                         GLM_FUNC_DECL tmat3x3<T>& operator/= (U const & s);
00115                         template <typename U> 
00116                         GLM_FUNC_DECL tmat3x3<T>& operator/= (tmat3x3<U> const & m);
00117                         GLM_FUNC_DECL tmat3x3<T>& operator++ ();
00118                         GLM_FUNC_DECL tmat3x3<T>& operator-- ();
00119                 };
00120 
00121                 // Binary operators
00122                 template <typename T> 
00123                 tmat3x3<T> operator+ (
00124                         tmat3x3<T> const & m, 
00125                         typename tmat3x3<T>::value_type const & s);
00126 
00127                 template <typename T> 
00128                 tmat3x3<T> operator+ (
00129                         typename tmat3x3<T>::value_type const & s, 
00130                         tmat3x3<T> const & m);
00131 
00132                 template <typename T> 
00133                 tmat3x3<T> operator+ (
00134                         tmat3x3<T> const & m1, 
00135                         tmat3x3<T> const & m2);
00136             
00137                 template <typename T> 
00138                 tmat3x3<T> operator- (
00139                         tmat3x3<T> const & m, 
00140                         typename tmat3x3<T>::value_type const & s);
00141 
00142                 template <typename T> 
00143                 tmat3x3<T> operator- (
00144                         typename tmat3x3<T>::value_type const & s, 
00145                         tmat3x3<T> const & m);
00146 
00147                 template <typename T> 
00148                 tmat3x3<T> operator- (
00149                         tmat3x3<T> const & m1, 
00150                         tmat3x3<T> const & m2);
00151 
00152                 template <typename T> 
00153                 tmat3x3<T> operator* (
00154                         tmat3x3<T> const & m, 
00155                         typename tmat3x3<T>::value_type const & s);
00156 
00157                 template <typename T> 
00158                 tmat3x3<T> operator* (
00159                         typename tmat3x3<T>::value_type const & s, 
00160                         tmat3x3<T> const & m);
00161 
00162                 template <typename T> 
00163                 typename tmat3x3<T>::col_type operator* (
00164                         tmat3x3<T> const & m, 
00165                         typename tmat3x3<T>::row_type const & v);
00166 
00167                 template <typename T> 
00168                 typename tmat3x3<T>::row_type operator* (
00169                         typename tmat3x3<T>::col_type const & v, 
00170                         tmat3x3<T> const & m);
00171 
00172                 template <typename T> 
00173                 tmat3x3<T> operator* (
00174                         tmat3x3<T> const & m1, 
00175                         tmat3x3<T> const & m2);
00176 
00177                 template <typename T> 
00178                 tmat3x3<T> operator/ (
00179                         tmat3x3<T> const & m, 
00180                         typename tmat3x3<T>::value_type const & s);
00181 
00182                 template <typename T> 
00183                 tmat3x3<T> operator/ (
00184                         typename tmat3x3<T>::value_type const & s, 
00185                         tmat3x3<T> const & m);
00186 
00187                 template <typename T> 
00188                 typename tmat3x3<T>::col_type operator/ (
00189                         tmat3x3<T> const & m, 
00190                         typename tmat3x3<T>::row_type const & v);
00191 
00192                 template <typename T> 
00193                 typename tmat3x3<T>::row_type operator/ (
00194                         typename tmat3x3<T>::col_type const & v, 
00195                         tmat3x3<T> const & m);
00196 
00197                 template <typename T> 
00198                 tmat3x3<T> operator/ (
00199                         tmat3x3<T> const & m1, 
00200                         tmat3x3<T> const & m2);
00201 
00202                 // Unary constant operators
00203                 template <typename T> 
00204                 tmat3x3<T> const operator-  (
00205                         tmat3x3<T> const & m);
00206 
00207                 template <typename T> 
00208                 tmat3x3<T> const operator-- (
00209                         tmat3x3<T> const & m, 
00210                         int);
00211 
00212                 template <typename T> 
00213                 tmat3x3<T> const operator++ (
00214                         tmat3x3<T> const & m, 
00215                         int);
00216 
00217         } //namespace detail
00218 
00219         namespace core{
00220         namespace type{
00221 
00222         namespace precision
00223         {
00228                 typedef detail::tmat3x3<lowp_float>             lowp_mat3x3;
00233                 typedef detail::tmat3x3<mediump_float>  mediump_mat3x3;
00238                 typedef detail::tmat3x3<highp_float>    highp_mat3x3;
00239         }
00240         //namespace precision
00241 
00242         }//namespace type
00243         }//namespace core
00244 } //namespace glm
00245 
00246 #ifndef GLM_EXTERNAL_TEMPLATE
00247 #include "type_mat3x3.inl"
00248 #endif
00249 
00250 #endif //glm_core_type_mat3x3