BornAgain  1.19.79
Open-source research software to simulate and fit neutron and x-ray reflectometry and grazing-incidence small-angle scattering
RotMatrix Class Reference

Description

Rotation matrix in three dimensions. Represents group SO(3). Internal parameterization based on quaternions.

Public Member Functions

 RotMatrix ()
 Constructs unit transformation. More...
 
 ~RotMatrix ()=default
 Destructor. More...
 
std::optional< double > angleAroundCoordAxis (int iAxis) const
 
template<class T >
counterTransformed (const T &v) const
 Return transformed vector v. More...
 
RotMatrix Inverse () const
 Returns the inverse transformation. More...
 
bool isIdentity () const
 Determine if the transformation is trivial (identity) More...
 
bool isXRotation () const
 
bool isYRotation () const
 
bool isZRotation () const
 
RotMatrix operator* (const RotMatrix &) const
 Composes two transformations. More...
 
bool operator== (const RotMatrix &) const
 Provides equality operator. More...
 
template<class T >
transformed (const T &v) const
 Return transformed vector v. More...
 
std::array< double, 3 > zxzEulerAngles () const
 Calculates the Euler angles corresponding to the rotation. More...
 

Static Public Member Functions

static RotMatrix AroundX (double phi)
 Creates rotation around x-axis. More...
 
static RotMatrix AroundY (double phi)
 Creates rotation around y-axis. More...
 
static RotMatrix AroundZ (double phi)
 Creates rotation around z-axis. More...
 
static RotMatrix EulerZXZ (double alpha, double beta, double gamma)
 Creates rotation defined by Euler angles. More...
 

Constructor & Destructor Documentation

◆ RotMatrix()

RotMatrix::RotMatrix ( )

Constructs unit transformation.

◆ ~RotMatrix()

RotMatrix::~RotMatrix ( )
default

Destructor.

Member Function Documentation

◆ angleAroundCoordAxis()

std::optional<double> RotMatrix::angleAroundCoordAxis ( int  iAxis) const

◆ AroundX()

static RotMatrix RotMatrix::AroundX ( double  phi)
static

Creates rotation around x-axis.

◆ AroundY()

static RotMatrix RotMatrix::AroundY ( double  phi)
static

Creates rotation around y-axis.

◆ AroundZ()

static RotMatrix RotMatrix::AroundZ ( double  phi)
static

Creates rotation around z-axis.

◆ counterTransformed()

template<class T >
T RotMatrix::counterTransformed ( const T &  v) const

Return transformed vector v.

◆ EulerZXZ()

static RotMatrix RotMatrix::EulerZXZ ( double  alpha,
double  beta,
double  gamma 
)
static

Creates rotation defined by Euler angles.

◆ Inverse()

RotMatrix RotMatrix::Inverse ( ) const

Returns the inverse transformation.

◆ isIdentity()

bool RotMatrix::isIdentity ( ) const

Determine if the transformation is trivial (identity)

◆ isXRotation()

bool RotMatrix::isXRotation ( ) const

◆ isYRotation()

bool RotMatrix::isYRotation ( ) const

◆ isZRotation()

bool RotMatrix::isZRotation ( ) const

◆ operator*()

RotMatrix RotMatrix::operator* ( const RotMatrix ) const

Composes two transformations.

◆ operator==()

bool RotMatrix::operator== ( const RotMatrix ) const

Provides equality operator.

◆ transformed()

template<class T >
T RotMatrix::transformed ( const T &  v) const

Return transformed vector v.

◆ zxzEulerAngles()

std::array<double, 3> RotMatrix::zxzEulerAngles ( ) const

Calculates the Euler angles corresponding to the rotation.