Blender V4.3
mesh_brush_common.hh File Reference
#include "BLI_array.hh"
#include "BLI_bit_span.hh"
#include "BLI_math_matrix_types.hh"
#include "BLI_math_vector_types.hh"
#include "BLI_offset_indices.hh"
#include "BLI_set.hh"
#include "BLI_span.hh"
#include "BLI_vector.hh"
#include "BKE_subdiv_ccg.hh"
#include "DNA_brush_enums.h"
#include "sculpt_intern.hh"

Go to the source code of this file.

Classes

struct  blender::ed::sculpt_paint::MeshAttributeData
 

Namespaces

namespace  blender
 
namespace  blender::bke
 
namespace  blender::bke::pbvh
 
namespace  blender::ed
 
namespace  blender::ed::sculpt_paint
 
namespace  blender::ed::sculpt_paint::auto_mask
 

Functions

void blender::ed::sculpt_paint::scale_translations (MutableSpan< float3 > translations, Span< float > factors)
 
void blender::ed::sculpt_paint::scale_translations (MutableSpan< float3 > translations, float factor)
 
void blender::ed::sculpt_paint::scale_factors (MutableSpan< float > factors, float strength)
 
void blender::ed::sculpt_paint::scale_factors (MutableSpan< float > factors, Span< float > strengths)
 
void blender::ed::sculpt_paint::translations_from_offset_and_factors (const float3 &offset, Span< float > factors, MutableSpan< float3 > r_translations)
 
void blender::ed::sculpt_paint::translations_from_new_positions (Span< float3 > new_positions, Span< int > verts, Span< float3 > old_positions, MutableSpan< float3 > translations)
 
void blender::ed::sculpt_paint::translations_from_new_positions (Span< float3 > new_positions, Span< float3 > old_positions, MutableSpan< float3 > translations)
 
void blender::ed::sculpt_paint::transform_positions (Span< float3 > src, const float4x4 &transform, MutableSpan< float3 > dst)
 
void blender::ed::sculpt_paint::transform_positions (const float4x4 &transform, MutableSpan< float3 > positions)
 
template<typename T >
void blender::ed::sculpt_paint::gather_data_mesh (Span< T > src, Span< int > indices, MutableSpan< T > dst)
 
template<typename T >
MutableSpan< Tblender::ed::sculpt_paint::gather_data_mesh (const Span< T > src, const Span< int > indices, Vector< T > &dst)
 
template<typename T >
void blender::ed::sculpt_paint::gather_data_grids (const SubdivCCG &subdiv_ccg, Span< T > src, Span< int > grids, MutableSpan< T > node_data)
 
template<typename T >
MutableSpan< Tblender::ed::sculpt_paint::gather_data_grids (const SubdivCCG &subdiv_ccg, const Span< T > src, const Span< int > grids, Vector< T > &dst)
 
template<typename T >
void blender::ed::sculpt_paint::gather_data_bmesh (Span< T > src, const Set< BMVert *, 0 > &verts, MutableSpan< T > node_data)
 
template<typename T >
MutableSpan< Tblender::ed::sculpt_paint::gather_data_bmesh (const Span< T > src, const Set< BMVert *, 0 > &verts, Vector< T > &dst)
 
template<typename T >
void blender::ed::sculpt_paint::scatter_data_mesh (Span< T > src, Span< int > indices, MutableSpan< T > dst)
 
template<typename T >
void blender::ed::sculpt_paint::scatter_data_grids (const SubdivCCG &subdiv_ccg, Span< T > node_data, Span< int > grids, MutableSpan< T > dst)
 
template<typename T >
void blender::ed::sculpt_paint::scatter_data_bmesh (Span< T > node_data, const Set< BMVert *, 0 > &verts, MutableSpan< T > dst)
 
MutableSpan< float3blender::ed::sculpt_paint::gather_grids_positions (const SubdivCCG &subdiv_ccg, const Span< int > grids, Vector< float3 > &positions)
 
void blender::ed::sculpt_paint::gather_bmesh_positions (const Set< BMVert *, 0 > &verts, MutableSpan< float3 > positions)
 
MutableSpan< float3blender::ed::sculpt_paint::gather_bmesh_positions (const Set< BMVert *, 0 > &verts, Vector< float3 > &positions)
 
void blender::ed::sculpt_paint::gather_grids_normals (const SubdivCCG &subdiv_ccg, Span< int > grids, MutableSpan< float3 > normals)
 
void blender::ed::sculpt_paint::gather_bmesh_normals (const Set< BMVert *, 0 > &verts, MutableSpan< float3 > normals)
 
void blender::ed::sculpt_paint::calc_factors_common_mesh (const Depsgraph &depsgraph, const Brush &brush, const Object &object, const MeshAttributeData &attribute_data, Span< float3 > positions, Span< float3 > vert_normals, const bke::pbvh::MeshNode &node, Vector< float > &r_factors, Vector< float > &r_distances)
 
void blender::ed::sculpt_paint::calc_factors_common_mesh_indexed (const Depsgraph &depsgraph, const Brush &brush, const Object &object, const MeshAttributeData &attribute_data, Span< float3 > vert_positions, Span< float3 > vert_normals, const bke::pbvh::MeshNode &node, Vector< float > &r_factors, Vector< float > &r_distances)
 
