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

Classes

struct  Pixel

Public Types

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

Public Member Functions

 Rows (int2 resolution, int margin)
int2 coordinate_of (const int64_t index) const
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 (const int64_t index, CopyPixelCommand &r_command, const NonManifoldTileEdges &tile_edges)
void find_copy_source (const Span< int64_t > selected_pixels, MutableSpan< CopyPixelCommand > r_commands, const NonManifoldTileEdges &tile_edges)
Vector< int64_t > filter_pixels_for_closer_examination (const NonManifoldTileEdges &tile_edges)
void pack_into (const Span< int64_t > selected_pixels, const Span< CopyPixelCommand > commands, CopyPixelTile &copy_tile) const

Public Attributes

int2 resolution
int margin
Array< Pixel > pixels

Detailed Description

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

Definition at line 245 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 246 of file pbvh_pixels_copy.cc.

Constructor & Destructor Documentation

◆ Rows()

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

Definition at line 271 of file pbvh_pixels_copy.cc.

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

Member Function Documentation

◆ coordinate_of()

int2 blender::bke::pbvh::pixels::Rows::coordinate_of ( const int64_t index) const
inline

Definition at line 276 of file pbvh_pixels_copy.cc.

References resolution.

Referenced by find_copy_source().

◆ 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 ( const Span< int64_t > selected_pixels,
MutableSpan< CopyPixelCommand > r_commands,
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 318 of file pbvh_pixels_copy.cc.

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

Referenced by find_copy_source().

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

References Brush, blender::IndexRange::IndexRange(), blender::threading::parallel_for(), pixels, resolution, blender::x, and y.

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

◆ pack_into()

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: