22#ifndef _vctFrame4x4ConstBase_h
23#define _vctFrame4x4ConstBase_h
49template <
class _containerType>
121 return this->TranslationRef;
125 return this->RotationRef;
129 return this->PerspectiveRef;
159 template <str
ide_type __str
ide1,
class __dataPtrType1, str
ide_type __str
ide2,
class __dataPtrType2>
163 this->RotationRef.
ApplyTo(input, output);
164 output.
X() += this->TranslationRef.X();
165 output.
Y() += this->TranslationRef.Y();
166 output.
Z() += this->TranslationRef.Z();
178 template <str
ide_type __str
ide,
class __dataPtrType>
196 template <
class __containerType1,
class __containerType2>
199 typename TranslationRefType::CopyType temp;
214 template <
class __containerType>
226 template <
class __vectorOwnerType1,
class __vectorOwnerType2>
231 this->RotationRef.
ApplyTo(input, output);
232 output[0] += this->TranslationRef[0];
233 output[1] += this->TranslationRef[1];
234 output[2] += this->TranslationRef[2];
239 template <size_type __cols, stride_type __rowStride1, stride_type __colStride1,
class __dataPtrType1,
240 stride_type __rowStride2, stride_type __colStride2,
class __dataPtrType2>
246 typedef typename inputType::ConstColumnRefType inputColumnType;
248 typedef typename outputType::ColumnRefType outputColumnType;
249 index_type columnIndex;
250 for (columnIndex = 0; columnIndex < __cols; ++columnIndex) {
251 const inputColumnType inputColumn(input.
Column(columnIndex));
252 outputColumnType outputColumn(output.
Column(columnIndex));
253 this->
ApplyTo(inputColumn, outputColumn);
269 for (index = 0; index < inputSize; ++index) {
270 this->
ApplyTo(input[index], output[index]);
275 template <str
ide_type __str
ide1,
class __dataPtrType1, str
ide_type __str
ide2,
class __dataPtrType2>
291 template <
class __vectorOwnerType1,
class __vectorOwnerType2>
296 input[1] - this->TranslationRef[1],
297 input[2] - this->TranslationRef[2]);
298 typename TranslationRefType::CopyType result;
300 output[0] = result[0];
301 output[1] = result[1];
302 output[2] = result[2];
314 template <str
ide_type __str
ide,
class __dataPtrType>
323 template <
class __containerType1,
class __containerType2>
328 inverse.
ApplyTo(input, output);
331 template <
class __containerType>
348 return (this->RotationRef.Equal(other.
Rotation())
349 && this->TranslationRef.Equal(other.
Translation()));
353 return this->
Equal(other);
371 return (this->RotationRef.AlmostEqual(other.
Rotation(), tolerance)
372 && this->TranslationRef.AlmostEqual(other.
Translation(), tolerance));
A collection of useful information about the C++ basic types, represented in a generic programming wa...
Definition cmnTypeTraits.h:155
static Type Tolerance(void)
Definition cmnTypeTraits.h:170
Definition vctForwardDeclarations.h:119
Definition vctDynamicVectorBase.h:62
A template for a fixed size matrix with fixed spacing in memory.
Definition vctFixedSizeConstMatrixBase.h:104
ConstColumnRefType Column(size_type index) const
Definition vctFixedSizeConstMatrixBase.h:406
A template for a fixed length vector with fixed spacing in memory.
Definition vctFixedSizeConstVectorBase.h:108
Definition vctForwardDeclarations.h:86
A template for a fixed size matrix with fixed spacings in memory.
Definition vctFixedSizeMatrixBase.h:60
ColumnRefType Column(size_type index)
Definition vctFixedSizeMatrixBase.h:249
A template for a fixed length vector with fixed spacing in memory.
Definition vctFixedSizeVectorBase.h:77
ThisType & DifferenceOf(const vctFixedSizeConstVectorBase< _size, __stride1, value_type, __dataPtrType1 > &vector1, const vctFixedSizeConstVectorBase< _size, __stride2, value_type, __dataPtrType2 > &vector2)
Definition vctFixedSizeVectorBase.h:820
value_type & Y(void)
Definition vctFixedSizeVectorBase.h:572
value_type & Z(void)
Definition vctFixedSizeVectorBase.h:585
value_type & X(void)
Definition vctFixedSizeVectorBase.h:559
Implementation of a fixed-size vector using template metaprogramming.
Definition vctFixedSizeVector.h:54
Definition vctForwardDeclarations.h:89
Template base class for a 4x4 frame.
Definition vctFrame4x4Base.h:48
ConstRotationRefType Rotation(void) const
Definition vctFrame4x4Base.h:91
ThisType & InverseOf(const vctFrame4x4ConstBase< __containerType > &otherFrame)
Definition vctFrame4x4Base.h:212
ConstTranslationRefType Translation(void) const
Definition vctFrame4x4Base.h:87
ConstTranslationRefType Translation(void) const
Definition vctFrame4x4ConstBase.h:120
vctFixedSizeVector< value_type, DIMENSION > ApplyInverseTo(const vctFixedSizeConstVectorBase< DIMENSION, __stride, value_type, __dataPtrType > &input) const
Definition vctFrame4x4ConstBase.h:316
bool AlmostEqual(const ThisType &other, value_type tolerance=TypeTraits::Tolerance()) const
Definition vctFrame4x4ConstBase.h:369
bool Equal(const ThisType &other) const
Definition vctFrame4x4ConstBase.h:347
BaseType::ConstColumnRefType ConstColumnRefType
Definition vctFrame4x4ConstBase.h:69
vctFrame4x4< value_type, COLSTRIDE<=ROWSTRIDE > FrameValueType
Definition vctFrame4x4ConstBase.h:74
void ApplyTo(const vctFixedSizeConstVectorBase< DIMENSION, __stride1, value_type, __dataPtrType1 > &input, vctFixedSizeVectorBase< DIMENSION, __stride2, value_type, __dataPtrType2 > &output) const
Definition vctFrame4x4ConstBase.h:161
vctFixedSizeVector< value_type, DIMENSION > ApplyTo(const vctFixedSizeConstVectorBase< DIMENSION, __stride, value_type, __dataPtrType > &input) const
Definition vctFrame4x4ConstBase.h:180
BaseType::RefTransposeType RefTransposeType
Definition vctFrame4x4ConstBase.h:72
vctFixedSizeConstVectorRef< value_type, DIMENSION, ROWSTRIDE > ConstTranslationRefType
Definition vctFrame4x4ConstBase.h:80
void UpdateReferences(void)
Definition vctFrame4x4ConstBase.h:97
BaseType::RowRefType RowRefType
Definition vctFrame4x4ConstBase.h:66
void ApplyInverseTo(const vctFixedSizeConstVectorBase< DIMENSION, __stride1, value_type, __dataPtrType1 > &input, vctFixedSizeVectorBase< DIMENSION, __stride2, value_type, __dataPtrType2 > &output) const
Definition vctFrame4x4ConstBase.h:277
cmnTypeTraits< value_type > TypeTraits
Definition vctFrame4x4ConstBase.h:76
TranslationRefType TranslationRef
Definition vctFrame4x4ConstBase.h:90
FrameValueType ApplyInverseTo(const vctFrame4x4ConstBase< __containerType > &input) const
Definition vctFrame4x4ConstBase.h:332
ContainerType BaseType
Definition vctFrame4x4ConstBase.h:55
vctFixedSizeVectorRef< value_type, DIMENSION, COLSTRIDE > PerspectiveRefType
Definition vctFrame4x4ConstBase.h:81
bool AlmostEquivalent(const ThisType &other, value_type tolerance=TypeTraits::Tolerance()) const
Definition vctFrame4x4ConstBase.h:382
BaseType::DiagonalRefType DiagonalRefType
Definition vctFrame4x4ConstBase.h:70
BaseType::ColumnValueType ColumnValueType
Definition vctFrame4x4ConstBase.h:65
vctFixedSizeConstVectorRef< value_type, DIMENSION, COLSTRIDE > ConstPerspectiveRefType
Definition vctFrame4x4ConstBase.h:82
BaseType::ConstDiagonalRefType ConstDiagonalRefType
Definition vctFrame4x4ConstBase.h:71
@ ROWS
Definition vctFrame4x4ConstBase.h:53
@ COLS
Definition vctFrame4x4ConstBase.h:53
void ApplyTo(const vctFrame4x4ConstBase< __containerType1 > &input, vctFrame4x4Base< __containerType2 > &output) const
Definition vctFrame4x4ConstBase.h:197
void ApplyTo(size_type inputSize, const vctFixedSizeVector< value_type, DIMENSION > *input, vctFixedSizeVector< value_type, DIMENSION > *output) const
Definition vctFrame4x4ConstBase.h:265
@ DIMENSION
Definition vctFrame4x4ConstBase.h:54
@ ROWSTRIDE
Definition vctFrame4x4ConstBase.h:62
@ COLSTRIDE
Definition vctFrame4x4ConstBase.h:62
PerspectiveRefType PerspectiveRef
Definition vctFrame4x4ConstBase.h:91
void ApplyTo(const vctFixedSizeConstMatrixBase< DIMENSION, __cols, __rowStride1, __colStride1, value_type, __dataPtrType1 > &input, vctFixedSizeMatrixBase< DIMENSION, __cols, __rowStride2, __colStride2, value_type, __dataPtrType2 > &output) const
Definition vctFrame4x4ConstBase.h:242
bool IsNormalized(value_type tolerance=TypeTraits::Tolerance()) const
Definition vctFrame4x4ConstBase.h:143
vctFrame4x4ConstBase(void)
Definition vctFrame4x4ConstBase.h:110
BaseType::ColumnRefType ColumnRefType
Definition vctFrame4x4ConstBase.h:67
BaseType::RowValueType RowValueType
Definition vctFrame4x4ConstBase.h:64
ConstRotationRefType Rotation(void) const
Definition vctFrame4x4ConstBase.h:124
vctFixedSizeVectorRef< value_type, DIMENSION, ROWSTRIDE > TranslationRefType
Definition vctFrame4x4ConstBase.h:79
vctMatrixRotation3Ref< value_type, ROWSTRIDE, COLSTRIDE > RotationRefType
Definition vctFrame4x4ConstBase.h:83
void ApplyInverseTo(const vctFrame4x4ConstBase< __containerType1 > &input, vctFrame4x4Base< __containerType2 > &output) const
Definition vctFrame4x4ConstBase.h:324
ContainerType ContainerType
Definition vctFrame4x4ConstBase.h:56
vctMatrixRotation3ConstRef< value_type, ROWSTRIDE, COLSTRIDE > ConstRotationRefType
Definition vctFrame4x4ConstBase.h:84
void ApplyTo(const vctDynamicConstVectorBase< __vectorOwnerType1, value_type > &input, vctDynamicVectorBase< __vectorOwnerType2, value_type > &output) const
Definition vctFrame4x4ConstBase.h:228
BaseType::ConstRefTransposeType ConstRefTransposeType
Definition vctFrame4x4ConstBase.h:73
vctFrame4x4ConstBase< ContainerType > ThisType
Definition vctFrame4x4ConstBase.h:57
static CISST_EXPORT const FrameValueType & Identity(void)
void ApplyInverseTo(const vctDynamicConstVectorBase< __vectorOwnerType1, value_type > &input, vctDynamicVectorBase< __vectorOwnerType2, value_type > &output) const
Definition vctFrame4x4ConstBase.h:293
ConstPerspectiveRefType Perspective(void) const
Definition vctFrame4x4ConstBase.h:128
FrameValueType ApplyTo(const vctFrame4x4ConstBase< __containerType > &input) const
Definition vctFrame4x4ConstBase.h:215
RotationRefType RotationRef
Definition vctFrame4x4ConstBase.h:89
bool operator==(const ThisType &other) const
Definition vctFrame4x4ConstBase.h:352
VCT_CONTAINER_TRAITS_TYPEDEFS(typename ContainerType::value_type)
BaseType::ConstRowRefType ConstRowRefType
Definition vctFrame4x4ConstBase.h:68
FrameValueType Inverse(void) const
Definition vctFrame4x4.h:171
Template base class for a 4x4 frame.
Definition vctFrame4x4.h:51
bool IsNormalized(value_type tolerance=TypeTraits::Tolerance()) const
Definition vctMatrixRotation3ConstBase.h:116
void ApplyInverseTo(const vctFixedSizeConstVectorBase< DIMENSION, __stride1, value_type, __dataPtrType1 > &input, vctFixedSizeVectorBase< DIMENSION, __stride2, value_type, __dataPtrType2 > &output) const
Definition vctMatrixRotation3ConstBase.h:261
void ApplyTo(const vctFixedSizeConstVectorBase< DIMENSION, __stride1, value_type, __dataPtrType1 > &input, vctFixedSizeVectorBase< DIMENSION, __stride2, value_type, __dataPtrType2 > &output) const
Definition vctMatrixRotation3ConstBase.h:156
Define a rotation matrix for a space of dimension 3.
Definition vctMatrixRotation3ConstRef.h:52
Define a rotation matrix for a space of dimension 3.
Definition vctMatrixRotation3Ref.h:52
#define CISST_EXPORT
Definition cmnExportMacros.h:50
ConstRowRefType Row(size_type index) const CISST_THROW(std
Definition vctDynamicConstMatrixBase.h:367
const_pointer Pointer(index_type rowIndex, index_type colIndex) const
Definition vctDynamicConstMatrixBase.h:306
Macros to export the symbols of cisstVector (in a Dll).
Declaration of vctFixedSizeVectorRef.
Declaration of vctMatrixRotation3Ref.
Declaration of vctMatrixRotation3Ref.