Geant4.10
|
#include <Transform3D.h>
Data Structures | |
class | Transform3D_row |
Public Member Functions | |
Transform3D () | |
Transform3D (const CLHEP::HepRotation &m, 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 &m) | |
~Transform3D () | |
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 |
Transform3D & | operator= (const Transform3D &m) |
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 = Transform3D () |
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 171 of file Transform3D.h.
|
inlineprotected |
Definition at line 178 of file Transform3D.h.
|
inline |
Default constructor - sets the Identity transformation.
Definition at line 211 of file Transform3D.h.
Referenced by inverse(), and operator*().
|
inline |
Constructor: rotation and then translation.
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).
Definition at line 63 of file Transform3D.cc.
References HepGeom::BasicVector3D< T >::cross(), setIdentity(), setTransform(), HepGeom::BasicVector3D< T >::x(), HepGeom::BasicVector3D< T >::y(), and HepGeom::BasicVector3D< T >::z().
|
inline |
|
inline |
Destructor. Virtual for now as some persistency mechanism needs that, in future releases this might go away again.
Definition at line 241 of file Transform3D.h.
|
inline |
Gets dx-element of the transformation matrix.
Definition at line 279 of file Transform3D.h.
References dx_.
Referenced by G4PhysicalVolumeModel::DescribeAndDescend(), dor94di(), dor94fs(), dor94fv(), dor94ho(), dor94lo(), fluini(), hijcsc(), lmprin(), lzp(), HepGeom::operator*(), plot(), pygamm(), pygrvd(), pygrvl(), pygrvm(), pygrvs(), pygrvv(), pymsin(), pyqqbh(), qgaus(), quench(), rtsafe(), HepGeom::Point3D< float >::transform(), HepGeom::Point3D< double >::transform(), vahmsd(), and vegas().
|
inline |
Gets dy-element of the transformation matrix.
Definition at line 282 of file Transform3D.h.
References dy_.
Referenced by G4PhysicalVolumeModel::DescribeAndDescend(), diadif(), dispt(), distcm(), distr(), distrc(), hatest(), hijcsc(), HepGeom::operator*(), plot(), pymsin(), pyplot(), quench(), HepGeom::Point3D< float >::transform(), and HepGeom::Point3D< double >::transform().
|
inline |
Gets dz-element of the transformation matrix.
Definition at line 285 of file Transform3D.h.
References dz_.
Referenced by btocho2(), G4PhysicalVolumeModel::DescribeAndDescend(), hijcsc(), lzp(), HepGeom::operator*(), HepGeom::Point3D< float >::transform(), and HepGeom::Point3D< double >::transform().
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. |
Definition at line 174 of file Transform3D.cc.
Referenced by G4AssemblyVolume::AddPlacedAssembly(), G4AssemblyVolume::AddPlacedVolume(), G4PhysicalVolumeModel::DescribeAndDescend(), G4GDMLWriteStructure::PhysvolWrite(), and G4ReflectionFactory::Place().
|
inline |
Extracts the rotation matrix. This functions is obsolete - use getDecomposition() instead.
Referenced by G4AssemblyVolume::AddPlacedAssembly(), G4AssemblyVolume::AddPlacedVolume(), G4GMocrenFileSceneHandler::AddPrimitive(), G4GMocrenFileSceneHandler::AddSolid(), G4GMocrenFileSceneHandler::EndSavingGdd(), G4DisplacedSolid::G4DisplacedSolid(), G4PVPlacement::G4PVPlacement(), operator<<(), G4GDMLWriteStructure::PhysvolWrite(), G4VisCommandSceneAddLogo::SetNewValue(), and G4VisCommandSceneAddScale::SetNewValue().
|
inline |
Extracts the translation vector. This functions is obsolete - use getDecomposition() instead.
Referenced by G4AssemblyVolume::AddPlacedAssembly(), G4AssemblyVolume::AddPlacedVolume(), G4GMocrenFileSceneHandler::AddPrimitive(), G4GMocrenFileSceneHandler::AddSolid(), G4GMocrenFileSceneHandler::EndSavingGdd(), G4DisplacedSolid::G4DisplacedSolid(), G4ReflectedSolid::G4ReflectedSolid(), operator<<(), G4GDMLWriteStructure::PhysvolWrite(), G4VisCommandSceneAddLogo::SetNewValue(), and G4VisCommandSceneAddScale::SetNewValue().
Transform3D HepGeom::Transform3D::inverse | ( | ) | const |
Returns the inverse transformation.
Definition at line 142 of file Transform3D.cc.
References dx_, dy_, dz_, Transform3D(), xx_, xy_, xz_, yx_, yy_, yz_, zx_, zy_, and zz_.
Referenced by G4PhysicalVolumeModel::CalculateExtent(), G4PhysicalVolumeModel::DescribeAndDescend(), G4PhysicalVolumeModel::DescribeSolid(), G4ScoringCylinder::Draw(), G4ScoringBox::Draw(), G4ScoringCylinder::DrawColumn(), G4ScoringBox::DrawColumn(), G3toG4BuildPVTree(), G3toG4MANY(), G4ReflectedSolid::G4ReflectedSolid(), GetTransform3D(), G4ReflectionFactory::Place(), SubstractSolids(), and G4GDMLWriteStructure::TraverseVolumeTree().
bool HepGeom::Transform3D::isNear | ( | const Transform3D & | t, |
double | tolerance = 2.2E-14 |
||
) | const |
|
inline |
Test for inequality.
Definition at line 353 of file Transform3D.h.
References operator==().
Transform3D HepGeom::Transform3D::operator* | ( | const Transform3D & | b | ) | const |
|
inline |
bool HepGeom::Transform3D::operator== | ( | const Transform3D & | transform | ) | const |
|
inline |
Returns object of the helper class for C-style subscripting r[i][j]
|
inline |
|
inlineprotected |
Definition at line 186 of file Transform3D.h.
References dx_, dy_, dz_, xx_, xy_, xz_, yx_, yy_, yz_, zx_, zy_, and zz_.
Referenced by HepGeom::Reflect3D::Reflect3D(), HepGeom::Rotate3D::Rotate3D(), HepGeom::RotateX3D::RotateX3D(), HepGeom::RotateY3D::RotateY3D(), HepGeom::RotateZ3D::RotateZ3D(), and Transform3D().
|
inline |
Gets xx-element of the transformation matrix.
Definition at line 252 of file Transform3D.h.
References xx_.
Referenced by betrej(), dcosi(), dsfecf(), dthrep(), hadjet(), hifun(), hirnd(), hirnd2(), jetta(), linit(), lprwts(), lqcdpr(), luradk(), lweits(), mashel(), HepGeom::operator*(), phint(), phocor(), plot(), pypdel(), pypdfu(), pyradk(), pystfu(), rndmte(), structm(), HepGeom::Vector3D< float >::transform(), HepGeom::Normal3D< float >::transform(), HepGeom::Point3D< float >::transform(), HepGeom::Normal3D< double >::transform(), HepGeom::Vector3D< double >::transform(), and HepGeom::Point3D< double >::transform().
|
inline |
Gets xy-element of the transformation matrix.
Definition at line 255 of file Transform3D.h.
References xy_.
Referenced by dcosi(), diagr(), dsfecf(), HepGeom::operator*(), profb(), HepGeom::Normal3D< float >::transform(), HepGeom::Vector3D< float >::transform(), HepGeom::Point3D< float >::transform(), HepGeom::Normal3D< double >::transform(), HepGeom::Vector3D< double >::transform(), and HepGeom::Point3D< double >::transform().
|
inline |
Gets xz-element of the transformation matrix.
Definition at line 258 of file Transform3D.h.
References xz_.
Referenced by HepGeom::operator*(), HepGeom::Normal3D< float >::transform(), HepGeom::Vector3D< float >::transform(), HepGeom::Point3D< float >::transform(), HepGeom::Vector3D< double >::transform(), HepGeom::Normal3D< double >::transform(), and HepGeom::Point3D< double >::transform().
|
inline |
Gets yx-element of the transformation matrix.
Definition at line 261 of file Transform3D.h.
References yx_.
Referenced by HepGeom::operator*(), HepGeom::Normal3D< float >::transform(), HepGeom::Vector3D< float >::transform(), HepGeom::Point3D< float >::transform(), HepGeom::Vector3D< double >::transform(), HepGeom::Normal3D< double >::transform(), and HepGeom::Point3D< double >::transform().
|
inline |
Gets yy-element of the transformation matrix.
Definition at line 264 of file Transform3D.h.
References yy_.
Referenced by betrej(), dcosi(), distcm(), dsfecf(), hadjet(), lmpint(), mashel(), HepGeom::operator*(), phocor(), plot(), HepGeom::Normal3D< float >::transform(), HepGeom::Vector3D< float >::transform(), HepGeom::Point3D< float >::transform(), HepGeom::Normal3D< double >::transform(), HepGeom::Vector3D< double >::transform(), and HepGeom::Point3D< double >::transform().
|
inline |
Gets yz-element of the transformation matrix.
Definition at line 267 of file Transform3D.h.
References yz_.
Referenced by dxlamb(), HepGeom::operator*(), HepGeom::Vector3D< float >::transform(), HepGeom::Normal3D< float >::transform(), HepGeom::Point3D< float >::transform(), HepGeom::Normal3D< double >::transform(), HepGeom::Vector3D< double >::transform(), HepGeom::Point3D< double >::transform(), and ylamb().
|
inline |
Gets zx-element of the transformation matrix.
Definition at line 270 of file Transform3D.h.
References zx_.
Referenced by lux3jt(), HepGeom::operator*(), pyx3jt(), HepGeom::Normal3D< float >::transform(), HepGeom::Vector3D< float >::transform(), HepGeom::Point3D< float >::transform(), HepGeom::Vector3D< double >::transform(), HepGeom::Normal3D< double >::transform(), and HepGeom::Point3D< double >::transform().
|
inline |
Gets zy-element of the transformation matrix.
Definition at line 273 of file Transform3D.h.
References zy_.
Referenced by lux3jt(), HepGeom::operator*(), pyx3jt(), HepGeom::Normal3D< float >::transform(), HepGeom::Vector3D< float >::transform(), HepGeom::Point3D< float >::transform(), HepGeom::Vector3D< double >::transform(), HepGeom::Normal3D< double >::transform(), and HepGeom::Point3D< double >::transform().
|
inline |
Gets zz-element of the transformation matrix.
Definition at line 276 of file Transform3D.h.
References zz_.
Referenced by hadjet(), hamaxi(), mashel(), HepGeom::operator*(), pyremn(), pyresd(), HepGeom::Normal3D< float >::transform(), HepGeom::Vector3D< float >::transform(), HepGeom::Point3D< float >::transform(), HepGeom::Normal3D< double >::transform(), HepGeom::Vector3D< double >::transform(), and HepGeom::Point3D< double >::transform().
|
protected |
Definition at line 173 of file Transform3D.h.
Referenced by dx(), inverse(), isNear(), operator()(), operator*(), operator=(), operator==(), setIdentity(), and setTransform().
|
protected |
Definition at line 173 of file Transform3D.h.
Referenced by dy(), inverse(), isNear(), operator()(), operator*(), operator=(), operator==(), setIdentity(), and setTransform().
|
protected |
Definition at line 173 of file Transform3D.h.
Referenced by dz(), inverse(), isNear(), operator()(), operator*(), operator=(), operator==(), setIdentity(), and setTransform().
|
static |
Global identity transformation.
Definition at line 197 of file Transform3D.h.
Referenced by G4GDMLWriteStructure::TraverseVolumeTree(), and G4GDMLWrite::Write().
|
protected |
Definition at line 173 of file Transform3D.h.
Referenced by inverse(), isNear(), operator()(), operator*(), operator=(), operator==(), setIdentity(), setTransform(), and xx().
|
protected |
Definition at line 173 of file Transform3D.h.
Referenced by inverse(), isNear(), operator()(), operator*(), operator=(), operator==(), setIdentity(), setTransform(), and xy().
|
protected |
Definition at line 173 of file Transform3D.h.
Referenced by inverse(), isNear(), operator()(), operator*(), operator=(), operator==(), setIdentity(), setTransform(), and xz().
|
protected |
Definition at line 173 of file Transform3D.h.
Referenced by inverse(), isNear(), operator()(), operator*(), operator=(), operator==(), setIdentity(), setTransform(), and yx().
|
protected |
Definition at line 173 of file Transform3D.h.
Referenced by inverse(), isNear(), operator()(), operator*(), operator=(), operator==(), setIdentity(), setTransform(), and yy().
|
protected |
Definition at line 173 of file Transform3D.h.
Referenced by inverse(), isNear(), operator()(), operator*(), operator=(), operator==(), setIdentity(), setTransform(), and yz().
|
protected |
Definition at line 173 of file Transform3D.h.
Referenced by inverse(), isNear(), operator()(), operator*(), operator=(), operator==(), setIdentity(), setTransform(), and zx().
|
protected |
Definition at line 173 of file Transform3D.h.
Referenced by inverse(), isNear(), operator()(), operator*(), operator=(), operator==(), setIdentity(), setTransform(), and zy().
|
protected |
Definition at line 173 of file Transform3D.h.
Referenced by inverse(), isNear(), operator()(), operator*(), operator=(), operator==(), setIdentity(), setTransform(), and zz().