Blender V4.3
blender::bke::pbvh::pixels::Rows Struct Reference

Classes

struct  Pixel
 
struct  RowView
 

Public Types

enum class  PixelType { Undecided , Brush , SelectedForCloserExamination , CopyFromClosestEdge }
 

Public Member Functions

 Rows (int2 resolution, int margin)
 
void init_pixels ()
 
void mark_pixels_effected_by_brush (const PixelNodesTileData &nodes_tile_pixels)
 
int2 find_second_source (int2 destination, int2 first_source)
 
float determine_mix_factor (const int2 destination, const int2 source_1, const int2 source_2, const Edge< CoordSpace::Tile > &edge)
 
void find_copy_source (Pixel &pixel, const NonManifoldTileEdges &tile_edges)
 
void find_copy_source (Vector< std::reference_wrapper< Pixel > > &selected_pixels, const NonManifoldTileEdges &tile_edges)
 
Vector< std::reference_wrapper< Pixel > > filter_pixels_for_closer_examination (const NonManifoldTileEdges &tile_edges)
 
void pack_into (const Span< std::reference_wrapper< Pixel > > selected_pixels, CopyPixelTile &copy_tile) const
 

Public Attributes

int2 resolution
 
int margin
 
Array< Pixelpixels
 

Detailed Description

Row contains intermediate data per pixel for a single image row. It is used during updating to encode pixels.

Definition at line 228 of file pbvh_pixels_copy.cc.

Member Enumeration Documentation

◆ PixelType

Enumerator
Undecided 
Brush 

This pixel is directly affected by a brush and doesn't need to be solved.

SelectedForCloserExamination 
CopyFromClosestEdge 

This pixel will be copied from another pixel to solve non-manifold edge bleeding.

Definition at line 229 of file pbvh_pixels_copy.cc.

Constructor & Destructor Documentation

◆ Rows()

blender::bke::pbvh::pixels::Rows::Rows ( int2 resolution,
int margin )
inline

Definition at line 281 of file pbvh_pixels_copy.cc.

Member Function Documentation

◆ determine_mix_factor()

float blender::bke::pbvh::pixels::Rows::determine_mix_factor ( const int2 destination,
const int2 source_1,
const int2 source_2,
const Edge< CoordSpace::Tile > & edge )
inline

Definition at line 362 of file pbvh_pixels_copy.cc.

References clamp_f(), and closest_to_line_v2().

◆ filter_pixels_for_closer_examination()

◆ find_copy_source() [1/2]

◆ find_copy_source() [2/2]

void blender::bke::pbvh::pixels::Rows::find_copy_source ( Vector< std::reference_wrapper< Pixel > > & selected_pixels,
const NonManifoldTileEdges & tile_edges )
inline

◆ find_second_source()

int2 blender::bke::pbvh::pixels::Rows::find_second_source ( int2 destination,
int2 first_source )
inline

Look for a second source pixel that will be blended with the first source pixel to improve the quality of the fix.

  • The second source pixel must be a neighbor pixel of the first source, or the same as the first source when no second pixel could be found.
  • The second source pixel must be a pixel that is painted on by the brush.
  • The second source pixel must be the second closest pixel, or the first source when no second pixel could be found.

Definition at line 328 of file pbvh_pixels_copy.cc.

References BLI_rcti_init(), BLI_rcti_size_x(), BLI_rcti_size_y(), blender::math::distance(), max_ii(), min_ii(), rcti::xmin, and rcti::ymin.

◆ init_pixels()

void blender::bke::pbvh::pixels::Rows::init_pixels ( )
inline

Definition at line 286 of file pbvh_pixels_copy.cc.

References resolution.

Referenced by blender::bke::pbvh::pixels::copy_update().

◆ mark_pixels_effected_by_brush()

void blender::bke::pbvh::pixels::Rows::mark_pixels_effected_by_brush ( const PixelNodesTileData & nodes_tile_pixels)
inline

Mark pixels that are painted on by the brush. Those pixels don't need to be updated, but will act as a source for other pixels.

Definition at line 301 of file pbvh_pixels_copy.cc.

References blender::threading::parallel_for_each().

Referenced by blender::bke::pbvh::pixels::copy_update().

◆ pack_into()

void blender::bke::pbvh::pixels::Rows::pack_into ( const Span< std::reference_wrapper< Pixel > > selected_pixels,
CopyPixelTile & copy_tile ) const
inline

Member Data Documentation

◆ margin

int blender::bke::pbvh::pixels::Rows::margin

Definition at line 265 of file pbvh_pixels_copy.cc.

◆ pixels

Array<Pixel> blender::bke::pbvh::pixels::Rows::pixels

Definition at line 266 of file pbvh_pixels_copy.cc.

◆ resolution

int2 blender::bke::pbvh::pixels::Rows::resolution

Definition at line 264 of file pbvh_pixels_copy.cc.

Referenced by init_pixels().


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