Blender V4.3
#include <Eigen/Core>
#include <Eigen/Geometry>
#include <cmath>

Go to the source code of this file.

Functions

static bool FuzzyZero (double x)
 
static double Clamp (const double x, const double min, const double max)
 
static Eigen::Matrix3d CreateMatrix (double xx, double xy, double xz, double yx, double yy, double yz, double zx, double zy, double zz)
 
static Eigen::Matrix3d RotationMatrix (double sine, double cosine, int axis)
 
static Eigen::Matrix3d RotationMatrix (double angle, int axis)
 
static double EulerAngleFromMatrix (const Eigen::Matrix3d &R, int axis)
 
static double safe_acos (double f)
 
static Eigen::Vector3d normalize (const Eigen::Vector3d &v)
 
static double angle (const Eigen::Vector3d &v1, const Eigen::Vector3d &v2)
 
static double ComputeTwist (const Eigen::Matrix3d &R)
 
static Eigen::Matrix3d ComputeTwistMatrix (double tau)
 
static void RemoveTwist (Eigen::Matrix3d &R)
 
static Eigen::Vector3d SphericalRangeParameters (const Eigen::Matrix3d &R)
 
static Eigen::Matrix3d ComputeSwingMatrix (double ax, double az)
 
static Eigen::Vector3d MatrixToAxisAngle (const Eigen::Matrix3d &R)
 
static bool EllipseClamp (double &ax, double &az, double *amin, double *amax)
 

Variables

static const double IK_EPSILON = 1e-20
 

Function Documentation

◆ angle()

static double angle ( const Eigen::Vector3d & v1,
const Eigen::Vector3d & v2 )
inlinestatic

Definition at line 125 of file IK_Math.h.

References safe_acos(), and v2.

Referenced by angle_signed_on_axis_normalized_v3v3_v3(), angle_signed_on_axis_v3v3_v3(), applyNormalRotation(), applyRotationValue(), applyTrackballValue(), axis_angle_normalized_to_quat(), blender::math::AxisAngleBase< T, AngleT >::AxisAngleBase(), blender::math::AxisAngleBase< T, AngleT >::AxisAngleBase(), axisProjection(), basic_rotate(), Bend(), BLF_rotation(), BLI_convexhull_aabb_fit_points_2d(), BLI_dial_angle(), BLI_uvproject_from_camera(), BM_edge_calc_face_angle_signed_ex(), bm_edge_is_delimit(), bm_interior_face_group_calc_cost(), bm_vert_edge_face_angle(), boid_body(), bpy_bmedge_calc_face_angle(), bpy_bmedge_calc_face_angle_signed(), bpy_bmvert_calc_edge_angle(), btAtan2Fast(), btGetAngle(), build_emats_stack(), C_Matrix_Rotation(), cache_key_incremental_rotation(), blender::ed::sculpt_paint::calc_brush_local_mat(), calculate_autoscale_factor(), btTransformUtil::calculateVelocity(), btTransformUtil::calculateVelocityQuaternion(), camera_stereo3d_model_matrix(), check_zone(), clamp_angle(), clip_uv_transform_rotate(), blender::nodes::node_composite_movieclip_cc::MovieClipOperation::compute_stabilization_data(), computeBindWeights(), connection_node_mat(), blender::compositor::MovieClipNode::convert_to_operations(), convexhull_aabb_fit_hull_2d(), blender::nodes::node_geo_curve_primitive_arc_cc::create_arc_curve_from_points(), LightManager::device_update_lights(), do_guides(), dvar_eval_rotDiff(), edbm_dupli_extrude_cursor_invoke(), edbm_fill_grid_prepare(), blender::math::Euler3Base< T >::Euler3Base(), blender::math::EulerXYZBase< T >::EulerXYZBase(), blender::math::QuaternionBase< T >::expmap(), expmap_to_quat(), blender::geometry::extend_curves_curved(), flip_qt_qt(), blender::math::from_vector(), gearGL(), gearGL(), blender::nodes::node_fn_compare_cc::get_multi_function(), blender::nodes::node_geo_input_mesh_edge_angle_cc::SignedAngleFieldInput::get_varray_for_context(), getHingeAngle(), KDL::Rotation::GetRotAngle(), gizmo_bisect_prop_angle_get(), gizmo_ruler_draw(), gizmo_spin_prop_axis_angle_get(), blender::compositor::DirectionalBlurOperation::init_execution(), init_track_for_stabilization(), knifetool_draw_visible_angles(), large_rotation_limit(), make_bevel_list_2D(), make_bevel_list_3D_minimum_twist(), mat3_to_quat_legacy(), mid_v3_angle_weighted(), mid_v3_v3v3_angle_weighted(), MOD_solidify_extrude_modifyMesh(), MOD_solidify_nonmanifold_modifyMesh(), modify_mesh(), blender::ed::sculpt_paint::multiplane_scrape_preview_draw(), blender::ed::object::object_warp_transverts(), KDL::operator>>(), orthogonalize_stable(), blender::geometry::p_chart_fill_boundary(), blender::geometry::p_edge_boundary_angle(), blender::ed::sculpt_paint::paint_stroke_line_constrain(), pivotcon_evaluate(), py_blf_rotation(), quat_normalized_to_expmap(), Quaternion_angle_get(), Quaternion_angle_set(), Quaternion_axis_vector_set(), Quaternion_to_axis_angle(), regular_polygon_sample(), rotate_eul(), rotate_eulO(), rotation_between_vecs_to_quat(), RotationBetween(), Freestyle::Controller::setCreaseAngle(), Freestyle::FEdgeXDetector::setCreaseAngle(), blender::ed::object::shade_auto_smooth_exec(), blender::draw::overlay::ShapeCache::ShapeCache(), SIM_mass_spring_force_spring_angular(), snap_v2_angle(), snap_v3_angle_plane(), blender::draw::statvis_calc_sharp(), stencil_control_calculate(), svm_node_vector_rotate(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), testAngularLimitMotor(), transdata_elem_rotate(), transform_data_ext_rotate(), tri_to_quat_ex(), ui_but_pie_dir(), UI_fontstyle_draw_rotated(), ui_numedit_but_UNITVEC(), blender::geometry::UVMinimumEnclosingSquareFinder::update(), vec_to_quat(), blender::ed::sculpt_paint::vwpaint::view_angle_limits_init(), vieworbit_exec(), viewroll_exec(), viewrotate_apply(), viewrotate_apply_snap(), and walkApply().

