Jpp test-rotations-new
the software that should make you happy
Loading...
Searching...
No Matches
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
14namespace JGEOMETRY2D {}
15namespace JPP { using namespace JGEOMETRY2D; }
16
17namespace 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 */
38 {}
39
40
41 /**
42 * Constructor.
43 *
44 * \param omega direction set
45 */
46 JRotator2D(const JOmega2D_t& omega) :
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
JRotator2D(const JOmega2D_t &omega)
Constructor.
Definition JRotator2D.hh:46
JRotator2D()
Default constructor.
Definition JRotator2D.hh:36
Auxiliary classes and methods for 2D geometrical objects and operations.
Definition JAngle2D.hh:19
std::vector< JRotation2D > JRotator2D_t
Type definition of rotation set.
Definition JRotator2D.hh:23
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Base class for direction set.
Definition JOmega2D.hh:30