1 #ifndef DataFormat_Math_SSERot_H 2 #define DataFormat_Math_SSERot_H 32 axis[0].set(xx, xy, xz);
33 axis[1].set(yx, yy, yz);
34 axis[2].set(zx, zy, zz);
38 return Rot3(axis[0].arr[0],
58 return v.template get1<0>() * axis[0] + v.template get1<1>() * axis[1] + v.template get1<2>() * axis[2];
67 return Rot3(rotateBack(r.
axis[0]), rotateBack(r.
axis[1]), rotateBack(r.
axis[2]));
78 return _mm_or_ps(_mm_or_ps(_mm_dp_ps(axis[0].vec, v.vec, 0x71), _mm_dp_ps(axis[1].vec, v.vec, 0x72)),
79 _mm_dp_ps(axis[2].vec, v.vec, 0x74));
117 Rot2 transpose()
const {
return Rot2(axis[0].arr[0], axis[1].arr[0], axis[0].arr[1], axis[1].arr[1]); }
142 template <
typename T>
153 #endif // DataFormat_Math_SSERot_H
Vec4< T > rotateBack(Vec4< T > v) const
Rot2(Vec2< T > ix, Vec2< T > iy)
Vec2< T > rotate(Vec2< T > v) const
Rot2 rotate(Rot2 const &r) const
mathSSE::Rot3< T > operator*(mathSSE::Rot3< T > const &rh, mathSSE::Rot3< T > const &lh)
Rot2 rotateBack(Rot2 const &r) const
Rot2(T xx, T xy, T yx, T yy)
Rot3 rotate(Rot3 const &r) const
struct mathSSE::Rot3 __attribute__
Rot3(Vec4< T > ix, Vec4< T > iy, Vec4< T > iz)
std::ostream & operator<<(std::ostream &out, mathSSE::Rot3F const &v)
Vec2< T > rotateBack(Vec2< T > v) const
Rot3(T xx, T xy, T xz, T yx, T yy, T yz, T zx, T zy, T zz)
constexpr Vec4< T > rotateBack(Vec4< T > v) const
constexpr Vec2< T > rotateBack(Vec2< T > v) const
def rotate(angle, cx=0, cy=0)
Rot3 rotateBack(Rot3 const &r) const
Vec4< T > rotate(Vec4< T > v) const