![]() |
Scribus
Open source desktop publishing at your fingertips
|
#include <matrix.h>
Public Member Functions | |
Matrix (Matrix const &m) | |
Matrix (Coord c0, Coord c1, Coord c2, Coord c3, Coord c4, Coord c5) | |
Matrix & | operator= (Matrix const &m) |
Coord | operator[] (unsigned const i) const |
Coord & | operator[] (unsigned const i) |
Point | xAxis () const |
Point | yAxis () const |
Point | translation () const |
void | setXAxis (Point const &vec) |
void | setYAxis (Point const &vec) |
void | setTranslation (Point const &loc) |
double | expansionX () const |
double | expansionY () const |
void | setExpansionX (double val) |
void | setExpansionY (double val) |
void | setIdentity () |
bool | isIdentity (Coord eps=EPSILON) const |
bool | isTranslation (Coord eps=EPSILON) const |
bool | isRotation (double eps=EPSILON) const |
bool | isScale (double eps=EPSILON) const |
bool | isUniformScale (double eps=EPSILON) const |
bool | onlyScaleAndTranslation (double eps=EPSILON) const |
bool | flips () const |
Matrix | without_translation () const |
Matrix | inverse () const |
Coord | det () const |
Coord | descrim2 () const |
Coord | descrim () const |
The Matrix class.
For purposes of multiplication, points should be thought of as row vectors
to be right-multiplied by transformation matrices of the form
(so the columns of the matrix correspond to the columns (elements) of the result, and the rows of the matrix correspond to columns (elements) of the "input").
Geom::Coord Geom::Matrix::descrim | ( | ) | const |
Calculates the descriminant of the Matrix.
Geom::Coord Geom::Matrix::descrim2 | ( | ) | const |
Calculates the scalar of the descriminant of the Matrix. This is simply the absolute value of the determinant.
Geom::Coord Geom::Matrix::det | ( | ) | const |
Calculates the determinant of a Matrix.
double Geom::Matrix::expansionX | ( | ) | const |
Calculates the amount of x-scaling imparted by the Matrix. This is the scaling applied to the original x-axis region. It is {not} the overall x-scaling of the transformation. Equivalent to L2(m.xAxis())
double Geom::Matrix::expansionY | ( | ) | const |
Calculates the amount of y-scaling imparted by the Matrix. This is the scaling applied before the other transformations. It is {not} the overall y-scaling of the transformation. Equivalent to L2(m.yAxis())
Matrix Geom::Matrix::inverse | ( | ) | const |
bool Geom::Matrix::isRotation | ( | double | eps = EPSILON | ) | const |
Answers the question "Does this matrix perform a rotation, and \em{only} a rotation?"
eps | an epsilon value defaulting to EPSILON |
bool Geom::Matrix::isScale | ( | double | eps = EPSILON | ) | const |
Answers the question "Does this matrix perform a scale, and \em{only} a Scale?"
eps | an epsilon value defaulting to EPSILON |
bool Geom::Matrix::isTranslation | ( | Coord | eps = EPSILON | ) | const |
Answers the question "Does this matrix perform a translation, and \em{only} a translation?"
eps | an epsilon value defaulting to EPSILON |
bool Geom::Matrix::isUniformScale | ( | double | eps = EPSILON | ) | const |
Answers the question "Does this matrix perform a uniform scale, and \em{only} a uniform scale?"
eps | an epsilon value defaulting to EPSILON |
void Geom::Matrix::setIdentity | ( | ) |
Sets this matrix to be the Identity Matrix.
Matrix Geom::Matrix::without_translation | ( | ) | const |
Returns the Scale/Rotate/skew part of the matrix without the translation part.