ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
HepGeom::Transform3D Class Reference

#include <geant4/tree/geant4-10.6-release/source/externals/clhep/include/CLHEP/Geometry/Transform3D.h>

+ Inheritance diagram for HepGeom::Transform3D:
+ Collaboration diagram for HepGeom::Transform3D:

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
 
Transform3Doperator= (const Transform3D &mt)=default
 
Transform3Doperator= (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 DLL_API 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_
 

Detailed Description

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

v2 = m3*(m2*(m1*v1));

is much more effective then the notation

v2 = m3*m2*m1*v1;

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.

Author
Evgue.nosp@m.ni.T.nosp@m.chern.nosp@m.iaev.nosp@m.@cern.nosp@m..ch

Definition at line 170 of file Transform3D.h.

View newest version in sPHENIX GitHub at line 170 of file Transform3D.h

Constructor & Destructor Documentation

HepGeom::Transform3D::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 
)
inlineprotected

Definition at line 177 of file Transform3D.h.

View newest version in sPHENIX GitHub at line 177 of file Transform3D.h

HepGeom::Transform3D::Transform3D ( )
inline

Default constructor - sets the Identity transformation.

Definition at line 210 of file Transform3D.h.

View newest version in sPHENIX GitHub at line 210 of file Transform3D.h

Referenced by inverse(), and operator*().

+ Here is the caller graph for this function:

HepGeom::Transform3D::Transform3D ( const CLHEP::HepRotation mt,
const CLHEP::Hep3Vector v 
)
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 62 of file Transform3D.cc.

View newest version in sPHENIX GitHub at line 62 of file Transform3D.cc

References kdfinder::abs(), HepGeom::BasicVector3D< T >::cross(), dz2, setIdentity(), setTransform(), HepGeom::BasicVector3D< T >::x(), x1, x2, HepGeom::BasicVector3D< T >::y(), y1, y2, HepGeom::BasicVector3D< T >::z(), z1, and z2.

+ Here is the call graph for this function:

HepGeom::Transform3D::Transform3D ( const Transform3D mt)
default

Copy constructor.

HepGeom::Transform3D::Transform3D ( Transform3D &&  mt)
default

Move constructor.

HepGeom::Transform3D::~Transform3D ( )
default

Destructor.

Member Function Documentation

double HepGeom::Transform3D::dx ( ) const
inline

Gets dx-element of the transformation matrix.

Definition at line 284 of file Transform3D.h.

View newest version in sPHENIX GitHub at line 284 of file Transform3D.h

References dx_.

Referenced by G4BoundingEnvelope::BoundingBoxVsVoxelLimits(), G4ReflectedSolid::BoundingLimits(), G4BoundingEnvelope::CalculateExtent(), G4PhysicalVolumeModel::DescribeAndDescend(), HepGeom::operator*(), operator<<(), HepGeom::Point3D< float >::transform(), and HepGeom::Point3D< double >::transform().

+ Here is the caller graph for this function:

double HepGeom::Transform3D::dy ( ) const
inline

Gets dy-element of the transformation matrix.

Definition at line 287 of file Transform3D.h.

View newest version in sPHENIX GitHub at line 287 of file Transform3D.h

References dy_.

Referenced by G4BoundingEnvelope::BoundingBoxVsVoxelLimits(), G4ReflectedSolid::BoundingLimits(), G4BoundingEnvelope::CalculateExtent(), G4PhysicalVolumeModel::DescribeAndDescend(), HepGeom::operator*(), operator<<(), HepGeom::Point3D< float >::transform(), and HepGeom::Point3D< double >::transform().

+ Here is the caller graph for this function:

double HepGeom::Transform3D::dz ( ) const
inline

Gets dz-element of the transformation matrix.

Definition at line 290 of file Transform3D.h.

View newest version in sPHENIX GitHub at line 290 of file Transform3D.h

References dz_.

Referenced by G4BoundingEnvelope::BoundingBoxVsVoxelLimits(), G4ReflectedSolid::BoundingLimits(), G4BoundingEnvelope::CalculateExtent(), G4PhysicalVolumeModel::DescribeAndDescend(), HepGeom::operator*(), operator<<(), HepGeom::Point3D< float >::transform(), and HepGeom::Point3D< double >::transform().

