Geant4  10.01.p02
UTransform3D.hh
Go to the documentation of this file.
1 //
2 // ********************************************************************
3 // * This Software is part of the AIDA Unified Solids Library package *
4 // * See: https://aidasoft.web.cern.ch/USolids *
5 // ********************************************************************
6 //
7 // $Id:$
8 //
9 // --------------------------------------------------------------------
10 //
11 // UTransform3D
12 //
13 // Class description:
14 //
15 // UTransform3D: General transformation made by rotation + translation
16 //
17 // 19.10.12 Marek Gayer
18 // Created from original implementation in CLHEP
19 // --------------------------------------------------------------------
20 
21 #ifndef USOLIDS_UTransform3D
22 #define USOLIDS_UTransform3D
23 
24 #include "UVector3.hh"
25 
27 {
28  public:
29 
30  UTransform3D(); // Initialize to identity
31  UTransform3D(double tx, double ty, double tz,
32  double phi = 0., double theta = 0., double psi = 0.);
33  UTransform3D(const UTransform3D& other);
35 
36  void RotateX(double angle);
37  void RotateY(double angle);
38  void RotateZ(double angle);
39  void SetAngles(double phi, double theta, double psi);
40 
41  // Local<->global coordinate and vector conversions
42  UVector3 GlobalPoint(const UVector3& local) const;
43  UVector3 GlobalVector(const UVector3& local) const;
44  UVector3 LocalPoint(const UVector3& global) const;
45  UVector3 LocalVector(const UVector3& global) const;
46 
47  // Operators
48  UTransform3D& operator = (const UTransform3D& other);
49  UTransform3D& operator *= (const UTransform3D& other);
50  UTransform3D& operator *= (const UVector3& vect);
51 
52  UVector3 fTr; // Translation
53  double fRot[9]; // Rotation
54 };
55 // Vector-matrix multiplication
56 UVector3 operator * (const UVector3& p, const UTransform3D& trans);
57 
58 #endif
UVector3 LocalPoint(const UVector3 &global) const
void RotateX(double angle)
#define local
Definition: adler32.cc:10
UVector3 LocalVector(const UVector3 &global) const
UVector3 GlobalVector(const UVector3 &local) const
void SetAngles(double phi, double theta, double psi)
Definition: UTransform3D.cc:72
UVector3 fTr
Definition: UTransform3D.hh:52
UVector3 GlobalPoint(const UVector3 &local) const
UTransform3D & operator*=(const UTransform3D &other)
void RotateZ(double angle)
double fRot[9]
Definition: UTransform3D.hh:53
void RotateY(double angle)
UVector3 operator*(const UVector3 &p, const UTransform3D &trans)
UTransform3D & operator=(const UTransform3D &other)
Definition: UTransform3D.cc:63