void blender::ed::sculpt_paint::calc_factors_common_grids (const Depsgraph &depsgraph, const Brush &brush, const Object &object, Span< float3 > positions, const bke::pbvh::GridsNode &node, Vector< float > &r_factors, Vector< float > &r_distances)
 
void blender::ed::sculpt_paint::calc_factors_common_bmesh (const Depsgraph &depsgraph, const Brush &brush, const Object &object, Span< float3 > positions, bke::pbvh::BMeshNode &node, Vector< float > &r_factors, Vector< float > &r_distances)
 
void blender::ed::sculpt_paint::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 blender::ed::sculpt_paint::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 blender::ed::sculpt_paint::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)
 
void blender::ed::sculpt_paint::fill_factor_from_hide (Span< bool > hide_vert, Span< int > verts, MutableSpan< float > r_factors)
 
void blender::ed::sculpt_paint::fill_factor_from_hide (const SubdivCCG &subdiv_ccg, Span< int > grids, MutableSpan< float > r_factors)
 
void blender::ed::sculpt_paint::fill_factor_from_hide (const Set< BMVert *, 0 > &verts, MutableSpan< float > r_factors)
 
void blender::ed::sculpt_paint::fill_factor_from_hide_and_mask (Span< bool > hide_vert, Span< float > mask, Span< int > verts, MutableSpan< float > r_factors)
 
void blender::ed::sculpt_paint::fill_factor_from_hide_and_mask (const SubdivCCG &subdiv_ccg, Span< int > grids, MutableSpan< float > r_factors)
 
void blender::ed::sculpt_paint::fill_factor_from_hide_and_mask (const BMesh &bm, const Set< BMVert *, 0 > &verts, MutableSpan< float > r_factors)
 
void blender::ed::sculpt_paint::calc_front_face (const float3 &view_normal, Span< float3 > normals, MutableSpan< float > factors)
 
void blender::ed::sculpt_paint::calc_front_face (const float3 &view_normal, Span< float3 > vert_normals, Span< int > vert_indices, MutableSpan< float > factors)
 
void blender::ed::sculpt_paint::calc_front_face (const float3 &view_normal, const SubdivCCG &subdiv_ccg, Span< int > grids, MutableSpan< float > factors)
 
void blender::ed::sculpt_paint::calc_front_face (const float3 &view_normal, const Set< BMVert *, 0 > &verts, MutableSpan< float > factors)
 
void blender::ed::sculpt_paint::calc_front_face (const float3 &view_normal, const Set< BMFace *, 0 > &faces, MutableSpan< float > factors)
 
void blender::ed::sculpt_paint::filter_region_clip_factors (const SculptSession &ss, Span< float3 > vert_positions, Span< int > verts, MutableSpan< float > factors)
 
void blender::ed::sculpt_paint::filter_region_clip_factors (const SculptSession &ss, Span< float3 > positions, MutableSpan< float > factors)
 
void blender::ed::sculpt_paint::calc_brush_distances (const SculptSession &ss, Span< float3 > vert_positions, Span< int > vert_indices, eBrushFalloffShape falloff_shape, MutableSpan< float > r_distances)
 
void blender::ed::sculpt_paint::calc_brush_distances (const SculptSession &ss, Span< float3 > positions, eBrushFalloffShape falloff_shape, MutableSpan< float > r_distances)
 
void blender::ed::sculpt_paint::calc_brush_distances_squared (const SculptSession &ss, Span< float3 > vert_positions, Span< int > vert_indices, eBrushFalloffShape falloff_shape, MutableSpan< float > r_distances)
 
void blender::ed::sculpt_paint::calc_brush_distances_squared (const SculptSession &ss, Span< float3 > positions, eBrushFalloffShape falloff_shape, MutableSpan< float > r_distances)
 
void blender::ed::sculpt_paint::filter_distances_with_radius (float radius, Span< float > distances, MutableSpan< float > factors)
 
void blender::ed::sculpt_paint::calc_brush_cube_distances (const Brush &brush, const float4x4 &mat, Span< float3 > positions, Span< int > verts, MutableSpan< float > r_distances, MutableSpan< float > factors)
 
void blender::ed::sculpt_paint::calc_brush_cube_distances (const Brush &brush, const float4x4 &mat, Span< float3 > positions, MutableSpan< float > r_distances, MutableSpan< float > factors)
 
void blender::ed::sculpt_paint::apply_hardness_to_distances (float radius, float hardness, MutableSpan< float > distances)
 
void blender::ed::sculpt_paint::apply_hardness_to_distances (const StrokeCache &cache, const MutableSpan< float > distances)
 
void blender::ed::sculpt_paint::calc_brush_strength_factors (const StrokeCache &cache, const Brush &brush, Span< float > distances, MutableSpan< float > factors)
 
void blender::ed::sculpt_paint::calc_brush_texture_factors (const SculptSession &ss, const Brush &brush, Span< float3 > vert_positions, Span< int > vert_indices, MutableSpan< float > factors)
 
