00001 // -*- C++ -*- 00002 00003 /* 00004 * Gnome Chemistry Utils 00005 * matrix2d.h 00006 * 00007 * Copyright (C) 2004 00008 * 00009 * Developed by Jean Bréfort <jean.brefort@ac-dijon.fr> 00010 * 00011 * This library is free software; you can redistribute it and/or 00012 * modify it under the terms of the GNU Lesser General Public 00013 * License as published by the Free Software Foundation; either 00014 * version 2.1 of the License, or (at your option) any later version. 00015 * 00016 * This library 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 GNU 00019 * Lesser General Public License for more details. 00020 * 00021 * You should have received a copy of the GNU Lesser General Public 00022 * License along with this library; if not, write to the 00023 * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 00024 * Boston, MA 02111-1307, USA. 00025 */ 00026 00027 #ifndef GCU_MATRIX2D_H 00028 #define GCU_MATRIX2D_H 00029 00030 namespace gcu 00031 { 00032 00036 class Matrix2D 00037 { 00038 public: 00039 00043 Matrix2D(); 00047 virtual ~Matrix2D(); 00055 Matrix2D(double Angle, bool Deg = true); 00064 Matrix2D(double x11, double x12, double x21, double x22); 00070 Matrix2D& operator*(Matrix2D& cMat); 00076 Matrix2D& operator=(Matrix2D& cMat); 00084 void Transform(double &dx, double &dy); 00085 00086 private : 00087 double x[2][2]; 00088 }; 00089 00090 } //namespace gcu 00091 00092 #endif //GCRYSTAL_MATRIX2D_H