#include <DifRotation.h>
Public Member Functions | |
DifRotation () | |
DifRotation (const DifNumber &alpha, const DifNumber &beta, const DifNumber &gamma) | |
DifRotation (const DifVector &xp, const DifVector &yp, const DifVector &zp) | |
DifRotation (const DifVector &xp, const DifVector &yp) | |
~DifRotation () | |
DifVector | xnew () const |
DifVector | ynew () const |
DifVector | znew () const |
void | rotate (DifVector &v) const |
int | fail () const |
Private Attributes | |
DifVector | _xnew |
DifVector | _ynew |
DifVector | _znew |
Definition at line 28 of file DifRotation.h.
DifRotation::DifRotation | ( | ) |
DifRotation::DifRotation | ( | const DifNumber & | alpha, | |
const DifNumber & | beta, | |||
const DifNumber & | gamma | |||
) |
Definition at line 31 of file DifRotation.cxx.
References alpha, cos(), and sin().
00032 { 00033 00034 //active transformation - move the vector (reverse sines) 00035 DifNumber calpha=cos(alpha); DifNumber salpha=-sin(alpha); 00036 DifNumber cbeta=cos(beta); DifNumber sbeta=-sin(beta); 00037 DifNumber cgamma=cos(gamma); DifNumber sgamma=-sin(gamma); 00038 00039 _xnew.x=cbeta*calpha*cgamma-salpha*sgamma; 00040 _xnew.y=cbeta*salpha*cgamma+calpha*sgamma; 00041 _xnew.z=-sbeta*cgamma; 00042 00043 _ynew.x=-cbeta*calpha*sgamma-salpha*cgamma; 00044 _ynew.y=-cbeta*salpha*sgamma+calpha*cgamma; 00045 _ynew.z=sbeta*sgamma; 00046 00047 _znew.x=sbeta*calpha; 00048 _znew.y=sbeta*salpha; 00049 _znew.z=cbeta; 00050 }
DifRotation::~DifRotation | ( | ) | [inline] |
int DifRotation::fail | ( | ) | const |
void DifRotation::rotate | ( | DifVector & | v | ) | const |
DifVector DifRotation::xnew | ( | ) | const [inline] |
Definition at line 47 of file DifRotation.h.
References _xnew.
Referenced by rotate().
00047 {return _xnew;}
DifVector DifRotation::ynew | ( | ) | const [inline] |
Definition at line 48 of file DifRotation.h.
References _ynew.
Referenced by rotate().
00048 {return _ynew;}
DifVector DifRotation::znew | ( | ) | const [inline] |
Definition at line 49 of file DifRotation.h.
References _znew.
Referenced by rotate().
00049 {return _znew;}
DifVector DifRotation::_xnew [private] |
DifVector DifRotation::_ynew [private] |
DifVector DifRotation::_znew [private] |