IMP logo
IMP Reference Guide  2.6.0
The Integrative Modeling Platform
IMP::algebra::Transformation2D Class Reference

Simple 2D transformation class. More...

#include <IMP/algebra/Transformation2D.h>

+ Inheritance diagram for IMP::algebra::Transformation2D:

Detailed Description

Simple 2D transformation class.

See geometric primitives for more information.

Definition at line 28 of file Transformation2D.h.

Public Member Functions

 Transformation2D ()
 constructor. An invalid transformation is built More...
 
 Transformation2D (const Rotation2D &r, const Vector2D &t=Vector2D(0.0, 0.0))
 basic constructor from a Rotation2D and translation vector More...
 
 Transformation2D (const Vector2D &t)
 Constructor for a transformation with an identity rotation. More...
 
Transformation2D get_inverse () const
 Returns the inverse transformation. More...
 
const Rotation2D get_rotation () const
 Returns the rotation. More...
 
Vector2D get_transformed (const Vector2D &o) const
 Perform the transformation on an 2D vector. More...
 
const Vector2D get_translation () const
 Returns the translation. More...
 
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 Transformation2Doperator*= (const Transformation2D &o)
 See help for operator*. More...
 
Transformation2D operator/ (const Transformation2D &b) const
 
const Transformation2Doperator/= (const Transformation2D &o)
 See help for operator/. More...
 
void set_rotation (double angle)
 
void set_translation (const Vector2D &v)
 Sets the translation. More...
 
void show (std::ostream &out=std::cout) const
 

Constructor & Destructor Documentation

IMP::algebra::Transformation2D::Transformation2D ( )

constructor. An invalid transformation is built

Definition at line 33 of file Transformation2D.h.

IMP::algebra::Transformation2D::Transformation2D ( const Rotation2D r,
const Vector2D t = Vector2D(0.0, 0.0) 
)

basic constructor from a Rotation2D and translation vector

Definition at line 36 of file Transformation2D.h.

IMP::algebra::Transformation2D::Transformation2D ( const Vector2D t)

Constructor for a transformation with an identity rotation.

Definition at line 40 of file Transformation2D.h.

Member Function Documentation

Transformation2D IMP::algebra::Transformation2D::get_inverse ( ) const

Returns the inverse transformation.

const Rotation2D IMP::algebra::Transformation2D::get_rotation ( ) const

Returns the rotation.

Definition at line 91 of file Transformation2D.h.

Vector2D IMP::algebra::Transformation2D::get_transformed ( const Vector2D o) const

Perform the transformation on an 2D vector.

Parameters
[in]ovector where the transformation is applied
Note
: The transformation is done firstly applying the rotation and then the translation

Definition at line 51 of file Transformation2D.h.

const Vector2D IMP::algebra::Transformation2D::get_translation ( ) const

Returns the translation.

Definition at line 96 of file Transformation2D.h.

Vector2D IMP::algebra::Transformation2D::operator* ( const Vector2D v) const

Perform the transformation on an 2D vector.

Note
: The transformation is done firstly applying the rotation and then the translation

Definition at line 60 of file Transformation2D.h.

Transformation2D IMP::algebra::Transformation2D::operator* ( const Transformation2D tr) const

compose two transformations

\ note The transformations are composed such that for any vector v (rt1*rt2)*v = rt1*(rt2*v)

Definition at line 67 of file Transformation2D.h.

+ Here is the call graph for this function:

const Transformation2D& IMP::algebra::Transformation2D::operator*= ( const Transformation2D o)

See help for operator*.

Definition at line 72 of file Transformation2D.h.

+ Here is the call graph for this function:

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 79 of file Transformation2D.h.

+ Here is the call graph for this function:

const Transformation2D& IMP::algebra::Transformation2D::operator/= ( const Transformation2D o)

See help for operator/.

Definition at line 85 of file Transformation2D.h.

void IMP::algebra::Transformation2D::set_translation ( const Vector2D v)

Sets the translation.

Definition at line 99 of file Transformation2D.h.


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