#include <Quaternion.h>
|
| Quaternion (double qw=1., double qx=1., double qy=0., double qz=0.) |
|
| Quaternion (const double &alpha_rad, const std::array< double, 3 > &n) |
| create a quaternion, representing a rotation around a rotation axis (vector n) by an angel alpha More...
|
|
double | qw () const |
|
double | qx () const |
|
double | qy () const |
|
double | qz () const |
|
double | magnitude2 () const |
|
void | scale (double s) |
|
void | scaleinv (double s) |
|
void | normalize () |
|
void | conjugate () |
|
void | inverse () |
|
void | add (const Quaternion &q) |
|
void | multiply_left (const Quaternion &q) |
|
void | operator*= (const Quaternion &q) |
|
std::array< double, 3 > | rotate (const std::array< double, 3 > &d) const |
|
void | rotateInPlace (std::array< double, 3 > &d) const |
|
std::array< double, 3 > | rotateinv (const std::array< double, 3 > &d) const |
|
void | rotateinvInPlace (std::array< double, 3 > &d) const |
|
void | differentiate (const std::array< double, 3 > &w, Quaternion &dqdt) const |
|
void | getRotMatrix (double R[3][3]) const |
|
void | getRotinvMatrix (double R[3][3]) const |
|
bool | isNormalized () const |
|
void | check () const |
|
◆ Quaternion()
Quaternion::Quaternion |
( |
const double & |
alpha_rad, |
|
|
const std::array< double, 3 > & |
n |
|
) |
| |
create a quaternion, representing a rotation around a rotation axis (vector n) by an angel alpha
- Parameters
-
alpha_rad | the rotation angle in radiant |
n | rotation axis represented as a vector (will be normalized) |
◆ rotate()
std::array< double, 3 > Quaternion::rotate |
( |
const std::array< double, 3 > & |
d | ) |
const |
apply the rotation represented by tis quaternion to d
- Parameters
-
d | the vector to be rotated |
- Returns
- result vector of the rotation
◆ rotateInPlace()
void Quaternion::rotateInPlace |
( |
std::array< double, 3 > & |
d | ) |
const |
|
inline |
apply the rotation represented by tis quaternion to d. The result vector is stored to d.
- Parameters
-
d | the vector to be rotated |
The documentation for this class was generated from the following files: