a class to implement a quaternion
More...
#include <mia/3d/quaternion.hh>
a class to implement a quaternion
This class implements some operations of a quaternion.
Definition at line 38 of file quaternion.hh.
Quaternion::Quaternion |
( |
) | |
|
The standard constructor that sets all values of the quaternion to zero.
Quaternion::Quaternion |
( |
const Quaternion & |
other) | |
|
|
default |
The copy constructor.
- Parameters
-
This constructor creates a quaternion from three Euler angles that are applied with the x-y-z convention.
- Parameters
-
Quaternion::Quaternion |
( |
double |
w, |
|
|
double |
x, |
|
|
double |
y, |
|
|
double |
z |
|
) |
| |
Constructor to create a quaternion by directly setting its elements.
- Returns
- the Euler angles that correspond to the rotation described by this quaternion
- Returns
- the inverse of the quaternion assuming it is normalized
double Quaternion::norm |
( |
) | |
const |
- Returns
- the norm of the quaternion
void Quaternion::normalize |
( |
) | |
|
in-place multiplication
- Parameters
-
- Returns
- reference to the updated quaternion
in-place adding
- Parameters
-
- Returns
- reference to the updated quaternion
in-place substraction
- Parameters
-
- Returns
- reference to the updated quaternion
void Quaternion::print |
( |
std::ostream & |
os) | |
const |
Print the quaternion to an output stream
- Parameters
-
Referenced by operator<<().
double Quaternion::w |
( |
) | |
const |
|
inline |
- Returns
- the w- or $x_0$ component of the quaternion
Definition at line 136 of file quaternion.hh.
double Quaternion::x |
( |
) | |
const |
|
inline |
double Quaternion::y |
( |
) | |
const |
|
inline |
double Quaternion::z |
( |
) | |
const |
|
inline |
- Parameters
-
- Returns
- true if the quaternions are element-wise equal
The documentation for this class was generated from the following file: