cisst-saw
Loading...
Searching...
No Matches
vctFrameBase.h
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/* ex: set filetype=cpp softtabstop=4 shiftwidth=4 tabstop=4 cindent expandtab: */
3
4/*
5 Author(s): Anton Deguet
6 Created on: 2004-02-11
7
8 (C) Copyright 2004-2025 Johns Hopkins University (JHU), All Rights Reserved.
9
10--- begin cisst license - do not edit ---
11
12This software is provided "as is" under an open source license, with
13no warranty. The complete license can be found in license.txt and
14http://www.cisst.org/cisst/license.txt.
15
16--- end cisst license ---
17*/
18
19#pragma once
20#ifndef _vctFrameBase_h
21#define _vctFrameBase_h
22
27
30
47template <class _rotationType>
49{
50public:
51 enum {DIMENSION = _rotationType::DIMENSION};
52 VCT_CONTAINER_TRAITS_TYPEDEFS(typename _rotationType::value_type);
54 typedef _rotationType RotationType;
57
58protected:
61
62public:
63
64
68 }
69
71 template <stride_type __stride, class __dataPtrType>
77
82 template <class __containerType>
83 explicit inline
87
91 template <class __containerType>
92 inline
94 bool normalizeInput) {
95 if (normalizeInput) {
96 this->FromNormalized(other);
97 } else {
98 this->FromRaw(other);
99 }
100 }
101
107
108
109 inline ThisType & Assign(const ThisType & otherFrame) {
110 RotationMember.Assign(otherFrame.Rotation());
112 return *this;
113 }
114
115 template <stride_type __stride, class __dataPtrType>
116 inline ThisType & Assign(const RotationType & rotation,
118 RotationMember.Assign(rotation);
119 TranslationMember.Assign(translation);
120 return *this;
121 }
122
123
130 template <class __rotationType>
132 CISST_THROW(std::runtime_error)
133 {
134 this->Rotation().From(other.Rotation());
135 this->Translation().Assign(other.Translation());
136 return *this;
137 }
138
139 template <class __rotationType>
141 this->Rotation().FromNormalized(other.Rotation());
142 this->Translation().Assign(other.Translation());
143 return *this;
144 }
145
146 template <class __rotationType>
148 this->Rotation().FromRaw(other.Rotation());
149 this->Translation().Assign(other.Translation());
150 return *this;
151 }
152
153
154
161 template <class __containerType>
163 CISST_THROW(std::runtime_error)
164 {
165 this->Rotation().From(other.Rotation());
166 this->Translation().Assign(other.Translation());
167 return *this;
168 }
169
170 template <class __containerType>
172 this->Rotation().FromNormalized(other.Rotation());
173 this->Translation().Assign(other.Translation());
174 return *this;
175 }
176
177 template <class __containerType>
179 this->Rotation().FromRaw(other.Rotation());
180 this->Translation().Assign(other.Translation());
181 return *this;
182 }
183
184
185
186 inline const TranslationType & Translation(void) const {
187 return TranslationMember;
188 }
189
191 return TranslationMember;
192 }
193
194 // GetTranslation and SetTranslation provided primarily for Python wrapping.
195 // Note that GetTranslation returns a copy, rather than a reference.
196
197 inline TranslationType GetTranslation(void) const {
198 return TranslationMember;
199 }
200
201 inline void SetTranslation(const TranslationType &trans) {
202 TranslationMember = trans;
203 }
204
205 inline const RotationType & Rotation(void) const {
206 return RotationMember;
207 }
208
209 inline RotationType & Rotation(void) {
210 return RotationMember;
211 }
212
213 // GetRotation and SetRotation provided primarily for Python wrapping.
214 // Note that GetRotation returns a copy, rather than a reference.
215
216 inline RotationType GetRotation(void) const {
217 return RotationMember;
218 }
219
220 inline void SetRotation(const RotationType &rot) {
221 RotationMember = rot;
222 }
223
226 inline bool IsNormalized(value_type tolerance = TypeTraits::Tolerance()) const {
227 return this->Rotation().IsNormalized(tolerance);
228 }
229
233 this->Rotation().NormalizedSelf();
234 return *this;
235 }
236
238 inline ThisType & InverseSelf(void) {
239 // R -> Rinv
241 // T -> Rinv * (-T)
244 return *this;
245 }
246
247
248 inline ThisType & InverseOf(const ThisType & otherFrame) {
249 TranslationMember = otherFrame.Translation();
250 RotationMember = otherFrame.Rotation();
251 InverseSelf();
252 return *this;
253 }
254
255 inline ThisType Inverse(void) const {
256 ThisType result;
257 result.InverseOf(*this);
258 return result;
259 }
260
261
269 template <stride_type __stride1, class __dataPtrType1, stride_type __stride2, class __dataPtrType2>
270 inline void
276
277
286 template <stride_type __stride, class __dataPtrType>
289 TranslationType result;
290 this->ApplyTo(input, result);
291 return result;
292 }
293
299 template<class _vectorOwnerType>
302 {
303 TranslationType result;
304 this->ApplyTo(input, result);
305 return result;
306 }
307
317 inline void ApplyTo(const ThisType & input, ThisType & output) const {
318 TranslationType temp;
319 RotationMember.ApplyTo(input.Translation(), temp);
320 (output.Rotation()).ProductOf(RotationMember, input.Rotation());
321 (output.Translation()).SumOf(temp, TranslationMember);
322 }
323
324
329 inline void ProductOf(const ThisType & left, ThisType & right) {
330 left.ApplyTo(right, *this);
331 }
332
333
342 inline ThisType ApplyTo(const ThisType & input) const {
343 ThisType result;
344 this->ApplyTo(input, result);
345 return result;
346 }
347
348
353 template <class _vectorOwnerType1, class _vectorOwnerType2>
354 inline void
357 {
358 if (output.size() < DIMENSION) {
359 cmnThrow("vctFrameBase::ApplyTo: size of output is too small");
360 }
361 // Implementation note: we think that computing output first to a local variable,
362 // then copying the result to the dynamic vector output, is more efficient than
363 // computing directly to the output vector, because there is less pointer
364 // arithmetic when doing the local variable.
365 // Hopefully, the conditions below can be optimized out since their value is
366 // known in compile time.
367 TranslationType result;
368 this->ApplyTo(input, result);
369 if (DIMENSION > 0)
370 output[0] = result[0];
371 if (DIMENSION > 1)
372 output[1] = result[1];
373 if (DIMENSION > 2)
374 output[2] = result[2];
375 }
376
381 template <class _vectorOwnerType1, stride_type __stride2, class __dataPtrType2>
382 inline void
385 {
386 if (input.size() < DIMENSION) {
387 cmnThrow("vctFrameBase::ApplyTo: size of input is too small");
388 }
389 TranslationType result;
390 // See implementation notes for rotation class
391 RotationMember.ApplyTo(input, result);
392 output.SumOf(result, TranslationMember);
393 }
394
395
397 template <size_type __cols,
398 stride_type __rowStride1, stride_type __colStride1, class __dataPtrType1,
399 stride_type __rowStride2, stride_type __colStride2, class __dataPtrType2>
411
412
419 inline void ApplyTo(size_type inputSize, const vctFixedSizeVector<value_type, DIMENSION> * input,
421 {
422 index_type index;
423 for (index = 0; index < inputSize; ++index) {
424 this->ApplyTo(input[index], output[index]);
425 }
426 }
427
431 template <class __matrixOwnerType1, class __matrixOwnerType2>
434 {
435 CMN_ASSERT((input.rows() == DIMENSION) && (output.rows() == DIMENSION) && (input.cols() == output.cols()));
436 CMN_ASSERT(input.Pointer() != output.Pointer());
437 RotationMember.ApplyTo(input, output);
438 if (DIMENSION > 0)
439 output.Row(0).Add(TranslationMember[0]);
440 if (DIMENSION > 1)
441 output.Row(1).Add(TranslationMember[1]);
442 if (DIMENSION > 2)
443 output.Row(2).Add(TranslationMember[2]);
444 }
445
446
447 template <stride_type __stride1, class __dataPtrType1,
448 stride_type __stride2, class __dataPtrType2>
449 inline void
456
464 template <class _vectorOwnerType1, class _vectorOwnerType2>
465 inline void
468 {
469 TranslationType temp, result;
470 if (DIMENSION > 0)
471 temp[0] = input[0] - TranslationMember[0];
472 if (DIMENSION > 1)
473 temp[1] = input[1] - TranslationMember[1];
474 if (DIMENSION > 2)
475 temp[2] = input[2] - TranslationMember[2];
476 RotationMember.ApplyInverseTo(temp, result);
477 if (DIMENSION > 0)
478 output[0] = result[0];
479 if (DIMENSION > 1)
480 output[1] = result[1];
481 if (DIMENSION > 2)
482 output[2] = result[2];
483 }
484
485
490 template <class _vectorOwnerType1, stride_type __stride2, class __dataPtrType2>
491 inline void
494 {
495 TranslationType temp;
496 if (DIMENSION > 0)
497 temp[0] = input[0] - TranslationMember[0];
498 if (DIMENSION > 1)
499 temp[1] = input[1] - TranslationMember[1];
500 if (DIMENSION > 2)
501 temp[2] = input[2] - TranslationMember[2];
502 RotationMember.ApplyInverseTo(temp, output);
503 }
504
513 template <stride_type __stride, class __dataPtrType>
520
521
527 template <class _vectorOwnerType>
530 {
532 this->ApplyInverseTo(input, result);
533 return result;
534 }
535
536 inline void ApplyInverseTo(const ThisType & input, ThisType & output) const {
537 ThisType inverse;
538 inverse.InverseOf(*this);
539 inverse.ApplyTo(input, output);
540 }
541
542
543 inline ThisType ApplyInverseTo(const ThisType & input) const {
544 ThisType result;
545 this->ApplyInverseTo(input, result);
546 return result;
547 }
548
550 template <size_type __cols,
551 stride_type __rowStride1, stride_type __colStride1, class __dataPtrType1,
552 stride_type __rowStride2, stride_type __colStride2, class __dataPtrType2>
555 {
557 RotationMember.ApplyInverseTo(input, output);
558 if (DIMENSION > 0)
559 output.Row(0).Add(invTranslation[0]);
560 if (DIMENSION > 1)
561 output.Row(1).Add(invTranslation[1]);
562 if (DIMENSION > 2)
563 output.Row(2).Add(invTranslation[2]);
564 }
565
569 template <class __matrixOwnerType1, class __matrixOwnerType2>
572 {
573 CMN_ASSERT((input.rows() == DIMENSION) && (output.rows() == DIMENSION) && (input.cols() == output.cols()));
574 CMN_ASSERT(input.Pointer() != output.Pointer());
576 RotationMember.ApplyInverseTo(input, output);
577 if (DIMENSION > 0)
578 output.Row(0).Add(invTranslation[0]);
579 if (DIMENSION > 1)
580 output.Row(1).Add(invTranslation[1]);
581 if (DIMENSION > 2)
582 output.Row(2).Add(invTranslation[2]);
583 }
584
585
590 template <stride_type _stride, class _dataPtrType>
593 {
595 this->ApplyTo(vector, result);
596 return result;
597 }
598
599
600 template<class _vectorOwnerType>
603 {
605 this->ApplyTo(input, result);
606 return result;
607 }
608
609
619 inline bool Equal(const ThisType & other) const {
620 return (RotationMember.Equal(other.Rotation())
622 }
623
624 inline bool operator==(const ThisType & other) const {
625 return this->Equal(other);
626 }
627
628
629
641 inline bool AlmostEqual(const ThisType & other,
642 value_type tolerance = TypeTraits::Tolerance()) const {
643 return (RotationMember.AlmostEqual(other.Rotation(), tolerance)
644 && TranslationMember.AlmostEqual(other.Translation(), tolerance));
645 }
646
647
659 inline bool AlmostEquivalent(const ThisType & other,
660 value_type tolerance = TypeTraits::Tolerance()) const {
661 return (RotationMember.AlmostEquivalent(other.Rotation(), tolerance)
662 && TranslationMember.AlmostEqual(other.Translation(), tolerance));
663 }
664
665
666 std::string ToString(void) const {
667 std::stringstream outputStream;
668 ToStream(outputStream);
669 return outputStream.str();
670 }
671
673 void ToStream(std::ostream & outputStream) const {
674 outputStream << "translation: "
675 << std::endl
676 << this->Translation()
677 << std::endl
678 << "rotation: "
679 << std::endl
680 << this->Rotation();
681 }
682
683 void ToStreamRaw(std::ostream & outputStream, const char delimiter = ' ',
684 bool headerOnly = false, const std::string & headerPrefix = "") const {
685 this->Translation().ToStreamRaw(outputStream, delimiter, headerOnly, headerPrefix);
686 outputStream << delimiter;
687 this->Rotation().ToStreamRaw(outputStream, delimiter, headerOnly, headerPrefix);
688 }
689
692 bool FromStreamRaw(std::istream & inputStream, const char delimiter = ' ')
693 {
694 TranslationType trans;
695 RotationType rot;
696 bool valid = trans.FromStreamRaw(inputStream, delimiter);
697 if ((valid) && !isspace(delimiter)) {
698 char c;
699 inputStream >> c;
700 valid = (c == delimiter);
701 }
702 if (valid)
703 valid = rot.FromStreamRaw(inputStream, delimiter);
704 if (valid) {
705 TranslationMember = trans;
706 RotationMember = rot;
707 }
708 return valid;
709 }
710
712 void SerializeRaw(std::ostream & outputStream) const
713 {
714 this->Translation().SerializeRaw(outputStream);
715 this->Rotation().SerializeRaw(outputStream);
716 }
717
719 void DeSerializeRaw(std::istream & inputStream)
720 {
721 this->Translation().DeSerializeRaw(inputStream);
722 this->Rotation().DeSerializeRaw(inputStream);
723 }
724
725};
726
727
728template <class _rotationType>
731 const vctFrameBase<_rotationType> & frame2) {
733 frame1.ApplyTo(frame2, result);
734 return result;
735}
736
737template <vct::size_type _cols, vct::stride_type _rowStride, vct::stride_type _colStride, class _rotationType, class _elementType, class _dataPtrType>
746
748template <class _rotationType>
749std::ostream & operator << (std::ostream & output,
750 const vctFrameBase<_rotationType> & frame) {
751 frame.ToStream(output);
752 return output;
753}
754
755#endif // _vctFrameBase_h
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:145
Definition vctForwardDeclarations.h:119
Definition vctDynamicMatrixBase.h:43
pointer Pointer(size_type rowIndex, size_type colIndex)
Definition vctDynamicMatrixBase.h:143
RowRefType Row(size_type index) CISST_THROW(std
Definition vctDynamicMatrixBase.h:227
Definition vctDynamicVectorBase.h:62
A template for a fixed size matrix with fixed spacing in memory.
Definition vctFixedSizeConstMatrixBase.h:104
A template for a fixed length vector with fixed spacing in memory.
Definition vctFixedSizeConstVectorBase.h:108
void ToStreamRaw(std::ostream &outputStream, const char delimiter=' ', bool headerOnly=false, const std::string &headerPrefix="") const
Definition vctFixedSizeConstVectorBase.h:1118
void SerializeRaw(std::ostream &outputStream) const
Definition vctFixedSizeConstVectorBase.h:1141
bool Equal(const vctFixedSizeConstVectorBase< _size, __stride, value_type, __dataPtrType > &otherVector) const
Definition vctFixedSizeConstVectorBase.h:684
bool AlmostEqual(const vctFixedSizeConstVectorBase< _size, __stride, value_type, __dataPtrType > &otherVector, value_type tolerance) const
Definition vctFixedSizeConstVectorBase.h:701
A template for a fixed size matrix with fixed spacings in memory.
Definition vctFixedSizeMatrixBase.h:60
RowRefType Row(size_type index)
Definition vctFixedSizeMatrixBase.h:244
Implementation of a fixed-size matrix using template metaprogramming.
Definition vctFixedSizeMatrix.h:54
A template for a fixed length vector with fixed spacing in memory.
Definition vctFixedSizeVectorBase.h:77
ThisType & SumOf(const vctFixedSizeConstVectorBase< _size, __stride1, value_type, __dataPtrType1 > &vector1, const vctFixedSizeConstVectorBase< _size, __stride2, value_type, __dataPtrType2 > &vector2)
Definition vctFixedSizeVectorBase.h:809
ThisType & Assign(const vctFixedSizeConstVectorBase< _size, __stride, __elementType, __dataPtrType > &other)
Definition vctFixedSizeVectorBase.h:274
ThisType & DifferenceOf(const vctFixedSizeConstVectorBase< _size, __stride1, value_type, __dataPtrType1 > &vector1, const vctFixedSizeConstVectorBase< _size, __stride2, value_type, __dataPtrType2 > &vector2)
Definition vctFixedSizeVectorBase.h:820
ThisType & Add(const vctFixedSizeConstVectorBase< _size, __stride, value_type, __dataPtrType > &otherVector)
Definition vctFixedSizeVectorBase.h:886
Implementation of a fixed-size vector using template metaprogramming.
Definition vctFixedSizeVector.h:54
bool FromStreamRaw(std::istream &inputStream, const char delimiter=' ')
Definition vctFixedSizeVector.h:268
void DeSerializeRaw(std::istream &inputStream)
Definition vctFixedSizeVector.h:301
Template base class for a 4x4 frame.
Definition vctFrame4x4ConstBase.h:51
ConstTranslationRefType Translation(void) const
Definition vctFrame4x4ConstBase.h:120
ConstRotationRefType Rotation(void) const
Definition vctFrame4x4ConstBase.h:124
Template base class for a frame.
Definition vctFrameBase.h:49
void ApplyInverseTo(const vctDynamicConstVectorBase< _vectorOwnerType1, value_type > &input, vctDynamicVectorBase< _vectorOwnerType2, value_type > &output) const
Definition vctFrameBase.h:466
_rotationType RotationType
Definition vctFrameBase.h:54
vctFrameBase< _rotationType > ThisType
Definition vctFrameBase.h:53
void ApplyInverseTo(const vctDynamicConstMatrixBase< __matrixOwnerType1, value_type > &input, vctDynamicMatrixBase< __matrixOwnerType2, value_type > &output) const
Definition vctFrameBase.h:570
TranslationType GetTranslation(void) const
Definition vctFrameBase.h:197
ThisType & From(const vctFrame4x4ConstBase< __containerType > &other) CISST_THROW(std
Definition vctFrameBase.h:162
@ DIMENSION
Definition vctFrameBase.h:51
void SerializeRaw(std::ostream &outputStream) const
Definition vctFrameBase.h:712
RotationType GetRotation(void) const
Definition vctFrameBase.h:216
ThisType & InverseOf(const ThisType &otherFrame)
Definition vctFrameBase.h:248
ThisType & FromRaw(const vctFrame4x4ConstBase< __containerType > &other)
Definition vctFrameBase.h:178
void ApplyTo(const vctDynamicConstMatrixBase< __matrixOwnerType1, value_type > &input, vctDynamicMatrixBase< __matrixOwnerType2, value_type > &output) const
Definition vctFrameBase.h:432
void ApplyInverseTo(const vctFixedSizeConstVectorBase< DIMENSION, __stride1, value_type, __dataPtrType1 > &input, vctFixedSizeVectorBase< DIMENSION, __stride2, value_type, __dataPtrType2 > &output) const
Definition vctFrameBase.h:450
void ApplyTo(const vctFixedSizeConstVectorBase< DIMENSION, __stride1, value_type, __dataPtrType1 > &input, vctFixedSizeVectorBase< DIMENSION, __stride2, value_type, __dataPtrType2 > &output) const
Definition vctFrameBase.h:271
bool operator==(const ThisType &other) const
Definition vctFrameBase.h:624
ThisType & FromRaw(const vctFrameBase< __rotationType > &other)
Definition vctFrameBase.h:147
ThisType & From(const vctFrameBase< __rotationType > &other) CISST_THROW(std
Definition vctFrameBase.h:131
vctFixedSizeVector< value_type, DIMENSION > TranslationType
Definition vctFrameBase.h:55
void SetRotation(const RotationType &rot)
Definition vctFrameBase.h:220
void ApplyInverseTo(const ThisType &input, ThisType &output) const
Definition vctFrameBase.h:536
void ApplyTo(const vctDynamicConstVectorBase< _vectorOwnerType1, value_type > &input, vctFixedSizeVectorBase< DIMENSION, __stride2, value_type, __dataPtrType2 > &output) const
Definition vctFrameBase.h:383
vctFixedSizeVector< value_type, DIMENSION > ApplyTo(const vctDynamicConstVectorBase< _vectorOwnerType, value_type > &input) const
Definition vctFrameBase.h:301
RotationType RotationMember
Definition vctFrameBase.h:59
vctFrameBase(const vctFrame4x4ConstBase< __containerType > &other, bool normalizeInput)
Definition vctFrameBase.h:93
vctFrameBase(const RotationType &rotation, const vctFixedSizeConstVectorBase< DIMENSION, __stride, value_type, __dataPtrType > &translation)
Definition vctFrameBase.h:72
ThisType ApplyTo(const ThisType &input) const
Definition vctFrameBase.h:342
const RotationType & Rotation(void) const
Definition vctFrameBase.h:205
ThisType & FromNormalized(const vctFrameBase< __rotationType > &other)
Definition vctFrameBase.h:140
ThisType & Assign(const ThisType &otherFrame)
Definition vctFrameBase.h:109
void ApplyInverseTo(const vctDynamicConstVectorBase< _vectorOwnerType1, value_type > &input, vctFixedSizeVectorBase< DIMENSION, __stride2, value_type, __dataPtrType2 > &output) const
Definition vctFrameBase.h:492
vctFixedSizeVector< value_type, DIMENSION > ApplyTo(const vctFixedSizeConstVectorBase< DIMENSION, __stride, value_type, __dataPtrType > &input) const
Definition vctFrameBase.h:288
vctFixedSizeVector< value_type, DIMENSION > operator*(const vctFixedSizeConstVectorBase< DIMENSION, _stride, value_type, _dataPtrType > &vector) const
Definition vctFrameBase.h:592
void ApplyTo(const vctFixedSizeConstMatrixBase< DIMENSION, __cols, __rowStride1, __colStride1, value_type, __dataPtrType1 > &input, vctFixedSizeMatrixBase< DIMENSION, __cols, __rowStride2, __colStride2, value_type, __dataPtrType2 > &output) const
Definition vctFrameBase.h:400
void ToStreamRaw(std::ostream &outputStream, const char delimiter=' ', bool headerOnly=false, const std::string &headerPrefix="") const
Definition vctFrameBase.h:683
TranslationType TranslationMember
Definition vctFrameBase.h:60
const TranslationType & Translation(void) const
Definition vctFrameBase.h:186
void ToStream(std::ostream &outputStream) const
Definition vctFrameBase.h:673
bool IsNormalized(value_type tolerance=TypeTraits::Tolerance()) const
Definition vctFrameBase.h:226
vctFixedSizeVector< value_type, DIMENSION > ApplyInverseTo(const vctDynamicConstVectorBase< _vectorOwnerType, value_type > &input) const
Definition vctFrameBase.h:529
void ApplyInverseTo(const vctFixedSizeConstMatrixBase< DIMENSION, __cols, __rowStride1, __colStride1, value_type, __dataPtrType1 > &input, vctFixedSizeMatrixBase< DIMENSION, __cols, __rowStride2, __colStride2, value_type, __dataPtrType2 > &output) const
Definition vctFrameBase.h:553
ThisType ApplyInverseTo(const ThisType &input) const
Definition vctFrameBase.h:543
bool FromStreamRaw(std::istream &inputStream, const char delimiter=' ')
Definition vctFrameBase.h:692
ThisType & Assign(const RotationType &rotation, const vctFixedSizeConstVectorBase< DIMENSION, __stride, value_type, __dataPtrType > &translation)
Definition vctFrameBase.h:116
void SetTranslation(const TranslationType &trans)
Definition vctFrameBase.h:201
ThisType Inverse(void) const
Definition vctFrameBase.h:255
void ApplyTo(const ThisType &input, ThisType &output) const
Definition vctFrameBase.h:317
bool Equal(const ThisType &other) const
Definition vctFrameBase.h:619
static CISST_EXPORT const ThisType & Identity()
vctFrameBase(void)
Definition vctFrameBase.h:66
void ApplyTo(const vctDynamicConstVectorBase< _vectorOwnerType1, value_type > &input, vctDynamicVectorBase< _vectorOwnerType2, value_type > &output) const
Definition vctFrameBase.h:355
ThisType & InverseSelf(void)
Definition vctFrameBase.h:238
vctFrameBase(const vctFrame4x4ConstBase< __containerType > &other)
Definition vctFrameBase.h:84
cmnTypeTraits< value_type > TypeTraits
Definition vctFrameBase.h:56
bool AlmostEquivalent(const ThisType &other, value_type tolerance=TypeTraits::Tolerance()) const
Definition vctFrameBase.h:659
VCT_CONTAINER_TRAITS_TYPEDEFS(typename _rotationType::value_type)
bool AlmostEqual(const ThisType &other, value_type tolerance=TypeTraits::Tolerance()) const
Definition vctFrameBase.h:641
TranslationType & Translation(void)
Definition vctFrameBase.h:190
void ProductOf(const ThisType &left, ThisType &right)
Definition vctFrameBase.h:329
std::string ToString(void) const
Definition vctFrameBase.h:666
ThisType & FromNormalized(const vctFrame4x4ConstBase< __containerType > &other)
Definition vctFrameBase.h:171
void ApplyTo(size_type inputSize, const vctFixedSizeVector< value_type, DIMENSION > *input, vctFixedSizeVector< value_type, DIMENSION > *output) const
Definition vctFrameBase.h:419
ThisType & NormalizedSelf(void)
Definition vctFrameBase.h:232
void DeSerializeRaw(std::istream &inputStream)
Definition vctFrameBase.h:719
RotationType & Rotation(void)
Definition vctFrameBase.h:209
vctFixedSizeVector< value_type, DIMENSION > ApplyInverseTo(const vctFixedSizeConstVectorBase< DIMENSION, __stride, value_type, __dataPtrType > &input) const
Definition vctFrameBase.h:515
bool AlmostEquivalent(const ThisType &other, value_type tolerance=TypeTraits::Tolerance()) const
Definition vctQuaternionRotation3Base.h:857
void ApplyTo(const vctFixedSizeConstVectorBase< DIMENSION, __stride1, value_type, __dataPtrType1 > &input, vctFixedSizeVectorBase< DIMENSION, __stride2, value_type, __dataPtrType2 > &output) const
Definition vctQuaternionRotation3Base.h:572
void ApplyInverseTo(const vctFixedSizeConstVectorBase< DIMENSION, __stride1, value_type, __dataPtrType1 > &input, vctFixedSizeVectorBase< DIMENSION, __stride2, value_type, __dataPtrType2 > &output) const
Definition vctQuaternionRotation3Base.h:714
ThisType & InverseSelf(void)
Definition vctQuaternionRotation3Base.h:542
#define CMN_ASSERT(expr)
Definition cmnAssert.h:97
#define CISST_EXPORT
Definition cmnExportMacros.h:50
#define CISST_THROW(exceptionParameter)
Somewhat portable compilation warning message. This works with very recent versions of gcc (4....
Definition cmnPortability.h:559
void cmnThrow(const _exceptionType &except, cmnLogLevel lod=CMN_LOG_LEVEL_INIT_ERROR)
Definition cmnThrow.h:76
Macros to export the symbols of cisstVector (in a Dll).
Declaration of vctFixedSizeMatrixBase.
std::ostream & operator<<(std::ostream &output, const vctFrameBase< _rotationType > &frame)
Definition vctFrameBase.h:749
vctFrameBase< _rotationType > operator*(const vctFrameBase< _rotationType > &frame1, const vctFrameBase< _rotationType > &frame2)
Definition vctFrameBase.h:730