TexGen
SectionMeshTriangulate.h
Go to the documentation of this file.
1/*=============================================================================
2TexGen: Geometric textile modeller.
3Copyright (C) 2006 Martin Sherburn
4
5This program is free software; you can redistribute it and/or
6modify it under the terms of the GNU General Public License
7as published by the Free Software Foundation; either version 2
8of the License, or (at your option) any later version.
9
10This program is distributed in the hope that it will be useful,
11but WITHOUT ANY WARRANTY; without even the implied warranty of
12MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13GNU General Public License for more details.
14
15You should have received a copy of the GNU General Public License
16along with this program; if not, write to the Free Software
17Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18=============================================================================*/
19
20#pragma once
21#include "SectionMesh.h"
22
23namespace TexGen
24{
25 using namespace std;
26
29 {
30 public:
32
41 CSectionMeshTriangulate(double dMinAngle = 20, double dMaxArea = 1);
42 CSectionMeshTriangulate(TiXmlElement &Element);
44
45 CSectionMesh* Copy() const { return new CSectionMeshTriangulate(*this); }
46 string GetType() const { return "CSectionMeshTriangulate"; }
47 void PopulateTiXmlElement(TiXmlElement &Element, OUTPUT_TYPE OutputType) const;
48
51 static CMesh GetSimpleMesh(const vector<XY> &Section);
52 static CMesh GetTriangleMesh(const vector<XY> &Section );
53
54 protected:
55 bool CreateMesh(const vector<XY> &Section) const;
56
57 double m_dMinAngle, m_dMaxArea;
58 };
59}; // namespace TexGen
#define CLASS_DECLSPEC
Definition: Misc.h:35
Defines the nodes and elements of a surface or volume mesh.
Definition: Mesh.h:58
Abstract base class to create a 2D mesh of a section.
Definition: SectionMesh.h:33
Creates a mesh of a section using open source package triangle http://www.cs.cmu.edu/~quake/triangle....
string GetType() const
Derived class should return the class name.
CSectionMesh * Copy() const
This is a function to allow copying of derived classes correctly.
Namespace containing a series of customised math operations not found in the standard c++ library.
OUTPUT_TYPE
Definition: Misc.h:105