#include <vctFrameBase.h>
Collaboration diagram for vctFrameBase< _rotationType >:

The template parameter allows to change the orientation representation as well as the dimension. The orientation (or rotation) type must define an enum DIMENSION which is used to determine the size of the vector representing the translation (see vctFixedSizeVector).
This templating allows to create a frame based on a quaternion (dimension 3) or a matrix (dimension 2 or 3).
| _rotationType | The type of rotation |
Definition at line 51 of file vctFrameBase.h.
| vctFrameBase< _rotationType >::vctFrameBase | ( | void | ) | [inline] |
Default constructor. Sets the rotation matrix to identity.
Definition at line 69 of file vctFrameBase.h.
References vctFrameBase< _rotationType >::Assign(), and vctFrameBase< _rotationType >::Identity().
| vctFrameBase< _rotationType >::vctFrameBase | ( | const RotationType & | rotation, | |
| const vctFixedSizeConstVectorBase< DIMENSION, __stride, value_type, __dataPtrType > & | translation | |||
| ) | [inline] |
Constructor from a translation and a rotation.
Definition at line 75 of file vctFrameBase.h.
| static CISST_EXPORT const ThisType& vctFrameBase< _rotationType >::Identity | ( | ) | [static] |
Const reference to the identity. In this case, the translation is set to (0, 0, 0) and the rotation is set to identity using its own method RotationType::Identity().
Referenced by vctFrameBase< _rotationType >::vctFrameBase().
| ThisType& vctFrameBase< _rotationType >::InverseSelf | ( | void | ) | [inline] |
Inverse this frame.
Definition at line 120 of file vctFrameBase.h.
References vctFrameBase< _rotationType >::RotationMember, and vctFrameBase< _rotationType >::TranslationMember.
Referenced by vctFrameBase< _rotationType >::InverseOf().
| void vctFrameBase< _rotationType >::ApplyTo | ( | const vctFixedSizeConstVectorBase< DIMENSION, __stride1, value_type, __dataPtrType1 > & | input, | |
| vctFixedSizeVectorBase< DIMENSION, __stride2, value_type, __dataPtrType2 > & | output | |||
| ) | const [inline] |
Apply the transformation to a vector of fixed size DIMENSION. The result is stored into a vector of size DIMENSION provided by the caller and passed by reference.
| input | The input vector | |
| output | The output vector |
Definition at line 153 of file vctFrameBase.h.
References vctFixedSizeVectorBase< _size, _stride, _elementType, _dataPtrType >::Add(), vctFrameBase< _rotationType >::RotationMember, and vctFrameBase< _rotationType >::TranslationMember.
Referenced by vctFrameBase< _rotationType >::ApplyInverseTo(), vctFrameBase< _rotationType >::ApplyTo(), vctFrameBase< _rotationType >::operator *(), operator *(), and vctFrameBase< _rotationType >::ProductOf().
| vctFixedSizeVector<value_type, DIMENSION> vctFrameBase< _rotationType >::ApplyTo | ( | const vctFixedSizeConstVectorBase< DIMENSION, __stride, value_type, __dataPtrType > & | input | ) | const [inline] |
Apply the transformation to a vector of fixed size DIMENSION. 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 |
Definition at line 170 of file vctFrameBase.h.
References vctFrameBase< _rotationType >::ApplyTo().
| vctFixedSizeVector<value_type, DIMENSION> vctFrameBase< _rotationType >::ApplyTo | ( | const vctDynamicConstVectorBase< _vectorOwnerType, value_type > & | input | ) | const [inline] |
Apply the transformation to a dynamic vector of size DIMENSION. The result is returned by value.
| input | The input vector |
Definition at line 183 of file vctFrameBase.h.
References vctFrameBase< _rotationType >::ApplyTo().
| void vctFrameBase< _rotationType >::ApplyTo | ( | const ThisType & | input, | |
| ThisType & | output | |||
| ) | const [inline] |
Compose this transform over the input transform to obtain a new output transform passed by reference by the caller. The semantics of the operation are:
output = (*this) * input
if (*this) is [R1 | p1], input is [R2 | p2], then output will be [R1*R2 | R1*p2 + p1]
Definition at line 199 of file vctFrameBase.h.
References vctFrameBase< _rotationType >::ProductOf(), vctFrameBase< _rotationType >::Rotation(), vctFrameBase< _rotationType >::RotationMember, vctFrameBase< _rotationType >::Translation(), and vctFrameBase< _rotationType >::TranslationMember.
| void vctFrameBase< _rotationType >::ProductOf | ( | const ThisType & | left, | |
| ThisType & | right | |||
| ) | [inline] |
Set this frame as the compose two transformations. This method is provided to be consistent with all other containers which provide the method "ProductOf" and the operator "*".
Definition at line 211 of file vctFrameBase.h.
References vctFrameBase< _rotationType >::ApplyTo().
Referenced by vctFrameBase< _rotationType >::ApplyTo().
| ThisType vctFrameBase< _rotationType >::ApplyTo | ( | const ThisType & | input | ) | const [inline] |
Apply the transformation to another transformation. 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 transformation |
Definition at line 224 of file vctFrameBase.h.
References vctFrameBase< _rotationType >::ApplyTo().
| void vctFrameBase< _rotationType >::ApplyTo | ( | const vctDynamicConstVectorBase< _vectorOwnerType1, value_type > & | input, | |
| vctDynamicVectorBase< _vectorOwnerType2, value_type > & | output | |||
| ) | const [inline] |
Apply the transformation to a dynamic vector. The result is stored into another dynamic vector. It is assumed that both are of size DIMENSION.
Definition at line 237 of file vctFrameBase.h.
References vctFrameBase< _rotationType >::ApplyTo().
| void vctFrameBase< _rotationType >::ApplyTo | ( | const vctDynamicConstVectorBase< _vectorOwnerType1, value_type > & | input, | |
| vctFixedSizeVectorBase< DIMENSION, __stride2, value_type, __dataPtrType2 > & | output | |||
| ) | const [inline] |
Apply the transformation to a dynamic vector. The result is stored into a fixed size vector. It is assumed that both are of size DIMENSION.
Definition at line 262 of file vctFrameBase.h.
References vctFrameBase< _rotationType >::RotationMember, vctFixedSizeVectorBase< _size, _stride, _elementType, _dataPtrType >::SumOf(), and vctFrameBase< _rotationType >::TranslationMember.
| void vctFrameBase< _rotationType >::ApplyTo | ( | const vctFixedSizeConstMatrixBase< DIMENSION, __cols, __rowStride1, __colStride1, value_type, __dataPtrType1 > & | input, | |
| vctFixedSizeMatrixBase< DIMENSION, __cols, __rowStride2, __colStride2, value_type, __dataPtrType2 > & | output | |||
| ) | const [inline] |
Apply this transform to a matrix of three rows
Definition at line 276 of file vctFrameBase.h.
References vctFrameBase< _rotationType >::RotationMember, vctFixedSizeMatrixBase< _rows, _cols, _rowStride, _colStride, _elementType, _dataPtrType >::Row(), and vctFrameBase< _rotationType >::TranslationMember.
| void vctFrameBase< _rotationType >::ApplyTo | ( | size_type | inputSize, | |
| const vctFixedSizeVector< value_type, DIMENSION > * | input, | |||
| vctFixedSizeVector< value_type, DIMENSION > * | output | |||
| ) | const [inline] |
Apply this transform to an array of DIMENSION-vectors given as a pointer and a size. This method can be generalized to be templated with different vector types, defined by strides and dataPtrType. For simplicity, this version is writtend for a DIMENSION-vector object.
Definition at line 295 of file vctFrameBase.h.
| void vctFrameBase< _rotationType >::ApplyTo | ( | const vctDynamicConstMatrixBase< __matrixOwnerType1, value_type > & | input, | |
| vctDynamicMatrixBase< __matrixOwnerType2, value_type > & | output | |||
| ) | const [inline] |
Apply the transofrmation to a dynamic matrix of DIMENSION rows. Store the result to a second dynamic matrix.
Definition at line 308 of file vctFrameBase.h.
References CMN_ASSERT, vctDynamicConstMatrixBase< _matrixOwnerType, _elementType >::cols(), vctDynamicConstMatrixBase< _matrixOwnerType, _elementType >::Pointer(), vctDynamicMatrixBase< _matrixOwnerType, _elementType >::Pointer(), vctFrameBase< _rotationType >::RotationMember, vctDynamicMatrixBase< _matrixOwnerType, _elementType >::Row(), vctDynamicConstMatrixBase< _matrixOwnerType, _elementType >::rows(), and vctFrameBase< _rotationType >::TranslationMember.
| void vctFrameBase< _rotationType >::ApplyInverseTo | ( | const vctDynamicConstVectorBase< _vectorOwnerType1, value_type > & | input, | |
| vctDynamicVectorBase< _vectorOwnerType2, value_type > & | output | |||
| ) | const [inline] |
Apply the inverse of the transformation to a vector of fixed size DIMENSION. The result is stored into a vector of size DIMENSION provided by the caller and passed by reference.
| input | The input vector | |
| output | The output vector |
Definition at line 342 of file vctFrameBase.h.
References vctFrameBase< _rotationType >::RotationMember, and vctFrameBase< _rotationType >::TranslationMember.
| void vctFrameBase< _rotationType >::ApplyInverseTo | ( | const vctDynamicConstVectorBase< _vectorOwnerType1, value_type > & | input, | |
| vctFixedSizeVectorBase< DIMENSION, __stride2, value_type, __dataPtrType2 > & | output | |||
| ) | const [inline] |
Apply the inverse transformation to a dynamic vector. The result is stored into a fixed size vector. It is assumed that both are of size DIMENSION.
Definition at line 368 of file vctFrameBase.h.
References vctFrameBase< _rotationType >::RotationMember, and vctFrameBase< _rotationType >::TranslationMember.
| vctFixedSizeVector<value_type, DIMENSION> vctFrameBase< _rotationType >::ApplyInverseTo | ( | const vctFixedSizeConstVectorBase< DIMENSION, __stride, value_type, __dataPtrType > & | input | ) | const [inline] |
Apply the the inverse of the transformation to a vector of fixed size DIMENSION. 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 |
Definition at line 391 of file vctFrameBase.h.
References vctFrameBase< _rotationType >::ApplyInverseTo().
| vctFixedSizeVector<value_type, DIMENSION> vctFrameBase< _rotationType >::ApplyInverseTo | ( | const vctDynamicConstVectorBase< _vectorOwnerType, value_type > & | input | ) | const [inline] |
Apply the inverse transformation to a dynamic vector of size DIMENSION. The result is returned by value.
| input | The input vector |
Definition at line 405 of file vctFrameBase.h.
References vctFrameBase< _rotationType >::ApplyInverseTo().
| void vctFrameBase< _rotationType >::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 transform to a fixed-size matrix of three rows
Definition at line 429 of file vctFrameBase.h.
References vctFrameBase< _rotationType >::RotationMember, vctFixedSizeMatrixBase< _rows, _cols, _rowStride, _colStride, _elementType, _dataPtrType >::Row(), and vctFrameBase< _rotationType >::TranslationMember.
| void vctFrameBase< _rotationType >::ApplyInverseTo | ( | const vctDynamicConstMatrixBase< __matrixOwnerType1, value_type > & | input, | |
| vctDynamicMatrixBase< __matrixOwnerType2, value_type > & | output | |||
| ) | const [inline] |
Apply the inverse transofrmation to a dynamic matrix of DIMENSION rows. Store the result to a second dynamic matrix.
Definition at line 446 of file vctFrameBase.h.
References CMN_ASSERT, vctDynamicConstMatrixBase< _matrixOwnerType, _elementType >::cols(), vctDynamicConstMatrixBase< _matrixOwnerType, _elementType >::Pointer(), vctDynamicMatrixBase< _matrixOwnerType, _elementType >::Pointer(), vctFrameBase< _rotationType >::RotationMember, vctDynamicMatrixBase< _matrixOwnerType, _elementType >::Row(), vctDynamicConstMatrixBase< _matrixOwnerType, _elementType >::rows(), and vctFrameBase< _rotationType >::TranslationMember.
| vctFixedSizeVector<value_type, DIMENSION> vctFrameBase< _rotationType >::operator * | ( | const vctFixedSizeConstVectorBase< DIMENSION, _stride, value_type, _dataPtrType > & | vector | ) | const [inline] |
Implement operator * between frame and fixed or dynamic vector of length DIMENSION. The return value is always a fixed-size vector.
Definition at line 468 of file vctFrameBase.h.
References vctFrameBase< _rotationType >::ApplyTo().
| vctFixedSizeVector<value_type, DIMENSION> vctFrameBase< _rotationType >::operator * | ( | const vctDynamicConstVectorBase< _vectorOwnerType, value_type > & | input | ) | const [inline] |
Implement operator * between frame and fixed or dynamic vector of length DIMENSION. The return value is always a fixed-size vector.
Definition at line 478 of file vctFrameBase.h.
References vctFrameBase< _rotationType >::ApplyTo().
| bool vctFrameBase< _rotationType >::Equal | ( | const ThisType & | other | ) | const [inline] |
Return true if this transformation is exactly equal to the other transformation. The result is based on the Equal() methods provided by the different rotation representations (vctQuaternionRotation3, vctMatrixRotation3, ...) and the translation.
Definition at line 495 of file vctFrameBase.h.
References vctFixedSizeConstVectorBase< _size, _stride, _elementType, _dataPtrType >::Equal(), vctFrameBase< _rotationType >::Rotation(), vctFrameBase< _rotationType >::RotationMember, vctFrameBase< _rotationType >::Translation(), and vctFrameBase< _rotationType >::TranslationMember.
Referenced by vctFrameBase< _rotationType >::operator==().
| bool vctFrameBase< _rotationType >::operator== | ( | const ThisType & | other | ) | const [inline] |
Return true if this transformation is exactly equal to the other transformation. The result is based on the Equal() methods provided by the different rotation representations (vctQuaternionRotation3, vctMatrixRotation3, ...) and the translation.
Definition at line 500 of file vctFrameBase.h.
References vctFrameBase< _rotationType >::Equal().
| bool vctFrameBase< _rotationType >::AlmostEqual | ( | const ThisType & | other, | |
| value_type | tolerance = TypeTraits::Tolerance() | |||
| ) | const [inline] |
Return true if this transformation is equal to the other transformation, up to the given tolerance. The result is based on the AllowsEqual() methods provided by the different rotation representations (vctQuaternionRotation3, vctMatrixRotation3, ...) and the translation.
The tolerance factor is used to compare both the translations and rotations.
Definition at line 517 of file vctFrameBase.h.
References vctFixedSizeConstVectorBase< _size, _stride, _elementType, _dataPtrType >::AlmostEqual(), vctFrameBase< _rotationType >::Rotation(), vctFrameBase< _rotationType >::RotationMember, vctFrameBase< _rotationType >::Translation(), and vctFrameBase< _rotationType >::TranslationMember.
| bool vctFrameBase< _rotationType >::AlmostEquivalent | ( | const ThisType & | other, | |
| value_type | tolerance = TypeTraits::Tolerance() | |||
| ) | const [inline] |
Return true if this transformation is equivalent to the other transformation, up to the given tolerance. The result is based on the AlmostEquivalent() methods provided by the different rotation representations (vctQuaternionRotation3, vctMatrixRotation3, ...) and AlmostEqual for the translation.
The tolerance factor is used to compare both the translations and rotations.
Definition at line 535 of file vctFrameBase.h.
References vctFixedSizeConstVectorBase< _size, _stride, _elementType, _dataPtrType >::AlmostEqual(), vctFrameBase< _rotationType >::Rotation(), vctFrameBase< _rotationType >::RotationMember, vctFrameBase< _rotationType >::Translation(), and vctFrameBase< _rotationType >::TranslationMember.
| void vctFrameBase< _rotationType >::ToStream | ( | std::ostream & | outputStream | ) | const [inline] |
Print the matrix in a human readable format
Definition at line 549 of file vctFrameBase.h.
References vctFrameBase< _rotationType >::Rotation(), and vctFrameBase< _rotationType >::Translation().
Referenced by operator<<(), and vctFrameBase< _rotationType >::ToString().
| bool vctFrameBase< _rotationType >::FromStreamRaw | ( | std::istream & | inputStream, | |
| const char | delimiter = ' ' | |||
| ) | [inline] |
Read from an unformatted text input (e.g., one created by ToStreamRaw). Returns true if successful.
Definition at line 568 of file vctFrameBase.h.
References vctFixedSizeVector< _elementType, _size >::FromStreamRaw(), vctFrameBase< _rotationType >::RotationMember, and vctFrameBase< _rotationType >::TranslationMember.
| void vctFrameBase< _rotationType >::SerializeRaw | ( | std::ostream & | outputStream | ) | const [inline] |
Binary serialization
Definition at line 588 of file vctFrameBase.h.
References vctFrameBase< _rotationType >::Rotation(), vctFixedSizeConstVectorBase< _size, _stride, _elementType, _dataPtrType >::SerializeRaw(), and vctFrameBase< _rotationType >::Translation().
| void vctFrameBase< _rotationType >::DeSerializeRaw | ( | std::istream & | inputStream | ) | [inline] |
Binary deserialization
Definition at line 595 of file vctFrameBase.h.
References vctFixedSizeVector< _elementType, _size >::DeSerializeRaw(), vctFrameBase< _rotationType >::Rotation(), and vctFrameBase< _rotationType >::Translation().