Hot Door CORE 0.8.2
Adobe® Illustrator® Plug-in Library
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Friends | List of all members
hdi::core::TransformMatrix Class Reference

Allows for 2-dimensional transformations in a single application via matrix math. More...

#include <hdicoreTransformMatrix.h>

Public Member Functions

 TransformMatrix ()
 Constructs a TransformMatrix and sets its entries to that of an identity 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.
 
 TransformMatrix (const TransformMatrix &m_)
 TransformMatrix copy constructor.
 
virtual ~TransformMatrix ()
 TransformMatrix destructor.
 
virtual void setIdentity ()
 Sets a TransformMatrix object's entries to that of an identity matrix.
 
virtual bool isIdentity () const
 Gets whether a TransformMatrix currently has its entries set to that of an identity matrix.
 
virtual void setTranslate (const double tx_, const double ty_)
 Sets the translation values of a matrix.
 
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 concatTranslate (const double tx_, const double ty_)
 Concatenates translation values to an existing matrix.
 
virtual void concatRotate (const Angle &angle_)
 Concatenates rotation values to an existing matrix.
 
virtual void concatScale (const double sx_, const double sy_)
 Concatenates scale values to an existing matrix.
 
virtual void concat (const TransformMatrix &matrix2_)
 Concatenates one matrix with another.
 
virtual double determinant () const
 Gets the determinant of the target matrix.
 
virtual bool degenerate () const
 Gets whether the target matrix is degenerate.
 
virtual bool invert (TransformMatrix &inverse__) const
 Inverts a target matrix.
 
virtual bool operator== (const TransformMatrix &rhs_) const
 Compares two matrices for equality.
 
virtual bool operator!= (const TransformMatrix &rhs_) const
 Compares two matrices for inequality.
 
virtual TransformMatrixoperator= (const TransformMatrix &rhs_)
 Sets a target matrix to have the same values as another.
 
virtual TransformMatrix operator* (const TransformMatrix &rhs_) const
 Multiplies two matrices together.
 
virtual TransformMatrixoperator*= (const TransformMatrix &rhs_)
 Multiplies and assigns (concatenates) one matrix with another.
 

Public Attributes

double a
 Row 0, column 0 of the transformation matrix.
 
double b
 Row 0, column 1 of the transformation matrix.
 
double c
 Row 1, column 0 of the transformation matrix.
 
double d
 Row 1, column 1 of the transformation matrix.
 
double tx
 Stores the x-axis translation (offset) value.
 
double ty
 Stores the y-axis translation (offset) value.
 

Friends

aip::TransformMatrix * __accessImpl (const TransformMatrix &)
 
TransformMatrix __accessCtor (const aip::TransformMatrix &)
 

Detailed Description

Allows for 2-dimensional transformations in a single application via matrix math.

Constructor & Destructor Documentation

◆ TransformMatrix() [1/3]

hdi::core::TransformMatrix::TransformMatrix ( )

Constructs a TransformMatrix and sets its entries to that of an identity matrix.

Author
GW
Date
08/2013

◆ TransformMatrix() [2/3]

hdi::core::TransformMatrix::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.

Author
GW
Date
08/2013
Parameters
a_Value for entry at row 0, column 0
b_Value for entry at row 0, column 1
c_Value for entry at row 1, column 0
d_Value for entry at row 1, column 1
tx_x-axis translation (offset) value
ty_y-axis translation (offset) value

◆ TransformMatrix() [3/3]

hdi::core::TransformMatrix::TransformMatrix ( const TransformMatrix m_)

TransformMatrix copy constructor.

Author
GW
Date
08/2013
Parameters
m_Existing TransformMatrix to copy

◆ ~TransformMatrix()

virtual hdi::core::TransformMatrix::~TransformMatrix ( )
virtual

TransformMatrix destructor.

Author
GW
Date
08/2013

Member Function Documentation

◆ concat()

virtual void hdi::core::TransformMatrix::concat ( const TransformMatrix matrix2_)
virtual

Concatenates one matrix with another.

Author
GW
Date
08/2013
Parameters
matrix2_Second matrix to concatenate with the target matrix

◆ concatRotate()

virtual void hdi::core::TransformMatrix::concatRotate ( const Angle angle_)
virtual

Concatenates rotation values to an existing matrix.

Author
GW
Date
08/2013
Parameters
angle_Amount to rotate about the origin

◆ concatScale()

virtual void hdi::core::TransformMatrix::concatScale ( const double  sx_,
const double  sy_ 
)
virtual

Concatenates scale values to an existing matrix.

Author
GW
Date
08/2013
Parameters
sx_Amount to scale in the x-direction (1.0 being the current size)
sy_Amount to scale in the y-direction (1.0 being the current size)

◆ concatTranslate()

