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

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

#include <vctForwardDeclarations.h>

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

Public Types

enum  { ROWS = 4, COLS = 4 }
 
enum  { DIMENSION = 3 }
 
typedef _containerType ContainerType
 
typedef vctFrame4x4ConstBase
< ContainerType
BaseType
 
typedef vctFrame4x4Base
< ContainerType
ThisType
 
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 BaseType::MatrixValueType MatrixValueType
 
typedef
BaseType::TranslationRefType 
TranslationRefType
 
typedef
BaseType::ConstTranslationRefType 
ConstTranslationRefType
 
typedef
BaseType::PerspectiveRefType 
PerspectiveRefType
 
typedef
BaseType::ConstPerspectiveRefType 
ConstPerspectiveRefType
 
typedef BaseType::RotationRefType RotationRefType
 
typedef
BaseType::ConstRotationRefType 
ConstRotationRefType
 
typedef cmnTypeTraits< value_type > TypeTraits
 
- Public Types inherited from vctFrame4x4ConstBase< _containerType >
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)
 
 vctFrame4x4Base (void)
 
ConstTranslationRefType Translation (void) const
 
ConstRotationRefType Rotation (void) const
 
ConstPerspectiveRefType Perspective (void) const
 
TranslationRefType Translation (void)
 
RotationRefType Rotation (void)
 
PerspectiveRefType Perspective (void)
 
ThisTypeNormalizedSelf (void)
 
ThisTypeInverseSelf (void)
 
template<class __containerType >
ThisTypeInverseOf (const vctFrame4x4ConstBase< __containerType > &otherFrame)
 
template<class __rotationType , class __translationType >
ThisTypeFrom (const __rotationType &rotation, const __translationType &translation) throw (std::runtime_error)
 
template<class __rotationType , class __translationType >
ThisTypeFromNormalized (const __rotationType &rotation, const __translationType &translation)
 
template<class __rotationType , class __translationType >
ThisTypeFromRaw (const __rotationType &rotation, const __translationType &translation)
 
template<class __rotationType >
ThisTypeFrom (const vctFrameBase< __rotationType > &frame) throw (std::runtime_error)
 
template<class __rotationType >
ThisTypeFromNormalized (const vctFrameBase< __rotationType > &frame)
 
template<class __rotationType >
ThisTypeFromRaw (const vctFrameBase< __rotationType > &frame)
 
- Public Member Functions inherited from vctFrame4x4ConstBase< _containerType >
 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
 

Additional Inherited Members

- Static Public Member Functions inherited from vctFrame4x4ConstBase< _containerType >
static CISST_EXPORT const
FrameValueType & 
Identity (void)
 

Detailed Description

template<class _containerType>
class vctFrame4x4Base< _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 vctFrame4x4ConstBase<ContainerType> vctFrame4x4Base< _containerType >::BaseType
template<class _containerType>
typedef BaseType::ColumnRefType vctFrame4x4Base< _containerType >::ColumnRefType
template<class _containerType>
typedef BaseType::ConstColumnRefType vctFrame4x4Base< _containerType >::ConstColumnRefType
template<class _containerType>
typedef BaseType::ConstDiagonalRefType vctFrame4x4Base< _containerType >::ConstDiagonalRefType
template<class _containerType>
typedef BaseType::ConstPerspectiveRefType vctFrame4x4Base< _containerType >::ConstPerspectiveRefType
template<class _containerType>
typedef BaseType::ConstRefTransposeType vctFrame4x4Base< _containerType >::ConstRefTransposeType
template<class _containerType>
typedef BaseType::ConstRotationRefType vctFrame4x4Base< _containerType >::ConstRotationRefType
template<class _containerType>
typedef BaseType::ConstRowRefType vctFrame4x4Base< _containerType >::ConstRowRefType
template<class _containerType>
typedef BaseType::ConstTranslationRefType vctFrame4x4Base< _containerType >::ConstTranslationRefType
template<class _containerType>
typedef _containerType vctFrame4x4Base< _containerType >::ContainerType
template<class _containerType>
typedef BaseType::DiagonalRefType vctFrame4x4Base< _containerType >::DiagonalRefType
template<class _containerType>
typedef BaseType::MatrixValueType vctFrame4x4Base< _containerType >::MatrixValueType
template<class _containerType>
typedef BaseType::PerspectiveRefType vctFrame4x4Base< _containerType >::PerspectiveRefType
template<class _containerType>
typedef BaseType::RefTransposeType vctFrame4x4Base< _containerType >::RefTransposeType
template<class _containerType>
typedef BaseType::RotationRefType vctFrame4x4Base< _containerType >::RotationRefType
template<class _containerType>
typedef BaseType::RowRefType vctFrame4x4Base< _containerType >::RowRefType
template<class _containerType>
typedef vctFrame4x4Base<ContainerType> vctFrame4x4Base< _containerType >::ThisType
template<class _containerType>
typedef BaseType::TranslationRefType vctFrame4x4Base< _containerType >::TranslationRefType
template<class _containerType>
typedef cmnTypeTraits<value_type> vctFrame4x4Base< _containerType >::TypeTraits

