Hot Door CORE 0.8.2
Adobe® Illustrator® Plug-in Library
Loading...
Searching...
No Matches
hdicoreTransformMatrix.h
Go to the documentation of this file.
1
7#ifndef __HDI_CORE_TRANSFORM_MATRIX__
8#define __HDI_CORE_TRANSFORM_MATRIX__
9
10#include <memory>
11
12namespace hdi
13{
14 #if defined(HDI_CORE_AIP_MODE)
15 namespace aip
16 {
17 class TransformMatrix;
18 }
19 #elif defined(HDI_CORE_PSP_MODE)
20 namespace geo
21 {
22 class TransformMatrix;
23 }
24 #endif
25
26 namespace core
27 {
28 class Angle;
29
34 {
35 public:
39 double a;
40
44 double b;
45
49 double c;
50
54 double d;
55
59 double tx;
60
64 double ty;
65
72
86 const double a_,
87 const double b_,
88 const double c_,
89 const double d_,
90 const double tx_,
91 const double ty_
92 );
93
102
109
115 virtual void setIdentity();
116
124 virtual bool isIdentity() const;
125
137 virtual void setTranslate(const double tx_, const double ty_);
138
146 virtual void setRotate(const Angle& angle_);
147
156 virtual void setScale(const double sx_, const double sy_);
157
169 virtual void concatTranslate(const double tx_, const double ty_);
170
178 virtual void concatRotate(const Angle& angle_);
179
188 virtual void concatScale(const double sx_, const double sy_);
189
197 virtual void concat(const TransformMatrix& matrix2_);
198
206 virtual double determinant() const;
207
215 virtual bool degenerate() const;
216
230 virtual bool invert(TransformMatrix& inverse__) const;
231
240 virtual bool operator==(const TransformMatrix& rhs_) const;
241
250 virtual bool operator!=(const TransformMatrix& rhs_) const;
251
261
271 virtual TransformMatrix operator*(const TransformMatrix& rhs_) const;
272
283
284
285 private:
286 #if defined(HDI_CORE_AIP_MODE)
287 friend aip::TransformMatrix* __accessImpl(const TransformMatrix&);
288 friend TransformMatrix __accessCtor(const aip::TransformMatrix&);
289
293 aip::TransformMatrix* __impl;
294
300 TransformMatrix(const aip::TransformMatrix&);
301 #elif defined(HDI_CORE_PSP_MODE)
302 friend geo::TransformMatrix* __accessImpl(const TransformMatrix&);
303 friend TransformMatrix __accessCtor(const geo::TransformMatrix&);
304
308 geo::TransformMatrix* __impl;
309
315 TransformMatrix(const geo::TransformMatrix&);
316 #endif
317 };
318
319 typedef std::unique_ptr<TransformMatrix> TransformMatrixUP;
320 typedef std::shared_ptr<TransformMatrix> TransformMatrixSP;
321 typedef std::weak_ptr<TransformMatrix> TransformMatrixWP;
322
323 #if defined(HDI_CORE_AIP_MODE)
324 extern aip::TransformMatrix* __accessImpl(const TransformMatrix&);
325 extern TransformMatrix __accessCtor(const aip::TransformMatrix&);
326 #elif defined(HDI_CORE_PSP_MODE)
327 extern geo::TransformMatrix* __accessImpl(const TransformMatrix&);
328 extern TransformMatrix __accessCtor(const geo::TransformMatrix&);
329 #endif
330 }
331}
332
333#endif
334// __HDI_CORE_TRANSFORM_MATRIX__
Describes an angle, and allows for easy conversion between various units.
Definition: hdicoreAngle.h:26
Allows for 2-dimensional transformations in a single application via matrix math.
Definition: hdicoreTransformMatrix.h:34
virtual void concatScale(const double sx_, const double sy_)
Concatenates scale values to an existing matrix.
double d
Row 1, column 1 of the transformation matrix.
Definition: hdicoreTransformMatrix.h:54
virtual double determinant() const
Gets the determinant of the target matrix.
TransformMatrix(const double a_, const double b_, const double c_, const double d_, const double tx_, const double ty_)
Constructs a TransformMatrix and sets its entries to the arguments provided.
virtual TransformMatrix & operator*=(const TransformMatrix &rhs_)
Multiplies and assigns (concatenates) one matrix with another.
TransformMatrix(const TransformMatrix &m_)
TransformMatrix copy constructor.
virtual void concatRotate(const Angle &angle_)
Concatenates rotation values to an existing matrix.
virtual bool operator!=(const TransformMatrix &rhs_) const
Compares two matrices for inequality.
double tx
Stores the x-axis translation (offset) value.
Definition: hdicoreTransformMatrix.h:59
virtual void setTranslate(const double tx_, const double ty_)
Sets the translation values of a matrix.
virtual TransformMatrix & operator=(const TransformMatrix &rhs_)
Sets a target matrix to have the same values as another.
virtual void setRotate(const Angle &angle_)
Sets the rotation values, about the origin, of a matrix.
virtual void setScale(const double sx_, const double sy_)
Sets the scale values, from the origin, of a matrix.
virtual void setIdentity()
Sets a TransformMatrix object's entries to that of an identity matrix.
virtual ~TransformMatrix()
TransformMatrix destructor.
virtual bool operator==(const TransformMatrix &rhs_) const
Compares two matrices for equality.
virtual bool invert(TransformMatrix &inverse__) const
Inverts a target matrix.
virtual void concat(const TransformMatrix &matrix2_)
Concatenates one matrix with another.
virtual TransformMatrix operator*(const TransformMatrix &rhs_) const
Multiplies two matrices together.
virtual bool degenerate() const
Gets whether the target matrix is degenerate.
virtual bool isIdentity() const
Gets whether a TransformMatrix currently has its entries set to that of an identity matrix.
virtual void concatTranslate(const double tx_, const double ty_)
Concatenates translation values to an existing matrix.
TransformMatrix()
Constructs a TransformMatrix and sets its entries to that of an identity matrix.
double a
Row 0, column 0 of the transformation matrix.
Definition: hdicoreTransformMatrix.h:39
double b
Row 0, column 1 of the transformation matrix.
Definition: hdicoreTransformMatrix.h:44
double ty
Stores the y-axis translation (offset) value.
Definition: hdicoreTransformMatrix.h:64
double c
Row 1, column 0 of the transformation matrix.
Definition: hdicoreTransformMatrix.h:49