HepTransform3D Class Reference
[Geometry]

Class for transformation of 3D objects from the Geometry module. More...

#include <Transform3D.h>

Inheritance diagram for HepTransform3D:

HepReflect3D HepRotate3D HepScale3D HepTranslate3D HepReflectX3D HepReflectY3D HepReflectZ3D HepRotateX3D HepRotateY3D HepRotateZ3D HepScaleX3D HepScaleY3D HepScaleZ3D HepTranslateX3D HepTranslateY3D HepTranslateZ3D List of all members.

Public Methods

 HepTransform3D ()
 Default constructor - sets the Identity transformation.

 HepTransform3D (const HepRotation &m, const Hep3Vector &v)
 Constructor: rotation and then translation.

 HepTransform3D (const HepPoint3D &fr0, const HepPoint3D &fr1, const HepPoint3D &fr2, const HepPoint3D &to0, const HepPoint3D &to1, const HepPoint3D &to2)
 Constructor: transformation of basis (assumed - no reflection).

 HepTransform3D (const HepTransform3D &m)
 Copy constructor.

const HepTransform3D_row operator[] (int) const
 Returns object of the helper class for C-style subscripting r[i][j].

double operator() (int, int) const
 Fortran-style subscripting: returns (i,j) element of the matrix.

HepTransform3D & operator= (const HepTransform3D &m)
 Assignment.

void setIdentity ()
 Sets the Identity transformation.

HepTransform3D inverse () const
 Inverses the transformation.

HepTransform3D operator * (const HepTransform3D &b) const
 Transformation by another HepTransform3D.

HepPoint3D operator * (const HepPoint3D &p) const
 Transforms the HepPoint3D.

HepVector3D operator * (const HepVector3D &v) const
 Transforms the HepVector3D.

HepNormal3D operator * (const HepNormal3D &n) const
 Transforms the HepNormal3D.

void getDecomposition (HepScale3D &scale, HepRotate3D &rotation, HepTranslate3D &translation) const
 Decomposition of general transformation. More...

HepRotation getRotation () const
 Extracts the rotation matrix. More...

Hep3Vector getTranslation () const
 Extracts the translation vector. More...

bool operator== (const HepTransform3D &transform) const
 Test for equality.

bool operator!= (const HepTransform3D &transform) const
 Test for inequality.


Static Public Attributes

const HepTransform3D Identity
 Global identity transformation.


Detailed Description

Class for transformation of 3D objects from the Geometry module.

It allows different translations, rotations, scalings and reflections. Several specialized classes are derived from it:

HepTranslateX3D, HepTranslateY3D, HepTranslateZ3D, HepTranslate3D,
HepRotateX3D, HepRotateY3D, HepRotateZ3D, HepRotate3D,
HepScaleX3D, HepScaleY3D, HepScaleZ3D, HepScale3D,
HepReflectX3D, HepReflectY3D, HepReflectZ3D, HepReflect3D.

The idea behind these classes is to provide some additional constructors for HepTransform3D, they should not be used as separate classes.

Example:

   HepTransform3D m;
   m = HepTranslateX3D(10.*cm);

Remark: For the reason that the operator* is left associative, the notation

   v2 = m3*(m2*(m1*v1));
is much more effective then the notation
   v2 = m3*m2*m1*v1;
In the first case three operations Transform*Vector are executed, in the second case two operations Transform*Transform and one Transform*Vector are perfomed. Transform*Transform is roughly 3 times slower than Transform*Vector.

Author:
<Evgueni.Tcherniaev@cern.ch>


Member Function Documentation

void HepTransform3D::getDecomposition HepScale3D   scale,
HepRotate3D   rotation,
HepTranslate3D   translation
const
 

Decomposition of general transformation.

This function gets decomposition of the transformation in three consequentive specific transformations: Scale, then Rotation, then Translation, i.e.

   Transformation = Translation * Rotation * Scale
Parameters:
scale  output: scaling transformation; if there was a reflection, then scale factor for z-component scale(2,2) will be negative.
rotation  output: rotation transformaion.
translation  output: translation transformaion.

HepRotation HepTransform3D::getRotation   const [inline]
 

Extracts the rotation matrix.

This functions is obsolete - use getDecomposition() instead.

Hep3Vector HepTransform3D::getTranslation   const [inline]
 

Extracts the translation vector.

This functions is obsolete - use getDecomposition() instead.


The documentation for this class was generated from the following file:
Class Library for High Energy Physics (version 1.8)