Chemical Data Processing Library C++ API - Version 1.4.0
Public Types | Static Public Member Functions | List of all members
CDPL::Math::QuaternionVectorRotation< Q, V > Struct Template Reference

Functor returning element i of the rotated 3-dimensional vector \( e_1 \cdot e_2 \cdot e_1^{-1} \) (quaternion rotation of \( e_2 \) by \( e_1 \)). More...

#include <Functional.hpp>

+ Inheritance diagram for CDPL::Math::QuaternionVectorRotation< Q, V >:

Public Types

typedef QuaternionVectorBinaryFunctor< Q, V >::ValueType ValueType
 
typedef QuaternionVectorBinaryFunctor< Q, V >::SizeType SizeType
 
typedef QuaternionVectorBinaryFunctor< Q, V >::ResultType ResultType
 
- Public Types inherited from CDPL::Math::QuaternionVectorBinaryFunctor< Q, V >
typedef CommonType< typename Q::ValueType, typename V::ValueType >::Type ValueType
 The element value type (common type of the quaternion and vector element types). More...
 
typedef V::SizeType SizeType
 The unsigned size type used by the vector. More...
 
typedef ValueType ResultType
 The scalar result type (alias for ValueType). More...
 

Static Public Member Functions

template<typename E1 , typename E2 >
static ResultType apply (const QuaternionExpression< E1 > &e1, const VectorExpression< E2 > &e2, SizeType i)
 Returns element i ( \( 0 \le i < 3 \)) of the rotated 3-vector \( e_1 \cdot e_2 \cdot e_1^{-1} \). More...
 

Detailed Description

template<typename Q, typename V>
struct CDPL::Math::QuaternionVectorRotation< Q, V >

Functor returning element i of the rotated 3-dimensional vector \( e_1 \cdot e_2 \cdot e_1^{-1} \) (quaternion rotation of \( e_2 \) by \( e_1 \)).

Template Parameters
QThe quaternion expression type.
VThe vector expression type.

Member Typedef Documentation

◆ ValueType

template<typename Q , typename V >
typedef QuaternionVectorBinaryFunctor<Q, V>::ValueType CDPL::Math::QuaternionVectorRotation< Q, V >::ValueType

◆ SizeType

template<typename Q , typename V >
typedef QuaternionVectorBinaryFunctor<Q, V>::SizeType CDPL::Math::QuaternionVectorRotation< Q, V >::SizeType

◆ ResultType

template<typename Q , typename V >
typedef QuaternionVectorBinaryFunctor<Q, V>::ResultType CDPL::Math::QuaternionVectorRotation< Q, V >::ResultType

Member Function Documentation

◆ apply()

template<typename Q , typename V >
template<typename E1 , typename E2 >
static ResultType CDPL::Math::QuaternionVectorRotation< Q, V >::apply ( const QuaternionExpression< E1 > &  e1,
const VectorExpression< E2 > &  e2,
SizeType  i 
)
inlinestatic

Returns element i ( \( 0 \le i < 3 \)) of the rotated 3-vector \( e_1 \cdot e_2 \cdot e_1^{-1} \).

Template Parameters
E1The quaternion expression type.
E2The vector expression type.
Parameters
e1The quaternion expression (rotation).
e2The 3-vector expression to rotate.
iThe zero-based element index (0, 1, or 2).
Returns
The rotated vector's i-th element (zero for i > 2).
Exceptions
Base::SizeErrorif e2 has fewer than 3 elements.

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