32inline namespace rotate_cc {
49 for (
const int i : positions.index_range()) {
53 translations[i] = rotated + center - positions[i];
179 constexpr std::array<int, 8> flip{1, -1, -1, 1, -1, 1, 1, -1};
183 switch (pbvh.
type()) {
185 const Mesh &mesh = *
static_cast<Mesh *
>(
object.data);
192 depsgraph, sd, brush, angle, attribute_data, nodes[i],
object, tls, position_data);
198 SubdivCCG &subdiv_ccg = *
object.sculpt->subdiv_ccg;
const Brush * BKE_paint_brush_for_read(const Paint *paint)
const blender::Set< BMVert *, 0 > & BKE_pbvh_bmesh_node_unique_verts(blender::bke::pbvh::BMeshNode *node)
CCGKey BKE_subdiv_ccg_key_top_level(const SubdivCCG &subdiv_ccg)
Object is a sort of wrapper for general info.
constexpr int64_t size() const
constexpr int64_t size() 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_bmesh(BMeshNode &node)
void update_node_bounds_mesh(Span< float3 > positions, MeshNode &node)
void update_node_bounds_grids(int grid_area, Span< float3 > positions, GridsNode &node)
void flush_bounds_to_parents(Tree &pbvh)
static void calc_bmesh(const Depsgraph &depsgraph, const Sculpt &sd, Object &object, const Brush &brush, const float3 &direction, const float strength, bke::pbvh::BMeshNode &node, LocalData &tls)
static void calc_faces(const Depsgraph &depsgraph, const Sculpt &sd, const Brush &brush, const float4 &test_plane, const float strength, const MeshAttributeData &attribute_data, const Span< float3 > vert_normals, const bke::pbvh::MeshNode &node, Object &object, LocalData &tls, const PositionDeformData &position_data)
static void calc_grids(const Depsgraph &depsgraph, const Sculpt &sd, Object &object, const Brush &brush, const float4 &test_plane, const float strength, bke::pbvh::GridsNode &node, LocalData &tls)
static void calc_grids(const Depsgraph &depsgraph, const Sculpt &sd, Object &object, const Brush &brush, const float angle, bke::pbvh::GridsNode &node, LocalData &tls)
static void calc_bmesh(const Depsgraph &depsgraph, const Sculpt &sd, Object &object, const Brush &brush, const float angle, bke::pbvh::BMeshNode &node, LocalData &tls)
static BLI_NOINLINE void calc_translations(const Span< float3 > positions, const float3 &axis, const Span< float > angles, const float3 ¢er, const MutableSpan< float3 > translations)
static void calc_faces(const Depsgraph &depsgraph, const Sculpt &sd, const Brush &brush, const float angle, const MeshAttributeData &attribute_data, const bke::pbvh::MeshNode &node, Object &object, LocalData &tls, const PositionDeformData &position_data)
void calc_factors_common_from_orig_data_grids(const Depsgraph &depsgraph, const Brush &brush, const Object &object, Span< float3 > positions, Span< float3 > normals, const bke::pbvh::GridsNode &node, Vector< float > &r_factors, Vector< float > &r_distances)
void do_rotate_brush(const Depsgraph &depsgraph, const Sculpt &sd, Object &object, const IndexMask &node_mask)
void orig_position_data_gather_bmesh(const BMLog &bm_log, const Set< BMVert *, 0 > &verts, MutableSpan< float3 > positions, MutableSpan< float3 > normals)
void scale_factors(MutableSpan< float > factors, float strength)
void calc_factors_common_from_orig_data_mesh(const Depsgraph &depsgraph, const Brush &brush, const Object &object, const MeshAttributeData &attribute_data, Span< float3 > positions, Span< float3 > normals, const bke::pbvh::MeshNode &node, Vector< float > &r_factors, Vector< float > &r_distances)
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)
OrigPositionData orig_position_data_get_mesh(const Object &object, const bke::pbvh::MeshNode &node)
OrigPositionData orig_position_data_get_grids(const Object &object, const bke::pbvh::GridsNode &node)
void calc_factors_common_from_orig_data_bmesh(const Depsgraph &depsgraph, const Brush &brush, const Object &object, Span< float3 > positions, Span< float3 > normals, bke::pbvh::BMeshNode &node, Vector< float > &r_factors, Vector< float > &r_distances)
MatT from_rotation(const RotationT &rotation)
VecBase< T, 3 > transform_point(const CartesianBasis &basis, const VecBase< T, 3 > &v)
blender::ed::sculpt_paint::StrokeCache * cache
blender::Array< blender::float3 > positions
Vector< float > distances
Vector< float3 > translations
float3 sculpt_normal_symm
ePaintSymmetryFlags mirror_symmetry_pass
Vector< float > distances
Vector< float3 > translations