![]() |
Chemical Data Processing Library C++ API - Version 1.4.0
|
Lightweight quaternion expression that proxies a reference to an underlying quaternion container. More...
#include <Quaternion.hpp>
Inheritance diagram for CDPL::Math::QuaternionReference< Q >:Public Types | |
| typedef Q | QuaternionType |
| The wrapped quaternion type. More... | |
| typedef Q::ValueType | ValueType |
| The scalar component value type of the wrapped quaternion. More... | |
| typedef std::conditional< std::is_const< Q >::value, typename Q::ConstReference, typename Q::Reference >::type | Reference |
Mutable reference type (degrades to ConstReference when the wrapped quaternion is const). More... | |
| typedef Q::ConstReference | ConstReference |
| Constant reference type to a component. More... | |
| typedef SelfType | ClosureType |
| Closure type used when this proxy appears inside another expression. More... | |
| typedef const SelfType | ConstClosureType |
| Constant closure type used when this proxy appears inside another expression. More... | |
Public Types inherited from CDPL::Math::QuaternionExpression< QuaternionReference< Q > > | |
| typedef QuaternionReference< Q > | 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 | |
| QuaternionReference (QuaternionType &q) | |
| Constructs the reference proxy referring to q. 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... | |
| const QuaternionType & | getData () const |
Returns a const reference to the wrapped quaternion. More... | |
| QuaternionType & | getData () |
| Returns a reference to the wrapped quaternion. More... | |
| QuaternionReference & | operator= (const QuaternionReference &r) |
| Copy-assigns the wrapped quaternion from the quaternion referenced by r. More... | |
| template<typename E > | |
| QuaternionReference & | operator= (const QuaternionExpression< E > &e) |
| Assigns the quaternion expression e to the wrapped quaternion. More... | |
| template<typename T > | |
| std::enable_if< IsScalar< T >::value, QuaternionReference >::type & | operator= (const T &t) |
| Assigns the scalar t to the real component of the wrapped quaternion (other components are zeroed). More... | |
| template<typename E > | |
| QuaternionReference & | operator+= (const QuaternionExpression< E > &e) |
| Adds the quaternion expression e component-wise to the wrapped quaternion. More... | |
| template<typename T > | |
| std::enable_if< IsScalar< T >::value, QuaternionReference >::type & | operator+= (const T &t) |
| Adds the scalar t to the real component of the wrapped quaternion. More... | |
| template<typename E > | |
| QuaternionReference & | operator-= (const QuaternionExpression< E > &e) |
| Subtracts the quaternion expression e component-wise from the wrapped quaternion. More... | |
| template<typename T > | |
| std::enable_if< IsScalar< T >::value, QuaternionReference >::type & | operator-= (const T &t) |
| Subtracts the scalar t from the real component of the wrapped quaternion. More... | |
| template<typename E > | |
| QuaternionReference & | operator*= (const QuaternionExpression< E > &e) |
| Right-multiplies the wrapped quaternion by the quaternion expression e (Hamilton product). More... | |
| template<typename T > | |
| std::enable_if< IsScalar< T >::value, QuaternionReference >::type & | operator*= (const T &t) |
| Multiplies every component of the wrapped quaternion by the scalar t. More... | |
| template<typename E > | |
| QuaternionReference & | operator/= (const QuaternionExpression< E > &e) |
| Right-divides the wrapped quaternion by the quaternion expression e (Hamilton-product inverse). More... | |
| template<typename T > | |
| std::enable_if< IsScalar< T >::value, QuaternionReference >::type & | operator/= (const T &t) |
| Divides every component of the wrapped quaternion by the scalar t. More... | |
| template<typename E > | |
| QuaternionReference & | assign (const QuaternionExpression< E > &e) |
| Assigns the quaternion expression e to the wrapped quaternion without intermediate temporary. More... | |
| template<typename E > | |
| QuaternionReference & | plusAssign (const QuaternionExpression< E > &e) |
| Adds the quaternion expression e to the wrapped quaternion without intermediate temporary. More... | |
| template<typename E > | |
| QuaternionReference & | minusAssign (const QuaternionExpression< E > &e) |
| Subtracts the quaternion expression e from the wrapped quaternion without intermediate temporary. More... | |
| void | swap (QuaternionReference &r) |
| Swaps the contents of the two wrapped quaternions. More... | |
| void | set (const ValueType &c1=ValueType(), const ValueType &c2=ValueType(), const ValueType &c3=ValueType(), const ValueType &c4=ValueType()) |
| Sets the components of the wrapped quaternion to the supplied values (omitted components default to the value-initialized ValueType). More... | |
Public Member Functions inherited from CDPL::Math::QuaternionExpression< QuaternionReference< Q > > | |
| 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 (QuaternionReference &r1, QuaternionReference &r2) |
| ADL-enabled free-function form of swap(). More... | |
Additional Inherited Members | |
Protected Member Functions inherited from CDPL::Math::QuaternionExpression< QuaternionReference< Q > > | |
| QuaternionExpression () | |
| ~QuaternionExpression () | |
Protected Member Functions inherited from CDPL::Math::Expression< E > | |
| Expression () | |
| ~Expression () | |
Lightweight quaternion expression that proxies a reference to an underlying quaternion container.
| Q | The wrapped quaternion type. |
| typedef Q CDPL::Math::QuaternionReference< Q >::QuaternionType |
The wrapped quaternion type.
| typedef Q::ValueType CDPL::Math::QuaternionReference< Q >::ValueType |
The scalar component value type of the wrapped quaternion.
| typedef std::conditional<std::is_const<Q>::value, typename Q::ConstReference, typename Q::Reference>::type CDPL::Math::QuaternionReference< Q >::Reference |
Mutable reference type (degrades to ConstReference when the wrapped quaternion is const).
| typedef Q::ConstReference CDPL::Math::QuaternionReference< Q >::ConstReference |
Constant reference type to a component.
| typedef SelfType CDPL::Math::QuaternionReference< Q >::ClosureType |
Closure type used when this proxy appears inside another expression.
| typedef const SelfType CDPL::Math::QuaternionReference< Q >::ConstClosureType |
Constant closure type used when this proxy appears inside another expression.
|
inlineexplicit |
Constructs the reference proxy referring to q.
| q | The wrapped quaternion to proxy. |
|
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 |
Returns a const reference to the wrapped quaternion.
const reference to the wrapped quaternion.
|
inline |
Returns a reference to the wrapped quaternion.
|
inline |
Copy-assigns the wrapped quaternion from the quaternion referenced by r.
| r | The source reference proxy. |
|
inline |
Assigns the quaternion expression e to the wrapped quaternion.
| E | The source quaternion expression type. |
| e | The source quaternion expression. |
|
inline |
Assigns the scalar t to the real component of the wrapped quaternion (other components are zeroed).
| T | The scalar type. |
| t | The scalar value. |
|
inline |
Adds the quaternion expression e component-wise to the wrapped quaternion.
| E | The source quaternion expression type. |
| e | The source quaternion expression. |
|
inline |
Adds the scalar t to the real component of the wrapped quaternion.
| T | The scalar type. |
| t | The scalar addend. |
|
inline |
Subtracts the quaternion expression e component-wise from the wrapped quaternion.
| E | The source quaternion expression type. |
| e | The source quaternion expression. |
|
inline |
Subtracts the scalar t from the real component of the wrapped quaternion.
| T | The scalar type. |
| t | The scalar subtrahend. |
|
inline |
Right-multiplies the wrapped quaternion by the quaternion expression e (Hamilton product).
| E | The right-hand quaternion expression type. |
| e | The right-hand quaternion expression. |
|
inline |
Multiplies every component of the wrapped quaternion by the scalar t.
| T | The scalar type. |
| t | The scalar multiplier. |
|
inline |
Right-divides the wrapped quaternion by the quaternion expression e (Hamilton-product inverse).
| E | The right-hand quaternion expression type. |
| e | The right-hand quaternion expression. |
|
inline |
Divides every component of the wrapped quaternion by the scalar t.
| T | The scalar type. |
| t | The scalar divisor. |
|
inline |
Assigns the quaternion expression e to the wrapped quaternion without intermediate temporary.
| E | The source quaternion expression type. |
| e | The source quaternion expression. |
|
inline |
Adds the quaternion expression e to the wrapped quaternion without intermediate temporary.
| E | The source quaternion expression type. |
| e | The source quaternion expression. |
|
inline |
Subtracts the quaternion expression e from the wrapped quaternion without intermediate temporary.
| E | The source quaternion expression type. |
| e | The source quaternion expression. |
|
inline |
Swaps the contents of the two wrapped quaternions.
| r | The reference proxy to swap with. |
|
inline |
Sets the components of the wrapped quaternion to the supplied 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. |
|
friend |
ADL-enabled free-function form of swap().
| r1 | The first reference proxy. |
| r2 | The second reference proxy. |