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

matrixc.h

Go to the documentation of this file.
00001 /*
00002 Copyright (C) 1999  Carsten Winkelholz
00003 
00004 Address:  
00005 FGAN Forschungsgesellschaft fr Angewandte Naturwissenschaften e. V.
00006 Neuenahrer Str. 20
00007 D - 53343 Wachtberg
00008       
00009 Email:    winkelholz@fgan.de
00010 
00011 This program is free software; you can redistribute it and/or
00012 modify it under the terms of the GNU General Public License
00013 as published by the Free Software Foundation; either version 2
00014 of the License, or (at your option) any later version.
00015 
00016 This program is distributed in the hope that it will be useful,
00017 but WITHOUT ANY WARRANTY; without even the implied warranty of
00018 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00019 GNU General Public License for more details.
00020 
00021 You should have received a copy of the GNU General Public License
00022 along with this program; if not, write to the Free Software
00023 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
00024 */
00025 
00026 
00027 #ifndef MATRIXC_H
00028 #define MATRIXC_H
00029 
00030 #include "vectorc.h"
00031 
00032 #include <math.h>
00033 
00034 #include "../oawconfig.h"
00035 
00036 OAW_BEGIN_NAMESPACE
00037 
00038 class QuaternionC;
00039 
00040 class OAW_DLLMAPPING MatrixC
00041 { 
00042 public:
00043   MatrixC();
00044   MatrixC(const VectorC &a1,const VectorC &a2,const VectorC &a3){Set(a1,a2,a3);}
00045   ~MatrixC(){}
00046   int operator == (const MatrixC& v);
00047   int operator != (const MatrixC& v);
00048   MatrixC operator = (const MatrixC&);
00049   MatrixC operator * (const MatrixC&);
00050   VectorC operator * (const VectorC&);
00051   friend OAW_DLLMAPPING MatrixC operator ~(const MatrixC&);
00052   void SetIdentity();
00053   void SetRotateOnMinusZ(const VectorC&);
00054   void SetRotateZ(const double&); 
00055   void SetRotateY(const double&); 
00056   void SetRotateX(const double&); 
00057   void Set(const VectorC &a1,const VectorC &a2,const VectorC &a3);
00058   friend MatrixC Inv(const MatrixC&);
00059 public:
00060   double m[9];
00061 };
00062 
00063 class OAW_DLLMAPPING Matrix4C
00064 { 
00065 public:
00066   Matrix4C();
00067   Matrix4C(const VectorC &a1,const VectorC &a2,const VectorC &a3){Set(a1,a2,a3);}
00068   virtual ~Matrix4C(){};
00069   int operator == (const Matrix4C& v);
00070   int operator != (const Matrix4C& v);
00071   Matrix4C operator = (const Matrix4C &);
00072   Matrix4C operator * (const Matrix4C&);
00073   VectorC operator * (const VectorC&); 
00074   friend OAW_DLLMAPPING Matrix4C operator ~(const Matrix4C&);
00075   friend OAW_DLLMAPPING Matrix4C Inv(const Matrix4C&);
00076   void Set(const VectorC &a1,const VectorC &a2,const VectorC &a3);
00077   void SetIdentity();
00078   void SetRotateOnMinusZ(const VectorC&);
00079   void SetRotateZ(const double&); 
00080   void SetRotateY(const double&); 
00081   void SetRotateX(const double&);
00082   void SetTranslation(const VectorC&);
00083   void SetRotation(const VectorC&,const double&);
00084   void SetScale(const VectorC&);
00085   void SetQuaternion(const QuaternionC&);
00086   void Writeln();
00087 public:
00088   double m[16];
00089 };
00090 
00091 OAW_END_NAMESPACE
00092 
00093 #endif
00094 
00095 
00096 
00097 
00098 

Generated on Tue Jul 29 14:24:15 2003 for Open ActiveWrl by doxygen1.3-rc2