cisst-saw
Loading...
Searching...
No Matches
vctFrame4x4ConstBase< _containerType > Class Template Reference

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

#include <vctFrame4x4ConstBase.h>

Inheritance diagram for vctFrame4x4ConstBase< _containerType >:
vctFrame4x4Base< _containerType > vctFrame4x4< value_type, _rowMajor > vctFrame4x4< value_type, COLSTRIDE<=ROWSTRIDE > vctFrame4x4< float, VCT_ROW_MAJOR >

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< ContainerTypeThisType
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<=ROWSTRIDEFrameValueType
typedef cmnTypeTraits< value_typeTypeTraits
typedef vctFixedSizeVectorRef< value_type, DIMENSION, ROWSTRIDETranslationRefType
typedef vctFixedSizeConstVectorRef< value_type, DIMENSION, ROWSTRIDEConstTranslationRefType
typedef vctFixedSizeVectorRef< value_type, DIMENSION, COLSTRIDEPerspectiveRefType
typedef vctFixedSizeConstVectorRef< value_type, DIMENSION, COLSTRIDEConstPerspectiveRefType
typedef vctMatrixRotation3Ref< value_type, ROWSTRIDE, COLSTRIDERotationRefType
typedef vctMatrixRotation3ConstRef< value_type, ROWSTRIDE, COLSTRIDEConstRotationRefType

