digiKam
DigikamEditorPerspectiveToolPlugin::PerspectiveMatrix Class Reference

Public Member Functions

double determinant () const
 
void invert ()
 
void multiply (const PerspectiveMatrix &matrix1)
 
 PerspectiveMatrix ()
 
void scale (double x, double y)
 
void transformPoint (double x, double y, double *newx, double *newy) const
 
void translate (double x, double y)
 

Public Attributes

double coeff [3][3]
 

Constructor & Destructor Documentation

◆ PerspectiveMatrix()

DigikamEditorPerspectiveToolPlugin::PerspectiveMatrix::PerspectiveMatrix ( )
explicit

PerspectiveMatrix:

Initializes matrix to the identity matrix.

References coeff.

Member Function Documentation

◆ determinant()

double DigikamEditorPerspectiveToolPlugin::PerspectiveMatrix::determinant ( ) const

determinant:

Calculates the determinant of this matrix.

Returns: The determinant.

References coeff.

Referenced by invert().

◆ invert()

void DigikamEditorPerspectiveToolPlugin::PerspectiveMatrix::invert ( )

invert:

Inverts this matrix.

References coeff, determinant(), and Digikam::inv().

◆ multiply()

void DigikamEditorPerspectiveToolPlugin::PerspectiveMatrix::multiply ( const PerspectiveMatrix matrix1)

multiply:

Parameters
matrix1The other input matrix.

Multiplies this matrix with another matrix

References coeff, and Digikam::Matrix::matrix().

◆ scale()

void DigikamEditorPerspectiveToolPlugin::PerspectiveMatrix::scale ( double  x,
double  y 
)

scale:

Parameters
xX scale factor.
yY scale factor.

Scales the matrix by x and y

References coeff.

◆ transformPoint()

void DigikamEditorPerspectiveToolPlugin::PerspectiveMatrix::transformPoint ( double  x,
double  y,
double *  newx,
double *  newy 
) const

transformPoint:

Parameters
xThe source X coordinate.
yThe source Y coordinate.
newxThe transformed X coordinate.
newyThe transformed Y coordinate.

Transforms a point in 2D as specified by the transformation matrix.

References coeff.

◆ translate()

void DigikamEditorPerspectiveToolPlugin::PerspectiveMatrix::translate ( double  x,
double  y 
)

translate:

Parameters
xTranslation in X direction.
yTranslation in Y direction.

Translates the matrix by x and y.

References coeff.

Member Data Documentation

◆ coeff

double DigikamEditorPerspectiveToolPlugin::PerspectiveMatrix::coeff[3][3]

coeff:

The 3x3 matrix data

Referenced by determinant(), invert(), multiply(), PerspectiveMatrix(), scale(), transformPoint(), and translate().


The documentation for this class was generated from the following files: