Ocean
|
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 Scalar * | data () const |
Returns a pointer to the two rotation values of this object (for the x-axis and z-axis). More... | |
Scalar * | data () |
Returns a pointer to the two rotation values of this object (for the x-axis and z-axis). More... | |
const Scalar & | operator[] (const unsigned int index) const |
Element access operator. More... | |
Scalar & | operator[] (const unsigned int index) |
Element access operator. More... | |
Protected Attributes | |
Vector2 | mapRotationAxis |
The 2-DOF orientation values with order [wx, wz]. More... | |
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.
|
inline |
Creates a new exponential map object with default (no) rotation.
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.
wx | X component of the rotation axis |
wz | Z component of the rotation axis |
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.
reference | The reference vector, with unit length |
offset | The offset vector, with unit length |
|
inline |
Returns the angle of this rotation object.
|
inline |
Returns the (non-normalized) rotation axis of this object.
Beware: This axis has a length equal to the rotation angle.
|
inline |
Returns a pointer to the two rotation values of this object (for the x-axis and z-axis).
|
inline |
Returns a pointer to the two rotation values of this object (for the x-axis and z-axis).
|
inline |
Element access operator.
index | The index of the element to access, with range [0, 1] |
|
inline |
Element access operator.
index | The index of the element to access, with range [0, 1] |
|
inline |
Returns this rotation representation as quaternion object.
|
inline |
Returns this rotation representation as angle-axis object.
|
protected |
The 2-DOF orientation values with order [wx, wz].