![]() |
KudanCV
|
#include <KudanCV.h>
Public Member Functions | |
| KudanQuaternion () | |
| KudanQuaternion (float x, float y, float z, float w) | |
| void | zero () |
| KudanMatrix3 | toRotation () |
| std::string | toString () |
| float | norm () |
| void | normalise () |
Static Public Member Functions | |
| static KudanMatrix3 | quaternionToRotation (KudanQuaternion &q) |
Public Attributes | |
| float | x |
| float | y |
| float | z |
| float | w |
Simple representation of a quaternion representing a rotation.
| KudanQuaternion::KudanQuaternion | ( | ) |
Default constructor initialises the data to the zero quaternion (0,0,0,0)'
| KudanQuaternion::KudanQuaternion | ( | float | x, |
| float | y, | ||
| float | z, | ||
| float | w | ||
| ) |
Constructor for initialising the data to the given quaternion. Careful of the order: x, y, z, w
| x,y,z,w | Coefficients of the quaternion |
| float KudanQuaternion::norm | ( | ) |
Get the norm of this Quaternion (should usually be 1). This is the Euclidean/L2 norm of the 4-vector representing the quaternion
| void KudanQuaternion::normalise | ( | ) |
Normalises this quaternion (so it is a 4-vector with Euclidean/L2 norm 1)
|
static |
A function to convert from a quaternion to a rotation matrix
| q | The input quaternion |
| KudanMatrix3 KudanQuaternion::toRotation | ( | ) |
Turns this quaternion into a rotation matrix
| std::string KudanQuaternion::toString | ( | ) |
Returns a representation of this as a string (x,y,z;w)
| void KudanQuaternion::zero | ( | ) |
Set the all coefficients to zero
| float KudanQuaternion::x |
Public x, y, z, w coefficients of the quaternion