Blender V5.0
sculpt_smooth.cc File Reference
#include "sculpt_smooth.hh"
#include "BLI_enumerable_thread_specific.hh"
#include "BLI_math_base.hh"
#include "BLI_math_geom.h"
#include "BLI_math_vector.h"
#include "BLI_math_vector.hh"
#include "BKE_mesh.hh"
#include "BKE_paint.hh"
#include "BKE_paint_bvh.hh"
#include "BKE_subdiv_ccg.hh"
#include "mesh_brush_common.hh"
#include "sculpt_automask.hh"
#include "sculpt_color.hh"
#include "sculpt_face_set.hh"
#include "sculpt_hide.hh"
#include "sculpt_intern.hh"
#include "bmesh.hh"
#include <cstdlib>

Go to the source code of this file.

Namespaces

namespace  blender
namespace  blender::ed
namespace  blender::ed::sculpt_paint
namespace  blender::ed::sculpt_paint::smooth

Functions

template<typename T>
T blender::ed::sculpt_paint::smooth::calc_average (const Span< T > values, const Span< int > indices)
template<typename T>
void blender::ed::sculpt_paint::smooth::neighbor_data_average_mesh_check_loose (const Span< T > src, const Span< int > verts, const GroupedSpan< int > vert_neighbors, const MutableSpan< T > dst)
template void blender::ed::sculpt_paint::smooth::neighbor_data_average_mesh_check_loose< float > (Span< float >, Span< int >, GroupedSpan< int >, MutableSpan< float >)
template void blender::ed::sculpt_paint::smooth::neighbor_data_average_mesh_check_loose< float3 > (Span< float3 >, Span< int >, GroupedSpan< int >, MutableSpan< float3 >)
template<typename T>
void blender::ed::sculpt_paint::smooth::neighbor_data_average_mesh (const Span< T > src, const GroupedSpan< int > vert_neighbors, const MutableSpan< T > dst)
template void blender::ed::sculpt_paint::smooth::neighbor_data_average_mesh< float > (Span< float >, GroupedSpan< int >, MutableSpan< float >)
template void blender::ed::sculpt_paint::smooth::neighbor_data_average_mesh< float3 > (Span< float3 >, GroupedSpan< int >, MutableSpan< float3 >)
template void blender::ed::sculpt_paint::smooth::neighbor_data_average_mesh< float4 > (Span< float4 >, GroupedSpan< int >, MutableSpan< float4 >)
static float3 blender::ed::sculpt_paint::smooth::average_positions (const CCGKey &key, const Span< float3 > positions, const Span< SubdivCCGCoord > coords)
template<bool use_factors>
static void blender::ed::sculpt_paint::smooth::neighbor_position_average_interior_grids_impl (const OffsetIndices< int > faces, const Span< int > corner_verts, const BitSpan boundary_verts, const SubdivCCG &subdiv_ccg, const Span< int > grids, const Span< float > factors, const MutableSpan< float3 > new_positions)
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)
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 Span< float > factors, const MutableSpan< float3 > new_positions)
template<typename T>
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)
template<typename T>
void blender::ed::sculpt_paint::smooth::average_data_bmesh (const Span< T > src, const Set< BMVert *, 0 > &verts, const MutableSpan< T > dst)
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 >)
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 >)
static float3 blender::ed::sculpt_paint::smooth::average_positions (const Span< const BMVert * > verts)
void blender::ed::sculpt_paint::smooth::neighbor_position_average_bmesh (const Set< BMVert *, 0 > &verts, const MutableSpan< float3 > new_positions)
template<bool use_factors>
static void blender::ed::sculpt_paint::smooth::neighbor_position_average_interior_bmesh_impl (const Set< BMVert *, 0 > &verts, const Span< float > factors, const MutableSpan< float3 > new_positions)
void blender::ed::sculpt_paint::smooth::neighbor_position_average_interior_bmesh (const Set< BMVert *, 0 > &verts, const Span< float > factors, const MutableSpan< float3 > new_positions)
void blender::ed::sculpt_paint::smooth::neighbor_position_average_interior_bmesh (const Set< BMVert *, 0 > &verts, const MutableSpan< float3 > new_positions)
void blender::ed::sculpt_paint::smooth::bmesh_four_neighbor_average (float avg[3], const float3 &direction, const BMVert *v)
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 GroupedSpan< int > vert_neighbors, const MutableSpan< float4 > smooth_colors)
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)
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)
static float3 blender::ed::sculpt_paint::smooth::translation_to_plane (const float3 &current_position, const float3 &normal, const float3 &smoothed_position)
static float3 blender::ed::sculpt_paint::smooth::calc_boundary_normal_corner (const float3 &current_position, const Span< float3 > vert_positions, const Span< int > neighbors)
static float3 blender::ed::sculpt_paint::smooth::calc_boundary_normal_corner (const CCGKey &key, const Span< float3 > positions, const float3 &current_position, const Span< SubdivCCGCoord > neighbors)
static float3 blender::ed::sculpt_paint::smooth::calc_boundary_normal_corner (const float3 &current_position, const Span< BMVert * > neighbors)
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, const MutableSpan< float3 > translations)
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, const MutableSpan< float3 > translations)
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, const MutableSpan< float3 > translations)
void blender::ed::sculpt_paint::smooth::blur_geometry_data_array (const Object &object, const int iterations, const MutableSpan< float > data)