AppEasy Core SDK  1.5.0
Cross platform mobile and desktop app and game development SDK - The easy way to make apps
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines
CzMatrix3.h
Go to the documentation of this file.
00001 // 
00002 //
00003 // AppEasy SDK - Cross Platform Multi-purpose Game and App Engine
00004 //
00005 // Developed by Matthew Hopwood of Pocketeers Limited - www.pocketeers.co.uk
00006 //
00007 // For updates, tutorials and more details check out www.appeasymobile.com
00008 //
00009 // This code is provided free of charge and without any warranty whatsoever. You must ensure that this whole notice is present in all files and derivatives, so the reader knows its origin.
00010 // If you use this SDK in your product then please ensure that you credit AppEasy's usage appropriately. Please see www.appeasymobile.com for licensing details and support
00011 //
00012 //
00013 
00014 #ifndef __CZ_MATRIX3_H__
00015 #define __CZ_MATRIX3_H__
00016 
00017 #include "CzVec3.h"
00018 #include "CzVec2.h"
00019 
00020 class CzMatrix3
00021 {
00022 private:
00023 public:
00024     float       m[3][3];
00025 private:
00026 public:
00027                 CzMatrix3();
00028                 CzMatrix3(CzMatrix3* m0);
00029 
00030     void        Clear();
00031     void        Copy(CzMatrix3* m0);
00032     void        Inverse();
00033     void        Invert();
00034     void        Transpose();
00035     void        Identity();
00036     void        Translate(float x, float y);
00037     void        Translate(CzVec2* pV);
00038     void        Translate(CzVec3* pV);
00039     void        TranslateSet(float x, float y);
00040     void        TranslateSet(CzVec2* pV);
00041     void        Scale(float x, float y);
00042     void        Scale(CzVec2 *v);
00043     void        Scale(CzVec3 *v);
00044     void        ScaleRotation(float x, float y);
00045     void        Rotate(float angle);
00046     void        Multiply(CzMatrix3* m0);
00047     void        MultiplyPost(CzMatrix3* m0);
00048     void        Multiply(CzMatrix3* m0, CzMatrix3* m1);
00049     void        Transform(float x, float y, CzVec2* ov);
00050     void        TransformSVec(float x, float y, CzSVec2* ov);
00051     void        Transform(CzVec2* iv, CzVec2* ov);
00052     CzVec2      Transform(CzVec2* iv);
00053     CzVec2      Transform(float x, float y);
00054     CzSVec2     TransformSVec(CzVec2* iv);
00055     CzSVec2     TransformSVec(float x, float y);
00056     void        TransformRotationOnly(float x, float y, CzVec2 *ov);
00057     void        TransformRotationOnly(CzVec2* iv, CzVec2* ov);
00058     void        TransformN(CzVec2* iv, CzVec2* ov, int nCount);
00059     void        TransformN(CzVec3* iv, CzVec3* ov, int nCount);
00060     void        TransformNRotationOnly(CzVec2* iv, CzVec2* ov, int nCount);
00061     void        TransformNPreTranslate(CzVec2* iv, CzVec2* ov, int nCount);
00062     float       TransformZ(float x, float y);
00063     float       TransformZRS(float x, float y);
00064 
00065     CzVec2      getTranslation();
00066     float       getX() const;
00067     float       getY() const;
00068     
00069 };
00070 
00071 
00072 #endif  // __CV_MATRIX3_H__