Represents an affine transformation. More...
#include <KEYTransformation.h>
Public Member Functions | |
| KEYTransformation () | |
| Construct a unit transformation. More... | |
| KEYTransformation (double xx, double yx, double xy, double yy, double x0, double y0) | |
| Construct a transformation from matrix components. More... | |
| KEYTransformation & | operator*= (const KEYTransformation &tr) |
| Apply a transformation on top of this one. More... | |
| void | operator() (double &x, double &y, bool distance=false) const |
| Apply transformation to a point or distance. More... | |
| bool | approxEqual (const KEYTransformation &other, double eps=KEY_EPSILON) const |
| Tests for approximate equality of transformations. More... | |
Private Attributes | |
| double | m_xx |
| double | m_yx |
| double | m_xy |
| double | m_yy |
| double | m_x0 |
| double | m_y0 |
Represents an affine transformation.
The transformation matrix looks like:
xx yx 0 xy yy 0 x0 y0 1
| libetonyek::KEYTransformation::KEYTransformation | ( | ) |
Construct a unit transformation.
| libetonyek::KEYTransformation::KEYTransformation | ( | double | xx, |
| double | yx, | ||
| double | xy, | ||
| double | yy, | ||
| double | x0, | ||
| double | y0 | ||
| ) |
Construct a transformation from matrix components.
| bool libetonyek::KEYTransformation::approxEqual | ( | const KEYTransformation & | other, |
| double | eps = KEY_EPSILON |
||
| ) | const |
Tests for approximate equality of transformations.
true if this transformation and other are equal, false otherwise Referenced by approxEqual(), and libetonyek::operator==().
| void libetonyek::KEYTransformation::operator() | ( | double & | x, |
| double & | y, | ||
| bool | distance = false |
||
| ) | const |
Apply transformation to a point or distance.
true, the transformed entity is a distance (in that case translation is ignored). | KEYTransformation & libetonyek::KEYTransformation::operator*= | ( | const KEYTransformation & | tr | ) |
Apply a transformation on top of this one.
The effect is as if transformation was applied after this.
|
private |
Referenced by approxEqual(), operator()(), and operator*=().
|
private |
Referenced by approxEqual(), operator()(), and operator*=().
|
private |
Referenced by approxEqual(), operator()(), and operator*=().
|
private |
Referenced by approxEqual(), operator()(), and operator*=().
|
private |
Referenced by approxEqual(), operator()(), and operator*=().
|
private |
Referenced by approxEqual(), operator()(), and operator*=().