ROBOOP::Quaternion Class Reference#include <quaternion.h>
List of all members.
Detailed Description
Quaternion class definition.
Definition at line 82 of file quaternion.h.
Constructor & Destructor Documentation
ROBOOP::Quaternion::Quaternion |
( |
|
) |
|
|
ROBOOP::Quaternion::Quaternion |
( |
const Quaternion & |
q |
) |
|
|
ROBOOP::Quaternion::Quaternion |
( |
const Real |
angle_in_rad, |
|
|
const ColumnVector & |
axis |
|
) |
|
|
ROBOOP::Quaternion::Quaternion |
( |
const Real |
s, |
|
|
const Real |
v1, |
|
|
const Real |
v2, |
|
|
const Real |
v3 |
|
) |
|
|
ROBOOP::Quaternion::Quaternion |
( |
const Matrix & |
R |
) |
|
|
|
Constructor.
Cite_: Dam. The unit quaternion obtained from a matrix (see Quaternion::R())
First we find :
Now the other values are:
The sign of cannot be determined. Depending on the choice of the sign for s the sign of change as well. Thus the quaternions and represent the same rotation, but the interpolation curve changed with the choice of the sign. A positive sign has been chosen.
Definition at line 117 of file quaternion.cpp. |
Member Function Documentation
Quaternion ROBOOP::Quaternion::conjugate |
( |
|
) |
const |
|
|
Conjugate.
The conjugate of a quaternion is
Definition at line 325 of file quaternion.cpp.
Referenced by i(). |
ReturnMatrix ROBOOP::Quaternion::E |
( |
const short |
sign |
) |
const |
|
|
Exponential of a quaternion.
Let a quaternion of the form , q is not necessarily a unit quaternion. Then the exponential function is defined by .
Definition at line 378 of file quaternion.cpp.
Referenced by power(). |
|
Logarithm of a unit quaternion.
The logarithm function of a unit quaternion is defined as . The result is not necessary a unit quaternion.
Definition at line 407 of file quaternion.cpp.
Referenced by power(). |
Real ROBOOP::Quaternion::norm |
( |
|
) |
const |
|
|
Return the quaternion norm.
The norm of quaternion is defined by
Definition at line 340 of file quaternion.cpp.
Referenced by i(), and unit(). |
|
Overload * operator, multiplication by a scalar.
and let . Then ![$rq = qr = [r, 0][s, v] = [rs, rv]$](form_56.png)
The result is not necessarily a unit quaternion even if is a unit quaternions.
Definition at line 272 of file quaternion.cpp. |
|
Overload * operator.
The multiplication of two quaternions is
where and denote the scalar and vector product in respectively.
If and are unit quaternions, then q will also be a unit quaternion.
Definition at line 249 of file quaternion.cpp. |
|
Overload + operator.
The quaternion addition is
The result is not necessarily a unit quaternion even if and are unit quaternions.
Definition at line 209 of file quaternion.cpp. |
|
Overload - operator.
The quaternion soustraction is
The result is not necessarily a unit quaternion even if and are unit quaternions.
Definition at line 229 of file quaternion.cpp. |
|
Overload / operator, division by a scalar.
Same explanation as multiplication by scaler.
Definition at line 302 of file quaternion.cpp. |
Real ROBOOP::Quaternion::s |
( |
|
) |
const [inline] |
|
void ROBOOP::Quaternion::set_s |
( |
const Real |
s |
) |
[inline] |
|
Member Data Documentation
|
Quaternion scalar part.
Definition at line 121 of file quaternion.h.
Referenced by conjugate(), exp(), Log(), norm(), operator *(), operator+(), operator-(), operator/(), operator=(), Quaternion(), s(), set_s(), and unit(). |
|
Quaternion vector part.
Definition at line 122 of file quaternion.h.
Referenced by conjugate(), exp(), Log(), norm(), operator *(), operator+(), operator-(), operator/(), operator=(), Quaternion(), set_v(), unit(), and v(). |
The documentation for this class was generated from the following files:
|