Blender V2.61 - r43446
|
#include "BLI_math.h"
Go to the source code of this file.
Functions | |
void | interp_v2_v2v2 (float target[2], const float a[2], const float b[2], const float t) |
void | interp_v2_v2v2v2 (float p[2], const float v1[2], const float v2[2], const float v3[2], const float w[3]) |
void | interp_v3_v3v3 (float target[3], const float a[3], const float b[3], const float t) |
void | interp_v4_v4v4 (float target[4], const float a[4], const float b[4], 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 | mid_v3_v3v3 (float v[3], const float v1[3], const float v2[3]) |
float | angle_v3v3v3 (const float v1[3], const float v2[3], const float v3[3]) |
float | angle_v3v3 (const float v1[3], const float v2[3]) |
float | angle_v2v2v2 (const float v1[2], const float v2[2], const float v3[2]) |
float | angle_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 v1[2], const float v2[2]) |
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 | project_v2_v2v2 (float c[2], const float v1[2], const float v2[2]) |
void | project_v3_v3v3 (float c[3], const float v1[3], const float v2[3]) |
void | bisect_v3_v3v3v3 (float out[3], const float v1[3], const float v2[3], const float v3[3]) |
void | reflect_v3_v3v3 (float out[3], const float v1[3], const float v2[3]) |
void | ortho_basis_v3v3_v3 (float v1[3], float v2[3], const float v[3]) |
void | rotate_normalized_v3_v3v3fl (float r[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 | minmax_v3v3_v3 (float min[3], float max[3], const float vec[3]) |
double | dot_vn_vn (const float *array_src_a, const float *array_src_b, 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_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_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 | 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 | fill_vn_i (int *array_tar, const int size, const int val) |
void | fill_vn_fl (float *array_tar, const int size, const float val) |
Definition in file math_vector.c.
void add_vn_vn | ( | float * | array_tar, |
const float * | array_src, | ||
const int | size | ||
) |
Definition at line 458 of file math_vector.c.
Referenced by Color_iadd(), screen_opengl_render_apply(), and Vector_iadd().
void add_vn_vnvn | ( | float * | array_tar, |
const float * | array_src_a, | ||
const float * | array_src_b, | ||
const int | size | ||
) |
Definition at line 466 of file math_vector.c.
Referenced by Color_add(), Matrix_add(), and Vector_add().
float angle_normalized_v2v2 | ( | const float | v1[2], |
const float | v2[2] | ||
) |
Definition at line 189 of file math_vector.c.
References dot_v2v2(), len_v2v2(), M_PI, and saasin().
Referenced by angle_v2v2(), angle_v2v2v2(), draw_uvs_stretch(), and uv_image_outset().
float angle_normalized_v3v3 | ( | const float | v1[3], |
const float | v2[3] | ||
) |
Definition at line 173 of file math_vector.c.
References dot_v3v3(), len_v3v3(), M_PI, and saasin().
Referenced by angle_quad_v3(), angle_tri_v3(), angle_v3v3(), angle_v3v3v3(), applyModifier(), bevel_list_smooth(), dm_calc_normal(), draw_uvs_stretch(), EM_make_hq_normals(), EM_solidify(), make_bevel_list_3D_minimum_twist(), project_paint_begin(), project_paint_uvpixel_mask(), RIG_calculateEdgeAngles(), rollBoneByQuatAligned(), rotation_between_vecs_to_quat(), sk_drawEdge(), sk_drawNormal(), and vec_roll_to_mat3().
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 222 of file math_vector.c.
References angle_normalized_v3v3(), M_PI, normalize_v3(), and sub_v3_v3v3().
Referenced by applyModifier(), and EM_solidify().
void angle_tri_v3 | ( | float | angles[3], |
const float | v1[3], | ||
const float | v2[3], | ||
const float | v3[3] | ||
) |
Definition at line 204 of file math_vector.c.
References angle_normalized_v3v3(), M_PI, normalize_v3(), and sub_v3_v3v3().
Referenced by applyModifier(), and EM_solidify().
float angle_v2v2 | ( | const float | v1[2], |
const float | v2[2] | ||
) |
Definition at line 157 of file math_vector.c.
References angle_normalized_v2v2(), and normalize_v2().
Referenced by bevel_list_flip_tangents(), sk_detectDeleteGesture(), sk_detectReverseGesture(), and sk_detectTrimGesture().
float angle_v2v2v2 | ( | const float | v1[2], |
const float | v2[2], | ||
const float | v3[2] | ||
) |
Definition at line 140 of file math_vector.c.
References angle_normalized_v2v2(), and normalize_v2().
Referenced by draw_uvs_stretch().
float angle_v3v3 | ( | const float | v1[3], |
const float | v2[3] | ||
) |
Definition at line 130 of file math_vector.c.
References angle_normalized_v3v3(), and normalize_v3_v3().
Referenced by applyModifier(), axisProjection(), ED_rollBoneToVector(), measure_facepair(), similar_edge_select__internal(), similar_face_select__internal(), similar_vert_select_exec(), smooth_view(), test_manipulator_axis(), and viewrotate_apply().
float angle_v3v3v3 | ( | const float | v1[3], |
const float | v2[3], | ||
const float | v3[3] | ||
) |
Definition at line 117 of file math_vector.c.
References angle_normalized_v3v3(), normalize_v3(), and sub_v3_v3v3().
Referenced by draw_em_measure_stats(), draw_uvs_stretch(), and laplacian_triangle_area().
void bisect_v3_v3v3v3 | ( | float | out[3], |
const float | v1[3], | ||
const float | v2[3], | ||
const float | v3[3] | ||
) |
Definition at line 266 of file math_vector.c.
References add_v3_v3v3(), normalize_v3(), and sub_v3_v3v3().
Referenced by bevel_list_calc_bisect(), make_bevel_list_3D_zup(), and makeBevelList().
double dot_vn_vn | ( | const float * | array_src_a, |
const float * | array_src_b, | ||
const int | size | ||
) |
Definition at line 381 of file math_vector.c.
References simple_enum_gen::d, i, and size().
Referenced by normalize_vn_vn(), vec_magnitude_nosqrt(), Vector_dot(), Vector_length_get(), Vector_length_set(), Vector_length_squared_get(), and Vector_mul().
void fill_vn_fl | ( | float * | array_tar, |
const int | size, | ||
const float | val | ||
) |
Definition at line 499 of file math_vector.c.
Referenced by C_Vector_Fill(), do_versions(), Matrix_zero(), normalize_vn_vn(), Vector_CreatePyObject(), Vector_length_set(), Vector_new(), Vector_resize(), Vector_resized(), and Vector_zero().
void fill_vn_i | ( | int * | array_tar, |
const int | size, | ||
const int | val | ||
) |
Definition at line 492 of file math_vector.c.
Referenced by calc_weightpaint_vert_array().
void interp_v2_v2v2 | ( | float | target[2], |
const float | a[2], | ||
const float | b[2], | ||
const float | t | ||
) |
Definition at line 36 of file math_vector.c.
Referenced by doEdgeSlide(), isect_seg_seg_v2_point(), mdisp_rot_crn_to_face(), and project_paint_face_init().
void interp_v2_v2v2v2 | ( | float | p[2], |
const float | v1[2], | ||
const float | v2[2], | ||
const float | v3[2], | ||
const float | w[3] | ||
) |
Definition at line 46 of file math_vector.c.
void interp_v3_v3v3 | ( | float | target[3], |
const float | a[3], | ||
const float | b[3], | ||
const float | t | ||
) |
Definition at line 52 of file math_vector.c.
Referenced by addVertToBucket(), ambient_occlusion_apply(), blend_from_shape_exec(), blend_m3_m3m3(), blend_m4_m4m4(), boid_find_ground(), calc_curvepath(), calc_latt_deform(), collision_newton_rhapson(), collision_response(), constraint_target_to_mat4(), createArc(), curve_deform_verts(), deformVerts_do(), distlimit_evaluate(), do_clump(), do_guides(), do_kink(), doEdgeSlide(), draw_em_measure_stats(), draw_mesh_fancy(), drawlamp(), dynamicPaint_Modifier_apply(), filterNullReebGraph(), flyApply(), get_strand_normal(), gp_stroke_to_bezier(), interpolateBuckets(), mergeBuckets(), mixColors(), node_shader_exec_curve_rgb(), postprocessGraph(), project_paint_face_init(), psys_cache_edit_paths(), psys_get_particle_state(), REEB_AxialSymmetry(), REEB_RadialSymmetry(), shade_one_light(), shrinkwrap_calc_nearest_surface_point(), shrinkwrap_calc_nearest_vertex(), shrinkwrap_calc_normal_projection(), shrinkwrap_get_tarmat(), SimpleDeformModifier_do(), snapEdge(), splineik_evaluate_bone(), subdivide_edge_addvert(), subdividenurb(), update_reports_display_invoke(), and warpModifier_do().
void interp_v3_v3v3v3 | ( | float | p[3], |
const float | v1[3], | ||
const float | v2[3], | ||
const float | v3[3], | ||
const float | w[3] | ||
) |
Definition at line 73 of file math_vector.c.
Referenced by barycentric_transform(), dynamicPaint_generateBakeData(), dynamicPaint_paintMesh(), dynamicPaint_setInitialColor(), project_paint_face_init(), project_paint_occlude_ptv_clip(), psys_interpolate_face(), screen_px_from_ortho(), and screen_px_from_persp().
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] | ||
) |
Definition at line 82 of file math_vector.c.
Referenced by psys_interpolate_face(), psys_interpolate_particle(), psys_thread_create_path(), and where_on_path().
void interp_v4_v4v4 | ( | float | target[4], |
const float | a[4], | ||
const float | b[4], | ||
const float | t | ||
) |
Definition at line 61 of file math_vector.c.
Referenced by psys_thread_create_path(), and subdividenurb().
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 89 of file math_vector.c.
Referenced by dynamicPaint_setInitialColor().
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 97 of file math_vector.c.
void mid_v3_v3v3 | ( | float | v[3], |
const float | v1[3], | ||
const float | v2[3] | ||
) |
Definition at line 105 of file math_vector.c.
Referenced by _scan_for_ext_spring_forces(), _softbody_calc_forces_slice_in_a_thread(), boundbox_mesh(), bspface_init_strand(), bundle_midpoint(), curve_center_bounds(), docenter_armature(), draw_ebones(), draw_em_indices(), draw_em_measure_stats(), draw_pose_bones(), dupli_extrude_cursor(), exec_strandsurface_sample(), get_edge_center(), initWarp(), make_trans_verts(), mesh_center_bounds(), object_origin_set_exec(), occ_face(), smooth_vertex(), smoothModifier_do(), snap_curs_to_sel(), softbody_calc_forces(), tex_space_curve(), and uv_map_transform_center().
void minmax_v3v3_v3 | ( | float | min[3], |
float | max[3], | ||
const float | vec[3] | ||
) |
Definition at line 367 of file math_vector.c.
Referenced by calculateCenterBound(), and initWarp().
void mul_vn_fl | ( | float * | array_tar, |
const int | size, | ||
const float | f | ||
) |
Definition at line 443 of file math_vector.c.
Referenced by Color_idiv(), Color_imul(), Vector_idiv(), Vector_imul(), and Vector_length_set().
void mul_vn_vn_fl | ( | float * | array_tar, |
const float * | array_src, | ||
const int | size, | ||
const float | f | ||
) |
Definition at line 450 of file math_vector.c.
Referenced by color_mul_float(), matrix_mul_float(), normalize_vn_vn(), screen_opengl_render_apply(), Vector_div(), and vector_mul_float().
void negate_vn | ( | float * | array_tar, |
const int | size | ||
) |
Definition at line 428 of file math_vector.c.
Referenced by Vector_negate().
void negate_vn_vn | ( | float * | array_tar, |
const float * | array_src, | ||
const int | size | ||
) |
Definition at line 435 of file math_vector.c.
Referenced by Color_neg(), and Vector_neg().
float normalize_vn | ( | float * | array_tar, |
const int | size | ||
) |
Definition at line 406 of file math_vector.c.
References normalize_vn_vn().
Referenced by M_Noise_random_unit_vector(), and Vector_normalize().
float normalize_vn_vn | ( | float * | array_tar, |
const float * | array_src, | ||
const int | size | ||
) |
Definition at line 391 of file math_vector.c.
References simple_enum_gen::d, dot_vn_vn(), credits_svn_gen::e, fill_vn_fl(), mul_vn_vn_fl(), and sqrt().
Referenced by normalize_vn().
void ortho_basis_v3v3_v3 | ( | float | v1[3], |
float | v2[3], | ||
const float | v[3] | ||
) |
Definition at line 298 of file math_vector.c.
References simple_enum_gen::d, credits_svn_gen::e, and sqrt().
Referenced by compatible_bump_compute(), compatible_bump_uv_derivs(), psys_render_projected_area(), ray_ao_qmc(), ray_shadow_qmc(), trace_reflect(), and trace_refract().
void print_v2 | ( | const char * | str, |
const float | v[2] | ||
) |
Definition at line 352 of file math_vector.c.
void print_v3 | ( | const char * | str, |
const float | v[3] | ||
) |
Definition at line 357 of file math_vector.c.
Referenced by RIG_printCtrl(), and RIG_printNode().
void print_v4 | ( | const char * | str, |
const float | v[4] | ||
) |
Definition at line 362 of file math_vector.c.
void project_v2_v2v2 | ( | float | c[2], |
const float | v1[2], | ||
const float | v2[2] | ||
) |
Definition at line 245 of file math_vector.c.
References dot_v2v2(), and mul().
Referenced by mdisp_flip_disp().
void project_v3_v3v3 | ( | float | c[3], |
const float | v1[3], | ||
const float | v2[3] | ||
) |
Definition at line 255 of file math_vector.c.
References dot_v3v3(), and mul().
Referenced by _scan_for_ext_spring_forces(), axisProjection(), BLI_mirrorAlongAxis(), BME_bevel_poly(), BME_bevel_set_max(), boid_body(), boid_climb(), calcArcCorrelation(), cloth_calc_force(), do_kink(), ED_rollBoneToVector(), followtrack_evaluate(), get_effector_data(), handleRadialSymmetry(), InputHorizontalAbsolute(), InputVerticalAbsolute(), isect_line_line_v3(), locktrack_evaluate(), pivotcon_evaluate(), psys_get_birth_coordinates(), psys_thread_create_path(), PushPull(), RotationBetween(), rule_average_speed(), setNearestAxis3d(), sk_distanceDepth(), sk_flattenStroke(), static_particle_strand(), update_velocities(), vectomat(), and viewAxisCorrectCenter().
void range_vn_fl | ( | float * | array_tar, |
const int | size, | ||
const float | start, | ||
const float | step | ||
) |
Definition at line 419 of file math_vector.c.
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 411 of file math_vector.c.
Referenced by mesh_calc_modifiers().
void reflect_v3_v3v3 | ( | float | out[3], |
const float | v1[3], | ||
const float | v2[3] | ||
) |
Definition at line 280 of file math_vector.c.
References copy_v3_v3(), dot_v3v3(), and reflect().
Referenced by Vector_reflect().
void rotate_normalized_v3_v3v3fl | ( | float | r[3], |
const float | p[3], | ||
const float | axis[3], | ||
const float | angle | ||
) |
Definition at line 323 of file math_vector.c.
Referenced by rotate_v3_v3v3fl().
void rotate_v3_v3v3fl | ( | float | r[3], |
const float | p[3], | ||
const float | axis[3], | ||
const float | angle | ||
) |
Definition at line 341 of file math_vector.c.
References normalize_v3_v3(), and rotate_normalized_v3_v3v3fl().
void sub_vn_vn | ( | float * | array_tar, |
const float * | array_src, | ||
const int | size | ||
) |
Definition at line 475 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 483 of file math_vector.c.
Referenced by Color_sub(), Matrix_sub(), and Vector_sub().