|
Blender V4.3
|
Functions | |
| template<typename T > | |
| T | calc_average (const Span< T > positions, const Span< int > indices) |
| template<typename T > | |
| void | neighbor_data_average_mesh_check_loose (const Span< T > src, const Span< int > verts, const Span< Vector< int > > vert_neighbors, const MutableSpan< T > dst) |
| template void | neighbor_data_average_mesh_check_loose< float > (Span< float >, Span< int >, Span< Vector< int > >, MutableSpan< float >) |
| template void | neighbor_data_average_mesh_check_loose< float3 > (Span< float3 >, Span< int >, Span< Vector< int > >, MutableSpan< float3 >) |
| template<typename T > | |
| void | neighbor_data_average_mesh (const Span< T > src, const Span< Vector< int > > vert_neighbors, const MutableSpan< T > dst) |
| template void | neighbor_data_average_mesh< float > (Span< float >, Span< Vector< int > >, MutableSpan< float >) |
| template void | neighbor_data_average_mesh< float3 > (Span< float3 >, Span< Vector< int > >, MutableSpan< float3 >) |
| template void | neighbor_data_average_mesh< float4 > (Span< float4 >, Span< Vector< int > >, MutableSpan< float4 >) |
| static float3 | average_positions (const CCGKey &key, const Span< float3 > positions, const Span< SubdivCCGCoord > coords) |
| void | neighbor_position_average_interior_grids (const OffsetIndices< int > faces, const Span< int > corner_verts, const BitSpan boundary_verts, const SubdivCCG &subdiv_ccg, const Span< int > grids, const MutableSpan< float3 > new_positions) |
| template<typename T > | |
| void | average_data_grids (const SubdivCCG &subdiv_ccg, const Span< T > src, const Span< int > grids, const MutableSpan< T > dst) |
| template<typename T > | |
| void | average_data_bmesh (const Span< T > src, const Set< BMVert *, 0 > &verts, const MutableSpan< T > dst) |
| template void | average_data_grids< float > (const SubdivCCG &, Span< float >, Span< int >, MutableSpan< float >) |
| template void | average_data_grids< float3 > (const SubdivCCG &, Span< float3 >, Span< int >, MutableSpan< float3 >) |
| template void | average_data_bmesh< float > (Span< float > src, const Set< BMVert *, 0 > &, MutableSpan< float >) |
| template void | average_data_bmesh< float3 > (Span< float3 > src, const Set< BMVert *, 0 > &, MutableSpan< float3 >) |
| static float3 | average_positions (const Span< const BMVert * > verts) |
| void | neighbor_position_average_bmesh (const Set< BMVert *, 0 > &verts, const MutableSpan< float3 > new_positions) |
| void | neighbor_position_average_interior_bmesh (const Set< BMVert *, 0 > &verts, const MutableSpan< float3 > new_positions) |
| void | bmesh_four_neighbor_average (float avg[3], const float3 &direction, const BMVert *v) |
| void | neighbor_color_average (const OffsetIndices< int > faces, const Span< int > corner_verts, const GroupedSpan< int > vert_to_face_map, const GSpan color_attribute, const bke::AttrDomain color_domain, const Span< Vector< int > > vert_neighbors, const MutableSpan< float4 > smooth_colors) |
| void | surface_smooth_laplacian_step (const Span< float3 > positions, const Span< float3 > orig_positions, const Span< float3 > average_positions, const float alpha, MutableSpan< float3 > laplacian_disp, MutableSpan< float3 > translations) |
| void | surface_smooth_displace_step (const Span< float3 > laplacian_disp, const Span< float3 > average_laplacian_disp, const float beta, const MutableSpan< float3 > translations) |
| static float3 | translation_to_plane (const float3 ¤t_position, const float3 &normal, const float3 &smoothed_position) |
| static float3 | calc_boundary_normal_corner (const float3 ¤t_position, const Span< float3 > vert_positions, const Span< int > neighbors) |
| static float3 | calc_boundary_normal_corner (const CCGKey &key, const Span< float3 > positions, const float3 ¤t_position, const Span< SubdivCCGCoord > neighbors) |
| static float3 | calc_boundary_normal_corner (const float3 ¤t_position, const Span< BMVert * > neighbors) |
| void | calc_relaxed_translations_faces (const Span< float3 > vert_positions, const Span< float3 > vert_normals, const OffsetIndices< int > faces, const Span< int > corner_verts, const GroupedSpan< int > vert_to_face_map, const BitSpan boundary_verts, const Span< int > face_sets, const Span< bool > hide_poly, const bool filter_boundary_face_sets, const Span< int > verts, const Span< float > factors, Vector< Vector< int > > &neighbors, const MutableSpan< float3 > translations) |
| void | calc_relaxed_translations_grids (const SubdivCCG &subdiv_ccg, const OffsetIndices< int > faces, const Span< int > corner_verts, const Span< int > face_sets, const GroupedSpan< int > vert_to_face_map, const BitSpan boundary_verts, const Span< int > grids, const bool filter_boundary_face_sets, const Span< float > factors, Vector< Vector< SubdivCCGCoord > > &neighbors, const MutableSpan< float3 > translations) |
| void | calc_relaxed_translations_bmesh (const Set< BMVert *, 0 > &verts, const Span< float3 > positions, const int face_set_offset, const bool filter_boundary_face_sets, const Span< float > factors, Vector< Vector< BMVert * > > &neighbors, const MutableSpan< float3 > translations) |
| void | blur_geometry_data_array (const Object &object, const int iterations, const MutableSpan< float > data) |
| void blender::ed::sculpt_paint::smooth::average_data_bmesh | ( | const Span< T > | src, |
| const Set< BMVert *, 0 > & | verts, | ||
| const MutableSpan< T > | dst ) |
Definition at line 213 of file sculpt_smooth.cc.
References BM_elem_index_get, blender::Span< T >::size(), sum(), blender::ed::sculpt_paint::vert_neighbors_get_bmesh(), and verts.
Referenced by blur_geometry_data_array(), blender::ed::sculpt_paint::filter::calc_surface_smooth_filter(), and blender::ed::sculpt_paint::filter::mesh_filter_sharpen_init().
| template void blender::ed::sculpt_paint::smooth::average_data_bmesh< float > | ( | Span< float > | src, |
| const Set< BMVert *, 0 > & | , | ||
| MutableSpan< float > | ) |
| template void blender::ed::sculpt_paint::smooth::average_data_bmesh< float3 > | ( | Span< float3 > | src, |
| const Set< BMVert *, 0 > & | , | ||
| MutableSpan< float3 > | ) |
| void blender::ed::sculpt_paint::smooth::average_data_grids | ( | const SubdivCCG & | subdiv_ccg, |
| const Span< T > | src, | ||
| const Span< int > | grids, | ||
| const MutableSpan< T > | dst ) |
Definition at line 172 of file sculpt_smooth.cc.
References BKE_subdiv_ccg_key_top_level(), BKE_subdiv_ccg_neighbor_coords_get(), BLI_assert, CCG_grid_xy_to_index(), SubdivCCGNeighbors::coords, CCGKey::grid_area, SubdivCCGCoord::grid_index, CCGKey::grid_size, blender::Span< T >::index_range(), blender::MutableSpan< T >::size(), blender::Span< T >::size(), blender::Vector< T, InlineBufferCapacity, Allocator >::size(), sum(), x, and y.
Referenced by blur_geometry_data_array(), blender::ed::sculpt_paint::filter::calc_sharpen_filter(), blender::ed::sculpt_paint::filter::calc_surface_smooth_filter(), blender::ed::sculpt_paint::filter::mesh_filter_sharpen_init(), blender::ed::sculpt_paint::mask::sharpen_mask_grids(), and blender::ed::sculpt_paint::mask::smooth_mask_grids().
| template void blender::ed::sculpt_paint::smooth::average_data_grids< float > | ( | const SubdivCCG & | , |
| Span< float > | , | ||
| Span< int > | , | ||
| MutableSpan< float > | ) |
| template void blender::ed::sculpt_paint::smooth::average_data_grids< float3 > | ( | const SubdivCCG & | , |
| Span< float3 > | , | ||
| Span< int > | , | ||
| MutableSpan< float3 > | ) |
|
static |
Definition at line 99 of file sculpt_smooth.cc.
References blender::math::rcp(), result, and blender::Span< T >::size().
Referenced by calc_relaxed_translations_bmesh(), calc_relaxed_translations_grids(), neighbor_position_average_bmesh(), neighbor_position_average_interior_bmesh(), neighbor_position_average_interior_grids(), and surface_smooth_laplacian_step().
|
static |
Definition at line 244 of file sculpt_smooth.cc.
References blender::math::rcp(), result, and verts.
| void blender::ed::sculpt_paint::smooth::blur_geometry_data_array | ( | const Object & | object, |
| const int | iterations, | ||
| const MutableSpan< float > | data ) |
Definition at line 675 of file sculpt_smooth.cc.
References blender::bke::pbvh::all_leaf_nodes(), blender::MutableSpan< T >::as_span(), average_data_bmesh(), average_data_grids(), BKE_pbvh_bmesh_node_unique_verts(), BKE_subdiv_ccg_foreach_visible_grid_vert(), BKE_subdiv_ccg_key_top_level(), BM_elem_flag_test, BM_ELEM_HIDDEN, BM_elem_index_get, blender::bke::pbvh::BMesh, blender::ed::sculpt_paint::calc_vert_neighbors(), blender::bke::Face, blender::index_mask::IndexMask::foreach_index(), CCGKey::grid_area, blender::bke::pbvh::Grids, blender::Span< T >::index_range(), blender::bits::BitGroupVector< InlineBufferCapacity, Allocator >::is_empty(), blender::threading::EnumerableThreadSpecific< T >::local(), blender::bke::pbvh::Mesh, neighbor_data_average_mesh(), blender::ed::sculpt_paint::hide::node_visible_verts(), blender::bke::pbvh::Tree::nodes(), blender::bke::object::pbvh_get(), blender::bke::Point, blender::ed::sculpt_paint::scatter_data_grids(), blender::ed::sculpt_paint::scatter_data_mesh(), blender::Span< T >::size(), SculptSession::subdiv_ccg, blender::bke::pbvh::Tree::type(), and verts.
Referenced by blender::ed::sculpt_paint::expand::normals_falloff_create().
| void blender::ed::sculpt_paint::smooth::bmesh_four_neighbor_average | ( | float | avg[3], |
| const float3 & | direction, | ||
| const BMVert * | v ) |
For bmesh: Average surrounding verts based on an orthogonality measure. Naturally converges to a quad-like structure.
Definition at line 287 of file sculpt_smooth.cc.
References add_v3_v3(), BM_edge_is_boundary(), BM_EDGES_OF_VERT, BM_ITER_ELEM, BMVert::co, copy_v3_v3(), dot_v3v3(), e, madd_v3_v3fl(), mul_v3_v3fl(), BMVert::no, normalize_v3(), sub_v3_v3(), sub_v3_v3v3(), v, and zero_v3().
| T blender::ed::sculpt_paint::smooth::calc_average | ( | const Span< T > | positions, |
| const Span< int > | indices ) |
Definition at line 37 of file sculpt_smooth.cc.
References indices, blender::math::rcp(), and result.
Referenced by calc_relaxed_translations_faces(), neighbor_data_average_mesh(), and neighbor_data_average_mesh_check_loose().
|
static |
Definition at line 416 of file sculpt_smooth.cc.
References blender::math::normalize().
|
static |
Definition at line 429 of file sculpt_smooth.cc.
References blender::math::normalize().
|
static |
Definition at line 404 of file sculpt_smooth.cc.
References blender::math::normalize().
Referenced by calc_relaxed_translations_bmesh(), calc_relaxed_translations_faces(), and calc_relaxed_translations_grids().
| void blender::ed::sculpt_paint::smooth::calc_relaxed_translations_bmesh | ( | const Set< BMVert *, 0 > & | verts, |
| const Span< float3 > | positions, | ||
| const int | face_set_offset, | ||
| const bool | filter_boundary_face_sets, | ||
| const Span< float > | factors, | ||
| Vector< Vector< BMVert * > > & | neighbors, | ||
| const MutableSpan< float3 > | translations ) |
Definition at line 606 of file sculpt_smooth.cc.
References average_positions(), BLI_assert, BM_vert_is_boundary(), calc_boundary_normal_corner(), blender::ed::sculpt_paint::calc_vert_neighbors_interior(), blender::math::is_zero(), blender::MutableSpan< T >::size(), blender::Span< T >::size(), size(), translation_to_plane(), blender::ed::sculpt_paint::face_set::vert_has_unique_face_set(), and verts.
Referenced by blender::ed::sculpt_paint::filter::calc_relax_face_sets_filter(), and blender::ed::sculpt_paint::filter::calc_relax_filter().
| void blender::ed::sculpt_paint::smooth::calc_relaxed_translations_faces | ( | const Span< float3 > | vert_positions, |
| const Span< float3 > | vert_normals, | ||
| const OffsetIndices< int > | faces, | ||
| const Span< int > | corner_verts, | ||
| const GroupedSpan< int > | vert_to_face_map, | ||
| const BitSpan | boundary_verts, | ||
| const Span< int > | face_sets, | ||
| const Span< bool > | hide_poly, | ||
| const bool | filter_boundary_face_sets, | ||
| const Span< int > | verts, | ||
| const Span< float > | factors, | ||
| Vector< Vector< int > > & | neighbors, | ||
| const MutableSpan< float3 > | translations ) |
Definition at line 441 of file sculpt_smooth.cc.
References BLI_assert, calc_average(), calc_boundary_normal_corner(), blender::ed::sculpt_paint::calc_vert_neighbors_interior(), blender::math::is_zero(), blender::MutableSpan< T >::size(), blender::Span< T >::size(), size(), translation_to_plane(), blender::ed::sculpt_paint::face_set::vert_has_unique_face_set(), and verts.
Referenced by blender::ed::sculpt_paint::filter::calc_relax_face_sets_filter(), and blender::ed::sculpt_paint::filter::calc_relax_filter().
| void blender::ed::sculpt_paint::smooth::calc_relaxed_translations_grids | ( | const SubdivCCG & | subdiv_ccg, |
| const OffsetIndices< int > | faces, | ||
| const Span< int > | corner_verts, | ||
| const Span< int > | face_sets, | ||
| const GroupedSpan< int > | vert_to_face_map, | ||
| const BitSpan | boundary_verts, | ||
| const Span< int > | grids, | ||
| const bool | filter_boundary_face_sets, | ||
| const Span< float > | factors, | ||
| Vector< Vector< SubdivCCGCoord > > & | neighbors, | ||
| const MutableSpan< float3 > | translations ) |
Definition at line 512 of file sculpt_smooth.cc.
References average_positions(), BKE_subdiv_ccg_coord_is_mesh_boundary(), BKE_subdiv_ccg_key_top_level(), BLI_assert, calc_boundary_normal_corner(), blender::ed::sculpt_paint::calc_vert_neighbors_interior(), CCG_grid_xy_to_index(), CCGKey::grid_area, SubdivCCGCoord::grid_index, blender::bke::ccg::grid_range(), CCGKey::grid_size, blender::Span< T >::index_range(), blender::math::is_zero(), SubdivCCG::normals, SubdivCCG::positions, blender::MutableSpan< T >::size(), blender::Span< T >::size(), size(), translation_to_plane(), blender::ed::sculpt_paint::face_set::vert_has_unique_face_set(), x, and y.
Referenced by blender::ed::sculpt_paint::filter::calc_relax_face_sets_filter(), and blender::ed::sculpt_paint::filter::calc_relax_filter().
| void blender::ed::sculpt_paint::smooth::neighbor_color_average | ( | const OffsetIndices< int > | faces, |
| const Span< int > | corner_verts, | ||
| const GroupedSpan< int > | vert_to_face_map, | ||
| const GSpan | color_attribute, | ||
| const bke::AttrDomain | color_domain, | ||
| const Span< Vector< int > > | vert_neighbors, | ||
| const MutableSpan< float4 > | smooth_colors ) |
Definition at line 331 of file sculpt_smooth.cc.
References BLI_assert, blender::ed::sculpt_paint::color::color_vert_get(), blender::MutableSpan< T >::size(), blender::Span< T >::size(), and sum().
Referenced by blender::ed::sculpt_paint::color::color_filter_task().
| void blender::ed::sculpt_paint::smooth::neighbor_data_average_mesh | ( | const Span< T > | src, |
| const Span< Vector< int > > | vert_neighbors, | ||
| const MutableSpan< T > | dst ) |
Definition at line 77 of file sculpt_smooth.cc.
References BLI_assert, calc_average(), and blender::MutableSpan< T >::size().
Referenced by blur_geometry_data_array(), blender::ed::sculpt_paint::color::sculpt_color_presmooth_init(), blender::ed::sculpt_paint::mask::sharpen_mask_mesh(), and blender::ed::sculpt_paint::mask::smooth_mask_mesh().
| template void blender::ed::sculpt_paint::smooth::neighbor_data_average_mesh< float > | ( | Span< float > | , |
| Span< Vector< int > > | , | ||
| MutableSpan< float > | ) |
| template void blender::ed::sculpt_paint::smooth::neighbor_data_average_mesh< float3 > | ( | Span< float3 > | , |
| Span< Vector< int > > | , | ||
| MutableSpan< float3 > | ) |
| template void blender::ed::sculpt_paint::smooth::neighbor_data_average_mesh< float4 > | ( | Span< float4 > | , |
| Span< Vector< int > > | , | ||
| MutableSpan< float4 > | ) |
| void blender::ed::sculpt_paint::smooth::neighbor_data_average_mesh_check_loose | ( | const Span< T > | src, |
| const Span< int > | verts, | ||
| const Span< Vector< int > > | vert_neighbors, | ||
| const MutableSpan< T > | dst ) |
Definition at line 48 of file sculpt_smooth.cc.
References BLI_assert, calc_average(), blender::Span< T >::is_empty(), blender::MutableSpan< T >::size(), and verts.
Referenced by blender::ed::sculpt_paint::filter::calc_sharpen_filter(), blender::ed::sculpt_paint::filter::calc_smooth_filter(), blender::ed::sculpt_paint::filter::calc_surface_smooth_filter(), and blender::ed::sculpt_paint::filter::mesh_filter_sharpen_init().
| template void blender::ed::sculpt_paint::smooth::neighbor_data_average_mesh_check_loose< float > | ( | Span< float > | , |
| Span< int > | , | ||
| Span< Vector< int > > | , | ||
| MutableSpan< float > | ) |
| template void blender::ed::sculpt_paint::smooth::neighbor_data_average_mesh_check_loose< float3 > | ( | Span< float3 > | , |
| Span< int > | , | ||
| Span< Vector< int > > | , | ||
| MutableSpan< float3 > | ) |
| void blender::ed::sculpt_paint::smooth::neighbor_position_average_bmesh | ( | const Set< BMVert *, 0 > & | verts, |
| const MutableSpan< float3 > | new_positions ) |
Definition at line 254 of file sculpt_smooth.cc.
References average_positions(), BLI_assert, blender::MutableSpan< T >::size(), blender::ed::sculpt_paint::vert_neighbors_get_bmesh(), and verts.
Referenced by blender::ed::sculpt_paint::filter::calc_sharpen_filter(), and blender::ed::sculpt_paint::filter::calc_surface_smooth_filter().
| void blender::ed::sculpt_paint::smooth::neighbor_position_average_interior_bmesh | ( | const Set< BMVert *, 0 > & | verts, |
| const MutableSpan< float3 > | new_positions ) |
Definition at line 268 of file sculpt_smooth.cc.
References average_positions(), BLI_assert, blender::Span< T >::is_empty(), blender::MutableSpan< T >::size(), blender::ed::sculpt_paint::vert_neighbors_get_interior_bmesh(), and verts.
Referenced by blender::ed::sculpt_paint::filter::calc_smooth_filter().
| void blender::ed::sculpt_paint::smooth::neighbor_position_average_interior_grids | ( | const OffsetIndices< int > | faces, |
| const Span< int > | corner_verts, | ||
| const BitSpan | boundary_verts, | ||
| const SubdivCCG & | subdiv_ccg, | ||
| const Span< int > | grids, | ||
| const MutableSpan< float3 > | new_positions ) |
Definition at line 111 of file sculpt_smooth.cc.
References average_positions(), BKE_subdiv_ccg_coord_is_mesh_boundary(), BKE_subdiv_ccg_key_top_level(), BKE_subdiv_ccg_neighbor_coords_get(), BLI_assert, CCG_grid_xy_to_index(), blender::Vector< T, InlineBufferCapacity, Allocator >::clear(), SubdivCCGNeighbors::coords, CCGKey::grid_area, SubdivCCGCoord::grid_index, blender::bke::ccg::grid_range(), CCGKey::grid_size, blender::Span< T >::index_range(), blender::Vector< T, InlineBufferCapacity, Allocator >::is_empty(), SubdivCCG::positions, blender::Vector< T, InlineBufferCapacity, Allocator >::remove_if(), blender::MutableSpan< T >::size(), blender::Span< T >::size(), blender::Vector< T, InlineBufferCapacity, Allocator >::size(), x, and y.
Referenced by blender::ed::sculpt_paint::filter::calc_smooth_filter().
| void blender::ed::sculpt_paint::smooth::surface_smooth_displace_step | ( | const Span< float3 > | laplacian_disp, |
| const Span< float3 > | average_laplacian_disp, | ||
| const float | beta, | ||
| const MutableSpan< float3 > | translations ) |
Definition at line 376 of file sculpt_smooth.cc.
References beta(), BLI_assert, blender::Span< T >::index_range(), blender::MutableSpan< T >::size(), and blender::Span< T >::size().
Referenced by blender::ed::sculpt_paint::filter::calc_surface_smooth_filter().
| void blender::ed::sculpt_paint::smooth::surface_smooth_laplacian_step | ( | const Span< float3 > | positions, |
| const Span< float3 > | orig_positions, | ||
| const Span< float3 > | average_positions, | ||
| const float | alpha, | ||
| MutableSpan< float3 > | laplacian_disp, | ||
| MutableSpan< float3 > | translations ) |
Definition at line 355 of file sculpt_smooth.cc.
References average_positions(), BLI_assert, blender::MutableSpan< T >::size(), and blender::Span< T >::size().
Referenced by blender::ed::sculpt_paint::filter::calc_surface_smooth_filter().
|
static |
Definition at line 391 of file sculpt_smooth.cc.
References closest_to_plane_v3(), and plane_from_point_normal_v3().
Referenced by calc_relaxed_translations_bmesh(), calc_relaxed_translations_faces(), and calc_relaxed_translations_grids().