Member Enumeration Documentation

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

Constructor & Destructor Documentation

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

Default constructor. Sets the rotation matrix to identity.

Member Function Documentation

template<class _containerType>
template<class __rotationType , class __translationType >
ThisType& vctFrame4x4Base< _containerType >::From ( const __rotationType &  rotation,
const __translationType &  translation 
)
throw (std::runtime_error
)
inline

Create from a rotation and a translation. From will throw an exception if the rotation is not normalized. FromNormalized will ensure the rotation part is normalized after assignment while FromRaw will not check nor normalize the rotation component.

template<class _containerType>
template<class __rotationType >
ThisType& vctFrame4x4Base< _containerType >::From ( const vctFrameBase< __rotationType > &  frame)
throw (std::runtime_error
)
inline

Create from a frame derived from vctFrameBase (i.e. represented by a rotation and translation). From will throw an exception if the rotation is not normalized. FromNormalized will ensure the rotation part is normalized after assignment while FromRaw will not check nor normalize the rotation component.

template<class _containerType>
template<class __rotationType , class __translationType >
ThisType& vctFrame4x4Base< _containerType >::FromNormalized ( const __rotationType &  rotation,
const __translationType &  translation 
)
inline
template<class _containerType>
template<class __rotationType >
ThisType& vctFrame4x4Base< _containerType >::FromNormalized ( const vctFrameBase< __rotationType > &  frame)
inline
template<class _containerType>
template<class __rotationType , class __translationType >
ThisType& vctFrame4x4Base< _containerType >::FromRaw ( const __rotationType &  rotation,
const __translationType &  translation 
)
inline
template<class _containerType>
template<class __rotationType >
ThisType& vctFrame4x4Base< _containerType >::FromRaw ( const vctFrameBase< __rotationType > &  frame)
inline
template<class _containerType>
template<class __containerType >
ThisType& vctFrame4x4Base< _containerType >::InverseOf ( const vctFrame4x4ConstBase< __containerType > &  otherFrame)
inline
template<class _containerType>
ThisType& vctFrame4x4Base< _containerType >::InverseSelf ( void  )
inline

Inverse this frame.

template<class _containerType>
ThisType& vctFrame4x4Base< _containerType >::NormalizedSelf ( void  )
inline

Normalizes this frame. This method normalizes the rotation part of the matrix and resets the last row to [0 0 0 1]. For the rotation normalization, this method relies on vctMatrixRotation3Base normalization method, which converts to a unit quaternion to normalize.

template<class _containerType>
ConstPerspectiveRefType vctFrame4x4Base< _containerType >::Perspective ( void  ) const
inline
template<class _containerType>
PerspectiveRefType vctFrame4x4Base< _containerType >::Perspective ( void  )
inline
template<class _containerType>
ConstRotationRefType vctFrame4x4Base< _containerType >::Rotation ( void  ) const
inline
template<class _containerType>
RotationRefType vctFrame4x4Base< _containerType >::Rotation ( void  )
inline
template<class _containerType>
ConstTranslationRefType vctFrame4x4Base< _containerType >::Translation ( void  ) const
inline
template<class _containerType>
TranslationRefType vctFrame4x4Base< _containerType >::Translation ( void  )
inline
template<class _containerType>
vctFrame4x4Base< _containerType >::VCT_CONTAINER_TRAITS_TYPEDEFS ( typename ContainerType::value_type  )

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