+ Here is the caller graph for this function:

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.

Transform3D = Translate3D * Rotate3D * Scale3D
Parameters
scaleoutput: scaling transformation; if there was a reflection, then scale factor for z-component (scale(2,2)) will be negative.
rotationoutput: rotation transformaion.
translationoutput: translation transformaion.

Definition at line 173 of file Transform3D.cc.

View newest version in sPHENIX GitHub at line 173 of file Transform3D.cc

References scale.

Referenced by G4AssemblyVolume::AddPlacedAssembly(), G4AssemblyVolume::AddPlacedVolume(), G4Voxelizer::BuildVoxelLimits(), G4PhysicalVolumeModel::DescribeAndDescend(), G4MultiUnion::GetGlobalVector(), G4MultiUnion::GetLocalVector(), G4GDMLWriteSolids::MultiUnionWrite(), operator<<(), PHG4GDMLWriteStructure::PhysvolWrite(), G4GDMLWriteStructure::PhysvolWrite(), G4ReflectionFactory::Place(), and G4GDMLWriteStructure::TraverseVolumeTree().

+ Here is the caller graph for this function:

Transform3D HepGeom::Transform3D::inverse ( ) const

Returns the inverse transformation.

Definition at line 141 of file Transform3D.cc.

View newest version in sPHENIX GitHub at line 141 of file Transform3D.cc

References dx_, dy_, dz_, Transform3D(), xx_, xy_, xz_, yx_, yy_, yz_, zx_, zy_, and zz_.

Referenced by PHG4Sector::PHG4SectorConstructor::Construct_Sectors(), G4PhysicalVolumeModel::DescribeAndDescend(), G4PhysicalVolumeModel::DescribeSolid(), G4ScoringCylinder::Draw(), G4ScoringBox::Draw(), G4ScoringCylinder::DrawColumn(), G4ScoringBox::DrawColumn(), G4GMocrenFileSceneHandler::ExtractDetector(), G3toG4BuildPVTree(), G3toG4MANY(), G4MultiUnion::GetLocalPoint(), G4MultiUnion::GetLocalVector(), G4ReflectedSolid::GetTransform3D(), GetTransform3D(), G4ReflectionFactory::Place(), G4ReflectionFactory::ReflectPVPlacement(), SubstractSolids(), PHG4GDMLWriteStructure::TraverseVolumeTree(), and G4GDMLWriteStructure::TraverseVolumeTree().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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.

Definition at line 203 of file Transform3D.cc.

View newest version in sPHENIX GitHub at line 203 of file Transform3D.cc

References kdfinder::abs(), dx_, dy_, dz_, xx_, xy_, xz_, yx_, yy_, yz_, zx_, zy_, and zz_.

+ Here is the call graph for this function:

bool HepGeom::Transform3D::operator!= ( const Transform3D transform) const
inline

Test for inequality.

Definition at line 349 of file Transform3D.h.

View newest version in sPHENIX GitHub at line 349 of file Transform3D.h

References operator==().

+ Here is the call graph for this function:

double HepGeom::Transform3D::operator() ( int  i,
int  j 
) const

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

Definition at line 23 of file Transform3D.cc.

View newest version in sPHENIX GitHub at line 23 of file Transform3D.cc

References dx_, dy_, dz_, xx_, xy_, xz_, yx_, yy_, yz_, zx_, zy_, and zz_.

Transform3D HepGeom::Transform3D::operator* ( const Transform3D b) const

Transformation by another Transform3D.

Definition at line 51 of file Transform3D.cc.

View newest version in sPHENIX GitHub at line 51 of file Transform3D.cc

References dx_, dy_, dz_, Transform3D(), xx_, xy_, xz_, yx_, yy_, yz_, zx_, zy_, and zz_.

+ Here is the call graph for this function:

Transform3D& HepGeom::Transform3D::operator= ( const Transform3D mt)
default

Assignment.

Transform3D& HepGeom::Transform3D::operator= ( Transform3D &&  mt)
default

Move assignment.

bool HepGeom::Transform3D::operator== ( const Transform3D transform) const

