Ocean
Ocean::ExponentialMapT< T > Class Template Reference

This class implements an exponential map defining a rotation by three parameters. More...

Public Member Functions

 ExponentialMapT ()=default
 Creates a default rotation. More...
 
 ExponentialMapT (const VectorT3< T > &rotation)
 Creates a rotation based on a given 3D axis with axis length defining the rotation angle in radian. More...
 
 ExponentialMapT (const T wx, const T wy, const T wz)
 Creates a rotation based on a given 3D axis with axis length defining the rotation angle in radian. More...
 
 ExponentialMapT (const VectorT3< T > &axis, const T angle)
 Creates a rotation based on a given 3D axis with length 1 and a given rotation angle. More...
 
 ExponentialMapT (const RotationT< T > &rotation)
 Creates an rotation based on a given angle-axis rotation. More...
 
 ExponentialMapT (const QuaternionT< T > &rotation)
 Creates a rotation based on a quaternion. More...
 
 ExponentialMapT (const SquareMatrixT3< T > &rotation)
 Creates a rotation based on a 3x3 rotation matrix. More...
 
template<typename U >
 ExponentialMapT (const ExponentialMapT< U > &exponentialMap) noexcept
 Copies an exponential map with different element data type than T. More...
 
const VectorT3< T > & axis () const
 Returns the (non-normalized) axis of this rotation object. More...
 
angle () const
 Returns the angle of this rotation object. More...
 
QuaternionT< T > quaternion () const
 Returns this rotation object as quaternion object. More...
 
RotationT< T > rotation () const
 Returns this rotation object as angle-axis object. More...
 
const T * data () const
 Returns a pointer to the three rotation values of this object. More...
 
const T & operator[] (const unsigned int index) const
 Returns the individual rotation values of this map. More...
 
T & operator[] (const unsigned int index)
 Returns the individual rotation values of this map. More...
 
ExponentialMapT< T > operator+ (const ExponentialMapT< T > &exponentialMap) const
 Adds two exponential map objects. More...
 
ExponentialMapT< T > & operator+= (const ExponentialMapT< T > &exponentialMap)
 Adds two exponential map objects. More...
 
ExponentialMapT< T > operator- (const ExponentialMapT< T > &exponentialMap) const
 Subtracts two exponential map objects. More...
 
ExponentialMapT< T > & operator-= (const ExponentialMapT< T > &exponentialMap)
 Subtracts two exponential map objects. More...
 

Private Attributes

VectorT3< T > value_ = VectorT3<T>(0, 0, 0)
 Axis defining the rotation normal while the length defines the rotation angle. More...
 

Detailed Description

template<typename T>
class Ocean::ExponentialMapT< T >

This class implements an exponential map defining a rotation by three parameters.


The three parameter define the rotation axis, while the length of the axis vector defines the rotation angle in radian.

Template Parameters
TFloating point data type to be used
See also
SphericalExponentialMap, Rotation, Quaternion, Euler.

Constructor & Destructor Documentation

◆ ExponentialMapT() [1/8]

template<typename T >
Ocean::ExponentialMapT< T >::ExponentialMapT ( )
default

Creates a default rotation.

◆ ExponentialMapT() [2/8]

template<typename T >
Ocean::ExponentialMapT< T >::ExponentialMapT ( const VectorT3< T > &  rotation)
inlineexplicit

Creates a rotation based on a given 3D axis with axis length defining the rotation angle in radian.

Parameters
rotation3D vector defining the rotation

◆ ExponentialMapT() [3/8]

template<typename T >
Ocean::ExponentialMapT< T >::ExponentialMapT ( const T  wx,
const T  wy,
const T  wz 
)
inline

Creates a rotation based on a given 3D axis with axis length defining the rotation angle in radian.

Parameters
wxX component of the rotation axis
wyY component of the rotation axis
wzZ component of the rotation axis

◆ ExponentialMapT() [4/8]

template<typename T >
Ocean::ExponentialMapT< T >::ExponentialMapT ( const VectorT3< T > &  axis,
const T  angle 
)
inline

Creates a rotation based on a given 3D axis with length 1 and a given rotation angle.

Parameters
axisNormalized rotation axis
angleThe angle of the rotation, in radian

◆ ExponentialMapT() [5/8]

