CMS 3D CMS Logo

Public Member Functions | Public Attributes

mathSSE::Rot2< T > Struct Template Reference

#include <SSERot.h>

List of all members.

Public Member Functions

 Rot2 ()
 Rot2 (Vec2< T > ix, Vec2< T > iy)
 Rot2 (T xx, T xy, T yx, T yy)
Rot2 rotate (Rot2 const &r) const
Vec2< Trotate (Vec2< T > v) 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 104 of file SSERot.h.


Constructor & Destructor Documentation

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

Definition at line 107 of file SSERot.h.

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

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

Definition at line 112 of file SSERot.h.

                                   {
      axis[0] =ix;
      axis[1] =iy;
    }
template<typename T>
mathSSE::Rot2< T >::Rot2 ( T  xx,
T  xy,
T  yx,
T  yy 
) [inline]

Definition at line 117 of file SSERot.h.

                                  {
      axis[0].set(xx,xy);
      axis[1].set(yx,yy);
    }

Member Function Documentation

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

Definition at line 132 of file SSERot.h.

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

Definition at line 142 of file SSERot.h.

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

Definition at line 138 of file SSERot.h.

Referenced by operator*(), mathSSE::Rot2< double >::rotate(), and mathSSE::Rot2< double >::rotateBack().

                                        {
      return v.template get1<0>()*axis[0] +  v.template get1<1>()*axis[1];
    }
template<typename T>
Rot2 mathSSE::Rot2< T >::rotateBack ( Rot2< T > const &  r) const [inline]

Definition at line 147 of file SSERot.h.

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

Definition at line 122 of file SSERot.h.

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

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

Definition at line 128 of file SSERot.h.

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

Definition at line 129 of file SSERot.h.

{ return axis[1];}

Member Data Documentation

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