|
Blender V4.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 10 of file math_geom_inline.c.
Definition at line 17 of file math_geom_inline.c.
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.c.
References area_tri_signed_v2(), and v2.
Definition at line 26 of file math_geom_inline.c.
References v2.
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, 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.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 62 of file math_geom_inline.c.
References fabsf.
The dominant axis of an orthogonal vector.
Definition at line 93 of file math_geom_inline.c.
Referenced by ED_view3d_cursor3d_position_rotation().
Get the single dominant axis value, 0==X, 1==Y, 2==Z.
Definition at line 85 of file math_geom_inline.c.
Referenced by calc_initial_placement_point_from_view(), distribute_grid(), isect_ray_tri_watertight_v3_precalc(), ortho_v3_v3(), and OVERLAY_volume_extra().
Scalar cross product of a 2D triangle.
area * 2.Definition at line 21 of file math_geom_inline.c.
References v2.
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(), project_face_winding_init(), TEST(), TEST(), and test_polyfill_winding().
Definition at line 101 of file math_geom_inline.c.
References z().
Referenced by blender::compositor::KeyingDespillOperation::update_memory_buffer_partial(), and blender::compositor::KeyingOperation::update_memory_buffer_partial().
Definition at line 109 of file math_geom_inline.c.
References z().
Referenced by view3d_ruler_pick().
Definition at line 123 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(), 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::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().
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 117 of file math_geom_inline.c.
References BLI_assert.
Referenced by blender::draw::accumululate_material_counts_mesh(), blender::ed::sculpt_paint::trim::apply_trim(), 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(), createTransEditVerts(), 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 128 of file math_geom_inline.c.
References 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 158 of file math_geom_inline.c.
References add_v2_v2v2(), 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 139 of file math_geom_inline.c.
References 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 147 of file math_geom_inline.c.
References add_v3_v3v3(), 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 132 of file math_geom_inline.c.
References 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().