Blender V2.61 - r43446
|
#include <assert.h>
#include "BLI_math.h"
Go to the source code of this file.
Classes | |
struct | RotOrderInfo |
Defines | |
#define | QUAT_EPSILON 0.0001 |
#define | GET_ROTATIONORDER_INFO(order) (assert(order>=0 && order<=6), (order < 1) ? &rotOrders[0] : &rotOrders[(order)-1]) |
Typedefs | |
typedef struct RotOrderInfo | RotOrderInfo |
Functions | |
void | unit_axis_angle (float axis[3], float *angle) |
void | unit_qt (float q[4]) |
void | copy_qt_qt (float q1[4], const float q2[4]) |
int | is_zero_qt (float *q) |
void | mul_qt_qtqt (float *q, const float *q1, const float *q2) |
void | mul_qt_v3 (const float *q, float *v) |
void | conjugate_qt (float *q) |
float | dot_qtqt (const float q1[4], const float q2[4]) |
void | invert_qt (float *q) |
void | invert_qt_qt (float *q1, const float *q2) |
void | mul_qt_fl (float *q, const float f) |
void | sub_qt_qtqt (float q[4], const float q1[4], const float q2[4]) |
void | mul_fac_qt_fl (float *q, const float fac) |
static void | quat_to_mat3_no_error (float m[][3], const float q[4]) |
void | quat_to_mat3 (float m[][3], const float q[4]) |
void | quat_to_mat4 (float m[][4], const float q[4]) |
void | mat3_to_quat (float *q, float wmat[][3]) |
void | mat4_to_quat (float *q, float m[][4]) |
void | mat3_to_quat_is_ok (float q[4], float wmat[3][3]) |
float | normalize_qt (float *q) |
float | normalize_qt_qt (float r[4], const float q[4]) |
void | rotation_between_vecs_to_quat (float *q, const float v1[3], const float v2[3]) |
void | rotation_between_quats_to_quat (float *q, const float q1[4], const float q2[4]) |
void | vec_to_quat (float q[4], const float vec[3], short axis, const short upflag) |
void | interp_qt_qtqt (float result[4], const float quat1[4], const float quat2[4], const float t) |
void | add_qt_qtqt (float result[4], const float quat1[4], const float quat2[4], const float t) |
void | tri_to_quat (float quat[4], const float v1[3], const float v2[3], const float v3[3]) |
void | print_qt (const char *str, const float q[4]) |
void | axis_angle_to_quat (float q[4], const float axis[3], float angle) |
void | quat_to_axis_angle (float axis[3], float *angle, const float q[4]) |
void | axis_angle_to_eulO (float eul[3], const short order, const float axis[3], const float angle) |
void | eulO_to_axis_angle (float axis[3], float *angle, const float eul[3], const short order) |
void | axis_angle_to_mat3 (float mat[3][3], const float axis[3], const float angle) |
void | axis_angle_to_mat4 (float mat[4][4], const float axis[3], const float angle) |
void | mat3_to_axis_angle (float axis[3], float *angle, float mat[3][3]) |
void | mat4_to_axis_angle (float axis[3], float *angle, float mat[4][4]) |
void | single_axis_angle_to_mat3 (float mat[3][3], const char axis, const float angle) |
void | vec_rot_to_mat3 (float mat[][3], const float vec[3], const float phi) |
void | vec_rot_to_mat4 (float mat[][4], const float vec[3], const float phi) |
void | vec_rot_to_quat (float *quat, const float vec[3], const float phi) |
void | eul_to_mat3 (float mat[][3], const float eul[3]) |
void | eul_to_mat4 (float mat[][4], const float eul[3]) |
static void | mat3_to_eul2 (float tmat[][3], float eul1[3], float eul2[3]) |
void | mat3_to_eul (float *eul, float tmat[][3]) |
void | mat4_to_eul (float *eul, float tmat[][4]) |
void | quat_to_eul (float *eul, const float quat[4]) |
void | eul_to_quat (float *quat, const float eul[3]) |
void | rotate_eul (float *beul, const char axis, const float ang) |
void | compatible_eul (float eul[3], const float oldrot[3]) |
void | mat3_to_compatible_eul (float eul[3], const float oldrot[3], float mat[][3]) |
void | eulO_to_quat (float q[4], const float e[3], const short order) |
void | quat_to_eulO (float e[3], short const order, const float q[4]) |
void | eulO_to_mat3 (float M[3][3], const float e[3], const short order) |
static void | mat3_to_eulo2 (float M[3][3], float *e1, float *e2, short order) |
void | eulO_to_mat4 (float M[4][4], const float e[3], const short order) |
void | mat3_to_eulO (float eul[3], const short order, float M[3][3]) |
void | mat4_to_eulO (float e[3], const short order, float M[4][4]) |
void | mat3_to_compatible_eulO (float eul[3], float oldrot[3], short order, float mat[3][3]) |
void | mat4_to_compatible_eulO (float eul[3], float oldrot[3], short order, float M[4][4]) |
void | rotate_eulO (float beul[3], short order, char axis, float ang) |
void | eulO_to_gimbal_axis (float gmat[][3], const float eul[3], const short order) |
void | mat4_to_dquat (DualQuat *dq, float basemat[][4], float mat[][4]) |
void | dquat_to_mat4 (float mat[][4], DualQuat *dq) |
void | add_weighted_dq_dq (DualQuat *dqsum, DualQuat *dq, float weight) |
void | normalize_dq (DualQuat *dq, float totweight) |
void | mul_v3m3_dq (float *co, float mat[][3], DualQuat *dq) |
void | copy_dq_dq (DualQuat *dq1, DualQuat *dq2) |
void | quat_apply_track (float quat[4], short axis, short upflag) |
void | vec_apply_track (float vec[3], short axis) |
float | focallength_to_fov (float focal_length, float sensor) |
float | fov_to_focallength (float hfov, float sensor) |
static float | mod_inline (float a, float b) |
float | angle_wrap_rad (float angle) |
float | angle_wrap_deg (float angle) |
Variables | |
static RotOrderInfo | rotOrders [] |
Definition in file math_rotation.c.
#define GET_ROTATIONORDER_INFO | ( | order | ) | (assert(order>=0 && order<=6), (order < 1) ? &rotOrders[0] : &rotOrders[(order)-1]) |
Definition at line 1167 of file math_rotation.c.
Referenced by eulO_to_gimbal_axis(), eulO_to_mat3(), eulO_to_quat(), and mat3_to_eulo2().
#define QUAT_EPSILON 0.0001 |
Definition at line 38 of file math_rotation.c.
Referenced by quat_to_axis_angle(), quat_to_mat3(), and quat_to_mat4().
typedef struct RotOrderInfo RotOrderInfo |
void add_qt_qtqt | ( | float | result[4], |
const float | quat1[4], | ||
const float | quat2[4], | ||
const float | t | ||
) |
Definition at line 584 of file math_rotation.c.
Referenced by pose_slide_apply_quat(), and Quaternion_add().
Definition at line 1506 of file math_rotation.c.
References add_m4_m4m4(), copy_m4_m4(), dot_qtqt(), mul_m4_fl(), DualQuat::quat, DualQuat::scale, DualQuat::scale_weight, and DualQuat::trans.
Referenced by dist_bone_deform(), and pchan_bone_deform().
float angle_wrap_deg | ( | float | angle | ) |
Definition at line 1712 of file math_rotation.c.
References mod_inline().
float angle_wrap_rad | ( | float | angle | ) |
Definition at line 1707 of file math_rotation.c.
References M_PI, and mod_inline().
Referenced by C_Matrix_Rotation(), Quaternion_angle_set(), Quaternion_new(), and Rotation().
void axis_angle_to_eulO | ( | float | eul[3], |
const short | order, | ||
const float | axis[3], | ||
const float | angle | ||
) |
Definition at line 690 of file math_rotation.c.
References axis_angle_to_quat(), and quat_to_eulO().
Referenced by BKE_rotMode_change_values(), object_clear_rot(), pchan_clear_rot(), pose_bone_do_paste(), and protectedAxisAngleBits().
void axis_angle_to_mat3 | ( | float | mat[3][3], |
const float | axis[3], | ||
const float | angle | ||
) |
Definition at line 710 of file math_rotation.c.
References co, cos(), normalize_v3_v3(), si, sin(), and unit_m3().
Referenced by apply_targetless_ik(), applyModifier(), axis_angle_to_mat4(), C_Matrix_Rotation(), damptrack_evaluate(), joint_callback(), object_rot_to_mat3(), pchan_to_mat4(), and splineik_evaluate_bone().
void axis_angle_to_mat4 | ( | float | mat[4][4], |
const float | axis[3], | ||
const float | angle | ||
) |
Definition at line 741 of file math_rotation.c.
References axis_angle_to_mat3(), copy_m4_m3(), and unit_m4().
Referenced by constraintob_from_transdata(), TransformReader::dae_rotate_to_mat4(), do_rotate_brush(), and AnimationImporter::evaluate_animation().
void axis_angle_to_quat | ( | float | q[4], |
const float | axis[3], | ||
float | angle | ||
) |
Definition at line 644 of file math_rotation.c.
References cos(), normalize_v3_v3(), si, sin(), and unit_qt().
Referenced by applyModifier(), applyTranslation(), axis_angle_to_eulO(), axis_angle_to_gimbal_axis(), basic_rotate(), bevel_list_apply_tilt(), bevel_list_smooth(), BKE_rotMode_change_values(), boid_body(), cache_key_incremental_rotation(), do_guides(), do_kink(), draw_rotation_guide(), ElementRotation(), flyApply(), flyApply_ndof(), loc_axisangle_size_to_mat4(), make_bevel_list_3D_minimum_twist(), make_bevel_list_segment_3D(), ndof_orbit_invoke(), ndof_to_quat(), pose_bone_do_paste(), psys_get_birth_coordinates(), psys_get_dupli_path_transform(), Quaternion_angle_set(), Quaternion_axis_vector_set(), Quaternion_new(), rollBoneByQuatJoint(), rotation_between_vecs_to_quat(), v3d_posearmature_buts(), view3d_align_axis_to_vector(), and viewrotate_apply().
void compatible_eul | ( | float | eul[3], |
const float | oldrot[3] | ||
) |
Definition at line 1046 of file math_rotation.c.
Referenced by dvar_eval_transChan(), Euler_make_compatible(), mat3_to_compatible_eul(), mat3_to_compatible_eulO(), and rotlike_evaluate().
void conjugate_qt | ( | float * | q | ) |
Definition at line 101 of file math_rotation.c.
Definition at line 1613 of file math_rotation.c.
Referenced by b_bone_deform().
void copy_qt_qt | ( | float | q1[4], |
const float | q2[4] | ||
) |
Definition at line 56 of file math_rotation.c.
Referenced by add_pose_transdata(), bevel_list_cyclic_fix_3D(), bevel_list_smooth(), boid_body(), calc_curve_deform(), copy_attr(), copy_pose_channel_data(), copy_pose_result(), createTransMBallVerts(), do_path_effectors(), dquat_to_mat4(), ED_object_rotation_from_view(), equalize_bezier(), fcurves_to_pchan_links_get(), flyEnd(), game_blend_poses(), initFlyInfo(), invert_qt_qt(), make_bevel_list_3D_minimum_twist(), make_bevel_list_segment_3D(), normalize_qt_qt(), object_clear_rot(), object_tfm_backup(), object_tfm_restore(), ObjectToTransData(), offset_child(), pose_bone_do_paste(), pose_slide_apply_quat(), poseAnim_mapping_reset(), psys_cache_edit_paths(), psys_get_birth_coordinates(), psys_get_from_key(), psys_thread_create_path(), quat_mul_float(), Quaternion_CreatePyObject(), region_quadview_exec(), repositionControl(), restore_localviewdata(), restoreElement(), rotation_between_quats_to_quat(), smooth_view(), view3d_camera_to_view_exec(), view3d_smoothview_invoke(), view3d_split_250(), viewnumpad_exec(), viewops_data_create(), viewrotate_apply(), where_on_path(), and where_on_path_deform().
float dot_qtqt | ( | const float | q1[4], |
const float | q2[4] | ||
) |
Definition at line 108 of file math_rotation.c.
Referenced by add_weighted_dq_dq(), dquat_to_mat4(), invert_qt(), mul_v3m3_dq(), normalize_qt(), quat_to_axis_angle(), quat_to_mat3(), quat_to_mat4(), Quaternion_dot(), Quaternion_magnitude_get(), and rotation_between_quats_to_quat().
void dquat_to_mat4 | ( | float | mat[][4], |
DualQuat * | dq | ||
) |
Definition at line 1482 of file math_rotation.c.
References copy_qt_qt(), dot_qtqt(), len(), mul_qt_fl(), DualQuat::quat, quat_to_mat4(), sqrt(), and DualQuat::trans.
void eul_to_mat3 | ( | float | mat[][3], |
const float | eul[3] | ||
) |
Definition at line 882 of file math_rotation.c.
void eul_to_mat4 | ( | float | mat[][4], |
const float | eul[3] | ||
) |
Definition at line 910 of file math_rotation.c.
void eul_to_quat | ( | float * | quat, |
const float | eul[3] | ||
) |
Definition at line 1008 of file math_rotation.c.
void eulO_to_axis_angle | ( | float | axis[3], |
float * | angle, | ||
const float | eul[3], | ||
const short | order | ||
) |
Definition at line 700 of file math_rotation.c.
References eulO_to_quat(), and quat_to_axis_angle().
Referenced by BKE_rotMode_change_values(), object_clear_rot(), pchan_clear_rot(), pose_bone_do_paste(), and protectedAxisAngleBits().
void eulO_to_gimbal_axis | ( | float | gmat[][3], |
const float | eul[3], | ||
const short | order | ||
) |
Definition at line 1369 of file math_rotation.c.
References RotOrderInfo::axis, copy_v3_v3(), eulO_to_mat3(), GET_ROTATIONORDER_INFO, and R.
void eulO_to_mat3 | ( | float | M[3][3], |
const float | e[3], | ||
const short | order | ||
) |
Definition at line 1209 of file math_rotation.c.
References RotOrderInfo::axis, cos(), GET_ROTATIONORDER_INFO, i, RotOrderInfo::parity, R, si, and sin().
Referenced by apply_targetless_ik(), ElementRotation(), Euler_rotate(), Euler_to_matrix(), eulO_to_gimbal_axis(), eulO_to_mat4(), joint_callback(), loc_eulO_size_to_mat4(), mathutils_any_to_rotmat(), object_rot_to_mat3(), pchan_to_mat4(), and rotate_eulO().
void eulO_to_mat4 | ( | float | M[4][4], |
const float | e[3], | ||
const short | order | ||
) |
Definition at line 1276 of file math_rotation.c.
References copy_m4_m3(), eulO_to_mat3(), and normalize_m3().
Referenced by constraintob_from_transdata().
void eulO_to_quat | ( | float | q[4], |
const float | e[3], | ||
const short | order | ||
) |
Definition at line 1170 of file math_rotation.c.
References RotOrderInfo::axis, cos(), GET_ROTATIONORDER_INFO, i, RotOrderInfo::parity, R, si, and sin().
Referenced by BKE_rotMode_change_values(), Euler_to_quaternion(), eulO_to_axis_angle(), object_mat3_to_rot(), and pose_bone_do_paste().
float focallength_to_fov | ( | float | focal_length, |
float | sensor | ||
) |
Definition at line 1691 of file math_rotation.c.
References atanf.
Referenced by CamerasExporter::operator()(), and project_camera_info().
float fov_to_focallength | ( | float | hfov, |
float | sensor | ||
) |
Definition at line 1696 of file math_rotation.c.
References tanf.
Referenced by DocumentImporter::writeCamera().
void interp_qt_qtqt | ( | float | result[4], |
const float | quat1[4], | ||
const float | quat2[4], | ||
const float | t | ||
) |
Definition at line 547 of file math_rotation.c.
Referenced by bevel_list_smooth(), blend_m3_m3m3(), blend_m4_m4m4(), calc_curvepath(), collision_response(), do_particle_interpolation(), execute_posetree(), game_blend_poses(), pose_slide_apply_quat(), psys_get_birth_coordinates(), psys_get_particle_state(), ptcache_particle_interpolate(), Quaternion_slerp(), view3d_smoothview_invoke(), and where_on_path().
void invert_qt | ( | float * | q | ) |
Definition at line 113 of file math_rotation.c.
References conjugate_qt(), dot_qtqt(), and mul_qt_fl().
void invert_qt_qt | ( | float * | q1, |
const float * | q2 | ||
) |
Definition at line 124 of file math_rotation.c.
References copy_qt_qt(), and invert_qt().
int is_zero_qt | ( | float * | q | ) |
Definition at line 64 of file math_rotation.c.
void mat3_to_axis_angle | ( | float | axis[3], |
float * | angle, | ||
float | mat[3][3] | ||
) |
Definition at line 751 of file math_rotation.c.
References mat3_to_quat(), and quat_to_axis_angle().
Referenced by apply_targetless_ik(), object_mat3_to_rot(), pchan_mat3_to_rot(), and pivotcon_evaluate().
void mat3_to_compatible_eul | ( | float | eul[3], |
const float | oldrot[3], | ||
float | mat[][3] | ||
) |
Definition at line 1110 of file math_rotation.c.
References compatible_eul(), copy_v3_v3(), fabs(), and mat3_to_eul2().
void mat3_to_compatible_eulO | ( | float | eul[3], |
float | oldrot[3], | ||
short | order, | ||
float | mat[3][3] | ||
) |
Definition at line 1315 of file math_rotation.c.
References compatible_eul(), copy_v3_v3(), fabsf, and mat3_to_eulo2().
Referenced by ElementRotation(), Euler_rotate(), mat4_to_compatible_eulO(), Matrix_to_euler(), object_mat3_to_rot(), pchan_mat3_to_rot(), and Quaternion_to_euler().
void mat3_to_eul | ( | float * | eul, |
float | tmat[][3] | ||
) |
Definition at line 973 of file math_rotation.c.
References copy_v3_v3(), fabs(), and mat3_to_eul2().
static void mat3_to_eul2 | ( | float | tmat[][3], |
float | eul1[3], | ||
float | eul2[3] | ||
) | [static] |
Definition at line 942 of file math_rotation.c.
References KDL::atan2(), copy_m3_m3(), copy_v3_v3(), mat3_to_quat(), normalize_m3(), quat_to_mat3(), and sqrt().
Referenced by mat3_to_compatible_eul(), and mat3_to_eul().
void mat3_to_eulO | ( | float | eul[3], |
const short | order, | ||
float | M[3][3] | ||
) |
Definition at line 1288 of file math_rotation.c.
References copy_v3_v3(), fabs(), and mat3_to_eulo2().
Referenced by apply_targetless_ik(), mat4_to_eulO(), Matrix_to_euler(), object_mat3_to_rot(), pchan_mat3_to_rot(), quat_to_eulO(), and rotate_eulO().
static void mat3_to_eulo2 | ( | float | M[3][3], |
float * | e1, | ||
float * | e2, | ||
short | order | ||
) | [static] |
Definition at line 1234 of file math_rotation.c.
References KDL::atan2(), RotOrderInfo::axis, copy_m3_m3(), copy_v3_v3(), GET_ROTATIONORDER_INFO, i, normalize_m3(), RotOrderInfo::parity, R, and sqrt().
Referenced by mat3_to_compatible_eulO(), and mat3_to_eulO().
void mat3_to_quat | ( | float * | q, |
float | wmat[][3] | ||
) |
Definition at line 253 of file math_rotation.c.
References copy_m3_m3(), normalize_m3(), normalize_qt(), sqrt(), and sqrtf.
void mat3_to_quat_is_ok | ( | float | q[4], |
float | wmat[3][3] | ||
) |
Definition at line 313 of file math_rotation.c.
References angle(), KDL::atan2(), co, copy_m3_m3(), cos(), invert_m3_m3(), mul_m3_v3(), mul_qt_qtqt(), normalize_m3(), normalize_v3(), quat_to_mat3_no_error(), saacos(), si, and sin().
Referenced by boid_body(), psys_cache_edit_paths(), psys_get_birth_coordinates(), and visualkey_get_value().
void mat4_to_axis_angle | ( | float | axis[3], |
float * | angle, | ||
float | mat[4][4] | ||
) |
Definition at line 762 of file math_rotation.c.
References mat4_to_quat(), and quat_to_axis_angle().
Referenced by constraintRotLim(), and visualkey_get_value().
void mat4_to_compatible_eulO | ( | float | eul[3], |
float | oldrot[3], | ||
short | order, | ||
float | M[4][4] | ||
) |
Definition at line 1335 of file math_rotation.c.
References copy_m3_m4(), mat3_to_compatible_eulO(), and normalize_m3().
Referenced by rotlike_evaluate().
void mat4_to_dquat | ( | DualQuat * | dq, |
float | basemat[][4], | ||
float | mat[][4] | ||
) |
Definition at line 1428 of file math_rotation.c.
References copy_m4_m4(), copy_v3_v3(), determinant_m4(), credits_svn_gen::e, invert_m4_m4(), len_v3(), mat4_to_quat(), mat4_to_size(), mul_serie_m4(), mult_m4_m4m4(), NULL, orthogonalize_m4(), DualQuat::quat, quat_to_mat4(), R, DualQuat::scale, DualQuat::scale_weight, and DualQuat::trans.
void mat4_to_eul | ( | float * | eul, |
float | tmat[][4] | ||
) |
Definition at line 989 of file math_rotation.c.
References copy_m3_m4(), mat3_to_eul(), and normalize_m3().
void mat4_to_eulO | ( | float | e[3], |
const short | order, | ||
float | M[4][4] | ||
) |
Definition at line 1304 of file math_rotation.c.
References copy_m3_m4(), mat3_to_eulO(), and normalize_m3().
Referenced by childof_evaluate(), constraintRotLim(), dvar_eval_transChan(), pivotcon_evaluate(), rotlike_evaluate(), rotlimit_evaluate(), transform_evaluate(), and visualkey_get_value().
void mat4_to_quat | ( | float * | q, |
float | m[][4] | ||
) |
Definition at line 305 of file math_rotation.c.
References copy_m3_m4(), and mat3_to_quat().
static float mod_inline | ( | float | a, |
float | b | ||
) | [static] |
Definition at line 1702 of file math_rotation.c.
References floorf.
Referenced by angle_wrap_deg(), and angle_wrap_rad().
void mul_fac_qt_fl | ( | float * | q, |
const float | fac | ||
) |
Definition at line 152 of file math_rotation.c.
References angle(), co, cos(), mul_v3_fl(), normalize_v3(), saacos(), si, and sin().
void mul_qt_fl | ( | float * | q, |
const float | f | ||
) |
Definition at line 131 of file math_rotation.c.
void mul_qt_qtqt | ( | float * | q, |
const float * | q1, | ||
const float * | q2 | ||
) |
Definition at line 69 of file math_rotation.c.
void mul_qt_v3 | ( | const float * | q, |
float * | v | ||
) |
Definition at line 83 of file math_rotation.c.
void mul_v3m3_dq | ( | float * | co, |
float | mat[][3], | ||
DualQuat * | dq | ||
) |
Definition at line 1563 of file math_rotation.c.
References copy_m3_m3(), copy_m3_m4(), dot_qtqt(), M, mul_m3_fl(), mul_m3_m3m3(), mul_m3_v3(), mul_m4_v3(), DualQuat::quat, DualQuat::scale, DualQuat::scale_weight, DualQuat::trans, and simple_enum_gen::w.
void normalize_dq | ( | DualQuat * | dq, |
float | totweight | ||
) |
Definition at line 1541 of file math_rotation.c.
References mul_m4_fl(), mul_qt_fl(), DualQuat::quat, DualQuat::scale, DualQuat::scale_weight, and DualQuat::trans.
Referenced by armature_deform_verts().
float normalize_qt | ( | float * | q | ) |
Definition at line 357 of file math_rotation.c.
References dot_qtqt(), len(), mul_qt_fl(), and sqrt().
float normalize_qt_qt | ( | float | r[4], |
const float | q[4] | ||
) |
Definition at line 373 of file math_rotation.c.
References copy_qt_qt(), and normalize_qt().
Referenced by constraintob_from_transdata(), mathutils_any_to_rotmat(), new_particle_duplilist(), object_mat3_to_rot(), object_rot_to_mat3(), pchan_clear_rot(), pchan_to_mat4(), protectedQuaternionBits(), Quaternion_angle_get(), Quaternion_angle_set(), Quaternion_axis_vector_get(), Quaternion_axis_vector_set(), Quaternion_rotate(), Quaternion_to_axis_angle(), and Quaternion_to_euler().
void print_qt | ( | const char * | str, |
const float | q[4] | ||
) |
Definition at line 636 of file math_rotation.c.
void quat_apply_track | ( | float | quat[4], |
short | axis, | ||
short | upflag | ||
) |
Definition at line 1619 of file math_rotation.c.
References assert, and mul_qt_qtqt().
Referenced by calc_curve_deform(), followpath_get_tarmat(), and ob_parcurve().
void quat_to_axis_angle | ( | float | axis[3], |
float * | angle, | ||
const float | q[4] | ||
) |
Definition at line 663 of file math_rotation.c.
References acos(), dot_qtqt(), fabs(), fabsf, QUAT_EPSILON, si, and sin().
Referenced by BKE_rotMode_change_values(), do_view3d_region_buttons(), ElementRotation(), eulO_to_axis_angle(), mat3_to_axis_angle(), mat4_to_axis_angle(), pose_bone_do_paste(), Quaternion_angle_set(), Quaternion_axis_vector_get(), Quaternion_axis_vector_set(), and Quaternion_to_axis_angle().
void quat_to_eul | ( | float * | eul, |
const float | quat[4] | ||
) |
Definition at line 999 of file math_rotation.c.
References mat3_to_eul(), and quat_to_mat3().
void quat_to_eulO | ( | float | e[3], |
short const | order, | ||
const float | q[4] | ||
) |
Definition at line 1200 of file math_rotation.c.
References M, mat3_to_eulO(), and quat_to_mat3().
Referenced by axis_angle_to_eulO(), BKE_rotMode_change_values(), pose_bone_do_paste(), and Quaternion_to_euler().
void quat_to_mat3 | ( | float | m[][3], |
const float | q[4] | ||
) |
Definition at line 197 of file math_rotation.c.
References dot_qtqt(), fabsf, QUAT_EPSILON, and quat_to_mat3_no_error().
static void quat_to_mat3_no_error | ( | float | m[][3], |
const float | q[4] | ||
) | [static] |
Definition at line 164 of file math_rotation.c.
References M_SQRT2.
Referenced by mat3_to_quat_is_ok(), and quat_to_mat3().
void quat_to_mat4 | ( | float | m[][4], |
const float | q[4] | ||
) |
Definition at line 209 of file math_rotation.c.
References dot_qtqt(), fabsf, M_SQRT2, and QUAT_EPSILON.
void rotate_eul | ( | float * | beul, |
const char | axis, | ||
const float | ang | ||
) |
Definition at line 1024 of file math_rotation.c.
References assert, eul_to_mat3(), mat3_to_eul(), and mul_m3_m3m3().
void rotate_eulO | ( | float | beul[3], |
short | order, | ||
char | axis, | ||
float | ang | ||
) |
Definition at line 1346 of file math_rotation.c.
References assert, eulO_to_mat3(), mat3_to_eulO(), and mul_m3_m3m3().
Referenced by Euler_rotate_axis(), and rotlike_evaluate().
void rotation_between_quats_to_quat | ( | float * | q, |
const float | q1[4], | ||
const float | q2[4] | ||
) |
Definition at line 392 of file math_rotation.c.
References conjugate_qt(), copy_qt_qt(), dot(), dot_qtqt(), and mul_qt_qtqt().
void rotation_between_vecs_to_quat | ( | float * | q, |
const float | v1[3], | ||
const float | v2[3] | ||
) |
Definition at line 380 of file math_rotation.c.
References angle(), angle_normalized_v3v3(), axis_angle_to_quat(), and cross_v3_v3v3().
void single_axis_angle_to_mat3 | ( | float | mat[3][3], |
const char | axis, | ||
const float | angle | ||
) |
Definition at line 774 of file math_rotation.c.
References assert, cosf, and sinf.
Referenced by C_Matrix_Rotation().
void sub_qt_qtqt | ( | float | q[4], |
const float | q1[4], | ||
const float | q2[4] | ||
) |
Definition at line 139 of file math_rotation.c.
References mul_qt_qtqt().
Referenced by explodeMesh(), pose_slide_apply_quat(), and set_crazy_vertex_quat().
void tri_to_quat | ( | float | quat[4], |
const float | v1[3], | ||
const float | v2[3], | ||
const float | v3[3] | ||
) |
Definition at line 592 of file math_rotation.c.
References angle(), KDL::atan2(), co, cos(), invert_m3_m3(), mul_m3_v3(), mul_qt_qtqt(), normal_tri_v3(), normalize_v3(), quat_to_mat3(), saacos(), si, sin(), and sub_v3_v3v3().
Referenced by face_duplilist(), make_bevel_list_3D_tangent(), ob_parvert3(), and set_crazy_vertex_quat().
void unit_axis_angle | ( | float | axis[3], |
float * | angle | ||
) |
Definition at line 41 of file math_rotation.c.
Referenced by add_only_object(), apply_armature_pose2bones_exec(), apply_objects_internal(), do_versions(), object_clear_rot(), pchan_clear_rot(), rest_pose(), and verify_pose_channel().
void unit_qt | ( | float | q[4] | ) |
Definition at line 50 of file math_rotation.c.
Referenced by add_metaball_element(), add_only_object(), apply_armature_pose2bones_exec(), apply_objects_internal(), axis_angle_to_quat(), cache_key_incremental_rotation(), do_versions(), object_clear_rot(), offset_child(), pchan_clear_rot(), psys_get_birth_coordinates(), psys_thread_create_path(), Quaternion_CreatePyObject(), Quaternion_identity(), repositionBone(), rest_pose(), vec_rot_to_quat(), and verify_pose_channel().
void vec_apply_track | ( | float | vec[3], |
short | axis | ||
) |
Definition at line 1648 of file math_rotation.c.
References assert, and copy_v3_v3().
Referenced by calc_curve_deform().
void vec_rot_to_mat3 | ( | float | mat[][3], |
const float | vec[3], | ||
const float | phi | ||
) |
void vec_rot_to_mat4 | ( | float | mat[][4], |
const float | vec[3], | ||
const float | phi | ||
) |
Definition at line 848 of file math_rotation.c.
References copy_m4_m3(), unit_m4(), and vec_rot_to_mat3().
void vec_rot_to_quat | ( | float * | quat, |
const float | vec[3], | ||
const float | phi | ||
) |
Definition at line 858 of file math_rotation.c.
References cos(), normalize_v3(), si, sin(), and unit_qt().
void vec_to_quat | ( | float | q[4], |
const float | vec[3], | ||
short | axis, | ||
const short | upflag | ||
) |
Definition at line 409 of file math_rotation.c.
References angle(), assert, KDL::atan2(), co, cos(), cosf, fabs(), mul_qt_qtqt(), normalize_v3(), quat_to_mat3(), saacos(), si, sin(), sinf, and sqrt().
Referenced by BKE_ptcache_make_particle_key(), calc_curve_deform(), followpath_get_tarmat(), make_bevel_list_3D_minimum_twist(), make_bevel_list_3D_zup(), make_bevel_list_segment_3D(), makeBevelList(), new_particle_duplilist(), ob_parcurve(), psys_get_birth_coordinates(), ptcache_particle_interpolate(), ptcache_particle_read(), Vector_to_track_quat(), and vertex_dupli__mapFunc().
RotOrderInfo rotOrders[] [static] |
{ {{0, 1, 2}, 0}, {{0, 2, 1}, 1}, {{1, 0, 2}, 1}, {{1, 2, 0}, 0}, {{2, 0, 1}, 0}, {{2, 1, 0}, 1} }
Definition at line 1153 of file math_rotation.c.