Public Member Functions

 VCT_CONTAINER_TRAITS_TYPEDEFS (typename ContainerType::value_type)
 vctFrame4x4ConstBase (void)
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, DIMENSIONApplyTo (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, DIMENSIONApplyInverseTo (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 Equal (const ThisType &other) const
bool operator== (const ThisType &other) const
bool AlmostEqual (const ThisType &other, value_type tolerance=TypeTraits::Tolerance()) const
bool AlmostEquivalent (const ThisType &other, value_type tolerance=TypeTraits::Tolerance()) const

Static Public Member Functions

static CISST_EXPORT const FrameValueTypeIdentity (void)

Protected Member Functions

void UpdateReferences (void)

Protected Attributes

RotationRefType RotationRef
TranslationRefType TranslationRef
PerspectiveRefType PerspectiveRef

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

◆ BaseType

template<class _containerType>
typedef _containerType vctFrame4x4ConstBase< _containerType >::BaseType

◆ ColumnRefType

template<class _containerType>
typedef BaseType::ColumnRefType vctFrame4x4ConstBase< _containerType >::ColumnRefType

◆ ColumnValueType

template<class _containerType>
typedef BaseType::ColumnValueType vctFrame4x4ConstBase< _containerType >::ColumnValueType

◆ ConstColumnRefType

template<class _containerType>
typedef BaseType::ConstColumnRefType vctFrame4x4ConstBase< _containerType >::ConstColumnRefType

◆ ConstDiagonalRefType

template<class _containerType>
typedef BaseType::ConstDiagonalRefType vctFrame4x4ConstBase< _containerType >::ConstDiagonalRefType

◆ ConstPerspectiveRefType

template<class _containerType>
typedef vctFixedSizeConstVectorRef<value_type, DIMENSION, COLSTRIDE> vctFrame4x4ConstBase< _containerType >::ConstPerspectiveRefType

◆ ConstRefTransposeType

template<class _containerType>
typedef BaseType::ConstRefTransposeType vctFrame4x4ConstBase< _containerType >::ConstRefTransposeType

◆ ConstRotationRefType

template<class _containerType>
typedef vctMatrixRotation3ConstRef<value_type, ROWSTRIDE, COLSTRIDE> vctFrame4x4ConstBase< _containerType >::ConstRotationRefType

◆ ConstRowRefType

template<class _containerType>
typedef BaseType::ConstRowRefType vctFrame4x4ConstBase< _containerType >::ConstRowRefType

◆ ConstTranslationRefType

template<class _containerType>
typedef vctFixedSizeConstVectorRef<value_type, DIMENSION, ROWSTRIDE> vctFrame4x4ConstBase< _containerType >::ConstTranslationRefType

◆ ContainerType

template<class _containerType>
typedef _containerType vctFrame4x4ConstBase< _containerType >::ContainerType

◆ DiagonalRefType

template<class _containerType>
typedef BaseType::DiagonalRefType vctFrame4x4ConstBase< _containerType >::DiagonalRefType

◆ FrameValueType

template<class _containerType>
typedef vctFrame4x4<value_type, COLSTRIDE <= ROWSTRIDE> vctFrame4x4ConstBase< _containerType >::FrameValueType

◆ PerspectiveRefType

template<class _containerType>
typedef vctFixedSizeVectorRef<value_type, DIMENSION, COLSTRIDE> vctFrame4x4ConstBase< _containerType >::PerspectiveRefType

◆ RefTransposeType

template<class _containerType>
typedef BaseType::RefTransposeType vctFrame4x4ConstBase< _containerType >::RefTransposeType

◆ RotationRefType

template<class _containerType>
typedef vctMatrixRotation3Ref<value_type, ROWSTRIDE, COLSTRIDE> vctFrame4x4ConstBase< _containerType >::RotationRefType

◆ RowRefType

template<class _containerType>
typedef BaseType::RowRefType vctFrame4x4ConstBase< _containerType >::RowRefType

◆ RowValueType

template<class _containerType>
typedef BaseType::RowValueType vctFrame4x4ConstBase< _containerType >::RowValueType

◆ ThisType

template<class _containerType>
typedef vctFrame4x4ConstBase<ContainerType> vctFrame4x4ConstBase< _containerType >::ThisType

◆ TranslationRefType

template<class _containerType>
typedef vctFixedSizeVectorRef<value_type, DIMENSION, ROWSTRIDE> vctFrame4x4ConstBase< _containerType >::TranslationRefType

◆ TypeTraits

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

Member Enumeration Documentation

◆ anonymous enum

template<class _containerType>
anonymous enum
Enumerator
DIMENSION 

◆ anonymous enum

template<class _containerType>
anonymous enum
Enumerator
ROWSTRIDE 
COLSTRIDE 

◆ anonymous enum

template<class _containerType>
anonymous enum
Enumerator
ROWS 
COLS 

Constructor & Destructor Documentation

◆ vctFrame4x4ConstBase()

template<class _containerType>
vctFrame4x4ConstBase< _containerType >::vctFrame4x4ConstBase ( void )
inline

Default constructor. Updates internal references.

Member Function Documentation

◆ AlmostEqual()

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

◆ 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

◆ ApplyInverseTo() [1/5]

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

◆ ApplyInverseTo() [2/5]

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

◆ ApplyInverseTo() [3/5]

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

◆ ApplyInverseTo() [4/5]

template<class _containerType>
template<class __containerType>
FrameValueType vctFrame4x4ConstBase< _containerType >::ApplyInverseTo ( const vctFrame4x4ConstBase< __containerType > & input) const
inline

◆ ApplyInverseTo() [5/5]

template<class _containerType>
template<class __containerType1, class __containerType2>
void vctFrame4x4ConstBase< _containerType >::ApplyInverseTo ( const vctFrame4x4ConstBase< __containerType1 > & input,
vctFrame4x4Base< __containerType2 > & output ) const
inline

◆ ApplyTo() [1/7]

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.

◆ ApplyTo() [2/7]

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

◆ ApplyTo() [3/7]

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

◆ ApplyTo() [4/7]

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

◆ ApplyTo() [5/7]

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

◆ ApplyTo() [6/7]

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]

◆ ApplyTo() [7/7]

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.

◆ Equal()

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

◆ Identity()

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

◆ Inverse()

template<class _containerType>
vctFrame4x4ConstBase< _containerType >::FrameValueType vctFrame4x4ConstBase< _containerType >::Inverse ( void ) const
inline

◆ IsNormalized()

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.

◆ operator==()

template<class _containerType>
bool vctFrame4x4ConstBase< _containerType >::operator== ( const ThisType & other) const
inline

◆ Perspective()

template<class _containerType>
ConstPerspectiveRefType vctFrame4x4ConstBase< _containerType >::Perspective ( void ) const
inline

◆ Rotation()

template<class _containerType>
ConstRotationRefType vctFrame4x4ConstBase< _containerType >::Rotation ( void ) const
inline

◆ Translation()

template<class _containerType>
ConstTranslationRefType vctFrame4x4ConstBase< _containerType >::Translation ( void ) const
inline

◆ UpdateReferences()

template<class _containerType>
void vctFrame4x4ConstBase< _containerType >::UpdateReferences ( void )
inlineprotected

Update internal references to rotation matrix, translation vector and first 3 elements of last row. This method is called by allocate, so make sure that any specialization of Allocate includes a call to UpdateReferences.

◆ VCT_CONTAINER_TRAITS_TYPEDEFS()

template<class _containerType>
vctFrame4x4ConstBase< _containerType >::VCT_CONTAINER_TRAITS_TYPEDEFS ( typename ContainerType::value_type )

Member Data Documentation

◆ PerspectiveRef

template<class _containerType>
PerspectiveRefType vctFrame4x4ConstBase< _containerType >::PerspectiveRef
protected

◆ RotationRef

template<class _containerType>
RotationRefType vctFrame4x4ConstBase< _containerType >::RotationRef
protected

◆ TranslationRef

template<class _containerType>
TranslationRefType vctFrame4x4ConstBase< _containerType >::TranslationRef
protected

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