CMS 3D CMS Logo

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

#include <SSERot.h>

Public Member Functions

 Rot2 ()
 
 Rot2 (Vec2< T > ix, Vec2< T > iy)
 
 Rot2 (T xx, T xy, T yx, T yy)
 
Vec2< Trotate (Vec2< T > v) const
 
Rot2 rotate (Rot2 const &r) const
 
Vec2< TrotateBack (Vec2< T > v) const
 
Rot2 rotateBack (Rot2 const &r) const
 
Rot2 transpose () const
 
Vec2< Tx ()
 
Vec2< Ty ()
 

Public Attributes

Vec2< Taxis [2]
 

Detailed Description

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

Definition at line 99 of file SSERot.h.

Constructor & Destructor Documentation

◆ Rot2() [1/3]

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

Definition at line 102 of file SSERot.h.

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

102  {
103  axis[0].arr[0] = 1;
104  axis[1].arr[1] = 1;
105  }
Vec2< T > axis[2]
Definition: SSERot.h:100

◆ Rot2() [2/3]

template<typename T>
mathSSE::Rot2< T >::Rot2 ( Vec2< T ix,
Vec2< T iy 
)
inline

Definition at line 107 of file SSERot.h.

107  {
108  axis[0] = ix;
109  axis[1] = iy;
110  }
Vec2< T > axis[2]
Definition: SSERot.h:100
ALPAKA_FN_ACC ALPAKA_FN_INLINE uint32_t ix(uint32_t id)
ALPAKA_FN_ACC ALPAKA_FN_INLINE uint32_t iy(uint32_t id)

◆ Rot2() [3/3]

template<typename T>
mathSSE::Rot2< T >::Rot2 ( T  xx,
T  xy,
T  yx,
T  yy 
)
inline

Definition at line 112 of file SSERot.h.

112  {
113  axis[0].set(xx, xy);
114  axis[1].set(yx, yy);
115  }
Vec2< T > axis[2]
Definition: SSERot.h:100

Member Function Documentation

◆ rotate() [1/2]

template<typename T>
Vec2<T> mathSSE::Rot2< T >::rotate ( Vec2< T v) const
inline

Definition at line 123 of file SSERot.h.

123 { return transpose().rotateBack(v); }
Vec2< T > rotateBack(Vec2< T > v) const
Definition: SSERot.h:126
Rot2 transpose() const
Definition: SSERot.h:117

◆ rotate() [2/2]

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

Definition at line 128 of file SSERot.h.

128  {
129  Rot2 tr = transpose();
130  return Rot2(tr.rotateBack(r.axis[0]), tr.rotateBack(r.axis[1]));
131  }
Rot2 transpose() const
Definition: SSERot.h:117
Definition: ExtVec.h:223
constexpr Vec2< T > rotateBack(Vec2< T > v) const
Definition: ExtVec.h:242

◆ rotateBack() [1/2]

template<typename T>
Vec2<T> mathSSE::Rot2< T >::rotateBack ( Vec2< T v) const
inline

Definition at line 126 of file SSERot.h.

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

126 { return v.template get1<0>() * axis[0] + v.template get1<1>() * axis[1]; }
Vec2< T > axis[2]
Definition: SSERot.h:100

◆ rotateBack() [2/2]

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

Definition at line 133 of file SSERot.h.

Referenced by mathSSE::Rot2< Scalar >::rotateBack().

133 { return Rot2(rotateBack(r.axis[0]), rotateBack(r.axis[1])); }
Vec2< T > rotateBack(Vec2< T > v) const
Definition: SSERot.h:126

◆ transpose()

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

Definition at line 117 of file SSERot.h.

Referenced by mathSSE::Rot2< Scalar >::rotate().

117 { return Rot2(axis[0].arr[0], axis[1].arr[0], axis[0].arr[1], axis[1].arr[1]); }
Vec2< T > axis[2]
Definition: SSERot.h:100

◆ x()

template<typename T>
Vec2<T> mathSSE::Rot2< T >::x ( )
inline

◆ y()

template<typename T>
Vec2<T> mathSSE::Rot2< T >::y ( )
inline

Member Data Documentation

◆ axis

template<typename T>
Vec2<T> mathSSE::Rot2< T >::axis[2]