BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
Transform3D Class Reference

Vector transformations in three dimensions. More...

Public Types

enum  ERotationType { EULER , XAXIS , YAXIS , ZAXIS }
 

Public Member Functions

 Transform3D ()
 Constructs unit transformation.
 
 ~Transform3D ()
 Destructor.
 
void calculateEulerAngles (double *p_alpha, double *p_beta, double *p_gamma) const
 Calculates the Euler angles corresponding to the rotation.
 
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.
 
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.
 
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.
 
Transform3Dclone () const
 Clones the transformation.
 
Transform3D getInverse () const
 Returns the inverse transformation.
 
ERotationType getRotationType () const
 Retrieve the rotation type (general, around x, y or z-axis)
 
bool isIdentity () const
 Determine if the transformation is trivial (identity)
 
bool isXRotation () const
 
bool isYRotation () const
 
bool isZRotation () const
 
Transform3D operator* (const Transform3D &other) const
 Composes two transformations.
 
bool operator== (const Transform3D &other) const
 Provides equality operator.
 
void print (std::ostream &ostr) const
 
template<class ivector_t >
ivector_t transformed (const ivector_t &v) const
 Return transformed vector v.
 
template<class ivector_t >
ivector_t transformedInverse (const ivector_t &v) const
 Return transformed vector v.
 

Static Public Member Functions

static Transform3D createRotateEuler (double alpha, double beta, double gamma)
 Creates rotation defined by Euler angles.
 
static Transform3D createRotateX (double phi)
 Creates rotation around x-axis.
 
static Transform3D createRotateY (double phi)
 Creates rotation around y-axis.
 
static Transform3D createRotateZ (double phi)
 Creates rotation around z-axis.
 

Friends

std::ostream & operator<< (std::ostream &ostr, const Transform3D &m)
 

Detailed Description

Vector transformations in three dimensions.