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

Mesh.h

00001 #ifndef _MESH_H_ 00002 #define _MESH_H_ 00003 00004 00005 /* 00006 This library is free software; you can redistribute it and/or 00007 modify it under the terms of the GNU Library General Public 00008 License as published by the Free Software Foundation; either 00009 version 2 of the License, or (at your option) any later version. 00010 00011 This library is distributed in the hope that it will be useful, 00012 but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00014 Library General Public License for more details. 00015 00016 You should have received a copy of the GNU Library General Public License 00017 along with this library; see the file COPYING.LIB. If not, write to 00018 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 00019 Boston, MA 02111-1307, USA. 00020 00021 file : Mesh.h 00022 00023 */ 00024 00025 00026 #include <qdict.h> 00027 #include <qstring.h> 00028 #include <qstringlist.h> 00029 00030 00031 #include "Vertex.h" 00032 #include "Triangle.h" 00033 00034 00035 00037 00049 class Mesh 00050 { 00051 00052 public: 00053 00054 00059 Mesh(); 00060 00061 00062 00068 ~Mesh() {} 00069 00070 00071 00100 void write_XML(const QString& filename); 00101 00102 00103 00108 void write_XML(QTextStream &cout); 00109 00110 00111 00112 void add_triangle(Triangle* t); 00113 void add_vertex(Vertex* p); 00114 00115 00116 00117 void remove_triangle(Triangle* t); 00118 void remove_vertex(Vertex* p); 00119 00120 00121 00129 QDict<Triangle>& get_triangles() { return _triangles; } 00130 00131 const QDict<Vertex>& get_vertices() const { return _vertices; } 00132 00133 00137 Vertex* find_vertex(const QString& id) { return _vertices.find(id); } 00138 00139 00140 00150 void clear(); 00151 00152 00153 00154 private: 00155 00156 void init(); 00157 00158 00159 QDict<Vertex> _vertices; 00160 QDict<Triangle> _triangles; 00161 00162 00163 00164 }; 00165 00166 00167 00168 #endif

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