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
CzIVec2.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 __CV_IVEC2_H__
00015 #define __CV_IVEC2_H__
00016 
00017 #include "CzVec3.h"
00018 #include "CzIVec2.h"
00019 #include "CzSVec2.h"
00020 
00021 class CzIVec2
00022 {
00023 public:
00024     int x, y;
00025 
00026 private:
00027 public:
00028     CzIVec2();
00029     CzIVec2(int x, int y);
00030 
00031     void            Set(int n);
00032     void            Add(CzIVec2 const &v);
00033     void            Add(int v);
00034     void            Zero();
00035     void            One();
00036     void            Sub(CzIVec2 const &v);
00037     void            Sub(int v);
00038     void            Invert();
00039     void            Mul(CzIVec2 const &v);
00040     void            Mul(int v);
00041     int             Dot(CzIVec2 const &v) const;
00042     void            Clamp(CzIVec2 const & clamp);
00043     int             Mag() const;
00044     int             MagSquared() const;
00045 
00046     bool            operator==	(CzIVec2 const &v) const;
00047     bool            operator!=	(CzIVec2 const &v) const;
00048     CzIVec2         operator+	(CzIVec2 const &v) const;
00049     CzIVec2&        operator+=	(CzIVec2 const &v);
00050     CzIVec2         operator-	(CzIVec2 const &v) const;
00051     CzIVec2&        operator-=	(CzIVec2 const &v);
00052     CzIVec2         operator*	(CzIVec2 const &v) const;
00053     CzIVec2&        operator*=	(CzIVec2 const &v);
00054     CzIVec2         operator*	(int n) const;
00055     CzIVec2&        operator*=	(int n);
00056     
00057     CzVec2          toVec2() const;
00058     CzSVec2         toSVec2() const;
00059     CzVec3          toVec3() const;
00060 
00061 };
00062 
00063 
00064 #endif  // __CV_IVEC2_H__
00065