cisst-saw
|
Template base class for a frame. More...
#include <vctForwardDeclarations.h>
Public Types | |
enum | { DIMENSION = _rotationType::DIMENSION } |
typedef vctFrameBase < _rotationType > | ThisType |
typedef _rotationType | RotationType |
typedef vctFixedSizeVector < value_type, DIMENSION > | TranslationType |
typedef cmnTypeTraits< value_type > | TypeTraits |
Public Member Functions | |
VCT_CONTAINER_TRAITS_TYPEDEFS (typename _rotationType::value_type) | |
vctFrameBase (void) | |
template<stride_type __stride, class __dataPtrType > | |
vctFrameBase (const RotationType &rotation, const vctFixedSizeConstVectorBase< DIMENSION, __stride, value_type, __dataPtrType > &translation) | |
template<class __containerType > | |
vctFrameBase (const vctFrame4x4ConstBase< __containerType > &other) | |
template<class __containerType > | |
vctFrameBase (const vctFrame4x4ConstBase< __containerType > &other, bool normalizeInput) | |
ThisType & | Assign (const ThisType &otherFrame) |
template<stride_type __stride, class __dataPtrType > | |
ThisType & | Assign (const RotationType &rotation, const vctFixedSizeConstVectorBase< DIMENSION, __stride, value_type, __dataPtrType > &translation) |
const TranslationType & | Translation (void) const |
TranslationType & | Translation (void) |
const RotationType & | Rotation (void) const |
RotationType & | Rotation (void) |
bool | IsNormalized (value_type tolerance=TypeTraits::Tolerance()) const |
ThisType & | NormalizedSelf (void) |
ThisType & | InverseSelf (void) |
ThisType & | InverseOf (const ThisType &otherFrame) |
ThisType | 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 |
template<class _vectorOwnerType > | |
vctFixedSizeVector< value_type, DIMENSION > | ApplyTo (const vctDynamicConstVectorBase< _vectorOwnerType, value_type > &input) const |
void | ApplyTo (const ThisType &input, ThisType &output) const |
void | ProductOf (const ThisType &left, ThisType &right) |
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 |
template<class _vectorOwnerType1 , stride_type __stride2, class __dataPtrType2 > | |
void | ApplyTo (const vctDynamicConstVectorBase< _vectorOwnerType1, value_type > &input, vctFixedSizeVectorBase< DIMENSION, __stride2, value_type, __dataPtrType2 > &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 |
void | ApplyTo (size_type inputSize, const vctFixedSizeVector< value_type, DIMENSION > *input, vctFixedSizeVector< value_type, DIMENSION > *output) const |
template<class __matrixOwnerType1 , class __matrixOwnerType2 > | |
void | ApplyTo (const vctDynamicConstMatrixBase< __matrixOwnerType1, value_type > &input, vctDynamicMatrixBase< __matrixOwnerType2, value_type > &output) 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<class _vectorOwnerType1 , class _vectorOwnerType2 > | |
void | ApplyInverseTo (const vctDynamicConstVectorBase< _vectorOwnerType1, value_type > &input, vctDynamicVectorBase< _vectorOwnerType2, value_type > &output) const |
template<class _vectorOwnerType1 , stride_type __stride2, class __dataPtrType2 > | |
void | ApplyInverseTo (const vctDynamicConstVectorBase< _vectorOwnerType1, value_type > &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<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 |
bool | AlmostEqual (const ThisType &other, value_type tolerance=TypeTraits::Tolerance()) const |
bool | AlmostEquivalent (const ThisType &other, value_type tolerance=TypeTraits::Tolerance()) const |
std::string | ToString (void) const |
void | ToStream (std::ostream &outputStream) const |
void | ToStreamRaw (std::ostream &outputStream, const char delimiter= ' ', bool headerOnly=false, const std::string &headerPrefix="") const |
bool | FromStreamRaw (std::istream &inputStream, const char delimiter= ' ') |
void | SerializeRaw (std::ostream &outputStream) const |
void | DeSerializeRaw (std::istream &inputStream) |
template<class __rotationType > | |
ThisType & | From (const vctFrameBase< __rotationType > &other) throw (std::runtime_error) |
template<class __rotationType > | |
ThisType & | FromNormalized (const vctFrameBase< __rotationType > &other) |
template<class __rotationType > | |
ThisType & | FromRaw (const vctFrameBase< __rotationType > &other) |
template<class __containerType > | |
ThisType & | From (const vctFrame4x4ConstBase< __containerType > &other) throw (std::runtime_error) |
template<class __containerType > | |
ThisType & | FromNormalized (const vctFrame4x4ConstBase< __containerType > &other) |
template<class __containerType > | |
ThisType & | FromRaw (const vctFrame4x4ConstBase< __containerType > &other) |
template<stride_type _stride, class _dataPtrType > | |
vctFixedSizeVector< value_type, DIMENSION > | operator* (const vctFixedSizeConstVectorBase< DIMENSION, _stride, value_type, _dataPtrType > &vector) const |
template<class _vectorOwnerType > | |
vctFixedSizeVector< value_type, DIMENSION > | operator* (const vctDynamicConstVectorBase< _vectorOwnerType, value_type > &input) const |
bool | Equal (const ThisType &other) const |
bool | operator== (const ThisType &other) const |
Static Public Member Functions | |
static CISST_EXPORT const ThisType & | Identity () |
Protected Attributes | |
RotationType | RotationMember |
TranslationType | TranslationMember |
Template base class for a frame.
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 |
typedef _rotationType vctFrameBase< _rotationType >::RotationType |
typedef vctFrameBase<_rotationType> vctFrameBase< _rotationType >::ThisType |
typedef vctFixedSizeVector<value_type, DIMENSION> vctFrameBase< _rotationType >::TranslationType |
typedef cmnTypeTraits<value_type> vctFrameBase< _rotationType >::TypeTraits |
|
inline |
Default constructor. Sets the rotation matrix to identity.
|
inline |
Constructor from a translation and a rotation.
|
inlineexplicit |
Constructor from a vctFrame4x4. This constructor uses the method From which will test if the input is normalized. If the input is not normalized it will throw an exception of type std::runtime_error.
|
inline |
Constructor from a vctFrame4x4. This constructor uses the method FromNormalized or FromRaw based on the second argument (use VCT_NORMALIZE or VCT_DO_NOT_NORMALIZE).
|
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.
|
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.
|
inline |
|
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 |
|
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.
|
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 |
|
inline |
Apply the inverse transformation to a dynamic vector of size DIMENSION. The result is returned by value.
input | The input vector |
|
inline |
|
inline |
|
inline |
Apply the inverse transform to a fixed-size matrix of three rows
|
inline |
Apply the inverse transofrmation to a dynamic matrix of DIMENSION rows. Store the result to a second dynamic matrix.
|
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 |
|
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 |
|
inline |
Apply the transformation to a dynamic vector of size DIMENSION. The result is returned by value.
input | The input vector |
|
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]
|
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 |
|
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.
|
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.
|
inline |
Apply this transform to a matrix of three rows
|
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.
|
inline |
Apply the transofrmation to a dynamic matrix of DIMENSION rows. Store the result to a second dynamic matrix.
|
inline |
|
inline |
|
inline |
Binary deserialization
|
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.
|
inline |
Conversion methods from another frame derived from vctFrameBase (i.e. composed of rotation and translation). As for rotation, From will throw and exception if the input rotation is not normalized. FromNormalized will normalized the result and FromRaw will use the input as is.
|
inline |
Conversion methods from another frame derived from vctFrame4x4Base (i.e. homogeneous matrix). As for rotation, From will throw and exception if the input rotation is not normalized. FromNormalized will normalized the result and FromRaw will use the input as is.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Read from an unformatted text input (e.g., one created by ToStreamRaw). Returns true if successful.
|
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()
.
|
inline |
|
inline |
|
inline |
Inverse this frame.
|
inline |
Test if the frame is normalized. This methods checks if the rotation part of the frame is normalized.
|
inline |
Normalizes this frame. This method normalizes the rotation part of the matrix.
|
inline |
Implement operator * between frame and fixed or dynamic vector of length DIMENSION. The return value is always a fixed-size vector.
|
inline |
|
inline |
|
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 "*".
|
inline |
|
inline |
|
inline |
Binary serialization
|
inline |
Print the matrix in a human readable format
|
inline |
|
inline |
|
inline |
|
inline |
vctFrameBase< _rotationType >::VCT_CONTAINER_TRAITS_TYPEDEFS | ( | typename _rotationType::value_type | ) |
|
protected |
|
protected |