CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes
mathSSE::Rot3< T > Struct Template Reference

#include <SSERot.h>

Public Member Functions

 Rot3 ()
 
 Rot3 (Vec4< T > ix, Vec4< T > iy, Vec4< T > iz)
 
 Rot3 (T xx, T xy, T xz, T yx, T yy, T yz, T zx, T zy, T zz)
 
Vec4< Trotate (Vec4< T > v) const
 
Rot3 rotate (Rot3 const &r) const
 
Vec4< TrotateBack (Vec4< T > v) const
 
Rot3 rotateBack (Rot3 const &r) const
 
Rot3 transpose () const
 
Vec4< Tx ()
 
Vec4< Ty ()
 
Vec4< Tz ()
 

Public Attributes

Vec4< Taxis [3]
 

Detailed Description

template<typename T>
struct mathSSE::Rot3< T >

Definition at line 16 of file SSERot.h.

Constructor & Destructor Documentation

◆ Rot3() [1/3]

template<typename T>
mathSSE::Rot3< T >::Rot3 ( )
inline

Definition at line 19 of file SSERot.h.

Referenced by mathSSE::Rot3< align::Scalar >::rotate(), mathSSE::Rot3< align::Scalar >::rotateBack(), and mathSSE::Rot3< align::Scalar >::transpose().

19  {
20  axis[0].arr[0] = 1;
21  axis[1].arr[1] = 1;
22  axis[2].arr[2] = 1;
23  }
Vec4< T > axis[3]
Definition: SSERot.h:17

◆ Rot3() [2/3]

template<typename T>
mathSSE::Rot3< T >::Rot3 ( Vec4< T ix,
Vec4< T iy,
Vec4< T iz 
)
inline

Definition at line 25 of file SSERot.h.

25  {
26  axis[0] = ix;
27  axis[1] = iy;
28  axis[2] = iz;
29  }
Vec4< T > axis[3]
Definition: SSERot.h:17
ALPAKA_FN_ACC ALPAKA_FN_INLINE uint32_t ix(uint32_t id)
ALPAKA_FN_ACC ALPAKA_FN_INLINE uint32_t iy(uint32_t id)

◆ Rot3() [3/3]

template<typename T>
mathSSE::Rot3< T >::Rot3 ( T  xx,
T  xy,
T  xz,
T  yx,
T  yy,
T  yz,
T  zx,
T  zy,
T  zz 
)
inline

Definition at line 31 of file SSERot.h.

31  {
32  axis[0].set(xx, xy, xz);
33  axis[1].set(yx, yy, yz);
34  axis[2].set(zx, zy, zz);
35  }
Vec4< T > axis[3]
Definition: SSERot.h:17

Member Function Documentation

◆ rotate() [1/2]

template<typename T>
Vec4<T> mathSSE::Rot3< T >::rotate ( Vec4< T v) const
inline

Definition at line 54 of file SSERot.h.

54 { return transpose().rotateBack(v); }
Vec4< T > rotateBack(Vec4< T > v) const
Definition: SSERot.h:57
Rot3 transpose() const
Definition: SSERot.h:37

◆ rotate() [2/2]

template<typename T>
Rot3 mathSSE::Rot3< T >::rotate ( Rot3< T > const &  r) const
inline

Definition at line 61 of file SSERot.h.

61  {
62  Rot3 tr = transpose();
63  return Rot3(tr.rotateBack(r.axis[0]), tr.rotateBack(r.axis[1]), tr.rotateBack(r.axis[2]));
64  }
Definition: ExtVec.h:192
Rot3 transpose() const
Definition: SSERot.h:37
constexpr Vec4< T > rotateBack(Vec4< T > v) const
Definition: ExtVec.h:216

◆ rotateBack() [1/2]

template<typename T>
Vec4<T> mathSSE::Rot3< T >::rotateBack ( Vec4< T v) const
inline

Definition at line 57 of file SSERot.h.

Referenced by mathSSE::Rot3< align::Scalar >::rotate(), and mathSSE::Rot3< align::Scalar >::rotateBack().

57  {
58  return v.template get1<0>() * axis[0] + v.template get1<1>() * axis[1] + v.template get1<2>() * axis[2];
59  }
Vec4< T > axis[3]
Definition: SSERot.h:17

◆ rotateBack() [2/2]

template<typename T>
Rot3 mathSSE::Rot3< T >::rotateBack ( Rot3< T > const &  r) const
inline

Definition at line 66 of file SSERot.h.

66  {
67  return Rot3(rotateBack(r.axis[0]), rotateBack(r.axis[1]), rotateBack(r.axis[2]));
68  }
Vec4< T > rotateBack(Vec4< T > v) const
Definition: SSERot.h:57

◆ transpose()

template<typename T>
Rot3 mathSSE::Rot3< T >::transpose ( ) const
inline

Definition at line 37 of file SSERot.h.

Referenced by mathSSE::Rot3< align::Scalar >::rotate().

37  {
38  return Rot3(axis[0].arr[0],
39  axis[1].arr[0],
40  axis[2].arr[0],
41  axis[0].arr[1],
42  axis[1].arr[1],
43  axis[2].arr[1],
44  axis[0].arr[2],
45  axis[1].arr[2],
46  axis[2].arr[2]);
47  }
Vec4< T > axis[3]
Definition: SSERot.h:17

◆ x()

template<typename T>
Vec4<T> mathSSE::Rot3< T >::x ( )
inline

◆ y()

template<typename T>
Vec4<T> mathSSE::Rot3< T >::y ( )
inline

◆ z()

template<typename T>
Vec4<T> mathSSE::Rot3< T >::z ( )
inline

Definition at line 51 of file SSERot.h.

Referenced by geometryXMLparser.Alignable::pos(), and ntupleDataFormat._HitObject::r3D().

51 { return axis[2]; }
Vec4< T > axis[3]
Definition: SSERot.h:17

Member Data Documentation

◆ axis

template<typename T>
Vec4<T> mathSSE::Rot3< T >::axis[3]