|
cisst-saw
|
Define a quaternion container. More...
#include <vctQuaternionBase.h>
Public Types | |
| enum | { SIZE = 4 } |
| typedef _containerType | BaseType |
| typedef _containerType | ContainerType |
| typedef vctQuaternionBase< _containerType > | ThisType |
| typedef cmnTypeTraits< value_type > | TypeTraits |
Public Member Functions | |
| VCT_CONTAINER_TRAITS_TYPEDEFS (typename ContainerType::value_type) | |
| vctQuaternionBase (void) | |
| vctQuaternionBase (const value_type &x, const value_type &y, const value_type &z, const value_type &r) | |
| const_reference | R (void) const |
| reference | R (void) |
| template<class __containerTypeOther> | |
| ThisType & | ConjugateOf (const vctQuaternionBase< __containerTypeOther > &otherQuaternion) |
| ThisType & | ConjugateSelf (void) |
| ThisType | Conjugate (void) const |
| template<class __containerType1, class __containerType2> | |
| ThisType & | ProductOf (const vctQuaternionBase< __containerType1 > &quat1, const vctQuaternionBase< __containerType2 > &quat2) |
| template<class __containerType1, class __containerType2> | |
| ThisType & | QuotientOf (const vctQuaternionBase< __containerType1 > &quat1, const vctQuaternionBase< __containerType2 > &quat2) |
| template<class __containerTypeOther> | |
| ThisType & | PostMultiply (const vctQuaternionBase< __containerTypeOther > &other) |
| template<class __containerTypeOther> | |
| ThisType & | PreMultiply (const vctQuaternionBase< __containerTypeOther > &other) |
| template<class __containerTypeOther> | |
| ThisType & | Divide (const vctQuaternionBase< __containerTypeOther > &other) |
| ThisType & | Divide (const value_type s) |
Protected Member Functions | |
| void | Allocate (void) |
| void | Allocate (void) |
| void | Allocate (void) |
Define a quaternion container.
It is important to note that the class vctQuaternion is for any quaternion, i.e. it does not necessary represent a unit quaternion.
| _baseType | The base class used to contain the 4 elements. |
| typedef _containerType vctQuaternionBase< _containerType >::BaseType |
| typedef _containerType vctQuaternionBase< _containerType >::ContainerType |
| typedef vctQuaternionBase<_containerType> vctQuaternionBase< _containerType >::ThisType |
| typedef cmnTypeTraits<value_type> vctQuaternionBase< _containerType >::TypeTraits |
|
inline |
Default constructor. Does nothing.
|
inline |
Constructor from 4 elements.
| x | The first imaginary component |
| y | The second imaginary component |
| z | The third imaginary component |
| r | The real component |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
Allocate memory for the underlying container if needed. By default, this methods does nothing. For any container requiring a memory allocation, it is necessary to specialize this method.
|
inline |
Returns the conjugate of this quaternion. This method returns a copy of the conjugate and does not modify this quaternion.
|
inline |
Sets this quaternion as the conjugate of another one.
| otherQuaternion | Quaternion used to compute the conjugate. |
|
inline |
Replaces this quaternion by its conjugate.
|
inline |
Divide this quaternion by a scalar: equal to elementwise division. The method re-implements vector elementwise division, which is otherwise shadowed by the Divide(ThisType) method.
|
inline |
Divide this quaternion by another, i.e., this = this / other.
|
inline |
Post-multiply this quaternion by another, i.e., this = this * other.
|
inline |
Pre-multiply this quaternion by another, i.e., this = other * this.
|
inline |
Set this quaternion as the product of two other ones.
| quat1 | Left operand |
| quat2 | Right operand |
|
inline |
Compute the quotient quat1 / quat2. The reciprocal of a quaternion q is conj(q) / norm(q)
|
inline |
|
inline |
| vctQuaternionBase< _containerType >::VCT_CONTAINER_TRAITS_TYPEDEFS | ( | typename ContainerType::value_type | ) |