TexGen
TextileWeave3D.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 "TextileWeave.h"
22
23namespace TexGen
24{
25 using namespace std;
26
29 {
30 public:
31 CTextileWeave3D(int iWidth, int iHeight, double dSpacing, double dThickness);
32 CTextileWeave3D(TiXmlElement &Element);
33 ~CTextileWeave3D(void);
34
35 CTextile* Copy() const { return new CTextileWeave3D(*this); }
36 string GetType() const { return "CTextileWeave3D"; }
37 void PopulateTiXmlElement(TiXmlElement &Element, OUTPUT_TYPE OutputType);
38
40 void AddYLayers(int x, int iNumberLayers);
42 void AddXLayers(int y, int iNumberLayers);
44 void AddYLayers(int iNumberLayers = 1);
46 void AddXLayers(int iNumberLayers = 1);
48 void DeleteYLayers(int x, int iNumberLayers);
50 void DeleteXLayers(int y, int iNumberLayers);
52 void DeleteYLayers(int iNumberLayers = 1);
54 void DeleteXLayers(int iNumberLayers = 1);
56 void PushDown(int x, int y, int iLevels = 1);
58 void PushUp(int x, int y, int iLevels = 1);
60 void PushYDown(int x, int iLevels = 1);
62 void PushYUp(int x, int iLevels = 1);
64 void PushXDown(int y, int iLevels = 1);
66 void PushXUp(int y, int iLevels = 1);
68 void SwapPosition(int x, int y, int iLevel1, int iLevel2);
69
71 int GetNumYLayers(int x) const;
73 int GetNumXLayers(int y) const;
75 int GetMaxNumLayers() const;
76
77 string GetDefaultName() const;
78
79 protected:
80 };
81}; // namespace TexGen
#define CLASS_DECLSPEC
Definition: Misc.h:35
Represents a textile cell containing yarns.
Definition: Textile.h:39
Respresents a 3d woven textile.
string GetType() const
Derived class should return the class name.
CTextile * Copy() const
Represents a woven textile.
Definition: TextileWeave.h:41
Namespace containing a series of customised math operations not found in the standard c++ library.
OUTPUT_TYPE
Definition: Misc.h:105