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

#include <BKE_pbvh_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 209 of file BKE_pbvh_pixels.hh.

Constructor & Destructor Documentation

◆ CopyPixelCommand() [1/2]

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

◆ CopyPixelCommand() [2/2]

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

Definition at line 220 of file BKE_pbvh_pixels.hh.

Member Function Documentation

◆ apply()

◆ can_be_extended()

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

Definition at line 252 of file BKE_pbvh_pixels.hh.

References blender::math::abs(), destination, max_ii(), source_1, and UNPACK2.

◆ encode_delta()

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

Definition at line 245 of file BKE_pbvh_pixels.hh.

References 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

Pixel coordinate to write to.

Definition at line 211 of file BKE_pbvh_pixels.hh.

Referenced by can_be_extended(), and blender::bke::pbvh::pixels::Rows::Pixel::init().

◆ mix_factor

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

Factor to mix between first and second source.

Definition at line 217 of file BKE_pbvh_pixels.hh.

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

◆ source_1

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

Pixel coordinate to read first source from.

Definition at line 213 of file BKE_pbvh_pixels.hh.

Referenced by apply(), can_be_extended(), encode_delta(), blender::bke::pbvh::pixels::Rows::Pixel::init(), and mix_source_and_write_destination().

◆ source_2

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

Pixel coordinate to read second source from.

Definition at line 215 of file BKE_pbvh_pixels.hh.

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


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