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 (Vec4< T > ix, Vec4< T > iy, Vec4< T > iz)
 
constexpr Rot3 (T xx, T xy, T xz, T yx, T yy, T yz, T zx, T zy, T zz)
 
constexpr Vec4< Trotate (Vec4< T > v) const
 
Rot3 rotate (Rot3 const &r) const
 
constexpr Vec4< TrotateBack (Vec4< T > v) const
 
constexpr Rot3 rotateBack (Rot3 const &r) 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 192 of file ExtVec.h.

Member Typedef Documentation

◆ Vec

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

Definition at line 193 of file ExtVec.h.

Constructor & Destructor Documentation

◆ Rot3() [1/3]

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

Definition at line 196 of file ExtVec.h.

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

196 : axis{{(Vec){T(1), 0, 0, 0}}, {(Vec){0, T(1), 0, 0}}, {(Vec){0, 0, T(1), 0}}} {}
Vec4< T > Vec
Definition: ExtVec.h:193
long double T
Vec axis[3]
Definition: ExtVec.h:194

◆ Rot3() [2/3]

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

Definition at line 198 of file ExtVec.h.

198 : axis{ix, iy, iz} {}
ALPAKA_FN_ACC ALPAKA_FN_INLINE uint32_t ix(uint32_t id)
ALPAKA_FN_ACC ALPAKA_FN_INLINE uint32_t iy(uint32_t id)
Vec axis[3]
Definition: ExtVec.h:194

◆ 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 
)
inline

Definition at line 200 of file ExtVec.h.

201  : axis{{(Vec){xx, xy, xz, 0}}, {(Vec){yx, yy, yz, 0}}, {(Vec){zx, zy, zz, 0}}} {}
Vec4< T > Vec
Definition: ExtVec.h:193
auto xy(V v) -> Vec2< typename std::remove_reference< decltype(v[0])>::type >
Definition: ExtVec.h:78
Vec axis[3]
Definition: ExtVec.h:194

Member Function Documentation

◆ rotate() [1/2]

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

Definition at line 213 of file ExtVec.h.

213 { return transpose().rotateBack(v); }
constexpr Vec4< T > rotateBack(Vec4< T > v) const
Definition: ExtVec.h:216
constexpr Rot3 transpose() const
Definition: ExtVec.h:203

◆ rotate() [2/2]

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

Definition at line 218 of file ExtVec.h.

218  {
219  Rot3 tr = transpose();
220  return Rot3(tr.rotateBack(r.axis[0]), tr.rotateBack(r.axis[1]), tr.rotateBack(r.axis[2]));
221  }
Definition: ExtVec.h:192
constexpr Rot3()
Definition: ExtVec.h:196
constexpr Vec4< T > rotateBack(Vec4< T > v) const
Definition: ExtVec.h:216
constexpr Rot3 transpose() const
Definition: ExtVec.h:203

◆ rotateBack() [1/2]

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

Definition at line 216 of file ExtVec.h.

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

216 { return v[0] * axis[0] + v[1] * axis[1] + v[2] * axis[2]; }
Vec axis[3]
Definition: ExtVec.h:194

◆ rotateBack() [2/2]

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

Definition at line 223 of file ExtVec.h.

223  {
224  return Rot3(rotateBack(r.axis[0]), rotateBack(r.axis[1]), rotateBack(r.axis[2]));
225  }
constexpr Rot3()
Definition: ExtVec.h:196
constexpr Vec4< T > rotateBack(Vec4< T > v) const
Definition: ExtVec.h:216

◆ transpose()

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

Definition at line 203 of file ExtVec.h.

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

203  {
204  return Rot3(
205  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]);
206  }
Vec axis[3]
Definition: ExtVec.h:194
constexpr Rot3()
Definition: ExtVec.h:196

◆ x()

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

◆ y()

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

◆ z()

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

Definition at line 210 of file ExtVec.h.

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

210 { return axis[2]; }
Vec axis[3]
Definition: ExtVec.h:194

Member Data Documentation

◆ axis

template<typename T>
Vec Rot3< T >::axis[3]