|
Clipper
|
#include <rotation.h>
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 Polar_ccp4 &polar) | |
| constructor: from Polar_ccp4 | |
| 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 | |
| Polar_ccp4 | polar_ccp4 () const |
| return Polar_ccp4 angles | |
| Mat33 | matrix () const |
| return 3x3 matrix | |
| const Rotation & | norm () |
| normalise this quaternion | |
| ftype | abs_angle () const |
| return absolute rotation angle | |
| Rotation | inverse () const |
| return inverse rotation | |
| bool | is_null () const |
| test for null (uninitialised) rotation | |
| String | format () const |
| return formatted String representation | |
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 clipper::Rotation::euler_ccp4 | ( | ) | const |
| Polar_ccp4 clipper::Rotation::polar_ccp4 | ( | ) | const |
return Polar_ccp4 angles
If omega ~= 0, then phi is set to zero.
Referenced by clipper::RTop_orth::axis_coordinate_near(), and clipper::Test_core::operator()().
| Mat33 clipper::Rotation::matrix | ( | ) | const |
return 3x3 matrix
The resulting rotation matrix would commonly be used to construct a clipper::RTop_orth.
Referenced by clipper::Test_core::operator()(), and clipper::RTop_orth::RTop_orth().
| const Rotation & clipper::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.
Referenced by clipper::RTop_orth::axis_coordinate_near(), and clipper::RTop_orth::RTop_orth().
| ftype clipper::Rotation::abs_angle | ( | ) | const |
return absolute rotation angle
Positive magnitude of the angle of rotation.
References clipper::Util::min().
Referenced by clipper::RTop_orth::axis_coordinate_near(), and clipper::RTop_orth::screw_translation().
combine two rotations
Note: This multiplication operator combines rotations in left-to-right order, rather than the right-to-left order used for 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.7.4