Blender V2.61 - r43446
|
Go to the source code of this file.
Classes | |
struct | DualQuat |
Defines | |
#define | RAD2DEG(_rad) ((_rad)*(180.0/M_PI)) |
#define | DEG2RAD(_deg) ((_deg)*(M_PI/180.0)) |
#define | RAD2DEGF(_rad) ((_rad)*(float)(180.0/M_PI)) |
#define | DEG2RADF(_deg) ((_deg)*(float)(M_PI/180.0)) |
Typedefs | |
typedef enum eEulerRotationOrders | eEulerRotationOrders |
typedef struct DualQuat | DualQuat |
Enumerations | |
enum | eEulerRotationOrders { EULER_ORDER_DEFAULT = 1, EULER_ORDER_XYZ = 1, EULER_ORDER_XZY, EULER_ORDER_YXZ, EULER_ORDER_YZX, EULER_ORDER_ZXY, EULER_ORDER_ZYX } |
Functions | |
void | unit_axis_angle (float axis[3], float *angle) |
void | unit_qt (float q[4]) |
void | copy_qt_qt (float q[4], const float a[4]) |
void | mul_qt_qtqt (float q[4], const float a[4], const float b[4]) |
void | mul_qt_v3 (const float q[4], float r[3]) |
void | mul_qt_fl (float q[4], const float f) |
void | mul_fac_qt_fl (float q[4], const float f) |
void | sub_qt_qtqt (float q[4], const float a[4], const float b[4]) |
void | invert_qt (float q[4]) |
void | invert_qt_qt (float q1[4], const float q2[4]) |
void | conjugate_qt (float q[4]) |
float | dot_qtqt (const float a[4], const float b[4]) |
float | normalize_qt (float q[4]) |
float | normalize_qt_qt (float q1[4], const float q2[4]) |
int | is_zero_qt (float q[4]) |
void | interp_qt_qtqt (float q[4], const float a[4], const float b[4], const float t) |
void | add_qt_qtqt (float q[4], const float a[4], const float b[4], const float t) |
void | quat_to_mat3 (float mat[3][3], const float q[4]) |
void | quat_to_mat4 (float mat[4][4], const float q[4]) |
void | mat3_to_quat (float q[4], float mat[3][3]) |
void | mat4_to_quat (float q[4], float mat[4][4]) |
void | tri_to_quat (float q[4], const float a[3], const float b[3], const float c[3]) |
void | vec_to_quat (float q[4], const float vec[3], short axis, const short upflag) |
void | rotation_between_vecs_to_quat (float q[4], const float v1[3], const float v2[3]) |
void | rotation_between_quats_to_quat (float q[4], const float q1[4], const float q2[4]) |
void | mat3_to_quat_is_ok (float q[4], float mat[3][3]) |
void | print_qt (const char *str, const float q[4]) |
void | axis_angle_to_quat (float r[4], const float axis[3], float angle) |
void | axis_angle_to_mat3 (float R[3][3], const float axis[3], const float angle) |
void | axis_angle_to_mat4 (float R[4][4], const float axis[3], const float angle) |
void | quat_to_axis_angle (float axis[3], float *angle, const float q[4]) |
void | mat3_to_axis_angle (float axis[3], float *angle, float M[3][3]) |
void | mat4_to_axis_angle (float axis[3], float *angle, float M[4][4]) |
void | single_axis_angle_to_mat3 (float R[3][3], const char axis, const float angle) |
void | vec_rot_to_quat (float quat[4], const float vec[3], const float phi) |
void | vec_rot_to_mat3 (float mat[3][3], const float vec[3], const float phi) |
void | vec_rot_to_mat4 (float mat[4][4], const float vec[3], const float phi) |
void | eul_to_quat (float quat[4], const float eul[3]) |
void | eul_to_mat3 (float mat[3][3], const float eul[3]) |
void | eul_to_mat4 (float mat[4][4], const float eul[3]) |
void | quat_to_eul (float eul[3], const float quat[4]) |
void | mat3_to_eul (float eul[3], float mat[3][3]) |
void | mat4_to_eul (float eul[3], float mat[4][4]) |
void | compatible_eul (float eul[3], const float old[3]) |
void | mat3_to_compatible_eul (float eul[3], const float old[3], float mat[3][3]) |
void | rotate_eul (float eul[3], const char axis, const float angle) |
void | eulO_to_quat (float quat[4], const float eul[3], const short order) |
void | eulO_to_mat3 (float mat[3][3], const float eul[3], const short order) |
void | eulO_to_mat4 (float mat[4][4], const float eul[3], const short order) |
void | eulO_to_axis_angle (float axis[3], float *angle, const float eul[3], const short order) |
void | eulO_to_gimbal_axis (float gmat[3][3], const float eul[3], const short order) |
void | quat_to_eulO (float eul[3], const short order, const float quat[4]) |
void | mat3_to_eulO (float eul[3], const short order, float mat[3][3]) |
void | mat4_to_eulO (float eul[3], const short order, float mat[4][4]) |
void | axis_angle_to_eulO (float eul[3], const short order, const float axis[3], const float angle) |
void | mat3_to_compatible_eulO (float eul[3], float old[3], short order, float mat[3][3]) |
void | mat4_to_compatible_eulO (float eul[3], float old[3], short order, float mat[4][4]) |
void | rotate_eulO (float eul[3], short order, char axis, float angle) |
void | copy_dq_dq (DualQuat *r, DualQuat *dq) |
void | normalize_dq (DualQuat *dq, float totw) |
void | add_weighted_dq_dq (DualQuat *r, DualQuat *dq, float weight) |
void | mul_v3m3_dq (float r[3], float R[3][3], DualQuat *dq) |
void | mat4_to_dquat (DualQuat *r, float base[4][4], float M[4][4]) |
void | dquat_to_mat4 (float R[4][4], DualQuat *dq) |
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 fov, float sensor) |
float | angle_wrap_rad (float angle) |
float | angle_wrap_deg (float angle) |
Definition in file BLI_math_rotation.h.
#define DEG2RAD | ( | _deg | ) | ((_deg)*(M_PI/180.0)) |
Definition at line 38 of file BLI_math_rotation.h.
Referenced by TransformReader::dae_rotate_to_mat4(), precalc_wipe_zone(), rna_def_mesh(), rna_def_modifier_bevel(), rna_def_modifier_edgesplit(), and rna_def_wipe().
#define DEG2RADF | ( | _deg | ) | ((_deg)*(float)(M_PI/180.0)) |
Definition at line 42 of file BLI_math_rotation.h.
Referenced by ANIM_unit_mapping_get_factor(), autosmooth(), BoneRoll(), KX_Dome::CreateMeshDome180(), def_cmp_chroma_matte(), def_cmp_dblur(), def_cmp_defocus(), def_cmp_glare(), do_transform(), do_versions_nodetree_convert_angle(), do_view3d_region_buttons(), draw_forcefield(), make_bevel_list_3D_minimum_twist(), makeBokeh(), node_composit_init_chroma_matte(), radial_control_modal(), render_new_particle_system(), Rotation(), streaks(), Tilt(), Trackball(), transform_evaluate(), ui_draw_but_VECTORSCOPE(), vectorscope_draw_target(), viewrotate_apply(), Warp(), and DocumentImporter::writeCamera().
#define RAD2DEG | ( | _rad | ) | ((_rad)*(180.0/M_PI)) |
Definition at line 37 of file BLI_math_rotation.h.
Referenced by buildNavMesh(), draw_uvs_stretch(), and flyApply_ndof().
#define RAD2DEGF | ( | _rad | ) | ((_rad)*(float)(180.0/M_PI)) |
Definition at line 41 of file BLI_math_rotation.h.
Referenced by actcon_get_tarmat(), ANIM_unit_mapping_get_factor(), axisProjection(), bevel_list_flip_tangents(), BoneRoll(), AnimationExporter::create_source_from_array(), draw_em_measure_stats(), draw_pose_dofs(), drawHelpline(), effector_falloff(), fix_bonelist_roll(), AnimationExporter::get_source_values(), laplacian_triangle_area(), measure_facepair(), CamerasExporter::operator()(), paint_draw_alpha_overlay(), psys_thread_create_path(), radial_control_modal(), radial_control_paint_cursor(), radial_control_paint_tex(), Rotation(), similar_edge_select__internal(), similar_face_select__internal(), similar_vert_select_exec(), sk_detectDeleteGesture(), sk_detectReverseGesture(), sk_detectTrimGesture(), test_manipulator_axis(), Tilt(), Trackball(), transform_evaluate(), v3d_posearmature_buts(), and Warp().
typedef enum eEulerRotationOrders eEulerRotationOrders |
enum eEulerRotationOrders |
EULER_ORDER_DEFAULT | |
EULER_ORDER_XYZ | |
EULER_ORDER_XZY | |
EULER_ORDER_YXZ | |
EULER_ORDER_YZX | |
EULER_ORDER_ZXY | |
EULER_ORDER_ZYX |
Definition at line 134 of file BLI_math_rotation.h.
void add_qt_qtqt | ( | float | q[4], |
const float | a[4], | ||
const float | b[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 | R[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 | R[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 | r[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 | old[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[4] | ) |
Referenced by invert_qt(), Quaternion_conjugate(), rotation_between_quats_to_quat(), and viewrotate_apply().
Definition at line 1613 of file math_rotation.c.
Referenced by b_bone_deform().
void copy_qt_qt | ( | float | q[4], |
const float | a[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 | a[4], |
const float | b[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 | R[4][4], |
DualQuat * | dq | ||
) |
void eul_to_mat3 | ( | float | mat[3][3], |
const float | eul[3] | ||
) |
Referenced by ED_object_new_primitive_matrix(), init_tex_mapping(), loc_eul_size_to_mat4(), and rotate_eul().
void eul_to_mat4 | ( | float | mat[4][4], |
const float | eul[3] | ||
) |
Referenced by drawRBpivot(), and envmap_transmatrix().
void eul_to_quat | ( | float | quat[4], |
const float | eul[3] | ||
) |
Referenced by do_view3d_region_buttons(), object_clear_rot(), pchan_clear_rot(), pose_bone_do_paste(), and protectedQuaternionBits().
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][3], |
const float | eul[3], | ||
const short | order | ||
) |
Referenced by gimbal_axis().
void eulO_to_mat3 | ( | float | mat[3][3], |
const float | eul[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 | mat[4][4], |
const float | eul[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 | quat[4], |
const float | eul[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 | fov, |
float | sensor | ||
) |
Definition at line 1696 of file math_rotation.c.
References tanf.
Referenced by DocumentImporter::writeCamera().
void interp_qt_qtqt | ( | float | q[4], |
const float | a[4], | ||
const float | b[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[4] | ) |
Referenced by axis_set_view(), dvar_eval_rotDiff(), invert_qt_qt(), object_mat3_to_rot(), and Quaternion_invert().
void invert_qt_qt | ( | float | q1[4], |
const float | q2[4] | ||
) |
Referenced by flyApply_ndof(), ndof_orbit_invoke(), ndof_pan_invoke(), smooth_view(), and viewrotate_apply().
int is_zero_qt | ( | float | q[4] | ) |
void mat3_to_axis_angle | ( | float | axis[3], |
float * | angle, | ||
float | M[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 | old[3], | ||
float | mat[3][3] | ||
) |
void mat3_to_compatible_eulO | ( | float | eul[3], |
float | old[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[3], |
float | mat[3][3] | ||
) |
Referenced by apply_armature_pose2bones_exec(), mat4_to_eul(), Matrix_to_euler(), quat_to_eul(), and rotate_eul().
void mat3_to_eulO | ( | float | eul[3], |
const short | order, | ||
float | mat[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().
void mat3_to_quat | ( | float | q[4], |
float | mat[3][3] | ||
) |
Referenced by apply_targetless_ik(), axis_set_view(), blend_m3_m3m3(), blend_m4_m4m4(), ElementRotation(), execute_posetree(), mat3_to_axis_angle(), mat3_to_eul2(), mat4_to_quat(), Matrix_decompose(), Matrix_to_quaternion(), object_mat3_to_rot(), obmat_to_viewmat(), pchan_mat3_to_rot(), and Quaternion_rotate().
void mat3_to_quat_is_ok | ( | float | q[4], |
float | mat[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 | M[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 | old[3], | ||
short | order, | ||
float | mat[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 * | r, |
float | base[4][4], | ||
float | M[4][4] | ||
) |
Referenced by armature_deform_verts(), and pchan_b_bone_defmats().
void mat4_to_eul | ( | float | eul[3], |
float | mat[4][4] | ||
) |
void mat4_to_eulO | ( | float | eul[3], |
const short | order, | ||
float | mat[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[4], |
float | mat[4][4] | ||
) |
Referenced by AnimationImporter::apply_matrix_curves(), constraintRotLim(), TransformBase::decompose(), dvar_eval_rotDiff(), ED_view3d_from_m4(), execute_posetree(), mat4_to_axis_angle(), mat4_to_dquat(), Matrix_to_quaternion(), psys_get_birth_coordinates(), and AnimationImporter::translate_animation_OLD().
void mul_fac_qt_fl | ( | float | q[4], |
const float | f | ||
) |
Referenced by game_blend_poses().
void mul_qt_fl | ( | float | q[4], |
const float | f | ||
) |
void mul_qt_qtqt | ( | float | q[4], |
const float | a[4], | ||
const float | b[4] | ||
) |
Referenced by axis_set_view(), basic_rotate(), bevel_list_apply_tilt(), bevel_list_smooth(), cache_key_incremental_rotation(), calc_curve_deform(), dvar_eval_rotDiff(), ElementRotation(), finalizeControl(), flyApply(), flyApply_ndof(), followpath_get_tarmat(), game_blend_poses(), make_bevel_list_3D_minimum_twist(), make_bevel_list_segment_3D(), mat3_to_quat_is_ok(), ndof_orbit_invoke(), ob_parcurve(), object_mat3_to_rot(), psys_get_birth_coordinates(), psys_thread_create_path(), quat_apply_track(), Quaternion_cross(), Quaternion_mul(), repositionBone(), rotation_between_quats_to_quat(), sub_qt_qtqt(), tri_to_quat(), vec_to_quat(), vieworbit_exec(), and viewrotate_apply().
void mul_qt_v3 | ( | const float | q[4], |
float | r[3] | ||
) |
Referenced by applyModifier(), axis_angle_to_gimbal_axis(), barycentric_transform(), bevel_list_smooth(), boid_body(), calc_curve_deform(), do_guides(), do_kink(), do_makeDispListCurveTypes(), do_physical_effector(), draw_particle(), draw_rotation_guide(), draw_view_axis(), drawnurb(), explodeMesh(), flyApply_ndof(), get_effector_data(), make_bevel_list_3D_minimum_twist(), ndof_orbit_invoke(), ndof_pan_invoke(), offset_child(), psys_get_dupli_path_transform(), psys_thread_create_path(), Quaternion_mul(), recalcData_view3d(), repositionControl(), rollBoneByQuat(), rollBoneByQuatAligned(), rollBoneByQuatJoint(), rule_average_speed(), smooth_view(), Vector_imul(), Vector_mul(), and viewrotate_apply().
void mul_v3m3_dq | ( | float | r[3], |
float | R[3][3], | ||
DualQuat * | dq | ||
) |
Referenced by armature_deform_verts().
void normalize_dq | ( | DualQuat * | dq, |
float | totw | ||
) |
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[4] | ) |
Referenced by axis_set_view(), barycentric_transform(), basic_rotate(), bevel_list_apply_tilt(), bevel_list_smooth(), BKE_rotMode_change_values(), calc_curve_deform(), calc_curvepath(), game_blend_poses(), joint_callback(), make_bevel_list_segment_3D(), mat3_to_quat(), normalize_qt_qt(), ob_parcurve(), pose_bone_do_paste(), psys_get_birth_coordinates(), Quaternion_normalize(), and viewrotate_apply().
float normalize_qt_qt | ( | float | q1[4], |
const float | q2[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[3], |
const float | quat[4] | ||
) |
void quat_to_eulO | ( | float | eul[3], |
const short | order, | ||
const float | quat[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 | mat[3][3], |
const float | q[4] | ||
) |
Referenced by apply_targetless_ik(), applyTranslation(), blend_m3_m3m3(), crazyspace_build_sculpt(), createTransEditVerts(), curve_deform_vector(), dupli_extrude_cursor(), execute_posetree(), face_duplilist(), joint_callback(), loc_quat_size_to_mat4(), make_prim(), mat3_to_eul2(), mathutils_any_to_rotmat(), ob_parvert3(), object_mat3_to_rot(), object_rot_to_mat3(), pchan_to_mat4(), quat_to_eul(), quat_to_eulO(), Quaternion_rotate(), Quaternion_to_euler(), Quaternion_to_matrix(), spin_mesh(), spin_nurb(), spotvolume(), tri_to_quat(), vec_to_quat(), vertex_dupli__mapFunc(), and viewrotate_apply().
void quat_to_mat4 | ( | float | mat[4][4], |
const float | q[4] | ||
) |
void rotate_eul | ( | float | eul[3], |
const char | axis, | ||
const float | angle | ||
) |
void rotate_eulO | ( | float | eul[3], |
short | order, | ||
char | axis, | ||
float | angle | ||
) |
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[4], |
const float | q1[4], | ||
const float | q2[4] | ||
) |
Referenced by Quaternion_rotation_difference().
void rotation_between_vecs_to_quat | ( | float | q[4], |
const float | v1[3], | ||
const float | v2[3] | ||
) |
void single_axis_angle_to_mat3 | ( | float | R[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 | a[4], | ||
const float | b[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 | q[4], |
const float | a[3], | ||
const float | b[3], | ||
const float | c[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][3], |
const float | vec[3], | ||
const float | phi | ||
) |
Referenced by applyRotation(), applyTrackball(), drawlamp(), Trackball(), vec_roll_to_mat3(), and vec_rot_to_mat4().
void vec_rot_to_mat4 | ( | float | mat[4][4], |
const float | vec[3], | ||
const float | phi | ||
) |
void vec_rot_to_quat | ( | float | quat[4], |
const float | vec[3], | ||
const float | phi | ||
) |
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().