cisst-saw
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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 
6  Author(s): Anton Deguet
7  Created on: 2004-02-11
8 
9  (C) Copyright 2004-2012 Johns Hopkins University (JHU), All Rights
10  Reserved.
11 
12 --- begin cisst license - do not edit ---
13 
14 This software is provided "as is" under an open source license, with
15 no warranty. The complete license can be found in license.txt and
16 http://www.cisst.org/cisst/license.txt.
17 
18 --- end cisst license ---
19 */
20 
21 #pragma once
22 #ifndef _vctFrameBase_h
23 #define _vctFrameBase_h
24 
31 #include <cisstVector/vctExport.h>
32 
49 template <class _rotationType>
50 class vctFrameBase
51 {
52 public:
53  enum {DIMENSION = _rotationType::DIMENSION};
54  VCT_CONTAINER_TRAITS_TYPEDEFS(typename _rotationType::value_type);
56  typedef _rotationType RotationType;
59 
60 protected:
63 
64 public:
65 
66 
68  vctFrameBase(void) {
69  Assign(Identity());
70  }
71 
73  template <stride_type __stride, class __dataPtrType>
74  vctFrameBase(const RotationType & rotation,
76  RotationMember(rotation),
77  TranslationMember(translation)
78  {}
79 
84  template <class __containerType>
85  explicit inline
87  From(other);
88  }
89 
93  template <class __containerType>
94  inline
96  bool normalizeInput) {
97  if (normalizeInput) {
98  this->FromNormalized(other);
99  } else {
100  this->FromRaw(other);
101  }
102  }
103 
108  static CISST_EXPORT const ThisType & Identity();
109 
110 
111  inline ThisType & Assign(const ThisType & otherFrame) {
112  RotationMember.Assign(otherFrame.Rotation());
113  TranslationMember.Assign(otherFrame.Translation());
114  return *this;
115  }
116 
117  template <stride_type __stride, class __dataPtrType>
118  inline ThisType & Assign(const RotationType & rotation,
120  RotationMember.Assign(rotation);
121  TranslationMember.Assign(translation);
122  return *this;
123  }
124 
125 
132  template <class __rotationType>
134  throw (std::runtime_error)
135  {
136  this->Rotation().From(other.Rotation());
137  this->Translation().Assign(other.Translation());
138  return *this;
139  }
140 
141  template <class __rotationType>
143  this->Rotation().FromNormalized(other.Rotation());
144  this->Translation().Assign(other.Translation());
145  return *this;
146  }
147 
148  template <class __rotationType>
150  this->Rotation().FromRaw(other.Rotation());
151  this->Translation().Assign(other.Translation());
152  return *this;
153  }
155 
156 
163  template <class __containerType>
165  throw (std::runtime_error)
166  {
167  this->Rotation().From(other.Rotation());
168  this->Translation().Assign(other.Translation());
169  return *this;
170  }
171 
172  template <class __containerType>
174  this->Rotation().FromNormalized(other.Rotation());
175  this->Translation().Assign(other.Translation());
176  return *this;
177  }
178 
179  template <class __containerType>
181  this->Rotation().FromRaw(other.Rotation());
182  this->Translation().Assign(other.Translation());
183  return *this;
184  }
186 
187 
188  inline const TranslationType & Translation(void) const {
189  return TranslationMember;
190  }
191 
192  inline TranslationType & Translation(void) {
193  return TranslationMember;
194  }
195 
196  inline const RotationType & Rotation(void) const {
197  return RotationMember;
198  }
199 
200  inline RotationType & Rotation(void) {
201  return RotationMember;
202  }
203 
206  inline bool IsNormalized(value_type tolerance = TypeTraits::Tolerance()) const {
207  return this->Rotation().IsNormalized(tolerance);
208  }
209 
213  this->Rotation().NormalizedSelf();
214  return *this;
215  }
216 
218  inline ThisType & InverseSelf(void) {
219  // R -> Rinv
220  RotationMember.InverseSelf();
221  // T -> Rinv * (-T)
223  RotationMember.ApplyTo(temp, TranslationMember);
224  return *this;
225  }
226 
227 
228  inline ThisType & InverseOf(const ThisType & otherFrame) {
229  TranslationMember = otherFrame.Translation();
230  RotationMember = otherFrame.Rotation();
231  InverseSelf();
232  return *this;
233  }
234 
235  inline ThisType Inverse(void) const {
236  ThisType result;
237  result.InverseOf(*this);
238  return result;
239  }
240 
241 
249  template <stride_type __stride1, class __dataPtrType1, stride_type __stride2, class __dataPtrType2>
250  inline void
253  RotationMember.ApplyTo(input, output);
254  output.Add(TranslationMember);
255  }
256 
257 
266  template <stride_type __stride, class __dataPtrType>
269  TranslationType result;
270  this->ApplyTo(input, result);
271  return result;
272  }
273 
279  template<class _vectorOwnerType>
282  {
283  TranslationType result;
284  this->ApplyTo(input, result);
285  return result;
286  }
287 
297  inline void ApplyTo(const ThisType & input, ThisType & output) const {
298  TranslationType temp;
299  RotationMember.ApplyTo(input.Translation(), temp);
300  (output.Rotation()).ProductOf(RotationMember, input.Rotation());
301  (output.Translation()).SumOf(temp, TranslationMember);
302  }
303 
304 
309  inline void ProductOf(const ThisType & left, ThisType & right) {
310  left.ApplyTo(right, *this);
311  }
312 
313 
322  inline ThisType ApplyTo(const ThisType & input) const {
323  ThisType result;
324  this->ApplyTo(input, result);
325  return result;
326  }
327 
328 
333  template <class _vectorOwnerType1, class _vectorOwnerType2>
334  inline void
337  {
338  if (output.size() < DIMENSION) {
339  cmnThrow("vctFrameBase::ApplyTo: size of output is too small");
340  }
341  // Implementation note: we think that computing output first to a local variable,
342  // then copying the result to the dynamic vector output, is more efficient than
343  // computing directly to the output vector, because there is less pointer
344  // arithmetic when doing the local variable.
345  // Hopefully, the conditions below can be optimized out since their value is
346  // known in compile time.
347  TranslationType result;
348  this->ApplyTo(input, result);
349  if (DIMENSION > 0)
350  output[0] = result[0];
351  if (DIMENSION > 1)
352  output[1] = result[1];
353  if (DIMENSION > 2)
354  output[2] = result[2];
355  }
356 
361  template <class _vectorOwnerType1, stride_type __stride2, class __dataPtrType2>
362  inline void
365  {
366  if (input.size() < DIMENSION) {
367  cmnThrow("vctFrameBase::ApplyTo: size of input is too small");
368  }
369  TranslationType result;
370  // See implementation notes for rotation class
371  RotationMember.ApplyTo(input, result);
372  output.SumOf(result, TranslationMember);
373  }
374 
375 
377  template <size_type __cols,
378  stride_type __rowStride1, stride_type __colStride1, class __dataPtrType1,
379  stride_type __rowStride2, stride_type __colStride2, class __dataPtrType2>
382  {
383  RotationMember.ApplyTo(input, output);
384  if (DIMENSION > 0)
385  output.Row(0).Add(TranslationMember[0]);
386  if (DIMENSION > 1)
387  output.Row(1).Add(TranslationMember[1]);
388  if (DIMENSION > 2)
389  output.Row(2).Add(TranslationMember[2]);
390  }
391 
392 
399  inline void ApplyTo(size_type inputSize, const vctFixedSizeVector<value_type, DIMENSION> * input,
401  {
402  index_type index;
403  for (index = 0; index < inputSize; ++index) {
404  this->ApplyTo(input[index], output[index]);
405  }
406  }
407 
411  template <class __matrixOwnerType1, class __matrixOwnerType2>
414  {
415  CMN_ASSERT((input.rows() == DIMENSION) && (output.rows() == DIMENSION) && (input.cols() == output.cols()));
416  CMN_ASSERT(input.Pointer() != output.Pointer());
417  RotationMember.ApplyTo(input, output);
418  if (DIMENSION > 0)
419  output.Row(0).Add(TranslationMember[0]);
420  if (DIMENSION > 1)
421  output.Row(1).Add(TranslationMember[1]);
422  if (DIMENSION > 2)
423  output.Row(2).Add(TranslationMember[2]);
424  }
425 
426 
427  template <stride_type __stride1, class __dataPtrType1,
428  stride_type __stride2, class __dataPtrType2>
429  inline void
432  TranslationType temp;
433  temp.DifferenceOf(input, TranslationMember);
434  RotationMember.ApplyInverseTo(temp, output);
435  }
436 
444  template <class _vectorOwnerType1, class _vectorOwnerType2>
445  inline void
448  {
449  TranslationType temp, result;
450  if (DIMENSION > 0)
451  temp[0] = input[0] - TranslationMember[0];
452  if (DIMENSION > 1)
453  temp[1] = input[1] - TranslationMember[1];
454  if (DIMENSION > 2)
455  temp[2] = input[2] - TranslationMember[2];
456  RotationMember.ApplyInverseTo(temp, result);
457  if (DIMENSION > 0)
458  output[0] = result[0];
459  if (DIMENSION > 1)
460  output[1] = result[1];
461  if (DIMENSION > 2)
462  output[2] = result[2];
463  }
464 
465 
470  template <class _vectorOwnerType1, stride_type __stride2, class __dataPtrType2>
471  inline void
474  {
475  TranslationType temp;
476  if (DIMENSION > 0)
477  temp[0] = input[0] - TranslationMember[0];
478  if (DIMENSION > 1)
479  temp[1] = input[1] - TranslationMember[1];
480  if (DIMENSION > 2)
481  temp[2] = input[2] - TranslationMember[2];
482  RotationMember.ApplyInverseTo(temp, output);
483  }
484 
493  template <stride_type __stride, class __dataPtrType>
497  this->ApplyInverseTo(input, result);
498  return result;
499  }
500 
501 
507  template <class _vectorOwnerType>
510  {
512  this->ApplyInverseTo(input, result);
513  return result;
514  }
515 
516  inline void ApplyInverseTo(const ThisType & input, ThisType & output) const {
517  ThisType inverse;
518  inverse.InverseOf(*this);
519  inverse.ApplyTo(input, output);
520  }
521 
522 
523  inline ThisType ApplyInverseTo(const ThisType & input) const {
524  ThisType result;
525  this->ApplyInverseTo(input, result);
526  return result;
527  }
528 
530  template <size_type __cols,
531  stride_type __rowStride1, stride_type __colStride1, class __dataPtrType1,
532  stride_type __rowStride2, stride_type __colStride2, class __dataPtrType2>
535  {
536  const TranslationType invTranslation = RotationMember.ApplyInverseTo(-TranslationMember);
537  RotationMember.ApplyInverseTo(input, output);
538  if (DIMENSION > 0)
539  output.Row(0).Add(invTranslation[0]);
540  if (DIMENSION > 1)
541  output.Row(1).Add(invTranslation[1]);
542  if (DIMENSION > 2)
543  output.Row(2).Add(invTranslation[2]);
544  }
545 
549  template <class __matrixOwnerType1, class __matrixOwnerType2>
552  {
553  CMN_ASSERT((input.rows() == DIMENSION) && (output.rows() == DIMENSION) && (input.cols() == output.cols()));
554  CMN_ASSERT(input.Pointer() != output.Pointer());
555  const TranslationType invTranslation = RotationMember.ApplyInverseTo(-TranslationMember);
556  RotationMember.ApplyInverseTo(input, output);
557  if (DIMENSION > 0)
558  output.Row(0).Add(invTranslation[0]);
559  if (DIMENSION > 1)
560  output.Row(1).Add(invTranslation[1]);
561  if (DIMENSION > 2)
562  output.Row(2).Add(invTranslation[2]);
563  }
564 
565 
570  template <stride_type _stride, class _dataPtrType>
573  {
575  this->ApplyTo(vector, result);
576  return result;
577  }
578 
579 
580  template<class _vectorOwnerType>
583  {
585  this->ApplyTo(input, result);
586  return result;
587  }
589 
599  inline bool Equal(const ThisType & other) const {
600  return (RotationMember.Equal(other.Rotation())
601  && TranslationMember.Equal(other.Translation()));
602  }
603 
604  inline bool operator==(const ThisType & other) const {
605  return this->Equal(other);
606  }
608 
609 
621  inline bool AlmostEqual(const ThisType & other,
622  value_type tolerance = TypeTraits::Tolerance()) const {
623  return (RotationMember.AlmostEqual(other.Rotation(), tolerance)
624  && TranslationMember.AlmostEqual(other.Translation(), tolerance));
625  }
626 
627 
639  inline bool AlmostEquivalent(const ThisType & other,
640  value_type tolerance = TypeTraits::Tolerance()) const {
641  return (RotationMember.AlmostEquivalent(other.Rotation(), tolerance)
642  && TranslationMember.AlmostEqual(other.Translation(), tolerance));
643  }
644 
645 
646  std::string ToString(void) const {
647  std::stringstream outputStream;
648  ToStream(outputStream);
649  return outputStream.str();
650  }
651 
653  void ToStream(std::ostream & outputStream) const {
654  outputStream << "translation: "
655  << std::endl
656  << this->Translation()
657  << std::endl
658  << "rotation: "
659  << std::endl
660  << this->Rotation();
661  }
662 
663  void ToStreamRaw(std::ostream & outputStream, const char delimiter = ' ',
664  bool headerOnly = false, const std::string & headerPrefix = "") const {
665  this->Translation().ToStreamRaw(outputStream, delimiter, headerOnly, headerPrefix);
666  outputStream << delimiter;
667  this->Rotation().ToStreamRaw(outputStream, delimiter, headerOnly, headerPrefix);
668  }
669 
672  bool FromStreamRaw(std::istream & inputStream, const char delimiter = ' ')
673  {
674  TranslationType trans;
675  RotationType rot;
676  bool valid = trans.FromStreamRaw(inputStream, delimiter);
677  if ((valid) && !isspace(delimiter)) {
678  char c;
679  inputStream >> c;
680  valid = (c == delimiter);
681  }
682  if (valid)
683  valid = rot.FromStreamRaw(inputStream, delimiter);
684  if (valid) {
685  TranslationMember = trans;
686  RotationMember = rot;
687  }
688  return valid;
689  }
690 
692  void SerializeRaw(std::ostream & outputStream) const
693  {
694  this->Translation().SerializeRaw(outputStream);
695  this->Rotation().SerializeRaw(outputStream);
696  }
697 
699  void DeSerializeRaw(std::istream & inputStream)
700  {
701  this->Translation().DeSerializeRaw(inputStream);
702  this->Rotation().DeSerializeRaw(inputStream);
703  }
704 
705 };
706 
707 
708 template <class _rotationType>
711  const vctFrameBase<_rotationType> & frame2) {
713  frame1.ApplyTo(frame2, result);
714  return result;
715 }
716 
717 template <vct::size_type _cols, vct::stride_type _rowStride, vct::stride_type _colStride, class _rotationType, class _elementType, class _dataPtrType>
721 {
723  frame.ApplyTo(matrix, result);
724  return result;
725 }
726 
728 template <class _rotationType>
729 std::ostream & operator << (std::ostream & output,
730  const vctFrameBase<_rotationType> & frame) {
731  frame.ToStream(output);
732  return output;
733 }
734 
735 #endif // _vctFrameBase_h
736 
size_t index_type
Definition: vctContainerTraits.h:36
Template base class for a 4x4 frame.
Definition: vctForwardDeclarations.h:234
#define CISST_EXPORT
Definition: cmnExportMacros.h:50
A template for a fixed size matrix with fixed spacing in memory.
Definition: vctFixedSizeConstMatrixBase.h:103
ThisType & FromRaw(const vctFrame4x4ConstBase< __containerType > &other)
Definition: vctFrameBase.h:180
#define CMN_ASSERT(expr)
Definition: cmnAssert.h:90
bool Equal(const ThisType &other) const
Definition: vctFrameBase.h:599
Definition: vctDynamicMatrixBase.h:42
RotationType & Rotation(void)
Definition: vctFrameBase.h:200
ThisType & FromNormalized(const vctFrame4x4ConstBase< __containerType > &other)
Definition: vctFrameBase.h:173
void ApplyTo(const vctFixedSizeConstVectorBase< DIMENSION, __stride1, value_type, __dataPtrType1 > &input, vctFixedSizeVectorBase< DIMENSION, __stride2, value_type, __dataPtrType2 > &output) const
Definition: vctFrameBase.h:251
vctFrameBase(const vctFrame4x4ConstBase< __containerType > &other)
Definition: vctFrameBase.h:86
bool FromStreamRaw(std::istream &inputStream, const char delimiter= ' ')
Definition: vctFrameBase.h:672
void ApplyInverseTo(const vctDynamicConstVectorBase< _vectorOwnerType1, value_type > &input, vctDynamicVectorBase< _vectorOwnerType2, value_type > &output) const
Definition: vctFrameBase.h:446
vctFrameBase(const vctFrame4x4ConstBase< __containerType > &other, bool normalizeInput)
Definition: vctFrameBase.h:95
void ProductOf(const ThisType &left, ThisType &right)
Definition: vctFrameBase.h:309
void ToStreamRaw(std::ostream &outputStream, const char delimiter= ' ', bool headerOnly=false, const std::string &headerPrefix="") const
Definition: vctFixedSizeConstVectorBase.h:1118
Declaration of vctFixedSizeMatrixBase.
static Type Tolerance(void)
Definition: cmnTypeTraits.h:170
void SerializeRaw(std::ostream &outputStream) const
Definition: vctFixedSizeConstVectorBase.h:1141
void ApplyTo(const vctDynamicConstVectorBase< _vectorOwnerType1, value_type > &input, vctDynamicVectorBase< _vectorOwnerType2, value_type > &output) const
Definition: vctFrameBase.h:335
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:380
ThisType & NormalizedSelf(void)
Definition: vctFrameBase.h:212
ThisType & Add(const vctFixedSizeConstVectorBase< _size, __stride, value_type, __dataPtrType > &otherVector)
Definition: vctFixedSizeVectorBase.h:886
vctFrameBase< _rotationType > operator*(const vctFrameBase< _rotationType > &frame1, const vctFrameBase< _rotationType > &frame2)
Definition: vctFrameBase.h:710
void ToStream(std::ostream &outputStream) const
Definition: vctFrameBase.h:653
size_t size_type
Definition: vctContainerTraits.h:35
ThisType & InverseOf(const ThisType &otherFrame)
Definition: vctFrameBase.h:228
void ApplyInverseTo(const vctFixedSizeConstVectorBase< DIMENSION, __stride1, value_type, __dataPtrType1 > &input, vctFixedSizeVectorBase< DIMENSION, __stride2, value_type, __dataPtrType2 > &output) const
Definition: vctFrameBase.h:430
vctFixedSizeVector< value_type, DIMENSION > ApplyInverseTo(const vctDynamicConstVectorBase< _vectorOwnerType, value_type > &input) const
Definition: vctFrameBase.h:509
vctFrameBase< _rotationType > ThisType
Definition: vctFrameBase.h:55
bool operator==(const ThisType &other) const
Definition: vctFrameBase.h:604
ThisType & Assign(const vctFixedSizeConstVectorBase< _size, __stride, __elementType, __dataPtrType > &other)
Definition: vctFixedSizeVectorBase.h:274
Definition: vctFrameBase.h:53
Definition: vctDynamicConstMatrixBase.h:77
ThisType Inverse(void) const
Definition: vctFrameBase.h:235
ThisType & Assign(const ThisType &otherFrame)
Definition: vctFrameBase.h:111
ThisType ApplyInverseTo(const ThisType &input) const
Definition: vctFrameBase.h:523
RowRefType Row(size_type index)
Definition: vctDynamicMatrixBase.h:227
bool AlmostEqual(const vctFixedSizeConstVectorBase< _size, __stride, value_type, __dataPtrType > &otherVector, value_type tolerance) const
Definition: vctFixedSizeConstVectorBase.h:701
bool AlmostEqual(const ThisType &other, value_type tolerance=TypeTraits::Tolerance()) const
Definition: vctFrameBase.h:621
size_type size(void) const
Definition: vctDynamicConstVectorBase.h:164
TranslationType TranslationMember
Definition: vctFrameBase.h:62
A template for a fixed size matrix with fixed spacings in memory.
Definition: vctFixedSizeMatrixBase.h:58
bool IsNormalized(value_type tolerance=TypeTraits::Tolerance()) const
Definition: vctFrameBase.h:206
TranslationType & Translation(void)
Definition: vctFrameBase.h:192
ThisType ApplyTo(const ThisType &input) const
Definition: vctFrameBase.h:322
void ApplyInverseTo(const vctDynamicConstVectorBase< _vectorOwnerType1, value_type > &input, vctFixedSizeVectorBase< DIMENSION, __stride2, value_type, __dataPtrType2 > &output) const
Definition: vctFrameBase.h:472
pointer Pointer(size_type rowIndex, size_type colIndex)
Definition: vctDynamicMatrixBase.h:143
void ApplyTo(const ThisType &input, ThisType &output) const
Definition: vctFrameBase.h:297
size_type rows() const
Definition: vctDynamicConstMatrixBase.h:238
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:533
RotationType RotationMember
Definition: vctFrameBase.h:61
size_type cols() const
Definition: vctDynamicConstMatrixBase.h:243
cmnTypeTraits< value_type > TypeTraits
Definition: vctFrameBase.h:58
void SerializeRaw(std::ostream &outputStream) const
Definition: vctFrameBase.h:692
vctFixedSizeVector< value_type, DIMENSION > ApplyInverseTo(const vctFixedSizeConstVectorBase< DIMENSION, __stride, value_type, __dataPtrType > &input) const
Definition: vctFrameBase.h:495
bool FromStreamRaw(std::istream &inputStream, const char delimiter= ' ')
Definition: vctFixedSizeVector.h:266
void DeSerializeRaw(std::istream &inputStream)
Definition: vctFixedSizeVector.h:299
void ApplyTo(size_type inputSize, const vctFixedSizeVector< value_type, DIMENSION > *input, vctFixedSizeVector< value_type, DIMENSION > *output) const
Definition: vctFrameBase.h:399
const TranslationType & Translation(void) const
Definition: vctFrameBase.h:188
ThisType & FromNormalized(const vctFrameBase< __rotationType > &other)
Definition: vctFrameBase.h:142
RowRefType Row(size_type index)
Definition: vctFixedSizeMatrixBase.h:244
const_pointer Pointer(index_type rowIndex, index_type colIndex) const
Definition: vctDynamicConstMatrixBase.h:306
ThisType & Add(const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &otherVector)
Definition: vctDynamicVectorBase.h:816
ThisType & InverseSelf(void)
Definition: vctFrameBase.h:218
std::ostream & operator<<(std::ostream &output, const vctFrameBase< _rotationType > &frame)
Definition: vctFrameBase.h:729
vctFrameBase(const RotationType &rotation, const vctFixedSizeConstVectorBase< DIMENSION, __stride, value_type, __dataPtrType > &translation)
Definition: vctFrameBase.h:74
#define cmnThrow(a)
Definition: MinimalCmn.h:4
Implementation of a fixed-size matrix using template metaprogramming.
Definition: vctFixedSizeMatrix.h:52
void DeSerializeRaw(std::istream &inputStream)
Definition: vctFrameBase.h:699
ConstRotationRefType Rotation(void) const
Definition: vctFrame4x4ConstBase.h:124
vctFixedSizeVector< value_type, DIMENSION > TranslationType
Definition: vctFrameBase.h:57
A template for a fixed length vector with fixed spacing in memory.
Definition: vctFixedSizeVectorBase.h:76
void ApplyInverseTo(const vctDynamicConstMatrixBase< __matrixOwnerType1, value_type > &input, vctDynamicMatrixBase< __matrixOwnerType2, value_type > &output) const
Definition: vctFrameBase.h:550
void ApplyInverseTo(const ThisType &input, ThisType &output) const
Definition: vctFrameBase.h:516
bool FromStreamRaw(std::istream &inputStream, const char delimiter= ' ')
Definition: vctFixedSizeMatrixBase.h:1302
std::string ToString(void) const
Definition: vctFrameBase.h:646
ptrdiff_t stride_type
Definition: vctContainerTraits.h:37
vctFixedSizeVector< value_type, DIMENSION > ApplyTo(const vctFixedSizeConstVectorBase< DIMENSION, __stride, value_type, __dataPtrType > &input) const
Definition: vctFrameBase.h:268
ThisType & From(const vctFrame4x4ConstBase< __containerType > &other)
Definition: vctFrameBase.h:164
ThisType & SumOf(const vctFixedSizeConstVectorBase< _size, __stride1, value_type, __dataPtrType1 > &vector1, const vctFixedSizeConstVectorBase< _size, __stride2, value_type, __dataPtrType2 > &vector2)
Definition: vctFixedSizeVectorBase.h:809
vctFrameBase(void)
Definition: vctFrameBase.h:68
vctFixedSizeVector< value_type, DIMENSION > operator*(const vctFixedSizeConstVectorBase< DIMENSION, _stride, value_type, _dataPtrType > &vector) const
Definition: vctFrameBase.h:572
Definition: vctDynamicConstVectorBase.h:77
void ToStreamRaw(std::ostream &outputStream, const char delimiter= ' ', bool headerOnly=false, const std::string &headerPrefix="") const
Definition: vctFrameBase.h:663
A template for a fixed length vector with fixed spacing in memory.
Definition: vctFixedSizeConstVectorBase.h:107
void SumOf(const PlainObjectBase< OtherDerived1 > &other1, const PlainObjectBase< OtherDerived2 > &other2)
Definition: cisstVectorEigenAddons.h:24
Template base class for a frame.
Definition: vctForwardDeclarations.h:232
bool Equal(const vctFixedSizeConstVectorBase< _size, __stride, value_type, __dataPtrType > &otherVector) const
Definition: vctFixedSizeConstVectorBase.h:684
ThisType & From(const vctFrameBase< __rotationType > &other)
Definition: vctFrameBase.h:133
ConstTranslationRefType Translation(void) const
Definition: vctFrame4x4ConstBase.h:120
bool AlmostEquivalent(const ThisType &other, value_type tolerance=TypeTraits::Tolerance()) const
Definition: vctFrameBase.h:639
void ApplyTo(const vctDynamicConstVectorBase< _vectorOwnerType1, value_type > &input, vctFixedSizeVectorBase< DIMENSION, __stride2, value_type, __dataPtrType2 > &output) const
Definition: vctFrameBase.h:363
VCT_CONTAINER_TRAITS_TYPEDEFS(typename _rotationType::value_type)
static CISST_EXPORT const ThisType & Identity()
Macros to export the symbols of cisstVector (in a Dll).
A collection of useful information about the C++ basic types, represented in a generic programming wa...
Definition: cmnTypeTraits.h:155
ThisType & DifferenceOf(const vctFixedSizeConstVectorBase< _size, __stride1, value_type, __dataPtrType1 > &vector1, const vctFixedSizeConstVectorBase< _size, __stride2, value_type, __dataPtrType2 > &vector2)
Definition: vctFixedSizeVectorBase.h:820
ThisType & FromRaw(const vctFrameBase< __rotationType > &other)
Definition: vctFrameBase.h:149
void ApplyTo(const vctDynamicConstMatrixBase< __matrixOwnerType1, value_type > &input, vctDynamicMatrixBase< __matrixOwnerType2, value_type > &output) const
Definition: vctFrameBase.h:412
ThisType & Assign(const RotationType &rotation, const vctFixedSizeConstVectorBase< DIMENSION, __stride, value_type, __dataPtrType > &translation)
Definition: vctFrameBase.h:118
const RotationType & Rotation(void) const
Definition: vctFrameBase.h:196
_rotationType RotationType
Definition: vctFrameBase.h:56
Definition: vctDynamicVectorBase.h:61
vctFixedSizeVector< value_type, DIMENSION > ApplyTo(const vctDynamicConstVectorBase< _vectorOwnerType, value_type > &input) const
Definition: vctFrameBase.h:281