CLHEP 2.4.7.1
C++ Class Library for High Energy Physics
|
#include <CLHEP/Geometry/Transform3D.h>
Classes | |
class | Transform3D_row |
Public Member Functions | |
Transform3D () | |
Transform3D (const CLHEP::HepRotation &mt, const CLHEP::Hep3Vector &v) | |
Transform3D (const Point3D< double > &fr0, const Point3D< double > &fr1, const Point3D< double > &fr2, const Point3D< double > &to0, const Point3D< double > &to1, const Point3D< double > &to2) | |
Transform3D (const Transform3D &mt)=default | |
Transform3D (Transform3D &&mt)=default | |
~Transform3D ()=default | |
Transform3D & | operator= (const Transform3D &mt)=default |
Transform3D & | operator= (Transform3D &&mt)=default |
const Transform3D_row | operator[] (int) const |
double | operator() (int, int) const |
double | xx () const |
double | xy () const |
double | xz () const |
double | yx () const |
double | yy () const |
double | yz () const |
double | zx () const |
double | zy () const |
double | zz () const |
double | dx () const |
double | dy () const |
double | dz () const |
void | setIdentity () |
Transform3D | inverse () const |
Transform3D | operator* (const Transform3D &b) const |
void | getDecomposition (Scale3D &scale, Rotate3D &rotation, Translate3D &translation) const |
bool | isNear (const Transform3D &t, double tolerance=2.2E-14) const |
CLHEP::HepRotation | getRotation () const |
CLHEP::Hep3Vector | getTranslation () const |
bool | operator== (const Transform3D &transform) const |
bool | operator!= (const Transform3D &transform) const |
Static Public Attributes | |
static const Transform3D | Identity |
Protected Member Functions | |
Transform3D (double XX, double XY, double XZ, double DX, double YX, double YY, double YZ, double DY, double ZX, double ZY, double ZZ, double DZ) | |
void | setTransform (double XX, double XY, double XZ, double DX, double YX, double YY, double YZ, double DY, double ZX, double ZY, double ZZ, double DZ) |
Protected Attributes | |
double | xx_ |
double | xy_ |
double | xz_ |
double | dx_ |
double | yx_ |
double | yy_ |
double | yz_ |
double | dy_ |
double | zx_ |
double | zy_ |
double | zz_ |
double | dz_ |
Class for transformation of 3D geometrical objects. It allows different translations, rotations, scalings and reflections. Several specialized classes are derived from it:
TranslateX3D, TranslateY3D, TranslateZ3D, Translate3D,
RotateX3D, RotateY3D, RotateZ3D, Rotate3D,
ScaleX3D, ScaleY3D, ScaleZ3D, Scale3D,
ReflectX3D, ReflectY3D, ReflectZ3D, Reflect3D.
The idea behind these classes is to provide some additional constructors for Transform3D, they normally should not be used as separate classes.
Example:
Remark: For the reason that the operator* is left associative, the notation
is much more effective then the notation
In the first case three operations Transform3D*Vector3D are executed, in the second case two operations Transform3D*Transform3D and one Transform3D*Vector3D are performed. Transform3D*Transform3D is roughly three times slower than Transform3D*Vector3D.
Definition at line 172 of file Transform3D.h.
|
inlineprotected |
Definition at line 179 of file Transform3D.h.
|
inline |
Default constructor - sets the Identity transformation.
Definition at line 212 of file Transform3D.h.
|
inline |
Constructor: rotation and then translation.
Definition at line 30 of file Transform3D.icc.
References dx_, dy_, dz_, CLHEP::Hep3Vector::x(), CLHEP::HepRotation::xx(), xx_, CLHEP::HepRotation::xy(), xy_, CLHEP::HepRotation::xz(), xz_, CLHEP::Hep3Vector::y(), CLHEP::HepRotation::yx(), yx_, CLHEP::HepRotation::yy(), yy_, CLHEP::HepRotation::yz(), yz_, CLHEP::Hep3Vector::z(), CLHEP::HepRotation::zx(), zx_, CLHEP::HepRotation::zy(), zy_, CLHEP::HepRotation::zz(), and zz_.
HepGeom::Transform3D::Transform3D | ( | const Point3D< double > & | fr0, |
const Point3D< double > & | fr1, | ||
const Point3D< double > & | fr2, | ||
const Point3D< double > & | to0, | ||
const Point3D< double > & | to1, | ||
const Point3D< double > & | to2 ) |
Constructor: transformation of basis (assumed - no reflection).
|
default |
Copy constructor.
|
default |
Move constructor.
|
default |
Destructor.
|
inline |
Gets dx-element of the transformation matrix.
Definition at line 286 of file Transform3D.h.
References dx_.
|
inline |
Gets dy-element of the transformation matrix.
Definition at line 289 of file Transform3D.h.
References dy_.
|
inline |
Gets dz-element of the transformation matrix.
Definition at line 292 of file Transform3D.h.
References dz_.
void HepGeom::Transform3D::getDecomposition | ( | Scale3D & | scale, |
Rotate3D & | rotation, | ||
Translate3D & | translation ) const |
Decomposition of general transformation. This function gets decomposition of the transformation in three consequentive specific transformations: Scale3D, then Rotate3D, then Translate3, i.e.
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. |
|
inline |
Extracts the rotation matrix. This functions is obsolete - use getDecomposition() instead.
Definition at line 39 of file Transform3D.icc.
References CLHEP::HepRotation::rotateAxes(), xx_, xy_, xz_, yx_, yy_, yz_, zx_, zy_, and zz_.
|
inline |
Extracts the translation vector. This functions is obsolete - use getDecomposition() instead.
Definition at line 48 of file Transform3D.icc.
Transform3D HepGeom::Transform3D::inverse | ( | ) | const |
Returns the inverse transformation.
bool HepGeom::Transform3D::isNear | ( | const Transform3D & | t, |
double | tolerance = 2.2E-14 ) const |
Returns true if the difference between corresponding matrix elements is less than the tolerance.
|
inline |
double HepGeom::Transform3D::operator() | ( | int | , |
int | ) const |
Fortran-style subscripting: returns (i,j) element of the matrix.
Transform3D HepGeom::Transform3D::operator* | ( | const Transform3D & | b | ) | const |
Transformation by another Transform3D.
|
default |
Assignment.
|
default |
Move assignment.
bool HepGeom::Transform3D::operator== | ( | const Transform3D & | transform | ) | const |
Test for equality.
Referenced by operator!=().
|
inline |
Returns object of the helper class for C-style subscripting r[i][j]
Definition at line 25 of file Transform3D.icc.
|
inline |
|
inlineprotected |
Definition at line 187 of file Transform3D.h.
References dx_, dy_, dz_, xx_, xy_, xz_, yx_, yy_, yz_, zx_, zy_, and zz_.
Referenced by HepGeom::RotateX3D::RotateX3D(), HepGeom::RotateY3D::RotateY3D(), and HepGeom::RotateZ3D::RotateZ3D().
|
inline |
Gets xx-element of the transformation matrix.
Definition at line 259 of file Transform3D.h.
References xx_.
|
inline |
Gets xy-element of the transformation matrix.
Definition at line 262 of file Transform3D.h.
References xy_.
|
inline |
Gets xz-element of the transformation matrix.
Definition at line 265 of file Transform3D.h.
References xz_.
|
inline |
Gets yx-element of the transformation matrix.
Definition at line 268 of file Transform3D.h.
References yx_.
|
inline |
Gets yy-element of the transformation matrix.
Definition at line 271 of file Transform3D.h.
References yy_.
|
inline |
Gets yz-element of the transformation matrix.
Definition at line 274 of file Transform3D.h.
References yz_.
|
inline |
Gets zx-element of the transformation matrix.
Definition at line 277 of file Transform3D.h.
References zx_.
|
inline |
Gets zy-element of the transformation matrix.
Definition at line 280 of file Transform3D.h.
References zy_.
|
inline |
Gets zz-element of the transformation matrix.
Definition at line 283 of file Transform3D.h.
References zz_.
|
protected |
Definition at line 174 of file Transform3D.h.
Referenced by dx(), getTranslation(), HepGeom::Rotate3D::Rotate3D(), setIdentity(), setTransform(), and Transform3D().
|
protected |
Definition at line 175 of file Transform3D.h.
Referenced by dy(), getTranslation(), HepGeom::Rotate3D::Rotate3D(), setIdentity(), setTransform(), and Transform3D().
|
protected |
Definition at line 176 of file Transform3D.h.
Referenced by dz(), getTranslation(), HepGeom::Rotate3D::Rotate3D(), setIdentity(), setTransform(), and Transform3D().
|
static |
Global identity transformation.
Definition at line 198 of file Transform3D.h.
|
protected |
Definition at line 174 of file Transform3D.h.
Referenced by getRotation(), HepGeom::Rotate3D::Rotate3D(), setIdentity(), setTransform(), Transform3D(), and xx().
|
protected |
Definition at line 174 of file Transform3D.h.
Referenced by getRotation(), HepGeom::Rotate3D::Rotate3D(), setIdentity(), setTransform(), Transform3D(), and xy().
|
protected |
Definition at line 174 of file Transform3D.h.
Referenced by getRotation(), HepGeom::Rotate3D::Rotate3D(), setIdentity(), setTransform(), Transform3D(), and xz().
|
protected |
Definition at line 175 of file Transform3D.h.
Referenced by getRotation(), HepGeom::Rotate3D::Rotate3D(), setIdentity(), setTransform(), Transform3D(), and yx().
|
protected |
Definition at line 175 of file Transform3D.h.
Referenced by getRotation(), HepGeom::Rotate3D::Rotate3D(), setIdentity(), setTransform(), Transform3D(), and yy().
|
protected |
Definition at line 175 of file Transform3D.h.
Referenced by getRotation(), HepGeom::Rotate3D::Rotate3D(), setIdentity(), setTransform(), Transform3D(), and yz().
|
protected |
Definition at line 176 of file Transform3D.h.
Referenced by getRotation(), HepGeom::Rotate3D::Rotate3D(), setIdentity(), setTransform(), Transform3D(), and zx().
|
protected |
Definition at line 176 of file Transform3D.h.
Referenced by getRotation(), HepGeom::Rotate3D::Rotate3D(), setIdentity(), setTransform(), Transform3D(), and zy().
|
protected |
Definition at line 176 of file Transform3D.h.
Referenced by getRotation(), HepGeom::Rotate3D::Rotate3D(), setIdentity(), setTransform(), Transform3D(), and zz().