![]() |
ProtoTracer
1.0
Real-time 3D rendering and animation engine
|
An effect that applies a vertical blur to a pixel group. More...
#include <VerticalBlur.h>
Public Member Functions | |
VerticalBlur (uint8_t pixels) | |
Constructs a VerticalBlur effect instance. | |
void | ApplyEffect (IPixelGroup *pixelGroup) override |
Applies the vertical blur effect to the given pixel group. | |
![]() | |
Effect () | |
Default constructor for the Effect class. | |
void | SetRatio (float ratio) |
Sets the scaling ratio for the effect. | |
Private Attributes | |
const uint8_t | pixels |
Number of pixels to include in the vertical blur radius. | |
Additional Inherited Members | |
![]() | |
float | ratio = 0.0f |
A scaling ratio used for dynamic effect adjustments. | |
An effect that applies a vertical blur to a pixel group.
The VerticalBlur
effect modifies pixel colors by averaging neighboring pixels along the vertical axis, creating a softened appearance.
Definition at line 24 of file VerticalBlur.h.
VerticalBlur | ( | uint8_t | pixels | ) |
Constructs a VerticalBlur
effect instance.
pixels | Number of pixels to include in the blur radius. |
Definition at line 3 of file VerticalBlur.cpp.
|
overridevirtual |
Applies the vertical blur effect to the given pixel group.
The effect calculates an average color value for each pixel by considering neighboring pixels within the specified vertical radius.
pixelGroup | Pointer to the IPixelGroup to which the effect will be applied. |
Implements Effect.
Definition at line 5 of file VerticalBlur.cpp.
References RGBColor::B, Mathematics::Constrain(), RGBColor::G, IPixelGroup::GetColorBuffer(), IPixelGroup::GetColors(), IPixelGroup::GetDownIndex(), IPixelGroup::GetPixelCount(), IPixelGroup::GetUpIndex(), Mathematics::Map(), pixels, RGBColor::R, and Effect::ratio.
Number of pixels to include in the vertical blur radius.
Definition at line 27 of file VerticalBlur.h.
Referenced by ApplyEffect().