ERC CISST - cisst software

vctQuaternionBase< _containerType > Class Template Reference

#include <vctQuaternionBase.h>

Inheritance diagram for vctQuaternionBase< _containerType >:

Inheritance graph
[legend]
Collaboration diagram for vctQuaternionBase< _containerType >:

Collaboration graph
[legend]
List of all members.

Detailed Description

template<class _containerType>
class vctQuaternionBase< _containerType >

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.

Parameters:
_baseType The base class used to contain the 4 elements.
See also:
vctFixedSizeVector, vctDynamicVector

Definition at line 50 of file vctQuaternionBase.h.

Public Types

Public Member Functions

Protected Member Functions


Constructor & Destructor Documentation

template<class _containerType>
vctQuaternionBase< _containerType >::vctQuaternionBase ( void   )  [inline]

Default constructor. Does nothing.

Definition at line 71 of file vctQuaternionBase.h.

template<class _containerType>
vctQuaternionBase< _containerType >::vctQuaternionBase ( const value_type &  x,
const value_type &  y,
const value_type &  z,
const value_type &  r 
) [inline]

Constructor from 4 elements.

Parameters:
x The first imaginary component
y The second imaginary component
z The third imaginary component
r The real component

Definition at line 84 of file vctQuaternionBase.h.


Member Function Documentation

template<class _containerType>
void vctQuaternionBase< _containerType >::Allocate ( void   )  [inline, protected]

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.

Definition at line 57 of file vctQuaternionBase.h.

Referenced by vctQuaternionBase< vctFixedSizeVector< double, 4 > >::vctQuaternionBase().

template<class _containerType>
const_reference vctQuaternionBase< _containerType >::R ( void   )  const [inline]

Returns the last element of the quaternion, i.e. the real part. This method is const. The methods X(), Y() and Z() are inherited from the base class.

Definition at line 102 of file vctQuaternionBase.h.

Referenced by vctQuaternionBase< vctFixedSizeVector< double, 4 > >::ConjugateOf(), vctQuaternionBase< vctFixedSizeVector< double, 4 > >::ProductOf(), vctQuaternionBase< vctFixedSizeVector< double, 4 > >::QuotientOf(), and vctQuaternionBase< vctFixedSizeVector< double, 4 > >::vctQuaternionBase().

template<class _containerType>
reference vctQuaternionBase< _containerType >::R ( void   )  [inline]

Access the last element of the quaternion, i.e. the real part. This method is not const. The methods X(), Y() and Z() are inherited from the base class.

Definition at line 109 of file vctQuaternionBase.h.

template<class _containerType>
template<class __containerTypeOther>
ThisType& vctQuaternionBase< _containerType >::ConjugateOf ( const vctQuaternionBase< __containerTypeOther > &  otherQuaternion  )  [inline]

Sets this quaternion as the conjugate of another one.

Parameters:
otherQuaternion Quaternion used to compute the conjugate.

Definition at line 117 of file vctQuaternionBase.h.

template<class _containerType>
ThisType& vctQuaternionBase< _containerType >::ConjugateSelf ( void   )  [inline]

Replaces this quaternion by its conjugate.

Definition at line 127 of file vctQuaternionBase.h.

template<class _containerType>
ThisType vctQuaternionBase< _containerType >::Conjugate ( void   )  const [inline]

Returns the conjugate of this quaternion. This method returns a copy of the conjugate and does not modify this quaternion.

Definition at line 137 of file vctQuaternionBase.h.

template<class _containerType>
template<class __containerType1, class __containerType2>
ThisType& vctQuaternionBase< _containerType >::ProductOf ( const vctQuaternionBase< __containerType1 > &  quat1,
const vctQuaternionBase< __containerType2 > &  quat2 
) [inline]

Set this quaternion as the product of two other ones.

Parameters:
quat1 Left operand
quat2 Right operand
Note:
Quaternion product in non-commutative.

Definition at line 150 of file vctQuaternionBase.h.

Referenced by operator *(), vctQuaternionBase< vctFixedSizeVector< double, 4 > >::PostMultiply(), and vctQuaternionBase< vctFixedSizeVector< double, 4 > >::PreMultiply().

template<class _containerType>
template<class __containerType1, class __containerType2>
ThisType& vctQuaternionBase< _containerType >::QuotientOf ( const vctQuaternionBase< __containerType1 > &  quat1,
const vctQuaternionBase< __containerType2 > &  quat2 
) [inline]

Compute the quotient quat1 / quat2. The reciprocal of a quaternion q is conj(q) / norm(q)

Definition at line 162 of file vctQuaternionBase.h.

Referenced by operator/().

template<class _containerType>
template<class __containerTypeOther>
ThisType& vctQuaternionBase< _containerType >::PostMultiply ( const vctQuaternionBase< __containerTypeOther > &  other  )  [inline]

Post-multiply this quaternion by another, i.e., this = this * other.

Note:
Quaternion product is non-commutative.

Definition at line 178 of file vctQuaternionBase.h.

template<class _containerType>
template<class __containerTypeOther>
ThisType& vctQuaternionBase< _containerType >::PreMultiply ( const vctQuaternionBase< __containerTypeOther > &  other  )  [inline]

Pre-multiply this quaternion by another, i.e., this = other * this.

Note:
Quaternion product is non-commutative.

Definition at line 189 of file vctQuaternionBase.h.

template<class _containerType>
template<class __containerTypeOther>
ThisType& vctQuaternionBase< _containerType >::Divide ( const vctQuaternionBase< __containerTypeOther > &  other  )  [inline]

Divide this quaternion by another, i.e., this = this / other.

Definition at line 198 of file vctQuaternionBase.h.

Referenced by vctQuaternionBase< vctFixedSizeVector< double, 4 > >::Divide().

template<class _containerType>
ThisType& vctQuaternionBase< _containerType >::Divide ( const value_type  s  )  [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.

Definition at line 209 of file vctQuaternionBase.h.


The documentation for this class was generated from the following file:
erc-cisst-devel<at>lists.johnshopkins.edu