Jpp  18.1.0
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
JRotator2D.hh
Go to the documentation of this file.
1 #ifndef __JROTATOR2D__
2 #define __JROTATOR2D__
3 
4 #include <vector>
5 
8 
9 
10 /**
11  * \author mdejong
12  */
13 
14 namespace JGEOMETRY2D {}
15 namespace JPP { using namespace JGEOMETRY2D; }
16 
17 namespace JGEOMETRY2D {
18 
19 
20  /**
21  * Type definition of rotation set.
22  */
24 
25 
26  /**
27  * Rotation set.
28  */
29  class JRotator2D :
30  public JRotator2D_t
31  {
32  public:
33  /**
34  * Default constructor.
35  */
37  JRotator2D_t()
38  {}
39 
40 
41  /**
42  * Constructor.
43  *
44  * \param omega direction set
45  */
46  JRotator2D(const JOmega2D_t& omega) :
47  JRotator2D_t()
48  {
49  if (!omega.empty()) {
50 
51  JRotation2D R(*omega.begin());
52 
53  push_back(R);
54 
55  for (JOmega2D_t::const_iterator i = omega.begin(); ++i != omega.end(); ) {
56 
57  JRotation2D r(*i);
58 
59  push_back(r.mul(R.transpose()));
60 
61  R = JRotation2D(*i);
62  }
63 
64  push_back(R.transpose());
65  }
66  }
67  };
68 }
69 
70 #endif
Rotation matrix.
Definition: JRotation2D.hh:23
data_type r[M+1]
Definition: JPolint.hh:779
Rotation set.
Definition: JRotator2D.hh:29
JRotator2D()
Default constructor.
Definition: JRotator2D.hh:36
then JCookie sh JDataQuality D $DETECTOR_ID R
Definition: JDataQuality.sh:41
Base class for direction set.
Definition: JOmega2D.hh:28
JRotation2D & mul(const JRotation2D &A)
Matrix multiplication.
Definition: JRotation2D.hh:82
JRotator2D(const JOmega2D_t &omega)
Constructor.
Definition: JRotator2D.hh:46
std::vector< JRotation2D > JRotator2D_t
Type definition of rotation set.
Definition: JRotator2D.hh:23