BRL-CAD
qmath.h File Reference
#include "common.h"
#include "vmath.h"
#include "bn/defines.h"
Include dependency graph for qmath.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void quat_mat2quat (quat_t quat, const mat_t mat)
 Quaternion math routines. More...
 
void quat_quat2mat (mat_t mat, const quat_t quat)
 Convert Quaternion to Matrix. More...
 
double quat_distance (const quat_t q1, const quat_t q2)
 Gives the euclidean distance between two quaternions. More...
 
void quat_double (quat_t qout, const quat_t q1, const quat_t q2)
 Gives the quaternion point representing twice the rotation from q1 to q2. Needed for patching Bezier curves together. A rather poor name admittedly. More...
 
void quat_bisect (quat_t qout, const quat_t q1, const quat_t q2)
 Gives the bisector of quaternions q1 and q2. (Could be done with quat_slerp and factor 0.5) [I believe they must be unit quaternions this to work]. More...
 
void quat_slerp (quat_t qout, const quat_t q1, const quat_t q2, double f)
 Do Spherical Linear Interpolation between two unit quaternions by the given factor. More...
 
void quat_sberp (quat_t qout, const quat_t q1, const quat_t qa, const quat_t qb, const quat_t q2, double f)
 Spherical Bezier Interpolate between four quaternions by amount f. These are intended to be used as start and stop quaternions along with two control quaternions chosen to match spline segments with first order continuity. More...
 
void quat_make_nearest (quat_t q1, const quat_t q2)
 Set the quaternion q1 to the quaternion which yields the smallest rotation from q2 (of the two versions of q1 which produce the same orientation). More...
 
void quat_print (const char *title, const quat_t quat)
 
void quat_exp (quat_t out, const quat_t in)
 Exponentiate a quaternion, assuming that the scalar part is 0. Code by Ken Shoemake. More...
 
void quat_log (quat_t out, const quat_t in)
 Take the natural logarithm of a unit quaternion. Code by Ken Shoemake. More...