cisst-saw
|
Define a rotation matrix for a space of dimension 3. More...
#include <vctForwardDeclarations.h>
Public Types | |
enum | { ROWS = 3, COLS = 3 } |
enum | { DIMENSION = 3 } |
typedef _containerType | BaseType |
typedef _containerType | ContainerType |
typedef vctMatrixRotation3ConstBase < ContainerType > | ThisType |
typedef vctMatrixRotation3 < value_type > | RotationValueType |
typedef cmnTypeTraits< value_type > | TypeTraits |
Public Member Functions | |
VCT_CONTAINER_TRAITS_TYPEDEFS (typename ContainerType::value_type) | |
RotationValueType | Normalized (void) const |
bool | IsNormalized (value_type tolerance=TypeTraits::Tolerance()) const |
RotationValueType | Inverse (void) const |
template<stride_type __stride1, class __dataPtrType1 , stride_type __stride2, class __dataPtrType2 > | |
void | ApplyTo (const vctFixedSizeConstVectorBase< DIMENSION, __stride1, value_type, __dataPtrType1 > &input, vctFixedSizeVectorBase< DIMENSION, __stride2, value_type, __dataPtrType2 > &output) const |
template<stride_type __stride, class __dataPtrType > | |
vctFixedSizeVector< value_type, DIMENSION > | ApplyTo (const vctFixedSizeConstVectorBase< DIMENSION, __stride, value_type, __dataPtrType > &input) const |
ThisType | ApplyTo (const ThisType &input) const |
template<class __vectorOwnerType1 , class __vectorOwnerType2 > | |
void | ApplyTo (const vctDynamicConstVectorBase< __vectorOwnerType1, value_type > &input, vctDynamicVectorBase< __vectorOwnerType2, value_type > &output) const throw (std::runtime_error) |
template<class __vectorOwnerType , stride_type __stride, class __dataPtrType > | |
void | ApplyTo (const vctDynamicConstVectorBase< __vectorOwnerType, value_type > &input, vctFixedSizeVectorBase< DIMENSION, __stride, value_type, __dataPtrType > &output) const throw (std::runtime_error) |
template<class __vectorOwnerType > | |
vctFixedSizeVector< value_type, DIMENSION > | ApplyTo (const vctDynamicConstVectorBase< __vectorOwnerType, value_type > &input) const |
template<stride_type __stride1, class __dataPtrType1 , stride_type __stride2, class __dataPtrType2 > | |
void | ApplyInverseTo (const vctFixedSizeConstVectorBase< DIMENSION, __stride1, value_type, __dataPtrType1 > &input, vctFixedSizeVectorBase< DIMENSION, __stride2, value_type, __dataPtrType2 > &output) const |
template<stride_type __stride, class __dataPtrType > | |
vctFixedSizeVector< value_type, DIMENSION > | ApplyInverseTo (const vctFixedSizeConstVectorBase< DIMENSION, __stride, value_type, __dataPtrType > &input) const |
template<class __vectorOwnerType > | |
vctFixedSizeVector< value_type, DIMENSION > | ApplyInverseTo (const vctDynamicConstVectorBase< __vectorOwnerType, value_type > &input) const |
void | ApplyInverseTo (const ThisType &input, ThisType &output) const |
ThisType | ApplyInverseTo (const ThisType &input) const |
template<class __vectorOwnerType1 , class __vectorOwnerType2 > | |
void | ApplyInverseTo (const vctDynamicConstVectorBase< __vectorOwnerType1, value_type > &input, vctDynamicVectorBase< __vectorOwnerType2, value_type > &output) const |
template<class __vectorOwnerType , stride_type __stride, class __dataPtrType > | |
void | ApplyInverseTo (const vctDynamicConstVectorBase< __vectorOwnerType, value_type > &input, vctFixedSizeVectorBase< DIMENSION, __stride, value_type, __dataPtrType > &output) const |
template<size_type __cols, stride_type __rowStride1, stride_type __colStride1, class __dataPtrType1 , stride_type __rowStride2, stride_type __colStride2, class __dataPtrType2 > | |
void | ApplyTo (const vctFixedSizeConstMatrixBase< DIMENSION, __cols, __rowStride1, __colStride1, value_type, __dataPtrType1 > &input, vctFixedSizeMatrixBase< DIMENSION, __cols, __rowStride2, __colStride2, value_type, __dataPtrType2 > &output) const |
template<class __matrixOwnerType1 , class __matrixOwnerType2 > | |
void | ApplyTo (const vctDynamicConstMatrixBase< __matrixOwnerType1, value_type > &input, vctDynamicMatrixBase< __matrixOwnerType2, value_type > &output) const |
template<size_type __cols, stride_type __rowStride1, stride_type __colStride1, class __dataPtrType1 , stride_type __rowStride2, stride_type __colStride2, class __dataPtrType2 > | |
void | ApplyInverseTo (const vctFixedSizeConstMatrixBase< DIMENSION, __cols, __rowStride1, __colStride1, value_type, __dataPtrType1 > &input, vctFixedSizeMatrixBase< DIMENSION, __cols, __rowStride2, __colStride2, value_type, __dataPtrType2 > &output) const |
template<class __matrixOwnerType1 , class __matrixOwnerType2 > | |
void | ApplyInverseTo (const vctDynamicConstMatrixBase< __matrixOwnerType1, value_type > &input, vctDynamicMatrixBase< __matrixOwnerType2, value_type > &output) const |
ThisType | operator* (const ThisType &input) const |
template<stride_type __stride, class __dataPtrType > | |
vctFixedSizeVector< value_type, DIMENSION > | operator* (const vctFixedSizeConstVectorBase< DIMENSION, __stride, value_type, __dataPtrType > &input) const |
template<class __vectorOwnerType1 > | |
vctFixedSizeVector< value_type, DIMENSION > | operator* (const vctDynamicConstVectorBase< __vectorOwnerType1, value_type > &input) const |
bool | AlmostEquivalent (const ThisType &other, value_type tolerance=TypeTraits::Tolerance()) const |
Static Public Member Functions | |
static CISST_EXPORT const RotationValueType & | Identity () |
Protected Member Functions | |
void | ThrowUnlessIsNormalized (void) const throw (std::runtime_error) |
template<class _inputType > | |
void | ThrowUnlessIsNormalized (const _inputType &input) const throw (std::runtime_error) |
Define a rotation matrix for a space of dimension 3.
This class is templated by the type of container used to store the rotation matrix. This class is an internal class, i.e. it is not intended for the end-user. The class which should be used by most is vctMatRot3 (eventually vctMatrixRotation3<_elementType>).
The main goal of this meta rotation matrix class is to ease the interface with Python. For a native Python object, a matrix rotation can be defined based on a vctDynamicMatrix which is much easier to wrap than a vctFixedSizeMatrix. For a C++ object accessed from Python, the rotation matrix will be defined using vctMatrixRotation3Base<vctDynamicMatrixRef<double> >, referring to the C++ vctMatrixRotation3Base<vctFixedSizeMatrix<double, 3, 3> >.
_containerType | The type of the matrix. |
typedef _containerType vctMatrixRotation3ConstBase< _containerType >::BaseType |
typedef _containerType vctMatrixRotation3ConstBase< _containerType >::ContainerType |
typedef vctMatrixRotation3<value_type> vctMatrixRotation3ConstBase< _containerType >::RotationValueType |
Type used to return by copy
typedef vctMatrixRotation3ConstBase<ContainerType> vctMatrixRotation3ConstBase< _containerType >::ThisType |
typedef cmnTypeTraits<value_type> vctMatrixRotation3ConstBase< _containerType >::TypeTraits |
Traits used for all useful types and values related to the element type.
|
inline |
Return true if this rotation is effectively equivalent to the other rotation, up to the given tolerance. For a rotation matrix, this method is strictly the same as AlmostEqual.
|
inline |
Apply the inverse of the rotation to a vector of fixed size
input | The input vector |
output | The output vector |
|
inline |
Apply the the inverse of the rotation to a vector of fixed size 3. The result is returned by copy. This interface might be more convenient for some but one should note that it is less efficient since it requires a copy.
input | The input vector |
|
inline |
Apply the inverse rotation to a dynamic vector of length 3. The result is returned by value.
|
inline |
Apply the inverse of the rotation to another rotation. The result is stored into a vctMatrixRotation3Base (ThisType) provided by the caller and passed by reference.
input | The input rotation |
output | The output rotation |
|
inline |
Apply the inverse of the rotation to another rotation. The result is returned by copy. This interface might be more convenient for some but one should note that it is less efficient since it requires a copy.
input | The input rotation |
|
inline |
Apply the the inverse of the rotation to a dynamic vector. The result is stored into another dynamic vector passed by reference by the caller. It is assumed that both are of size 3.
|
inline |
Apply the the inverse of the rotation to a dynamic vector. The result is stored into a fixed-size vector passed by reference by the caller. It is assumed that both are of size 3.
|
inline |
Apply the inverse rotation to a fixed-size matrix with 3 rows. The result is stored in another fixed-size matrix
|
inline |
Apply this rotation inverse to a dynamic matrix with 3 rows. The result is stored in another dynamic matrix.
|
inline |
Apply the rotation to a vector of fixed size 3. The result is stored into a vector of size 3 provided by the caller and passed by reference.
input | The input vector |
output | The output vector |
|
inline |
Apply the rotation to a vector of fixed size 3. The result is returned by copy. This interface might be more convenient for some but one should note that it is less efficient since it requires a copy.
input | The input vector |
|
inline |
Apply the rotation to another rotation. The result is returned by copy. This interface might be more convenient for some but one should note that it is less efficient since it requires a copy.
input | The input rotation |
|
inline |
Apply the rotation to a dynamic vector. The result is stored into another dynamic vector passed by reference by the caller. It is assumed that both are of size 3.
|
inline |
|
inline |
Apply the rotation to a dynamic vector of length 3. The result is returned by value.
|
inline |
Apply this rotation to a fixed-size matrix with 3 rows. The result is stored in another fixed-size matrix
|
inline |
Apply this rotation to a dynamic matrix with 3 rows. The result is stored in another dynamic matrix.
|
static |
Const reference to the identity. In this case, the identity matrix:
1 0 0 0 1 0 0 0 1
vctMatrixRotation3ConstBase< _containerType >::RotationValueType vctMatrixRotation3ConstBase< _containerType >::Inverse | ( | void | ) | const |
Create and return by copy the inverse of this matrix. This method is not the most efficient since it requires a copy. See also InverseSelf().
|
inline |
Test if this matrix is normalized. This methods checks that all the columns are normalized (within a margin of tolerance) and then checks that the three vectors are orthogonal to each other.
tolerance | Tolerance for the norm and scalar product tests. |
vctMatrixRotation3ConstBase< _containerType >::RotationValueType vctMatrixRotation3ConstBase< _containerType >::Normalized | ( | void | ) | const |
Returns the normalized version of this rotation. This method returns a copy of the normalized rotation and does not modify this rotation. See also NormalizedSelf().
|
inline |
Multiply two rotation matrices and return the result as a rotation matrix.
|
inline |
Override the * operator defined in the matrix base for matrix * vector. This prevents compiler confusion between the overloaded RotMat*RotMat and the base-class Mat*Vec
|
inline |
Implement operator * for MatrixRotatin * DynamicVector. Return type is set to fixed-size vector of length 3. It is the caller's responsibility to convert the return value to a dynamic vector, if so desired.
|
inlineprotected |
Throw an exception unless this rotation is normalized.
|
inlineprotected |
Throw an exception unless the input is normalized.
input | An object with IsNormalized method. |
vctMatrixRotation3ConstBase< _containerType >::VCT_CONTAINER_TRAITS_TYPEDEFS | ( | typename ContainerType::value_type | ) |