FMath/FMMatrix33.h

Go to the documentation of this file.
00001 /*
00002     Copyright (C) 2005-2006 Feeling Software Inc.
00003     MIT License: http://www.opensource.org/licenses/mit-license.php
00004 */
00005 
00011 #ifndef _FM_MATRIX33_H_
00012 #define _FM_MATRIX33_H_
00013 
00020 class FCOLLADA_EXPORT FMMatrix33
00021 {
00022 public:
00023     float m[3][3];  
00033     FMMatrix33(float* _m);
00034     
00040     #ifndef _DEBUG
00041     FMMatrix33() {}
00042     #else
00043     FMMatrix33() { memset(m, 55, 3 * 3 * sizeof(float)); }
00044     #endif 
00045 
00054     operator float*() { return &m[0][0]; }
00055 
00064     operator const float*() const { return &m[0][0]; }
00065 
00072     float* operator[](int a) { return m[a]; }
00073 
00081     FMMatrix33& operator=(const FMMatrix33& copy);
00082 
00088     FMMatrix33 Transposed() const;
00089 
00095     FMMatrix33 Inverted() const;
00096 
00097 public:
00098     static FMMatrix33 identity; 
00107     static FMMatrix33 RotationMatrix(float angle);
00108 
00116     static FMMatrix33 TranslationMatrix(float tx, float ty);
00117     
00125     static FMMatrix33 ScaleMatrix(float sx, float sy);
00126 
00136     static inline FMMatrix33 TranslationMatrix(FMVector2 translation) { return TranslationMatrix(translation.u, translation.v); }
00137 
00147     static inline FMMatrix33 ScaleMatrix(FMVector2 scale) { return ScaleMatrix(scale.u, scale.v); }
00148 };
00149 
00157 FMMatrix33 FCOLLADA_EXPORT operator*(const FMMatrix33& m1, const FMMatrix33& m2);
00158 
00159 #endif // _FM_MATRIX33_H_

Generated on Fri May 12 16:44:39 2006 for FCollada by  doxygen 1.4.6-NO