◆ Clamp()

static double Clamp ( const double x,
const double min,
const double max )
inlinestatic

Definition at line 29 of file IK_Math.h.

References max, min, and x.

◆ ComputeSwingMatrix()

static Eigen::Matrix3d ComputeSwingMatrix ( double ax,
double az )
inlinestatic

Definition at line 181 of file IK_Math.h.

References sqrt().

Referenced by IK_QSphericalSegment::UpdateAngle(), and IK_QSwingSegment::UpdateAngle().

◆ ComputeTwist()

static double ComputeTwist ( const Eigen::Matrix3d & R)
inlinestatic

Definition at line 130 of file IK_Math.h.

References R.

Referenced by RemoveTwist(), and SphericalRangeParameters().

◆ ComputeTwistMatrix()

static Eigen::Matrix3d ComputeTwistMatrix ( double tau)
inlinestatic

◆ CreateMatrix()

static Eigen::Matrix3d CreateMatrix ( double xx,
double xy,
double xz,
double yx,
double yy,
double yz,
double zx,
double zy,
double zz )
inlinestatic

◆ EllipseClamp()

static bool EllipseClamp ( double & ax,
double & az,
double * amin,
double * amax )
inlinestatic

Definition at line 207 of file IK_Math.h.

References FuzzyZero(), sqrt(), x, and z().

Referenced by IK_QSphericalSegment::UpdateAngle(), and IK_QSwingSegment::UpdateAngle().

◆ EulerAngleFromMatrix()

static double EulerAngleFromMatrix ( const Eigen::Matrix3d & R,
int axis )
inlinestatic

Definition at line 75 of file IK_Math.h.

References IK_EPSILON, R, and sqrt().

◆ FuzzyZero()

◆ MatrixToAxisAngle()

static Eigen::Vector3d MatrixToAxisAngle ( const Eigen::Matrix3d & R)
inlinestatic

Definition at line 193 of file IK_Math.h.

References FuzzyZero(), l, R, and safe_acos().

Referenced by IK_QSphericalSegment::UpdateAngle(), and IK_QSwingSegment::UpdateAngle().

◆ normalize()

static Eigen::Vector3d normalize ( const Eigen::Vector3d & v)
inlinestatic

Definition at line 117 of file IK_Math.h.

References FuzzyZero(), len, and v.

◆ RemoveTwist()

static void RemoveTwist ( Eigen::Matrix3d & R)
inlinestatic

◆ RotationMatrix() [1/2]

static Eigen::Matrix3d RotationMatrix ( double angle,
int axis )
inlinestatic

Definition at line 70 of file IK_Math.h.

References cos(), and RotationMatrix().

◆ RotationMatrix() [2/2]

static Eigen::Matrix3d RotationMatrix ( double sine,
double cosine,
int axis )
inlinestatic

◆ safe_acos()

static double safe_acos ( double f)
inlinestatic

Definition at line 103 of file IK_Math.h.

References M_PI.

Referenced by angle(), and MatrixToAxisAngle().

◆ SphericalRangeParameters()

static Eigen::Vector3d SphericalRangeParameters ( const Eigen::Matrix3d & R)
inlinestatic

Definition at line 158 of file IK_Math.h.

References ComputeTwist(), fabs(), IK_EPSILON, R, and sqrt().

Referenced by IK_QSphericalSegment::UpdateAngle(), and IK_QSwingSegment::UpdateAngle().

Variable Documentation

◆ IK_EPSILON

const double IK_EPSILON = 1e-20
static

Definition at line 22 of file IK_Math.h.

Referenced by EulerAngleFromMatrix(), FuzzyZero(), and SphericalRangeParameters().