#include <quaternion.h>
Public Member Functions | |
Quaternion () | |
Construct a Quatertion. | |
Quaternion (const CoordType w_in, const CoordType x_in, const CoordType y_in, const CoordType z_in) | |
Construct a Quaternion from (w, x, y, z) components. | |
Quaternion (int axis, const CoordType angle) | |
Construct a Quaternion giving a rotation around axis by angle. | |
Quaternion (const Vector< 3 > &axis, const CoordType angle) | |
Construct a Quaternion giving a rotation around the Vector axis by angle. | |
Quaternion (const Vector< 3 > &axis) | |
Construct a Quaternion giving a rotation around the Vector axis. | |
Quaternion (const Quaternion &p) | |
Construct a copy of a Quaternion. | |
Quaternion (const Atlas::Message::Object &a) | |
Construct a Quaternion from an Atlas::Message::Object. | |
Atlas::Message::Object | toAtlas () const |
Create an Atlas object from the Quaternion. | |
void | fromAtlas (const Atlas::Message::Object &a) |
Set the Quaternion's value to that given by an Atlas object. | |
Quaternion & | identity () |
Set the Quaternion to the identity rotation. | |
bool | fromRotMatrix (const RotMatrix< 3 > &m) |
set a Quaternion's value from a RotMatrix | |
Quaternion | inverse () const |
returns the inverse of the Quaternion | |
Quaternion & | rotation (int axis, const CoordType angle) |
sets the Quaternion to a rotation by angle around axis | |
Quaternion & | rotation (const Vector< 3 > &axis, const CoordType angle) |
sets the Quaternion to a rotation by angle around the Vector axis | |
Quaternion & | rotation (const Vector< 3 > &axis) |
sets the Quaternion to a rotation around the Vector axis | |
CoordType | scalar () const |
returns the scalar (w) part of the Quaternion | |
const Vector< 3 > & | vector () const |
returns the Vector (x, y, z) part of the quaternion |
This class implements the 'generic' subset of the interface in the fake class Shape.
|
Construct a Quaternion from (w, x, y, z) components. This normalizes the components so the sum of their squares is one. |
|
Construct a Quaternion giving a rotation around the Vector axis. The angle of rotating is equal to the magnitude of the Vector |
|
set a Quaternion's value from a RotMatrix Since a Quaternion can only represent an even-parity RotMatrix, this function returns false if the parity of m is odd. In this case, the quaternion is set to the value of m multiplied by a fixed parity-odd RotMatrix, so the full RotMatrix can be recovered by passing the Quaternion and the value of 'not_flip' returned by this function to RotMatrix::fromQuaternion(). |
|
sets the Quaternion to a rotation around the Vector axis The rotation angle is given by the magnitude of the Vector |