cisst-saw
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Member Functions | Static Public Member Functions | List of all members
vctFrame4x4ConstBase< _containerType > Class Template Reference

Template base class for a 4x4 frame. More...

#include <vctForwardDeclarations.h>

Inheritance diagram for vctFrame4x4ConstBase< _containerType >:
vctFrame4x4Base< _containerType >

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)
 

Detailed Description

template<class _containerType>
class vctFrame4x4ConstBase< _containerType >

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

Parameters
_matrixTypeThe type of matrix used to store the elements
See Also
vctDynamicMatrix, vctFixedSizeMatrix, vctFrameBase

Member Typedef Documentation

template<class _containerType>
typedef _containerType vctFrame4x4ConstBase< _containerType >::BaseType
template<class _containerType>
typedef BaseType::ColumnRefType vctFrame4x4ConstBase< _containerType >::ColumnRefType
template<class _containerType>
typedef BaseType::ColumnValueType vctFrame4x4ConstBase< _containerType >::ColumnValueType
template<class _containerType>
typedef BaseType::ConstColumnRefType vctFrame4x4ConstBase< _containerType >::ConstColumnRefType
template<class _containerType>
typedef BaseType::ConstDiagonalRefType vctFrame4x4ConstBase< _containerType >::ConstDiagonalRefType
template<class _containerType>
typedef BaseType::ConstRefTransposeType vctFrame4x4ConstBase< _containerType >::ConstRefTransposeType
template<class _containerType>
typedef BaseType::ConstRowRefType vctFrame4x4ConstBase< _containerType >::ConstRowRefType
template<class _containerType>
typedef _containerType vctFrame4x4ConstBase< _containerType >::ContainerType
template<class _containerType>
typedef BaseType::DiagonalRefType vctFrame4x4ConstBase< _containerType >::DiagonalRefType
template<class _containerType>
typedef BaseType::RefTransposeType vctFrame4x4ConstBase< _containerType >::RefTransposeType
template<class _containerType>
typedef BaseType::RowRefType vctFrame4x4ConstBase< _containerType >::RowRefType
template<class _containerType>
typedef BaseType::RowValueType vctFrame4x4ConstBase< _containerType >::RowValueType
template<class _containerType>
typedef vctFrame4x4ConstBase<ContainerType> vctFrame4x4ConstBase< _containerType >::ThisType
template<class _containerType>
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()

Member Enumeration Documentation

template<class _containerType>
anonymous enum
Enumerator
ROWS 
COLS 
template<class _containerType>
anonymous enum
Enumerator
DIMENSION 
template<class _containerType>
anonymous enum
Enumerator
ROWSTRIDE 
COLSTRIDE 

Member Function Documentation

template<class _containerType>
bool vctFrame4x4ConstBase< _containerType >::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.

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

See Also
AlmostEqual
template<class _containerType>
template<stride_type __stride1, class __dataPtrType1 , stride_type __stride2, class __dataPtrType2 >
void vctFrame4x4ConstBase< _containerType >::ApplyInverseTo ( const vctFixedSizeConstVectorBase< DIMENSION, __stride1, value_type, __dataPtrType1 > &  input,
vctFixedSizeVectorBase< DIMENSION, __stride2, value_type, __dataPtrType2 > &  output 
) const
inline
template<class _containerType>
template<class __vectorOwnerType1 , class __vectorOwnerType2 >
void vctFrame4x4ConstBase< _containerType >::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.

Parameters
inputThe input vector
outputThe output vector
template<class _containerType>
template<stride_type __stride, class __dataPtrType >
vctFixedSizeVector<value_type, DIMENSION> vctFrame4x4ConstBase< _containerType >::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.

Parameters
inputThe input vector
Returns
The output vector
template<class _containerType>
template<class __containerType1 , class __containerType2 >
void vctFrame4x4ConstBase< _containerType >::ApplyInverseTo ( const vctFrame4x4ConstBase< __containerType1 > &  input,
vctFrame4x4Base< __containerType2 > &  output 
) const
inline
template<class _containerType>
template<class __containerType >
FrameValueType vctFrame4x4ConstBase< _containerType >::ApplyInverseTo ( const vctFrame4x4ConstBase< __containerType > &  input) const
inline
template<class _containerType>
template<stride_type __stride1, class __dataPtrType1 , stride_type __stride2, class __dataPtrType2 >
void vctFrame4x4ConstBase< _containerType >::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.

Parameters
inputThe input vector
outputThe output vector
template<class _containerType>
template<stride_type __stride, class __dataPtrType >
vctFixedSizeVector<value_type, DIMENSION> vctFrame4x4ConstBase< _containerType >::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.

Parameters
inputThe input vector
Returns
The output vector
template<class _containerType>
template<class __containerType1 , class __containerType2 >
void vctFrame4x4ConstBase< _containerType >::ApplyTo ( const vctFrame4x4ConstBase< __containerType1 > &  input,
vctFrame4x4Base< __containerType2 > &  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]

template<class _containerType>
template<class __containerType >
FrameValueType vctFrame4x4ConstBase< _containerType >::ApplyTo ( const vctFrame4x4ConstBase< __containerType > &  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.

Parameters
inputThe input transformation
Returns
The output transformation
template<class _containerType>
template<class __vectorOwnerType1 , class __vectorOwnerType2 >
void vctFrame4x4ConstBase< _containerType >::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.

template<class _containerType>
template<size_type __cols, stride_type __rowStride1, stride_type __colStride1, class __dataPtrType1 , stride_type __rowStride2, stride_type __colStride2, class __dataPtrType2 >
void vctFrame4x4ConstBase< _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 transform to a matrix of three rows

template<class _containerType>
void vctFrame4x4ConstBase< _containerType >::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.

template<class _containerType>
bool vctFrame4x4ConstBase< _containerType >::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.

See Also
AlmostEqual
template<class _containerType>
static CISST_EXPORT const FrameValueType& vctFrame4x4ConstBase< _containerType >::Identity ( void  )
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().

template<class _containerType >
vctFrame4x4ConstBase< _containerType >::FrameValueType vctFrame4x4ConstBase< _containerType >::Inverse ( void  ) const
inline
template<class _containerType>
bool vctFrame4x4ConstBase< _containerType >::IsNormalized ( value_type  tolerance = TypeTraits::Tolerance()) const
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.

Parameters
toleranceTolerance for the norm and scalar product tests.
template<class _containerType>
bool vctFrame4x4ConstBase< _containerType >::operator== ( const ThisType other) const
inline
template<class _containerType>
ConstPerspectiveRefType vctFrame4x4ConstBase< _containerType >::Perspective ( void  ) const
inline
template<class _containerType>
ConstRotationRefType vctFrame4x4ConstBase< _containerType >::Rotation ( void  ) const
inline
template<class _containerType>
ConstTranslationRefType vctFrame4x4ConstBase< _containerType >::Translation ( void  ) const
inline
template<class _containerType>
vctFrame4x4ConstBase< _containerType >::VCT_CONTAINER_TRAITS_TYPEDEFS ( typename ContainerType::value_type  )

The documentation for this class was generated from the following files: