Blender V4.3
blender::ed::sculpt_paint::auto_mask::Cache Struct Reference

#include <sculpt_automask.hh>

Public Types

enum class  OcclusionValue : int8_t { Unknown = 0 , Visible = 1 , Occluded = 2 }
 

Public Attributes

Settings settings
 
Array< floatfactor
 
Array< OcclusionValueocclusion
 
Array< floatcavity_factor
 
bool can_reuse_mask
 
uchar current_stroke_id
 

Detailed Description

Definition at line 51 of file sculpt_automask.hh.

Member Enumeration Documentation

◆ OcclusionValue

Enumerator
Unknown 
Visible 
Occluded 

Definition at line 57 of file sculpt_automask.hh.

Member Data Documentation

◆ can_reuse_mask

bool blender::ed::sculpt_paint::auto_mask::Cache::can_reuse_mask

Definition at line 80 of file sculpt_automask.hh.

◆ cavity_factor

Array<float> blender::ed::sculpt_paint::auto_mask::Cache::cavity_factor

Cached cavity factor values for each vertex.

Note
-1 means the vertex value still needs to be calculated.

Definition at line 78 of file sculpt_automask.hh.

Referenced by blender::ed::sculpt_paint::auto_mask::calc_cavity_factor_bmesh(), blender::ed::sculpt_paint::auto_mask::calc_cavity_factor_grids(), and blender::ed::sculpt_paint::auto_mask::calc_cavity_factor_mesh().

◆ current_stroke_id

uchar blender::ed::sculpt_paint::auto_mask::Cache::current_stroke_id

Definition at line 81 of file sculpt_automask.hh.

◆ factor

Array<float> blender::ed::sculpt_paint::auto_mask::Cache::factor

◆ occlusion

Array<OcclusionValue> blender::ed::sculpt_paint::auto_mask::Cache::occlusion

Cached occlusion values for each vertex. Since calculating the occlusion is so expensive, it's only calculated at the beginning of a stroke and stored for later.

Todo
Ideally the "unknown" state would be stored per node rather than per vertex, with a lock-protected Map<const bke::pbvh::Node , BitVector<>> for example. Currently complications with face domain auto-masking prevent this though. This array can't be a bitmap because it's written to from multiple threads at the same time.

Definition at line 71 of file sculpt_automask.hh.

Referenced by blender::ed::sculpt_paint::auto_mask::calc_view_occlusion_factor().

◆ settings


The documentation for this struct was generated from the following file: