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

Classes

struct  LocalData

Functions

static void calc_local_positions (const float4x4 &mat, const Span< int > verts, const Span< float3 > positions, const MutableSpan< float3 > local_positions)
static void calc_local_distances (const float height, const float depth, const MutableSpan< float3 > local_positions, const MutableSpan< float > distances)
static void scale_factors_by_height_and_depth (const float height, const float depth, const MutableSpan< float3 > local_positions, const MutableSpan< float > factors)
static void calc_translations (const float3 &plane_normal, const float radius, const float strength, const MutableSpan< float3 > local_positions, const MutableSpan< float > factors, const MutableSpan< float3 > r_translations)
static void calc_faces (const Depsgraph &depsgraph, const Sculpt &sd, const Brush &brush, const float4x4 &mat, const float3 &plane_normal, const float strength, const float height, const float depth, 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 float4x4 &mat, const float3 &plane_normal, const float strength, const float height, const float depth, 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 &plane_normal, const float strength, const float height, const float depth, bke::pbvh::BMeshNode &node, LocalData &tls)

Function Documentation

◆ calc_bmesh()

void blender::ed::sculpt_paint::brushes::plane_cc::calc_bmesh ( const Depsgraph & depsgraph,
const Sculpt & sd,
Object & object,
const Brush & brush,
const float4x4 & mat,
const float3 & plane_normal,
const float strength,
const float height,
const float depth,
bke::pbvh::BMeshNode & node,
LocalData & tls )
static

Definition at line 304 of file plane.cc.

◆ calc_faces()

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

Definition at line 189 of file plane.cc.

◆ calc_grids()

void blender::ed::sculpt_paint::brushes::plane_cc::calc_grids ( const Depsgraph & depsgraph,
const Sculpt & sd,
Object & object,
const Brush & brush,
const float4x4 & mat,
const float3 & plane_normal,
const float strength,
const float height,
const float depth,
bke::pbvh::GridsNode & node,
LocalData & tls )
static

Definition at line 247 of file plane.cc.

◆ calc_local_distances()

void blender::ed::sculpt_paint::brushes::plane_cc::calc_local_distances ( const float height,
const float depth,
const MutableSpan< float3 > local_positions,
const MutableSpan< float > distances )
static

Computes the local distances. For vertices above the plane, the z-distances are divided by height, effectively scaling the z-distances so that a vertex of local coordinates (0, 0, height) has a z-distance of 1.

When height is 0, the local distances are set to 1. In object space, this is equivalent to setting the distances equal to the radius, resulting in a falloff strength of 0 (no displacement).

The effect of depth on vertices below the plane is analogous.

Definition at line 78 of file plane.cc.

◆ calc_local_positions()

void blender::ed::sculpt_paint::brushes::plane_cc::calc_local_positions ( const float4x4 & mat,
const Span< int > verts,
const Span< float3 > positions,
const MutableSpan< float3 > local_positions )
static

Definition at line 56 of file plane.cc.

◆ calc_translations()

void blender::ed::sculpt_paint::brushes::plane_cc::calc_translations ( const float3 & plane_normal,
const float radius,
const float strength,
const MutableSpan< float3 > local_positions,
const MutableSpan< float > factors,
const MutableSpan< float3 > r_translations )
static

Definition at line 174 of file plane.cc.

◆ scale_factors_by_height_and_depth()

void blender::ed::sculpt_paint::brushes::plane_cc::scale_factors_by_height_and_depth ( const float height,
const float depth,
const MutableSpan< float3 > local_positions,
const MutableSpan< float > factors )
static

Definition at line 130 of file plane.cc.