kig
#include <kigtransform.h>
Public Member Functions | |
Transformation (double data[3][3], bool ishomothety) | |
~Transformation () | |
const Coordinate | apply (const double x0, const double x1, const double x2) const |
const Coordinate | apply (const Coordinate &c) const |
double | apply (double length) const |
const Coordinate | apply0 (const Coordinate &c) const |
const Coordinate | apply2by2only (const Coordinate &c) const |
double | data (int r, int c) const |
double | getAffineDeterminant () const |
double | getProjectiveIndicator (const Coordinate &c) const |
double | getRotationAngle () const |
const Transformation | inverse (bool &valid) const |
bool | isAffine () const |
bool | isHomothetic () const |
Static Public Member Functions | |
static const Transformation | affinityGI3P (const std::vector< Coordinate > &FromPoints, const std::vector< Coordinate > &ToPoints, bool &valid) |
static const Transformation | castShadow (const Coordinate &ls, const LineData &d) |
static const Transformation | harmonicHomology (const Coordinate ¢er, const LineData &axis) |
static const Transformation | identity () |
static const Transformation | lineReflection (const LineData &l) |
static const Transformation | pointReflection (const Coordinate &c) |
static const Transformation | projectiveRotation (double alpha, const Coordinate &d, const Coordinate &t) |
static const Transformation | projectivityGI4P (const std::vector< Coordinate > &FromPoints, const std::vector< Coordinate > &ToPoints, bool &valid) |
static const Transformation | rotation (double angle, const Coordinate ¢er=Coordinate()) |
static const Transformation | scalingOverLine (double factor, const LineData &l) |
static const Transformation | scalingOverPoint (double factor, const Coordinate ¢er=Coordinate()) |
static const Transformation | similitude (const Coordinate ¢er, double theta, double factor) |
static const Transformation | translation (const Coordinate &c) |
Friends | |
const Transformation | operator* (const Transformation &a, const Transformation &b) |
bool | operator== (const Transformation &lhs, const Transformation &rhs) |
Detailed Description
Class representing a transformation.
More specifically, this class represents a pretty generic 2-dimensional transformation. Various common transformations can be used. Construct a Transformation by using one of its static members, and use it either with its Transformation::apply method, or the ObjectImp::transform method.
Definition at line 37 of file kigtransform.h.
Constructor & Destructor Documentation
Transformation::~Transformation | ( | ) |
Definition at line 760 of file kigtransform.cpp.
Transformation::Transformation | ( | double | data[3][3], |
bool | ishomothety | ||
) |
Definition at line 772 of file kigtransform.cpp.
Member Function Documentation
|
static |
Affinity given the image of 3 points.
Returns the unique affinity that transforms 3 given points into 3 given points.
Definition at line 391 of file kigtransform.cpp.
const Coordinate Transformation::apply | ( | const double | x0, |
const double | x1, | ||
const double | x2 | ||
) | const |
Apply this Tranformation.
Apply this transformation to the Coordinate c. Can return an invalid Coordinate. apply0 assumes that c indicates a point at infinity, having [0, c.x, c.y] as homogeneous coordinates
Definition at line 611 of file kigtransform.cpp.
const Coordinate Transformation::apply | ( | const Coordinate & | c | ) | const |
Definition at line 633 of file kigtransform.cpp.
double Transformation::apply | ( | double | length | ) | const |
a homothetic transformation maintains the ratio's of lengths.
This means that every length is multiplied by a fixed number when it is projected... This function does that calculation for you..
Definition at line 764 of file kigtransform.cpp.
const Coordinate Transformation::apply0 | ( | const Coordinate & | c | ) | const |
Definition at line 653 of file kigtransform.cpp.
const Coordinate Transformation::apply2by2only | ( | const Coordinate & | c | ) | const |
Definition at line 723 of file kigtransform.cpp.
|
static |
Cast Shadow.
Returns a Transformation that transforms points in such a way that it appears to cast a shadow, given a certain light source, and a line indicating a plane.
Definition at line 550 of file kigtransform.cpp.
double Transformation::data | ( | int | r, |
int | c | ||
) | const |
Definition at line 732 of file kigtransform.cpp.
double Transformation::getAffineDeterminant | ( | ) | const |
Definition at line 711 of file kigtransform.cpp.
double Transformation::getProjectiveIndicator | ( | const Coordinate & | c | ) | const |
Definition at line 703 of file kigtransform.cpp.
double Transformation::getRotationAngle | ( | ) | const |
Definition at line 718 of file kigtransform.cpp.
|
static |
Harmonic Homology.
Returns a Transformation that transforms points in such a way that it appears to cast a shadow, given a certain light source (center), and a line (axis) indicating a plane.
Definition at line 344 of file kigtransform.cpp.
|
static |
Identity.
Returns the Identity Transformation, i.e. a Transformation that doesn't do anything.
Definition at line 250 of file kigtransform.cpp.
const Transformation Transformation::inverse | ( | bool & | valid | ) | const |
The inverse Transformation.
Returns the inverse Transformation of this Transformation.
Definition at line 737 of file kigtransform.cpp.
bool Transformation::isAffine | ( | ) | const |
Definition at line 686 of file kigtransform.cpp.
bool Transformation::isHomothetic | ( | ) | const |
Returns whether this is a homothetic (affine) transformation.
Definition at line 681 of file kigtransform.cpp.
|
static |
Line Reflection.
Returns a reflection over a line
- Note
- This equals scaling( -1, l );
Definition at line 316 of file kigtransform.cpp.
|
static |
Point Reflection.
Returns a reflection over a point
- Note
- This equals scaling( -1, c );
Definition at line 285 of file kigtransform.cpp.
|
static |
Projective Rotation.
This is really only a test example of a projective non-affine transformation...
Definition at line 591 of file kigtransform.cpp.
|
static |
Projectivity given the image of 4 points.
Returns the unique projectivity that transforms 4 given points into 4 given points.
Definition at line 482 of file kigtransform.cpp.
|
static |
Rotation.
Returns a Rotation by a certain angle, around a certain center.
Definition at line 658 of file kigtransform.cpp.
|
static |
Scaling over Line.
Returns a Transformation that scales points by a certain factor with relation to a line. Note: This is not a homothetic transformation.
Definition at line 324 of file kigtransform.cpp.
|
static |
Scaling over Point.
Returns a Transformation that scales points by a certain factor with relation to a center point.
Definition at line 260 of file kigtransform.cpp.
|
static |
Similitude.
Sequence of a rotation and a scaling with relation to a certain center.
Definition at line 794 of file kigtransform.cpp.
|
static |
Friends And Related Function Documentation
|
friend |
Sequence.
This creates a Transformation that executes first transformation b, and then a.
Definition at line 292 of file kigtransform.cpp.
|
friend |
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:12:06 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.