Jpp
software
JGeometry3D
JRotator3D.hh
Go to the documentation of this file.
1
#ifndef __JROTATOR3D__
2
#define __JROTATOR3D__
3
4
#include <vector>
5
6
#include "
JGeometry3D/JMatrix3D.hh
"
7
#include "
JGeometry3D/JOmega3D.hh
"
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
* Type definition of rotation set.
22
*/
23
typedef
std::vector<JRotation3D>
JRotator3D_t
;
24
25
26
/**
27
* Rotation set.
28
*/
29
class
JRotator3D
:
30
public
JRotator3D_t
31
{
32
public
:
33
/**
34
* Default constructor.
35
*/
36
JRotator3D
() :
37
JRotator3D_t
()
38
{}
39
40
41
/**
42
* Constructor.
43
*
44
* Any sequence of <= n rotations is equivalent to a single rotation corresponding
45
* to the nth input direction (i.e. X.rotate(JRotation3D(omega[n])))
46
* A final rotation is added to restore the original coordinate system.
47
*
48
* \param omega direction set
49
*/
50
JRotator3D
(
const
JOmega3D_t
& omega) :
51
JRotator3D_t
()
52
{
53
if
(!omega.empty()) {
54
55
JOmega3D_t::const_iterator dir = omega.begin();
56
57
JRotation3D
R(*dir);
58
59
push_back(R);
60
61
while
(++dir != omega.end()) {
62
63
JRotation3D
r
(*dir);
64
65
push_back(
r
.mul(R.
transpose
()));
66
67
R =
JRotation3D
(*dir);
68
}
69
70
push_back(R.
transpose
());
71
}
72
}
73
};
74
}
75
76
#endif
JGEOMETRY3D::JRotator3D
Rotation set.
Definition:
JRotator3D.hh:29
JGEOMETRY3D::JRotator3D::JRotator3D
JRotator3D()
Default constructor.
Definition:
JRotator3D.hh:36
std::vector
Definition:
JSTDTypes.hh:12
JPP
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Definition:
JAAnetToolkit.hh:37
JGEOMETRY3D::JRotation3D::transpose
JRotation3D & transpose()
Transpose.
Definition:
JRotation3D.hh:305
JGEOMETRY3D::JRotator3D_t
std::vector< JRotation3D > JRotator3D_t
Type definition of rotation set.
Definition:
JRotator3D.hh:23
JGEOMETRY3D::JOmega3D_t
Base class for direction set.
Definition:
JOmega3D.hh:30
JMatrix3D.hh
JGEOMETRY3D
Auxiliary classes and methods for 3D geometrical objects and operations.
Definition:
JAngle3D.hh:18
JGEOMETRY3D::JRotator3D::JRotator3D
JRotator3D(const JOmega3D_t &omega)
Constructor.
Definition:
JRotator3D.hh:50
JTOOLS::r
data_type r[M+1]
Definition:
JPolint.hh:709
JGEOMETRY3D::JRotation3D
Rotation matrix.
Definition:
JRotation3D.hh:111
JOmega3D.hh
Generated by
1.8.16