Test for equality.

Definition at line 220 of file Transform3D.cc.

View newest version in sPHENIX GitHub at line 220 of file Transform3D.cc

References dx_, dy_, dz_, xx_, xy_, xz_, yx_, yy_, yz_, zx_, zy_, and zz_.

Referenced by operator!=().

+ Here is the caller graph for this function:

const Transform3D_row HepGeom::Transform3D::operator[] ( int  ) const
inline

Returns object of the helper class for C-style subscripting r[i][j]

void HepGeom::Transform3D::setIdentity ( )
inline

Sets the Identity transformation.

Definition at line 294 of file Transform3D.h.

View newest version in sPHENIX GitHub at line 294 of file Transform3D.h

References dx_, dy_, dz_, xx_, xy_, xz_, yx_, yy_, yz_, zx_, zy_, and zz_.

Referenced by HepGeom::Reflect3D::Reflect3D(), and Transform3D().

+ Here is the caller graph for this function:

void HepGeom::Transform3D::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 
)
inlineprotected

Definition at line 185 of file Transform3D.h.

View newest version in sPHENIX GitHub at line 185 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().

+ Here is the caller graph for this function:

double HepGeom::Transform3D::xx ( ) const
inline
double HepGeom::Transform3D::xy ( ) const
inline

Gets xy-element of the transformation matrix.

Definition at line 260 of file Transform3D.h.

View newest version in sPHENIX GitHub at line 260 of file Transform3D.h

References xy_.

Referenced by G4BoundingEnvelope::CalculateExtent(), G4BoundingEnvelope::FindScaleFactor(), G4GDMLWriteSolids::MultiUnionWrite(), HepGeom::operator*(), operator<<(), pygaga(), pysigh(), HepGeom::Vector3D< float >::transform(), HepGeom::Normal3D< float >::transform(), HepGeom::Point3D< float >::transform(), HepGeom::Vector3D< double >::transform(), HepGeom::Normal3D< double >::transform(), and HepGeom::Point3D< double >::transform().

+ Here is the caller graph for this function:

double HepGeom::Transform3D::xz ( ) const
inline

Gets xz-element of the transformation matrix.

Definition at line 263 of file Transform3D.h.

View newest version in sPHENIX GitHub at line 263 of file Transform3D.h

References xz_.

Referenced by G4BoundingEnvelope::CalculateExtent(), G4BoundingEnvelope::FindScaleFactor(), G4GDMLWriteSolids::MultiUnionWrite(), HepGeom::operator*(), 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().

+ Here is the caller graph for this function:

double HepGeom::Transform3D::yx ( ) const
inline

Gets yx-element of the transformation matrix.

Definition at line 266 of file Transform3D.h.

View newest version in sPHENIX GitHub at line 266 of file Transform3D.h

References yx_.

Referenced by G4BoundingEnvelope::CalculateExtent(), G4BoundingEnvelope::FindScaleFactor(), G4GDMLWriteSolids::MultiUnionWrite(), HepGeom::operator*(), 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().

+ Here is the caller graph for this function:

double HepGeom::Transform3D::yy ( ) const
inline
double HepGeom::Transform3D::yz ( ) const
inline

Gets yz-element of the transformation matrix.

Definition at line 272 of file Transform3D.h.

View newest version in sPHENIX GitHub at line 272 of file Transform3D.h

References yz_.

Referenced by G4BoundingEnvelope::CalculateExtent(), G4BoundingEnvelope::FindScaleFactor(), G4GDMLWriteSolids::MultiUnionWrite(), HepGeom::operator*(), 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().

+ Here is the caller graph for this function:

double HepGeom::Transform3D::zx ( ) const
inline

Gets zx-element of the transformation matrix.

Definition at line 275 of file Transform3D.h.

View newest version in sPHENIX GitHub at line 275 of file Transform3D.h

References zx_.

Referenced by G4BoundingEnvelope::CalculateExtent(), G4BoundingEnvelope::FindScaleFactor(), lux3jt(), G4GDMLWriteSolids::MultiUnionWrite(), HepGeom::operator*(), operator<<(), pyx3jt(), 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().

+ Here is the caller graph for this function:

