Blender V5.0
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 226 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 227 of file pbvh_pixels_copy.cc.

Constructor & Destructor Documentation

◆ Rows()

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

Definition at line 279 of file pbvh_pixels_copy.cc.

References margin, pixels, resolution, x, and y.

Referenced by blender::bke::pbvh::pixels::Rows::RowView::RowView().

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

◆ 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 326 of file pbvh_pixels_copy.cc.

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

Referenced by find_copy_source().

◆ init_pixels()

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

Definition at line 284 of file pbvh_pixels_copy.cc.

References pixels, resolution, x, and y.

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 299 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

◆ pixels

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

◆ resolution


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