4 : origin_m(0.0), orientation_m(1.0, 0.0, 0.0, 0.0), rotationMatrix_m() {
19 : origin_m(right.origin_m),
20 orientation_m(right.orientation_m),
21 rotationMatrix_m(right.rotationMatrix_m) {}
24 const ippl::Vector<double, 3>& origin,
const Quaternion& orientation)
26 orientation_m(orientation),
27 rotationMatrix_m(orientation_m.getRotationMatrix()) {}
KOKKOS_INLINE_FUNCTION matrix_t< Cols, Rows > get_transpose(const matrix_t< Rows, Cols > &rotation)
Rigid spatial transform between a parent frame and a local frame.
matrix3x3_t rotationMatrix_m
Cached rotation matrix for the same parent-to-local mapping.
CoordinateSystemTrafo()
Construct the identity transform.
void operator*=(const CoordinateSystemTrafo &right)
ippl::Vector< double, 3 > origin_m
Local origin expressed in the parent frame.
CoordinateSystemTrafo operator*(const CoordinateSystemTrafo &right) const
Compose two transforms.
Quaternion orientation_m
Quaternion whose rotation maps parent-frame vectors into local-frame vectors.
void invert()
Invert the transform in place.
Quaternion storage and rotation algebra used by OPALX geometry code.
Quaternion & normalize()
Normalize the quaternion in place.
Quaternion conjugate() const
Return the quaternion conjugate .
matrix3x3_t getRotationMatrix() const
Convert the quaternion to a 3x3 rotation matrix.
ippl::Vector< double, 3 > rotate(const ippl::Vector< double, 3 > &) const
Rotate a spatial vector by a unit quaternion.