This class implements an exponential map representing a 2-DOF rotation.
More...
#include <SphericalExponentialMap.h>
|
| SphericalExponentialMap () |
| Creates a new exponential map object with default (no) rotation.
|
|
| 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.
|
|
| 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.
|
|
const Vector3 | axis () const |
| Returns the (non-normalized) rotation axis of this object.
|
|
Scalar | angle () const |
| Returns the angle of this rotation object.
|
|
Quaternion | quaternion () const |
| Returns this rotation representation as quaternion object.
|
|
Rotation | rotation () const |
| Returns this rotation representation as angle-axis object.
|
|
const Scalar * | data () const |
| Returns a pointer to the two rotation values of this object (for the x-axis and z-axis).
|
|
Scalar * | data () |
| Returns a pointer to the two rotation values of this object (for the x-axis and z-axis).
|
|
const Scalar & | operator[] (const unsigned int index) const |
| Element access operator.
|
|
Scalar & | operator[] (const unsigned int index) |
| Element access operator.
|
|
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.
◆ 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
-
wx | X component of the rotation axis |
wz | Z 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
-
reference | The reference vector, with unit length |
offset | The offset vector, with unit length |
◆ 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
-
index | The 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
-
index | The 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
◆ 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: