Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

vector2d.h

Go to the documentation of this file.
00001 #ifndef VECTOR2D
00002 
00003 #define VECTOR2D
00004 
00005 class Vector2D
00006 {
00007 private:
00008     float x, y;
00009 
00010 public:
00011     Vector2D ();
00012     Vector2D (float _x, float _y);
00013 
00014     void SetDirScale( int dir, float scale ); 
00015 
00016     float GetX ();
00017     float GetY ();
00018 
00019     void SetXY( float _x, float _y ) { x=_x; y=_y; }
00020 
00021     int GetTileX();
00022     int GetTileY();
00023 
00024     void GetCoords( float* _x, float* _y );
00025     void GetTileCoords( int* _x, int* _y );
00026 
00027     void Normalize();
00028     float Length ();
00029     float Distance (Vector2D v);
00030     void Print ();
00031 
00032     Vector2D Add (Vector2D v);
00033     Vector2D Mul (float a);
00034 
00035     void AddInPlace( Vector2D );
00036     void MulInPlace( float    );
00037 
00038     float Cos();  
00039     float Sin();  
00041     Vector2D &operator = (const Vector2D &v);
00042 };
00043 
00044 #endif

Generated on Sun Mar 2 18:50:27 2003 for eounicorn by doxygen1.3-rc3