Jpp 19.3.0-rc.1
the software that should make you happy
Loading...
Searching...
No Matches
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
14namespace JGEOMETRY3D {}
15namespace JPP { using namespace JGEOMETRY3D; }
16
17namespace 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 */
42
43
44 /**
45 * Constructor.
46 *
47 * \param euler Euler angles
48 */
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
Data structure for Euler angles in three dimensions.
double getBeta() const
Get beta angle.
double getAlpha() const
Get alpha angle.
double getGamma() const
Get gamma angle.
JEulerMatrix3D()
Default constructor (= identity matrix).
JEulerMatrix3D(const JEulerAngle3D &euler)
Constructor.
Auxiliary classes and methods for 3D geometrical objects and operations.
Definition JAngle3D.hh:19
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).