cisst-saw
|
Template base class for a 4x4 frame. More...
#include <vctForwardDeclarations.h>
Public Types | |
enum | { ROWS = 4, COLS = 4 } |
enum | { DIMENSION = 3 } |
enum | { ROWSTRIDE = ContainerType::ROWSTRIDE, COLSTRIDE = ContainerType::COLSTRIDE } |
typedef _containerType | BaseType |
typedef _containerType | ContainerType |
typedef vctFrame4x4ConstBase < ContainerType > | ThisType |
typedef BaseType::RowValueType | RowValueType |
typedef BaseType::ColumnValueType | ColumnValueType |
typedef BaseType::RowRefType | RowRefType |
typedef BaseType::ColumnRefType | ColumnRefType |
typedef BaseType::ConstRowRefType | ConstRowRefType |
typedef BaseType::ConstColumnRefType | ConstColumnRefType |
typedef BaseType::DiagonalRefType | DiagonalRefType |
typedef BaseType::ConstDiagonalRefType | ConstDiagonalRefType |
typedef BaseType::RefTransposeType | RefTransposeType |
typedef BaseType::ConstRefTransposeType | ConstRefTransposeType |
typedef vctFrame4x4 < value_type, COLSTRIDE <=ROWSTRIDE > FrameValueType;typedef cmnTypeTraits< value_type > TypeTraits;typedef vctFixedSizeVectorRef < value_type, DIMENSION, ROWSTRIDE > TranslationRefType;typedef vctFixedSizeConstVectorRef < value_type, DIMENSION, ROWSTRIDE > ConstTranslationRefType;typedef vctFixedSizeVectorRef < value_type, DIMENSION, COLSTRIDE > PerspectiveRefType;typedef vctFixedSizeConstVectorRef < value_type, DIMENSION, COLSTRIDE > ConstPerspectiveRefType;typedef vctMatrixRotation3Ref < value_type, ROWSTRIDE, COLSTRIDE > RotationRefType;typedef vctMatrixRotation3ConstRef < value_type, ROWSTRIDE, COLSTRIDE > ConstRotationRefType;protected:RotationRefType RotationRef;TranslationRefType TranslationRef;PerspectiveRefType PerspectiveRef;inline void UpdateReferences(void){RotationRef.SetRef(this-> Pointer(0, 0));TranslationRef.SetRef(this-> Pointer(0, DIMENSION));PerspectiveRef.SetRef(this-> Pointer(DIMENSION, 0));}public:vctFrame4x4ConstBase(void){this-> | UpdateReferences () |
Public Member Functions | |
VCT_CONTAINER_TRAITS_TYPEDEFS (typename ContainerType::value_type) | |
ConstTranslationRefType | Translation (void) const |
ConstRotationRefType | Rotation (void) const |
ConstPerspectiveRefType | Perspective (void) const |
FrameValueType | Inverse (void) const |
bool | IsNormalized (value_type tolerance=TypeTraits::Tolerance()) 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 __containerType1 , class __containerType2 > | |
void | ApplyTo (const vctFrame4x4ConstBase< __containerType1 > &input, vctFrame4x4Base< __containerType2 > &output) const |
template<class __containerType > | |
FrameValueType | ApplyTo (const vctFrame4x4ConstBase< __containerType > &input) const |
template<class __vectorOwnerType1 , class __vectorOwnerType2 > | |
void | ApplyTo (const vctDynamicConstVectorBase< __vectorOwnerType1, value_type > &input, vctDynamicVectorBase< __vectorOwnerType2, 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 | 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<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<stride_type __stride, class __dataPtrType > | |
vctFixedSizeVector< value_type, DIMENSION > | ApplyInverseTo (const vctFixedSizeConstVectorBase< DIMENSION, __stride, value_type, __dataPtrType > &input) const |
template<class __containerType1 , class __containerType2 > | |
void | ApplyInverseTo (const vctFrame4x4ConstBase< __containerType1 > &input, vctFrame4x4Base< __containerType2 > &output) const |
template<class __containerType > | |
FrameValueType | ApplyInverseTo (const vctFrame4x4ConstBase< __containerType > &input) const |
bool | AlmostEqual (const ThisType &other, value_type tolerance=TypeTraits::Tolerance()) const |
bool | AlmostEquivalent (const ThisType &other, value_type tolerance=TypeTraits::Tolerance()) const |
bool | Equal (const ThisType &other) const |
bool | operator== (const ThisType &other) const |
Static Public Member Functions | |
static CISST_EXPORT const FrameValueType & | Identity (void) |
Template base class for a 4x4 frame.
This class allows to use a 4 by 4 matrix as a frame in 3D. This is a limited case of the so called homegenous transformations as this class is intended to support only the translation and rotation parts of the transformation. It is not intended to support perspective or scaling operations. The different constructors and normalization methods provided will set the last row to [0 0 0 1].
_matrixType | The type of matrix used to store the elements |
typedef _containerType vctFrame4x4ConstBase< _containerType >::BaseType |
typedef BaseType::ColumnRefType vctFrame4x4ConstBase< _containerType >::ColumnRefType |
typedef BaseType::ColumnValueType vctFrame4x4ConstBase< _containerType >::ColumnValueType |
typedef BaseType::ConstColumnRefType vctFrame4x4ConstBase< _containerType >::ConstColumnRefType |
typedef BaseType::ConstDiagonalRefType vctFrame4x4ConstBase< _containerType >::ConstDiagonalRefType |
typedef BaseType::ConstRefTransposeType vctFrame4x4ConstBase< _containerType >::ConstRefTransposeType |
typedef BaseType::ConstRowRefType vctFrame4x4ConstBase< _containerType >::ConstRowRefType |
typedef _containerType vctFrame4x4ConstBase< _containerType >::ContainerType |
typedef BaseType::DiagonalRefType vctFrame4x4ConstBase< _containerType >::DiagonalRefType |
typedef BaseType::RefTransposeType vctFrame4x4ConstBase< _containerType >::RefTransposeType |
typedef BaseType::RowRefType vctFrame4x4ConstBase< _containerType >::RowRefType |
typedef BaseType::RowValueType vctFrame4x4ConstBase< _containerType >::RowValueType |
typedef vctFrame4x4ConstBase<ContainerType> vctFrame4x4ConstBase< _containerType >::ThisType |
typedef vctFrame4x4<value_type, COLSTRIDE <= ROWSTRIDE> FrameValueType; typedef cmnTypeTraits<value_type> TypeTraits; typedef vctFixedSizeVectorRef<value_type, DIMENSION, ROWSTRIDE> TranslationRefType; typedef vctFixedSizeConstVectorRef<value_type, DIMENSION, ROWSTRIDE> ConstTranslationRefType; typedef vctFixedSizeVectorRef<value_type, DIMENSION, COLSTRIDE> PerspectiveRefType; typedef vctFixedSizeConstVectorRef<value_type, DIMENSION, COLSTRIDE> ConstPerspectiveRefType; typedef vctMatrixRotation3Ref<value_type, ROWSTRIDE, COLSTRIDE> RotationRefType; typedef vctMatrixRotation3ConstRef<value_type, ROWSTRIDE, COLSTRIDE> ConstRotationRefType;protected: RotationRefType RotationRef; TranslationRefType TranslationRef; PerspectiveRefType PerspectiveRef; inline void UpdateReferences(void) { RotationRef.SetRef(this->Pointer(0, 0)); TranslationRef.SetRef(this->Pointer(0, DIMENSION)); PerspectiveRef.SetRef(this->Pointer(DIMENSION, 0)); }public: vctFrame4x4ConstBase(void) { this-> vctFrame4x4ConstBase< _containerType >::UpdateReferences() |
|
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 frame is effectively equivalent to the other frame, up to the given tolerance. For an homogeneous frame, this method uses AlmostEqual.
|
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 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 |
|
inline |
|
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 |
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 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 |
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.
|
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 |
Test if the rotation part is normalized and the last row is almost equal to [0 0 0 1]. See vctMatrixRotation3ConstBase::IsNormalized and vctFixedSizeConstVectorBase::AlmostEqual.
tolerance | Tolerance for the norm and scalar product tests. |
|
inline |
|
inline |
|
inline |
|
inline |
vctFrame4x4ConstBase< _containerType >::VCT_CONTAINER_TRAITS_TYPEDEFS | ( | typename ContainerType::value_type | ) |