Define a quaternion container.
More...
#include <vctForwardDeclarations.h>
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
template<class _containerType>
template<class _containerType>
template<class _containerType>
template<class _containerType>
template<class _containerType>
template<class _containerType>
Default constructor. Does nothing.
template<class _containerType>
Constructor from 4 elements.
- Parameters
-
x | The first imaginary component |
y | The second imaginary component |
z | The third imaginary component |
r | The real component |
template<class _containerType>
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.
template<class _containerType>
Returns the conjugate of this quaternion. This method returns a copy of the conjugate and does not modify this quaternion.
template<class _containerType>
template<class __containerTypeOther >
Sets this quaternion as the conjugate of another one.
- Parameters
-
otherQuaternion | Quaternion used to compute the conjugate. |
template<class _containerType>
Replaces this quaternion by its conjugate.
template<class _containerType>
template<class __containerTypeOther >
Divide this quaternion by another, i.e., this = this / other.
template<class _containerType>
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.
template<class _containerType>
template<class __containerTypeOther >
Post-multiply this quaternion by another, i.e., this = this * other.
- Note
- Quaternion product is non-commutative.
template<class _containerType>
template<class __containerTypeOther >
Pre-multiply this quaternion by another, i.e., this = other * this.
- Note
- Quaternion product is non-commutative.
template<class _containerType>
template<class __containerType1 , class __containerType2 >
Set this quaternion as the product of two other ones.
- Parameters
-
quat1 | Left operand |
quat2 | Right operand |
- Note
- Quaternion product in non-commutative.
template<class _containerType>
template<class __containerType1 , class __containerType2 >
Compute the quotient quat1 / quat2. The reciprocal of a quaternion q is conj(q) / norm(q)
template<class _containerType>
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.
template<class _containerType>
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.
template<class _containerType>
vctQuaternionBase< _containerType >::VCT_CONTAINER_TRAITS_TYPEDEFS |
( |
typename ContainerType::value_type |
| ) |
|
The documentation for this class was generated from the following files: