Ocean
Ocean::SphericalExponentialMap Class Reference

This class implements an exponential map representing a 2-DOF rotation. More...

Public Member Functions

 SphericalExponentialMap ()
 Creates a new exponential map object with default (no) rotation. More...
 
 SphericalExponentialMap (const Scalar wx, const Scalar wz)
 Creates an exponential map object by a given 3D rotation axis (lying in the xz-plane) with axis length defining the rotation angle in radian. More...
 
 SphericalExponentialMap (const Vector3 &reference, const Vector3 &offset)
 Creates a new exponential map object that rotates a given offset vector to a given reference vector both lying on the same unit sphere in 3D space. More...
 
const Vector3 axis () const
 Returns the (non-normalized) rotation axis of this object. More...
 
Scalar angle () const
 Returns the angle of this rotation object. More...
 
Quaternion quaternion () const
 Returns this rotation representation as quaternion object. More...
 
Rotation rotation () const
 Returns this rotation representation as angle-axis object. More...
 
const Scalardata () const
 Returns a pointer to the two rotation values of this object (for the x-axis and z-axis). More...
 
Scalardata ()
 Returns a pointer to the two rotation values of this object (for the x-axis and z-axis). More...
 
const Scalaroperator[] (const unsigned int index) const
 Element access operator. More...
 
Scalaroperator[] (const unsigned int index)
 Element access operator. More...
 

Protected Attributes

Vector2 mapRotationAxis
 The 2-DOF orientation values with order [wx, wz]. More...
 

Detailed Description

This class implements an exponential map representing a 2-DOF rotation.

Thus, this class allows to define a rotation between two 3D coordinates located on a sphere (with 2 degrees of freedom).
The rotation is defined by two scalar parameters defining a 3D vector located in the xz-plane (having zero as value for the y-axis).
The 3D vector defines the rotation axis and the length of the vector defined the rotation angle.
This class can be used to store the 3D position of a point lying on a sphere by two scalar parameters.
Further, this class can be used to rotate a 3D point lying on a sphere to any other position on that sphere.
Compared to an Euler rotation (3-DOF), the SphericalExponentialMap (2-DOF) holds/provides/stores a yaw-angle and a pitch-angle, but not roll-angle.
The SphericalExponentialMap class can be seen as a specialization of the ExponentialMap.

See also
ExponentialMap, Rotation, Quaternion, Euler.

Constructor & Destructor Documentation

◆ SphericalExponentialMap() [1/3]

Ocean::SphericalExponentialMap::SphericalExponentialMap ( )
inline

Creates a new exponential map object with default (no) rotation.

◆ SphericalExponentialMap() [2/3]

Ocean::SphericalExponentialMap::SphericalExponentialMap ( const Scalar  wx,
const Scalar  wz 
)
inline

Creates an exponential map object by a given 3D rotation axis (lying in the xz-plane) with axis length defining the rotation angle in radian.

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

◆ SphericalExponentialMap() [3/3]

Ocean::SphericalExponentialMap::SphericalExponentialMap ( const Vector3 reference,
const Vector3 offset 
)

Creates a new exponential map object that rotates a given offset vector to a given reference vector both lying on the same unit sphere in 3D space.

The following equation holds: offset = SphericalExponentialMap(reference, offset).rotation() * reference.

Parameters
referenceThe reference vector, with unit length
offsetThe offset vector, with unit length

Member Function Documentation

◆ angle()

Scalar Ocean::SphericalExponentialMap::angle ( ) const
inline

Returns the angle of this rotation object.

Returns
Rotation angle, in radian

◆ axis()

const Vector3 Ocean::SphericalExponentialMap::axis ( ) const
inline

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

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

Returns
Non normalized rotation axis (in 3D space lying in the xz-plane)

◆ data() [1/2]

Scalar * Ocean::SphericalExponentialMap::data ( )
inline

Returns a pointer to the two rotation values of this object (for the x-axis and z-axis).

Returns
Pointer to the rotation values, with order [wx, wz]

◆ data() [2/2]

const Scalar * Ocean::SphericalExponentialMap::data ( ) const
inline

Returns a pointer to the two rotation values of this object (for the x-axis and z-axis).

Returns
Pointer to the rotation values, with order [wx, wz]

◆ operator[]() [1/2]

Scalar & Ocean::SphericalExponentialMap::operator[] ( const unsigned int  index)
inline

Element access operator.

Parameters
indexThe index of the element to access, with range [0, 1]
Returns
The requested element

◆ operator[]() [2/2]

const Scalar & Ocean::SphericalExponentialMap::operator[] ( const unsigned int  index) const
inline

Element access operator.

Parameters
indexThe index of the element to access, with range [0, 1]
Returns
The requested element

◆ quaternion()

Quaternion Ocean::SphericalExponentialMap::quaternion ( ) const
inline

Returns this rotation representation as quaternion object.

Returns
Equivalent quaternion rotation

◆ rotation()

Rotation Ocean::SphericalExponentialMap::rotation ( ) const
inline

Returns this rotation representation as angle-axis object.

Returns
Equivalent rotation

Field Documentation

◆ mapRotationAxis

Vector2 Ocean::SphericalExponentialMap::mapRotationAxis
protected

The 2-DOF orientation values with order [wx, wz].


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