cisst-saw
Loading...
Searching...
No Matches
vctQuaternionRotation3.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-01-15
7
8 (C) Copyright 2004-2020 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 _vctQuaternionRotation3_h
21#define _vctQuaternionRotation3_h
22
27
30
32
33
48template <class _elementType>
49class vctQuaternionRotation3: public vctQuaternionRotation3Base<vctFixedSizeVector<_elementType, 4> >
50{
51 public:
52 /* no need to document, inherit doxygen documentation from vctFixedSizeVectorBase */
54 enum {SIZE = 4};
55 enum {DIMENSION = 3};
61
62
63 /* documented in base class */
65 BaseType()
66 {}
67
68 inline vctQuaternionRotation3(const ThisType & quaternionRotation):
69 BaseType(quaternionRotation)
70 {}
71
72 ThisType & operator = (const ThisType & quaternionRotation)
73 {
74 BaseType::operator = (quaternionRotation);
75 return *this;
76 }
77
78 template <class __containerType>
79 inline
81 CISST_THROW(std::runtime_error):
82 BaseType(other)
83 {}
84
85 inline
86 vctQuaternionRotation3(const value_type & x, const value_type & y, const value_type & z,
87 const value_type & r)
88 CISST_THROW(std::runtime_error):
89 BaseType(x, y, z, r)
90 {}
91
92 template <class __containerType>
93 explicit inline
95 CISST_THROW(std::runtime_error):
96 BaseType(matrixRotation)
97 {}
98
99 explicit inline
101 CISST_THROW(std::runtime_error):
102 BaseType(axisAngleRotation)
103 {}
104
105 template <class __containerType>
106 explicit inline
108 CISST_THROW(std::runtime_error):
109 BaseType(rodriguezRotation)
110 {}
111
112 inline
113 vctQuaternionRotation3(const ThisType & quaternionRotation,
114 bool normalizeInput):
115 BaseType(quaternionRotation, normalizeInput)
116 {}
117
118 template <class _containerType>
119 inline
120 vctQuaternionRotation3(const _containerType & vector4,
121 bool normalizeInput):
122 BaseType(vector4, normalizeInput)
123 {}
124
125 inline
127 const value_type & r,
128 bool normalizeInput):
129 BaseType(x, y, z, r, normalizeInput)
130 {}
131
132 template <class __containerType>
133 inline explicit
135 bool normalizeInput):
136 BaseType(matrixRotation, normalizeInput)
137 {}
138
139 inline
141 bool normalizeInput):
142 BaseType(axisAngleRotation, normalizeInput)
143 {}
144
145 template <class __containerType>
146 inline
148 bool normalizeInput):
149 BaseType(rodriguezRotation, normalizeInput)
150 {}
151
152
159 template <class __containerType>
161 return reinterpret_cast<ThisType &>(this->Assign(other));
162 }
163
164};
165
166
167#endif // _vctQuaternionRotation3_h
A collection of useful information about the C++ basic types, represented in a generic programming wa...
Definition cmnTypeTraits.h:155
Define a rotation based on an axis and an angle for a space of dimension 3.
Definition vctAxisAngleRotation3.h:93
ThisType & Assign(const vctFixedSizeConstVectorBase< _size, __stride, __elementType, __dataPtrType > &other)
Definition vctFixedSizeVectorBase.h:274
vctFixedSizeVector()
Definition vctFixedSizeVector.h:76
Define a rotation matrix for a space of dimension 3.
Definition vctMatrixRotation3Base.h:71
vctQuaternionRotation3Base(void)
Definition vctQuaternionRotation3Base.h:112
ThisType & operator=(const ThisType &quaternionRotation)
Definition vctQuaternionRotation3Base.h:129
vctQuaternionRotation3(const ThisType &quaternionRotation)
Definition vctQuaternionRotation3.h:68
ThisType & operator=(const ThisType &quaternionRotation)
Definition vctQuaternionRotation3.h:72
VCT_CONTAINER_TRAITS_TYPEDEFS(_elementType)
vctQuaternionRotation3(const ThisType &quaternionRotation, bool normalizeInput)
Definition vctQuaternionRotation3.h:113
vctQuaternionRotation3(const vctRodriguezRotation3Base< __containerType > &rodriguezRotation, bool normalizeInput)
Definition vctQuaternionRotation3.h:147
vctQuaternionRotation3(const value_type &x, const value_type &y, const value_type &z, const value_type &r) CISST_THROW(std
Definition vctQuaternionRotation3.h:86
vctQuaternionRotation3(const vctMatrixRotation3Base< __containerType > &matrixRotation) CISST_THROW(std
Definition vctQuaternionRotation3.h:94
vctQuaternionRotation3(const vctMatrixRotation3Base< __containerType > &matrixRotation, bool normalizeInput)
Definition vctQuaternionRotation3.h:134
vctFixedSizeVector< value_type, SIZE > ContainerType
Definition vctQuaternionRotation3.h:56
vctQuaternionRotation3(const vctRodriguezRotation3Base< __containerType > &rodriguezRotation) CISST_THROW(std
Definition vctQuaternionRotation3.h:107
vctQuaternionRotation3(const _containerType &vector4, bool normalizeInput)
Definition vctQuaternionRotation3.h:120
vctQuaternionRotation3< value_type > ThisType
Definition vctQuaternionRotation3.h:58
@ DIMENSION
Definition vctQuaternionRotation3.h:55
cmnTypeTraits< value_type > TypeTraits
Definition vctQuaternionRotation3.h:60
@ SIZE
Definition vctQuaternionRotation3.h:54
vctQuaternionRotation3Base< ContainerType > BaseType
Definition vctQuaternionRotation3.h:57
vctQuaternionRotation3(const vctQuaternionRotation3Base< __containerType > &other) CISST_THROW(std
Definition vctQuaternionRotation3.h:80
vctQuaternionRotation3(const vctAxisAngleRotation3< value_type > &axisAngleRotation, bool normalizeInput)
Definition vctQuaternionRotation3.h:140
vctQuaternionRotation3()
Definition vctQuaternionRotation3.h:64
vctQuaternionRotation3(const vctAxisAngleRotation3< value_type > &axisAngleRotation) CISST_THROW(std
Definition vctQuaternionRotation3.h:100
vctQuaternionRotation3(const value_type &x, const value_type &y, const value_type &z, const value_type &r, bool normalizeInput)
Definition vctQuaternionRotation3.h:126
Define a rotation based on the rodriguez representation for a space of dimension 3.
Definition vctRodriguezRotation3Base.h:68
#define CISST_THROW(exceptionParameter)
Somewhat portable compilation warning message. This works with very recent versions of gcc (4....
Definition cmnPortability.h:559
Macros to export the symbols of cisstVector (in a Dll).
Declaration of vctFixedSizeVector.
Declaration of vctQuaternionRotation3Base.