IMP  2.0.0
The Integrative Modeling Platform
IMP::algebra::Transformation3D Class Reference

Simple 3D transformation class. More...

#include <IMP/algebra/Transformation3D.h>

+ Inheritance diagram for IMP::algebra::Transformation3D:

Public Member Functions

 Transformation3D ()
 construct an invalid transformation
 
 Transformation3D (const Rotation3D &r, const Vector3D &t=Vector3D(0, 0, 0))
 
 Transformation3D (const Vector3D &t)
 
Transformation3D get_inverse () const
 
const Rotation3Dget_rotation () const
 
Vector3D get_transformed (const Vector3D &o) const
 transform
 
const Vector3Dget_translation () const
 
Vector3D operator* (const Vector3D &v) const
 apply transformation (rotate and then translate)
 
Transformation3D operator* (const Transformation3D &tr) const
 
const Transformation3Doperator*= (const Transformation3D &o)
 
Transformation3D operator/ (const Transformation3D &b) const
 
const Transformation3Doperator/= (const Transformation3D &o)
 
void show (std::ostream &out=std::cout) const
 

Related Functions

(Note that these are not member functions.)

Transformation3D compose (const Transformation3D &a, const Transformation3D &b)
 compose two transformations More...
 
Transformation3D get_identity_transformation_3d ()
 Return a transformation that does not do anything. More...
 
Transformation3D get_rotation_about_point (const Vector3D &point, const Rotation3D &rotation)
 Generate a Transformation3D object from a rotation around a point. More...
 
template<class Vector3DsOrXYZs0 , class Vector3DsOrXYZs1 >
IMP::algebra::Transformation3D get_transformation_aligning_first_to_second (const Vector3DsOrXYZs0 &source, const Vector3DsOrXYZs1 &target)
 Compute the rigid transform bringing the first point set to the second. More...
 

Detailed Description

The rotation is applied first, and then the point is translated.

See Also
IMP::core::Transform
Note
This class is a geometric primitive. Also, this class is not not initialized by its default constructor.

Definition at line 31 of file Transformation3D.h.

Constructor & Destructor Documentation

IMP::algebra::Transformation3D::Transformation3D ( const Rotation3D r,
const Vector3D t = Vector3D(0,0,0) 
)

basic constructor

Definition at line 37 of file Transformation3D.h.

IMP::algebra::Transformation3D::Transformation3D ( const Vector3D t)

Construct a transformation with an identity rotation.

Definition at line 41 of file Transformation3D.h.

Member Function Documentation

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

compose two rigid transformation such that for any vector v (rt1*rt2)*v = rt1*(rt2*v)

Definition at line 54 of file Transformation3D.h.

+ Here is the call graph for this function:

Transformation3D IMP::algebra::Transformation3D::operator/ ( const Transformation3D b) const

Compute the transformation which, when composed with b, gives *this. That is a(x)== d(b(x)) for all x.

For consistency, this should probably have a nice name, but I don't know what name to give it.

Definition at line 67 of file Transformation3D.h.

+ Here is the call graph for this function:

Friends And Related Function Documentation

Transformation3D compose ( const Transformation3D a,
const Transformation3D b 
)
related

For any vector v (a*b)*v = a*(b*v).

Definition at line 117 of file Transformation3D.h.

Transformation3D get_identity_transformation_3d ( )
related

Definition at line 96 of file Transformation3D.h.

Transformation3D get_rotation_about_point ( const Vector3D point,
const Rotation3D rotation 
)
related

Rotate about a point rather than the origin.

Parameters
[in]pointCenter to rotate about
[in]rotationThe rotation to perform

Definition at line 108 of file Transformation3D.h.

template<class Vector3DsOrXYZs0 , class Vector3DsOrXYZs1 >
IMP::algebra::Transformation3D get_transformation_aligning_first_to_second ( const Vector3DsOrXYZs0 &  source,
const Vector3DsOrXYZs1 &  target 
)
related

The points are assumed to be corresponding (that is, from[0] is aligned to to[0] etc.). The alignment computed is that which minimized the sum of squared distances between corresponding points. Return the

\[ \textit{argmin}_T \sum \left|T\left(f\left[i\right]\right)-t[i]\right|^2 \]

If the point sets lie in a 1 or 2 dimensional subspace, the alignment algorithm is unstable and not guaranteed to work. A warning is printed in this case.

See Also
Vector3D

Definition at line 46 of file geometric_alignment.h.


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