28inline namespace multires_displacement_eraser_cc {
45 subdiv_ccg, key, grids[i], limit_positions.
slice(start, key.
grid_area));
70 for (
const int i : positions.index_range()) {
71 translations[i] -= positions[i];
87 SubdivCCG &subdiv_ccg = *
object.sculpt->subdiv_ccg;
const Brush * BKE_paint_brush_for_read(const Paint *paint)
void BKE_subdiv_ccg_eval_limit_positions(const SubdivCCG &subdiv_ccg, const CCGKey &key, int grid_index, blender::MutableSpan< blender::float3 > r_limit_positions)
CCGKey BKE_subdiv_ccg_key_top_level(const SubdivCCG &subdiv_ccg)
Object is a sort of wrapper for general info.
constexpr MutableSpan slice(const int64_t start, const int64_t size) const
constexpr IndexRange index_range() const
void tag_positions_changed(const IndexMask &node_mask)
Span< NodeT > nodes() const
void foreach_index(Fn &&fn) const
const Depsgraph * depsgraph
pbvh::Tree * pbvh_get(Object &object)
void update_node_bounds_grids(int grid_area, Span< float3 > positions, GridsNode &node)
void flush_bounds_to_parents(Tree &pbvh)
static void calc_node(const Depsgraph &depsgraph, const Sculpt &sd, Object &object, const Brush &brush, const float strength, bke::pbvh::GridsNode &node, LocalData &tls)
static BLI_NOINLINE void calc_limit_positions(const SubdivCCG &subdiv_ccg, const Span< int > grids, const MutableSpan< float3 > limit_positions)
MutableSpan< float3 > gather_grids_positions(const SubdivCCG &subdiv_ccg, const Span< int > grids, Vector< float3 > &positions)
void do_displacement_eraser_brush(const Depsgraph &depsgraph, const Sculpt &sd, Object &object, const IndexMask &node_mask)
void calc_factors_common_grids(const Depsgraph &depsgraph, const Brush &brush, const Object &object, Span< float3 > positions, const bke::pbvh::GridsNode &node, Vector< float > &r_factors, Vector< float > &r_distances)
void scale_translations(MutableSpan< float3 > translations, Span< float > factors)
void scale_factors(MutableSpan< float > factors, float strength)
void clip_and_lock_translations(const Sculpt &sd, const SculptSession &ss, Span< float3 > positions, Span< int > verts, MutableSpan< float3 > translations)
void apply_translations(Span< float3 > translations, Span< int > verts, MutableSpan< float3 > positions)
blender::ed::sculpt_paint::StrokeCache * cache
blender::Array< blender::float3 > positions
Vector< float > distances
Vector< float3 > translations
Vector< float3 > positions
Vector< float3 > positions
Vector< float > distances
Vector< float3 > translations