Blender V5.3
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
18namespace blender {
19
20struct wmOperatorType;
21
22namespace bke::pbvh {
23class Node;
24}
25namespace ed::sculpt_paint {
27namespace auto_mask {
28struct Cache;
29}
30namespace cloth {
31struct SimulationData;
32}
33namespace undo {
34enum class Type : int8_t;
35}
36} // namespace ed::sculpt_paint
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
85
87
88 std::unique_ptr<auto_mask::Cache> automasking;
91
92 /* Pre-smoothed colors used by sharpening. Colors are HSL. */
94
98
100};
101
102void cache_init(bContext *C,
103 Object &ob,
104 Sculpt &sd,
105 undo::Type undo_type,
106 const float mval_fl[2],
107 float area_normal_radius,
108 float start_strength);
110
111/* Filter orientation utils. */
112float3x3 to_orientation_space(const filter::Cache &filter_cache);
113float3x3 to_object_space(const filter::Cache &filter_cache);
114void zero_disabled_axis_components(const filter::Cache &filter_cache, MutableSpan<float3> vectors);
115} // namespace ed::sculpt_paint::filter
116
117} // namespace blender
#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)
BMesh Iterators.
MatBase< float, 4, 4 > float4x4
MatBase< float, 3, 3 > float3x3
VecBase< float, 3 > float3
signed char int8_t
Definition BKE_text.h:76
std::unique_ptr< cloth::SimulationData > cloth_sim
std::unique_ptr< auto_mask::Cache > automasking
TransformDisplacementMode transform_displacement_mode