double HepGeom::Transform3D::zy ( ) const
inline

Gets zy-element of the transformation matrix.

Definition at line 278 of file Transform3D.h.

View newest version in sPHENIX GitHub at line 278 of file Transform3D.h

References zy_.

Referenced by G4BoundingEnvelope::CalculateExtent(), G4BoundingEnvelope::FindScaleFactor(), lux3jt(), G4GDMLWriteSolids::MultiUnionWrite(), HepGeom::operator*(), operator<<(), pyx3jt(), 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().

+ Here is the caller graph for this function:

double HepGeom::Transform3D::zz ( ) const
inline

Member Data Documentation

double HepGeom::Transform3D::dx_
protected

Definition at line 172 of file Transform3D.h.

View newest version in sPHENIX GitHub at line 172 of file Transform3D.h

Referenced by dx(), inverse(), isNear(), operator()(), operator*(), operator==(), setIdentity(), and setTransform().

double HepGeom::Transform3D::dy_
protected

Definition at line 172 of file Transform3D.h.

View newest version in sPHENIX GitHub at line 172 of file Transform3D.h

Referenced by dy(), inverse(), isNear(), operator()(), operator*(), operator==(), setIdentity(), and setTransform().

double HepGeom::Transform3D::dz_
protected

Definition at line 172 of file Transform3D.h.

View newest version in sPHENIX GitHub at line 172 of file Transform3D.h

Referenced by dz(), inverse(), isNear(), operator()(), operator*(), operator==(), setIdentity(), and setTransform().

double HepGeom::Transform3D::xx_
protected

Definition at line 172 of file Transform3D.h.

View newest version in sPHENIX GitHub at line 172 of file Transform3D.h

Referenced by inverse(), isNear(), operator()(), operator*(), operator==(), setIdentity(), setTransform(), and xx().

double HepGeom::Transform3D::xy_
protected

Definition at line 172 of file Transform3D.h.

View newest version in sPHENIX GitHub at line 172 of file Transform3D.h

Referenced by inverse(), isNear(), operator()(), operator*(), operator==(), setIdentity(), setTransform(), and xy().

double HepGeom::Transform3D::xz_
protected

Definition at line 172 of file Transform3D.h.

View newest version in sPHENIX GitHub at line 172 of file Transform3D.h

Referenced by inverse(), isNear(), operator()(), operator*(), operator==(), setIdentity(), setTransform(), and xz().

double HepGeom::Transform3D::yx_
protected

Definition at line 172 of file Transform3D.h.

View newest version in sPHENIX GitHub at line 172 of file Transform3D.h

Referenced by inverse(), isNear(), operator()(), operator*(), operator==(), setIdentity(), setTransform(), and yx().

double HepGeom::Transform3D::yy_
protected

Definition at line 172 of file Transform3D.h.

View newest version in sPHENIX GitHub at line 172 of file Transform3D.h

Referenced by inverse(), isNear(), operator()(), operator*(), operator==(), setIdentity(), setTransform(), and yy().

double HepGeom::Transform3D::yz_
protected

Definition at line 172 of file Transform3D.h.

View newest version in sPHENIX GitHub at line 172 of file Transform3D.h

Referenced by inverse(), isNear(), operator()(), operator*(), operator==(), setIdentity(), setTransform(), and yz().

double HepGeom::Transform3D::zx_
protected

Definition at line 172 of file Transform3D.h.

View newest version in sPHENIX GitHub at line 172 of file Transform3D.h

Referenced by inverse(), isNear(), operator()(), operator*(), operator==(), setIdentity(), setTransform(), and zx().

double HepGeom::Transform3D::zy_
protected

Definition at line 172 of file Transform3D.h.

View newest version in sPHENIX GitHub at line 172 of file Transform3D.h

Referenced by inverse(), isNear(), operator()(), operator*(), operator==(), setIdentity(), setTransform(), and zy().

double HepGeom::Transform3D::zz_
protected

Definition at line 172 of file Transform3D.h.

View newest version in sPHENIX GitHub at line 172 of file Transform3D.h

Referenced by inverse(), isNear(), operator()(), operator*(), operator==(), setIdentity(), setTransform(), and zz().


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