template<typename T >
Ocean::ExponentialMapT< T >::ExponentialMapT ( const RotationT< T > &  rotation)
inlineexplicit

Creates an rotation based on a given angle-axis rotation.

Parameters
rotationthe rotation to be used, must be valid

◆ ExponentialMapT() [6/8]

template<typename T >
Ocean::ExponentialMapT< T >::ExponentialMapT ( const QuaternionT< T > &  rotation)
explicit

Creates a rotation based on a quaternion.

Parameters
rotationThe rotation to be used, must be valid

◆ ExponentialMapT() [7/8]

template<typename T >
Ocean::ExponentialMapT< T >::ExponentialMapT ( const SquareMatrixT3< T > &  rotation)
explicit

Creates a rotation based on a 3x3 rotation matrix.

Parameters
rotationThe rotation matrix to be used, must be valid

◆ ExponentialMapT() [8/8]

template<typename T >
template<typename U >
Ocean::ExponentialMapT< T >::ExponentialMapT ( const ExponentialMapT< U > &  exponentialMap)
inlineexplicitnoexcept

Copies an exponential map with different element data type than T.

Parameters
exponentialMapThe exponential map to copy
Template Parameters
UThe element data type of the exponential map

Member Function Documentation

◆ angle()

template<typename T >
T Ocean::ExponentialMapT< T >::angle
inline

Returns the angle of this rotation object.

Returns
Rotation angle in radian

◆ axis()

template<typename T >
const VectorT3< T > & Ocean::ExponentialMapT< T >::axis
inline

Returns the (non-normalized) axis of this rotation object.

Beware: This axis has a length equal to the rotation angle in radian.

Returns
Non normalized rotation axis

◆ data()

template<typename T >
const T * Ocean::ExponentialMapT< T >::data
inline

Returns a pointer to the three rotation values of this object.

Returns
The three rotation values

◆ operator+()

template<typename T >
ExponentialMapT< T > Ocean::ExponentialMapT< T >::operator+ ( const ExponentialMapT< T > &  exponentialMap) const
inline

Adds two exponential map objects.

Parameters
exponentialMapExponential map to be (component wise) added
Returns
New exponential map object

◆ operator+=()

template<typename T >
ExponentialMapT< T > & Ocean::ExponentialMapT< T >::operator+= ( const ExponentialMapT< T > &  exponentialMap)
inline

Adds two exponential map objects.

Parameters
exponentialMapExponential map to be (component wise) added
Returns
Reference to this object

◆ operator-()

template<typename T >
ExponentialMapT< T > Ocean::ExponentialMapT< T >::operator- ( const ExponentialMapT< T > &  exponentialMap) const
inline

Subtracts two exponential map objects.

Parameters
exponentialMapExponential map to be (component wise) subtracted
Returns
New exponential map object

◆ operator-=()

template<typename T >
ExponentialMapT< T > & Ocean::ExponentialMapT< T >::operator-= ( const ExponentialMapT< T > &  exponentialMap)
inline

Subtracts two exponential map objects.

Parameters
exponentialMapExponential map to be (component wise) subtracted
Returns
Reference to this object

◆ operator[]() [1/2]

template<typename T >
T & Ocean::ExponentialMapT< T >::operator[] ( const unsigned int  index)
inline

Returns the individual rotation values of this map.

Parameters
indexThe index of the value to return, with range [0, 2]
Returns
The requested index

◆ operator[]() [2/2]

template<typename T >
const T & Ocean::ExponentialMapT< T >::operator[] ( const unsigned int  index) const
inline

Returns the individual rotation values of this map.

Parameters
indexThe index of the value to return, with range [0, 2]
Returns
The requested index

◆ quaternion()

template<typename T >
QuaternionT< T > Ocean::ExponentialMapT< T >::quaternion
inline

Returns this rotation object as quaternion object.

Returns
Equivalent quaternion rotation

◆ rotation()

template<typename T >
RotationT< T > Ocean::ExponentialMapT< T >::rotation
inline

Returns this rotation object as angle-axis object.

Returns
Equivalent rotation

Field Documentation

◆ value_

template<typename T >
VectorT3<T> Ocean::ExponentialMapT< T >::value_ = VectorT3<T>(0, 0, 0)
private

Axis defining the rotation normal while the length defines the rotation angle.


The documentation for this class was generated from the following file: