ERC CISST - cisst software

vctMatrixRotation3ConstBase< _containerType > Class Template Reference

#include <vctMatrixRotation3ConstBase.h>

Inheritance diagram for vctMatrixRotation3ConstBase< _containerType >:

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

Collaboration graph
[legend]
List of all members.

Detailed Description

template<class _containerType>
class vctMatrixRotation3ConstBase< _containerType >

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> >.

Parameters:
_containerType The type of the matrix.
See also:
vctFixedSizeMatrix

Definition at line 58 of file vctMatrixRotation3ConstBase.h.

Public Types

Public Member Functions

Static Public Member Functions

Protected Member Functions


Member Typedef Documentation

template<class _containerType>
typedef vctMatrixRotation3<value_type> vctMatrixRotation3ConstBase< _containerType >::RotationValueType

Type used to return by copy

Definition at line 71 of file vctMatrixRotation3ConstBase.h.

template<class _containerType>
typedef cmnTypeTraits<value_type> vctMatrixRotation3ConstBase< _containerType >::TypeTraits

Traits used for all useful types and values related to the element type.

Definition at line 74 of file vctMatrixRotation3ConstBase.h.


Member Function Documentation

template<class _containerType>
void vctMatrixRotation3ConstBase< _containerType >::ThrowUnlessIsNormalized ( void   )  const throw (std::runtime_error) [inline, protected]

Throw an exception unless this rotation is normalized.

Definition at line 79 of file vctMatrixRotation3ConstBase.h.

template<class _containerType>
template<class _inputType>
void vctMatrixRotation3ConstBase< _containerType >::ThrowUnlessIsNormalized ( const _inputType &  input  )  const throw (std::runtime_error) [inline, protected]

Throw an exception unless the input is normalized.

Parameters:
input An object with IsNormalized method.

Definition at line 90 of file vctMatrixRotation3ConstBase.h.

template<class _containerType>
static CISST_EXPORT const RotationValueType& vctMatrixRotation3ConstBase< _containerType >::Identity (  )  [static]

Const reference to the identity. In this case, the identity matrix:

      1 0 0
      0 1 0
      0 0 1
      

template<class _containerType>
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().

Definition at line 362 of file vctMatrixRotation3.h.

References vctMatrixRotation3Base< _containerType >::NormalizedSelf().

Referenced by vctAxisAngleRotation3< _elementType >::FromNormalized(), and vctRodriguezRotation3Base< vctFixedSizeVector< _elementType, 3 > >::FromNormalized().

