Blender V5.0
blender::ed::sculpt_paint::DensitySubtractOperationExecutor Struct Reference

Public Member Functions

 DensitySubtractOperationExecutor (const bContext &C)
void execute (DensitySubtractOperation &self, const bContext &C, const StrokeExtension &stroke_extension)
void reduce_density_projected_with_symmetry (MutableSpan< bool > curves_to_keep)
void reduce_density_projected (const float4x4 &brush_transform, MutableSpan< bool > curves_to_keep)
void reduce_density_spherical_with_symmetry (MutableSpan< bool > curves_to_keep)
void reduce_density_spherical (const float3 &brush_pos_cu, const float brush_radius_cu, MutableSpan< bool > curves_to_keep)

Public Attributes

DensitySubtractOperationself_ = nullptr
CurvesSculptCommonContext ctx_
Objectobject_ = nullptr
Curvescurves_id_ = nullptr
CurvesGeometrycurves_ = nullptr
IndexMaskMemory selected_curve_memory_
IndexMask curve_selection_
Objectsurface_ob_orig_ = nullptr
Meshsurface_orig_ = nullptr
Objectsurface_ob_eval_ = nullptr
Meshsurface_eval_ = nullptr
bke::BVHTreeFromMesh surface_bvh_eval_
const CurvesSculptcurves_sculpt_ = nullptr
const Brushbrush_ = nullptr
float brush_radius_base_re_
float brush_radius_factor_
float brush_strength_
float2 brush_pos_re_
float minimum_distance_
CurvesSurfaceTransforms transforms_
KDTree_3d * root_points_kdtree_

Detailed Description

Utility class that actually executes the update when the stroke is updated. That's useful because it avoids passing a very large number of parameters between functions.

Definition at line 499 of file curves_sculpt_density.cc.

Constructor & Destructor Documentation

◆ DensitySubtractOperationExecutor()

blender::ed::sculpt_paint::DensitySubtractOperationExecutor::DensitySubtractOperationExecutor ( const bContext & C)
inline

Definition at line 530 of file curves_sculpt_density.cc.

References C, and ctx_.

Member Function Documentation

◆ execute()

void blender::ed::sculpt_paint::DensitySubtractOperationExecutor::execute ( DensitySubtractOperation & self,
const bContext & C,
const StrokeExtension & stroke_extension )
inline

Definition at line 532 of file curves_sculpt_density.cc.

References blender::Vector< T, InlineBufferCapacity, Allocator >::as_mutable_span(), BKE_brush_radius_get(), BKE_object_get_evaluated_mesh(), BKE_paint_brush_for_read(), BLI_assert, BLI_assert_unreachable, BLI_SCOPED_DEFER, brush_, brush_pos_re_, brush_radius_base_re_, blender::ed::sculpt_paint::brush_radius_factor(), brush_radius_factor_, brush_strength_, blender::ed::sculpt_paint::brush_strength_get(), C, ctx_, CTX_data_active_object(), curve_selection_, curves_, blender::bke::curves_copy_curve_selection(), curves_id_, curves_sculpt_, DEG_get_evaluated(), DEG_id_tag_update(), ED_region_tag_redraw(), IndexMask::from_bools(), blender::array_utils::gather(), blender::bke::crazyspace::get_evaluated_curves_deformation(), ID_RECALC_GEOMETRY, blender::ed::sculpt_paint::StrokeExtension::is_first, minimum_distance_, blender::ed::sculpt_paint::StrokeExtension::mouse_position, NC_GEOM, ND_DATA, object_, PAINT_FALLOFF_SHAPE_SPHERE, PAINT_FALLOFF_SHAPE_TUBE, blender::bke::crazyspace::GeometryDeformation::positions, reduce_density_projected_with_symmetry(), reduce_density_spherical_with_symmetry(), blender::ed::curves::retrieve_selected_curves(), root_points_kdtree_, selected_curve_memory_, self, self_, blender::index_mask::IndexMask::size(), surface_bvh_eval_, surface_eval_, surface_ob_eval_, surface_ob_orig_, surface_orig_, transforms_, and WM_main_add_notifier().

Referenced by blender::ed::sculpt_paint::DensitySubtractOperation::on_stroke_extended().

◆ reduce_density_projected()

void blender::ed::sculpt_paint::DensitySubtractOperationExecutor::reduce_density_projected ( const float4x4 & brush_transform,
MutableSpan< bool > curves_to_keep )
inline

◆ reduce_density_projected_with_symmetry()

void blender::ed::sculpt_paint::DensitySubtractOperationExecutor::reduce_density_projected_with_symmetry ( MutableSpan< bool > curves_to_keep)
inline

◆ reduce_density_spherical()

void blender::ed::sculpt_paint::DensitySubtractOperationExecutor::reduce_density_spherical ( const float3 & brush_pos_cu,
const float brush_radius_cu,
MutableSpan< bool > curves_to_keep )
inline

