Main Page | Namespace List | Class List | File List | Namespace Members | Class Members

Triangle.h

00001 #ifndef _TRIANGLE_H_ 00002 #define _TRIANGLE_H_ 00003 00004 /* 00005 This library is free software; you can redistribute it and/or 00006 modify it under the terms of the GNU Library General Public 00007 License as published by the Free Software Foundation; either 00008 version 2 of the License, or (at your option) any later version. 00009 00010 This library is distributed in the hope that it will be useful, 00011 but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00013 Library General Public License for more details. 00014 00015 You should have received a copy of the GNU Library General Public License 00016 along with this library; see the file COPYING.LIB. If not, write to 00017 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 00018 Boston, MA 02111-1307, USA. 00019 00020 author : jh, jochen.hanff@gmx.de 00021 00022 file : Triangle.h 00023 00024 */ 00025 00026 #include <qstring.h> 00027 00028 00029 class Vertex; 00030 00031 00033 00042 class Triangle 00043 { 00044 00045 public: 00046 00047 00051 Triangle(const QString& id, Vertex* p1, Vertex* p2, Vertex* p3); 00052 00053 00054 00060 ~Triangle(); 00061 00062 00063 QString get_ID() { return _id; } 00064 00065 00077 void write_XML(QTextStream& cout); 00078 00079 00080 QString vertex_ID(int index) { 00081 00082 if(index == 0) return _p1->ID(); 00083 if(index == 1) return _p2->ID(); 00084 if(index == 2) return _p3->ID(); 00085 00086 return ""; 00087 00088 } 00089 00090 00091 private: 00092 00093 QString _id; 00094 00095 Vertex* _p1; 00096 Vertex* _p2; 00097 Vertex* _p3; 00098 00099 }; 00100 00101 00102 #endif

Generated on Sun Sep 12 12:59:34 2004 for DelaunayMeshGenerator by doxygen 1.3.7