BornAgain
1.18.0
Simulate and fit neutron and x-ray scattering at grazing incidence
|
Public Types | |
enum | ERotationType { EULER , XAXIS , YAXIS , ZAXIS } |
Public Member Functions | |
Transform3D () | |
Transform3D (const Eigen::Matrix3d &matrix) | |
~Transform3D () | |
Transform3D * | clone () const |
void | calculateEulerAngles (double *p_alpha, double *p_beta, double *p_gamma) const |
double | calculateRotateXAngle () const |
double | calculateRotateYAngle () const |
double | calculateRotateZAngle () const |
Transform3D | getInverse () const |
template<class ivector_t > | |
ivector_t | transformed (const ivector_t &v) const |
template<class ivector_t > | |
ivector_t | transformedInverse (const ivector_t &v) const |
Transform3D | operator* (const Transform3D &other) const |
bool | operator== (const Transform3D &other) const |
ERotationType | getRotationType () const |
bool | isIdentity () const |
void | print (std::ostream &ostr) const |
bool | isXRotation () const |
bool | isYRotation () const |
bool | isZRotation () const |
Static Public Member Functions | |
static Transform3D | createIdentity () |
static Transform3D | createRotateX (double phi) |
static Transform3D | createRotateY (double phi) |
static Transform3D | createRotateZ (double phi) |
static Transform3D | createRotateEuler (double alpha, double beta, double gamma) |
Private Attributes | |
Eigen::Matrix3d | m_matrix |
Eigen::Matrix3d | m_inverse_matrix |
Friends | |
std::ostream & | operator<< (std::ostream &ostr, const Transform3D &m) |
Vector transformations in three dimensions.
Definition at line 27 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(), createIdentity(), 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 |
Transform3D * Transform3D::clone | ( | ) | const |
Clones the transformation.
Definition at line 140 of file Transform3D.cpp.
References m_matrix, and Transform3D().
|
static |
Creates identity transformation (default)
Definition at line 29 of file Transform3D.cpp.
References Transform3D().
Referenced by IdentityRotation::getTransform3D().
|
static |
Creates rotation around x-axis.
Definition at line 34 of file Transform3D.cpp.
References Transform3D().
Referenced by createRotateEuler(), and RotationX::getTransform3D().
|
static |
Creates rotation around y-axis.
Definition at line 47 of file Transform3D.cpp.
References Transform3D().
Referenced by RotationY::getTransform3D().
|
static |
Creates rotation around z-axis.
Definition at line 60 of file Transform3D.cpp.
References Transform3D().
Referenced by createRotateEuler(), and RotationZ::getTransform3D().
|
static |
Creates rotation defined by Euler angles.
Definition at line 73 of file Transform3D.cpp.
References createRotateX(), and createRotateZ().
Referenced by RotationEuler::getTransform3D().
void Transform3D::calculateEulerAngles | ( | double * | p_alpha, |
double * | p_beta, | ||
double * | p_gamma | ||
) | const |
Calculates the Euler angles corresponding to the rotation.
Definition at line 81 of file Transform3D.cpp.
References m_matrix.
Referenced by IRotation::createRotation(), isIdentity(), and SampleToPython::setRotationInformation().
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 94 of file Transform3D.cpp.
References m_matrix.
Referenced by IRotation::createRotation(), and SampleToPython::setRotationInformation().
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 99 of file Transform3D.cpp.
References m_matrix.
Referenced by IRotation::createRotation(), and SampleToPython::setRotationInformation().
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 104 of file Transform3D.cpp.
References m_matrix.
Referenced by IRotation::createRotation(), and SampleToPython::setRotationInformation().
Transform3D Transform3D::getInverse | ( | ) | const |
Returns the inverse transformation.
Definition at line 109 of file Transform3D.cpp.
References m_inverse_matrix.
Referenced by FormFactorDecoratorRotation::evaluate(), and FormFactorDecoratorRotation::evaluatePol().
template cvector_t Transform3D::transformed< cvector_t > | ( | const ivector_t & | v | ) | const |
Return transformed vector v.
Definition at line 115 of file Transform3D.cpp.
References m_matrix, BasicVector3D< T >::x(), BasicVector3D< T >::y(), and BasicVector3D< T >::z().
Referenced by Lattice::createTransformedLattice(), MagneticMaterialImpl::rotatedMaterial(), IRotation::transformed(), and WavevectorInfo::transformed().
template cvector_t Transform3D::transformedInverse< cvector_t > | ( | const ivector_t & | v | ) | const |
Return transformed vector v.
Definition at line 126 of file Transform3D.cpp.
References m_inverse_matrix, BasicVector3D< T >::x(), BasicVector3D< T >::y(), and BasicVector3D< T >::z().
Transform3D Transform3D::operator* | ( | const Transform3D & | other | ) | const |
Composes two transformations.
Definition at line 145 of file Transform3D.cpp.
References m_matrix, and Transform3D().
bool Transform3D::operator== | ( | const Transform3D & | other | ) | const |
Transform3D::ERotationType Transform3D::getRotationType | ( | ) | const |
Retrieve the rotation type (general, around x, y or z-axis)
Definition at line 156 of file Transform3D.cpp.
References EULER, isXRotation(), isYRotation(), isZRotation(), XAXIS, YAXIS, and ZAXIS.
Referenced by IRotation::createRotation(), and SampleToPython::setRotationInformation().
bool Transform3D::isIdentity | ( | ) | const |
Determine if the transformation is trivial (identity)
Definition at line 167 of file Transform3D.cpp.
References calculateEulerAngles().
Referenced by IRotation::isIdentity().
void Transform3D::print | ( | std::ostream & | ostr | ) | const |
Definition at line 174 of file Transform3D.cpp.
References m_matrix.
bool Transform3D::isXRotation | ( | ) | const |
Definition at line 179 of file Transform3D.cpp.
References m_matrix.
Referenced by getRotationType().
bool Transform3D::isYRotation | ( | ) | const |
Definition at line 194 of file Transform3D.cpp.
References m_matrix.
Referenced by getRotationType().
bool Transform3D::isZRotation | ( | ) | const |
Definition at line 209 of file Transform3D.cpp.
References m_matrix.
Referenced by getRotationType(), and IRotation::zInvariant().
|
friend |
Definition at line 97 of file Transform3D.h.
|
private |
Definition at line 111 of file Transform3D.h.
Referenced by calculateEulerAngles(), calculateRotateXAngle(), calculateRotateYAngle(), calculateRotateZAngle(), clone(), isXRotation(), isYRotation(), isZRotation(), operator*(), operator==(), print(), Transform3D(), and transformed().
|
private |
Definition at line 112 of file Transform3D.h.
Referenced by getInverse(), Transform3D(), and transformedInverse().