TexGen
TextileDeformer.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
23//#include "MatrixUtils.h"
24
25namespace TexGen
26{
27 using namespace std;
28
29 class CTextile;
30
32
38 {
39 public:
40 CTextileDeformer(void);
41 virtual ~CTextileDeformer(void);
42
43 virtual void DeformTextile(CTextile &Textile, bool bDeformDomain = true);
44 CTextile* GetDeformedCopyOfTextile(CTextile &Textile, bool bDeformDomain = true);
45
46 const CLinearTransformation &GetRepeatVectorDeformation() const { return m_RepeatDeformation; }
47 void SetRepeatVectorDeformation(CLinearTransformation RepeatDeformation) { m_RepeatDeformation = RepeatDeformation; }
48
49 protected:
65 virtual double GetDisplacement(XYZ Pos, int iYarn, XYZ &Disp) const = 0;
66
68 };
69
70
71}; // namespace TexGen
72
73
74
75
76
77
78
79
80
81
82
83
84
85
#define CLASS_DECLSPEC
Definition: Misc.h:35
Represents a linear transformation as a 3x3 matrix.
A virtual base class which can be used to deform textiles.
virtual double GetDisplacement(XYZ Pos, int iYarn, XYZ &Disp) const =0
void SetRepeatVectorDeformation(CLinearTransformation RepeatDeformation)
const CLinearTransformation & GetRepeatVectorDeformation() const
CLinearTransformation m_RepeatDeformation
Represents a textile cell containing yarns.
Definition: Textile.h:39
Namespace containing a series of customised math operations not found in the standard c++ library.
Struct for representing points in 3D space.
Definition: mymath.h:56