Blender
V3.3
|
Go to the source code of this file.
Macros | |
#define | SWAP_AXIS(a, b) |
Functions | |
void | interp_v2_v2v2 (float r[2], const float a[2], const float b[2], const float t) |
void | interp_v2_v2v2v2 (float r[2], const float a[2], const float b[2], const float c[2], const float t[3]) |
void | interp_v3_v3v3 (float r[3], const float a[3], const float b[3], const float t) |
void | interp_v4_v4v4 (float r[4], const float a[4], const float b[4], const float t) |
bool | interp_v3_v3v3_slerp (float target[3], const float a[3], const float b[3], const float t) |
bool | interp_v2_v2v2_slerp (float target[2], const float a[2], const float b[2], const float t) |
void | interp_v3_v3v3_slerp_safe (float target[3], const float a[3], const float b[3], const float t) |
void | interp_v2_v2v2_slerp_safe (float target[2], const float a[2], const float b[2], const float t) |
void | interp_v3_v3v3v3 (float p[3], const float v1[3], const float v2[3], const float v3[3], const float w[3]) |
void | interp_v3_v3v3v3v3 (float p[3], const float v1[3], const float v2[3], const float v3[3], const float v4[3], const float w[4]) |
void | interp_v4_v4v4v4 (float p[4], const float v1[4], const float v2[4], const float v3[4], const float w[3]) |
void | interp_v4_v4v4v4v4 (float p[4], const float v1[4], const float v2[4], const float v3[4], const float v4[4], const float w[4]) |
void | interp_v3_v3v3v3_uv (float p[3], const float v1[3], const float v2[3], const float v3[3], const float uv[2]) |
void | interp_v3_v3v3_uchar (uchar target[3], const uchar a[3], const uchar b[3], const float t) |
void | interp_v3_v3v3_char (char target[3], const char a[3], const char b[3], const float t) |
void | interp_v4_v4v4_uchar (uchar target[4], const uchar a[4], const uchar b[4], const float t) |
void | interp_v4_v4v4_char (char target[4], const char a[4], const char b[4], const float t) |
void | mid_v3_v3v3 (float r[3], const float a[3], const float b[3]) |
void | mid_v2_v2v2 (float r[2], const float a[2], const float b[2]) |
void | mid_v2_v2v2v2 (float v[2], const float v1[2], const float v2[2], const float v3[2]) |
void | mid_v3_v3v3v3 (float v[3], const float v1[3], const float v2[3], const float v3[3]) |
void | mid_v3_v3v3v3v3 (float v[3], const float v1[3], const float v2[3], const float v3[3], const float v4[3]) |
void | mid_v3_v3_array (float r[3], const float(*vec_arr)[3], const uint vec_arr_num) |
void | mid_v3_v3v3_angle_weighted (float r[3], const float a[3], const float b[3]) |
void | mid_v3_angle_weighted (float r[3]) |
void | flip_v4_v4v4 (float v[4], const float v1[4], const float v2[4]) |
void | flip_v3_v3v3 (float v[3], const float v1[3], const float v2[3]) |
void | flip_v2_v2v2 (float v[2], const float v1[2], const float v2[2]) |
bool | is_finite_v2 (const float v[2]) |
bool | is_finite_v3 (const float v[3]) |
bool | is_finite_v4 (const float v[4]) |
float | angle_v3v3v3 (const float a[3], const float b[3], const float c[3]) |
float | cos_v3v3v3 (const float p1[3], const float p2[3], const float p3[3]) |
float | angle_v3v3 (const float a[3], const float b[3]) |
float | angle_v2v2v2 (const float a[2], const float b[2], const float c[2]) |
float | cos_v2v2v2 (const float p1[2], const float p2[2], const float p3[2]) |
float | angle_v2v2 (const float a[2], const float b[2]) |
float | angle_signed_v2v2 (const float v1[2], const float v2[2]) |
float | angle_normalized_v3v3 (const float v1[3], const float v2[3]) |
float | angle_normalized_v2v2 (const float a[2], const float b[2]) |
float | angle_on_axis_v3v3_v3 (const float v1[3], const float v2[3], const float axis[3]) |
float | angle_signed_on_axis_v3v3_v3 (const float v1[3], const float v2[3], const float axis[3]) |
float | angle_on_axis_v3v3v3_v3 (const float v1[3], const float v2[3], const float v3[3], const float axis[3]) |
float | angle_signed_on_axis_v3v3v3_v3 (const float v1[3], const float v2[3], const float v3[3], const float axis[3]) |
void | angle_tri_v3 (float angles[3], const float v1[3], const float v2[3], const float v3[3]) |
void | angle_quad_v3 (float angles[4], const float v1[3], const float v2[3], const float v3[3], const float v4[3]) |
void | angle_poly_v3 (float *angles, const float *verts[3], int len) |
void | project_v2_v2v2 (float out[2], const float p[2], const float v_proj[2]) |
void | project_v3_v3v3 (float out[3], const float p[3], const float v_proj[3]) |
void | project_v3_v3v3_db (double out[3], const double p[3], const double v_proj[3]) |
void | project_v2_v2v2_normalized (float out[2], const float p[2], const float v_proj[2]) |
void | project_v3_v3v3_normalized (float out[3], const float p[3], const float v_proj[3]) |
void | project_plane_v3_v3v3 (float out[3], const float p[3], const float v_plane[3]) |
void | project_plane_v2_v2v2 (float out[2], const float p[2], const float v_plane[2]) |
void | project_plane_normalized_v3_v3v3 (float out[3], const float p[3], const float v_plane[3]) |
void | project_plane_normalized_v2_v2v2 (float out[2], const float p[2], const float v_plane[2]) |
void | project_v3_plane (float out[3], const float plane_no[3], const float plane_co[3]) |
void | bisect_v3_v3v3v3 (float r[3], const float a[3], const float b[3], const float c[3]) |
void | reflect_v3_v3v3 (float out[3], const float v[3], const float normal[3]) |
void | reflect_v3_v3v3_db (double out[3], const double v[3], const double normal[3]) |
void | ortho_basis_v3v3_v3 (float r_n1[3], float r_n2[3], const float n[3]) |
void | ortho_v3_v3 (float out[3], const float v[3]) |
void | ortho_v2_v2 (float out[2], const float v[2]) |
void | rotate_v2_v2fl (float r[2], const float p[2], const float angle) |
void | rotate_normalized_v3_v3v3fl (float out[3], const float p[3], const float axis[3], const float angle) |
void | rotate_v3_v3v3fl (float r[3], const float p[3], const float axis[3], const float angle) |
void | print_v2 (const char *str, const float v[2]) |
void | print_v3 (const char *str, const float v[3]) |
void | print_v4 (const char *str, const float v[4]) |
void | print_vn (const char *str, const float v[], const int n) |
void | minmax_v4v4_v4 (float min[4], float max[4], const float vec[4]) |
void | minmax_v3v3_v3 (float min[3], float max[3], const float vec[3]) |
void | minmax_v2v2_v2 (float min[2], float max[2], const float vec[2]) |
void | minmax_v3v3_v3_array (float r_min[3], float r_max[3], const float(*vec_arr)[3], int var_arr_num) |
void | dist_ensure_v3_v3fl (float v1[3], const float v2[3], const float dist) |
void | dist_ensure_v2_v2fl (float v1[2], const float v2[2], const float dist) |
void | axis_sort_v3 (const float axis_values[3], int r_axis_order[3]) |
MINLINE double | sqr_db (double f) |
double | dot_vn_vn (const float *array_src_a, const float *array_src_b, const int size) |
double | len_squared_vn (const float *array, const int size) |
float | normalize_vn_vn (float *array_tar, const float *array_src, const int size) |
float | normalize_vn (float *array_tar, const int size) |
void | range_vn_i (int *array_tar, const int size, const int start) |
void | range_vn_u (uint *array_tar, const int size, const uint start) |
void | range_vn_fl (float *array_tar, const int size, const float start, const float step) |
void | negate_vn (float *array_tar, const int size) |
void | negate_vn_vn (float *array_tar, const float *array_src, const int size) |
void | mul_vn_vn (float *array_tar, const float *array_src, const int size) |
void | mul_vn_vnvn (float *array_tar, const float *array_src_a, const float *array_src_b, const int size) |
void | mul_vn_fl (float *array_tar, const int size, const float f) |
void | mul_vn_vn_fl (float *array_tar, const float *array_src, const int size, const float f) |
void | add_vn_vn (float *array_tar, const float *array_src, const int size) |
void | add_vn_vnvn (float *array_tar, const float *array_src_a, const float *array_src_b, const int size) |
void | madd_vn_vn (float *array_tar, const float *array_src, const float f, const int size) |
void | madd_vn_vnvn (float *array_tar, const float *array_src_a, const float *array_src_b, const float f, const int size) |
void | sub_vn_vn (float *array_tar, const float *array_src, const int size) |
void | sub_vn_vnvn (float *array_tar, const float *array_src_a, const float *array_src_b, const int size) |
void | msub_vn_vn (float *array_tar, const float *array_src, const float f, const int size) |
void | msub_vn_vnvn (float *array_tar, const float *array_src_a, const float *array_src_b, const float f, const int size) |
void | interp_vn_vn (float *array_tar, const float *array_src, const float t, const int size) |
void | copy_vn_i (int *array_tar, const int size, const int val) |
void | copy_vn_short (short *array_tar, const int size, const short val) |
void | copy_vn_ushort (ushort *array_tar, const int size, const ushort val) |
void | copy_vn_uchar (uchar *array_tar, const int size, const uchar val) |
void | copy_vn_fl (float *array_tar, const int size, const float val) |
Cubic curve interpolation (bezier spline). | |
void | interp_v2_v2v2v2v2_cubic (float p[2], const float v1[2], const float v2[2], const float v3[2], const float v4[2], const float u) |
Double precision versions 'db'. | |
void | add_vn_vn_d (double *array_tar, const double *array_src, const int size) |
void | add_vn_vnvn_d (double *array_tar, const double *array_src_a, const double *array_src_b, const int size) |
void | mul_vn_db (double *array_tar, const int size, const double f) |
void | interp_v3_v3v3_db (double target[3], const double a[3], const double b[3], const double t) |
void | interp_v2_v2v2_db (double target[2], const double a[2], const double b[2], const double t) |
#define SWAP_AXIS | ( | a, | |
b | |||
) |
Definition at line 1112 of file math_vector.c.
Referenced by Color_iadd(), and Vector_iadd().
Definition at line 1272 of file math_vector.c.
Referenced by BLI_quadric_add_qu_qu().
void add_vn_vnvn | ( | float * | array_tar, |
const float * | array_src_a, | ||
const float * | array_src_b, | ||
const int | size | ||
) |
Definition at line 1122 of file math_vector.c.
References size().
Referenced by Color_add(), Matrix_add(), and Vector_add().
void add_vn_vnvn_d | ( | double * | array_tar, |
const double * | array_src_a, | ||
const double * | array_src_b, | ||
const int | size | ||
) |
Definition at line 1282 of file math_vector.c.
References size().
Referenced by BLI_quadric_add_qu_ququ().
Definition at line 461 of file math_vector.c.
References Freestyle::a, usdtokens::b(), BLI_ASSERT_UNIT_V2, dot_v2v2(), len_v2v2(), M_PI, negate_v2_v2(), and saasin().
Referenced by angle_v2v2(), angle_v2v2v2(), computeBindWeights(), edbm_rip_edge_invoke(), blender::draw::edituv_get_edituv_stretch_angle(), and InputAngle().
Definition at line 445 of file math_vector.c.
References BLI_ASSERT_UNIT_V3, dot_v3v3(), len_v3v3(), M_PI, negate_v3_v3(), saasin(), v1, and v2.
Referenced by angle_poly_v3(), angle_quad_v3(), angle_tri_v3(), angle_v3v3(), angle_v3v3v3(), bevel_list_flip_tangents(), bevel_list_smooth(), BKE_gpencil_stroke_stretch(), BKE_mesh_calc_poly_angles(), BM_edge_calc_face_angle_ex(), BM_edge_calc_face_angle_signed_ex(), BM_edge_calc_face_angle_with_imat3_ex(), bm_edge_calc_rotate_beauty__angle(), bm_edge_is_delimit(), bm_edgering_pair_interpolate(), bm_interior_face_group_calc_cost(), build_emats_stack(), calc_solidify_normals(), blender::bke::curves::poly::calculate_next_normal(), calculate_next_normal(), computeBindWeights(), connection_node_mat(), curve_nurb_select_similar_type(), DRW_text_edit_mesh_measure_stats(), edbm_dupli_extrude_cursor_invoke(), edge_face_angle(), blender::draw::edituv_get_edituv_stretch_angle(), blender::nodes::node_geo_input_mesh_edge_angle_cc::AngleFieldInput::get_varray_for_context(), blender::nodes::node_geo_input_mesh_edge_angle_cc::SignedAngleFieldInput::get_varray_for_context(), gizmo_ruler_draw(), knifetool_draw_angle(), make_bevel_list_3D_minimum_twist(), map_to_plane_v2_v3v3(), mball_select_similar_type(), mesh_calc_hq_normal(), minimum_twist_between_two_points(), MOD_solidify_extrude_modifyMesh(), offset_meet_edge(), pipe_test(), point_between_edges(), quad_calc_error(), rotation_between_vecs_to_quat(), similar_edge_select_exec(), similar_face_select_exec(), similar_vert_select_exec(), blender::draw::statvis_calc_distort(), blender::draw::statvis_calc_overhang(), blender::draw::statvis_calc_sharp(), viewrotate_apply(), and viewrotate_apply_snap().
Angle between 2 vectors, about an axis (axis can be considered a plane).
Definition at line 477 of file math_vector.c.
References angle_v3v3(), project_plane_normalized_v3_v3v3(), v1, and v2.
Referenced by angle_on_axis_v3v3v3_v3(), and deformStroke().
float angle_on_axis_v3v3v3_v3 | ( | const float | v1[3], |
const float | v2[3], | ||
const float | v3[3], | ||
const float | axis[3] | ||
) |
Angle between 2 vectors defined by 3 coords, about an axis (axis can be considered a plane).
Definition at line 508 of file math_vector.c.
References angle_on_axis_v3v3_v3(), sub_v3_v3v3(), v1, and v2.
Referenced by BM_mesh_wireframe().
Definition at line 573 of file math_vector.c.
References angle_normalized_v3v3(), float(), len, M_PI, normalize_v3(), sub_v3_v3v3(), and verts.
Referenced by solidify_add_thickness().
void angle_quad_v3 | ( | float | angles[4], |
const float | v1[3], | ||
const float | v2[3], | ||
const float | v3[3], | ||
const float | v4[3] | ||
) |
Definition at line 552 of file math_vector.c.
References angle_normalized_v3v3(), float(), M_PI, normalize_v3(), sub_v3_v3v3(), v1, and v2.
Definition at line 488 of file math_vector.c.
References angle(), angle_v3v3(), cross_v3_v3v3(), dot_v3v3(), float(), M_PI, project_plane_normalized_v3_v3v3(), v1, and v2.
Referenced by angle_signed_on_axis_v3v3v3_v3(), blender::bke::curves::poly::calculate_normals_minimum(), calculate_normals_minimum(), blender::nodes::node_geo_curve_primitive_arc_cc::create_arc_curve_from_points(), dial_ghostarc_get_angles(), ED_view3d_cursor3d_update(), gizmo_bisect_prop_angle_get(), gizmo_bisect_prop_angle_set(), gizmo_spin_prop_axis_angle_get(), gizmo_spin_prop_axis_angle_set(), MOD_solidify_extrude_modifyMesh(), and snap_v3_angle_plane().
float angle_signed_on_axis_v3v3v3_v3 | ( | const float | v1[3], |
const float | v2[3], | ||
const float | v3[3], | ||
const float | axis[3] | ||
) |
Definition at line 521 of file math_vector.c.
References angle_signed_on_axis_v3v3_v3(), sub_v3_v3v3(), v1, and v2.
Referenced by bm_face_split_edgenet_find_loop_walk(), BM_verts_sort_radial_plane(), and edbm_face_split_by_edges_exec().
Definition at line 439 of file math_vector.c.
References atan2f, dot_v2v2(), v1, and v2.
Referenced by computeBindWeights(), gpencil_calc_points_factor(), gpencil_uv_transform_calc(), slide_marker_modal(), snap_v2_angle(), Vector_angle_signed(), and wm_gesture_straightline_do_angle_snap().
Definition at line 534 of file math_vector.c.
References angle_normalized_v3v3(), float(), M_PI, normalize_v3(), sub_v3_v3v3(), v1, and v2.
Return the shortest angle in radians between the 2 vectors.
Definition at line 423 of file math_vector.c.
References Freestyle::a, angle_normalized_v2v2(), usdtokens::b(), and normalize_v2().
Referenced by bezt_edge_handle_angle(), BKE_mask_spline_project_co(), bm_loop_calc_uv_angle_from_dir(), get_updated_data_for_edge(), gpencil_add_arc_points(), gpencil_brush_jitter(), gpencil_sculpt_rotation_eval_get(), gpencil_stroke_need_flip(), and uv_rip_pairs_calc_uv_angle().
Definition at line 395 of file math_vector.c.
References Freestyle::a, angle_normalized_v2v2(), usdtokens::b(), Freestyle::c, and normalize_v2().
Referenced by gpencil_add_guide_points(), MOD_lineart_chain_split_angle(), and p_vec2_angle().
Return the shortest angle in radians between the 2 vectors.
Definition at line 385 of file math_vector.c.
References Freestyle::a, angle_normalized_v3v3(), usdtokens::b(), and normalize_v3_v3().
Referenced by angle_on_axis_v3v3_v3(), angle_signed_on_axis_v3v3_v3(), axisProjection(), bevel_vert_construct(), blender::geometry::calculate_angles(), ED_armature_ebone_roll_to_vector(), blender::nodes::node_fn_compare_cc::get_multi_function(), gpencil_next_edge(), make_unit_square_map(), mix_normals(), modifyMesh(), nearly_parallel(), offset_meet(), SCULPT_do_multiplane_scrape_brush(), select_similar_direction(), similar_face_select_exec(), and viewrotate_apply_snap().
Return the angle in radians between vecs 1-2 and 2-3 in radians If v1 is a shoulder, v2 is the elbow and v3 is the hand, this would return the angle at the elbow.
note that when v1/v2/v3 represent 3 points along a straight line that the angle returned will be pi (180deg), rather than 0.0.
Definition at line 361 of file math_vector.c.
References Freestyle::a, angle_normalized_v3v3(), usdtokens::b(), Freestyle::c, normalize_v3(), and sub_v3_v3v3().
Referenced by BM_loop_calc_face_angle(), BM_vert_calc_edge_angle_ex(), DRW_text_edit_mesh_measure_stats(), edbm_fill_grid_vert_tag_angle(), geometry_collide_offset(), knifetool_draw_visible_angles(), laplacian_triangle_area(), p_vec_angle(), ruler_item_as_string(), square_out_adj_vmesh(), stroke_march_next_point_no_interp(), tc_mesh_customdatacorrect_init_vert(), and VoronoiVertexWeight::VoronoiVertexWeight().
Definition at line 939 of file math_vector.c.
References copy_v3_v3(), SWAP_AXIS, and v.
Referenced by bm_vert_tri_find_unique_edge(), draw_view_axis(), and splineik_evaluate_bone().
Returns a vector bisecting the angle at b formed by a, b and c.
Definition at line 680 of file math_vector.c.
References Freestyle::a, add_v3_v3v3(), usdtokens::b(), Freestyle::c, normalize_v3(), r, and sub_v3_v3v3().
Referenced by bevel_list_calc_bisect(), bm_edgering_pair_interpolate(), and make_bevel_list_2D().
Definition at line 1259 of file math_vector.c.
References size().
Referenced by bicubic_interpolation(), bilinear_interpolation(), BKE_defvert_extract_vgroup_to_edgeweights(), BKE_defvert_extract_vgroup_to_loopweights(), BKE_defvert_extract_vgroup_to_polyweights(), BKE_defvert_extract_vgroup_to_vertweights(), BKE_mesh_normals_loop_to_vertex(), BKE_mesh_remap_calc_edges_from_mesh(), BKE_mesh_remap_calc_polys_from_mesh(), BLI_astar_graph_solve(), blo_do_versions_260(), BM_mesh_calc_path_edge(), BM_mesh_calc_path_face(), BM_mesh_calc_path_uv_edge(), BM_mesh_calc_path_uv_face(), BM_mesh_calc_path_uv_vert(), BM_mesh_calc_path_vert(), BM_vert_loop_groups_data_layer_create(), C_Vector_Fill(), calcEdgeSlide_mval_range(), correct_uv_aspect_per_face(), CustomData_bmesh_interp(), CustomData_interp(), imb_read_tiff_pixels(), initNumInput(), Matrix_zero(), MOD_solidify_extrude_modifyMesh(), normalize_vn_vn(), blender::compositor::MemoryBuffer::read_bilinear(), smooth_verts(), blender::draw::statvis_calc_sharp(), blender::draw::statvis_calc_thickness(), v3d_editvertex_buts(), Vector_CreatePyObject(), Vector_length_set(), Vector_new(), Vector_resize(), Vector_resized(), Vector_zero(), and vpaint_proj_dm_map_cosnos_update().
void copy_vn_i | ( | int * | array_tar, |
const int | size, | ||
const int | val | ||
) |
Definition at line 1223 of file math_vector.c.
References size().
Referenced by arrayModifier_doArray(), BKE_mesh_new_nomain(), BM_face_split_edgenet_connect_islands(), BM_mesh_decimate_dissolve_ex(), BM_uv_element_map_create(), CustomData_reset(), DM_init(), filelist_cache_clear(), filelist_cache_init(), initNumInput(), layerDefault_origindex(), mesh_calc_path_region_elem(), mesh_merge_transform(), mesh_remove_doubles_on_axis(), MOD_solidify_extrude_modifyMesh(), sequencer_select_side_exec(), skin_set_orig_indices(), and transform_convert_mesh_islands_calc().
void copy_vn_short | ( | short * | array_tar, |
const int | size, | ||
const short | val | ||
) |
Definition at line 1250 of file math_vector.c.
References size().
Referenced by bicubic_interpolation(), and bilinear_interpolation().
Definition at line 1241 of file math_vector.c.
References size().
Referenced by imb_read_tiff_pixels().
Quicker than full angle computation.
Definition at line 411 of file math_vector.c.
References dot_v2v2(), normalize_v2(), and sub_v2_v2v2().
Referenced by get_updated_data_for_edge(), and scanfill().
Quicker than full angle computation.
Definition at line 373 of file math_vector.c.
References dot_v3v3(), normalize_v3(), and sub_v3_v3v3().
Referenced by bm_vert_collapse_is_degenerate().
Definition at line 928 of file math_vector.c.
References equals_v2v2(), madd_v2_v2v2fl(), nor, normalize_v2(), sub_v2_v2v2(), v1, and v2.
Referenced by BKE_mask_calc_handle_adjacent_interp(), BKE_mask_calc_handle_point_auto(), gpencil_snap_to_guide(), mask_spline_feather_differentiated_points_with_resolution__double(), and ui_numedit_but_HSVCIRCLE().
ensure v1 is dist from v2
Definition at line 917 of file math_vector.c.
References equals_v3v3(), madd_v3_v3v3fl(), nor, normalize_v3(), sub_v3_v3v3(), v1, and v2.
Referenced by Bend(), BKE_nurbList_handles_recalculate(), and brush_puff().
Follow fixed length vector function conventions.
Definition at line 978 of file math_vector.c.
References double(), and size().
Referenced by Vector_dot(), Vector_length_get(), Vector_length_set(), Vector_length_squared_get(), Vector_matmul(), and Vector_slerp().
Definition at line 336 of file math_vector.c.
Definition at line 329 of file math_vector.c.
Equivalent to: interp_v3_v3v3(v, v1, v2, -1.0f);
Definition at line 321 of file math_vector.c.
Definition at line 14 of file math_vector.c.
References Freestyle::a, usdtokens::b(), r, and t.
Referenced by annotation_add_missing_events(), annotation_draw_apply(), annotation_smooth_buffer(), BKE_fcurve_bezt_subdivide_handles(), BKE_tracking_marker_get_interpolated(), BKE_tracking_marker_get_subframe_position(), BKE_tracking_plane_marker_get_subframe_corners(), BKE_tracking_tracks_join(), edbm_rip_edgedist_squared(), find_nearest_edge__doClosest(), gpencil_add_arc_points(), gpencil_add_guide_points(), gpencil_calc_factor(), gpencil_draw_apply(), gpencil_primitive_line(), gpencil_primitive_rectangle(), gpencil_primitive_update_cps(), gpencil_smooth_buffer(), gpencil_smooth_segment(), insert_point_to_segment(), interp_v2_v2v2v2v2_cubic(), interpolate_averaged_track_contributions(), layerCopyValue_mloopuv(), paint_smooth_stroke(), project_paint_face_init(), resolve_quad_uv_v2_deriv(), slide_spline_curvature_modal(), stroke_elem_interp(), stroke_march_next_point(), track_plane_from_existing_motion(), and uv_warp_compute().
Definition at line 1314 of file math_vector.c.
References Freestyle::a, usdtokens::b(), and t.
Referenced by lineart_edge_first_bounding_area().
Definition at line 70 of file math_vector.c.
References Freestyle::a, usdtokens::b(), BLI_ASSERT_UNIT_V2, dot_v2v2(), interp_dot_slerp(), t, UNLIKELY, and w().
Referenced by interp_v2_v2v2_slerp_safe().
void interp_v2_v2v2_slerp_safe | ( | float | target[2], |
const float | a[2], | ||
const float | b[2], | ||
const float | t | ||
) |
Definition at line 113 of file math_vector.c.
References Freestyle::a, usdtokens::b(), BLI_assert, copy_v2_v2(), interp_v2_v2v2_slerp(), ortho_v2_v2(), t, and UNLIKELY.
void interp_v2_v2v2v2 | ( | float | r[2], |
const float | a[2], | ||
const float | b[2], | ||
const float | c[2], | ||
const float | t[3] | ||
) |
Weight 3 2D vectors, 'w' must be unit length but is not a vector, just 3 weights.
Definition at line 22 of file math_vector.c.
References Freestyle::a, usdtokens::b(), Freestyle::c, r, and t.
Referenced by project_bucket_clip_face(), project_face_pixel(), project_paint_PickColor(), rect_to_uvspace_ortho(), and rect_to_uvspace_persp().
void interp_v2_v2v2v2v2_cubic | ( | float | p[2], |
const float | v1[2], | ||
const float | v2[2], | ||
const float | v3[2], | ||
const float | v4[2], | ||
const float | u | ||
) |
Definition at line 139 of file math_vector.c.
References interp_v2_v2v2(), q1, v1, and v2.
Referenced by add_bezier(), BKE_mask_point_segment_co(), gpencil_primitive_bezier(), and wm_xr_navigation_fly_modal().
Definition at line 29 of file math_vector.c.
References Freestyle::a, usdtokens::b(), r, and t.
Referenced by add_interp_verts_copy_edges_to_new_mesh(), alter_co(), apply_stroke_envelope(), BKE_gpencil_stroke_close(), BKE_gpencil_stroke_shrink(), BKE_gpencil_stroke_smooth_point(), BKE_gpencil_stroke_stretch(), BKE_gpencil_stroke_subdivide(), BKE_gpencil_stroke_uniform_subdivide(), BKE_lattice_deform_data_eval_co(), BKE_mesh_remap_calc_edges_from_mesh(), BKE_subdiv_mesh_interpolate_position_on_edge(), blend_m3_m3m3(), blend_m4_m4m4(), bm_bridge_splice_loops(), bm_decim_edge_collapse(), bm_edgering_pair_interpolate(), bm_face_split_edge_find(), bm_grid_fill_array(), bm_isect_tri_tri(), bm_subdivide_edge_addvert(), bmo_planar_faces_exec(), bmo_smooth_vert_exec(), boid_find_ground(), bone_locked_color_shade(), brush_average_apply(), brush_blur_apply(), brush_smear_apply(), brush_tint_apply(), calc_min_radius_v3v3(), calculate_new_bezier_point(), calculate_profile_segments(), blender::nodes::node_shader_curves_cc::CurveVecFunction::call(), blender::nodes::node_shader_curves_cc::CurveRGBFunction::call(), cloth_calc_average_acceleration(), cloth_calc_force(), cloth_collision_response_static(), cloth_continuum_step(), collision_move_object(), collision_newton_rhapson(), collision_response(), compute_collision_point_edge_tri(), constraint_target_to_mat4(), converge(), createEdgeSlideVerts_single_side(), deformStroke(), dist_squared_ray_to_seg_v3(), distlimit_evaluate(), do_clay_thumb_brush_task_cb_ex(), do_clump_level(), do_displacement_smear_brush_task_cb_ex(), do_guides(), do_kink(), do_kink_spiral(), doVertSlide(), draw_frustum_bound_sphere_calc(), DRW_text_edit_mesh_measure_stats(), duplicateStroke(), ED_gpencil_select_stroke_segment(), edbm_blend_from_shape_exec(), evaluate_cubic_bezier(), blender::compositor::ColorCurveOperation::execute_pixel_sampled(), blender::compositor::ConstantLevelColorCurveOperation::execute_pixel_sampled(), find_nearest_edge__doClosest(), flyApply(), generate_semi_circle_from_point_to_point(), get_bezier_interpolated_point(), get_bone_solid_with_consts_color(), gizmo_ruler_invoke(), gpencil_add_new_points(), GPENCIL_draw_scene(), gpencil_draw_strokes(), gpencil_hook_co_apply(), gpencil_interpolate_update_points(), gpencil_stroke_perimeter_ex(), gpencil_stroke_subdivide(), gpencil_stroke_to_bezier(), gpencil_stroke_to_path(), gpencil_subdivide_stroke(), graph_refresh_fcurve_colors(), hook_co_apply(), interp_line_v3_v3v3v3(), interp_m3_m3m3(), interp_m4_m4m4(), interp_slerp_co_no_v3(), interpolate_pathcache(), isect_tri_tri_v3_ex(), knife_find_closest_edge_of_face(), knife_interp_v3_v3v3(), limit_dist_v3(), lineart_chain_create_crossing_point(), loop_interp_multires_cb(), mesh_symmetry_snap_exec(), meshcache_do(), minter_v3_v3v3v3_ref(), mixColors(), blender::ed::space_node::node_draw_link_bezier(), offset_on_edge_between(), pipe_adj_vmesh(), position_tail_on_spline(), blender::io::gpencil::GpencilIO::prepare_stroke_export_colors(), project_paint_face_init(), psys_cache_edit_paths_iter(), ptcache_rigidbody_interpolate(), blender::io::alembic::read_mverts_interp(), rotateBevelPiece(), sculpt_rake_data_update(), shrinkwrap_calc_nearest_surface_point_cb_ex(), shrinkwrap_calc_nearest_vertex_cb_ex(), shrinkwrap_calc_normal_projection_cb_ex(), shrinkwrap_get_tarmat(), shrinkwrap_snap_with_side(), SIM_cloth_solve(), SIM_hair_volume_add_segment(), SIM_hair_volume_grid_velocity(), SIM_hair_volume_solve_divergence(), skin_smooth_hulls(), snap_mesh_edge_verts_mixed(), splineik_evaluate_bone(), square_out_adj_vmesh(), state_calc_co_pair(), stroke_elem_interp(), stroke_march_next_point(), stroke_march_next_point_no_interp(), subdivide_base(), subdividenurb(), target_project_edge(), test_projected_edge_dist(), track_channel_color(), transdata_elem_bend(), transform_point_by_seg_v3(), tri_v3_scale(), ui_draw_but_CURVE(), ui_draw_but_CURVEPROFILE(), blender::compositor::ColorCurveOperation::update_memory_buffer_partial(), blender::compositor::ConstantLevelColorCurveOperation::update_memory_buffer_partial(), view3d_preselect_mesh_edgering_update_edges_from_edge(), view3d_preselect_mesh_edgering_update_verts_from_edge(), view3d_smoothview_apply_ex(), viewrotate_apply(), warpModifier_do(), and WIDGETGROUP_xform_shear_setup().
Definition at line 218 of file math_vector.c.
References Freestyle::a, usdtokens::b(), interp_v3_v3v3_uchar(), and t.
Definition at line 1305 of file math_vector.c.
References Freestyle::a, usdtokens::b(), and t.
Referenced by lineart_do_closest_segment(), lineart_shadow_cast_onto_triangle(), lineart_shadow_create_shadow_edge_array(), lineart_shadow_register_enclosed_shapes(), lineart_shadow_segment_slice_get(), lineart_triangle_2v_intersection_math(), lineart_triangle_cull_single(), lineart_triangle_edge_image_space_occlusion(), and MOD_lineart_chain_feature_lines().
slerp, treat vectors as spherical coordinates
Definition at line 48 of file math_vector.c.
References Freestyle::a, usdtokens::b(), BLI_ASSERT_UNIT_V3, dot_v3v3(), interp_dot_slerp(), t, UNLIKELY, and w().
Referenced by interp_slerp_co_no_v3(), and interp_v3_v3v3_slerp_safe().
Same as interp_v3_v3v3_slerp but uses fallback values for opposite vectors.
Definition at line 92 of file math_vector.c.
References Freestyle::a, usdtokens::b(), BLI_assert, copy_v3_v3(), interp_v3_v3v3_slerp(), normalize_v3(), ortho_v3_v3(), t, and UNLIKELY.
Referenced by BKE_mesh_remap_calc_edges_from_mesh(), layerCopyValue_normal(), mix_normals(), and object_rand_transverts().
Definition at line 210 of file math_vector.c.
References Freestyle::a, usdtokens::b(), floorf, and t.
Referenced by interp_v3_v3v3_char(), and widget_tab().
void interp_v3_v3v3v3 | ( | float | p[3], |
const float | v1[3], | ||
const float | v2[3], | ||
const float | v3[3], | ||
const float | w[3] | ||
) |
Weight 3 vectors, 'w' must be unit length but is not a vector, just 3 weights.
Definition at line 160 of file math_vector.c.
Referenced by BKE_shrinkwrap_compute_smooth_normal(), dynamic_paint_generate_bake_data_cb(), dynamic_paint_paint_mesh_cell_point_cb_ex(), dynamic_paint_set_init_color_tex_to_imseq_cb(), project_paint_face_init(), project_paint_occlude_ptv_clip(), project_paint_op(), psys_interpolate_face(), blender::nodes::node_geo_distribute_points_on_faces_cc::sample_mesh_surface(), screen_px_from_ortho(), screen_px_from_persp(), target_project_solve_point_tri(), target_project_tri_deviation(), and transform_point_by_tri_v3().
void interp_v3_v3v3v3_uv | ( | float | p[3], |
const float | v1[3], | ||
const float | v2[3], | ||
const float | v3[3], | ||
const float | uv[2] | ||
) |
Definition at line 202 of file math_vector.c.
Referenced by bmbvh_ray_cast_handle_hit(), knife_bvh_raycast(), knife_bvh_raycast_filter(), knife_ray_intersect_face(), and blender::draw::statvis_calc_thickness().
void interp_v3_v3v3v3v3 | ( | float | p[3], |
const float | v1[3], | ||
const float | v2[3], | ||
const float | v3[3], | ||
const float | v4[3], | ||
const float | w[4] | ||
) |
Weight 3 vectors, 'w' must be unit length but is not a vector, just 4 weights.
Definition at line 168 of file math_vector.c.
Referenced by BKE_subdiv_mesh_interpolate_position_on_edge(), BKE_where_on_path(), psys_interpolate_face(), psys_interpolate_particle(), and psys_thread_create_path().
Definition at line 38 of file math_vector.c.
References Freestyle::a, usdtokens::b(), r, and t.
Referenced by BKE_gpencil_stroke_close(), BKE_gpencil_stroke_subdivide(), BKE_gpencil_stroke_uniform_subdivide(), color_filter_task_cb(), DRW_globals_update(), drw_shgroup_bone_envelope(), blender::compositor::DespeckleOperation::execute_pixel(), blender::compositor::VariableSizeBokehBlurOperation::execute_pixel(), blender::compositor::ZCombineMaskOperation::execute_pixel_sampled(), gizmo_axis_draw(), gpencil_add_arc_points(), gpencil_editcurve_subdivide_curve_segment(), gpencil_interpolate_v4_from_to(), gpencil_stroke_subdivide(), gpencil_subdivide_stroke(), OVERLAY_grid_cache_init(), psys_thread_create_path(), sculpt_color_presmooth_init(), setkeys(), stroke_march_next_point(), subdividenurb(), blender::compositor::DespeckleOperation::update_memory_buffer_partial(), blender::compositor::VariableSizeBokehBlurOperation::update_memory_buffer_partial(), blender::compositor::ZCombineMaskOperation::update_memory_buffer_partial(), and update_reports_display_invoke().
Definition at line 232 of file math_vector.c.
References Freestyle::a, usdtokens::b(), interp_v4_v4v4_uchar(), and t.
Definition at line 223 of file math_vector.c.
References Freestyle::a, usdtokens::b(), floorf, and t.
Referenced by interp_v4_v4v4_char().
void interp_v4_v4v4v4 | ( | float | p[4], |
const float | v1[4], | ||
const float | v2[4], | ||
const float | v3[4], | ||
const float | w[3] | ||
) |
Definition at line 180 of file math_vector.c.
Referenced by dynamic_paint_set_init_color_vcol_to_imseq_cb(), and blender::attribute_math::mix3().
void interp_v4_v4v4v4v4 | ( | float | p[4], |
const float | v1[4], | ||
const float | v2[4], | ||
const float | v3[4], | ||
const float | v4[4], | ||
const float | w[4] | ||
) |
Definition at line 189 of file math_vector.c.
Definition at line 1210 of file math_vector.c.
References size(), src, and t.
Referenced by meshcache_do(), and Vector_lerp().
Definition at line 344 of file math_vector.c.
References CCL_NAMESPACE_BEGIN::isfinite(), and v.
Referenced by accumulate_marker(), and layerValidate_mloopuv().
Definition at line 349 of file math_vector.c.
References CCL_NAMESPACE_BEGIN::isfinite(), and v.
Referenced by barycentric_coords_v2(), barycentric_weights(), barycentric_weights_v2(), barycentric_weights_v2_clamped(), barycentric_weights_v2_persp(), BKE_mesh_center_of_surface(), BKE_mesh_center_of_volume(), and GPU_matrix_unproject_3fv().
Definition at line 354 of file math_vector.c.
References CCL_NAMESPACE_BEGIN::isfinite(), and v.
Referenced by barycentric_weights_v2_quad(), and SCULPT_do_paint_brush().
Definition at line 990 of file math_vector.c.
References size(), and sqr_db().
Referenced by normalize_vn_vn(), and Vector_richcmpr().
Definition at line 1136 of file math_vector.c.
void madd_vn_vnvn | ( | float * | array_tar, |
const float * | array_src_a, | ||
const float * | array_src_b, | ||
const float | f, | ||
const int | size | ||
) |
Definition at line 1146 of file math_vector.c.
References size().
Definition at line 244 of file math_vector.c.
References Freestyle::a, usdtokens::b(), and r.
Referenced by BM_face_splits_check_legal(), computeBindWeights(), ED_uvedit_center_multi(), edgetag_cut_cost_face_uv(), facetag_cut_cost_edge_uv(), find_nearest_edge__doClosest(), find_nearest_edge_center__doZBuf(), GEO_uv_parametrizer_average(), gizmo2d_calc_bounds(), gizmo_ruler_draw(), gpencil_add_arc_points(), gpencil_add_fake_points(), gpencil_primitive_arc(), gpencil_primitive_rectangle(), gpencil_primitive_rotate_line(), gpencil_primitive_update_cps(), knife_find_line_hits(), knifetool_draw_visible_distances(), blender::ed::space_node::node_link_bezier_handles(), and OVERLAY_camera_cache_populate().
Definition at line 250 of file math_vector.c.
Referenced by overlap_tri_tri_uv_test().
Same as mid_v3_v3v3_angle_weighted but r is assumed to be accumulated normals, divided by their total.
Definition at line 299 of file math_vector.c.
References acosf, angle(), BLI_assert, float(), len_squared_v3(), mul_v3_fl(), normalize_v3(), and r.
Definition at line 271 of file math_vector.c.
References float(), madd_v3_v3fl(), r, and zero_v3().
Referenced by computeBindWeights(), and deformVert().
Definition at line 237 of file math_vector.c.
References Freestyle::a, usdtokens::b(), and r.
Referenced by _scan_for_ext_spring_forces(), _softbody_calc_forces_slice_in_a_thread(), alter_co(), BKE_curve_center_bounds(), BKE_curve_texspace_calc(), BKE_lattice_center_bounds(), BKE_mball_center_bounds(), BKE_mesh_center_bounds(), BKE_mesh_mirror_apply_mirror_on_axis_for_modifier(), BKE_mesh_remesh_voxel_fix_poles(), BKE_mesh_texspace_calc(), BKE_pbvh_raycast_project_ray_root(), bm_decim_build_quadrics(), bm_edge_symmetry_map(), BM_editselection_center(), BM_face_calc_center_bounds(), BM_face_calc_center_bounds_vcos(), BM_face_multires_bounds_smooth(), BM_vert_tri_calc_tangent_edge_pair(), bm_vert_tri_find_unique_edge(), BMBVH_EdgeVisible(), bmo_inset_region_exec(), brush_edit_init(), build_vmesh(), bundle_midpoint(), calc_ortho_extent(), calculateCenterBound(), collapse_face_corners(), compute_mdisp_quad(), createTransEdge(), cutEdges(), draw_bone_name(), draw_frustum_bound_sphere_calc(), draw_primitive_view_impl(), drw_call_calc_orco(), drw_call_culling_init(), DRW_text_edit_mesh_measure_stats(), ED_armature_origin_set(), edbm_face_split_by_edges_exec(), edbm_point_normals_modal(), edbm_polybuild_face_at_cursor_invoke(), edbm_polybuild_split_at_cursor_invoke(), edbm_rip_edge_side_measure(), edbm_rip_invoke__vert(), EDBM_unified_findnearest_from_raycast(), edgetag_cut_cost_face(), facetag_cut_cost_edge(), find_first_points(), gizmo_prepare_mat(), gpencil_snap_cursor_to_sel(), interp_slerp_co_no_v3(), knife_find_closest_edge_of_face(), knife_find_line_hits(), knife_verts_edge_in_face(), match_texture_space_exec(), merge_frame_corners(), mesh_filter_task_cb(), multires_subdivide_create_object_space_linear_grids(), object_origin_set_exec(), offset_meet(), offset_on_edge_between(), pbvh_bmesh_collapse_edge(), pbvh_bmesh_split_edge(), pchan_culling_calc_bsphere(), peelObjectsTransform(), quad_verts_to_barycentric_tri(), SCULPT_do_multiplane_scrape_brush(), set_profile_params(), smoothModifier_do(), snap_curs_to_sel_ex(), snap_mesh_edge_verts_mixed(), sort_bmelem_flag(), square_out_adj_vmesh(), uv_map_transform_center(), view3d_from_minmax(), view3d_interactive_add_modal(), view3d_localview_init(), view3d_preselect_update_preview_triangle_from_edge(), voxel_size_edit_invoke(), voxel_size_parallel_lines_draw(), and WIDGETGROUP_xform_cage_refresh().
Specialized function for calculating normals. Fast-path for:
We can use the length of (a + b) to calculate the angle.
Definition at line 281 of file math_vector.c.
References Freestyle::a, acosf, add_v3_v3v3(), angle(), usdtokens::b(), BLI_ASSERT_UNIT_V3, float(), mul_v3_fl(), normalize_v3(), and r.
Referenced by mesh_calc_hq_normal().
Definition at line 256 of file math_vector.c.
Referenced by bindVert(), BKE_mesh_calc_poly_center(), BM_face_calc_point_in_face(), compute_collision_point_edge_tri(), compute_collision_point_tri_tri(), mesh_calc_poly_area_centroid(), ob_parvert3(), and tri_v3_scale().
void mid_v3_v3v3v3v3 | ( | float | v[3], |
const float | v1[3], | ||
const float | v2[3], | ||
const float | v3[3], | ||
const float | v4[3] | ||
) |
Definition at line 263 of file math_vector.c.
Referenced by BKE_mesh_calc_poly_center(), connect_frames(), draw_primitive_view_impl(), and mdisp_in_mdispquad().
Definition at line 890 of file math_vector.c.
Referenced by BKE_mask_spline_feather_collapse_inner_loops(), BKE_mesh_remap_calc_polys_from_mesh(), BKE_tracking_marker_pattern_minmax(), BKE_tracking_plane_track_add(), bm_face_array_uv_rotate_fit_aabb(), BM_face_uv_minmax(), blender::compositor::KeyingScreenOperation::build_voronoi_triangulation(), clip_uv_transform_translation(), blender::compositor::PlaneDistortWarpImageOperation::determine_depending_area_of_interest(), draw_distortion(), draw_spline_points(), dynamicPaint_createUVSurface(), ED_gpencil_projected_2d_bound_box(), ED_mask_selected_minmax(), ED_uvedit_minmax_multi(), feather_bucket_check_intersect(), blender::compositor::PlaneDistortWarpImageOperation::get_area_of_interest(), gpencil_zoom_level_set(), layerDoMinMax_mloop_origspace(), layerDoMinMax_mloopuv(), blender::ed::space_node::node_get_selected_minmax(), p_chart_uv_bbox(), pixel_bounds_array(), pixel_bounds_uv(), proj_paint_state_screen_coords_init(), project_paint_delayed_face_init(), screen_geom_vertices_scale_pass(), blender::io::gpencil::GpencilIO::selected_objects_boundbox_calc(), selected_tracking_boundbox(), SEQ_image_transform_bounding_box_from_collection(), spline_under_mouse_get(), tracking_check_marker_margin(), uv_map_clip_correct_multi(), and uv_weld_align().
Definition at line 867 of file math_vector.c.
Referenced by arrayModifier_doArray(), BKE_boundbox_minmax(), BKE_displist_minmax(), BKE_editmesh_cache_calc_minmax(), BKE_gpencil_stroke_minmax(), BKE_lattice_minmax(), BKE_lattice_minmax_dl(), BKE_mball_minmax(), BKE_mball_minmax_ex(), BKE_mball_texspace_calc(), BKE_nurb_minmax(), BKE_object_minmax(), BKE_object_minmax_dupli(), BKE_pchan_minmax(), BM_face_calc_bounds_expand(), BM_face_calc_center_bounds(), BM_face_calc_center_bounds_vcos(), boundInsert(), Spline::bounds_min_max(), box_minmax_bounds_m4(), bundle_midpoint(), calc_ortho_extent(), calc_tw_center(), calculateCenterBound(), cuboid_do(), curve_deform_coords_impl(), distribute_grid(), ED_armature_origin_set(), ED_view3d_minmax_verts(), edbm_point_normals_modal(), EEVEE_shadows_caster_register(), frustum_min_bounding_sphere(), generate_vert_coordinates(), gpencil_stroke_points_centroid(), harmonic_coordinates_bind(), heat_ray_tree_create(), minmax_armature(), minmax_v3v3_v3_array(), object_origin_set_exec(), paintface_minmax(), particle_intersect_mesh(), particle_system_minmax(), points_in_planes_minmax_fn(), sb_detect_edge_collisionCached(), scopes_update_cb(), snap_curs_to_sel_ex(), snap_editmesh_minmax(), softbody_apply_forces(), view3d_object_calc_minmax(), viewselected_exec(), WM_gizmomap_minmax(), workbench_shadow_object_shadow_bbox_get(), and workbench_shadow_update().
void minmax_v3v3_v3_array | ( | float | r_min[3], |
float | r_max[3], | ||
const float(*) | vec_arr[3], | ||
int | var_arr_num | ||
) |
Definition at line 907 of file math_vector.c.
References minmax_v3v3_v3().
Definition at line 838 of file math_vector.c.
Referenced by layerDoMinMax_propcol().
Definition at line 1185 of file math_vector.c.
void msub_vn_vnvn | ( | float * | array_tar, |
const float * | array_src_a, | ||
const float * | array_src_b, | ||
const float | f, | ||
const int | size | ||
) |
Definition at line 1195 of file math_vector.c.
References size().
Definition at line 1093 of file math_vector.c.
References size().
Referenced by BM_vert_loop_groups_data_layer_create(), bm_vert_loop_groups_data_layer_merge_weights__single(), Color_idiv(), Color_imul(), Matrix_imul(), Vector_idiv(), Vector_imul(), and Vector_length_set().
Definition at line 1069 of file math_vector.c.
Referenced by Matrix_imul(), Quaternion_imul(), and Vector_imul().
Definition at line 1102 of file math_vector.c.
Referenced by color_mul_float(), matrix_mul_float(), normalize_vn_vn(), Vector_div(), and vector_mul_float().
void mul_vn_vnvn | ( | float * | array_tar, |
const float * | array_src_a, | ||
const float * | array_src_b, | ||
const int | size | ||
) |
Definition at line 1079 of file math_vector.c.
References size().
Referenced by Matrix_mul(), Quaternion_mul(), and vector_mul_vec().
Definition at line 1059 of file math_vector.c.
Referenced by Color_neg(), and Vector_neg().
Definition at line 1016 of file math_vector.c.
References normalize_vn_vn(), and size().
Referenced by M_Noise_random_unit_vector(), Vector_normalize(), and Vector_slerp().
Definition at line 1001 of file math_vector.c.
References copy_vn_fl(), float(), len_squared_vn(), mul_vn_vn_fl(), size(), and sqrt().
Referenced by normalize_vn(), and Vector_slerp().
Takes a vector and computes 2 orthogonal directions.
Definition at line 707 of file math_vector.c.
References BLI_assert, eps, CCL_NAMESPACE_BEGIN::isfinite(), len_squared_v2(), and sqrtf.
Referenced by alter_co(), axis_dominant_v3_to_m3(), axis_dominant_v3_to_m3_negate(), gizmo_3d_dial_matrixbasis_calc(), mesh_calc_eigen_matrix(), sculpt_pose_align_pivot_local_space(), and wm_gizmo_set_matrix_rotation_from_z_axis__internal().
no brainer compared to v3, just have for consistency.
Definition at line 757 of file math_vector.c.
References BLI_assert, usdtokens::out(), and v.
Referenced by interp_v2_v2v2_slerp_safe(), Vector_orthogonal(), and wm_gesture_draw_line_active_side().
Calculates p - a perpendicular vector to v
Definition at line 732 of file math_vector.c.
References axis_dominant_v3_single(), BLI_assert, usdtokens::out(), and v.
Referenced by BM_loop_interp_from_face(), bm_vert_pair_to_matrix(), getTransformOrientation_ex(), gizmo_spin_prop_axis_angle_get(), gizmo_spin_prop_axis_angle_set(), interp_v3_v3v3_slerp_safe(), orthogonalize_m3_zero_axes_impl(), rotation_between_vecs_to_mat3(), rotation_between_vecs_to_quat(), and Vector_orthogonal().
Definition at line 813 of file math_vector.c.
Referenced by add_vertex_extrude().
Definition at line 818 of file math_vector.c.
Referenced by raycast_callback().
Definition at line 823 of file math_vector.c.
Definition at line 828 of file math_vector.c.
Definition at line 660 of file math_vector.c.
References BLI_ASSERT_UNIT_V2, dot_v2v2(), madd_v2_v2v2fl(), mul(), and usdtokens::out().
Definition at line 652 of file math_vector.c.
References BLI_ASSERT_UNIT_V3, dot_v3v3(), madd_v3_v3v3fl(), mul(), and usdtokens::out().
Referenced by angle_on_axis_v3v3_v3(), angle_signed_on_axis_v3v3_v3(), bm_vert_pair_to_matrix(), BM_verts_calc_normal_from_cloud_ex(), clip_to_ortho_planes(), edge_queue_tri_in_circle(), getTransformOrientation_ex(), gizmo_bisect_prop_angle_get(), gizmo_bisect_prop_angle_set(), gizmo_mesh_bisect_update_from_op(), gizmo_mesh_spin_init_refresh(), gizmo_mesh_spin_redo_draw_prepare(), gizmo_mesh_spin_redo_update_from_op(), gizmo_spin_prop_axis_angle_get(), gizmo_spin_prop_axis_angle_set(), long_edge_queue_create(), short_edge_queue_create(), and tc_mesh_customdatacorrect_apply_vert().
Definition at line 645 of file math_vector.c.
References dot_v2v2(), madd_v2_v2v2fl(), mul(), and usdtokens::out().
In this case plane is a 3D vector only (no 4th component).
Projecting will make out a copy of p orthogonal to v_plane.
Definition at line 638 of file math_vector.c.
References dot_v3v3(), madd_v3_v3v3fl(), mul(), and usdtokens::out().
Referenced by BKE_object_empty_image_data_is_visible_in_view3d(), calc_sculpt_plane(), calcVertSlideMouseActiveEdges(), do_crease_brush_task_cb_ex(), do_pinch_brush_task_cb_ex(), do_snake_hook_brush_task_cb_ex(), do_vpaint_brush_smear(), do_wpaint_brush_smear_task_cb_ex(), ED_view3d_cursor3d_position_rotation(), gizmo_arrow_modal(), is_quad_convex_v3(), screen_px_line_point_factor_v2_persp(), SCULPT_calc_brush_plane(), sculpt_project_v3(), sculpt_project_v3_normal_align(), sculpt_update_brush_delta(), transform_orientations_create_from_axis(), and update_sculpt_normal().
Project p onto v_proj
Definition at line 589 of file math_vector.c.
References dot_v2v2(), is_zero_v2(), mul(), mul_v2_v2fl(), usdtokens::out(), UNLIKELY, and zero_v2().
Referenced by BKE_mask_point_set_handle(), and initResize().
Project p onto a unit length v_proj
Definition at line 622 of file math_vector.c.
References BLI_ASSERT_UNIT_V2, dot_v2v2(), mul(), mul_v2_v2fl(), and usdtokens::out().
Referenced by slide_point_modal().
Project a vector on a plane defined by normal and a plane point p.
Definition at line 668 of file math_vector.c.
References dot_v3v3(), len_squared_v3(), madd_v3_v3fl(), mul(), usdtokens::out(), and sub_v3_v3v3().
Referenced by interp_slerp_co_no_v3(), and blender::bke::mesh_surface_sample::sample_surface_points_spherical().
Project p onto v_proj
Definition at line 600 of file math_vector.c.
References dot_v3v3(), is_zero_v3(), mul(), mul_v3_v3fl(), usdtokens::out(), UNLIKELY, and zero_v3().
Referenced by _scan_for_ext_spring_forces(), axisProjection(), bm_loop_flip_disp(), bm_vert_tri_find_unique_edge(), boid_body(), boid_climb(), do_kink(), do_kink_spiral(), followtrack_distance_from_viewplane_get(), get_effector_data(), getTransformOrientation_ex(), InputHorizontalAbsolute(), InputVerticalAbsolute(), isect_line_line_epsilon_v3(), locktrack_evaluate(), pivotcon_evaluate(), psys_get_birth_coords(), psys_thread_create_path(), ResizeBetween(), RotationBetween(), rule_average_speed(), set_prop_dist(), setNearestAxis3d(), transdata_elem_push_pull(), update_velocities(), vectomat(), and viewAxisCorrectCenter().
Definition at line 611 of file math_vector.c.
References dot_v3v3_db(), is_zero_v3_db(), mul(), mul_v3_v3db_db(), usdtokens::out(), UNLIKELY, and zero_v3_db().
Project p onto a unit length v_proj
Definition at line 630 of file math_vector.c.
References BLI_ASSERT_UNIT_V3, dot_v3v3(), mul(), mul_v3_v3fl(), and usdtokens::out().
Referenced by dist_squared_to_ray_v3_normalized(), ED_armature_ebone_roll_to_vector(), mesh_remove_doubles_on_axis(), wm_xr_fly_compute_move(), wm_xr_navigation_reset_exec(), and wm_xr_navigation_teleport().
Definition at line 1041 of file math_vector.c.
References size().
Referenced by C_Vector_Linspace(), and C_Vector_Range().
void range_vn_i | ( | int * | array_tar, |
const int | size, | ||
const int | start | ||
) |
Definition at line 1021 of file math_vector.c.
References size().
Referenced by ensure_orig_index_layer(), face_map_move_exec(), mesh_calc_modifiers(), blender::geometry::mesh_merge_by_distance_connected(), and modifyMesh().
Definition at line 1031 of file math_vector.c.
References size().
Referenced by material_slot_move_exec().
Returns a reflection vector from a vector and a normal vector reflect = vec - ((2 * dot(vec, mirror)) * mirror).
v + ^ \ | | + normal: axis of reflection / / + out: result (negate for a 'bounce').
Definition at line 691 of file math_vector.c.
References BLI_ASSERT_UNIT_V3, dot_v3v3(), madd_v3_v3v3fl(), normal, usdtokens::out(), and v.
Referenced by alter_co(), ElementMirror(), studiolight_lights_eval(), studiolight_radiance_preview(), and Vector_reflect().
Definition at line 699 of file math_vector.c.
References BLI_ASSERT_UNIT_V3_DB, dot_v3v3_db(), madd_v3_v3v3db_db(), normal, usdtokens::out(), and v.
void rotate_normalized_v3_v3v3fl | ( | float | out[3], |
const float | p[3], | ||
const float | axis[3], | ||
float | angle | ||
) |
Rotate a point p by angle around an arbitrary unit length axis. http://local.wasp.uwa.edu.au/~pbourke/geometry/
Definition at line 776 of file math_vector.c.
References angle(), BLI_ASSERT_UNIT_V3, cosf, usdtokens::out(), and sinf.
Referenced by build_emats_stack(), connection_node_mat(), deformStroke(), map_to_plane_axis_angle_v2_v3v3fl(), and rotate_v3_v3v3fl().
Rotate a point p by angle around origin (0, 0)
Definition at line 765 of file math_vector.c.
References angle(), BLI_assert, cosf, r, and sinf.
Referenced by dyntopo_detail_size_edit_invoke(), dyntopo_detail_size_parallel_lines_draw(), generate_arc_from_point_to_point(), generate_semi_circle_from_point_to_point(), gpencil_rotate_v2_v2v2fl(), gpencil_vfx_shadow(), rotate_around_center_v2(), and wm_gesture_straightline_do_angle_snap().
Definition at line 800 of file math_vector.c.
References angle(), BLI_assert, normalize_v3_v3(), r, and rotate_normalized_v3_v3v3fl().
Referenced by calc_brush_local_mat(), do_boundary_brush_bend_task_cb_ex(), do_boundary_brush_twist_task_cb_ex(), do_clay_thumb_brush_task_cb_ex(), do_twist(), gizmo2d_resize_draw_prepare(), SCULPT_do_multiplane_scrape_brush(), SCULPT_multiplane_scrape_preview_draw(), SCULPT_tilt_apply_to_normal(), and snap_v3_angle_plane().
Definition at line 973 of file math_vector.c.
Referenced by len_squared_vn().
Definition at line 1161 of file math_vector.c.
Referenced by Color_isub(), and Vector_isub().
void sub_vn_vnvn | ( | float * | array_tar, |
const float * | array_src_a, | ||
const float * | array_src_b, | ||
const int | size | ||
) |
Definition at line 1171 of file math_vector.c.
References size().
Referenced by Color_sub(), Matrix_sub(), v3d_editvertex_buts(), and Vector_sub().