walberla::math::Rot3< Type > Class Template Reference

Detailed Description

template<typename Type>
class walberla::math::Rot3< Type >

Rotation class which merges quaternion and matrix representation.

For numerical reasons the representation of a rotation via a quaternion is favourable. However application of the rotation to vectors and matrices is numerical more efficient with matrices. Therefore this class combines both representations and takes care that both are in sync.

#include <Rot3.h>

Public Member Functions

 Rot3 ()
 
 Rot3 (const Vector3< Type > &rot)
 
 Rot3 (const Vector3< Type > &axis, const real_t &angle)
 
 Rot3 (const Quaternion< Type > q)
 
const Quaternion< Type > & getQuaternion () const
 
const Matrix3< Type > & getMatrix () const
 
void rotate (const Vector3< Type > &rot)
 
void rotate (const Vector3< Type > &axis, const real_t &angle)
 
void rotate (const Rot3< Type > &rot)
 

Private Attributes

Quaternion< Type > quat_
 
Matrix3< Type > mat_
 

Constructor & Destructor Documentation

◆ Rot3() [1/4]

template<typename Type >
walberla::math::Rot3< Type >::Rot3
inline

◆ Rot3() [2/4]

template<typename Type >
walberla::math::Rot3< Type >::Rot3 ( const Vector3< Type > &  rot)
inline

◆ Rot3() [3/4]

template<typename Type >
walberla::math::Rot3< Type >::Rot3 ( const Vector3< Type > &  axis,
const real_t angle 
)
inline

◆ Rot3() [4/4]

template<typename Type >
walberla::math::Rot3< Type >::Rot3 ( const Quaternion< Type >  q)
inline

Member Function Documentation

◆ getMatrix()

template<typename Type >
const Matrix3<Type>& walberla::math::Rot3< Type >::getMatrix ( ) const
inline

◆ getQuaternion()

template<typename Type >
const Quaternion<Type>& walberla::math::Rot3< Type >::getQuaternion ( ) const
inline

◆ rotate() [1/3]

template<typename Type >
void walberla::math::Rot3< Type >::rotate ( const Rot3< Type > &  rot)
inline

◆ rotate() [2/3]

template<typename Type >
void walberla::math::Rot3< Type >::rotate ( const Vector3< Type > &  axis,
const real_t angle 
)
inline

◆ rotate() [3/3]

template<typename Type >
void walberla::math::Rot3< Type >::rotate ( const Vector3< Type > &  rot)
inline

Member Data Documentation

◆ mat_

template<typename Type >
Matrix3<Type> walberla::math::Rot3< Type >::mat_
private

◆ quat_

template<typename Type >
Quaternion<Type> walberla::math::Rot3< Type >::quat_
private

The documentation for this class was generated from the following file: