Jpp
JEulerMatrix3D.hh
Go to the documentation of this file.
1 #ifndef __JEULERMATRIX3D__
2 #define __JEULERMATRIX3D__
3 
4 #include <cmath>
5 
8 
9 
10 /**
11  * \author mdejong
12  */
13 
14 namespace JGEOMETRY3D {}
15 namespace JPP { using namespace JGEOMETRY3D; }
16 
17 namespace JGEOMETRY3D {
18 
19 
20  /**
21  * Euler matrix
22  *
23  * The Euler matrix is a genuine 3D rotation matrix, i.e.
24  * the inverse of an Euler matrix is equal to its tranpose.
25  *
26  * The Euler angles are defined as follows:
27  *
28  * -# alpha 2D rotation around Z -axis;
29  * -# beta 2D rotation around X' -axis;
30  * -# gamma 2D rotation around Z''-axis;
31  */
33  public JRotation3D
34  {
35  public:
36  /**
37  * Default constructor (= identity matrix).
38  */
40  JRotation3D()
41  {}
42 
43 
44  /**
45  * Constructor.
46  *
47  * \param euler Euler angles
48  */
49  JEulerMatrix3D(const JEulerAngle3D& euler) :
50  JRotation3D()
51  {
52  const double ca = cos(euler.getAlpha());
53  const double sa = sin(euler.getAlpha());
54  const double cb = cos(euler.getBeta());
55  const double sb = sin(euler.getBeta());
56  const double cg = cos(euler.getGamma());
57  const double sg = sin(euler.getGamma());
58 
59  a00 = cg*ca - sg*cb*sa; a01 = -cg*sa - sg*cb*ca; a02 = sg*sb;
60  a10 = sg*ca + cg*cb*sa; a11 = -sg*sa + cg*cb*ca; a12 = -cg*sb;
61  a20 = sb*sa; a21 = sb*ca; a22 = cb;
62  }
63  };
64 }
65 
66 #endif
JMATH::JMatrix3D::a01
double a01
Definition: JMath/JMatrix3D.hh:385
JMATH::JMatrix3D::a21
double a21
Definition: JMath/JMatrix3D.hh:387
JMATH::JMatrix3D::a20
double a20
Definition: JMath/JMatrix3D.hh:387
JGEOMETRY3D::JEulerAngle3D::getGamma
double getGamma() const
Get gamma angle.
Definition: JEulerAngle3D.hh:216
JEulerAngle3D.hh
JPP
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Definition: JAAnetToolkit.hh:37
JGEOMETRY3D::JEulerMatrix3D::JEulerMatrix3D
JEulerMatrix3D()
Default constructor (= identity matrix).
Definition: JEulerMatrix3D.hh:39
JGEOMETRY3D::JEulerAngle3D::getBeta
double getBeta() const
Get beta angle.
Definition: JEulerAngle3D.hh:205
JMATH::JMatrix3D::a00
double a00
Definition: JMath/JMatrix3D.hh:385
JMATH::JMatrix3D::a12
double a12
Definition: JMath/JMatrix3D.hh:386
JGEOMETRY3D::JEulerAngle3D::getAlpha
double getAlpha() const
Get alpha angle.
Definition: JEulerAngle3D.hh:194
JRotation3D.hh
JMATH::JMatrix3D::a22
double a22
Definition: JMath/JMatrix3D.hh:387
JGEOMETRY3D::JEulerMatrix3D::JEulerMatrix3D
JEulerMatrix3D(const JEulerAngle3D &euler)
Constructor.
Definition: JEulerMatrix3D.hh:49
JGEOMETRY3D
Auxiliary classes and methods for 3D geometrical objects and operations.
Definition: JAngle3D.hh:18
JMATH::JMatrix3D::a11
double a11
Definition: JMath/JMatrix3D.hh:386
JMATH::JMatrix3D::a02
double a02
Definition: JMath/JMatrix3D.hh:385
JMATH::JMatrix3D::a10
double a10
Definition: JMath/JMatrix3D.hh:386
JGEOMETRY3D::JEulerAngle3D
Data structure for Euler angles in three dimensions.
Definition: JEulerAngle3D.hh:34
JGEOMETRY3D::JRotation3D
Rotation matrix.
Definition: JRotation3D.hh:111
JGEOMETRY3D::JEulerMatrix3D
Euler matrix.
Definition: JEulerMatrix3D.hh:32