8 #ifndef META_OCEAN_MATH_EXPONENTIAL_MAP_H
9 #define META_OCEAN_MATH_EXPONENTIAL_MAP_H
20 template <
typename T>
class ExponentialMapT;
119 template <
typename U>
133 inline T
angle()
const;
151 inline const T*
data()
const;
158 inline const T&
operator[](
const unsigned int index)
const;
165 inline T&
operator[](
const unsigned int index);
201 template <
typename T>
208 template <
typename T>
215 template <
typename T>
219 ocean_assert(
axis.isUnit());
222 template <
typename T>
224 value_(rotation.axis() * rotation.angle())
229 template <
typename T>
234 ocean_assert(angleAxis.
isValid());
237 ocean_assert(
axis.isUnit());
242 template <
typename T>
247 ocean_assert(angleAxis.
isValid());
250 ocean_assert(
axis.isUnit());
255 template <
typename T>
256 template <
typename U>
258 value_(expontentialMap.axis())
263 template <
typename T>
269 template <
typename T>
272 return value_.length();
275 template <
typename T>
278 const T angle = value_.length();
288 template <
typename T>
291 const T angle = value_.length();
301 template <
typename T>
304 return value_.data();
307 template <
typename T>
310 ocean_assert(index <= 2u);
311 return value_[index];
314 template <
typename T>
317 ocean_assert(index <= 2u);
318 return value_[index];
321 template <
typename T>
327 template <
typename T>
330 value_ += exponentialMap.
value_;
334 template <
typename T>
340 template <
typename T>
343 value_ -= exponentialMap.
value_;
This class implements an exponential map defining a rotation by three parameters.
Definition: ExponentialMap.h:67
ExponentialMapT< T > operator+(const ExponentialMapT< T > &exponentialMap) const
Adds two exponential map objects.
Definition: ExponentialMap.h:322
const VectorT3< T > & axis() const
Returns the (non-normalized) axis of this rotation object.
Definition: ExponentialMap.h:264
QuaternionT< T > quaternion() const
Returns this rotation object as quaternion object.
Definition: ExponentialMap.h:276
VectorT3< T > value_
Axis defining the rotation normal while the length defines the rotation angle.
Definition: ExponentialMap.h:198
const T * data() const
Returns a pointer to the three rotation values of this object.
Definition: ExponentialMap.h:302
ExponentialMapT()=default
Creates a default rotation.
RotationT< T > rotation() const
Returns this rotation object as angle-axis object.
Definition: ExponentialMap.h:289
ExponentialMapT< T > operator-(const ExponentialMapT< T > &exponentialMap) const
Subtracts two exponential map objects.
Definition: ExponentialMap.h:335
const T & operator[](const unsigned int index) const
Returns the individual rotation values of this map.
Definition: ExponentialMap.h:308
ExponentialMapT< T > & operator-=(const ExponentialMapT< T > &exponentialMap)
Subtracts two exponential map objects.
Definition: ExponentialMap.h:341
T angle() const
Returns the angle of this rotation object.
Definition: ExponentialMap.h:270
ExponentialMapT< T > & operator+=(const ExponentialMapT< T > &exponentialMap)
Adds two exponential map objects.
Definition: ExponentialMap.h:328
This class provides basic numeric functionalities.
Definition: Numeric.h:57
This class implements a unit quaternion rotation.
Definition: Quaternion.h:100
This class implements a axis-angle rotation using floating point values.
Definition: Rotation.h:79
VectorT3< T > axis() const
Returns the axis of the rotation.
Definition: Rotation.h:740
T angle() const
Returns the angle of the rotation.
Definition: Rotation.h:746
bool isValid() const
Returns whether this rotation has valid parameters.
Definition: Rotation.h:665
This class implements a 3x3 square matrix.
Definition: SquareMatrix3.h:88
This class implements a vector with three elements.
Definition: Vector3.h:97
std::vector< ExponentialMapT< T > > ExponentialMapsT
Definition of a typename alias for vectors with ExponentialMapT objects.
Definition: ExponentialMap.h:49
ExponentialMapT< Scalar > ExponentialMap
Definition of the ExponentialMap object, depending on the OCEAN_MATH_USE_SINGLE_PRECISION flag either...
Definition: ExponentialMap.h:20
ExponentialMapT< float > ExponentialMapF
Instantiation of the ExponentialMapT template class using a single precision float data type.
Definition: ExponentialMap.h:41
std::vector< ExponentialMap > ExponentialMaps
Definition of a vector holding ExponentialMap objects.
Definition: ExponentialMap.h:56
ExponentialMapT< double > ExponentialMapD
Instantiation of the ExponentialMapT template class using a double precision float data type.
Definition: ExponentialMap.h:34
The namespace covering the entire Ocean framework.
Definition: Accessor.h:15