|
BornAgain
1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
|
Vector transformations in three dimensions. More...
Public Types | |
| enum | ERotationType { EULER , XAXIS , YAXIS , ZAXIS } |
Public Member Functions | |
| Transform3D () | |
| Constructs unit transformation. More... | |
| Transform3D (const Eigen::Matrix3d &matrix) | |
| Constructor from matrix (no checks if this is an element of SO(3)!) More... | |
| ~Transform3D () | |
| Destructor. More... | |
| void | calculateEulerAngles (double *p_alpha, double *p_beta, double *p_gamma) const |
| Calculates the Euler angles corresponding to the rotation. More... | |
| double | calculateRotateXAngle () const |
| Calculates the rotation angle for a rotation around the x-axis alone Only meaningfull if the actual rotation is around the x-axis. More... | |
| double | calculateRotateYAngle () const |
| Calculates the rotation angle for a rotation around the y-axis alone Only meaningfull if the actual rotation is around the y-axis. More... | |
| double | calculateRotateZAngle () const |
| Calculates the rotation angle for a rotation around the z-axis alone Only meaningfull if the actual rotation is around the z-axis. More... | |
| Transform3D * | clone () const |
| Clones the transformation. More... | |
| Transform3D | getInverse () const |
| Returns the inverse transformation. More... | |
| ERotationType | getRotationType () const |
| Retrieve the rotation type (general, around x, y or z-axis) More... | |
| bool | isIdentity () const |
| Determine if the transformation is trivial (identity) More... | |
| bool | isXRotation () const |
| bool | isYRotation () const |
| bool | isZRotation () const |
| Transform3D | operator* (const Transform3D &other) const |
| Composes two transformations. More... | |
| bool | operator== (const Transform3D &other) const |
| Provides equality operator. More... | |
| void | print (std::ostream &ostr) const |
| template<class ivector_t > | |
| ivector_t | transformed (const ivector_t &v) const |
| Return transformed vector v. More... | |
| template<class ivector_t > | |
| ivector_t | transformedInverse (const ivector_t &v) const |
| Return transformed vector v. More... | |
Static Public Member Functions | |
| static Transform3D | createRotateEuler (double alpha, double beta, double gamma) |
| Creates rotation defined by Euler angles. More... | |
| static Transform3D | createRotateX (double phi) |
| Creates rotation around x-axis. More... | |
| static Transform3D | createRotateY (double phi) |
| Creates rotation around y-axis. More... | |
| static Transform3D | createRotateZ (double phi) |
| Creates rotation around z-axis. More... | |
Private Attributes | |
| Eigen::Matrix3d | m_inverse_matrix |
| Eigen::Matrix3d | m_matrix |
Friends | |
| std::ostream & | operator<< (std::ostream &ostr, const Transform3D &m) |
Vector transformations in three dimensions.
Definition at line 26 of file Transform3D.h.
| Transform3D::Transform3D | ( | ) |
Constructs unit transformation.
Definition at line 18 of file Transform3D.cpp.
References m_inverse_matrix, and m_matrix.
Referenced by clone(), createRotateX(), createRotateY(), createRotateZ(), and operator*().
| Transform3D::Transform3D | ( | const Eigen::Matrix3d & | matrix | ) |
Constructor from matrix (no checks if this is an element of SO(3)!)
Definition at line 24 of file Transform3D.cpp.
References m_inverse_matrix, and m_matrix.
|
inline |
| void Transform3D::calculateEulerAngles | ( | double * | p_alpha, |
| double * | p_beta, | ||
| double * | p_gamma | ||
| ) | const |
Calculates the Euler angles corresponding to the rotation.
Definition at line 76 of file Transform3D.cpp.
References m_matrix.
Referenced by IRotation::createRotation(), and isIdentity().
| double Transform3D::calculateRotateXAngle | ( | ) | const |
Calculates the rotation angle for a rotation around the x-axis alone Only meaningfull if the actual rotation is around the x-axis.
Definition at line 89 of file Transform3D.cpp.
References m_matrix.
Referenced by IRotation::createRotation().
| double Transform3D::calculateRotateYAngle | ( | ) | const |
Calculates the rotation angle for a rotation around the y-axis alone Only meaningfull if the actual rotation is around the y-axis.
Definition at line 94 of file Transform3D.cpp.
References m_matrix.
Referenced by IRotation::createRotation().
| double Transform3D::calculateRotateZAngle | ( | ) | const |
Calculates the rotation angle for a rotation around the z-axis alone Only meaningfull if the actual rotation is around the z-axis.
Definition at line 99 of file Transform3D.cpp.
References m_matrix.
Referenced by IRotation::createRotation().
| Transform3D * Transform3D::clone | ( | ) | const |
Clones the transformation.
Definition at line 135 of file Transform3D.cpp.
References Transform3D(), and m_matrix.
|
static |
Creates rotation defined by Euler angles.
Definition at line 68 of file Transform3D.cpp.
References createRotateX(), and createRotateZ().
Referenced by RotationEuler::getTransform3D().
|
static |
Creates rotation around x-axis.
Definition at line 29 of file Transform3D.cpp.
References Transform3D().
Referenced by createRotateEuler(), and RotationX::getTransform3D().
|
static |
Creates rotation around y-axis.
Definition at line 42 of file Transform3D.cpp.
References Transform3D().
Referenced by RotationY::getTransform3D().
|
static |
Creates rotation around z-axis.
Definition at line 55 of file Transform3D.cpp.
References Transform3D().
Referenced by createRotateEuler(), and RotationZ::getTransform3D().
| Transform3D Transform3D::getInverse | ( | ) | const |
Returns the inverse transformation.
Definition at line 104 of file Transform3D.cpp.
References m_inverse_matrix.
Referenced by FormFactorDecoratorRotation::evaluate(), and FormFactorDecoratorRotation::evaluatePol().
| Transform3D::ERotationType Transform3D::getRotationType | ( | ) | const |
Retrieve the rotation type (general, around x, y or z-axis)
Definition at line 151 of file Transform3D.cpp.
References EULER, isXRotation(), isYRotation(), isZRotation(), XAXIS, YAXIS, and ZAXIS.
Referenced by IRotation::createRotation().
| bool Transform3D::isIdentity | ( | ) | const |
Determine if the transformation is trivial (identity)
Definition at line 162 of file Transform3D.cpp.
References calculateEulerAngles().
Referenced by IRotation::isIdentity().
| bool Transform3D::isXRotation | ( | ) | const |
Definition at line 174 of file Transform3D.cpp.
References m_matrix.
Referenced by getRotationType().
| bool Transform3D::isYRotation | ( | ) | const |
Definition at line 189 of file Transform3D.cpp.
References m_matrix.
Referenced by getRotationType().
| bool Transform3D::isZRotation | ( | ) | const |
Definition at line 204 of file Transform3D.cpp.
References m_matrix.
Referenced by getRotationType(), and IRotation::zInvariant().
| Transform3D Transform3D::operator* | ( | const Transform3D & | other | ) | const |
Composes two transformations.
Definition at line 140 of file Transform3D.cpp.
References Transform3D(), and m_matrix.
| bool Transform3D::operator== | ( | const Transform3D & | other | ) | const |
| void Transform3D::print | ( | std::ostream & | ostr | ) | const |
Definition at line 169 of file Transform3D.cpp.
References m_matrix.
| template cvector_t Transform3D::transformed< cvector_t > | ( | const ivector_t & | v | ) | const |
Return transformed vector v.
Definition at line 110 of file Transform3D.cpp.
References m_matrix, BasicVector3D< T >::x(), BasicVector3D< T >::y(), and BasicVector3D< T >::z().
Referenced by MagneticMaterialImpl::rotatedMaterial(), IRotation::transformed(), Lattice3D::transformed(), and WavevectorInfo::transformed().
| template cvector_t Transform3D::transformedInverse< cvector_t > | ( | const ivector_t & | v | ) | const |
Return transformed vector v.
Definition at line 121 of file Transform3D.cpp.
References m_inverse_matrix, BasicVector3D< T >::x(), BasicVector3D< T >::y(), and BasicVector3D< T >::z().
|
friend |
Definition at line 92 of file Transform3D.h.
|
private |
Definition at line 107 of file Transform3D.h.
Referenced by Transform3D(), getInverse(), and transformedInverse().
|
private |
Definition at line 106 of file Transform3D.h.
Referenced by Transform3D(), calculateEulerAngles(), calculateRotateXAngle(), calculateRotateYAngle(), calculateRotateZAngle(), clone(), isXRotation(), isYRotation(), isZRotation(), operator*(), operator==(), print(), and transformed().