#include <math.h>#include <gandalf/vision/rotate3D.h>#include <gandalf/common/misc_error.h>#include <gandalf/common/numerics.h>#include <gandalf/linalg/3x3matrix_eigen.h>#include <gandalf/linalg/3x3matrix_svd.h>Defines | |
| #define | Q1 rot1->data.q |
| #define | Q2 rot2->data.q |
| #define | Q0 qp.q0 |
| #define | Q1 qp.q1 |
| #define | Q2 qp.q2 |
| #define | Q3 qp.q3 |
| #define | RX r->x |
| #define | RY r->y |
| #define | RZ r->z |
Functions | |
| void | gan_quat_fill_q (Gan_Quaternion *q, double q0, double q1, double q2, double q3) |
| Fill quaternion with values. | |
| Gan_Quaternion | gan_quat_fill_s (double q0, double q1, double q2, double q3) |
| Fill quaternion with values. | |
| Gan_Quaternion | gan_quat_scale_s (Gan_Quaternion *q, double s) |
| Multiply all the elements of a quaternion by a scalar value. | |
| Gan_Quaternion | gan_quat_divide_s (Gan_Quaternion *q, double s) |
| Divide quaternion by scalar. | |
| Gan_Quaternion | gan_quat_unit_s (Gan_Quaternion *q) |
| Scale quaternion to unit length. | |
| Gan_Bool | gan_rot3D_build_quaternion (Gan_Rot3D *rot, double q0, double q1, double q2, double q3) |
| Fill rotation structure from quaternion. | |
| Gan_Bool | gan_rot3D_build_exponential (Gan_Rot3D *rot, double rx, double ry, double rz) |
| Fill rotation structure from exponential rotation parameters. | |
| Gan_Bool | gan_rot3D_build_angle_axis (Gan_Rot3D *rot, double angle, double ax, double ay, double az) |
| Fill rotation structure from angle/axis rotation parameters. | |
| Gan_Bool | gan_rot3D_build_matrix (Gan_Rot3D *rot, double Rxx, double Rxy, double Rxz, double Ryx, double Ryy, double Ryz, double Rzx, double Rzy, double Rzz) |
| Fill rotation structure from matrix rotation parameters. | |
| Gan_Bool | gan_rot3D_ident_q (Gan_Rot3D *rot, Gan_Rot3D_Type type) |
| Set null rotation with given type. | |
| Gan_Rot3D | gan_rot3D_ident_s (Gan_Rot3D_Type type) |
| Return null rotation with given type. | |
| Gan_Bool | gan_rot3D_apply_v3_q (Gan_Rot3D *rot, Gan_Vector3 *X, Gan_Vector3 *X_new) |
| Apply a rotation to a 3D point. | |
| Gan_Vector3 | gan_rot3D_apply_v3_s (Gan_Rot3D *rot, Gan_Vector3 *X) |
| Return the rotation of a 3D point. | |
| Gan_Bool | gan_rot3D_mult_q (Gan_Rot3D *rot1, Gan_Rot3D *rot2, Gan_Rot3D *rot3) |
| Combine two rotations into a third. | |
| Gan_Rot3D | gan_rot3D_mult_s (Gan_Rot3D *rot1, Gan_Rot3D *rot2) |
| Combine two rotations and return a third. | |
| Gan_Bool | gan_rot3D_multI_q (Gan_Rot3D *rot1, Gan_Rot3D *rot2, Gan_Rot3D *rot3) |
| Combine two rotations into a third. | |
| Gan_Rot3D | gan_rot3D_multI_s (Gan_Rot3D *rot1, Gan_Rot3D *rot2) |
| Combine two rotations and return a third. | |
| Gan_Bool | gan_rot3D_scale_q (Gan_Rot3D *rot_s, double scale, Gan_Rot3D *rot_d) |
| Scale rotation parameters. | |
| Gan_Rot3D | gan_rot3D_scale_s (Gan_Rot3D *rot_s, double scale) |
| Multiply rotation parameters by scalar. | |
| Gan_Bool | gan_rot3D_divide_q (Gan_Rot3D *rot_s, double scale, Gan_Rot3D *rot_d) |
| Divide rotation parameters by scalar. | |
| Gan_Rot3D | gan_rot3D_divide_s (Gan_Rot3D *rot_s, double scale) |
| Divide rotation parameters by scalar. | |
| Gan_Bool | gan_rot3D_add_q (Gan_Rot3D *rot1, Gan_Rot3D *rot2, Gan_Rot3D *rot3) |
| Add two sets of rotation parameters together. | |
| Gan_Rot3D | gan_rot3D_add_s (Gan_Rot3D *rot1, Gan_Rot3D *rot2) |
| Add two sets of rotation parameters together. | |
| Gan_Bool | gan_rot3D_sub_q (Gan_Rot3D *rot1, Gan_Rot3D *rot2, Gan_Rot3D *rot3) |
| Subtract two sets of rotation parameters from each other. | |
| Gan_Rot3D | gan_rot3D_sub_s (Gan_Rot3D *rot1, Gan_Rot3D *rot2) |
| Subtract two sets of rotation parameters from each other. | |
| Gan_Bool | gan_rot3D_convert_q (Gan_Rot3D *rot_s, Gan_Rot3D_Type type, Gan_Rot3D *rot_d) |
| Convert rotation from one type to another. | |
| Gan_Rot3D | gan_rot3D_convert_s (Gan_Rot3D *rot_s, Gan_Rot3D_Type type) |
| Return conversion of rotation from one type to another. | |
| Gan_Bool | gan_rot3D_from_quaternion_q (Gan_Rot3D *rot, Gan_Quaternion *q, Gan_Rot3D_Type type) |
| Convert rotation from quaternion to another type. | |
| Gan_Rot3D | gan_rot3D_from_quaternion_s (Gan_Quaternion *q, Gan_Rot3D_Type type) |
| Return conversion of rotation from quaternion to another type. | |
| Gan_Bool | gan_rot3D_from_exponential_q (Gan_Rot3D *rot, Gan_Vector3 *r, Gan_Rot3D_Type type) |
| Convert rotation from exponential to another type. | |
| Gan_Rot3D | gan_rot3D_from_exponential_s (Gan_Vector3 *r, Gan_Rot3D_Type type) |
| Return conversion of rotation from exponential to another type. | |
| Gan_Bool | gan_rot3D_from_angle_axis_q (Gan_Rot3D *rot, double angle, Gan_Vector3 *axis, Gan_Rot3D_Type type) |
| Convert rotation from angle/axis to another type. | |
| Gan_Rot3D | gan_rot3D_from_angle_axis_s (double angle, Gan_Vector3 *axis, Gan_Rot3D_Type type) |
| Return conversion of rotation from angle/axis to another type. | |
| Gan_Bool | gan_rot3D_from_matrix_q (Gan_Rot3D *rot, Gan_Matrix33 *R, Gan_Rot3D_Type type) |
| Convert rotation from matrix to another type. | |
| Gan_Rot3D | gan_rot3D_from_matrix_s (Gan_Matrix33 *R, Gan_Rot3D_Type type) |
| Return conversion of rotation from matrix to another type. | |
| Gan_Bool | gan_rot3D_matrix_adjust (Gan_Matrix33 *R) |
| Adjust rotation matrix to be orthogonal using SVD. | |
Part of: Gandalf Library
Revision: Last edited: Author:
Copyright: (c) 2000 Imagineer Software Limited
1.3-rc1