Blender
V3.3
|
Go to the source code of this file.
Macros | |
#define | __MATH_GEOM_INLINE_C__ |
#define | SMALL_NUMBER 1.e-8f |
#define __MATH_GEOM_INLINE_C__ |
Definition at line 9 of file math_geom_inline.c.
Definition at line 17 of file math_geom_inline.c.
Definition at line 63 of file math_geom_inline.c.
References Freestyle::a, usdtokens::b(), and r.
Referenced by madd_sh_shfl().
Definition at line 36 of file math_geom_inline.c.
References blender::compositor::area(), area_tri_signed_v2(), v1, and v2.
Definition at line 26 of file math_geom_inline.c.
Referenced by area_squared_tri_v2(), and area_tri_v2().
Definition at line 31 of file math_geom_inline.c.
References area_tri_signed_v2(), fabsf, v1, and v2.
Referenced by BKE_mesh_remap_calc_polys_from_mesh(), computeBindWeights(), IsectPT2Df_limit(), M_Geometry_area_tri(), project_paint_bleed_add_face_user(), test_polyfill_area(), and transform_point_by_tri_v3().
Get the 2 dominant axis values, 0==X, 1==Y, 2==Z.
Definition at line 149 of file math_geom_inline.c.
References fabsf.
Referenced by barycentric_differentials_from_position(), barycentric_weights(), and uvedit_unwrap_cube_project().
Same as axis_dominant_v3 but return the max value.
Definition at line 169 of file math_geom_inline.c.
References fabsf.
The dominant axis of an orthogonal vector.
Definition at line 200 of file math_geom_inline.c.
References fabsf, x, y, and z.
Referenced by ED_view3d_cursor3d_position_rotation().
Get the single dominant axis value, 0==X, 1==Y, 2==Z.
Definition at line 192 of file math_geom_inline.c.
References fabsf, x, y, and z.
Referenced by calc_initial_placement_point_from_view(), distribute_grid(), isect_ray_tri_watertight_v3_precalc(), ortho_v3_v3(), OVERLAY_volume_extra(), workbench_volume_modifier_cache_populate(), and workbench_volume_object_cache_populate().
Definition at line 49 of file math_geom_inline.c.
References Freestyle::a, and r.
Referenced by madd_sh_shfl(), and vec_fac_to_sh().
Definition at line 21 of file math_geom_inline.c.
Referenced by barycentric_weights_v2(), barycentric_weights_v2_clamped(), barycentric_weights_v2_persp(), BLI_polyfill_beautify_quad_rotate_calc_ex(), bm_edge_calc_rotate_beauty__area(), bm_loop_collapse_is_degenerate(), color_sample_remove_cost(), gpencil_add_guide_points(), project_face_winding_init(), and test_polyfill_winding().
Definition at line 72 of file math_geom_inline.c.
References Freestyle::a, usdtokens::b(), and r.
Referenced by eval_shv3().
Definition at line 132 of file math_geom_inline.c.
References dot_shsh(), sh, v, and vec_fac_to_sh().
Definition at line 140 of file math_geom_inline.c.
References add_sh_shsh(), copy_sh_sh(), mul_sh_fl(), r, and sh.
Definition at line 208 of file math_geom_inline.c.
Referenced by blender::compositor::KeyingDespillOperation::execute_pixel_sampled(), blender::compositor::KeyingOperation::execute_pixel_sampled(), blender::compositor::KeyingDespillOperation::update_memory_buffer_partial(), and blender::compositor::KeyingOperation::update_memory_buffer_partial().
Definition at line 216 of file math_geom_inline.c.
Referenced by view3d_ruler_pick().
Definition at line 54 of file math_geom_inline.c.
References r.
Referenced by madd_sh_shfl(), and vec_fac_to_sh().
Definition at line 230 of file math_geom_inline.c.
References dot_v3v3().
Referenced by BKE_mesh_mirror_bisect_on_mirror_plane_for_modifier(), bmo_bisect_plane_exec(), camera_to_frame_view_cb(), clip_segment_v3_plane(), clip_segment_v3_plane_n(), closest_to_plane_normalized_v3(), closest_to_plane_v3(), dist_signed_squared_to_plane_v3(), dist_signed_to_plane_v3(), dist_squared_to_plane_v3(), draw_culling_box_test(), draw_culling_plane_test(), draw_culling_sphere_test(), DRW_culling_min_max_test(), isect_aabb_planes_v3(), isect_point_planes_v3(), isect_point_planes_v3_negated(), plane_point_side_flip(), plane_point_test_v3(), sculpt_gesture_is_vertex_effected(), SCULPT_plane_point_side(), tree_intersect_plane_test(), and view3d_clipping_test().
MINLINE int poly_to_tri_count | ( | int | poly_count, |
int | corner_count | ||
) |
Simple function to either:
poly_count | The number of polygons or polygon-index (3+ sided faces, 1-2 sided give incorrect results). |
corner_count | The number of corners (also called loop-index). |
Definition at line 224 of file math_geom_inline.c.
References BLI_assert.
Referenced by bake_targets_populate_pixels_color_attributes(), BKE_editmesh_looptri_calc_with_partial_ex(), BKE_mesh_runtime_looptri_len(), bm_mesh_calc_tessellation__single_threaded(), BM_mesh_calc_tessellation_beauty(), BMD_mesh_intersection(), bpy_bmesh_calc_loop_triangles(), build_pbvh_from_regular_mesh(), C_BVHTree_FromBMesh(), ccgDM_recalcLoopTri(), DM_ensure_looptri_data(), dm_getNumLoopTri(), ED_draw_object_facemap(), editmesh_tessface_calc_intern(), blender::draw::extract_tris_iter_poly_bm(), blender::draw::extract_tris_iter_poly_mesh(), blender::render::texturemargin::generate_margin(), heat_bone_weighting(), Freestyle::BlenderFileLoader::insertShapeNode(), mesh_calc_tessellation_for_face_fn(), mesh_calc_tessellation_for_face_with_normal_fn(), mesh_calc_tri_tessface(), mesh_ensure_looptri_data(), mesh_faces_to_scratch(), mesh_recalc_looptri__single_threaded(), mesh_render_data_create(), mesh_tessface_calc(), RE_bake_pixels_populate(), sculpt_gesture_apply_trim(), snap_object_data_editmesh_treedata_get(), and stats_mesheval().
Useful to calculate an even width shell, by taking the angle between 2 planes. The return value is a scale on the offset. no angle between planes is 1.0, as the angle between the 2 planes approaches 180d the distance gets very high, 180d would be inf, but this case isn't valid.
Definition at line 235 of file math_geom_inline.c.
References angle(), cosf, fabsf, SMALL_NUMBER, and UNLIKELY.
Referenced by Bend(), and BM_mesh_wireframe().
Equivalent to shell_angle_to_dist(angle_normalized_v2v2(a, b) / 2)
.
Definition at line 265 of file math_geom_inline.c.
References Freestyle::a, add_v2_v2v2(), usdtokens::b(), BLI_ASSERT_UNIT_V2, dot_v2v2(), fabsf, normalize_v2(), SMALL_NUMBER, and UNLIKELY.
Equivalent to shell_angle_to_dist(angle_normalized_v2v2(a, b))
.
Definition at line 246 of file math_geom_inline.c.
References Freestyle::a, usdtokens::b(), BLI_ASSERT_UNIT_V2, dot_v2v2(), fabsf, SMALL_NUMBER, and UNLIKELY.
Equivalent to shell_angle_to_dist(angle_normalized_v3v3(a, b) / 2)
.
Definition at line 254 of file math_geom_inline.c.
References Freestyle::a, add_v3_v3v3(), usdtokens::b(), BLI_ASSERT_UNIT_V3, dot_v3v3(), fabsf, normalize_v3(), SMALL_NUMBER, and UNLIKELY.
Referenced by alter_co(), bmo_face_inset_individual(), and bmo_inset_region_exec().
Equivalent to shell_angle_to_dist(angle_normalized_v3v3(a, b))
.
Definition at line 239 of file math_geom_inline.c.
References Freestyle::a, usdtokens::b(), BLI_ASSERT_UNIT_V3, dot_v3v3(), fabsf, SMALL_NUMBER, and UNLIKELY.
Referenced by BM_vert_calc_shell_factor(), BM_vert_calc_shell_factor_ex(), bmo_inset_region_exec(), MOD_solidify_extrude_modifyMesh(), and solidify_add_thickness().
Definition at line 106 of file math_geom_inline.c.
References copy_sh_sh(), mul_sh_fl(), r, sh, v, x, y, and z.
Referenced by eval_shv3().