◆ reduce_density_spherical_with_symmetry()

void blender::ed::sculpt_paint::DensitySubtractOperationExecutor::reduce_density_spherical_with_symmetry ( MutableSpan< bool > curves_to_keep)
inline

Member Data Documentation

◆ brush_

const Brush* blender::ed::sculpt_paint::DensitySubtractOperationExecutor::brush_ = nullptr

Definition at line 518 of file curves_sculpt_density.cc.

Referenced by execute().

◆ brush_pos_re_

float2 blender::ed::sculpt_paint::DensitySubtractOperationExecutor::brush_pos_re_

Definition at line 522 of file curves_sculpt_density.cc.

Referenced by execute(), and reduce_density_spherical_with_symmetry().

◆ brush_radius_base_re_

float blender::ed::sculpt_paint::DensitySubtractOperationExecutor::brush_radius_base_re_

◆ brush_radius_factor_

float blender::ed::sculpt_paint::DensitySubtractOperationExecutor::brush_radius_factor_

◆ brush_strength_

float blender::ed::sculpt_paint::DensitySubtractOperationExecutor::brush_strength_

Definition at line 521 of file curves_sculpt_density.cc.

Referenced by execute().

◆ ctx_

CurvesSculptCommonContext blender::ed::sculpt_paint::DensitySubtractOperationExecutor::ctx_

◆ curve_selection_

IndexMask blender::ed::sculpt_paint::DensitySubtractOperationExecutor::curve_selection_

Definition at line 508 of file curves_sculpt_density.cc.

Referenced by execute().

◆ curves_

CurvesGeometry* blender::ed::sculpt_paint::DensitySubtractOperationExecutor::curves_ = nullptr

◆ curves_id_

Curves* blender::ed::sculpt_paint::DensitySubtractOperationExecutor::curves_id_ = nullptr

◆ curves_sculpt_

const CurvesSculpt* blender::ed::sculpt_paint::DensitySubtractOperationExecutor::curves_sculpt_ = nullptr

Definition at line 517 of file curves_sculpt_density.cc.

Referenced by execute().

◆ minimum_distance_

float blender::ed::sculpt_paint::DensitySubtractOperationExecutor::minimum_distance_

Definition at line 524 of file curves_sculpt_density.cc.

Referenced by execute().

◆ object_

Object* blender::ed::sculpt_paint::DensitySubtractOperationExecutor::object_ = nullptr

Definition at line 503 of file curves_sculpt_density.cc.

Referenced by execute(), and reduce_density_projected().

◆ root_points_kdtree_

KDTree_3d* blender::ed::sculpt_paint::DensitySubtractOperationExecutor::root_points_kdtree_

Definition at line 528 of file curves_sculpt_density.cc.

Referenced by execute().

◆ selected_curve_memory_

IndexMaskMemory blender::ed::sculpt_paint::DensitySubtractOperationExecutor::selected_curve_memory_

Definition at line 507 of file curves_sculpt_density.cc.

Referenced by execute().

◆ self_

DensitySubtractOperation* blender::ed::sculpt_paint::DensitySubtractOperationExecutor::self_ = nullptr

Definition at line 500 of file curves_sculpt_density.cc.

Referenced by execute().

◆ surface_bvh_eval_

bke::BVHTreeFromMesh blender::ed::sculpt_paint::DensitySubtractOperationExecutor::surface_bvh_eval_

Definition at line 515 of file curves_sculpt_density.cc.

Referenced by execute(), and reduce_density_spherical_with_symmetry().

◆ surface_eval_

Mesh* blender::ed::sculpt_paint::DensitySubtractOperationExecutor::surface_eval_ = nullptr

Definition at line 514 of file curves_sculpt_density.cc.

Referenced by execute().

◆ surface_ob_eval_

Object* blender::ed::sculpt_paint::DensitySubtractOperationExecutor::surface_ob_eval_ = nullptr

Definition at line 513 of file curves_sculpt_density.cc.

Referenced by execute().

◆ surface_ob_orig_

Object* blender::ed::sculpt_paint::DensitySubtractOperationExecutor::surface_ob_orig_ = nullptr

Definition at line 510 of file curves_sculpt_density.cc.

Referenced by execute().

◆ surface_orig_

Mesh* blender::ed::sculpt_paint::DensitySubtractOperationExecutor::surface_orig_ = nullptr

Definition at line 511 of file curves_sculpt_density.cc.

Referenced by execute().

◆ transforms_

CurvesSurfaceTransforms blender::ed::sculpt_paint::DensitySubtractOperationExecutor::transforms_

Definition at line 526 of file curves_sculpt_density.cc.

Referenced by execute(), and reduce_density_spherical_with_symmetry().


The documentation for this struct was generated from the following file: