cisst-saw
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
vctMatrixRotation2.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: 2005-02-23
8 
9  (C) Copyright 2005-2007 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 _vctMatrixRotation2_h
23 #define _vctMatrixRotation2_h
24 
32 
33 #include <cisstVector/vctExport.h>
34 
49 template <class _elementType>
50 class vctMatrixRotation2: public vctMatrixRotation2Base<vctFixedSizeMatrix<_elementType, 2, 2> >
51 {
52 public:
53  /* no need to document, inherit doxygen documentation from base class */
54  VCT_CONTAINER_TRAITS_TYPEDEFS(_elementType);
55  enum {ROWS = 2, COLS = 2};
56  enum {DIMENSION = 2};
60 
63 
66  BaseType()
67  {}
68 
69  inline vctMatrixRotation2(const ThisType & other):
70  BaseType(other)
71  {}
72 
73  inline vctMatrixRotation2(const BaseType & other):
74  BaseType(other)
75  {}
76 
83  inline ThisType & operator = (const ContainerType & other) {
84  return reinterpret_cast<ThisType &>(this->Assign(other));
85  }
86 
87  inline ThisType & operator = (const ThisType & other) {
88  return reinterpret_cast<ThisType &>(this->Assign(other));
89  }
90 
91  inline ThisType & operator = (const BaseType & other) {
92  return reinterpret_cast<ThisType &>(this->Assign(other));
93  }
94 
95  /* documented in base class */
96  inline vctMatrixRotation2(const value_type & element00, const value_type & element01,
97  const value_type & element10, const value_type & element11)
98  throw(std::runtime_error):
99  BaseType(element00, element01,
100  element10, element11)
101  {}
102 
103  template <stride_type __stride1, class __dataPtrType1,
104  stride_type __stride2, class __dataPtrType2>
107  bool vectorsAreColumns = true)
108  throw(std::runtime_error):
109  BaseType(v1, v2, vectorsAreColumns)
110  {}
111 
112  template <class __vectorOwnerType1,
113  class __vectorOwnerType2>
116  bool vectorsAreColumns = true)
117  throw(std::runtime_error):
118  BaseType(v1, v2, vectorsAreColumns)
119  {}
120 
121  inline vctMatrixRotation2(const vctAngleRotation2 & angleRotation)
122  throw(std::runtime_error):
123  BaseType(angleRotation)
124  {}
125 
126  inline vctMatrixRotation2(const value_type & element00, const value_type & element01,
127  const value_type & element10, const value_type & element11,
128  bool normalizeInput):
129  BaseType(element00, element01,
130  element10, element11,
131  normalizeInput)
132  {}
133 
134  template <stride_type __stride1, class __dataPtrType1,
135  stride_type __stride2, class __dataPtrType2>
138  bool vectorsAreColumns, bool normalizeInput):
139 
140  BaseType(v1, v2, vectorsAreColumns, normalizeInput)
141  {}
142 
143  template <class __vectorOwnerType1,
144  class __vectorOwnerType2>
147  bool vectorsAreColumns, bool normalizeInput):
148  BaseType(v1, v2, vectorsAreColumns, normalizeInput)
149  {}
150 
151  inline vctMatrixRotation2(const vctAngleRotation2 & angleRotation,
152  bool normalizeInput):
153  BaseType(angleRotation, normalizeInput)
154  {}
155 
166  template <stride_type __rowStride, stride_type __colStride, class __dataPtrType>
167  explicit inline
169  BaseType(matrix)
170  {}
171 
172 };
173 
174 
175 #endif // _vctMatrixRotation2_h
176 
A template for a fixed size matrix with fixed spacing in memory.
Definition: vctFixedSizeConstMatrixBase.h:103
vctMatrixRotation2(const vctDynamicConstVectorBase< __vectorOwnerType1, value_type > &v1, const vctDynamicConstVectorBase< __vectorOwnerType2, value_type > &v2, bool vectorsAreColumns, bool normalizeInput)
Definition: vctMatrixRotation2.h:145
Define a rotation based on an angle for a space of dimension 2.
Definition: vctAngleRotation2.h:46
ThisType & operator=(const ContainerType &other)
Definition: vctMatrixRotation2.h:83
ThisType & Assign(const vctFixedSizeConstMatrixBase< _rows, _cols, __rowStride, __colStride, __elementType, __dataPtrType > &other)
Definition: vctFixedSizeMatrixBase.h:475
Declaration of vctFixedSizeMatrix.
vctMatrixRotation2(const vctAngleRotation2 &angleRotation, bool normalizeInput)
Definition: vctMatrixRotation2.h:151
VCT_CONTAINER_TRAITS_TYPEDEFS(_elementType)
vctMatrixRotation2< value_type > ThisType
Definition: vctMatrixRotation2.h:59
vctMatrixRotation2(const value_type &element00, const value_type &element01, const value_type &element10, const value_type &element11)
Definition: vctMatrixRotation2.h:96
vctMatrixRotation2(const BaseType &other)
Definition: vctMatrixRotation2.h:73
cmnTypeTraits< value_type > TypeTraits
Definition: vctMatrixRotation2.h:62
vctFixedSizeMatrix< value_type, ROWS, COLS > ContainerType
Definition: vctMatrixRotation2.h:57
vctMatrixRotation2(const value_type &element00, const value_type &element01, const value_type &element10, const value_type &element11, bool normalizeInput)
Definition: vctMatrixRotation2.h:126
A template for a fixed size matrix with fixed spacings in memory.
Definition: vctFixedSizeMatrixBase.h:58
Define a rotation matrix for a space of dimension 2.
Definition: vctMatrixRotation2.h:50
vctMatrixRotation2Base< ContainerType > BaseType
Definition: vctMatrixRotation2.h:58
Define a rotation matrix for a space of dimension 2.
Definition: vctForwardDeclarations.h:227
Definition: vctMatrixRotation2.h:56
Implementation of a fixed-size matrix using template metaprogramming.
Definition: vctFixedSizeMatrix.h:52
vctMatrixRotation2()
Definition: vctMatrixRotation2.h:65
Definition: vctMatrixRotation2.h:55
Declaration of vctMatrixRotation2Base.
vctMatrixRotation2(const vctDynamicConstVectorBase< __vectorOwnerType1, value_type > &v1, const vctDynamicConstVectorBase< __vectorOwnerType2, value_type > &v2, bool vectorsAreColumns=true)
Definition: vctMatrixRotation2.h:114
ptrdiff_t stride_type
Definition: vctContainerTraits.h:37
vctMatrixRotation2(const vctAngleRotation2 &angleRotation)
Definition: vctMatrixRotation2.h:121
Definition: vctDynamicConstVectorBase.h:77
A template for a fixed length vector with fixed spacing in memory.
Definition: vctFixedSizeConstVectorBase.h:107
vctMatrixRotation2(const vctFixedSizeConstVectorBase< DIMENSION, __stride1, value_type, __dataPtrType1 > &v1, const vctFixedSizeConstVectorBase< DIMENSION, __stride2, value_type, __dataPtrType2 > &v2, bool vectorsAreColumns, bool normalizeInput)
Definition: vctMatrixRotation2.h:136
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
vctMatrixRotation2(const vctFixedSizeMatrixBase< ROWS, COLS, __rowStride, __colStride, value_type, __dataPtrType > &matrix)
Definition: vctMatrixRotation2.h:168
vctMatrixRotation2(const vctFixedSizeConstVectorBase< DIMENSION, __stride1, value_type, __dataPtrType1 > &v1, const vctFixedSizeConstVectorBase< DIMENSION, __stride2, value_type, __dataPtrType2 > &v2, bool vectorsAreColumns=true)
Definition: vctMatrixRotation2.h:105
vctMatrixRotation2(const ThisType &other)
Definition: vctMatrixRotation2.h:69
Definition: vctMatrixRotation2.h:55