Hot Door CORE 0.8.3
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
155 virtual void setReflect(const Angle& angle_);
156
165 virtual void setScale(const double sx_, const double sy_);
166
178 virtual void concatTranslate(const double tx_, const double ty_);
179
187 virtual void concatRotate(const Angle& angle_);
188
196 virtual void concatReflect(const Angle& angle_);
197
206 virtual void concatScale(const double sx_, const double sy_);
207
215 virtual void concat(const TransformMatrix& matrix2_);
216
224 virtual double determinant() const;
225
233 virtual bool degenerate() const;
234
248 virtual bool invert(TransformMatrix& inverse__) const;
249
258 virtual bool operator==(const TransformMatrix& rhs_) const;
259
268 virtual bool operator!=(const TransformMatrix& rhs_) const;
269
279
289 virtual TransformMatrix operator*(const TransformMatrix& rhs_) const;
290
301
302
303 private:
304 #if defined(HDI_CORE_AIP_MODE)
305 friend aip::TransformMatrix* __accessImpl(const TransformMatrix&);
306 friend TransformMatrix __accessCtor(const aip::TransformMatrix&);
307
311 aip::TransformMatrix* __impl;
312
318 TransformMatrix(const aip::TransformMatrix&);
319 #elif defined(HDI_CORE_PSP_MODE)
320 friend geo::TransformMatrix* __accessImpl(const TransformMatrix&);
321 friend TransformMatrix __accessCtor(const geo::TransformMatrix&);
322
326 geo::TransformMatrix* __impl;
327
333 TransformMatrix(const geo::TransformMatrix&);
334 #endif
335 };
336
337 typedef std::unique_ptr<TransformMatrix> TransformMatrixUP;
338 typedef std::shared_ptr<TransformMatrix> TransformMatrixSP;
339 typedef std::weak_ptr<TransformMatrix> TransformMatrixWP;
340
341 #if defined(HDI_CORE_AIP_MODE)
342 extern aip::TransformMatrix* __accessImpl(const TransformMatrix&);
343 extern TransformMatrix __accessCtor(const aip::TransformMatrix&);
344 #elif defined(HDI_CORE_PSP_MODE)
345 extern geo::TransformMatrix* __accessImpl(const TransformMatrix&);
346 extern TransformMatrix __accessCtor(const geo::TransformMatrix&);
347 #endif
348 }
349}
350
351#endif
352// __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 void concatReflect(const Angle &angle_)
Concatenates reflection values to an existing matrix.
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.
virtual void setReflect(const Angle &angle_)
Sets the reflection values, about the origin, of a matrix.
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