Blender V5.0
blender::ed::sculpt_paint::brushes::clay_strips_cc Namespace Reference

Classes

struct  LocalData

Functions

static void calc_local_positions (const Span< float3 > vert_positions, const Span< int > verts, const float4x4 &mat, const MutableSpan< float2 > xy_positions, const MutableSpan< float > z_positions)
static void calc_local_positions (const Span< float3 > positions, const float4x4 &mat, const MutableSpan< float2 > xy_positions, const MutableSpan< float > z_positions)
static void apply_z_axis_factors (const Span< float > z_positions, const MutableSpan< float > factors)
static void apply_plane_trim_factors (const Brush &brush, const Span< float > z_positions, const MutableSpan< float > factors)
static void calc_faces (const Depsgraph &depsgraph, const Sculpt &sd, const Brush &brush, const float4x4 &mat, const float3 &offset, const Span< float3 > vert_normals, const MeshAttributeData &attribute_data, 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 float4x4 &mat, const float3 &offset, const bke::pbvh::GridsNode &node, LocalData &tls)
static void calc_bmesh (const Depsgraph &depsgraph, const Sculpt &sd, Object &object, const Brush &brush, const float4x4 &mat, const float3 &offset, bke::pbvh::BMeshNode &node, LocalData &tls)

Function Documentation

◆ apply_plane_trim_factors()

void blender::ed::sculpt_paint::brushes::clay_strips_cc::apply_plane_trim_factors ( const Brush & brush,
const Span< float > z_positions,
const MutableSpan< float > factors )
static

If plane trim is enabled, vertices with z values greater than the specified plane_trim threshold are ignored (i.e., their factors are set to zero).

Definition at line 115 of file clay_strips.cc.

◆ apply_z_axis_factors()

void blender::ed::sculpt_paint::brushes::clay_strips_cc::apply_z_axis_factors ( const Span< float > z_positions,
const MutableSpan< float > factors )
static

Applies a parabolic factor of the form z * (1 - z) to each vertex. Vertices outside of the interval (0, 1) are out of range and their factors are set to zero. Note: The local coordinate system is constructed such that all relevant z values are non-negative.

Definition at line 99 of file clay_strips.cc.

◆ calc_bmesh()

void blender::ed::sculpt_paint::brushes::clay_strips_cc::calc_bmesh ( const Depsgraph & depsgraph,
const Sculpt & sd,
Object & object,
const Brush & brush,
const float4x4 & mat,
const float3 & offset,
bke::pbvh::BMeshNode & node,
LocalData & tls )
static

Definition at line 244 of file clay_strips.cc.

◆ calc_faces()

void blender::ed::sculpt_paint::brushes::clay_strips_cc::calc_faces ( const Depsgraph & depsgraph,
const Sculpt & sd,
const Brush & brush,
const float4x4 & mat,
const float3 & offset,
const Span< float3 > vert_normals,
const MeshAttributeData & attribute_data,
const bke::pbvh::MeshNode & node,
Object & object,
LocalData & tls,
const PositionDeformData & position_data )
static

Definition at line 133 of file clay_strips.cc.

◆ calc_grids()

void blender::ed::sculpt_paint::brushes::clay_strips_cc::calc_grids ( const Depsgraph & depsgraph,
const Sculpt & sd,
Object & object,
const Brush & brush,
const float4x4 & mat,
const float3 & offset,
const bke::pbvh::GridsNode & node,
LocalData & tls )
static

Definition at line 189 of file clay_strips.cc.

◆ calc_local_positions() [1/2]

void blender::ed::sculpt_paint::brushes::clay_strips_cc::calc_local_positions ( const Span< float3 > positions,
const float4x4 & mat,
const MutableSpan< float2 > xy_positions,
const MutableSpan< float > z_positions )
static

Definition at line 77 of file clay_strips.cc.

◆ calc_local_positions() [2/2]

void blender::ed::sculpt_paint::brushes::clay_strips_cc::calc_local_positions ( const Span< float3 > vert_positions,
const Span< int > verts,
const float4x4 & mat,
const MutableSpan< float2 > xy_positions,
const MutableSpan< float > z_positions )
static

Transforms positions from object space positions to brush-local space. Splitting the XY and Z components gives slightly better performance.

Definition at line 60 of file clay_strips.cc.