CMS 3D CMS Logo

Public Member Functions | Public Attributes

mathSSE::Rot3< T > Struct Template Reference

#include <SSERot.h>

List of all members.

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
Rot3 rotateBack (Rot3 const &r) const
Vec4< TrotateBack (Vec4< T > v) 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 18 of file SSERot.h.


Constructor & Destructor Documentation

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

Definition at line 21 of file SSERot.h.

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

           {
      axis[0].arr[0]=1;
      axis[1].arr[1]=1;
      axis[2].arr[2]=1;
    }
template<typename T>
mathSSE::Rot3< T >::Rot3 ( Vec4< T ix,
Vec4< T iy,
Vec4< T iz 
) [inline]

Definition at line 27 of file SSERot.h.

                                                {
      axis[0] =ix;
      axis[1] =iy;
      axis[2] =iz;
    }
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 33 of file SSERot.h.

                                                                {
      axis[0].set(xx,xy,xz);
      axis[1].set(yx,yy,yz);
      axis[2].set(zx,zy,zz);
    }

Member Function Documentation

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

Definition at line 51 of file SSERot.h.

                                    {
      return transpose().rotateBack(v);
    }
template<typename T>
Rot3 mathSSE::Rot3< T >::rotate ( Rot3< T > const &  r) const [inline]

Definition at line 61 of file SSERot.h.

                                     {
      Rot3 tr = transpose();
      return Rot3(tr.rotateBack(r.axis[0]),tr.rotateBack(r.axis[1]),tr.rotateBack(r.axis[2]));
    }
template<typename T>
Rot3 mathSSE::Rot3< T >::rotateBack ( Rot3< T > const &  r) const [inline]

Definition at line 66 of file SSERot.h.

                                         {
      return Rot3(rotateBack(r.axis[0]),rotateBack(r.axis[1]),rotateBack(r.axis[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 operator*(), mathSSE::Rot3< align::Scalar >::rotate(), and mathSSE::Rot3< align::Scalar >::rotateBack().

                                        {
      return v.template get1<0>()*axis[0] +  v.template get1<1>()*axis[1] + v.template get1<2>()*axis[2];
    }
template<typename T>
Rot3 mathSSE::Rot3< T >::transpose ( ) const [inline]

Definition at line 39 of file SSERot.h.

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

                           {
      return Rot3( axis[0].arr[0], axis[1].arr[0], axis[2].arr[0],
                   axis[0].arr[1], axis[1].arr[1], axis[2].arr[1],
                   axis[0].arr[2], axis[1].arr[2], axis[2].arr[2]
                   );
    }
template<typename T>
Vec4<T> mathSSE::Rot3< T >::x ( ) [inline]

Definition at line 46 of file SSERot.h.

{ return axis[0];}
template<typename T>
Vec4<T> mathSSE::Rot3< T >::y ( ) [inline]

Definition at line 47 of file SSERot.h.

{ return axis[1];}
template<typename T>
Vec4<T> mathSSE::Rot3< T >::z ( ) [inline]

Definition at line 48 of file SSERot.h.

{ return axis[2];}

Member Data Documentation

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