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

WP_Matrix2D.h

Go to the documentation of this file.
00001 /* Copyright (C) 2001 W.P. van Paassen - peter@paassen.tmfweb.nl
00002 
00003    This program is free software; you can redistribute it and/or modify it under
00004    the terms of the GNU General Public License as published by the Free
00005    Software Foundation; either version 2 of the License, or (at your
00006    option) any later version.
00007 
00008    This program is distributed in the hope that it will be useful, but WITHOUT
00009    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00010    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
00011    for more details.
00012 
00013    You should have received a copy of the GNU General Public License
00014    along with this program; see the file COPYING.  If not, write to the Free
00015    Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
00016 
00017 #ifndef WP_Matrix2D_H
00018 #define WP_Matrix2D_H
00019 
00020 #include "WP_Def.h"
00021 
00022 namespace WPCG
00023 {
00042 class WP_Matrix2D
00043 {
00044 public:
00045         friend class WP_Vector2D;
00046 
00047         WP_Matrix2D();
00048         ~WP_Matrix2D(){};       
00049 
00055         WP_Matrix2D(const byte type, scalar x, scalar y);
00056 
00061         WP_Matrix2D(const byte type, WP_Vector2D* v);
00062 
00066         WP_Matrix2D(scalar angle);
00067 
00073         WP_Matrix2D& operator=(const WP_Matrix2D& m);
00074 
00080         WP_Matrix2D operator*(const WP_Matrix2D & m) const;
00081 
00087         WP_Matrix2D operator+(const WP_Matrix2D & m) const;
00088 
00094         WP_Matrix2D operator-(const WP_Matrix2D & m) const;
00095         
00101         WP_Matrix2D operator*(scalar s) const;
00102 
00108         WP_Matrix2D operator/(scalar s) const;
00109 
00113         WP_Matrix2D& operator-();
00114 
00120         WP_Matrix2D& operator*=(const WP_Matrix2D & m);
00121 
00127         WP_Matrix2D& operator+=(const WP_Matrix2D & m);
00128 
00134         WP_Matrix2D& operator-=(const WP_Matrix2D & m);
00135 
00141         WP_Matrix2D& operator*=(scalar s);
00142 
00148         WP_Matrix2D& operator/=(scalar s);
00149 
00153         void createIdentity();
00154 
00158         scalar data[3][3];
00159 };
00160 }
00161 #endif
00162 

Generated on Tue Jan 28 20:26:34 2003 by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002