template<class _containerType>
bool vctMatrixRotation3ConstBase< _containerType >::IsNormalized ( value_type  tolerance = TypeTraits::Tolerance()  )  const [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.

Parameters:
tolerance Tolerance for the norm and scalar product tests.

Definition at line 119 of file vctMatrixRotation3ConstBase.h.

Referenced by vctMatrixRotation3ConstBase< vctFixedSizeMatrix< double, 3, 3, _rowMajor > >::ThrowUnlessIsNormalized().

template<class _containerType>
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().

Definition at line 371 of file vctMatrixRotation3.h.

References vctMatrixRotation3Base< _containerType >::InverseSelf().

template<class _containerType>
template<stride_type __stride1, class __dataPtrType1, stride_type __stride2, class __dataPtrType2>
void vctMatrixRotation3ConstBase< _containerType >::ApplyTo ( const vctFixedSizeConstVectorBase< DIMENSION, __stride1, value_type, __dataPtrType1 > &  input,
vctFixedSizeVectorBase< DIMENSION, __stride2, value_type, __dataPtrType2 > &  output 
) const [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.

Parameters:
input The input vector
output The output vector

Definition at line 159 of file vctMatrixRotation3ConstBase.h.

Referenced by vctMatrixRotation3ConstBase< vctFixedSizeMatrix< double, 3, 3, _rowMajor > >::ApplyTo(), and vctMatrixRotation3ConstBase< vctFixedSizeMatrix< double, 3, 3, _rowMajor > >::operator *().

template<class _containerType>
template<stride_type __stride, class __dataPtrType>
vctFixedSizeVector<value_type, DIMENSION> vctMatrixRotation3ConstBase< _containerType >::ApplyTo ( const vctFixedSizeConstVectorBase< DIMENSION, __stride, value_type, __dataPtrType > &  input  )  const [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.

Parameters:
input The input vector
Returns:
The output vector

Definition at line 182 of file vctMatrixRotation3ConstBase.h.

template<class _containerType>
ThisType vctMatrixRotation3ConstBase< _containerType >::ApplyTo ( const ThisType input  )  const [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.

Parameters:
input The input rotation
Returns:
The output rotation

Definition at line 198 of file vctMatrixRotation3ConstBase.h.

template<class _containerType>
template<class __vectorOwnerType1, class __vectorOwnerType2>
void vctMatrixRotation3ConstBase< _containerType >::ApplyTo ( const vctDynamicConstVectorBase< __vectorOwnerType1, value_type > &  input,
vctDynamicVectorBase< __vectorOwnerType2, value_type > &  output 
) const throw (std::runtime_error) [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.

Definition at line 212 of file vctMatrixRotation3ConstBase.h.

template<class _containerType>
template<class __vectorOwnerType>
vctFixedSizeVector<value_type, DIMENSION> vctMatrixRotation3ConstBase< _containerType >::ApplyTo ( const vctDynamicConstVectorBase< __vectorOwnerType, value_type > &  input  )  const [inline]

Apply the rotation to a dynamic vector of length 3. The result is returned by value.

Definition at line 248 of file vctMatrixRotation3ConstBase.h.

template<class _containerType>
template<stride_type __stride1, class __dataPtrType1, stride_type __stride2, class __dataPtrType2>
void vctMatrixRotation3ConstBase< _containerType >::ApplyInverseTo ( const vctFixedSizeConstVectorBase< DIMENSION, __stride1, value_type, __dataPtrType1 > &  input,
vctFixedSizeVectorBase< DIMENSION, __stride2, value_type, __dataPtrType2 > &  output 
) const [inline]

Apply the inverse of 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.

Parameters:
input The input vector
output The output vector

Definition at line 264 of file vctMatrixRotation3ConstBase.h.

Referenced by vctMatrixRotation3ConstBase< vctFixedSizeMatrix< double, 3, 3, _rowMajor > >::ApplyInverseTo().

template<class _containerType>
template<stride_type __stride, class __dataPtrType>
vctFixedSizeVector<value_type, DIMENSION> vctMatrixRotation3ConstBase< _containerType >::ApplyInverseTo ( const vctFixedSizeConstVectorBase< DIMENSION, __stride, value_type, __dataPtrType > &  input  )  const [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.

Parameters:
input The input vector
Returns:
The output vector

Definition at line 285 of file vctMatrixRotation3ConstBase.h.

template<class _containerType>
template<class __vectorOwnerType>
vctFixedSizeVector<value_type, DIMENSION> vctMatrixRotation3ConstBase< _containerType >::ApplyInverseTo ( const vctDynamicConstVectorBase< __vectorOwnerType, value_type > &  input  )  const [inline]

Apply the inverse rotation to a dynamic vector of length 3. The result is returned by value.

Definition at line 296 of file vctMatrixRotation3ConstBase.h.

template<class _containerType>
void vctMatrixRotation3ConstBase< _containerType >::ApplyInverseTo ( const ThisType input,
ThisType output 
) const [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.

Parameters:
input The input rotation
output The output rotation

Definition at line 311 of file vctMatrixRotation3ConstBase.h.

template<class _containerType>
ThisType vctMatrixRotation3ConstBase< _containerType >::ApplyInverseTo ( const ThisType input  )  const [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.

Parameters:
input The input rotation
Returns:
The output rotation

Definition at line 325 of file vctMatrixRotation3ConstBase.h.

template<class _containerType>
template<class __vectorOwnerType1, class __vectorOwnerType2>
void vctMatrixRotation3ConstBase< _containerType >::ApplyInverseTo ( const vctDynamicConstVectorBase< __vectorOwnerType1, value_type > &  input,
vctDynamicVectorBase< __vectorOwnerType2, value_type > &  output 
) const [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.

Definition at line 339 of file vctMatrixRotation3ConstBase.h.

template<class _containerType>
template<class __vectorOwnerType, stride_type __stride, class __dataPtrType>
void vctMatrixRotation3ConstBase< _containerType >::ApplyInverseTo ( const vctDynamicConstVectorBase< __vectorOwnerType, value_type > &  input,
vctFixedSizeVectorBase< DIMENSION, __stride, value_type, __dataPtrType > &  output 
) const [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.

Definition at line 358 of file vctMatrixRotation3ConstBase.h.

template<class _containerType>
template<size_type __cols, stride_type __rowStride1, stride_type __colStride1, class __dataPtrType1, stride_type __rowStride2, stride_type __colStride2, class __dataPtrType2>
void vctMatrixRotation3ConstBase< _containerType >::ApplyTo ( const vctFixedSizeConstMatrixBase< DIMENSION, __cols, __rowStride1, __colStride1, value_type, __dataPtrType1 > &  input,
vctFixedSizeMatrixBase< DIMENSION, __cols, __rowStride2, __colStride2, value_type, __dataPtrType2 > &  output 
) const [inline]

Apply this rotation to a fixed-size matrix with 3 rows. The result is stored in another fixed-size matrix

Definition at line 375 of file vctMatrixRotation3ConstBase.h.

template<class _containerType>
template<class __matrixOwnerType1, class __matrixOwnerType2>
void vctMatrixRotation3ConstBase< _containerType >::ApplyTo ( const vctDynamicConstMatrixBase< __matrixOwnerType1, value_type > &  input,
vctDynamicMatrixBase< __matrixOwnerType2, value_type > &  output 
) const [inline]

Apply this rotation to a dynamic matrix with 3 rows. The result is stored in another dynamic matrix.

Definition at line 385 of file vctMatrixRotation3ConstBase.h.

template<class _containerType>
template<size_type __cols, stride_type __rowStride1, stride_type __colStride1, class __dataPtrType1, stride_type __rowStride2, stride_type __colStride2, class __dataPtrType2>
void vctMatrixRotation3ConstBase< _containerType >::ApplyInverseTo ( const vctFixedSizeConstMatrixBase< DIMENSION, __cols, __rowStride1, __colStride1, value_type, __dataPtrType1 > &  input,
vctFixedSizeMatrixBase< DIMENSION, __cols, __rowStride2, __colStride2, value_type, __dataPtrType2 > &  output 
) const [inline]

Apply the inverse rotation to a fixed-size matrix with 3 rows. The result is stored in another fixed-size matrix

Definition at line 399 of file vctMatrixRotation3ConstBase.h.

template<class _containerType>
template<class __matrixOwnerType1, class __matrixOwnerType2>
void vctMatrixRotation3ConstBase< _containerType >::ApplyInverseTo ( const vctDynamicConstMatrixBase< __matrixOwnerType1, value_type > &  input,
vctDynamicMatrixBase< __matrixOwnerType2, value_type > &  output 
) const [inline]

Apply this rotation inverse to a dynamic matrix with 3 rows. The result is stored in another dynamic matrix.

Definition at line 409 of file vctMatrixRotation3ConstBase.h.

template<class _containerType>
ThisType vctMatrixRotation3ConstBase< _containerType >::operator * ( const ThisType input  )  const [inline]

Multiply two rotation matrices and return the result as a rotation matrix.

Returns:
(*this) * other
Note:
this function overrides and shadows the operator * defined for basic matrix type. The latter returns a vctFixedSizeMatrix, while this version returns a specialized rotation matrix.

Definition at line 424 of file vctMatrixRotation3ConstBase.h.

template<class _containerType>
template<stride_type __stride, class __dataPtrType>
vctFixedSizeVector<value_type, DIMENSION> vctMatrixRotation3ConstBase< _containerType >::operator * ( const vctFixedSizeConstVectorBase< DIMENSION, __stride, value_type, __dataPtrType > &  input  )  const [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

Definition at line 435 of file vctMatrixRotation3ConstBase.h.

template<class _containerType>
template<class __vectorOwnerType1>
vctFixedSizeVector<value_type, DIMENSION> vctMatrixRotation3ConstBase< _containerType >::operator * ( const vctDynamicConstVectorBase< __vectorOwnerType1, value_type > &  input  )  const [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.

Definition at line 446 of file vctMatrixRotation3ConstBase.h.

template<class _containerType>
bool vctMatrixRotation3ConstBase< _containerType >::AlmostEquivalent ( const ThisType other,
value_type  tolerance = TypeTraits::Tolerance() 
) const [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.

See also:
AlmostEqual

Definition at line 459 of file vctMatrixRotation3ConstBase.h.


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