- Main Page
- Modules
- Namespaces
- Classes
- Files
- Related Pages

- File List
- File Members

# FMath/FMMatrix33.h

Go to the documentation of this file.

    00001 /*
    00002     Copyright (C) 2005-2007 Feeling Software Inc.
    00003     Portions of the code are:
    00004     Copyright (C) 2005-2007 Sony Computer Entertainment America
    00005
    00006     MIT License: http://www.opensource.org/licenses/mit-license.php
    00007 */
    00008
    00014 #ifndef _FM_MATRIX33_H_
    00015 #define _FM_MATRIX33_H_
    00016
    00023 class FCOLLADA_EXPORT FMMatrix33
    00024 {
    00025 public:
    00026     float m[3][3];
    00036     FMMatrix33(float* _m);
    00037
    00043     #ifndef _DEBUG
    00044     FMMatrix33() {}
    00045     #else
    00046     FMMatrix33() { memset(m, 55, 3 * 3 * sizeof(float)); }
    00047     #endif
    00048
    00057     operator float*() { return &m[0][0]; }
    00058
    00067     operator const float*() const { return &m[0][0]; }
    00068
    00075     float* operator[](int a) { return m[a]; }
    00076
    00084     FMMatrix33& operator=(const FMMatrix33& copy);
    00085
    00091     FMMatrix33 Transposed() const;
    00092
    00098     FMMatrix33 Inverted() const;
    00099
    00100 public:
    00101     static FMMatrix33 identity;
    00110     static FMMatrix33 RotationMatrix(float angle);
    00111
    00119     static FMMatrix33 TranslationMatrix(float tx, float ty);
    00120
    00128     static FMMatrix33 ScaleMatrix(float sx, float sy);
    00129
    00139     static inline FMMatrix33 TranslationMatrix(FMVector2 translation) { return TranslationMatrix(translation.u, translation.v); }
    00140
    00150     static inline FMMatrix33 ScaleMatrix(FMVector2 scale) { return ScaleMatrix(scale.u, scale.v); }
    00151 };
    00152
    00160 FMMatrix33 FCOLLADA_EXPORT operator*(const FMMatrix33& m1, const FMMatrix33& m2);
    00161
    00162 #endif // _FM_MATRIX33_H_