![]() |
Chemical Data Processing Library C++ API - Version 1.4.0
|
General 4-component quaternion \( q = c_1 + c_2 i + c_3 j + c_4 k \). More...
#include <Quaternion.hpp>
Inheritance diagram for CDPL::Math::Quaternion< T >:Public Types | |
| typedef T | ValueType |
| The scalar component value type. More... | |
| typedef T & | Reference |
| Mutable reference type to a component. More... | |
| typedef const T & | ConstReference |
| Constant reference type to a component. More... | |
| typedef ValueType | ArrayType[4] |
| The plain C-array type used for in-memory storage of the four components. More... | |
| typedef T * | Pointer |
| Pointer type for raw access to the component array. More... | |
| typedef const T * | ConstPointer |
| Constant pointer type for raw access to the component array. More... | |
| typedef QuaternionReference< SelfType > | ClosureType |
| Closure type used when this quaternion appears inside another expression. More... | |
| typedef const QuaternionReference< const SelfType > | ConstClosureType |
| Constant closure type used when this quaternion appears inside another expression. More... | |
| typedef SelfType | QuaternionTemporaryType |
| Concrete temporary quaternion type used by expression-template machinery. More... | |
Public Types inherited from CDPL::Math::QuaternionContainer< Quaternion< T > > | |
| typedef Quaternion< T > | ContainerType |
| The derived quaternion container type. More... | |
Public Types inherited from CDPL::Math::QuaternionExpression< E > | |
| typedef E | ExpressionType |
| The derived quaternion expression type. More... | |
Public Types inherited from CDPL::Math::Expression< E > | |
| typedef E | ExpressionType |
| The derived expression type (made available to expression-template machinery). More... | |
Public Member Functions | |
| Quaternion () | |
| Constructs an uninitialized quaternion. More... | |
| Quaternion (const ValueType &c1, const ValueType &c2=ValueType(), const ValueType &c3=ValueType(), const ValueType &c4=ValueType()) | |
| Constructs the quaternion with the supplied component values (omitted components default to the value-initialized ValueType). More... | |
| Quaternion (const Quaternion &q) | |
| Constructs a copy of the quaternion q. More... | |
| template<typename E > | |
| Quaternion (const QuaternionExpression< E > &e) | |
| Constructs the quaternion from the quaternion expression e. More... | |
| Pointer | getData () |
| Returns a pointer to the contiguous 4-element component array. More... | |
| ConstPointer | getData () const |
Returns a const pointer to the contiguous 4-element component array. More... | |
| Reference | getC1 () |
| Returns a mutable reference to the real component C1. More... | |
| Reference | getC2 () |
| Returns a mutable reference to the imaginary component C2. More... | |
| Reference | getC3 () |
| Returns a mutable reference to the imaginary component C3. More... | |
| Reference | getC4 () |
| Returns a mutable reference to the imaginary component C4. More... | |
| ConstReference | getC1 () const |
Returns a const reference to the real component C1. More... | |
| ConstReference | getC2 () const |
Returns a const reference to the imaginary component C2. More... | |
| ConstReference | getC3 () const |
Returns a const reference to the imaginary component C3. More... | |
| ConstReference | getC4 () const |
Returns a const reference to the imaginary component C4. More... | |
| void | set (const ValueType &c1=ValueType(), const ValueType &c2=ValueType(), const ValueType &c3=ValueType(), const ValueType &c4=ValueType()) |
| Sets the four quaternion components to the supplied values (omitted arguments default to the value-initialized ValueType). More... | |
| Quaternion & | operator= (const Quaternion &q) |
| Copy-assigns the components of q to this quaternion. More... | |
| template<typename C > | |
| Quaternion & | operator= (const QuaternionContainer< C > &c) |
| Assigns the components of the quaternion container c to this quaternion (no alias check needed). More... | |
| template<typename E > | |
| Quaternion & | operator= (const QuaternionExpression< E > &e) |
| Assigns the quaternion expression e to this quaternion (via a temporary to handle aliasing). More... | |
| template<typename T1 > | |
| std::enable_if< IsScalar< T1 >::value, Quaternion >::type & | operator= (const T1 &t) |
| Assigns the scalar t to the real component (zeroing the three imaginary components). More... | |
| template<typename T1 > | |
| std::enable_if< IsScalar< T1 >::value, Quaternion >::type & | operator+= (const T1 &t) |
| Adds the scalar t to the real component. More... | |
| template<typename C > | |
| Quaternion & | operator+= (const QuaternionContainer< C > &c) |
| Adds the components of the quaternion container c to this quaternion (no alias check needed). More... | |
| template<typename E > | |
| Quaternion & | operator+= (const QuaternionExpression< E > &e) |
| Adds the quaternion expression e to this quaternion (via a temporary to handle aliasing). More... | |
| template<typename T1 > | |
| std::enable_if< IsScalar< T1 >::value, Quaternion >::type & | operator-= (const T1 &t) |
| Subtracts the scalar t from the real component. More... | |
| template<typename C > | |
| Quaternion & | operator-= (const QuaternionContainer< C > &c) |
| Subtracts the components of the quaternion container c from this quaternion (no alias check needed). More... | |
| template<typename E > | |
| Quaternion & | operator-= (const QuaternionExpression< E > &e) |
| Subtracts the quaternion expression e from this quaternion (via a temporary to handle aliasing). More... | |
| template<typename T1 > | |
| std::enable_if< IsScalar< T1 >::value, Quaternion >::type & | operator*= (const T1 &t) |
| Multiplies every component by the scalar t. More... | |
| template<typename E > | |
| Quaternion & | operator*= (const QuaternionExpression< E > &e) |
| Right-multiplies this quaternion by the quaternion expression e (Hamilton product, via a temporary). More... | |
| template<typename T1 > | |
| std::enable_if< IsScalar< T1 >::value, Quaternion >::type & | operator/= (const T1 &t) |
| Divides every component by the scalar t. More... | |
| template<typename E > | |
| Quaternion & | operator/= (const QuaternionExpression< E > &e) |
| Right-divides this quaternion by the quaternion expression e (Hamilton-product inverse, via a temporary). More... | |
| template<typename E > | |
| Quaternion & | assign (const QuaternionExpression< E > &e) |
| Assigns the quaternion expression e to this quaternion without intermediate temporary. More... | |
| template<typename E > | |
| Quaternion & | plusAssign (const QuaternionExpression< E > &e) |
| Adds the quaternion expression e to this quaternion without intermediate temporary. More... | |
| template<typename E > | |
| Quaternion & | minusAssign (const QuaternionExpression< E > &e) |
| Subtracts the quaternion expression e from this quaternion without intermediate temporary. More... | |
| void | swap (Quaternion &q) |
| Swaps the four components of this quaternion with those of q. More... | |
Public Member Functions inherited from CDPL::Math::QuaternionContainer< Quaternion< T > > | |
| const ContainerType & | operator() () const |
Returns a const reference to the derived quaternion container. More... | |
| ContainerType & | operator() () |
| Returns a reference to the derived quaternion container. More... | |
Public Member Functions inherited from CDPL::Math::QuaternionExpression< E > | |
| const ExpressionType & | operator() () const |
Returns a const reference to the derived quaternion expression. More... | |
| ExpressionType & | operator() () |
| Returns a reference to the derived quaternion expression. More... | |
Friends | |
| void | swap (Quaternion &q1, Quaternion &q2) |
| ADL-enabled free-function form of swap(). More... | |
Additional Inherited Members | |
Protected Member Functions inherited from CDPL::Math::QuaternionContainer< Quaternion< T > > | |
| QuaternionContainer () | |
| ~QuaternionContainer () | |
Protected Member Functions inherited from CDPL::Math::QuaternionExpression< E > | |
| QuaternionExpression () | |
| ~QuaternionExpression () | |
Protected Member Functions inherited from CDPL::Math::Expression< E > | |
| Expression () | |
| ~Expression () | |
General 4-component quaternion \( q = c_1 + c_2 i + c_3 j + c_4 k \).
| T | The scalar component value type. |
| typedef T CDPL::Math::Quaternion< T >::ValueType |
The scalar component value type.
| typedef T& CDPL::Math::Quaternion< T >::Reference |
Mutable reference type to a component.
| typedef const T& CDPL::Math::Quaternion< T >::ConstReference |
Constant reference type to a component.
| typedef ValueType CDPL::Math::Quaternion< T >::ArrayType[4] |
The plain C-array type used for in-memory storage of the four components.
| typedef T* CDPL::Math::Quaternion< T >::Pointer |
Pointer type for raw access to the component array.
| typedef const T* CDPL::Math::Quaternion< T >::ConstPointer |
Constant pointer type for raw access to the component array.
| typedef QuaternionReference<SelfType> CDPL::Math::Quaternion< T >::ClosureType |
Closure type used when this quaternion appears inside another expression.
| typedef const QuaternionReference<const SelfType> CDPL::Math::Quaternion< T >::ConstClosureType |
Constant closure type used when this quaternion appears inside another expression.
| typedef SelfType CDPL::Math::Quaternion< T >::QuaternionTemporaryType |
Concrete temporary quaternion type used by expression-template machinery.
|
inline |
Constructs an uninitialized quaternion.
|
inlineexplicit |
Constructs the quaternion with the supplied component values (omitted components default to the value-initialized ValueType).
| c1 | The real component. |
| c2 | The first imaginary component. |
| c3 | The second imaginary component. |
| c4 | The third imaginary component. |
|
inline |
Constructs a copy of the quaternion q.
| q | The quaternion to copy. |
|
inline |
Constructs the quaternion from the quaternion expression e.
| E | The quaternion expression type. |
| e | The quaternion expression to materialize. |
|
inline |
Returns a pointer to the contiguous 4-element component array.
|
inline |
Returns a const pointer to the contiguous 4-element component array.
const pointer to the component array.
|
inline |
Returns a mutable reference to the real component C1.
|
inline |
Returns a mutable reference to the imaginary component C2.
|
inline |
Returns a mutable reference to the imaginary component C3.
|
inline |
Returns a mutable reference to the imaginary component C4.
|
inline |
Returns a const reference to the real component C1.
const reference to C1.
|
inline |
Returns a const reference to the imaginary component C2.
const reference to C2.
|
inline |
Returns a const reference to the imaginary component C3.
const reference to C3.
|
inline |
Returns a const reference to the imaginary component C4.
const reference to C4.
|
inline |
Sets the four quaternion components to the supplied values (omitted arguments default to the value-initialized ValueType).
| c1 | The new real component. |
| c2 | The new first imaginary component. |
| c3 | The new second imaginary component. |
| c4 | The new third imaginary component. |
|
inline |
Copy-assigns the components of q to this quaternion.
| q | The source quaternion. |
|
inline |
Assigns the components of the quaternion container c to this quaternion (no alias check needed).
| C | The source quaternion container type. |
| c | The source quaternion container. |
|
inline |
Assigns the quaternion expression e to this quaternion (via a temporary to handle aliasing).
| E | The source quaternion expression type. |
| e | The source quaternion expression. |
|
inline |
Assigns the scalar t to the real component (zeroing the three imaginary components).
| T1 | The scalar type. |
| t | The scalar value. |
|
inline |
Adds the scalar t to the real component.
| T1 | The scalar type. |
| t | The scalar addend. |
|
inline |
Adds the components of the quaternion container c to this quaternion (no alias check needed).
| C | The source quaternion container type. |
| c | The source quaternion container. |
|
inline |
Adds the quaternion expression e to this quaternion (via a temporary to handle aliasing).
| E | The source quaternion expression type. |
| e | The source quaternion expression. |
|
inline |
Subtracts the scalar t from the real component.
| T1 | The scalar type. |
| t | The scalar subtrahend. |
|
inline |
Subtracts the components of the quaternion container c from this quaternion (no alias check needed).
| C | The source quaternion container type. |
| c | The source quaternion container. |
|
inline |
Subtracts the quaternion expression e from this quaternion (via a temporary to handle aliasing).
| E | The source quaternion expression type. |
| e | The source quaternion expression. |
|
inline |
Multiplies every component by the scalar t.
| T1 | The scalar type. |
| t | The scalar multiplier. |
|
inline |
Right-multiplies this quaternion by the quaternion expression e (Hamilton product, via a temporary).
| E | The right-hand quaternion expression type. |
| e | The right-hand quaternion expression. |
|
inline |
Divides every component by the scalar t.
| T1 | The scalar type. |
| t | The scalar divisor. |
|
inline |
Right-divides this quaternion by the quaternion expression e (Hamilton-product inverse, via a temporary).
| E | The right-hand quaternion expression type. |
| e | The right-hand quaternion expression. |
|
inline |
Assigns the quaternion expression e to this quaternion without intermediate temporary.
| E | The source quaternion expression type. |
| e | The source quaternion expression. |
|
inline |
Adds the quaternion expression e to this quaternion without intermediate temporary.
| E | The source quaternion expression type. |
| e | The source quaternion expression. |
|
inline |
Subtracts the quaternion expression e from this quaternion without intermediate temporary.
| E | The source quaternion expression type. |
| e | The source quaternion expression. |
|
inline |
Swaps the four components of this quaternion with those of q.
| q | The quaternion to swap with. |
|
friend |
ADL-enabled free-function form of swap().
| q1 | The first quaternion. |
| q2 | The second quaternion. |