Blender V5.0
sculpt_filter.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2024 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
8
9#pragma once
10
11#include <array>
12
13#include "BLI_array.hh"
14#include "BLI_index_mask.hh"
15
16#include "ED_view3d.hh"
17
18struct wmOperatorType;
19
20namespace blender {
21namespace bke::pbvh {
22class Node;
23}
24namespace ed::sculpt_paint {
26namespace auto_mask {
27struct Cache;
28}
29namespace cloth {
30struct SimulationData;
31}
32namespace undo {
33enum class Type : int8_t;
34}
35} // namespace ed::sculpt_paint
36} // namespace blender
37
39
41 Local = 0,
42 World = 1,
43 View = 2,
44};
45
46struct Cache {
47 std::array<bool, 3> enabled_axis;
49
50 /* Used for alternating between filter operations in filters that need to apply different ones to
51 * achieve certain effects. */
53
54 /* Stores the displacement produced by the laplacian step of HC smooth. */
58
59 /* Sharpen mesh filter. */
65
66 /* Filter orientation. */
72
73 /* Displacement eraser. */
75
76 /* unmasked nodes */
79
80 /* Cloth filter. */
81 std::unique_ptr<cloth::SimulationData> cloth_sim;
83
84 /* mask expand iteration caches */
92
95
97
99
100 std::unique_ptr<auto_mask::Cache> automasking;
103
104 /* Pre-smoothed colors used by sharpening. Colors are HSL. */
106
109
111};
112
113void cache_init(bContext *C,
114 Object &ob,
115 Sculpt &sd,
116 undo::Type undo_type,
117 const float mval_fl[2],
118 float area_normal_radius,
119 float start_strength);
121
122/* Filter orientation utils. */
123float3x3 to_orientation_space(const filter::Cache &filter_cache);
124float3x3 to_object_space(const filter::Cache &filter_cache);
125void zero_disabled_axis_components(const filter::Cache &filter_cache, MutableSpan<float3> vectors);
126} // namespace blender::ed::sculpt_paint::filter
static void View(GHOST_IWindow *window, bool stereo, int eye=0)
#define C
Definition RandGen.cpp:29
void zero_disabled_axis_components(const filter::Cache &filter_cache, MutableSpan< float3 > vectors)
float3x3 to_orientation_space(const filter::Cache &filter_cache)
void cache_init(bContext *C, Object &ob, Sculpt &sd, undo::Type undo_type, const float mval_fl[2], float area_normal_radius, float start_strength)
float3x3 to_object_space(const filter::Cache &filter_cache)
void register_operator_props(wmOperatorType *ot)
MatBase< float, 4, 4 > float4x4
MatBase< float, 3, 3 > float3x3
VecBase< float, 3 > float3
std::unique_ptr< cloth::SimulationData > cloth_sim
std::unique_ptr< auto_mask::Cache > automasking
TransformDisplacementMode transform_displacement_mode
wmOperatorType * ot
Definition wm_files.cc:4237