TexGen
LinearTransformation.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
22#include "Matrix.h"
23#include "MatrixUtils.h"
24
25#pragma warning(disable:4275)
26
27namespace TexGen
28{
29 using namespace std;
30
31 class CTextile;
32
34
39 {
40 public:
42 CLinearTransformation(const CMatrix &Matrix);
44
45 void ResetTransformation();
46 void MultiplyTransformation(const CMatrix &Deformation);
47 void AddScale(double dXScale = 1, double dYScale = 1, double dZScale = 1);
48 void AddSheardYbydX(double dValue) { (*this)(1, 0) += dValue; }
49 void AddSheardZbydX(double dValue) { (*this)(2, 0) += dValue; }
50 void AddSheardXbydY(double dValue) { (*this)(0, 1) += dValue; }
51 void AddSheardZbydY(double dValue) { (*this)(2, 1) += dValue; }
52 void AddSheardXbydZ(double dValue) { (*this)(0, 2) += dValue; }
53 void AddSheardYbydZ(double dValue) { (*this)(1, 2) += dValue; }
54/* void AddShearX(double dYbydX = 0, double dZbydX = 0);
55 void AddShearY(double dXbydY = 0, double dZbydY = 0);
56 void AddShearZ(double dXbydZ = 0, double dYbydZ = 0);*/
57 void Rotate(WXYZ Rotation);
58 };
59
60
61}; // namespace TexGen
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#define CLASS_DECLSPEC
Definition: Misc.h:35
Represents a linear transformation as a 3x3 matrix.
Class to represent a matrix and perform various operations on it.
Definition: Matrix.h:33
Namespace containing a series of customised math operations not found in the standard c++ library.
Struct for representing a quaternion.
Definition: mymath.h:38