virtual void hdi::core::TransformMatrix::concatTranslate ( const double  tx_,
const double  ty_ 
)
virtual

Concatenates translation values to an existing matrix.

Author
GW
Date
08/2013
Parameters
tx_Amount to offset along the x-axis
ty_Amount to offset along the y-axis
Note
Negative values go toward 0.0 if the object to be transformed has a positive x and/or y value; positive values go away from 0.0

◆ degenerate()

virtual bool hdi::core::TransformMatrix::degenerate ( ) const
virtual

Gets whether the target matrix is degenerate.

Author
GW
Date
08/2013
Returns
true for a degenerate matrix (has a determinant of 0), or false otherwise

◆ determinant()

virtual double hdi::core::TransformMatrix::determinant ( ) const
virtual

Gets the determinant of the target matrix.

Author
GW
Date
08/2013
Returns
Determinant value of the matrix

◆ invert()

virtual bool hdi::core::TransformMatrix::invert ( TransformMatrix inverse__) const
virtual

Inverts a target matrix.

If the inverse of the target matrix were concatenated with the target itself, the result would be an identity matrix

Author
GW
Date
08/2013
Parameters
inverse__Return-by-reference variable for the inverted matrix
Returns
true if inversion is possible and was successfully performed, false otherwise
Note
Inversion cannot be peformed when the target matrix is degenerate. In that case, the inverse__ argument will be set to an identity matrix and false is returned.

◆ isIdentity()

virtual bool hdi::core::TransformMatrix::isIdentity ( ) const
virtual

Gets whether a TransformMatrix currently has its entries set to that of an identity matrix.

Author
GW
Date
08/2013
Returns
true if the matrix values are those of an identity matrix, or false otherwise

◆ operator!=()

virtual bool hdi::core::TransformMatrix::operator!= ( const TransformMatrix rhs_) const
virtual

Compares two matrices for inequality.

Author
GW
Date
08/2013
Parameters
rhs_Righthand side of the != operator; the matrix to compare against
Returns
true if any fields of both matrices are unequal to each other, or false otherwise

◆ operator*()

virtual TransformMatrix hdi::core::TransformMatrix::operator* ( const TransformMatrix rhs_) const
virtual

Multiplies two matrices together.

Author
GW
Date
08/2013
Parameters
rhs_Righthand side of the * operator; the matrix to multiply with
Returns
A new TransformMatrix object containing the values of the fields from this and rhs_ multiplied together.

◆ operator*=()

virtual TransformMatrix & hdi::core::TransformMatrix::operator*= ( const TransformMatrix rhs_)
virtual

Multiplies and assigns (concatenates) one matrix with another.

Author
GW
Date
08/2013
Parameters
rhs_Righthand side of the *= operator; the matrix to multiply with
Returns
The target TransformMatrix object, but updated with the values of the fields from this and rhs_ multiplied together.

◆ operator=()

virtual TransformMatrix & hdi::core::TransformMatrix::operator= ( const TransformMatrix rhs_)
virtual

Sets a target matrix to have the same values as another.

Author
GW
Date
08/2013
Parameters
rhs_Righthand side of the = operator; the matrix to pull values from
Returns
The target matrix, but with its values equaling those from rhs_

◆ operator==()

virtual bool hdi::core::TransformMatrix::operator== ( const TransformMatrix rhs_) const
virtual

Compares two matrices for equality.

Author
GW
Date
08/2013
Parameters
rhs_Righthand side of the == operator; the matrix to compare against
Returns
true if all fields of both matrices are binary equal to each other, or false otherwise

◆ setIdentity()

virtual void hdi::core::TransformMatrix::setIdentity ( )
virtual

Sets a TransformMatrix object's entries to that of an identity matrix.

Author
GW
Date
08/2013

◆ setRotate()

virtual void hdi::core::TransformMatrix::setRotate ( const Angle angle_)
virtual

Sets the rotation values, about the origin, of a matrix.

Author
GW
Date
08/2013
Parameters
angle_Amount to rotate about the origin

◆ setScale()

virtual void hdi::core::TransformMatrix::setScale ( const double  sx_,
const double  sy_ 
)
virtual

Sets the scale values, from the origin, of a matrix.

Author
GW
Date
08/2013
Parameters
sx_Amount to scale in the x-direction (1.0 being the current size)
sy_Amount to scale in the y-direction (1.0 being the current size)

◆ setTranslate()

virtual void hdi::core::TransformMatrix::setTranslate ( const double  tx_,
const double  ty_ 
)
virtual

Sets the translation values of a matrix.

Author
GW
Date
08/2013
Parameters
tx_Amount to offset along the x-axis
ty_Amount to offset along the y-axis
Note
Negative values go toward 0.0 if the object to be transformed has a positive x and/or y value; positive values go away from 0.0