TexGen
YarnSectionConstant.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 "YarnSection.h"
22namespace TexGen
23{
24 using namespace std;
25
28 {
29 public:
30 CYarnSectionConstant(const CSection &Section);
31 CYarnSectionConstant(TiXmlElement &Element);
33
34 CYarnSection* Copy() const { return new CYarnSectionConstant(*this); }
35 string GetType() const { return "CYarnSectionConstant"; }
36 void PopulateTiXmlElement(TiXmlElement &Element, OUTPUT_TYPE OutputType) const;
37
38 vector<XY> GetSection(const YARN_POSITION_INFORMATION PositionInfo, int iNumPoints, bool bEquiSpaced = false) const;
39 CMesh GetSectionMesh(const YARN_POSITION_INFORMATION PositionInfo, int iNumPoints, bool bEquiSpaced) const;
40
41 // Accessor methods
42 const CSection &GetSection() const { return *m_pSection; }
43
44 protected:
46 };
47
48}; // namespace TexGen
49
50
51
52
53
54
55
#define CLASS_DECLSPEC
Definition: Misc.h:35
Defines the nodes and elements of a surface or volume mesh.
Definition: Mesh.h:58
Object container to help handle memory management issues.
Abstract base class respresenting a yarn cross-section.
Definition: Section.h:31
Creates a section which is constant all along the yarn.
CYarnSection * Copy() const
This is a function to allow copying of derived classes correctly.
CObjectContainer< CSection > m_pSection
string GetType() const
Derived class should return the class name.
const CSection & GetSection() const
Abstract base class used to define the sections along the length of a yarn.
Definition: YarnSection.h:58
Namespace containing a series of customised math operations not found in the standard c++ library.
OUTPUT_TYPE
Definition: Misc.h:105
Structure used to represent the position along the length of a yarn.
Definition: YarnSection.h:36