Transformations matrices for afine transformations. More...
#include <utl/TransformationMatrix.h>
Public Types | |
typedef boost::tuple< double, double, double > | Triple |
Public Member Functions | |
boost::tuple < TransformationMatrix, TransformationMatrix > | Decompose () const |
Decomposition into Translation and Rotation. More... | |
double | Distance (const TransformationMatrix &second) const |
Distance between transformations (useful for testing) More... | |
TransformationMatrix | Inverse () const |
Inverse transformation. More... | |
TransformationMatrix & | operator*= (const TransformationMatrix &second) |
Chaining of transformations. More... | |
TransformationMatrix () | |
Static Public Member Functions | |
static TransformationMatrix | Rotation (const double angle, const double x, const double y, const double z) |
Rotation by angle about axis given by three components. More... | |
static TransformationMatrix | Rotation (const double angle, const Triple &v) |
static TransformationMatrix | RotationX (const double angle) |
Rotation by angle about X axis. More... | |
static TransformationMatrix | RotationY (const double angle) |
Rotation by angle about Y axis. More... | |
static TransformationMatrix | RotationZ (const double angle) |
Rotation by angle about Z axis. More... | |
static TransformationMatrix | TransformToBasis (const double x1, const double y1, const double z1, const double x2, const double y2, const double z2, const double x3, const double y3, const double z3) |
From dreibein (basis vectors) More... | |
static TransformationMatrix | Translation (const double x, const double y, const double z) |
Translation. More... | |
Static Public Attributes | |
static const int | kDimension = 4 |
Dimension of transformation matrix. More... | |
Private Types | |
typedef HepGeom::Transform3D | InternalTransform |
Private Member Functions | |
TransformationMatrix (const InternalTransform &transform) | |
Private constructor to build transformation from HepGeom::Transform3D. More... | |
Private Attributes | |
InternalTransform | fTransform |
The concrete transformation object. More... | |
Friends | |
template<class Vector > | |
class | BasicVector |
class | io::CoordinateSystem_ROOT |
std::ostream & | operator<< (std::ostream &s, const TransformationMatrix &m) |
class | TransformationPolicy |
Transformations matrices for afine transformations.
This class provides the transformations between coordinate systems and the objects contained in them.
We restrict ourselves to the commonly used transformations:
The current implementation does not provide scaling transformations. Transformations to non-orthogonal bases will never be provided by this package.
Special, named constructors create special transformations like rotations or translations.
All transformation are relative, so they do not require a coordinate system to be valid.
Definition at line 55 of file TransformationMatrix.h.
|
private |
Definition at line 107 of file TransformationMatrix.h.
typedef boost::tuple<double, double, double> utl::TransformationMatrix::Triple |
Definition at line 58 of file TransformationMatrix.h.
|
inline |
Definition at line 63 of file TransformationMatrix.h.
Referenced by Decompose(), Inverse(), Rotation(), RotationX(), RotationY(), RotationZ(), TransformToBasis(), and Translation().
|
inlineprivate |
Private constructor to build transformation from HepGeom::Transform3D.
Definition at line 110 of file TransformationMatrix.h.
boost::tuple< TransformationMatrix, TransformationMatrix > TransformationMatrix::Decompose | ( | ) | const |
Decomposition into Translation and Rotation.
The original transformation is recovered as
Definition at line 71 of file TransformationMatrix.cc.
References fTransform, and TransformationMatrix().
double TransformationMatrix::Distance | ( | const TransformationMatrix & | second | ) | const |
Distance between transformations (useful for testing)
The distance functions is implemented using a simple metric on the space of matrices:
The actual implementation is delegated.
Definition at line 40 of file TransformationMatrix.cc.
References fTransform, and sqrt().
Referenced by utl::TransformationPolicy::Distance(), testTransformationMatrix::testDistance(), testTransformationMatrix::testDreibein(), testTransformationMatrix::testRotation(), testTransformationMatrix::testTransformation(), and testTransformationMatrix::testTranslation().
TransformationMatrix TransformationMatrix::Inverse | ( | ) | const |
Inverse transformation.
Definition at line 63 of file TransformationMatrix.cc.
References fTransform, and TransformationMatrix().
Referenced by utl::DerivedCSPolicy::FromTransformation(), utl::BaseCSPolicy::FromTransformation(), utl::CoordinateTransformer::GetTransformationTo(), and testTransformationMatrix::testRotation().
TransformationMatrix & TransformationMatrix::operator*= | ( | const TransformationMatrix & | second | ) |
Chaining of transformations.
Definition at line 23 of file TransformationMatrix.cc.
References fTransform.
|
static |
Rotation by angle about axis given by three components.
Create a TransformationMatrix representing a rotation
Definition at line 103 of file TransformationMatrix.cc.
References TransformationMatrix().
Referenced by utl::TransformerConstructor< Policy >::Rotation(), testTransformationMatrix::testRotation(), and testTransformationMatrix::testTransformation().
|
static |
Create a TransformationMatrix representing a rotation
Definition at line 114 of file TransformationMatrix.cc.
References TransformationMatrix().
|
static |
Rotation by angle about X axis.
Create a TransformationMatrix representing a rotation about the X axis
Definition at line 127 of file TransformationMatrix.cc.
References TransformationMatrix().
Referenced by utl::TransformerConstructor< Policy >::RotationX(), testTransformationMatrix::testDreibein(), and testTransformationMatrix::testRotation().
|
static |
Rotation by angle about Y axis.
Create a TransformationMatrix representing a rotation about the Y axis
Definition at line 137 of file TransformationMatrix.cc.
References TransformationMatrix().
Referenced by utl::TransformerConstructor< Policy >::RotationY(), testTransformationMatrix::testDreibein(), and testTransformationMatrix::testRotation().
|
static |
Rotation by angle about Z axis.
Create a TransformationMatrix representing a rotation about the Z axis
Definition at line 147 of file TransformationMatrix.cc.
References TransformationMatrix().
Referenced by utl::TransformerConstructor< Policy >::RotationZ(), PlotGOESNS::PlotGOES::Run(), testTransformationMatrix::testDreibein(), and testTransformationMatrix::testRotation().
|
static |
From dreibein (basis vectors)
Definition at line 154 of file TransformationMatrix.cc.
References TransformationMatrix().
Referenced by testTransformationMatrix::testDreibein(), and utl::ReferenceEllipsoid::TransformECEFToLocalSystem().
|
static |
Translation.
Create a TransformationMatrix representing a translation
Definition at line 93 of file TransformationMatrix.cc.
References TransformationMatrix().
Referenced by testTransformationMatrix::testTransformation(), testTransformationMatrix::testTranslation(), utl::ReferenceEllipsoid::TransformECEFToLocalSystem(), and utl::TransformerConstructor< Policy >::Translation().
|
friend |
Definition at line 121 of file TransformationMatrix.h.
|
friend |
Definition at line 124 of file TransformationMatrix.h.
|
friend |
|
friend |
Definition at line 122 of file TransformationMatrix.h.
|
private |
The concrete transformation object.
The concrete transformation object is owned by the TransformationMatrix class. This means that each constructor has to allocate one, and the destructor has to delete it.
Definition at line 119 of file TransformationMatrix.h.
Referenced by io::CoordinateSystem_ROOT::CoordinateSystem_ROOT(), Decompose(), Distance(), Inverse(), utl::TransformationPolicy::operator*(), operator*=(), and utl::operator<<().
|
static |
Dimension of transformation matrix.
Definition at line 61 of file TransformationMatrix.h.
Referenced by utl::operator<<().