IMP
2.0.1
The Integrative Modeling Platform
|
Simple 2D transformation class. More...
#include <IMP/algebra/Transformation2D.h>
Public Member Functions | |
Transformation2D () | |
constructor. An invalid transformation is built | |
Transformation2D (const Rotation2D &r, const Vector2D &t=Vector2D(0.0, 0.0)) | |
basic constructor from a Rotation2D and translation vector | |
Transformation2D (const Vector2D &t) | |
Constructor for a transformation with an identity rotation. | |
Transformation2D | get_inverse () const |
Returns the inverse transformation. | |
const Rotation2D | get_rotation () const |
Returns the rotation. | |
Vector2D | get_transformed (const Vector2D &o) const |
Perform the transformation on an 2D vector. More... | |
const Vector2D | get_translation () const |
Returns the translation. | |
Vector2D | operator* (const Vector2D &v) const |
Perform the transformation on an 2D vector. More... | |
Transformation2D | operator* (const Transformation2D &tr) const |
compose two transformations More... | |
const Transformation2D & | operator*= (const Transformation2D &o) |
See help for operator*. | |
Transformation2D | operator/ (const Transformation2D &b) const |
const Transformation2D & | operator/= (const Transformation2D &o) |
See help for operator/. | |
void | set_rotation (double angle) |
void | set_translation (const Vector2D &v) |
Sets the translation. | |
void | show (std::ostream &out=std::cout) const |
Related Functions | |
(Note that these are not member functions.) | |
Transformation2D | compose (const Transformation2D &a, const Transformation2D &b) |
compose two transformations More... | |
Transformation2D | get_identity_transformation_2d () |
Returns a transformation that does not do anything. | |
Transformation2D | get_rotation_about_point (const Vector2D &point, const Rotation2D &rotation) |
Generates a Transformation2D object from a rotation around a point. More... | |
Definition at line 29 of file Transformation2D.h.
[in] | o | vector where the transformation is applied |
Definition at line 53 of file Transformation2D.h.
Definition at line 62 of file Transformation2D.h.
Transformation2D IMP::algebra::Transformation2D::operator* | ( | const Transformation2D & | tr | ) | const |
\ note The transformations are composed such that for any vector v (rt1*rt2)*v = rt1*(rt2*v)
Definition at line 71 of file Transformation2D.h.
Transformation2D IMP::algebra::Transformation2D::operator/ | ( | const Transformation2D & | b | ) | const |
Compute the transformation d which, when composed with b, gives this one. That is a(x)== d(b(x)) for all x.
Definition at line 83 of file Transformation2D.h.
|
related |
For any vector v (a*b)*v = a*(b*v).
Definition at line 150 of file Transformation2D.h.
|
related |
Generates a Transformation2D to rotate about a point rather than the origin.
[in] | point | Center to rotate about |
[in] | rotation | The rotation to perform (defined taking the origin as reference, not the new point). |
Definition at line 141 of file Transformation2D.h.