#include <rotation.hh>
Public Types | |
| enum | EULERtype { EulerXYZr, EulerXYZs, EulerXYXr, EulerXYXs, EulerXZXr, EulerXZXs, EulerXZYr, EulerXZYs, EulerYZXr, EulerYZXs, EulerYZYr, EulerYZYs, EulerYXYr, EulerYXYs, EulerYXZr, EulerYXZs, EulerZXYr, EulerZXYs, EulerZXZr, EulerZXZs, EulerZYZr, EulerZYZs, EulerZYXr, EulerZYXs } |
Enumeration of Euler conventions. | |
Public Member Functions | |
| Rotation () | |
| null constructor | |
| template<int T> | |
| Rotation (const Euler< T > &euler) | |
| constructor: from generic Euler | |
| Rotation (const Euler_ccp4 &euler) | |
| constructor: from Euler_ccp4 | |
| Rotation (const Euler_explicit &euler_explicit) | |
| constructor: from Euler_explicit | |
| Rotation (const Polar_ccp4 &polar) | |
| constructor: from Polar_ccp4 | |
| Rotation (const Vec3< ftype > &axis, const ftype &kappa) | |
| constructor from direction cosines and angle | |
| Rotation (const Mat33<> &matrix) | |
| constructor: from Matrix | |
| Rotation (const ftype &w, const ftype &x, const ftype &y, const ftype &z) | |
| constructor: from components | |
| const ftype & | w () const |
| return w component | |
| const ftype & | x () const |
| return x component | |
| const ftype & | y () const |
| return y component | |
| const ftype & | z () const |
| return z component | |
| template<int T> | |
| Euler< T > | euler () const |
| < return Euler angles | |
| Euler_ccp4 | euler_ccp4 () const |
| return Euler_ccp4 angles | |
| bool | euler_explicit (Euler_explicit &euler_explicit, const int &SolutionNumber=1) const |
| return Euler_explicit angles given axes; return false if no solution | |
| Polar_ccp4 | polar_ccp4 () const |
| return Polar_ccp4 angles | |
| Mat33 | matrix () const |
| const Rotation & | norm () |
| normalise this quaternion | |
| Rotation | inverse () const |
| return inverse rotation | |
| bool | is_null () const |
| test for null (uninitialised) rotation | |
| String | format () const |
Static Public Member Functions | |
| static Rotation | zero () |
| return zero rotation | |
| static Rotation | null () |
| return null rotation | |
Protected Attributes | |
| ftype | w_ |
| ftype | x_ |
| ftype | y_ |
| ftype | z_ |
Friends | |
| Rotation | operator* (const Rotation &r1, const Rotation &r2) |
| combine two rotations | |
Rotation class.
This class represents a rotation. The internal representation is as a unit quaternion, which is easily combined, inverted, or converted to or from other commonly used forms.
| Euler_ccp4 scala::Rotation::euler_ccp4 | ( | ) | const |
| bool scala::Rotation::euler_explicit | ( | Euler_explicit & | euler_explicit, | |
| const int & | SolutionNumber = 1 | |||
| ) | const |
return Euler_explicit angles given axes; return false if no solution
SolutionNumber = 1 or 2 for the two solutions solution 1 has the larger (positive) value of phi2 solution 2 has the smaller (negative) value of phi2
On entry: euler_explicit contains axes e1,e2,e3, the angles are ignored and replaced on exit
< return Euler_explicit angles given axes; return false if no solution SolutionNumber = 1 or 2 for the two solutions
| String scala::Rotation::format | ( | ) | const |
return formatted String representation
| Mat33 scala::Rotation::matrix | ( | ) | const |
return 3x3 matrix
The resulting rotation matrix would commonly be used to construct a clipper::RTop_orth.
| const Rotation & scala::Rotation::norm | ( | ) |
normalise this quaternion
The normalisation is performed in-place. If a rotation becomes significantly denormalised, the conversion methods will fail. Therefore it may be safer to call this before a conversion.
| Polar_ccp4 scala::Rotation::polar_ccp4 | ( | ) | const |
combine two rotations
Note: This multiplication operator combines rotations in the opposite order to that of matrices. Thus, the rotation which arises from applying rotation r1 followed by rotation r2 is given by r1*r2. Similarly, the rotation which arises from applying rotation r1 followed by rotation r2 and rotation r3 is given by r1*(r2*r3).
1.6.3