TexGen
SectionMeshRectangleSection.h
Go to the documentation of this file.
1/*=============================================================================
2TexGen: Geometric textile modeller.
3Copyright (C) 2012 Louise Brown
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
28
32 {
33 public:
34 CSectionMeshRectangleSection(int iNumLayers = -1);
35 CSectionMeshRectangleSection(TiXmlElement &Element);
37
38 CSectionMesh* Copy() const { return new CSectionMeshRectangleSection(*this); }
39 string GetType() const { return "CSectionMeshRectangleSection"; }
40 void PopulateTiXmlElement(TiXmlElement &Element, OUTPUT_TYPE OutputType) const;
41
42 void SetNumLayers( int iNum );
43 int GetNumLayers() const { return m_iNumLayers; }
44 int CalculateNumberofLayers(const vector<XY> &Section) const;
45
46 protected:
47 bool CreateMesh(const vector<XY> &Section) const;
48 //void GetMinMaxXY(const vector<XY> &Section, XY &Min, XY &Max ) const;
49
51 };
52
53} // namespace TexGen
#define CLASS_DECLSPEC
Definition: Misc.h:35
Abstract base class to create a 2D mesh of a section.
Definition: SectionMesh.h:33
Create a rectangular mesh, the number of layers can be specified or set as -1 for automatic determina...
CSectionMesh * Copy() const
This is a function to allow copying of derived classes correctly.
string GetType() const
Derived class should return the class name.
Namespace containing a series of customised math operations not found in the standard c++ library.
OUTPUT_TYPE
Definition: Misc.h:105