#include <DifRotation.h>
Public Member Functions | |
DifRotation (const DifVector &xp, const DifVector &yp) | |
DifRotation (const DifVector &xp, const DifVector &yp, const DifVector &zp) | |
DifRotation (const DifNumber &alpha, const DifNumber &beta, const DifNumber &gamma) | |
DifRotation () | |
DifRotation (const DifVector &xp, const DifVector &yp) | |
DifRotation (const DifVector &xp, const DifVector &yp, const DifVector &zp) | |
DifRotation (const DifNumber &alpha, const DifNumber &beta, const DifNumber &gamma) | |
DifRotation () | |
int | fail () const |
int | fail () const |
void | rotate (DifVector &v) const |
void | rotate (DifVector &v) const |
DifVector | xnew () const |
DifVector | xnew () const |
DifVector | ynew () const |
DifVector | ynew () const |
DifVector | znew () const |
DifVector | znew () const |
~DifRotation () | |
~DifRotation () | |
Private Attributes | |
DifVector | _xnew |
DifVector | _ynew |
DifVector | _znew |
|
|
|
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 }
|
|
|
|
|
|
00044 {};
|
|
|
|
|
|
|
|
|
|
00044 {};
|
|
|
|
00064 {
00065 return 0;
00066 }
|
|
|
|
00068 { 00069 DifNumber xcomp=xnew()*v; 00070 DifNumber ycomp=ynew()*v; 00071 DifNumber zcomp=znew()*v; 00072 v.x=xcomp; v.y=ycomp; v.z=zcomp; 00073 }
|
|
00047 {return _xnew;}
|
|
00047 {return _xnew;}
|
|
00048 {return _ynew;}
|
|
00048 {return _ynew;}
|
|
00049 {return _znew;}
|
|
00049 {return _znew;}
|
|
|
|
|
|
|