# GLM: type_mat3x3.hpp Source File

- Main Page
- Namespaces
- Files

- File List

# type_mat3x3.hpp

    00001
    00002 // OpenGL Mathematics Copyright (c) 2005 - 2009 G-Truc Creation (www.g-truc.net)
    00004 // Created : 2005-01-27
    00005 // Updated : 2008-08-30
    00006 // Licence : This source is under MIT License
    00007 // File    : glm/core/type_mat3x3.h
    00009
    00010 #ifndef glm_core_type_mat3x3
    00011 #define glm_core_type_mat3x3
    00012
    00013 #include "type_size.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
    00039                 template <typename T>
    00040                 struct tmat3x3
    00041                 {
    00042                 public:
    00043                         typedef tmat3x3<T>* pointer;
    00044                         typedef const tmat3x3<T>* const_pointer;
    00045                         typedef const tmat3x3<T>*const const_pointer_const;
    00046                         typedef tmat3x3<T>*const pointer_const;
    00047                         typedef tmat3x3<T>& reference;
    00048                         typedef const tmat3x3<T>& const_reference;
    00049                         typedef const tmat3x3<T>& param_type;
    00050                         typedef tmat3x3<T> transpose_type;
    00051
    00052                         typedef T value_type;
    00053                         typedef detail::tvec3<T> col_type;
    00054                         typedef detail::tvec3<T> row_type;
    00055                         typedef glm::sizeType size_type;
    00056                         static size_type value_size();
    00057                         static size_type col_size();
    00058                         static size_type row_size();
    00059                         static bool is_matrix();
    00060
    00061                 public:
    00062                         tmat3x3<T> _inverse() const;
    00063
    00064                 private:
    00065                         // Data
    00066                         tvec3<T> value[3];
    00067
    00068                 public:
    00069                         // Constructors
    00070                         tmat3x3();
    00071                         explicit tmat3x3(const T x);
    00072                         explicit tmat3x3(
    00073                                 const T x0, const T y0, const T z0,
    00074                                 const T x1, const T y1, const T z1,
    00075                                 const T x2, const T y2, const T z2);
    00076                         explicit tmat3x3(
    00077                                 const detail::tvec3<T> & v0,
    00078                                 const detail::tvec3<T> & v1,
    00079                                 const detail::tvec3<T> & v2);
    00080
    00081                         // Conversions
    00082                         template <typename U>
    00083                         explicit tmat3x3(const tmat3x3<U>& m);
    00084
    00085                         explicit tmat3x3(const tmat2x2<T>& x);
    00086                         explicit tmat3x3(const tmat4x4<T>& x);
    00087                         explicit tmat3x3(const tmat2x3<T>& x);
    00088                         explicit tmat3x3(const tmat3x2<T>& x);
    00089                         explicit tmat3x3(const tmat2x4<T>& x);
    00090                         explicit tmat3x3(const tmat4x2<T>& x);
    00091                         explicit tmat3x3(const tmat3x4<T>& x);
    00092                         explicit tmat3x3(const tmat4x3<T>& x);
    00093
    00094                         // Accesses
    00095                         detail::tvec3<T>& operator[](size_type i);
    00096                         detail::tvec3<T> const & operator[](size_type i) const;
    00097
    00098                         // Unary updatable operators
    00099                         tmat3x3<T>& operator=(const tmat3x3<T>& m);
    00100                         tmat3x3<T>& operator+= (const T & s);
    00101                         tmat3x3<T>& operator+= (const tmat3x3<T>& m);
    00102                         tmat3x3<T>& operator-= (const T & s);
    00103                         tmat3x3<T>& operator-= (const tmat3x3<T>& m);
    00104                         tmat3x3<T>& operator*= (const T & s);
    00105                         tmat3x3<T>& operator*= (const tmat3x3<T>& m);
    00106                         tmat3x3<T>& operator/= (const T & s);
    00107                         tmat3x3<T>& operator/= (const tmat3x3<T>& m);
    00108                         tmat3x3<T>& operator++ ();
    00109                         tmat3x3<T>& operator-- ();
    00110                 };
    00111
    00112                 // Binary operators
    00113                 template <typename T>
    00114                 tmat3x3<T> operator+ (const tmat3x3<T>& m, const T & s);
    00115
    00116                 template <typename T>
    00117                 tmat3x3<T> operator+ (const T & s, const tmat3x3<T>& m);
    00118
    00119                 template <typename T>
    00120                 tmat3x3<T> operator+ (const tmat3x3<T>& m1, const tmat3x3<T>& m2);
    00121
    00122                 template <typename T>
    00123                 tmat3x3<T> operator- (const tmat3x3<T>& m, const T & s);
    00124
    00125                 template <typename T>
    00126                 tmat3x3<T> operator- (const T & s, const tmat3x3<T>& m);
    00127
    00128                 template <typename T>
    00129                 tmat3x3<T> operator- (const tmat3x3<T>& m1, const tmat3x3<T>& m2);
    00130
    00131                 template <typename T>
    00132                 tmat3x3<T> operator* (const tmat3x3<T>& m, const T & s);
    00133
    00134                 template <typename T>
    00135                 tmat3x3<T> operator* (const T & s, const tmat3x3<T>& m);
    00136
    00137                 template <typename T>
    00138                 detail::tvec3<T> operator* (const tmat3x3<T>& m, const detail::tvec3<T>& v);
    00139
    00140                 template <typename T>
    00141                 detail::tvec3<T> operator* (const detail::tvec3<T>& v, const tmat3x3<T>& m);
    00142
    00143                 template <typename T>
    00144                 tmat3x3<T> operator* (const tmat3x3<T>& m1, const tmat3x3<T>& m2);
    00145
    00146                 template <typename T>
    00147                 tmat3x3<T> operator/ (const tmat3x3<T>& m, const T & s);
    00148
    00149                 template <typename T>
    00150                 tmat3x3<T> operator/ (const T & s, const tmat3x3<T>& m);
    00151
    00152                 template <typename T>
    00153                 detail::tvec3<T> operator/ (const tmat3x3<T>& m, const detail::tvec3<T>& v);
    00154
    00155                 template <typename T>
    00156                 detail::tvec3<T> operator/ (const detail::tvec3<T>& v, const tmat3x3<T>& m);
    00157
    00158                 template <typename T>
    00159                 tmat3x3<T> operator/ (const tmat3x3<T>& m1, const tmat3x3<T>& m2);
    00160
    00161                 // Unary constant operators
    00162                 template <typename valType>
    00163                 tmat3x3<valType> const operator-  (tmat3x3<valType> const & m);
    00164
    00165                 template <typename valType>
    00166                 tmat3x3<valType> const operator-- (tmat3x3<valType> const & m, int);
    00167
    00168                 template <typename valType>
    00169                 tmat3x3<valType> const operator++ (tmat3x3<valType> const & m, int);
    00170
    00171         } //namespace detail
    00172
    00173         namespace core{
    00174         namespace type{
    00175         namespace matrix{
    00176
    00177         namespace precision
    00178         {
    00182                 typedef detail::tmat3x3<lowp_float>             lowp_mat3x3;
    00186                 typedef detail::tmat3x3<mediump_float>  mediump_mat3x3;
    00190                 typedef detail::tmat3x3<highp_float>    highp_mat3x3;
    00191         }
    00192         //namespace precision
    00193
    00194 #ifndef GLM_PRECISION
    00197         typedef detail::tmat3x3<mediump_float>  mat3x3;
    00198 #elif(GLM_PRECISION & GLM_PRECISION_HIGH)
    00199         typedef detail::tmat3x3<highp_float>    mat3x3;
    00200 #elif(GLM_PRECISION & GLM_PRECISION_MEDIUM)
    00201         typedef detail::tmat3x3<mediump_float>  mat3x3;
    00202 #elif(GLM_PRECISION & GLM_PRECISION_LOW)
    00203         typedef detail::tmat3x3<lowp_float>             mat3x3;
    00204 #else
    00205         typedef detail::tmat3x3<mediump_float>  mat3x3;
    00206 #endif//GLM_PRECISION
    00207
    00210         typedef mat3x3                                                  mat3;
    00211
    00212         }//namespace matrix
    00213         }//namespace type
    00214         }//namespace core
    00215 } //namespace glm
    00216
    00217 #include "type_mat3x3.inl"
    00218
    00219 #endif //glm_core_type_mat3x3