void blender::ed::sculpt_paint::calc_brush_texture_factors (const SculptSession &ss, const Brush &brush, Span< float3 > positions, MutableSpan< float > factors)
 
void blender::ed::sculpt_paint::apply_translations (Span< float3 > translations, Span< int > verts, MutableSpan< float3 > positions)
 
void blender::ed::sculpt_paint::apply_translations (Span< float3 > translations, Span< int > grids, SubdivCCG &subdiv_ccg)
 
void blender::ed::sculpt_paint::apply_translations (Span< float3 > translations, const Set< BMVert *, 0 > &verts)
 
void blender::ed::sculpt_paint::project_translations (MutableSpan< float3 > translations, const float3 &plane)
 
void blender::ed::sculpt_paint::reset_translations_to_original (MutableSpan< float3 > translations, Span< float3 > positions, Span< float3 > orig_positions)
 
void blender::ed::sculpt_paint::apply_crazyspace_to_translations (Span< float3x3 > deform_imats, Span< int > verts, MutableSpan< float3 > translations)
 
void blender::ed::sculpt_paint::clip_and_lock_translations (const Sculpt &sd, const SculptSession &ss, Span< float3 > positions, Span< int > verts, MutableSpan< float3 > translations)
 
void blender::ed::sculpt_paint::clip_and_lock_translations (const Sculpt &sd, const SculptSession &ss, Span< float3 > positions, MutableSpan< float3 > translations)
 
void blender::ed::sculpt_paint::update_shape_keys (Object &object, const Mesh &mesh, const KeyBlock &active_key, Span< int > verts, Span< float3 > translations, Span< float3 > positions_orig)
 
OffsetIndices< intblender::ed::sculpt_paint::create_node_vert_offsets (const Span< bke::pbvh::MeshNode > nodes, const IndexMask &nodes_mask, Array< int > &node_data)
 
OffsetIndices< intblender::ed::sculpt_paint::create_node_vert_offsets (const CCGKey &key, const Span< bke::pbvh::GridsNode > nodes, const IndexMask &nodes_mask, Array< int > &node_data)
 
OffsetIndices< intblender::ed::sculpt_paint::create_node_vert_offsets_bmesh (const Span< bke::pbvh::BMeshNode > nodes, const IndexMask &nodes_mask, Array< int > &node_data)
 
void blender::ed::sculpt_paint::calc_vert_neighbors (OffsetIndices< int > faces, Span< int > corner_verts, GroupedSpan< int > vert_to_face, Span< bool > hide_poly, Span< int > verts, MutableSpan< Vector< int > > result)
 
void blender::ed::sculpt_paint::calc_vert_neighbors (const SubdivCCG &subdiv_ccg, Span< int > grids, MutableSpan< Vector< SubdivCCGCoord > > result)
 
void blender::ed::sculpt_paint::calc_vert_neighbors (Set< BMVert *, 0 > verts, MutableSpan< Vector< BMVert * > > result)
 
void blender::ed::sculpt_paint::calc_vert_neighbors_interior (OffsetIndices< int > faces, Span< int > corner_verts, GroupedSpan< int > vert_to_face, BitSpan boundary_verts, Span< bool > hide_poly, Span< int > verts, MutableSpan< Vector< int > > result)
 
void blender::ed::sculpt_paint::calc_vert_neighbors_interior (OffsetIndices< int > faces, Span< int > corner_verts, BitSpan boundary_verts, const SubdivCCG &subdiv_ccg, Span< int > grids, MutableSpan< Vector< SubdivCCGCoord > > result)
 
void blender::ed::sculpt_paint::calc_vert_neighbors_interior (const Set< BMVert *, 0 > &verts, MutableSpan< Vector< BMVert * > > result)
 
void blender::ed::sculpt_paint::calc_translations_to_plane (Span< float3 > vert_positions, Span< int > verts, const float4 &plane, MutableSpan< float3 > translations)
 
void blender::ed::sculpt_paint::calc_translations_to_plane (Span< float3 > positions, const float4 &plane, MutableSpan< float3 > translations)
 
void blender::ed::sculpt_paint::filter_verts_outside_symmetry_area (Span< float3 > positions, const float3 &pivot, ePaintSymmetryFlags symm, MutableSpan< float > factors)
 
void blender::ed::sculpt_paint::filter_plane_trim_limit_factors (const Brush &brush, const StrokeCache &cache, Span< float3 > translations, MutableSpan< float > factors)
 
void blender::ed::sculpt_paint::filter_below_plane_factors (Span< float3 > vert_positions, Span< int > verts, const float4 &plane, MutableSpan< float > factors)
 
void blender::ed::sculpt_paint::filter_below_plane_factors (Span< float3 > positions, const float4 &plane, MutableSpan< float > factors)
 
void blender::ed::sculpt_paint::filter_above_plane_factors (Span< float3 > vert_positions, Span< int > verts, const float4 &plane, MutableSpan< float > factors)
 
void blender::ed::sculpt_paint::filter_above_plane_factors (Span< float3 > positions, const float4 &plane, MutableSpan< float > factors)