Blender V5.0
blender::bke::pbvh::pixels::CopyPixelCommand Struct Reference

#include <BKE_paint_bvh_pixels.hh>

Public Member Functions

 CopyPixelCommand ()=default
 CopyPixelCommand (const CopyPixelGroup &group)
template<typename T>
void mix_source_and_write_destination (image::ImageBufferAccessor< T > &tile_buffer) const
void apply (const DeltaCopyPixelCommand &item)
DeltaCopyPixelCommand encode_delta (const CopyPixelCommand &next_command) const
bool can_be_extended (const CopyPixelCommand &command) const

Public Attributes

int2 destination
int2 source_1
int2 source_2
float mix_factor

Detailed Description

Pixel copy command to mix 2 source pixels and write to a destination pixel.

Definition at line 215 of file BKE_paint_bvh_pixels.hh.

Constructor & Destructor Documentation

◆ CopyPixelCommand() [1/2]

blender::bke::pbvh::pixels::CopyPixelCommand::CopyPixelCommand ( )
default

Referenced by can_be_extended(), and encode_delta().

◆ CopyPixelCommand() [2/2]

blender::bke::pbvh::pixels::CopyPixelCommand::CopyPixelCommand ( const CopyPixelGroup & group)
inline

Definition at line 226 of file BKE_paint_bvh_pixels.hh.

References destination, mix_factor, source_1, and source_2.

Member Function Documentation

◆ apply()

◆ can_be_extended()

bool blender::bke::pbvh::pixels::CopyPixelCommand::can_be_extended ( const CopyPixelCommand & command) const
inline

◆ encode_delta()

DeltaCopyPixelCommand blender::bke::pbvh::pixels::CopyPixelCommand::encode_delta ( const CopyPixelCommand & next_command) const
inline

Definition at line 251 of file BKE_paint_bvh_pixels.hh.

References CopyPixelCommand(), mix_factor, source_1, and source_2.

◆ mix_source_and_write_destination()

template<typename T>
void blender::bke::pbvh::pixels::CopyPixelCommand::mix_source_and_write_destination ( image::ImageBufferAccessor< T > & tile_buffer) const
inline

Member Data Documentation

◆ destination

int2 blender::bke::pbvh::pixels::CopyPixelCommand::destination

◆ mix_factor

float blender::bke::pbvh::pixels::CopyPixelCommand::mix_factor

Factor to mix between first and second source.

Definition at line 223 of file BKE_paint_bvh_pixels.hh.

Referenced by apply(), CopyPixelCommand(), encode_delta(), blender::bke::pbvh::pixels::Rows::find_copy_source(), and mix_source_and_write_destination().

◆ source_1

int2 blender::bke::pbvh::pixels::CopyPixelCommand::source_1

◆ source_2

int2 blender::bke::pbvh::pixels::CopyPixelCommand::source_2

Pixel coordinate to read second source from.

Definition at line 221 of file BKE_paint_bvh_pixels.hh.

Referenced by apply(), CopyPixelCommand(), encode_delta(), blender::bke::pbvh::pixels::Rows::find_copy_source(), and mix_source_and_write_destination().


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