OPALX (Object Oriented Parallel Accelerator Library for Exascal) MINIorX
OPALX
CoordinateSystemTrafo.cpp
Go to the documentation of this file.
2
4 : origin_m(0.0), orientation_m(1.0, 0.0, 0.0, 0.0), rotationMatrix_m(3, 3) {
5 rotationMatrix_m(0, 0) = 1.0;
6 rotationMatrix_m(0, 1) = 0.0;
7 rotationMatrix_m(0, 2) = 0.0;
8 rotationMatrix_m(1, 0) = 0.0;
9 rotationMatrix_m(1, 1) = 1.0;
10 rotationMatrix_m(1, 2) = 0.0;
11 rotationMatrix_m(2, 0) = 0.0;
12 rotationMatrix_m(2, 1) = 0.0;
13 rotationMatrix_m(2, 2) = 1.0;
14}
15
21
23 const ippl::Vector<double, 3>& origin, const Quaternion& orientation)
24 : origin_m(origin),
25 orientation_m(orientation),
27}
28
31 orientation_m = orientation_m.conjugate();
32 rotationMatrix_m = boost::numeric::ublas::trans(rotationMatrix_m);
33}
34
36 CoordinateSystemTrafo result(*this);
37
38 result *= right;
39 return result;
40}
41
void operator*=(const CoordinateSystemTrafo &right)
matrix_t getRotationMatrix() const
ippl::Vector< double, 3 > origin_m
CoordinateSystemTrafo operator*(const CoordinateSystemTrafo &right) const
Quaternion conjugate() const
ippl::Vector< double, 3 > rotate(const ippl::Vector< double, 3 > &) const