Ravelin
|
Quaternion class used for orientation. More...
#include <Quatd.h>
Public Member Functions | |
QUAT (REAL x, REAL y, REAL z, REAL w) | |
QUAT (const QUAT &q) | |
QUAT (const VECTORN &v) | |
QUAT (const AANGLE &v) | |
QUAT (const MATRIX3 &v) | |
bool | unit () const |
void | conjugate () |
void | set_identity () |
void | slerp (const QUAT &q, REAL alpha) |
void | lerp (const QUAT &q, REAL alpha) |
void | to_rpy (REAL &roll, REAL &pitch, REAL &yaw) const |
void | to_rpy (ORIGIN3 &RPY) const |
QUAT & | invert () |
QUAT | inverse () const |
REAL | norm_sq () const |
REAL | norm () const |
REAL | norm_inf () const |
void | normalize () |
QUAT & | operator= (const VECTORN &v) |
QUAT & | operator= (const AANGLE &a) |
QUAT & | operator= (const MATRIX3 &m) |
QUAT & | operator= (const QUAT &q) |
void | calc_generalized_force (const VECTOR3 &t, REAL gt[4]) const |
unsigned | size () const |
REAL & | operator[] (unsigned i) |
const REAL & | operator[] (unsigned i) const |
QUAT | operator- (const QUAT &q) const |
QUAT & | operator-= (const QUAT &q) |
QUAT | operator+ (const QUAT &q) const |
QUAT & | operator+= (const QUAT &q) |
QUAT | operator* (const QUAT &q) const |
QUAT | operator/ (const QUAT &q) const |
ORIGIN3 | operator* (const ORIGIN3 &v) const |
QUAT | operator* (REAL scalar) const |
QUAT | operator/ (REAL scalar) const |
QUAT & | operator*= (const QUAT &q) |
QUAT & | operator*= (REAL scalar) |
QUAT & | operator/= (REAL scalar) |
REAL | magnitude () const |
VECTOR3 | G_mult (REAL qx, REAL qy, REAL qz, REAL qw) const |
QUAT | G_transpose_mult (const VECTOR3 &v) const |
QUAT | L_transpose_mult (const VECTOR3 &v) const |
VECTOR3 | L_mult (REAL qx, REAL qy, REAL qz, REAL qw) const |
QUAT (REAL x, REAL y, REAL z, REAL w) | |
QUAT (const QUAT &q) | |
QUAT (const VECTORN &v) | |
QUAT (const AANGLE &v) | |
QUAT (const MATRIX3 &v) | |
bool | unit () const |
void | conjugate () |
void | set_identity () |
void | slerp (const QUAT &q, REAL alpha) |
void | lerp (const QUAT &q, REAL alpha) |
void | to_rpy (REAL &roll, REAL &pitch, REAL &yaw) const |
void | to_rpy (ORIGIN3 &RPY) const |
QUAT & | invert () |
QUAT | inverse () const |
REAL | norm_sq () const |
REAL | norm () const |
REAL | norm_inf () const |
void | normalize () |
QUAT & | operator= (const VECTORN &v) |
QUAT & | operator= (const AANGLE &a) |
QUAT & | operator= (const MATRIX3 &m) |
QUAT & | operator= (const QUAT &q) |
void | calc_generalized_force (const VECTOR3 &t, REAL gt[4]) const |
unsigned | size () const |
REAL & | operator[] (unsigned i) |
const REAL & | operator[] (unsigned i) const |
QUAT | operator- (const QUAT &q) const |
QUAT & | operator-= (const QUAT &q) |
QUAT | operator+ (const QUAT &q) const |
QUAT & | operator+= (const QUAT &q) |
QUAT | operator* (const QUAT &q) const |
QUAT | operator/ (const QUAT &q) const |
ORIGIN3 | operator* (const ORIGIN3 &v) const |
QUAT | operator* (REAL scalar) const |
QUAT | operator/ (REAL scalar) const |
QUAT & | operator*= (const QUAT &q) |
QUAT & | operator*= (REAL scalar) |
QUAT & | operator/= (REAL scalar) |
REAL | magnitude () const |
VECTOR3 | G_mult (REAL qx, REAL qy, REAL qz, REAL qw) const |
QUAT | G_transpose_mult (const VECTOR3 &v) const |
QUAT | L_transpose_mult (const VECTOR3 &v) const |
VECTOR3 | L_mult (REAL qx, REAL qy, REAL qz, REAL qw) const |
Static Public Member Functions | |
static bool | rel_equal (const QUAT &q1, const QUAT &q2, REAL tol=-1.0) |
static QUAT | zero () |
static QUAT | conjugate (const QUAT &q) |
static QUAT | identity () |
static QUAT | slerp (const QUAT &q1, const QUAT &q2, REAL alpha) |
static QUAT | lerp (const QUAT &q1, const QUAT &q2, REAL alpha) |
static QUAT | rpy (REAL roll, REAL pitch, REAL yaw) |
static QUAT | rpy (const ORIGIN3 &RPY) |
static REAL | calc_angle (const QUAT &q1, const QUAT &q2) |
static QUAT | invert (const QUAT &q) |
static QUAT | normalize (const QUAT &q) |
static QUAT | deriv (const QUAT &q, const VECTOR3 &w) |
static QUAT | dderiv (const QUAT &q, const VECTOR3 &omega, const VECTOR3 &alpha) |
static VECTOR3 | to_omega (const QUAT &q, const QUAT &qd) |
static bool | rel_equal (const QUAT &q1, const QUAT &q2, REAL tol=-1.0) |
static QUAT | zero () |
static QUAT | conjugate (const QUAT &q) |
static QUAT | identity () |
static QUAT | slerp (const QUAT &q1, const QUAT &q2, REAL alpha) |
static QUAT | lerp (const QUAT &q1, const QUAT &q2, REAL alpha) |
static QUAT | rpy (REAL roll, REAL pitch, REAL yaw) |
static QUAT | rpy (const ORIGIN3 &RPY) |
static REAL | calc_angle (const QUAT &q1, const QUAT &q2) |
static QUAT | invert (const QUAT &q) |
static QUAT | normalize (const QUAT &q) |
static QUAT | deriv (const QUAT &q, const VECTOR3 &w) |
static QUAT | dderiv (const QUAT &q, const VECTOR3 &omega, const VECTOR3 &alpha) |
static VECTOR3 | to_omega (const QUAT &q, const QUAT &qd) |
Public Attributes | |
REAL | x |
First quaternion component. | |
REAL | y |
Second quaternion component. | |
REAL | z |
Third quaterion component. | |
REAL | w |
Fourth quaternion component. | |
Quaternion class used for orientation.
This class is used to represent orientation via unit quaternions. Note, however, that the user is responsible for normalizing the quaternions; normalization is not automatic.