|
Blender V5.0
|
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 10 of file math_geom_inline.cc.
| #define SMALL_NUMBER 1.e-8f |
Definition at line 17 of file math_geom_inline.cc.
Referenced by shell_angle_to_dist(), shell_v2v2_mid_normalized_to_dist(), shell_v2v2_normalized_to_dist(), shell_v3v3_mid_normalized_to_dist(), and shell_v3v3_normalized_to_dist().
Definition at line 36 of file math_geom_inline.cc.
References area_tri_signed_v2(), MINLINE, and v2.
Definition at line 26 of file math_geom_inline.cc.
Referenced by area_squared_tri_v2(), and area_tri_v2().
Definition at line 31 of file math_geom_inline.cc.
References area_tri_signed_v2(), fabsf, MINLINE, and v2.
Referenced by BKE_mesh_remap_calc_faces_from_mesh(), computeBindWeights(), IsectPT2Df_limit(), M_Geometry_area_tri(), project_paint_bleed_add_face_user(), blender::geometry::ReverseUVSampler::sample(), test_polyfill_area(), test_polyfill_area_tri_nonzero(), and transform_point_by_tri_v3().
Get the 2 dominant axis values, 0==X, 1==Y, 2==Z.
Definition at line 42 of file math_geom_inline.cc.
References fabsf, and MINLINE.
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 62 of file math_geom_inline.cc.
The dominant axis of an orthogonal vector.
Definition at line 91 of file math_geom_inline.cc.
References fabsf, MINLINE, 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 83 of file math_geom_inline.cc.
References fabsf, MINLINE, x, y, and z().
Referenced by calc_initial_placement_point_from_view(), distribute_grid(), isect_ray_tri_watertight_v3_precalc(), and ortho_v3_v3().
Scalar cross product of a 2D triangle.
Definition at line 21 of file math_geom_inline.cc.
Referenced by barycentric_weights_v2(), barycentric_weights_v2_clamped(), barycentric_weights_v2_persp(), BLI_polyfill_beautify_quad_rotate_calc_ex(), BLI_polyfill_edge_calc_rotate_beauty__area(), bm_loop_collapse_is_degenerate(), color_sample_remove_cost(), project_face_winding_init(), TEST(), TEST(), and test_polyfill_winding().
Definition at line 107 of file math_geom_inline.cc.
References MINLINE, x, y, and z().
Referenced by view3d_ruler_pick().
Definition at line 121 of file math_geom_inline.cc.
References dot_v3v3(), and MINLINE.
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(), blender::ed::sculpt_paint::filter_above_plane_factors(), blender::ed::sculpt_paint::filter_above_plane_factors(), blender::ed::sculpt_paint::filter_below_plane_factors(), blender::ed::sculpt_paint::filter_below_plane_factors(), blender::ed::sculpt_paint::brushes::filter_plane_side_factors(), blender::ed::sculpt_paint::gesture::is_affected(), isect_aabb_planes_v3(), isect_point_planes_v3(), isect_point_planes_v3_negated(), plane_point_test_v3(), 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 115 of file math_geom_inline.cc.
References BLI_assert, and MINLINE.
Referenced by blender::draw::accumululate_material_counts_mesh(), blender::ed::object::bake_targets_populate_pixels_color_attributes(), BKE_editmesh_looptris_calc_ex(), BKE_editmesh_looptris_calc_with_partial_ex(), BKE_mesh_runtime_corner_tris_len(), bm_mesh_calc_tessellation__single_threaded(), BM_mesh_calc_tessellation_beauty(), BMD_mesh_intersection(), bpy_bmesh_calc_loop_triangles(), C_BVHTree_FromBMesh(), blender::draw::pbvh::create_tri_index_mesh(), blender::ed::transform::createTransEditVerts(), blender::draw::extract_edituv_tris_mesh(), blender::render::texturemargin::generate_margin(), heat_bone_weighting(), Freestyle::BlenderFileLoader::insertShapeNode(), blender::geometry::boolean::mesh_bm_concat(), mesh_calc_tri_tessface(), mesh_faces_to_scratch(), blender::draw::mesh_render_data_create(), mesh_tessface_calc(), RE_bake_pixels_populate(), 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 126 of file math_geom_inline.cc.
References angle(), cosf, fabsf, MINLINE, SMALL_NUMBER, and UNLIKELY.
Referenced by blender::ed::transform::Bend(), and BM_mesh_wireframe().
Equivalent to shell_angle_to_dist(angle_normalized_v2v2(a, b) / 2).
Definition at line 156 of file math_geom_inline.cc.
References add_v2_v2v2(), b, BLI_ASSERT_UNIT_V2, dot_v2v2(), fabsf, MINLINE, normalize_v2(), SMALL_NUMBER, and UNLIKELY.
Equivalent to shell_angle_to_dist(angle_normalized_v2v2(a, b)).
Definition at line 137 of file math_geom_inline.cc.
References b, BLI_ASSERT_UNIT_V2, dot_v2v2(), fabsf, MINLINE, SMALL_NUMBER, and UNLIKELY.
Equivalent to shell_angle_to_dist(angle_normalized_v3v3(a, b) / 2).
Definition at line 145 of file math_geom_inline.cc.
References add_v3_v3v3(), b, BLI_ASSERT_UNIT_V3, dot_v3v3(), fabsf, MINLINE, 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 130 of file math_geom_inline.cc.
References b, BLI_ASSERT_UNIT_V3, dot_v3v3(), fabsf, MINLINE, 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().