CMS 3D CMS Logo

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

#include <ExtVec.h>

Public Types

typedef Vec4< TVec
 

Public Member Functions

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

Public Attributes

Vec axis [3]
 

Detailed Description

template<typename T>
struct Rot3< T >

Definition at line 181 of file ExtVec.h.

Member Typedef Documentation

◆ Vec

template<typename T>
typedef Vec4<T> Rot3< T >::Vec

Definition at line 182 of file ExtVec.h.

Constructor & Destructor Documentation

◆ Rot3() [1/3]

template<typename T>
constexpr Rot3< T >::Rot3 ( )
inlineconstexpr

Definition at line 185 of file ExtVec.h.

185 : axis{{(Vec){T(1), 0, 0, 0}}, {(Vec){0, T(1), 0, 0}}, {(Vec){0, 0, T(1), 0}}} {}

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

◆ Rot3() [2/3]

template<typename T>
constexpr Rot3< T >::Rot3 ( Vec4< T ix,
Vec4< T iy,
Vec4< T iz 
)
inlineconstexpr

Definition at line 187 of file ExtVec.h.

187 : axis{ix, iy, iz} {}

◆ Rot3() [3/3]

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

Definition at line 189 of file ExtVec.h.

190  : axis{{(Vec){xx, xy, xz, 0}}, {(Vec){yx, yy, yz, 0}}, {(Vec){zx, zy, zz, 0}}} {}

Member Function Documentation

◆ rotate() [1/2]

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

Definition at line 207 of file ExtVec.h.

207  {
208  Rot3 tr = transpose();
209  return Rot3(tr.rotateBack(r.axis[0]), tr.rotateBack(r.axis[1]), tr.rotateBack(r.axis[2]));
210  }

◆ rotate() [2/2]

template<typename T>
constexpr Vec4<T> Rot3< T >::rotate ( Vec4< T v) const
inlineconstexpr

Definition at line 202 of file ExtVec.h.

202 { return transpose().rotateBack(v); }

◆ rotateBack() [1/2]

template<typename T>
constexpr Rot3 Rot3< T >::rotateBack ( Rot3< T > const &  r) const
inlineconstexpr

Definition at line 212 of file ExtVec.h.

212  {
213  return Rot3(rotateBack(r.axis[0]), rotateBack(r.axis[1]), rotateBack(r.axis[2]));
214  }

◆ rotateBack() [2/2]

template<typename T>
constexpr Vec4<T> Rot3< T >::rotateBack ( Vec4< T v) const
inlineconstexpr

Definition at line 205 of file ExtVec.h.

205 { return v[0] * axis[0] + v[1] * axis[1] + v[2] * axis[2]; }

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

◆ transpose()

template<typename T>
constexpr Rot3 Rot3< T >::transpose ( ) const
inlineconstexpr

Definition at line 192 of file ExtVec.h.

192  {
193  return Rot3(
194  axis[0][0], axis[1][0], axis[2][0], axis[0][1], axis[1][1], axis[2][1], axis[0][2], axis[1][2], axis[2][2]);
195  }

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

◆ x()

template<typename T>
constexpr Vec4<T> Rot3< T >::x ( ) const
inlineconstexpr

◆ y()

template<typename T>
constexpr Vec4<T> Rot3< T >::y ( ) const
inlineconstexpr

◆ z()

template<typename T>
constexpr Vec4<T> Rot3< T >::z ( ) const
inlineconstexpr

Definition at line 199 of file ExtVec.h.

199 { return axis[2]; }

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

Member Data Documentation

◆ axis

template<typename T>
Vec Rot3< T >::axis[3]
Rot3::Vec
Vec4< T > Vec
Definition: ExtVec.h:182
geometryCSVtoXML.zz
zz
Definition: geometryCSVtoXML.py:19
geometryCSVtoXML.yz
yz
Definition: geometryCSVtoXML.py:19
findQualityFiles.v
v
Definition: findQualityFiles.py:179
geometryCSVtoXML.yy
yy
Definition: geometryCSVtoXML.py:19
geometryCSVtoXML.xz
xz
Definition: geometryCSVtoXML.py:19
alignCSCRings.r
r
Definition: alignCSCRings.py:93
Rot3
Definition: ExtVec.h:181
T
long double T
Definition: Basic3DVectorLD.h:48
Rot3::rotateBack
constexpr Vec4< T > rotateBack(Vec4< T > v) const
Definition: ExtVec.h:205
Rot3::Rot3
constexpr Rot3()
Definition: ExtVec.h:185
xy
auto xy(V v) -> Vec2< typename std::remove_reference< decltype(v[0])>::type >
Definition: ExtVec.h:69
geometryCSVtoXML.xx
xx
Definition: geometryCSVtoXML.py:19
Rot3::axis
Vec axis[3]
Definition: ExtVec.h:183
Rot3::transpose
constexpr Rot3 transpose() const
Definition: ExtVec.h:192