Geant4  10.00.p01
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  UVector3 fTr; // Translation
30  double fRot[9]; // Rotation
31 
32 
33  UTransform3D(); // Initialize to identity
34  UTransform3D(double tx, double ty, double tz,
35  double phi = 0., double theta = 0., double psi = 0.);
36  UTransform3D(const UTransform3D& other);
38 
39  virtual void RotateX(double angle);
40  virtual void RotateY(double angle);
41  virtual void RotateZ(double angle);
42  void SetAngles(double phi, double theta, double psi);
43 
44  // Local<->global coordinate and vector conversions
45  UVector3 GlobalPoint(const UVector3& local) const;
46  UVector3 GlobalVector(const UVector3& local) const;
47  UVector3 LocalPoint(const UVector3& global) const;
48  UVector3 LocalVector(const UVector3& global) const;
49 
50 
51  // Operators
52  UTransform3D& operator = (const UTransform3D& other);
53  UTransform3D& operator *= (const UTransform3D& other);
54  UTransform3D& operator *= (const UVector3& vect);
55 };
56 // Vector-matrix multiplication
57 UVector3 operator * (const UVector3& p, const UTransform3D& trans);
58 
59 #endif
UVector3 LocalPoint(const UVector3 &global) const
virtual 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:29
UVector3 GlobalPoint(const UVector3 &local) const
UTransform3D & operator*=(const UTransform3D &other)
virtual void RotateZ(double angle)
double fRot[9]
Definition: UTransform3D.hh:30
virtual void RotateY(double angle)
UVector3 operator*(const UVector3 &p, const UTransform3D &trans)
UTransform3D & operator=(const UTransform3D &other)
Definition: UTransform3D.cc:63